gummi icon indicating copy to clipboard operation
gummi copied to clipboard

Gummi tries to compile currently open document, instead of "home" file of project

Open mdavis-xyz opened this issue 10 years ago • 3 comments

I have a project with multiple files. One is marked with the home icon.

When I select that file, the preview works.

When I select any other file, gummi tries to compile that file, and so the preview fails.

I understand that this would be a lot of work to fix, since \input{} looks at the saved files on disk, rather than the temporary files in the editory. However this functionality is a very fundamental part of the "project" idea. I thought the whole point was so that you can work with multi-file documents.

mdavis-xyz avatar Sep 04 '15 08:09 mdavis-xyz

here is a related stackexchange-question and a workaround:

The main.tex file defines \def\COMPLETE{} whereas any included file now has in the beginning

\ifdefined\COMPLETE
\else
\documentclass[12pt]{article}
\input{util} %file containing all the used libraries
\begin{document}
\fi

and

\ifdefined\COMPLETE
\else
\end{document}
\fi

at the end. Therefore if the file is not included in the main, but displayed on its own it still has the necessary code to be valid.

bjuergens avatar Jun 06 '17 12:06 bjuergens

here is a related stackexchange-question and a workaround:

The main.tex file defines \def\COMPLETE{} whereas any included file now has in the beginning

\ifdefined\COMPLETE
\else
\documentclass[12pt]{article}
\input{util} %file containing all the used libraries
\begin{document}
\fi

and

\ifdefined\COMPLETE
\else
\end{document}
\fi

at the end. Therefore if the file is not included in the main, but displayed on its own it still has the necessary code to be valid.

Can you please explain it in details ?

bedus-creation avatar Nov 23 '19 03:11 bedus-creation

This error persist. I'm currently trying to create a project for a thesis. Every time I change to the chapter file (added on project window), the “Preview pane” change focus to the chapter. So I can't see is been written, and I have to go back to main.tex file.

justi153 avatar Feb 14 '23 12:02 justi153