Re: [NTG-context] Dynamic headings query heading information
Am 07.02.2014 um 15:45 schrieb Andreas Schneider ak...@gmx.de: Hello, again I'm working on a technical manual and decided to use ConTeXt to do the job. Since I'm a developer, I always try to do things as flexible as possible. I'm currently struggling to achieve two things: 1) a macro (that will print a list) should also add a heading. However, the heading should always be one level beneath the current heading and without numbering. Example: within a \section it should be a \subsubject, within a \chapter it should be a \subject, and so on. \definesectionlevels[extra][title,subject,subsubject,subsubsubject] \setuphead[chapter][color=red] \setuphead[section][color=green] \setuphead[subsection][color=blue] \define\PlaceList {\startsectionlevel[extra][title=List] % \stopsectionlevel} \starttext \startsectionlevel[title=Chapter 1] \PlaceList \startsectionlevel[title=Section 1.1] \startsectionlevel[title=Subsection 1.1.1] \stopsectionlevel \startsectionlevel[title=Subsection 1.1.2] \stopsectionlevel \stopsectionlevel \startsectionlevel[title=Section 1.2] \stopsectionlevel \stopsectionlevel \startsectionlevel[title=Chapter 2] \startsectionlevel[title=Section 2.1] \PlaceList \startsectionlevel[title=Subsection 2.1.1] \stopsectionlevel \startsectionlevel[title=Subsection 2.1.2] \stopsectionlevel \stopsectionlevel \startsectionlevel[title=Section 2.2] \stopsectionlevel \stopsectionlevel \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] getting text outside cropmarks to work
On 2/6/2014 10:12 AM, Wolfgang Schuster wrote: Am 05.02.2014 um 17:30 schrieb Lars Huttar lars_hut...@sil.org mailto:lars_hut...@sil.org: ... If we need to implement this using layers, does anyone have a recent example of using a layer to place a running footer outside the crop marks? \setuppapersize[A4][A3] \setuplayout[location=middle,marking=on] \setupbodyfont[modern] \definelayer[cropmark][width=\paperwidth,height=\paperheight] \setupbackgrounds[page][background=cropmark] \setlayer[cropmark][preset=middlebottom,y=-\lineheight]{Bottom Text} \setlayer[cropmark][preset=middletop,y=-\lineheight]{Top Text} \starttext \input knuth \stoptext This works for one page, but when I increase the length of the text to take multiple pages, the top and bottom text only appears on the first page. (Again, using ConTeXt version 2013.05.28 00:36 from the TeX Live CD.) How do you make layers, or backgrounds, appear on every page? Thanks, Lars ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] getting text outside cropmarks to work
Am 07.02.2014 um 16:17 schrieb Lars Huttar lars_hut...@sil.org: On 2/6/2014 10:12 AM, Wolfgang Schuster wrote: Am 05.02.2014 um 17:30 schrieb Lars Huttar lars_hut...@sil.org mailto:lars_hut...@sil.org: ... If we need to implement this using layers, does anyone have a recent example of using a layer to place a running footer outside the crop marks? \setuppapersize[A4][A3] \setuplayout[location=middle,marking=on] \setupbodyfont[modern] \definelayer[cropmark][width=\paperwidth,height=\paperheight] \setupbackgrounds[page][background=cropmark] \setlayer[cropmark][preset=middlebottom,y=-\lineheight]{Bottom Text} \setlayer[cropmark][preset=middletop,y=-\lineheight]{Top Text} \starttext \input knuth \stoptext This works for one page, but when I increase the length of the text to take multiple pages, the top and bottom text only appears on the first page. (Again, using ConTeXt version 2013.05.28 00:36 from the TeX Live CD.) How do you make layers, or backgrounds, appear on every page? Add “state=repeat” to \definelayer: \definelayer[cropmark][state=repeat,width=\paperwidth,height=\paperheight] Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Additional unnumbered pages behind a title page
Am 07.02.2014 um 17:32 schrieb Robert Blackstone blackstone.rob...@gmail.com: Dear list, For a Thesis, doublesided, I need three unnumbered pages behind the Title-page, the second of which contains only a dedication To the memory of A. For the Title-page I use standardmakeup but ConTeXt apparently does not like me to add a second .tex-file with standardmakeup. How can I manage to accomplish this in a way worthy of ConTeXt? Create a minimal example because context has no problem with multiple markup environments. \starttext \startmakeup[standard] One \stopmakeup \startmakeup[standard] Two \stopmakeup \startmakeup[standard] Three \stopmakeup \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Dynamic headings query heading information
Am 07.02.2014 um 15:45 schrieb Andreas Schneider ak...@gmx.de: 2) another macro should build an index at the end of the document. I use Lua to keep a list of all database tables referenced within the document (together with some metadata) and save it in the jobpasses struct. Now I also want to track the chapters, sections, etc where these references are, to be able to see, where a database table is used. To solve these two problems, I'm looking for information about the current heading. The level and the associated reference name. If I have the level, I can keep my own list of necessary heading types (subject, subsubject, ...) and just get the one at level+1 to write the heading using lua (tex.sprint()). With the reference name I can obviously solve 2), since I then can simply keep a list for each db table in the jobpasses structure. You can try the \currentstrcuture… commands but I don’t know if the are meant as user level commands. \starttext \chapter{Chapter} \starttabulate \NC Name \EQ \currentstructurename \NC\NR \NC Level \EQ \currentstructurelevel \NC\NR \stoptabulate \section{Section} \starttabulate \NC Name \EQ \currentstructurename \NC\NR \NC Level \EQ \currentstructurelevel \NC\NR \stoptabulate \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Additional unnumbered pages behind a title page
On 7 Feb 2014, at 18:05 , Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 07.02.2014 um 17:32 schrieb Robert Blackstone blackstone.rob...@gmail.com: Dear list, For a Thesis, doublesided, I need three unnumbered pages behind the Title-page, the second of which contains only a dedication To the memory of A. For the Title-page I use standardmakeup but ConTeXt apparently does not like me to add a second .tex-file with standardmakeup. How can I manage to accomplish this in a way worthy of ConTeXt? Create a minimal example because context has no problem with multiple markup environments. \starttext \startmakeup[standard] One \stopmakeup \startmakeup[standard] Two \stopmakeup \startmakeup[standard] Three \stopmakeup \stoptext Wolfgang Thanks Wolfgang, for creating this minimal example for me. It has given me exactly what I needed. In fact one \startmakeup[standard] - \stopmakeup-pair, with is dedication-text, was sufficient for my doublesided document. I did not know of this command and its workings. Best regards, Robert ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Additional unnumbered pages behind a title page
Dear list, For a Thesis, doublesided, I need three unnumbered pages behind the Title-page, the second of which contains only a dedication To the memory of A. For the Title-page I use standardmakeup but ConTeXt apparently does not like me to add a second .tex-file with standardmakeup. How can I manage to accomplish this in a way worthy of ConTeXt? Thanks in advance for any advice Best regards, Robert Blackstone (I did find a hack, consisting of introducing between the Title-page and the FrontMatter a .tex-file, beginning with \setuppagenumber[state=stop], of which the second page is filled with stack of empty framed textboxes with their frames off. It does work somehow but I cannot believe that it is the right method.)___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Dynamic headings query heading information
Title: Dynamic headings query heading information Hello, again I'm working on a technical manual and decided to use ConTeXt to do the job. Since I'm a developer, I always try to do things as flexible as possible. I'm currently struggling to achieve two things: 1) a macro (that will print a list) should also add a heading. However, the heading should always be one level beneath the current heading and without numbering. Example: within a \section it should be a \subsubject, within a \chapter it should be a \subject, and so on. 2) another macro should build an index at the end of the document. I use Lua to keep a list of all database tables referenced within the document (together with some metadata) and save it in the jobpasses struct. Now I also want to track the chapters, sections, etc where these references are, to be able to see, where a database table is used. To solve these two problems, I'm looking for information about the current heading. The level and the associated reference name. If I have the level, I can keep my own list of necessary heading types (subject, subsubject, ...) and just get the one at level+1 to write the heading using lua (tex.sprint()). With the reference name I can obviously solve 2), since I then can simply keep a list for each db table in the jobpasses structure. I'm open for different suggestions, since I may miss an (obvious?) alternative. And as you can also probably see, I like Lua pretty much, so a solution requiring Lua is not a problem :-) (quite the contrary actually) Best regards, Andreas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Centering the last line in combination subcaptions
On 2013-12-27 Jan Tosovsky wrote: I try to fill the entire page with two images with their captions. The final page should be floating, keeping both images together and not containing any other text. I found this solution. It work fine for short captions / wide images. \starttext test \startplacefigure[location=page, number=no, title={}] %\setupcombinations[align={hz, hanging}] %\setuptolerance[strict] {\startcombination[1*2] {\externalfigure[cow]} {\input{ward}} {\externalfigure[cow]} {\input{ward}} \stopcombination} \stopplacefigure \stoptext ... If captions are long and the image narrow, they are typeset on multiple lines. Default centering produces the ragged column - both not very nice and difficult to read. When the alignment is set to hanging, it looks better except the last line which is not centered. Is there any settings for centering the last line? I've found it is a general problem with the centering the last line when hanging alignment is set. Here is the similar thread, but with no response: https://www.mail-archive.com/ntg-context@ntg.nl/msg32884.html This is quite old thread. Are there any new possibilities in the Context from that era? Thanks, Jan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Centering the last line in combination subcaptions
On 2014-02-07 Jan Tosovsky wrote: On 2013-12-27 Jan Tosovsky wrote: If captions are long and the image narrow, they are typeset on multiple lines. Default centering produces the ragged column - both not very nice and difficult to read. When the alignment is set to hanging, it looks better except the last line which is not centered. Finally fixed with align=last :-) This is the improved example. The only remaining issue is an one empty line between the image and the label when \startnarrower command is used. Please compare two pages w/o this option set: %\definefontfamily[palatino][rm][Palatino Linotype][features={default, quality}] %\setupbodyfont[palatino] \setupnarrower[middle=-2.8cm] \starttext test \startplacefigure[location=page, number=no, title={}] \setupcombinations[align={last, hz, hanging}] {\startcombination[1*2] {\externalfigure[cow]} {\startnarrower {\itx \input{tufte}} \stopnarrower} {\externalfigure[cow]} {\startnarrower {\itx \input{lorem}} \stopnarrower} \stopcombination} \stopplacefigure \startplacefigure[location=page, number=no, title={}] \setupcombinations[align={last, hz, hanging}] {\startcombination[1*2] {\externalfigure[cow]} {\itx \input{ward}} {\externalfigure[cow]} {\itx \input{ward}} \stopcombination} \stopplacefigure \stoptext I haven't find any better way to extend the caption width than that negative value for narrowed text. It works, but that empty space above looks weird :-( Thanks for any suggestions, Jan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Centering the last line in combination subcaptions
Am 08.02.2014 um 00:07 schrieb Jan Tosovsky j.tosov...@email.cz: This is the improved example. The only remaining issue is an one empty line between the image and the label when \startnarrower command is used. Please compare two pages w/o this option set: %\definefontfamily[palatino][rm][Palatino Linotype][features={default, quality}] %\setupbodyfont[palatino] \setupnarrower[middle=-2.8cm] \starttext test \startplacefigure[location=page, number=no, title={}] \setupcombinations[align={last, hz, hanging}] {\startcombination[1*2] {\externalfigure[cow]} {\startnarrower {\itx \input{tufte}} \stopnarrower} {\externalfigure[cow]} {\startnarrower {\itx \input{lorem}} \stopnarrower} \stopcombination} \stopplacefigure \startplacefigure[location=page, number=no, title={}] \setupcombinations[align={last, hz, hanging}] {\startcombination[1*2] {\externalfigure[cow]} {\itx \input{ward}} {\externalfigure[cow]} {\itx \input{ward}} \stopcombination} \stopplacefigure \stoptext I haven't find any better way to extend the caption width than that negative value for narrowed text. It works, but that empty space above looks weird You have to force a certain width for your images because the width of the text space depends on the width of the images. You can use \framed (instead of loffset/roffset you can also set a fixed width) or \simplealignedbox to set the width of the images. \setupexternalfigures[location=default] \defineframed[CombinationBox][frame=off,offset=none,loffset=3cm,roffset=3cm] \starttext \startplacefigure[location={force,none}] \startcombination[nx=1,ny=2,align={last,hz,hanging},style=\itx] % first image \startcontent %\simplealignedbox{11cm}{middle}{\externalfigure[cow][width=5cm]} \CombinationBox{\externalfigure[cow][width=5cm]} \stopcontent \startcaption \input{ward} \stopcaption % second image \startcontent %\simplealignedbox{11cm}{middle}{\externalfigure[cow][width=5cm]} \CombinationBox{\externalfigure[cow][width=5cm]} \stopcontent \startcaption \input{ward} \stopcaption \stopcombination \stopplacefigure \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___