Preview a single child document while maintaining counters and references

Patrick De Visschere pdvisschere at
Wed Mar 11 21:44:51 UTC 2020

> On 11 Mar 2020, at 17:58, Daniel <xracoonx at> wrote:
> On 2020-03-11 08:38, Jürgen Spitzmüller wrote:
>> Am Dienstag, den 10.03.2020, 15:17 +0100 schrieb Daniel:
>>> However, often I would like to preview only one child document (e.g.
>>> one
>>> chapter) while maintaining counters and references. Is there a quick
>>> way
>>> to do so?
>> You mean, without the master? No. I don't think that's possible in
>> LaTeX either.
>> Jürgen
> I see. I wasn't that this is pure LaTeX magic. I guess, I should then just set up my master in such a way that excluding all children except for one chapter leads to my desired result.
> Daniel

Take a look here: <>

With \includeonly{somechapter} in the preamble (of the master) one can limit the output to that chapter.
But one must have compiled the complete document once before this will work, because the .aux files of all childs are needed.

This works straight away with e.g. TexShop.

With lyx one must first compile (only once I think) the complete document and then one can enter the \includeonly{name_used_by_lyx} command in the preamble of the master.
You will have to look up the correct name in the master.tex file generated by lyx (in the temp directory) since the filenames are modified.

Thanks for bringing this up. I was looking for it too.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1650 bytes
Desc: not available
URL: <>

More information about the lyx-users mailing list