On 11/04/2019 10:08, Helge Hafting wrote:
Den 01.04.2019 20:58, skrev Paul Johnson:
I have a dissertation template for students at my University. There is
a main thesis document and then the separate chapters are in
subdirectories. (http://crmda.ku.edu/node/555)
Currently, in version, "KU-thesis-20190201.zip
<http://crmda.dept.ku.edu/guides/43.KU_Thesis/KU-thesis-20190201.zip>", it
appears to work for everybody to use LyX to edit either the main
document or the individual chapters.
However, I have students who want to use the dissertation template as
raw LaTexX files, rather than within LyX. Here I run into a bad problem.
[...]
The problem happens when some file is both used as a child document and
as a freestanding document, and you wish to work on the TeX files
instead of in LyX.
Here is a solution:
Use your dissertation & chapter files as-is, I guess you have good
reasons for dividing up the document like that. (And it is something
both LyX and LaTeX does well too.)
But never use a chapter file alone. Instead, create a dummy master
document for each chapter file. It should contain no text, but the same
settings & preamble as the real master document. And it should include
that single chapter file. This way, the chapter file is a child document
to the dissertation, but also a child document to the "chapter master
document".
No change for those who work on the dissertation as a whole - they need
the dissertation master file and the chapter files. They won't need the
"chapter master" files.
Those who wish to work on a single chapter, can then open the chapter
master file and do an export from there. They should get two LaTeX
files; the master and the chapter file. The chapter latex file won't
work alone, but they will run pdflatex against the chapter master which
will include the chapter tex file they work on. If need be, such a
chapter tex file can be moved back and forth between those who work on a
complete dissertation and those who do single-chapter work. Because it
is now an included file in either case - included from a dissertation
master or from a chapter master.
This works fine - unless users find it too complicated having two files.
Helge Hafting
A similar way, but without the need of extra master documents, to
achieve this is to have all parts in child documents, including one with
the Title and TOC, etc. Then you can deactivate child documents via the
Document > Settings of the master as seems fitting.
Daniel