Re: Preview a single child document while maintaining counters and references

2020-03-12 Thread Patrick De Visschere
Right. That’s even better. Thanks.

Patrick

> On 12 Mar 2020, at 06:46, Daniel  wrote:
> 
> On 11/3/20 22:44, Patrick De Visschere wrote:
>>> On 11 Mar 2020, at 17:58, Daniel mailto:xraco...@gmx.de>> 
>>> 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:
>> http://web.science.mq.edu.au/~rdale/resources/writingnotes/latexstruct.html 
>> 
>> 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.
>> Patrick
> 
> Patrick, I think the functionality your are mentioning that LaTeX has for 
> this is actually already integrated into LyX. Have a look at Document > 
> Settings > Child Documents. Here you can set which child documents to put 
> into the \includeonly command and also choose whether the aux file of the 
> whole document should be generated or not (via the maintain counters and 
> references checkbox).
> 
> Normally, I had some content in my master document that was not part of a 
> child document, e.g. title, table of contents, bibliography, etc. But now, I 
> just put those into their own child documents ("front matter" and "back 
> matter"). Then I can compile just a single chapter using LyX's functionality. 
> Now that I think of it, pretty straight forward to arrange a document like 
> this.
> 
> Since it is so straight forward and going back to the master to set to only 
> include one chapter is a bit cumbersome, maybe LyX could give one a special 
> Preview option on child documents, called "Preview Master with Child Document 
> Only" or so. This option will typeset the master with the \includeonly 
> command containing only the current child document while maintaining counters 
> and references. That would be very handy, if one needs to send or print out 
> only single chapters without any other material.
> 
> Daniel
> 
> -- 
> lyx-users mailing list
> lyx-users@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users




smime.p7s
Description: S/MIME cryptographic signature
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Preview a single child document while maintaining counters and references

2020-03-12 Thread Jürgen Spitzmüller
Am Mittwoch, den 11.03.2020, 22:44 +0100 schrieb Patrick De Visschere:
> 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.

And with LyX

> 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.

No. There is GUI support for it. Go to Document > Settings > Child
Documents (in your master file), select "Include only selected
children", select the chapters you want to include, and click "Maintain
counters and references" to have the complete document compiled once
before only the \includeonly documents are completed.

A drawback currently is that "Maintain counters and references" makes
LyX execute the extra compilation every time, which increases
compilation time.  Normally, you can uncheck it if the document has
been built once and if you only change the included document.

Ideally LyX should be smart enough to detect changes and do the
complete execution only if necessary.

Jürgen



signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Preview a single child document while maintaining counters and references

2020-03-11 Thread Daniel

On 11/3/20 22:44, Patrick De Visschere wrote:



On 11 Mar 2020, at 17:58, Daniel > 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:
http://web.science.mq.edu.au/~rdale/resources/writingnotes/latexstruct.html 



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.

Patrick



Patrick, I think the functionality your are mentioning that LaTeX has 
for this is actually already integrated into LyX. Have a look at 
Document > Settings > Child Documents. Here you can set which child 
documents to put into the \includeonly command and also choose whether 
the aux file of the whole document should be generated or not (via the 
maintain counters and references checkbox).


Normally, I had some content in my master document that was not part of 
a child document, e.g. title, table of contents, bibliography, etc. But 
now, I just put those into their own child documents ("front matter" and 
"back matter"). Then I can compile just a single chapter using LyX's 
functionality. Now that I think of it, pretty straight forward to 
arrange a document like this.


Since it is so straight forward and going back to the master to set to 
only include one chapter is a bit cumbersome, maybe LyX could give one a 
special Preview option on child documents, called "Preview Master with 
Child Document Only" or so. This option will typeset the master with the 
\includeonly command containing only the current child document while 
maintaining counters and references. That would be very handy, if one 
needs to send or print out only single chapters without any other material.


Daniel

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Preview a single child document while maintaining counters and references

2020-03-11 Thread Patrick De Visschere


> On 11 Mar 2020, at 17:58, Daniel  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:
http://web.science.mq.edu.au/~rdale/resources/writingnotes/latexstruct.html 


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.

Patrick

smime.p7s
Description: S/MIME cryptographic signature
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Preview a single child document while maintaining counters and references

2020-03-11 Thread Daniel

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


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Preview a single child document while maintaining counters and references

2020-03-11 Thread Jürgen Spitzmüller
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


signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Preview a single child document while maintaining counters and references

2020-03-10 Thread Daniel

Hi,

I know that it is possible to exclude several child documents in a 
master document while maintaining counters and references. This feature 
is available in the master document's settings.


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?


Daniel

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users