Is there an equivalent of the LaTeX "\includeonly" ? - I'm working on books (nearly only on books), so such a command would speed up my work. Huseyin
Am 19.11.2012 um 09:30 schrieb H. Özoguz
Is there an equivalent of the LaTeX "\includeonly" ? - I'm working on books (nearly only on books), so such a command would speed up my work.
No there isn’t. @Hans: With with \includeonly and \excludeonly command you can specify which external files should be included in the document by the \inlcude{…} (a special version of \input{…}) command. When you add \includeonly{one,three} in the following example only the files “one.tex” and “three.tex” will be included and the other two are ignored. With \excludeonly{two,three} the files “one.tex” and “four.tex” are read but two and three are ignored. \startproduct mydocument \component one \component two \component three \component four \stopproduct Wolfgang
On Nov 19, 2012, at 9:47 AM, Wolfgang Schuster
No there isn’t.
@Hans: With with \includeonly and \excludeonly command you can specify which external files should be included in the document by the \inlcude{…} (a special version of \input{…}) command.
When you add \includeonly{one,three} in the following example only the files “one.tex” and “three.tex” will be included and the other two are ignored. With \excludeonly{two,three} the files “one.tex” and “four.tex” are read but two and three are ignored.
\startproduct mydocument
\component one \component two \component three \component four
\stopproduct
Wolfgang _________
That reminds me: at the context meeting 2011, we talked about the possibility of retaining page numbers, cross-references, etc. when compiling just one component. Hans. you, said this wasn't too complex (because all the information is already there in the tuc file). Is this possible now, or can we have that in the near future? :-) Thomas
On 11/19/2012 9:56 AM, Schmitz Thomas A. wrote:
On Nov 19, 2012, at 9:47 AM, Wolfgang Schuster
wrote: No there isn’t.
@Hans: With with \includeonly and \excludeonly command you can specify which external files should be included in the document by the \inlcude{…} (a special version of \input{…}) command.
When you add \includeonly{one,three} in the following example only the files “one.tex” and “three.tex” will be included and the other two are ignored. With \excludeonly{two,three} the files “one.tex” and “four..tex” are read but two and three are ignored.
\startproduct mydocument
\component one \component two \component three \component four
\stopproduct
Wolfgang _________
That reminds me: at the context meeting 2011, we talked about the possibility of retaining page numbers, cross-references, etc. when compiling just one component. Hans. you, said this wasn't too complex (because all the information is already there in the tuc file). Is this possible now, or can we have that in the near future? :-)
this is already in place for a while given that one uses the right structures: http://www.pragma-ade.com/general/magazines/mag-1103.pdf ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 11/19/2012 10:33 AM, Hans Hagen wrote:
this is already in place for a while given that one uses the right structures:
Oops, sorry, I must have missed this! But I can't get it working. After adding \setupreferencing[autofile=yes] \setupinteraction[state=start] to all components, compiling single components fails with ! LuaTeX error ...text/tex/texmf-context/tex/context/base/strc-ref.lua:902: table index is nil stack traceback: ...text/tex/texmf-context/tex/context/base/strc-ref.lua:902: in function 'loadproductreferences' ...text/tex/texmf-context/tex/context/base/strc-ref.lua:1021: in function 'loadpresets' ...text/tex/texmf-context/tex/context/base/strc-ref.lua:1043: in function 'useproduct' <main ctx instance>:1: in main chunk. system > tex > error on line 6 in file test.tex: LuaTeX error ... Any idea what this might mean? All best Thomas
On 11/19/2012 12:47 PM, Thomas A. Schmitz wrote:
On 11/19/2012 10:33 AM, Hans Hagen wrote:
this is already in place for a while given that one uses the right structures:
Oops, sorry, I must have missed this! But I can't get it working. After adding
\setupreferencing[autofile=yes] \setupinteraction[state=start]
to all components, compiling single components fails with
! LuaTeX error ....text/tex/texmf-context/tex/context/base/strc-ref.lua:902: table index is nil stack traceback: ...text/tex/texmf-context/tex/context/base/strc-ref.lua:902: in function 'loadproductreferences' ...text/tex/texmf-context/tex/context/base/strc-ref.lua:1021: in function 'loadpresets' ...text/tex/texmf-context/tex/context/base/strc-ref.lua:1043: in function 'useproduct' <main ctx instance>:1: in main chunk.
system > tex > error on line 6 in file test.tex: LuaTeX error ...
Any idea what this might mean?
that there is a lua error ... can you try with: if not component or component == componentname then -- skip else ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 11/19/2012 01:41 PM, Hans Hagen wrote:
that there is a lua error ...
can you try with:
if not component or component == componentname then -- skip else
Hans, yes, this appears to work! I now get page numbers etc. when I compile single components, and I could kick myself for not knowing this earlier... All best Thomas
On 11/19/2012 9:47 AM, Wolfgang Schuster wrote:
Am 19.11.2012 um 09:30 schrieb H. Özoguz
: Is there an equivalent of the LaTeX "\includeonly" ? - I'm working on books (nearly only on books), so such a command would speed up my work.
No there isn’t.
@Hans: With with \includeonly and \excludeonly command you can specify which external files should be included in the document by the \inlcude{…} (a special version of \input{…}) command.
When you add \includeonly{one,three} in the following example only the files “one.tex” and “three.tex” will be included and the other two are ignored. With \excludeonly{two,three} the files “one.tex” and “four.tex” are read but two and three are ignored.
\startproduct mydocument
\component one \component two \component three \component four
\stopproduct
\startproduct mysmalldocument \component one \component three \stopproduct ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 19.11.2012 um 10:35 schrieb Hans Hagen
On 11/19/2012 9:47 AM, Wolfgang Schuster wrote:
Am 19.11.2012 um 09:30 schrieb H. Özoguz
: Is there an equivalent of the LaTeX "\includeonly" ? - I'm working on books (nearly only on books), so such a command would speed up my work.
No there isn’t.
@Hans: With with \includeonly and \excludeonly command you can specify which external files should be included in the document by the \inlcude{…} (a special version of \input{…}) command.
When you add \includeonly{one,three} in the following example only the files “one.tex” and “three.tex” will be included and the other two are ignored. With \excludeonly{two,three} the files “one.tex” and “four.tex” are read but two and three are ignored.
\startproduct mydocument
\component one \component two \component three \component four
\stopproduct
\startproduct mysmalldocument
\component one \component three
\stopproduct
This doesn’t the same because with \includeonly the chapter/figure/page/etc. counters from the skipped files are honored like they do with single component files from Thomas request. Wolfgang
Wolfgang Schuster schrieb:
\startproduct mysmalldocument
\component one \component three
\stopproduct
This doesn’t the same because with \includeonly the chapter/figure/page/etc. counters from the skipped files are honored like they do with single component files from Thomas request.
because every file defined with \includeonly gets its own .aux file which is _aöways_ read by the main tex file. The reason why all page numbers and refences are correct. Herbert
2012-11-19 H. Özoguz:
Is there an equivalent of the LaTeX "\includeonly" ?
You can place individual chapters in components and use the mode mechanism: \startproduct * \startmodeset [alpha] {\component [alpha]} [beta] {\component [beta]} [gamma] {\component [gamma]} \stopmodeset \stopproduct Then compile with `context --mode=alpha,gamma main.tex`. http://wiki.contextgarden.net/Project_structure Marco
participants (7)
-
"H. Özoguz"
-
Hans Hagen
-
Herbert Voss
-
Marco Patzer
-
Schmitz Thomas A.
-
Thomas A. Schmitz
-
Wolfgang Schuster