Re: [NTG-context] injectors not working in LMTX?
On 6/24/2021 6:44 PM, Rik Kabel wrote: In March, Pablo wrote: the following sample (from https://pragma-ade.com/general/manuals/workflows-mkiv.pdf#search=resort) doesn’t get right output with LMTX (current latest from 2021.03.25 14:04): \showinjector \setinjector[register][3][\column] \setinjector[list][2][{\blank[3*big]}] \starttext \placelist[section][criterium=text] \blank[3*big] \placeregister[index][criterium=text] \page \startsection[title=Alpha] first \index{first} \startsection[title=Beta] second \index{second} \startsection[title=Gamma] third \index{third} \startsection[title=Delta] fourth \index{fourth} \stoptext MkIV compiles this source fine, so I think this might be a bug. Many thanks for your help, Pablo In trying to tune a toc, I discovered that this is still an issue. fixed in next upload - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] First line of larger font paragraph on grid
Hi, I have some text in a larger font where the first line should be on the grid. Therefore, I've tried to adapt the solution from the wiki: https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid The interesting thing is that the section command indeed places the first line on the grid, but using \framed directly does not give the desired results. I must be missing something obvious. Does anyone know a solution ? Thanks for your help, Denis === \setuplayout[grid=yes] \showgrid \definefont [BigFont] [Bold at 20pt] [24pt] \unprotect \unexpanded\def\section_command#1#2{% \framed [ width=\textwidth, frame=off, rulethickness=0pt, offset=0pt, loffset=-0pt, before=, location=top, align=flushleft,]{#2}% } \setuphead [section] [ style={\BigFont}, after=, before={\blank[1*line]}, command=\section_command, ] \protect \defineframed[myframed][ width=\textwidth, frame=off, rulethickness=0pt, offset=0pt, loffset=-0pt, before=, location=top, align=flushleft,]] \starttext \blank[force,3*line,depth] \begingroup \BigFont \myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum dolor sit amet consectetur adipisicing elit} \endgroup asdfasdf \page \blank[force,3*line,depth] \startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum dolor sit amet consectetur adipisicing elit] asdf \stopsection \stoptext = ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] injectors not working in LMTX?
In March, Pablo wrote: the following sample (from https://pragma-ade.com/general/manuals/workflows-mkiv.pdf#search=resort) doesn’t get right output with LMTX (current latest from 2021.03.25 14:04): \showinjector \setinjector[register][3][\column] \setinjector[list][2][{\blank[3*big]}] \starttext \placelist[section][criterium=text] \blank[3*big] \placeregister[index][criterium=text] \page \startsection[title=Alpha] first \index{first} \startsection[title=Beta] second \index{second} \startsection[title=Gamma] third \index{third} \startsection[title=Delta] fourth \index{fourth} \stoptext MkIV compiles this source fine, so I think this might be a bug. Many thanks for your help, Pablo In trying to tune a toc, I discovered that this is still an issue. -- Rik ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] setup parameter problem
On 6/7/2021 6:17 PM, Hans van der Meer wrote: The code below seems ok in \startsection[title=] but not when I program the parameter collection with \def\setupparameters{\getparameters[prefix]} In that case even [title={enclosed value}] crashes with error message: Use of \doMacro doesn't match its definition. Obviously I am missing something here. What? \def\Macro{\dosingleargument\doMacro} \def\doMacro[#1]#2{#1X#2} The code below shows that it should be possible. \startsection[title=\Macro{arg} no braces needed]\stopsection \startsection[title={\Macro[arg1]{arg2} enclosed in braces}]\stopsection \stoptext just prevent expansion: \protected\def\Macro{\dosingleargument\doMacro} \def\doMacro[#1]#2{#1X#2} and when you're in adventurous mode (which i know you are) try this: \protected\tolerant\def\Macro[#1]#;#2% {\ifparameter#1\or#1:\fi#2} and when you for some reason do wan tto expand then, as in, do: \edef\foo{\expand\Macro[arg1]{arg2}} etc etc Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] setup parameter problem
The code below seems ok in \startsection[title=] but not when I program the parameter collection with \def\setupparameters{\getparameters[prefix]} In that case even [title={enclosed value}] crashes with error message: Use of \doMacro doesn't match its definition. Obviously I am missing something here. What? \def\Macro{\dosingleargument\doMacro} \def\doMacro[#1]#2{#1X#2} The code below shows that it should be possible. \startsection[title=\Macro{arg} no braces needed]\stopsection \startsection[title={\Macro[arg1]{arg2} enclosed in braces}]\stopsection \stoptext dr. Hans van der Meer ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] where to break a long header
This minimal I ran with «ConTeXt ver: 2021.06.04 17:28 MKI» and got two PDF files: One «test.pdf» as expected and one called «test-pdf-keep.pdf». What's the reason behind this double feature? Steffen > Am 05.06.2021 um 10:14 schrieb Wolfgang Schuster > : > > denis.ma...@ub.unibe.ch schrieb am 05.06.2021 um 08:16: >> \startsection[title={A very \\ long title},list={A very long title}] > > Be careful with spaces before and after \\. In the table of contents \\ is > converted to a space and in the worst case you get three spaces instead of > one. > > \starttext > > \placecontent > > \section{First section \\ with a line break} > > \section{Second section\\ with a line break} > > \section{Third section \\with a line break} > > \section{Fourth section\\with a line break} > > \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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] where to break a long header
denis.ma...@ub.unibe.ch schrieb am 05.06.2021 um 08:16: \startsection[title={A very \\ long title},list={A very long title}] Be careful with spaces before and after \\. In the table of contents \\ is converted to a space and in the worst case you get three spaces instead of one. \starttext \placecontent \section{First section \\ with a line break} \section{Second section\\ with a line break} \section{Third section \\with a line break} \section{Fourth section\\with a line break} \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] where to break a long header
Thank you so much! That was awesome! That was the missing puzzle piece: the book is now perfect! writes: > \startsection[title={A very \\ long title},list={A very long title}] > > Von: ntg-context im Auftrag von Sandra Snan > > Gesendet: Samstag, 5. Juni 2021 07:59:33 > An: ntg-context@ntg.nl > Betreff: [NTG-context] where to break a long header > > I had an unsually long header and it didn't look great: > > https://ellen.idiomdrottning.org/sateotc1.png > > A crlf fixes it: > > https://ellen.idiomdrottning.org/sateotc2.png > > But then that shows up in the table of contents so that's not a good > solution. What is the best practice for this situation? > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] where to break a long header
\startsection[title={A very \\ long title},list={A very long title}] Von: ntg-context im Auftrag von Sandra Snan Gesendet: Samstag, 5. Juni 2021 07:59:33 An: ntg-context@ntg.nl Betreff: [NTG-context] where to break a long header I had an unsually long header and it didn't look great: https://ellen.idiomdrottning.org/sateotc1.png A crlf fixes it: https://ellen.idiomdrottning.org/sateotc2.png But then that shows up in the table of contents so that's not a good solution. What is the best practice for this situation? ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Converting footnotes to endnotes
On Thu, 03 Jun 2021 14:17:15 -0600, Wolfgang Schuster wrote: \setupnote [footnote] [location=none] That did the trick; many thanks! == \setupnote [footnote] [location=none] \starttext \startsection[title={},reference={}] \input ward \startfootnote \input ward \stopfootnote{} \input ward \startfootnote \input ward \stopfootnote{} \stopsection \startsection[title={},reference={}] \input ward \startfootnote \input ward \stopfootnote{} \input ward \startfootnote \input ward \stopfootnote{} \stopsection \startsubject[title={},reference={}] \placenotes [footnote] \stopsubject \stoptext == Best wishes Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512 ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Converting footnotes to endnotes
Dear gang, Generally, I do not use endnotes - see Robert Bringhurst's criticisms of endnotes in typography - but a publisher is demanding them. Converting footnotes to endnotes must be quite simple yet I'm missing it: \setupnotation[footnote] [way=bychapter] % \setupnote[footnote] % [way=bychapter] \starttext \startsection[title={},reference={}] \input ward \startfootnote \input ward \stopfootnote{} \input ward \startfootnote \input ward \stopfootnote{} \stopsection \startsection[title={},reference={}] \input ward \startfootnote \input ward \stopfootnote{} \input ward \startfootnote \input ward \stopfootnote{} \stopsection \startsubject[title={},reference={}] \placenotes [footnote] \stopsubject \stoptext What's the best way to convert the above to endnotes? Thank you in advance! Best wishes Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512 ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] injectors not working in LMTX?
Hans, the following sample (from https://pragma-ade.com/general/manuals/workflows-mkiv.pdf#search=resort) doesn’t get right output with LMTX (current latest from 2021.03.25 14:04): \showinjector \setinjector[register][3][\column] \setinjector[list][2][{\blank[3*big]}] \starttext \placelist[section][criterium=text] \blank[3*big] \placeregister[index][criterium=text] \page \startsection[title=Alpha] first \index{first} \startsection[title=Beta] second \index{second} \startsection[title=Gamma] third \index{third} \startsection[title=Delta] fourth \index{fourth} \stoptext MkIV compiles this source fine, so I think this might be a bug. Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Formula numbering including all prefix segments
Hi Hans, That does it indeed, thank you! Together with prefixconversion I mainly wanted to use this for formulas in the appendix with the added prefix. I'll add it to the wiki, as it is a very helpful information. Adam On Sun, Mar 21, 2021 at 12:55 PM Hans Hagen wrote: > On 3/20/2021 11:45 PM, Adam Reviczky wrote: > > Hi, > > > > Is there a way to have formula numbers showing all prefix segments? > > When I use prefixsegments, I get the desired numbering in the placelist > > but not in the formula number itself. > > > > For example: > > \starttext > > \setupcaption[figure][way=bytext,prefixsegments=1:*] > > \setupformulas[way=bytext,prefixsegments=1:*] > > \startsection[title=Section] > > \startsubsection[title=SubSection] > > \startplacefigure[list=cow] \externalfigure[cow] \stopplacefigure > > \startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2 > > \stopformula \stopplaceformula > > \stopsubsection > > \stopsection > > \placelistoffigures[criterium=all] > > \placelist[formula][criterium=all] > > \stoptext > > > > The figure has number 1.1.1 and is in the list as 1.1.1, the formula has > > number 1.1 but is listed as 1.1.1. > > I would like to have the formula numbered 1.1.1 as well (as referenced > > in the placelist), so with section and subsection numbering. > you need to add: prefixset=all (default is limited to 3, see strc-def) > > \starttext > \setupcounter[formula][way=bytext] > \setupcaption[figure][way=bytext,prefixsegments=1:*] > \setupformulas[way=bytext,prefixsegments=1:*,prefixset=all] > > \startchapter[title=Chapter] > \dorecurse{4}{ > \startsection[title=Section] > \startsubsection[title=SubSection] > \startplacefigure[list=cow] \externalfigure[cow] > \stopplacefigure > \startplaceformula[reference=eq1] \startformula c^2 > = a^2 + b^2 \stopformula \stopplaceformula > \stopsubsection > \startsubsection[title=SubSection] > \startplacefigure[list=cow] \externalfigure[cow] > \stopplacefigure > \startplaceformula[reference=eq1] \startformula c^2 > = a^2 + b^2 \stopformula \stopplaceformula > \stopsubsection > \stopsection > } > \stopchapter > > \placelistoffigures[criterium=all] > \placelist[formula][criterium=all] > \stoptext > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Formula numbering including all prefix segments
On 3/20/2021 11:45 PM, Adam Reviczky wrote: Hi, Is there a way to have formula numbers showing all prefix segments? When I use prefixsegments, I get the desired numbering in the placelist but not in the formula number itself. For example: \starttext \setupcaption[figure][way=bytext,prefixsegments=1:*] \setupformulas[way=bytext,prefixsegments=1:*] \startsection[title=Section] \startsubsection[title=SubSection] \startplacefigure[list=cow] \externalfigure[cow] \stopplacefigure \startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2 \stopformula \stopplaceformula \stopsubsection \stopsection \placelistoffigures[criterium=all] \placelist[formula][criterium=all] \stoptext The figure has number 1.1.1 and is in the list as 1.1.1, the formula has number 1.1 but is listed as 1.1.1. I would like to have the formula numbered 1.1.1 as well (as referenced in the placelist), so with section and subsection numbering. you need to add: prefixset=all (default is limited to 3, see strc-def) \starttext \setupcounter[formula][way=bytext] \setupcaption[figure][way=bytext,prefixsegments=1:*] \setupformulas[way=bytext,prefixsegments=1:*,prefixset=all] \startchapter[title=Chapter] \dorecurse{4}{ \startsection[title=Section] \startsubsection[title=SubSection] \startplacefigure[list=cow] \externalfigure[cow] \stopplacefigure \startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2 \stopformula \stopplaceformula \stopsubsection \startsubsection[title=SubSection] \startplacefigure[list=cow] \externalfigure[cow] \stopplacefigure \startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2 \stopformula \stopplaceformula \stopsubsection \stopsection } \stopchapter \placelistoffigures[criterium=all] \placelist[formula][criterium=all] \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Formula numbering including all prefix segments
Hi, Is there a way to have formula numbers showing all prefix segments? When I use prefixsegments, I get the desired numbering in the placelist but not in the formula number itself. For example: \starttext \setupcaption[figure][way=bytext,prefixsegments=1:*] \setupformulas[way=bytext,prefixsegments=1:*] \startsection[title=Section] \startsubsection[title=SubSection] \startplacefigure[list=cow] \externalfigure[cow] \stopplacefigure \startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2 \stopformula \stopplaceformula \stopsubsection \stopsection \placelistoffigures[criterium=all] \placelist[formula][criterium=all] \stoptext The figure has number 1.1.1 and is in the list as 1.1.1, the formula has number 1.1 but is listed as 1.1.1. I would like to have the formula numbered 1.1.1 as well (as referenced in the placelist), so with section and subsection numbering. Adam ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] (no subject)
Hi, Is there a way to have formula numbers showing all prefix segments? When I use prefixsegments, I get the desired numbering in the placelist but not in the formula number itself. For example: \starttext \setupcaption[figure][way=bytext,prefixsegments=1:*] \setupformulas[way=bytext,prefixsegments=1:*] \startsection[title=Section] \startsubsection[title=SubSection] \startplacefigure[list=cow] \externalfigure[cow] \stopplacefigure \startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2 \stopformula \stopplaceformula \stopsubsection \stopsection \placelistoffigures[criterium=all] \placelist[formula][criterium=all] \stoptext The figure has number 1.1.1 and is in the list as 1.1.1, the formula has number 1.1 but is listed as 1.1.1. I would like to have the formula numbered 1.1.1 as well (as referenced in the placelist), so with section and subsection numbering. Adam ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Multiple Layouts
I have the following document, but I want a different \setuplayout[backspace] for the titlepage and copyright space. What is the best way to achieve this? \setupcolors [state=start] \usecolors [xwi] \usetypescriptfile [euler] \definetypeface [mainface][rm][serif][pagella][default] \definetypeface [mainface][tt][mono][dejavu][default] \definetypeface [mainface][mm][math][pagellaovereuler][default] \setupbodyfont [mainface,11.5pt] \setuppapersize [A4, portrait] \setuplayout [backspace=19mm, width=176mm, topspace=7mm, header=10mm, headerdistance=3mm, height=middle, footerdistance=5mm, footer=9mm, bottomspace=11mm] \setuphead [chapter] [style={\bfb}, before={\vskip 0mm}, after={\vskip-\parskip}] \setuphead [section] [style=bold, before={\vskip 6mm}, after={\vskip 2mm}] \setuppagenumbering [alternative=doublesided] \setupheadertexts [] \setupfooter [style=\it] \setupfootertexts [{Footer Title} \hfill \pagenumber] \definemakeup [titlepage] [align=left] \definemakeup [copyrightpage] \setupmakeup [copyrightpage] [align={right,bottom}, top=\vfill, pagestate=stop, style=smallbodyfont] \definealternativestyle [authorstyle] [\rm\tfb] [] \definealternativestyle [titlestyle] [{\rm\bfd\color[red]}] [] \definealternativestyle [subtitlestyle] [\rm\tfb] [] \definealternativestyle [publisherstyle] [\rm\bfb] [] \starttext \startmakeup[titlepage] \authorstyle{The Author} \blank[13*big] \titlestyle{Title 1} \blank[5*small] \titlestyle{Title 2} \blank[2*big] \subtitlestyle{Subtitle} \blank[47*big] \publisherstyle{Publisher} \stopmakeup \startmakeup[copyrightpage] Title \crlf Subtitle \blank Geprint in Country. \crlf Document Reference ABC-ABC-001. \crlf Eerste draft versie, gepubliceerd op \date. \crlf Dit document is getypset met \CONTEXT\ LMTX op Microsoft Windows 10. \blank \startalignment[flushmiddle] Copyright \copyright\ 2021, Publisher. Alle rechten voorbehouden. \crlf Niets uit deze uitgave mag worden verveelvoudigd, opgeslagen in een geautomatiseerd gegevensbestand en/of openbaar gemaakt in enige vorm of op enige wijze, hetzij elektronisch, mechanisch, door fotokopieën, opnamen of op enige andere manier zonder voorafgaande schriftelijk bevestigde toestemming van Publisher. \stopalignment \stopmakeup \startcolumns[2] \startchapter[title={Bryson and Tufte}] \dorecurse{5}{ \startsection[title={Bryson}] \input{bryson} \stopsection \startsection[title={Tufte}] \input{tufte} \stopsection} \stopchapter \startchapter[title={Zapf and Ward}] \dorecurse{5}{ \startsection[title={Zapf}] \input{zapf} \stopsection \startsection[title={Ward}] \input{ward} \stopsection} \stopchapter \stopcolumns \stoptext ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] (no subject)
I have the following document, but I want a different \setuplayout[backspace] for the titlepage and copyright space. What is the best way to achieve this? \setupcolors [state=start] \usecolors [xwi] \usetypescriptfile [euler] \definetypeface [mainface][rm][serif][pagella][default] \definetypeface [mainface][tt][mono][dejavu][default] \definetypeface [mainface][mm][math][pagellaovereuler][default] \setupbodyfont [mainface,11.5pt] \setuppapersize [A4, portrait] \setuplayout [backspace=19mm, width=176mm, topspace=7mm, header=10mm, headerdistance=3mm, height=middle, footerdistance=5mm, footer=9mm, bottomspace=11mm] \setuphead [chapter] [style={\bfb}, before={\vskip 0mm}, after={\vskip-\parskip}] \setuphead [section] [style=bold, before={\vskip 6mm}, after={\vskip 2mm}] \setuppagenumbering [alternative=doublesided] \setupheadertexts [] \setupfooter [style=\it] \setupfootertexts [{Footer Title} \hfill \pagenumber] \definemakeup [titlepage] [align=left] \definemakeup [copyrightpage] \setupmakeup [copyrightpage] [align={right,bottom}, top=\vfill, pagestate=stop, style=smallbodyfont] \definealternativestyle [authorstyle] [\rm\tfb] [] \definealternativestyle [titlestyle] [{\rm\bfd\color[red]}] [] \definealternativestyle [subtitlestyle] [\rm\tfb] [] \definealternativestyle [publisherstyle] [\rm\bfb] [] \starttext \startmakeup[titlepage] \authorstyle{The Author} \blank[13*big] \titlestyle{Title 1} \blank[5*small] \titlestyle{Title 2} \blank[2*big] \subtitlestyle{Subtitle} \blank[47*big] \publisherstyle{Publisher} \stopmakeup \startmakeup[copyrightpage] Title \crlf Subtitle \blank Geprint in Country. \crlf Document Reference ABC-ABC-001. \crlf Eerste draft versie, gepubliceerd op \date. \crlf Dit document is getypset met \CONTEXT\ LMTX op Microsoft Windows 10. \blank \startalignment[flushmiddle] Copyright \copyright\ 2021, Publisher. Alle rechten voorbehouden. \crlf Niets uit deze uitgave mag worden verveelvoudigd, opgeslagen in een geautomatiseerd gegevensbestand en/of openbaar gemaakt in enige vorm of op enige wijze, hetzij elektronisch, mechanisch, door fotokopieën, opnamen of op enige andere manier zonder voorafgaande schriftelijk bevestigde toestemming van Publisher. \stopalignment \stopmakeup \startcolumns[2] \startchapter[title={Bryson and Tufte}] \dorecurse{5}{ \startsection[title={Bryson}] \input{bryson} \stopsection \startsection[title={Tufte}] \input{tufte} \stopsection} \stopchapter \startchapter[title={Zapf and Ward}] \dorecurse{5}{ \startsection[title={Zapf}] \input{zapf} \stopsection \startsection[title={Ward}] \input{ward} \stopsection} \stopchapter \stopcolumns \stoptext ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] filter module / externalizing TikZ graphics
> Am 30.01.2021 um 00:13 schrieb Aditya Mahajan : > > For \processFILTER, t-filter does not even read the file... so it has to do > with how the filtercommand is defined. > >> Since this fails already, I don’t know if \processFILTERfile also uses >> bufferbefore/-after (it should). > > It does not. As I said, for processing external files, t-filter does not even > read the file and just takes care of caching the result. It is assumed that > the filter command can process the external file. A pity. I didn’t understand that from the documentation. That means I need to setup different filters for internal and external graphics with the same content. > I can see if it is possible to active before and after filters while > processing external files. That would solve this problem for me and would make the behavior of filter commands more consistent. OTOH I can understand you don’t want to bloat your module. > Another option is to write the external files as valid tex file (i.e., with a > \startTEXpage .. \stopTEXpage wrapper), and when defining the filtercommand, > use something like `context --environment=env filename`, where env is the > environment file with all the settings for fonts etc. I don’t see this as an option, as we try to avoid code duplication over hundreds of graphics snippets. The \start/stop environment, as well as external files, should just contain the TikZ commands. All common setup/teardown code belongs in extra files/buffers. >> (2) working directory >> >> Since ConTeXt can’t put generated (temporary) files into a directory and >> --result also only renames afterwards, the directory key doesn’t help, I had >> to add "mv" and "cd" to my filtercommand. >> I didn’t check yet if caching works. > > Caching should work if \definefilter is configured correctly. Thanks. > From the point of view of t-filter module, this is a bug in the external > program and you should contact upstream for a fix :-) Yes. There were already several requests about ConTeXt using work/temp directories and changing the behavior of "--result". > Most (all?) other programs are happy to write a file in any directory (modulo > write permissions, etc.). > I do not want to increase the complexity of the module to handle such corner > cases. I can understand that. I should probably let filter call an external script, or fork t-filter for my needs. >> If I use \starttikz[name=example], I get >> "JOBNAME-temp-tikzThick-example.tmp". >> I’d like to get something like "COMPONENTNAME-##-example.tmp" or a path like >> "COMPONENTNAME/example_##.tmp". >> Is there a configuration hook in the module to change name generation? > > No. I don't quite understand the concern. How do you plan to use a > `name=value` option? The current auto-generated file names are uncomfortably long, and I’d like to know which contains what. I’m not yet sure what would make the most sense for this project (at least sorting by chapter/component would), but I have an use case with LilyPond where I could save several LilyPond compile runs if I could influence the naming: I got ~500 songs in their own component files, and I use them in different songbooklets with the same layout. E.g. there’s one containing all the songs and several with a subject (e.g. winter & christmas, children, medieval & fantasy, some author...). They all use [name=\currentcomponent]. If I could avoid the JOBNAME part of the file name, all booklets would use the same note PDFs. Now, the temp directory contains literally thousands of files. Since this is just for fun, the additional space and compile time is just a bit annoying and doesn’t affect others, but I like to streamline my workflows... >> (4) subprocess parameters >> >> I’d like to forward some parameters from \starttikz to the temp buffer, e.g. >> \starttikz[name=example][mystyle=thick] >> (using the same syntax as \startsection with a second pair of brackets for >> custom parameters). >> And then have >> \starttikzpicture[\filterusersetupvariable{mystyle}] >> in the buffer. >> >> My workaround so far is a copy of the filter setup (tikz/tikzThick), since >> we have only a few different configurations. > > The code that I had posted already handles this, provided that the options > start on the line after \startfilter: Ah, I didn’t look closely enough. Thank you, that’s an usable workaround. Best, Hraban ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] filter module / externalizing TikZ graphics
On Thu, 28 Jan 2021, Henning Hraban Ramm wrote: > Still working on that. > I hope you can help me here, Aditya! > I’ll add these issues to the tracker of t-filter, if it makes sense. > > > Testing with: ConTeXt ver: 2021.01.24 16:07 LMTX fmt: 2021.1.25 > > The setup below works, but only with \starttikz ... \stoptikz so far, I don’t > like the output file names, and using the working directory is tricky. > > > (1) \processFILTERfile > > \processtikzfile{img/example.pgf} > can’t find the file: > > t-filter> cached output file 'tikztemp/example1.pgf.pdf' missing. > Rerunning filter > t-filter> file 'tikztemp/example1.pgf.pdf' cannot be found > t-filter> current filter : tikzThick > t-filter> base file : example1.pgf > t-filter> input file : img/example1.pgf > t-filter> output file : tikztemp/example1.pgf.pdf > ... > system > 13: filename=img/example1.pgf foundname=img/example1.pgf > fullname=.../img/example1.pgf usedmethod=direct > > Looks like ConTeXt can find the file, but the filter module cannot. > > --trackers=resolvers.schemes (or \enabletrackers) doesn’t change anything WRT > log/output. For \processFILTER, t-filter does not even read the file... so it has to do with how the filtercommand is defined. > Since this fails already, I don’t know if \processFILTERfile also uses > bufferbefore/-after (it should). It does not. As I said, for processing external files, t-filter does not even read the file and just takes care of caching the result. It is assumed that the filter command can process the external file. I can see if it is possible to active before and after filters while processing external files. Another option is to write the external files as valid tex file (i.e., with a \startTEXpage .. \stopTEXpage wrapper), and when defining the filtercommand, use something like `context --environment=env filename`, where env is the environment file with all the settings for fonts etc. > (2) working directory > > Since ConTeXt can’t put generated (temporary) files into a directory and > --result also only renames afterwards, the directory key doesn’t help, I had > to add "mv" and "cd" to my filtercommand. > I didn’t check yet if caching works. Caching should work if \definefilter is configured correctly. From the point of view of t-filter module, this is a bug in the external program and you should contact upstream for a fix :-) Most (all?) other programs are happy to write a file in any directory (modulo write permissions, etc.). I do not want to increase the complexity of the module to handle such corner cases. > (3) file names > > Using \processFILTERfile the original file name base is preserved, according > to the log entry above. > > If I use \starttikz[name=example], I get "JOBNAME-temp-tikzThick-example.tmp". > I’d like to get something like "COMPONENTNAME-##-example.tmp" or a path like > "COMPONENTNAME/example_##.tmp". > Is there a configuration hook in the module to change name generation? No. I don't quite understand the concern. How do you plan to use a `name=value` option? > (4) subprocess parameters > > I’d like to forward some parameters from \starttikz to the temp buffer, e.g. > \starttikz[name=example][mystyle=thick] > (using the same syntax as \startsection with a second pair of brackets for > custom parameters). > And then have > \starttikzpicture[\filterusersetupvariable{mystyle}] > in the buffer. > > My workaround so far is a copy of the filter setup (tikz/tikzThick), since we > have only a few different configurations. The code that I had posted already handles this, provided that the options start on the line after \startfilter: \usemodule[filter] \startbuffer[tikz-before] \usemodule[tikz] \startTEXpage \starttikzpicture \stopbuffer \startbuffer[tikz-after] \stoptikzpicture \stopTEXpage \stopbuffer \defineexternalfilter [externaltikz] [ bufferbefore=tikz-before, bufferafter=tikz-after, cache=yes, filtercommand={context --batchmode \externalfilterinputfile\space --purgeall --result=\externalfilteroutputfile}, output={\externalfilterbasefile.pdf}, readcommand=\readPDFfile, ] \define[1]\readPDFfile{\externalfigure[#1]} % width and height could be added \starttext \startexternaltikz [very thick, ->] \draw (0,0) -- (1,1); \stopexternaltikz \stoptext Aditya ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] filter module / externalizing TikZ graphics
Still working on that. I hope you can help me here, Aditya! I’ll add these issues to the tracker of t-filter, if it makes sense. Testing with: ConTeXt ver: 2021.01.24 16:07 LMTX fmt: 2021.1.25 The setup below works, but only with \starttikz ... \stoptikz so far, I don’t like the output file names, and using the working directory is tricky. (1) \processFILTERfile \processtikzfile{img/example.pgf} can’t find the file: t-filter> cached output file 'tikztemp/example1.pgf.pdf' missing. Rerunning filter t-filter> file 'tikztemp/example1.pgf.pdf' cannot be found t-filter> current filter : tikzThick t-filter> base file : example1.pgf t-filter> input file : img/example1.pgf t-filter> output file : tikztemp/example1.pgf.pdf ... system > 13: filename=img/example1.pgf foundname=img/example1.pgf fullname=.../img/example1.pgf usedmethod=direct Looks like ConTeXt can find the file, but the filter module cannot. --trackers=resolvers.schemes (or \enabletrackers) doesn’t change anything WRT log/output. Since this fails already, I don’t know if \processFILTERfile also uses bufferbefore/-after (it should). (2) working directory Since ConTeXt can’t put generated (temporary) files into a directory and --result also only renames afterwards, the directory key doesn’t help, I had to add "mv" and "cd" to my filtercommand. I didn’t check yet if caching works. (3) file names Using \processFILTERfile the original file name base is preserved, according to the log entry above. If I use \starttikz[name=example], I get "JOBNAME-temp-tikzThick-example.tmp". I’d like to get something like "COMPONENTNAME-##-example.tmp" or a path like "COMPONENTNAME/example_##.tmp". Is there a configuration hook in the module to change name generation? (4) subprocess parameters I’d like to forward some parameters from \starttikz to the temp buffer, e.g. \starttikz[name=example][mystyle=thick] (using the same syntax as \startsection with a second pair of brackets for custom parameters). And then have \starttikzpicture[\filterusersetupvariable{mystyle}] in the buffer. My workaround so far is a copy of the filter setup (tikz/tikzThick), since we have only a few different configurations. Best regards, Hraban """ % file: t-tikzfilter.tex \startmodule[tikzfilter] \usemodule[filter] % docs see https://github.com/adityam/filter \def\TIKZTEMP{tikztemp} % name of folder for TikZ/buffer files % normal setup \startbuffer[tikz::before] \environment env_world \environment env_TikZ \startTEXpage \starttikzpicture \stopbuffer % setup for graphics with thicker lines \startbuffer[tikzThick::before] \environment env_world \environment env_TikZ \startTEXpage \starttikzpicture[thick] % only difference \stopbuffer \startbuffer[tikz::after] \stoptikzpicture \stopTEXpage \stopbuffer \define[1]\ReadPDFFile% #1 is the name of the output file {\ctxlua{thirddata.readpdffile("#1")}} \startluacode thirddata = thirddata or {} local report_tikz = logs.reporter("tikzfilter") -- create temp folder if missing if not lfs.isdir("\TIKZTEMP") then lfs.mkdir("\TIKZTEMP") end function thirddata.readpdffile(name) -- name is like \TIKZTEMP/mainfile-temp-tikz-21.pdf report_tikz("name='%s'", name) % doesn’t work context("\\externalfigure[" .. name .. "]") end \stopluacode \defineexternalfilter[tikz][ cache=yes, % directory=\TIKZTEMP, % doesn’t work with ConTeXt bufferbefore={tikz::before}, bufferafter={tikz::after}, readcommand=\ReadPDFFile, output={\TIKZTEMP/\externalfilterbasefile.pdf}, filtercommand={mv \externalfilterbasefile.* \TIKZTEMP/ && cd \TIKZTEMP\space && context --batchmode --nodummy --once \externalfilterbasefile.tmp}, ] \defineexternalfilter[tikzThick][tikz][ bufferbefore={tikzThick::before}, ] \stopmodule """ """ % file: tikztest.tex \usemodule[t-tikzfilter] \usemodule[visual] \starttext \placefigure[margin,here][fig:example]{A box.} {\vskip1in\noindent% \starttikzThick[name=example0] \draw[fill=black!10] (0,4.75) rectangle (1.5,-4.75); \stoptikzThick } \fakewords{150}{200} \processtikzThickfile{tests/example1.pgf} \stoptext """ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] expansion of xml userdata
On Sun, 17 Jan 2021 at 21:27, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> wrote: > > Do you know how to force expansion of userdata? > > You can drop "expansion=yes" when you use > > \normalexpanded{\startsection[..,..=..,..][..,..=..,..]} > > Wolfgang > Wow, this was fater then filling my glass. And it works even for userdata. Thank you, Wolfgang. Added to wiki \setuphead <https://wiki.contextgarden.net/Command/setuphead> and Interaction <https://wiki.contextgarden.net/Interaction>. To finish the story of expansion parameter, what is expansion=xml good for? Jano ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] expansion of xml userdata
Jano Kula schrieb am 17.01.2021 um 21:22: Hello to everybody! \setuphead[section][expansion=yes] expands xml reference to the actual content in TUC file: \xmlatt {xml:name::4}{title} → First section for titles & bookmarks. The same is not true for userdata (mkiv & mkxl). Do you know how to force expansion of userdata? You can drop "expansion=yes" when you use \normalexpanded{\startsection[..,..=..,..][..,..=..,..]} 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] expansion of xml userdata
Hello to everybody! \setuphead[section][expansion=yes] expands xml reference to the actual content in TUC file: \xmlatt {xml:name::4}{title} → First section for titles & bookmarks. The same is not true for userdata (mkiv & mkxl). Do you know how to force expansion of userdata? MWE attached. Thank you, Jano \startbuffer[doc] text text \stopbuffer \setuphead[section][expansion=yes] \setuplist[section][alternative=command, command=\SectionListCommand] \define[3]\SectionListCommand{% {\bf#1\par title: #2\par usertitle: \structurelistuservariable{usertitle}}\par \blank \endgraf} \startxmlsetups xml:name \xmlsetsetup{\xmldocument}{document|section}{xml:name:*} \stopxmlsetups \xmlregistersetup{xml:name} \startxmlsetups xml:name:document \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:name:section \startsection[title=\xmlatt{#1}{title}] [usertitle=\xmlatt{#1}{title}] \stopsection \stopxmlsetups \starttext \placelist[section] \xmlprocessbuffer{xml:name}{doc}{} \stoptext xml-one-file-head-toc.tex Description: Binary data ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Part label and chapter numbers
Indeed the no-break spaces were the problem, something I had quite overlooked (so have made a 'message to brain' not to overlook this in the future). I did know about the use of %, but if one searches on the Contextgarden Wiki for \nobreakspace, one finds nothing. Clearly a TeX command that one just has to know! Once again thank you for gently moving me in the right direction! Julian On 5/1/21 9:09 am, Marco Patzer wrote: On Tue, 5 Jan 2021 08:32:33 +1100 jbf wrote: and apologies if you didn't think I provided an MWE. The idea is that people can just copy-paste the code into an editor and keep tweaking. It doesn't have to produce the correct output, but it should compile. If you add an MWE you're more likely to get a response. Of the three issues below, only the first is not resolved, meaning that part=Section\nobreakspace does not make any difference, or put another way, at least it stops things from throwing an error, but the result I get is not 'Section 1. My title' but simply '1. My title'. Here's what an MWE with the code I posted looks like: \setuphead [part] [placehead=yes, bodypartlabel=part] \setuplabeltext [part=Section\nobreakspace] \setuplabeltext [chapter=Chapter\nobreakspace] \setuphead [chapter] [conversion=Words] \setuphead [chapter] [sectionsegments=chapter] \setuphead [section] [sectionsegments=chapter:section] \starttext \startpart [title=Mypart] \startchapter [title=Some Chapter] \startsection [title=Some Section] \samplefile{knuth} \stopsection \stopchapter \stoppart \stoptext And the string “Section 1 Mypart” shows up there. Below is exactly what I have in my preamble. Note that I have also included \setuphead [section] which is the true 'section' level below 'chapter'. Is it possible that this causes some confusion? Unfortunately, the author still wants 'Part' to be actually named as 'Section'! \setuphead [part] [ placehead=yes, page=no, bodypartlabel=part ] First, there a bunch of (U+00A0) NO-BREAK SPACEs in your code. I don't know if that's added by your mail client or if that's actually in your code. If it's also in the code: Context doesn't like it. The NO-BREAK SPACEs have to go. Second, you have a space (new line) after “bodypartlabel=part”. Add a comma, percent sign or move the closing bracket after the word “part”. Marco ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Part label and chapter numbers
On Tue, 5 Jan 2021 08:32:33 +1100 jbf wrote: > and apologies if you didn't think I provided an MWE. The idea is that people can just copy-paste the code into an editor and keep tweaking. It doesn't have to produce the correct output, but it should compile. If you add an MWE you're more likely to get a response. > Of the three issues below, only the first is not resolved, meaning > that part=Section\nobreakspace does not make any difference, or put > another way, at least it stops things from throwing an error, but the > result I get is not 'Section 1. My title' but simply '1. My title'. Here's what an MWE with the code I posted looks like: \setuphead [part] [placehead=yes, bodypartlabel=part] \setuplabeltext [part=Section\nobreakspace] \setuplabeltext [chapter=Chapter\nobreakspace] \setuphead [chapter] [conversion=Words] \setuphead [chapter] [sectionsegments=chapter] \setuphead [section] [sectionsegments=chapter:section] \starttext \startpart [title=Mypart] \startchapter [title=Some Chapter] \startsection [title=Some Section] \samplefile{knuth} \stopsection \stopchapter \stoppart \stoptext And the string “Section 1 Mypart” shows up there. > Below is exactly what I have in my preamble. Note that I have also > included \setuphead [section] which is the true 'section' level below > 'chapter'. Is it possible that this causes some confusion? > Unfortunately, the author still wants 'Part' to be actually named as > 'Section'! > > \setuphead > [part] > [ > placehead=yes, > page=no, > bodypartlabel=part > ] First, there a bunch of (U+00A0) NO-BREAK SPACEs in your code. I don't know if that's added by your mail client or if that's actually in your code. If it's also in the code: Context doesn't like it. The NO-BREAK SPACEs have to go. Second, you have a space (new line) after “bodypartlabel=part”. Add a comma, percent sign or move the closing bracket after the word “part”. Marco ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Polar pgfplots seems to be broken (Aditya Mahajan)
> Date: Mon, 21 Dec 2020 00:51:06 -0500 (EST) > From: Aditya Mahajan > > On Sun, 20 Dec 2020, Gavin wrote: > >> Hello, >> >> I’m drawing solar system diagrams using the pgfplots module, but the polar >> library seem to be broken. It looks like it is calling something with a >> \begin{axis}... command. Here is the error message for a short document, >> included below. >> >>> tex error > tex error on line 18 in file >>> /Users/Gavin/Documents/Computer/ConTeXt/Polar Plot >>> Experiments/Untitled.tex: ! Undefined control sequence >>> >>> \pgfplots@environment@polaraxis@ [#1]->\begin >>> {axis}[#1,data cs=polar,axis >>> type=polar] >>> l.18\startpolaraxis[] >>> >>> 16 \startsection[title={Polar Plot}] >>> 17 \starttikzpicture % tikz code >>> 18 >> \startpolaraxis[] >>> 19 >>> \addplot+[mark=none,domain=0:720,samples=600]{sin(4*x)}; >>> 20 \stoppolaraxis >>> 21 \stoptikzpicture >>> 22 \stopsection >>> >>> mtx-context | fatal error: return code: 256 >> >> I’d love a fix or an idea for a work around. > > This is a bug in pgfplots macro pgfplotsdefineaxistype, which uses an > explicit \begin{axis} ... \end{axis} instead of the more portable \axis ... > \endaxis. Attached is a quick fix, but it has been quite a while since I > looked at pgfplots code, so it may be better to post a bug-report on pgfplots > mailing list for a proper fix. > > Aditya > > URL: > <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20201221/d7278aca/attachment.tex> Aditya, Thanks for the quick fix! I will post a bug report on the pgfplots mailing list, including your helpful diagnosis of the problem. Gavin ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Polar pgfplots seems to be broken
On Sun, 20 Dec 2020, Gavin wrote: > Hello, > > I’m drawing solar system diagrams using the pgfplots module, but the polar > library seem to be broken. It looks like it is calling something with a > \begin{axis}... command. Here is the error message for a short document, > included below. > > > tex error > tex error on line 18 in file > > /Users/Gavin/Documents/Computer/ConTeXt/Polar Plot > > Experiments/Untitled.tex: ! Undefined control sequence > > > > \pgfplots@environment@polaraxis@ [#1]->\begin > > {axis}[#1,data cs=polar,axis > > type=polar] > > l.18\startpolaraxis[] > > > > 16 \startsection[title={Polar Plot}] > > 17 \starttikzpicture % tikz code > > 18 >> \startpolaraxis[] > > 19 > > \addplot+[mark=none,domain=0:720,samples=600]{sin(4*x)}; > > 20 \stoppolaraxis > > 21 \stoptikzpicture > > 22 \stopsection > > > > mtx-context | fatal error: return code: 256 > > I’d love a fix or an idea for a work around. This is a bug in pgfplots macro pgfplotsdefineaxistype, which uses an explicit \begin{axis} ... \end{axis} instead of the more portable \axis ... \endaxis. Attached is a quick fix, but it has been quite a while since I looked at pgfplots code, so it may be better to post a bug-report on pgfplots mailing list for a proper fix. Aditya polar.tex Description: TeX document ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Polar pgfplots seems to be broken
Hello, I’m drawing solar system diagrams using the pgfplots module, but the polar library seem to be broken. It looks like it is calling something with a \begin{axis}... command. Here is the error message for a short document, included below. > tex error > tex error on line 18 in file > /Users/Gavin/Documents/Computer/ConTeXt/Polar Plot Experiments/Untitled.tex: > ! Undefined control sequence > > \pgfplots@environment@polaraxis@ [#1]->\begin > {axis}[#1,data cs=polar,axis > type=polar] > l.18 \startpolaraxis[] > > 16 \startsection[title={Polar Plot}] > 17\starttikzpicture % tikz code > 18 >> \startpolaraxis[] > 19 > \addplot+[mark=none,domain=0:720,samples=600]{sin(4*x)}; > 20\stoppolaraxis > 21\stoptikzpicture > 22 \stopsection > > mtx-context | fatal error: return code: 256 I’d love a fix or an idea for a work around. I’m using ConTeXt Suite (ver: 2020.12.15 10:10 MKIV fmt: 2020.12.16), but I’ve tried it with TeX Live 2020 and the MkIV included with LMTX. Both have the same issue. Thanks! Gavin \usemodule[tikz]% TikZ module for diagrams \usemodule[pgfplots]% PGFPlots module for graphs \pgfplotsset{compat=1.17} % Required to get new any features that could cause compatibility issues. \usepgfplotslibrary[polar] % ConTEXt \starttext \startsection[title={Rectangular Plot}] \starttikzpicture% tikz code \startaxis[] \addplot+[mark=none,domain=0:720,samples=600]{sin(4*x)}; \stopaxis \stoptikzpicture \stopsection \startsection[title={Polar Plot}] \starttikzpicture % tikz code \startpolaraxis[] \addplot+[mark=none,domain=0:720,samples=600]{sin(4*x)}; \stoppolaraxis \stoptikzpicture \stopsection \stoptext ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Automatically setting the value of list key in annotation module
Hi, In the annotation module, is it possible to automatically set the value of the `list` key to be the same as the value of `title` key (as is the case with \startsection, for example). Here is a non-working example: \usemodule[annotation] \defineannotation[test][alternative=paragraph] \starttext \placelist[test][criterium=all] \starttest[title={This is a title}] \input ward \stoptest \starttest[title={This is another title}, list={This is in the 2nd list}] \input ward \stoptest I want the first title to also be added to the list. Thanks, Aditya ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Placing extra bookmarks?
> On 2 Dec 2020, at 18:42, Hans Hagen wrote: > > On 12/2/2020 12:10 AM, Bruce Horrocks wrote: >> On 1 Dec 2020, at 16:37, Henning Hraban Ramm wrote: >>> >>>> Am 01.12.2020 um 15:36 schrieb Bruce Horrocks : >>>> >>>> I have \placebookmarks[chapter] in my doc and all is fine except that I'd >>>> like to force an extra bookmark at the top of the list that jumps to the >>>> cover page. However there is no chapter title, or other built in style on >>>> the cover. >>>> >>>> I tried inserting \bookmark[chapter]{The Cover} but nothing happened - no >>>> error, no bookmark. >>>> >>>> Any suggestions please? There's no need to bookmark to a specific point - >>>> just going to page 1 would be enough. >>> >>> Did you enable interactions? \setupinteractions[state=start] >>> >>> But when I recently tried to manually set some bookmarks instead of visible >>> chapter titles, I also didn’t get any; didn’t investigate further yet. > there are some examples in the test suite (sections/bookmarks-*.tex) > > You can specify bookmarks when you use \startsection etc an dalso add them > any place to named lists. Thanks Hans - I never thought to look in the test cases (d'oh!). For the benefit of those searching the archives in the future, here is an MWE adapted from one of the test cases that places one bookmark via a chapter heading and one manually that is not linked to any document section. \enabletrackers[references.bookmarks,backend.resources] % For debug only \setupinteraction [state=start] \setupinteractionscreen [option=bookmark] \definelist [mylist] \placebookmarks[chapter,mylist] \starttext \input zapf \bookmark[mylist]{Bookmark not linked to a section heading} \input zapf \page[yes] \startchapter[title=Tufte] \input tufte \stopchapter \stoptext I shall add it to the Wiki. -- Bruce Horrocks Hampshire, UK ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Placing extra bookmarks?
On 12/2/2020 12:10 AM, Bruce Horrocks wrote: On 1 Dec 2020, at 16:37, Henning Hraban Ramm wrote: Am 01.12.2020 um 15:36 schrieb Bruce Horrocks : I have \placebookmarks[chapter] in my doc and all is fine except that I'd like to force an extra bookmark at the top of the list that jumps to the cover page. However there is no chapter title, or other built in style on the cover. I tried inserting \bookmark[chapter]{The Cover} but nothing happened - no error, no bookmark. Any suggestions please? There's no need to bookmark to a specific point - just going to page 1 would be enough. Did you enable interactions? \setupinteractions[state=start] But when I recently tried to manually set some bookmarks instead of visible chapter titles, I also didn’t get any; didn’t investigate further yet. there are some examples in the test suite (sections/bookmarks-*.tex) You can specify bookmarks when you use \startsection etc an dalso add them any place to named lists. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Current LMTX unable to compile file metafun-positioning.tex - error on line 240
Dear All Unable to compile metafun manual with current release of LMTX for linux X86_64 and RPI 4 (both Raspberry PI OS 32 bit and Manjaro Linux ARM 64). engine: luametatex version: 2.0802, functionality level: 20201118 tex error > tex error on line 240 in file metafun-positioning.tex: Missing number, treated as zero. This problem never occurred in earlier compilations with LMTX. Commenting out file metafun-positioning.tex metafun manual compiles successfully. Same problem is exhibited in different version of ubuntu and arch linux X86_64 , Thank you all for your feedback. Giulio B. 234 \startsection[title={A more detailed view}] 235 236 As we know, a decent portion of \TEX's attention is focused on breaking 237 paragraphs into lines and determining the optimal point to split off the page. 238 Trying to locate the optimal points to break lines is a dynamic process. The 239 space between words is flexible and we don't know in advance when a \hpos {A-1} 240 >> {word} or piece of a word |<|maybe it's best to talk of typographic \hpos {A-2} 241 {globs} instead|>| will end up on the page. It might even cross the page 242 boundary. 243 A number should have been here; I inserted '0'. (If you can't figure out why I needed to see a number, look up 'weird error' in the index to The TeXbook.) mtx-context | fatal error: return code: 256 > > ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Section head placement wrong when the after key is used
Hi! In the following example the 2nd section head stays on page one when the “after” key is used. If the blackrule is commented out the section head moves to page two as intended. What's the reason the section head stays on the previous page when the “after” is used and how to fix this? \setuphead [section] [after=\blackrule] %% works as desired when commenting this one out \starttext \startsection [title=Foo] \samplefile{knuth} \stopsection \startsection [title=Bar] \framed[height=15cm]{} \samplefile{knuth} \stopsection \stoptext Marco ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] format error with latest 2020-11-16 19:40 with mkiv (luatex)
Hi, I am getting the following error message trying to generate the formats (context --make) with the latest version (latest 2020-11-16 19:40) with luatex 1.13.0 7385 (not lmtx). loading > ConTeXt Typesetting Macros / Triggering Actions resolvers > lua > loading file '/usr/share/texmf/tex/context/base/mkiv/typo-inj.lua' succeeded tex error > tex error on line 49 in file /usr/share/texmf/tex/context/base/mkiv/typo-inj.mkiv: ! Parameters must be numbered consecutively * l.49 \permanent\tolerant\protected\def\checkinjector [#1]#* [#2]{\clf_checkinjector{#1}{#2}} 39 %D \placeregister[index][criterium=text] 40 %D \page 41 %D \startsection[title=Alpha] first \index{first} \stopsection 42 %D \startsection[title=Beta] second \index{second} \stopsection 43 %D \startsection[title=Gamma] third \index{third} \stopsection 44 %D \startsection[title=Delta] fourth \index{fourth} \stopsection 45 %D \stoptext 46 47 \permanent \protected\def\resetinjector [#1]{\clf_resetinjector{#1}} 48 \permanent \protected\def\markinjector [#1]{\dontleavehmode\clf_markinjector{#1}} 49 >> \permanent\tolerant\protected\def\checkinjector [#1]#*[#2]{\clf_checkinjector{#1}{#2}} 50 \permanent \protected\def\checknextinjector [#1]{\clf_checkinjector{#1}{\v!next}} 51 \permanent \protected\def\checkpreviousinjector [#1]{\clf_checkinjector{#1}{\v!previous}} 52 %permanent \protected\def\checknextinjector [#1]{\clf_checknextinjector{#1}} 53 %permanent \protected\def\checkpreviousinjector [#1]{\clf_checkpreviousinjector{#1}} 54 \permanent\tolerant\protected\def\setinjector [#1]#*[#2]#*[#3]{\clf_setinjector{#1}{#2}{#3}} 55 \permanent\tolerant\protected\def\showinjector [#1]{\clf_showinjector{#1}} 56 57 \permanent\protected\def\domarkinjector#1#2% called at the lua end 58 {\dontleavehmode\llap{\infofont\ifcase#1\else\red\fi<#2>\quad}} 59 Swapping typo-inj.mkxl with typo-inj.mkiv makes it work though, changing \permanent\tolerant\protected\def\checkinjector [#1]#*[#2]{\clf _checkinjector{#1}{#2}} \permanent\tolerant\protected\def\setinjector [#1]#*[#2]#*[#3]{\clf _setinjector{#1}{#2}{#3}} back to \unexpanded\def\docheckinjector [#1][#2]{\clf_checkinjector{#1}{#2}} \unexpanded\def\dosetinjector [#1][#2][#3]{\clf_setinjector{#1}{#2}{#3}} Were the files mixed up? Shouldn't the former be for mkxl (lmtx) and the latter for mkiv? Adam ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] page ends with a section title followed by a table
On Tue, 10 Nov 2020 at 19:23, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> wrote: > Sylvain Hubert schrieb am 10.11.2020 um 19:11: > > > Weirdly enough, "\hskip 0pt" solves the problem. > > > > \setuphead[section][after={\blank[samepage]\hskip 0pt}] > > \starttext > > \showframe > > \dorecurse{50}{a } > > \startsection[title=spec] > > \startxtable > > > What happens when you \hskip is that you switch to horizontal > mode and the preferred to do this is to use \dontleavehmode. > > \dontleavehmode > \startxtable > > Wolfgang > Indeed. Thanks for the information! For the record, this is how the problem is finally solved: \setuphead[section][after={\blank[sampage]}] \begingroup\setupindenting[no]\dontleavehmode\startxtable … \stopxtable\endgroup Sylvain ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] page ends with a section title followed by a table
Sylvain Hubert schrieb am 10.11.2020 um 19:11: Weirdly enough, "\hskip 0pt" solves the problem. \setuphead[section][after={\blank[samepage]\hskip 0pt}] \starttext \showframe \dorecurse{50}{a } \startsection[title=spec] \startxtable What happens when you \hskip is that you switch to horizontal mode and the preferred to do this is to use \dontleavehmode. \dontleavehmode \startxtable 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] page ends with a section title followed by a table
On Tue, 10 Nov 2020 at 18:25, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> wrote: > Sylvain Hubert schrieb am 10.11.2020 um 18:06: > > > Thanks for the suggestion, but as illustrated by the second example, > > copied here, where the section title is at the top of the page: > > > > \starttext > > \showframe > > \dorecurse{50}{a } > > \startsection[title=spec][before={\blank[preference,big]}, > > after={\blank[samepage,big]}] > > Your settings in the second argument of \startsection make no sense > because the optional argument is for userdata (values like author etc.) > > > \startxtable > > \startxrow > > \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell > > \stopxrow > > \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow} > > \stopxtable > > \stoptext > > > > it is sometimes difficult to predict how much remaining space should > > trigger a line break. > > You can either reformat your table or put the table in a float > environment to move it to a place where it fits. > > Wolfgang > Weirdly enough, "\hskip 0pt" solves the problem. \setuphead[section][after={\blank[samepage]\hskip 0pt}] \starttext \showframe \dorecurse{50}{a } \startsection[title=spec] \startxtable \startxrow \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell \stopxrow \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow} \stopxtable \stoptext Sylvain ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] page ends with a section title followed by a table
Sylvain Hubert schrieb am 10.11.2020 um 18:06: Thanks for the suggestion, but as illustrated by the second example, copied here, where the section title is at the top of the page: \starttext \showframe \dorecurse{50}{a } \startsection[title=spec][before={\blank[preference,big]}, after={\blank[samepage,big]}] Your settings in the second argument of \startsection make no sense because the optional argument is for userdata (values like author etc.) \startxtable \startxrow \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell \stopxrow \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow} \stopxtable \stoptext it is sometimes difficult to predict how much remaining space should trigger a line break. You can either reformat your table or put the table in a float environment to move it to a place where it fits. 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] page ends with a section title followed by a table
On Tue, 10 Nov 2020 at 17:54, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> wrote: > Pablo Rodriguez schrieb am 10.11.2020 um 15:59: > > On 11/10/20 9:55 AM, Sylvain Hubert wrote: > >> Dear List, > >> > >> In the following example, the section title appears at the very end of > >> the first page. > >> [...] > >> Does anyone know where to adjust the penalty in this case, so that the > >> section title can be repositioned to the next page? > > Hi Sylvain, > > > >\setuphead[title] > > [before={\blank[preference, big], > > after={\blank[samepage, big]] > > > > In this case, the blank space before sets a preference for inserting a > > page break. The blank space after requires to be in the same page with > > next paragraph. > > Another method is to move the section title to the next page when the > remaining spaces > is below a specified number of lines. The following setup forces a page > break when > less than 4 lines remain on the current page. > > \setuphead >[section] >[before={\testpage[4]\blank[2*big]}] > > Wolfgang > Hi Wolfgang, Thanks for the suggestion, but as illustrated by the second example, copied here, where the section title is at the top of the page: \starttext \showframe \dorecurse{50}{a } \startsection[title=spec][before={\blank[preference,big]}, after={\blank[samepage,big]}] \startxtable \startxrow \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell \stopxrow \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow} \stopxtable \stoptext it is sometimes difficult to predict how much remaining space should trigger a line break. Sylvain ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] page ends with a section title followed by a table
On Tue, 10 Nov 2020 at 17:37, Pablo Rodriguez wrote: > On 11/10/20 5:23 PM, Sylvain Hubert wrote: > > My mistake, but the problem survives the fix: > > > > \setuphead[section][after={\blank[samepage,big]}] > > \starttext > > \showframe > > \dorecurse{50}{a } > > \startsection[title=spec] > > \startxtable > Hi Sylvain, > > no fix is required when you allow the table to be split: > > \startxtable[split=yes] > > Pablo > Hi Pablo, Thanks for the suggestion, but unlike the MWE, in the original document, the table has ten rows and is visually not suitable for a split. The large row span is meant to represent this restriction. Sylvain ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] page ends with a section title followed by a table
On 11/10/20 5:23 PM, Sylvain Hubert wrote: > My mistake, but the problem survives the fix: > > \setuphead[section][after={\blank[samepage,big]}] > \starttext > \showframe > \dorecurse{50}{a } > \startsection[title=spec] > \startxtable Hi Sylvain, no fix is required when you allow the table to be split: \startxtable[split=yes] Pablo -- http://www.ousia.tk ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] page ends with a section title followed by a table
My mistake, but the problem survives the fix: \setuphead[section][after={\blank[samepage,big]}] \starttext \showframe \dorecurse{50}{a } \startsection[title=spec] \startxtable \startxrow \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell \stopxrow \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow} \stopxtable \stoptext Sylvain On Tue, 10 Nov 2020 at 17:11, Sylvain Hubert wrote: > > On Tue, 10 Nov 2020 at 16:00, Pablo Rodriguez wrote: > >> On 11/10/20 9:55 AM, Sylvain Hubert wrote: >> > Dear List, >> > >> > In the following example, the section title appears at the very end of >> > the first page. >> > [...] >> > Does anyone know where to adjust the penalty in this case, so that the >> > section title can be repositioned to the next page? >> >> Hi Sylvain, >> >> \setuphead[title] >> [before={\blank[preference, big], >> after={\blank[samepage, big]] >> >> In this case, the blank space before sets a preference for inserting a >> page break. The blank space after requires to be in the same page with >> next paragraph. >> >> Of course, you don’t need both simultaneously. >> >> Just in case it helps, >> >> Pablo >> > > Hello Pablo, > > Thank you very much for the help. The penalty of \blank indeed brings the > solution closer and it does format the previous example correctly. > > However, when I went back to the original document, neither > [before={\blank[preference, big]}] nor [after={\blank[samepage, big]}] nor > both worked. I trimmed it into the following example which behaves the same: > > \starttext > \showframe > \dorecurse{50}{a } > \startsection[title=spec][before={\blank[preference,big]}, > after={\blank[samepage,big]}] > \startxtable > \startxrow > \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell > \stopxrow > \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow} > \stopxtable > \stoptext > > Do you have an idea on how this could also be formatted correctly or how > one could inspect and debug the penalty? > > Thanks again! > > Sylvain > ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] page ends with a section title followed by a table
On Tue, 10 Nov 2020 at 16:00, Pablo Rodriguez wrote: > On 11/10/20 9:55 AM, Sylvain Hubert wrote: > > Dear List, > > > > In the following example, the section title appears at the very end of > > the first page. > > [...] > > Does anyone know where to adjust the penalty in this case, so that the > > section title can be repositioned to the next page? > > Hi Sylvain, > > \setuphead[title] > [before={\blank[preference, big], > after={\blank[samepage, big]] > > In this case, the blank space before sets a preference for inserting a > page break. The blank space after requires to be in the same page with > next paragraph. > > Of course, you don’t need both simultaneously. > > Just in case it helps, > > Pablo > Hello Pablo, Thank you very much for the help. The penalty of \blank indeed brings the solution closer and it does format the previous example correctly. However, when I went back to the original document, neither [before={\blank[preference, big]}] nor [after={\blank[samepage, big]}] nor both worked. I trimmed it into the following example which behaves the same: \starttext \showframe \dorecurse{50}{a } \startsection[title=spec][before={\blank[preference,big]}, after={\blank[samepage,big]}] \startxtable \startxrow \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell \stopxrow \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow} \stopxtable \stoptext Do you have an idea on how this could also be formatted correctly or how one could inspect and debug the penalty? Thanks again! Sylvain ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \type{...} as macro argument
Hi Wolfgang, I'm sorry that the question was not clear enough. Let me ask in this way: how to define a \dorecurse, such that \dorecurse{10}{\type{ab c}} does not squash the spaces? Sylvain On Sun, 8 Nov 2020 at 15:03, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> wrote: > Sylvain Hubert schrieb am 08.11.2020 um 14:47: > > Dear List, > > > > I would like to ask how to define a command, \same, such that > > > > \same{\type{a b c}} > > > > produces the same result as its argument does > > > > \type{a b c} > > > > The naive way doesn't work because it makes all the spaces collapse: > > > > \define[1]\same{#1} > > > \definetype [typeTEX] [option=tex] > > \starttext > > \type{\startsection[title=\tex{type}]} > > \typeTEX{\startsection[title=\tex{typeTEX}]} > > \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \type{...} as macro argument
Sylvain Hubert schrieb am 08.11.2020 um 14:47: Dear List, I would like to ask how to define a command, \same, such that \same{\type{a b c}} produces the same result as its argument does \type{a b c} The naive way doesn't work because it makes all the spaces collapse: \define[1]\same{#1} \definetype [typeTEX] [option=tex] \starttext \type{\startsection[title=\tex{type}]} \typeTEX{\startsection[title=\tex{typeTEX}]} \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \section with userdata
Sylvain Hubert schrieb am 07.11.2020 um 22:42: The motivation of using \section was to avoid \stopsection, but I just found out that \stopsection is not really necessary. Now I would like to ask whether there is any difference between \section{Title} and \startsection[title=Title]. You get extra hooks with \startsection. \startsetups [beforesection] \framed[width=max,foregroundstyle=\tttf]{begin of section} \stopsetups \startsetups [insidesection] \framed[width=max,foregroundstyle=\tttf]{middle of section} \stopsetups \startsetups [aftersection] \framed[width=max,foregroundstyle=\tttf]{end of section} \stopsetups \setuphead [section] [beforesection=\directsetup{beforesection}, insidesection=\directsetup{insidesection}, aftersection=\directsetup{aftersection}] \starttext \startsection[title=\tex{startsection}] \samplefile{ward}\par \stopsection \page \section{\tex{section}} \samplefile{ward} \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \section with userdata
The motivation of using \section was to avoid \stopsection, but I just found out that \stopsection is not really necessary. Now I would like to ask whether there is any difference between \section{Title} and \startsection[title=Title]. Thanks. On Sat, 7 Nov 2020 at 22:33, Sylvain Hubert wrote: > Dear List, > > it is known that we can supply additional userdata like authors to > \startsection: > > \startsection[title=Title][author=Someone] > > so that the author can be included in the table of contents using > \structurelistuservariable{author}. > > Now I would like to do the same with \section, but according to the wiki > <https://wiki.contextgarden.net/Command/_section>, \section doesn't seem > to accept any additional parameters like \startsection does. > > Does anyone know whether there is a workaround to let \section accept > userdata parameters? > > Thanks! > > Best, > Sylvain > ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] \section with userdata
Dear List, it is known that we can supply additional userdata like authors to \startsection: \startsection[title=Title][author=Someone] so that the author can be included in the table of contents using \structurelistuservariable{author}. Now I would like to do the same with \section, but according to the wiki <https://wiki.contextgarden.net/Command/_section>, \section doesn't seem to accept any additional parameters like \startsection does. Does anyone know whether there is a workaround to let \section accept userdata parameters? Thanks! Best, Sylvain ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Get section's uservarialbe inside the section
Sylvain Hubert schrieb am 07.11.2020 um 20:32: Dear List, I have sections tagged with authors: \startsection[title={Title}][author={Author}] ... \stopsection The authors were to be included in the table of contents using \structurelistuservariable{author}. Now I would also like to mention the authors inside the sections, but \startsection[title={Title}][author={Author}] \structurelistuservariable{author} \stopsection doesn't work. Could anyone help me with this? Thanks! \structurelistuservariable is for lists (e.g. the table of contents), to access the values in your text use \structureuservariable. 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Get section's uservarialbe inside the section
Dear List, I have sections tagged with authors: \startsection[title={Title}][author={Author}] ... \stopsection The authors were to be included in the table of contents using \structurelistuservariable{author}. Now I would also like to mention the authors inside the sections, but \startsection[title={Title}][author={Author}] \structurelistuservariable{author} \stopsection doesn't work. Could anyone help me with this? Thanks! Best, Sylvain ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] index entries postponed if sections are empty
Hi Hraban, Maybe you can add some « virtual » text in the section with an invisible color such as \startcolor[white] a \stopcolor I don't know whether the following can solve your problem, but the entries of the index appear correctly: \usemodule[visual] \starttext \dorecurse{5}{% \startchapter[title={\recurselevel}] \dorecurse{5}{% \startsection[title={\fakewords{3}{5}}] \startcolor[white] a \stopcolor \index{Something}\index{A\recurselevel} } \stopchapter } \completeindex \stoptext Best regards: OK > On 31 Oct 2020, at 17:56, Henning Hraban Ramm wrote: > > Hi, > I‘m despairing about my index – some sections contain only an image > (\externalfigure), but I need to set several index entries for the image > contents. > The index entries get postponed until after the next chapter. > I guess the problem is that there’s no (text) content, but \par and \strut > didn’t help. > > The MWE shows that index entries in empty sections are ignored, i.e. > “Something” is supposedly only on p.6: > > > \usemodule[visual] > > \starttext > > \dorecurse{5}{% > \startchapter[title={\recurselevel}] > > \dorecurse{5}{% > \startsection[title={\fakewords{3}{5}}] > > \index{Something}\index{A\recurselevel} > > } > > \stopchapter > } > > \completeindex > > \stoptext > > > What can I do? > > Hraban > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] index entries postponed if sections are empty
Hi, I‘m despairing about my index – some sections contain only an image (\externalfigure), but I need to set several index entries for the image contents. The index entries get postponed until after the next chapter. I guess the problem is that there’s no (text) content, but \par and \strut didn’t help. The MWE shows that index entries in empty sections are ignored, i.e. “Something” is supposedly only on p.6: \usemodule[visual] \starttext \dorecurse{5}{% \startchapter[title={\recurselevel}] \dorecurse{5}{% \startsection[title={\fakewords{3}{5}}] \index{Something}\index{A\recurselevel} } \stopchapter } \completeindex \stoptext What can I do? Hraban ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] font rendering in bibliography
Hi ConTeXt fellows ! I am coming back with I hope a lighter MWE concerning the issue I am confronting to : it seems impossible to get italics within both body text, footnotes and bibliographical titles. See the attached file for the bibtex database and the MWE below : % \showframe %\showgrid \setuplanguage[fr][patterns={fr,agr}] \mainlanguage[fr] \setcharacterspacing[frenchpunctuation] \setuplayout [backspace=40mm] \setuppagenumbering[alternative=doublesided, location={header, inmargin}] \setupmargindata[inmargin][location=inner, style={\ssx\setupinterlinespace[line=2.8ex]}] \setupmarginframed[inmargin][align=right] \setupbodyfontenvironment[default][em=italic] \definefallbackfamily[mainface][serif][Theano Didot][preset=range:greek, it={Old Standard Italic}, force=yes] \definefallbackfamily [mainface] [rm] [ipamincho] [range=cjkunifiedideographs] \definefallbackfamily[mainface] [serif] [nafeesnastaleeq] [range=arabic] \definefontfamily [mainface] [serif] [GaramondNo8][sc=NewG8 Regular SC] \definefontfamily [mainface] [sans] [FreeSans] [rscale=0.7] \definefontfamily[mainface] [serif] [GFS Didot] \setupbodyfont[mainface] \setupcolors[state=start] \setupindenting[1.5em] \setupindenting[medium,yes] % Bibliography Definition setup and rendering \usebtxdataset[philosophie moderne][biblio-test-italics.bib] \usebtxdefinitions[apa] \definebtxrendering[philosophie moderne][apa][dataset=philosophie moderne] \setupbtxrendering[continue =yes] % End of bibliography setup \starttext \startchapter[title={Introduction}] Someone who asks to a textbook in Philosophy to replace his own personnal thoughts and the necessary personnal self-education rooted within his own readings, \quote{would fail his own education}\footnote{\cite[alternative=entry][philosophie moderne::Adler1972]}. Dans le présent ouvrage le propos tenu est sensiblement différent. Non que nous refusons d'entrer dans l'examen de cette totalité parfois systématique qui a pu préoccuper les philosophes depuis la plus haute Antiquité\footnote{Cf. Montaigne, {\em Essais} I, 3 : \quote{Aristote qui remue toute chose}. \cite[alternative=entry][philosophie moderne::montaigne2004]}. The roman sentence : {\em \quote{I am a man and nothing wich is human is strange to me}} (\quote {Homo sum ; humani nihil a me alienum puto}) is given by Roman poet Terence, verse 77 of : \cite[alternative=entry][philosophie moderne::terence1984]. There is a lot of textbooks, or bibliographical survey in Ancient Philosophy\footnote{See the detail of philosophical material philosophers biographies in the two next books : \cite[alternative=entry][philosophie moderne::løve2011]}, or by specialized books as {\em Dictionnaire des Philosophes Antiques} edited in 5 volumes under the direction of Richard Goulet (\cite[alternative=entry][philosophie moderne::goulet1994]). \stopchapter % Bibliography \starttext \startbackmatter \startchapter[title={Bibliographie}] \startsection[title={ Philosophie moderne}] \placelistofpublications[philosophie moderne][method=local] \stopsection \stopchapter \stopbackmatter \stoptext Le 27/10/2020 à 15:45, Jano Kula a écrit : Hello, On Tue, 27 Oct 2020 at 12:15, Xenos Athenaios <mailto:adeiman...@free.fr>> wrote: Dear ConTeXt fellows, With ConTeXT ConTeXt Process Management 1.03 current version: 2020.09.20, I encounter some issue with italics in the title of bibliographical references (I use a Jabref file along with ConTeXt). The title of books should be in italics, but it appears right now in the regular face. Do you have any idea of what it may be the origin of this problem ? Maybe it is within Jabref configuration that I can solve this issue ? (see attached file). just looking at the PDF (knowing nothing about bibliographies), I can't see any italics in the text, so the first thought is: is the italics font setup correct? I would try italics in the main text or using context default font. You can try \enabletrackers[publications.*] and \enabletrackers[fonts.*] to see in log what's going on. If it doesn't help a minimal working example is needed. Regards, Jano ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ biblio-test-italics.bib Description: application/bibtex ___ 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.n
Re: [NTG-context] Sections in content: macros v text
Thank you, Wolfgang, that's it! Tomáš Wed, Oct 07, 2020 ve 05:12:42PM +0200 Wolfgang Schuster napsal(a): # Tomas Hala schrieb am 05.10.2020 um 20:20: # >Hi all, # > # >the content generated by the MWE below contains # >1 bb ... 1 # >2 bb ... 1 # >instead of # >1 aa ... 1 # >2 bb ... 1 # >because the content structure refers to the macro name \name in both sections instead of to work with the text. # > # >Maybe it was already discussed by I am not able to find any solution how to send the text "aa" to the content in this case. # > # >Thanks in advance for any hint. # > # >Best wishes, # > # >Tomáš # > # >MWE (TL2020): # >\starttext # >\define\name{aa} \startsection[title=\name,list=\name] \stopsection # >\define\name{bb} \startsection[title=\name,list=\name] \stopsection # >\completecontent # >\stoptext # # Variant 1: # # \setuphead[section][expansion=yes] # # \starttext # # \defineexpandable\name{aa} # # \startsection[title=\name,list=\name] \stopsection # # \defineexpandable\name{bb} # # \startsection[title=\name,list=\name] \stopsection # # \completecontent # # \stoptext # # # Variant 2: # # \starttext # # \defineexpandable\name{aa} # # \expanded{\startsection[title=\name,list=\name]} \stopsection # # \defineexpandable\name{bb} # # \expanded{\startsection[title=\name,list=\name]} \stopsection # # \completecontent # # \stoptext # # # Wolfgang Tomáš Hála Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky Zemědělská 1, CZ-613 00 Brno, tel. +420 545 13 22 28 http://akela.mendelu.cz/~thala ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] xml bookmarks + chapter no. in header
On 10/7/20 5:06 PM, Tomas Hala wrote: > Hi, > > I tried > \setuphead[section][expansion=yes] > with no effect before I wrote my question to the list here. > > With the \setuphead, the .tuc file still contains macro names instead of the > text: > ["title"]="\\expanded \\name ", > whereas without it only: > ["title"]=" \\name ", > > So is there any way how to solve it? Sorry, Tomáš, for not giving a reply to you. I noticed that your case didn’t work with my approach. But the problem is different in that case, I think (Wolfgang may correct me [or explain this better]). Expansion in list and bookmarks seems to be different: \setupinteraction[state=start] \setupinteractionscreen[option=bookmarks] \placebookmarks[section][section] \setuphead[title][page=no] \starttext %~ \placelist[section] % this doesn’t work \def\name{aa} \placelist[section] \startsection[title=\name, list=\expanded\name] \stopsection \def\name{bb} \startsection[title=\name, list=\expanded\name] \stopsection \completecontent \stoptext I’m afraid I don’t know why. Sorry not helping, Pablo -- http://www.ousia.tk ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Sections in content: macros v text
Tomas Hala schrieb am 05.10.2020 um 20:20: Hi all, the content generated by the MWE below contains 1 bb ... 1 2 bb ... 1 instead of 1 aa ... 1 2 bb ... 1 because the content structure refers to the macro name \name in both sections instead of to work with the text. Maybe it was already discussed by I am not able to find any solution how to send the text "aa" to the content in this case. Thanks in advance for any hint. Best wishes, Tomáš MWE (TL2020): \starttext \define\name{aa} \startsection[title=\name,list=\name] \stopsection \define\name{bb} \startsection[title=\name,list=\name] \stopsection \completecontent \stoptext Variant 1: \setuphead[section][expansion=yes] \starttext \defineexpandable\name{aa} \startsection[title=\name,list=\name] \stopsection \defineexpandable\name{bb} \startsection[title=\name,list=\name] \stopsection \completecontent \stoptext Variant 2: \starttext \defineexpandable\name{aa} \expanded{\startsection[title=\name,list=\name]} \stopsection \defineexpandable\name{bb} \expanded{\startsection[title=\name,list=\name]} \stopsection \completecontent \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Sections in content: macros v text
Hi all, the content generated by the MWE below contains 1 bb ... 1 2 bb ... 1 instead of 1 aa ... 1 2 bb ... 1 because the content structure refers to the macro name \name in both sections instead of to work with the text. Maybe it was already discussed by I am not able to find any solution how to send the text "aa" to the content in this case. Thanks in advance for any hint. Best wishes, Tomáš MWE (TL2020): \starttext \define\name{aa} \startsection[title=\name,list=\name] \stopsection \define\name{bb} \startsection[title=\name,list=\name] \stopsection \completecontent \stoptext ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] color problem
On 01/10/20, 20:55, Susanne G. Loeber wrote: > Dear Reader, > > I have a colored section, text in another color and a TikZ picture with a > differently colored node, following each other. However, either the node > gets the wrong color or the following paragraph, see example below. > > Is there something wrong with the section settings? How do I get all the > colors right without using a paragraph in between? From experience, this usually works: \prependvalue{starttikzpicture}{\dontleavehmode\forcecolorhack} Cheers, Henri > > \setuphead[chapter] > > [ > > style={\tfd}, > > color={A2plus}, > > ] > > \setuphead[section] > > [ > > style={\tfc}, > > color={A3plus}, > > ] > > > \definecolor[A1plus][h=5CAF00] > > \definecolor[A2plus][h=B6437E] > > \definecolor[A3plus][h=606ABD] > > \definecolor[A4plus][h=FFC700] > > \definecolor[A5plus][h=D0202B] > > \definecolor[A6plus][h=EF8600] > > \definecolor[A7plus][h=0082AA] > > > \setupcolors[textcolor=A1plus] > > > \usemodule[tikz] > > > > \starttext > > > \startchapter[title={Colour test}, ref=colourtest] > > > \startsection[title={Section}] > > \starttikzpicture > > \draw[text=A6plus] (0,0) rectangle (2,1) node[right] {node text should be > orange}; > > \stoptikzpicture > > > \par This a paragraph which gets the colour of the section for no reason. > > > \stopsection > > > \stopchapter > > > \startchapter[title={Colour test 2}, ref=colourtest] > > > \startsection[title={Another section }] > > > \par This a paragraph in the appropriate text color (green). > > > > \starttikzpicture > > \draw[text=A6plus] (0,0) rectangle (2,1) node[right] {node text is orange}; > > \stoptikzpicture > > > \stopsection > > > \stopchapter > > \stoptext > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] color problem
Dear Reader, I have a colored section, text in another color and a TikZ picture with a differently colored node, following each other. However, either the node gets the wrong color or the following paragraph, see example below. Is there something wrong with the section settings? How do I get all the colors right without using a paragraph in between? \setuphead[chapter] [ style={\tfd}, color={A2plus}, ] \setuphead[section] [ style={\tfc}, color={A3plus}, ] \definecolor[A1plus][h=5CAF00] \definecolor[A2plus][h=B6437E] \definecolor[A3plus][h=606ABD] \definecolor[A4plus][h=FFC700] \definecolor[A5plus][h=D0202B] \definecolor[A6plus][h=EF8600] \definecolor[A7plus][h=0082AA] \setupcolors[textcolor=A1plus] \usemodule[tikz] \starttext \startchapter[title={Colour test}, ref=colourtest] \startsection[title={Section}] \starttikzpicture \draw[text=A6plus] (0,0) rectangle (2,1) node[right] {node text should be orange}; \stoptikzpicture \par This a paragraph which gets the colour of the section for no reason. \stopsection \stopchapter \startchapter[title={Colour test 2}, ref=colourtest] \startsection[title={Another section }] \par This a paragraph in the appropriate text color (green). \starttikzpicture \draw[text=A6plus] (0,0) rectangle (2,1) node[right] {node text is orange}; \stoptikzpicture \stopsection \stopchapter \stoptext ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Typing efficiency
Thank you Taco and Wolfgang. I will have a look at both solutions. Kind regards,Jan Willem Flamma From: Wolfgang SchusterSent: Friday, 4 September 2020 16:26To: mailing list for ConTeXt usersSubject: Re: [NTG-context] Typing efficiency Taco Hoekwater schrieb am 04.09.2020 um 15:51:> > Hi,> > Sounds like a job for the blocks mechanism more so than buffers:> > > \defineblock[entext]> \defineblock[nltext]> > \defineselector [language] [max=2,n=1]> \startmode[en]> \setupselector[language][n=1]> \keepblocks[entext]> \stopmode> \startmode[nl]> \setupselector[language][n=2]> \keepblocks[nltext]> \stopmode> > \starttext> > \startsection[title=\select{language}{English title}{Dutch title}]> > \beginentext> This is English text.> \endentext> \beginnltext> This is Dutch text.> \endnltext> > \stopsection> > \stoptext It can also be done with buffers. \definebuffer [entext]\definebuffer [nltext] \defineselector [language] [max=2,n=1] \startmode[en] \setupselector[language][n=1] \def\stopentext{\getentext}\stopmode \startmode[nl] \setupselector[language][n=2] \def\stopnltext{\getnltext}\stopmode \starttext \startsection[title=\select{language}{English title}{Dutch title}] \startentext This is English text.\stopentext\startnltext This is Dutch text.\stopnltext \stopsection \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-contextwebpage : http://www.pragma-ade.nl / http://context.aanhet.netarchive : https://bitbucket.org/phg/context-mirror/commits/wiki : http://contextgarden.net___ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Typing efficiency
Taco Hoekwater schrieb am 04.09.2020 um 15:51: Hi, Sounds like a job for the blocks mechanism more so than buffers: \defineblock[entext] \defineblock[nltext] \defineselector [language] [max=2,n=1] \startmode[en] \setupselector[language][n=1] \keepblocks[entext] \stopmode \startmode[nl] \setupselector[language][n=2] \keepblocks[nltext] \stopmode \starttext \startsection[title=\select{language}{English title}{Dutch title}] \beginentext This is English text. \endentext \beginnltext This is Dutch text. \endnltext \stopsection \stoptext It can also be done with buffers. \definebuffer [entext] \definebuffer [nltext] \defineselector [language] [max=2,n=1] \startmode[en] \setupselector[language][n=1] \def\stopentext{\getentext} \stopmode \startmode[nl] \setupselector[language][n=2] \def\stopnltext{\getnltext} \stopmode \starttext \startsection[title=\select{language}{English title}{Dutch title}] \startentext This is English text. \stopentext \startnltext This is Dutch text. \stopnltext \stopsection \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Typing efficiency
Hi, Sounds like a job for the blocks mechanism more so than buffers: \defineblock[entext] \defineblock[nltext] \defineselector [language] [max=2,n=1] \startmode[en] \setupselector[language][n=1] \keepblocks[entext] \stopmode \startmode[nl] \setupselector[language][n=2] \keepblocks[nltext] \stopmode \starttext \startsection[title=\select{language}{English title}{Dutch title}] \beginentext This is English text. \endentext \beginnltext This is Dutch text. \endnltext \stopsection \stoptext Best wishes, Taco > On 4 Sep 2020, at 14:02, Jan Willem Flamma wrote: > > Dear list member, > > Following up from: > https://www.mail-archive.com/ntg-context@ntg.nl/msg94719.html > > The below MWE works but how can I avoid having to type > \startmode[en] > \getbuffer[en] > \stopmode > \startmode[nl] > \getbuffer[nl] > \stopmode > > after every block of text? > > I tried to define a new start/stop pair as follows: > \definestartstop[Bufen][ > before={\startmode[en] > \startbuffer[en]}, > after={\stopbuffer > \getbuffer[en] > \stopmode}] > > but that fails. > > No doubt a clever solution exists that minimizes the typing. > > Kind regards, > Jan Willem > > > === > \setupinteraction[state=start] > > %\enablemode[nl] > \enablemode[en] > > \defineselector [language] [max=2,n=1] > \startmode[en] > \setupselector[language][n=1] > \stopmode > \startmode[nl] > \setupselector[language][n=2] > \stopmode > > \starttext > > \startsection[title=\select{language}{English title}{Dutch title}] > > \startbuffer[en] > This is English text. > \stopmode > \stopbuffer > \startbuffer[nl] > This is Dutch text. > \stopbuffer > > \startmode[en] > \getbuffer[en] > \stopmode > \startmode[nl] > \getbuffer[nl] > \stopmode > > \stopsection > > \stoptext > > > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ Taco Hoekwater Elvenkind BV ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Typing efficiency
Dear list member, Following up from:https://www.mail-archive.com/ntg-context@ntg.nl/msg94719.html The below MWE works but how can I avoid having to type \startmode[en] \getbuffer[en] \stopmode \startmode[nl] \getbuffer[nl] \stopmode after every block of text? I tried to define a new start/stop pair as follows:\definestartstop[Bufen][ before={\startmode[en] \startbuffer[en]}, after={\stopbuffer \getbuffer[en] \stopmode}] but that fails. No doubt a clever solution exists that minimizes the typing. Kind regards,Jan Willem ===\setupinteraction[state=start] %\enablemode[nl]\enablemode[en] \defineselector [language] [max=2,n=1]\startmode[en] \setupselector[language][n=1]\stopmode\startmode[nl] \setupselector[language][n=2]\stopmode \starttext \startsection[title=\select{language}{English title}{Dutch title}] \startbuffer[en] This is English text. \stopmode \stopbuffer \startbuffer[nl] This is Dutch text. \stopbuffer \startmode[en] \getbuffer[en] \stopmode \startmode[nl] \getbuffer[nl] \stopmode \stopsection \stoptext ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Overriding the number on a float
Hi, If there are a few special numberings of floats, and one wants floats numbered 1.6a and 1.6b, the following seems to work: Best regards: Otared %%% begin ownnumber-in-floats.tex \useMPlibrary[dum] \starttext \startsection[title=One] \startplacefigure[title=Test] \externalfigure[dummy] \stopplacefigure \stopsection \startsection[title=Two] \startplacefigure[title=Test] \externalfigure[dummy] \stopplacefigure \stopsection \setcounter[figure][5] % next figure is no.6 \startsection[ownnumber=10,title={A section}] \start \setupcaptions[numberstopper={a}] \startplacefigure[title=Test figure] \externalfigure[dummy] \stopplacefigure \stop \stopsection \setcounter[figure][5] \startsection[ownnumber=11,title={Another section}] % ownnumber doesn’t work \start \setupcaptions[numberstopper={b}] \startplacefigure[title=Test another figure] \externalfigure[dummy] \stopplacefigure \stop \startplacefigure[title=Test another figure] \externalfigure[dummy] \stopplacefigure \stopsection \stoptext %%% end ownnumber-in-floats.tex > On 24 Aug 2020, at 19:37, Henning Hraban Ramm wrote: > > > >> Am 24.08.2020 um 17:36 schrieb Wolfgang Schuster >> : >> >> Henning Hraban Ramm schrieb am 24.08.2020 um 15:29: >>>> Am 23.08.2020 um 11:25 schrieb Duncan Hothersall : >>>> >>>> I think there was a question on this very recently but I don;t think it >>>> got an answer and I can't find it to reply to, so apologies for the extra >>>> noise. I have a large text with floats numbered sequentially by chapter >>>> and then figure/table number, but at the last minute I've had a request >>>> for two figures in a particular chapter to become 27.1a and 27.1b instead >>>> of 27.1 and 27.2. It's not a combination - they are separate figures on >>>> different pages. >>>> >>>> I've experimented with the options I can see, but it's not obvious if >>>> there is a facility to override the numbering of two figures in a stream >>>> of normally numbered figures like this. I was thinking of the equivalent >>>> of the old \sym{symbol} command that used to work as a way to override a >>>> single item in an otherwise sequential list. >>>> >>>> I guess there's a brute force method of setting up a new type of figure >>>> with the label "Figure 27.1" and having them numbered as lowercase alpha, >>>> but if there's an easier way that would be great. >>> I’m also interested in overriding automatical numbering, e.g. of chapters >>> or itemization items. >>> E.g. in my songbook, I’d like to have the verses numbered but interrupted >>> by a chorus numbered as "C" (i.e. "R" in German). >>> Similarly the paragraphs of some (by)laws that were changed a lot and use a >>> numbering like 1, 2, 3, 3a, 4, 7... >>> Something like >>> \startitem[number={R}] >>> or >>> \startsection[number={3a}] >>> would be nice. >>> If I set it to an integer, ConTeXt should set the counter accordingly, >>> otherwise continue counting from the previous calculated number. Would that >>> be possible? >> >> >> You can set your own section numbers but the counter isn't stopped. > > Thank you! I overlooked "ownnumber". It works for sections, but not for items > or floats. > > \setnumber[section][10] doesn’t work, \setcounter the same (according to the > source they’re synonymous) – does section use a different counter name or is > it no counter at all? > > \setnumber[figure][10] works (but only with integers, not some alphanumerical > stuff, sorry Duncan). > > Hraban > > > \useMPlibrary[dum] > > \starttext > > \startsection[title=One] > \startplacefigure[title=Test] > \externalfigure[dummy] > \stopplacefigure > \stopsection > > \startsection[title=Two] > \startplacefigure[title=Test] > \externalfigure[dummy] > \stopplacefigure > \stopsection > > \setcounter[figure][5] % next figure is no.6 > > \startsection[ownnumber=10,title=???] % ownnumber doesn’t work > \startplacefigure[title=Test,ownnumber=10] > \externalfigure[dummy] > \stopplacefigure > \stopsection > > \setcounter[section][5] % doesn’t work > > \startsection[title=Three] > \startitemize[n] > \item one > \item two > \item three > \startitem[ownnumber=9] five\stopitem % ownnumber doesn’t work > \stopitemize > \stopsection > > \stoptext > > ___ > If your question is of interest to others as well, ple
Re: [NTG-context] Overriding the number on a float
Henning Hraban Ramm schrieb am 24.08.2020 um 19:37: Am 24.08.2020 um 17:36 schrieb Wolfgang Schuster : Henning Hraban Ramm schrieb am 24.08.2020 um 15:29: Am 23.08.2020 um 11:25 schrieb Duncan Hothersall : I think there was a question on this very recently but I don;t think it got an answer and I can't find it to reply to, so apologies for the extra noise. I have a large text with floats numbered sequentially by chapter and then figure/table number, but at the last minute I've had a request for two figures in a particular chapter to become 27.1a and 27.1b instead of 27.1 and 27.2. It's not a combination - they are separate figures on different pages. I've experimented with the options I can see, but it's not obvious if there is a facility to override the numbering of two figures in a stream of normally numbered figures like this. I was thinking of the equivalent of the old \sym{symbol} command that used to work as a way to override a single item in an otherwise sequential list. I guess there's a brute force method of setting up a new type of figure with the label "Figure 27.1" and having them numbered as lowercase alpha, but if there's an easier way that would be great. I’m also interested in overriding automatical numbering, e.g. of chapters or itemization items. E.g. in my songbook, I’d like to have the verses numbered but interrupted by a chorus numbered as "C" (i.e. "R" in German). Similarly the paragraphs of some (by)laws that were changed a lot and use a numbering like 1, 2, 3, 3a, 4, 7... Something like \startitem[number={R}] or \startsection[number={3a}] would be nice. If I set it to an integer, ConTeXt should set the counter accordingly, otherwise continue counting from the previous calculated number. Would that be possible? You can set your own section numbers but the counter isn't stopped. Thank you! I overlooked "ownnumber". It works for sections, but not for items or floats. \setnumber[section][10] doesn’t work, \setcounter the same (according to the source they’re synonymous) – does section use a different counter name or is it no counter at all? \setnumber[figure][10] works (but only with integers, not some alphanumerical stuff, sorry Duncan). \setupnumber is a synonym of \setupcounter and exists for backwards compatibility. Hraban \useMPlibrary[dum] \starttext \startsection[title=One] \startplacefigure[title=Test] \externalfigure[dummy] \stopplacefigure \stopsection \startsection[title=Two] \startplacefigure[title=Test] \externalfigure[dummy] \stopplacefigure \stopsection \setcounter[figure][5] % next figure is no.6 \startsection[ownnumber=10,title=???] % ownnumber doesn’t work \startplacefigure[title=Test,ownnumber=10] \externalfigure[dummy] \stopplacefigure \stopsection \setcounter[section][5] % doesn’t work \setupheadnumber[section][5] \startsection[title=Three] \startitemize[n] \item one \item two \item three \startitem[ownnumber=9] five\stopitem % ownnumber doesn’t work \starttext \startitemize \txt{I.} \unknown \sym{7.} \unknown \stopitemize \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Overriding the number on a float
> Am 24.08.2020 um 17:36 schrieb Wolfgang Schuster > : > > Henning Hraban Ramm schrieb am 24.08.2020 um 15:29: >>> Am 23.08.2020 um 11:25 schrieb Duncan Hothersall : >>> >>> I think there was a question on this very recently but I don;t think it got >>> an answer and I can't find it to reply to, so apologies for the extra >>> noise. I have a large text with floats numbered sequentially by chapter and >>> then figure/table number, but at the last minute I've had a request for two >>> figures in a particular chapter to become 27.1a and 27.1b instead of 27.1 >>> and 27.2. It's not a combination - they are separate figures on different >>> pages. >>> >>> I've experimented with the options I can see, but it's not obvious if there >>> is a facility to override the numbering of two figures in a stream of >>> normally numbered figures like this. I was thinking of the equivalent of >>> the old \sym{symbol} command that used to work as a way to override a >>> single item in an otherwise sequential list. >>> >>> I guess there's a brute force method of setting up a new type of figure >>> with the label "Figure 27.1" and having them numbered as lowercase alpha, >>> but if there's an easier way that would be great. >> I’m also interested in overriding automatical numbering, e.g. of chapters or >> itemization items. >> E.g. in my songbook, I’d like to have the verses numbered but interrupted by >> a chorus numbered as "C" (i.e. "R" in German). >> Similarly the paragraphs of some (by)laws that were changed a lot and use a >> numbering like 1, 2, 3, 3a, 4, 7... >> Something like >> \startitem[number={R}] >> or >> \startsection[number={3a}] >> would be nice. >> If I set it to an integer, ConTeXt should set the counter accordingly, >> otherwise continue counting from the previous calculated number. Would that >> be possible? > > > You can set your own section numbers but the counter isn't stopped. Thank you! I overlooked "ownnumber". It works for sections, but not for items or floats. \setnumber[section][10] doesn’t work, \setcounter the same (according to the source they’re synonymous) – does section use a different counter name or is it no counter at all? \setnumber[figure][10] works (but only with integers, not some alphanumerical stuff, sorry Duncan). Hraban \useMPlibrary[dum] \starttext \startsection[title=One] \startplacefigure[title=Test] \externalfigure[dummy] \stopplacefigure \stopsection \startsection[title=Two] \startplacefigure[title=Test] \externalfigure[dummy] \stopplacefigure \stopsection \setcounter[figure][5] % next figure is no.6 \startsection[ownnumber=10,title=???] % ownnumber doesn’t work \startplacefigure[title=Test,ownnumber=10] \externalfigure[dummy] \stopplacefigure \stopsection \setcounter[section][5] % doesn’t work \startsection[title=Three] \startitemize[n] \item one \item two \item three \startitem[ownnumber=9] five\stopitem % ownnumber doesn’t work \stopitemize \stopsection \stoptext ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Overriding the number on a float
Henning Hraban Ramm schrieb am 24.08.2020 um 15:29: Am 23.08.2020 um 11:25 schrieb Duncan Hothersall : I think there was a question on this very recently but I don;t think it got an answer and I can't find it to reply to, so apologies for the extra noise. I have a large text with floats numbered sequentially by chapter and then figure/table number, but at the last minute I've had a request for two figures in a particular chapter to become 27.1a and 27.1b instead of 27.1 and 27.2. It's not a combination - they are separate figures on different pages. I've experimented with the options I can see, but it's not obvious if there is a facility to override the numbering of two figures in a stream of normally numbered figures like this. I was thinking of the equivalent of the old \sym{symbol} command that used to work as a way to override a single item in an otherwise sequential list. I guess there's a brute force method of setting up a new type of figure with the label "Figure 27.1" and having them numbered as lowercase alpha, but if there's an easier way that would be great. I’m also interested in overriding automatical numbering, e.g. of chapters or itemization items. E.g. in my songbook, I’d like to have the verses numbered but interrupted by a chorus numbered as "C" (i.e. "R" in German). Similarly the paragraphs of some (by)laws that were changed a lot and use a numbering like 1, 2, 3, 3a, 4, 7... Something like \startitem[number={R}] or \startsection[number={3a}] would be nice. If I set it to an integer, ConTeXt should set the counter accordingly, otherwise continue counting from the previous calculated number. Would that be possible? You can set your own section numbers but the counter isn't stopped. \starttext \startsection[title=One] \stopsection \startsection[title=Two] \stopsection \startsection[ownnumber=X,title=???] \stopsection \startsection[title=Three] \stopsection \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Overriding the number on a float
> Am 23.08.2020 um 11:25 schrieb Duncan Hothersall : > > I think there was a question on this very recently but I don;t think it got > an answer and I can't find it to reply to, so apologies for the extra noise. > I have a large text with floats numbered sequentially by chapter and then > figure/table number, but at the last minute I've had a request for two > figures in a particular chapter to become 27.1a and 27.1b instead of 27.1 and > 27.2. It's not a combination - they are separate figures on different pages. > > I've experimented with the options I can see, but it's not obvious if there > is a facility to override the numbering of two figures in a stream of > normally numbered figures like this. I was thinking of the equivalent of the > old \sym{symbol} command that used to work as a way to override a single item > in an otherwise sequential list. > > I guess there's a brute force method of setting up a new type of figure with > the label "Figure 27.1" and having them numbered as lowercase alpha, but if > there's an easier way that would be great. I’m also interested in overriding automatical numbering, e.g. of chapters or itemization items. E.g. in my songbook, I’d like to have the verses numbered but interrupted by a chorus numbered as "C" (i.e. "R" in German). Similarly the paragraphs of some (by)laws that were changed a lot and use a numbering like 1, 2, 3, 3a, 4, 7... Something like \startitem[number={R}] or \startsection[number={3a}] would be nice. If I set it to an integer, ConTeXt should set the counter accordingly, otherwise continue counting from the previous calculated number. Would that be possible? BTW do sections, items and floats all use counters (\setnumber/\getnumber) or other mechanisms? Hraban ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] TOC chapter and section numbering
Hello, I'm attempting to typeset a short book using ConTeXt (current version: 2020.08.09 22:03). EXAMPLE: \setuplist[content][alternative=c] \setuphead[title][alternative=middle,style=cap] \setuphead[chapter][number=no] \setuphead[section][sectionsegments=section] \setuplist[section][width=1.5em,margin=3em] \starttext \title{contents} \placecontent \startchapter[title={Introductory}] \startsection[title={The concept of a function}] \stopsection \startsection[title={Extension and intension}] \stopsection \startsection[title={Functions of several variables}] \stopsection \startsection[title={Abstraction}] \stopsection \stopchapter \startchapter[title={Lambda-Conversion}] \startsection[title={Primitive symbols, and formulas}] \stopsection \startsection[title={Conversion}] \stopsection \startsection[title={Fundamental theorems on well-formed formulas and on the normal form}] \stopsection \stopchapter \stoptext I would like all the chapters to be prefixed with "Chapter RN." and the sections to keep a single count, for example: Chapter I. Introductory . 1. The concept of a function 2. Extension and intension 3. Functions of several variables 4. Abstraction Chapter II. Lambda Conversion . 5. Primitive symbols and formulas 6. Conversion 7. Fundamental theorems on well-formed formulas and on the normal form I tried to the following for the chapters: \defineconversion[church][Chapter \Romannumerals.\quad] \setuphead[chapter][conversion=church] Which appeared to generate the prefix correctly but it overlapped the title. Any help would be greatly appreciated. Thanks Adrian___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] reading a single element from XML
On 8/16/20 11:46 AM, Taco Hoekwater wrote: > \xmlfilter is your friend: > > \startxmlsetups xml:initialize >\xmlsetsetup{#1}{html}{xml:gen} > \stopxmlsetups > > \xmlregistersetup{xml:initialize} > > \startxmlsetups xml:gen > \xmlfilter{#1}{/**/span[@class='special']/command(xml:special)} > \stopxmlsetups > > \startxmlsetups xml:special >\bgroup\bfd\ssd\xmlflush{#1}\egroup > \stopxmlsetups Many thanks for your reply, Taco. This was extremely handy and helpful (it is also the first time I understand what \xmlfilter is used for). My final solution required nesting filters, which worked perfectly fine (included below). Many thanks for your help, Pablo Just for the record: \startbuffer[demo] This is One a paragraph. This is another paragraph. This is another Two paragraph. This is another Three paragraph. This is another Four paragraph. This is A a paragraph. This is another paragraph. This is another B paragraph. This is another C paragraph. This is another D paragraph. \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1}{html}{xml:gen} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:gen \xmlfilter{#1}{/**/div/command(xml:chapter)} \stopxmlsetups \startxmlsetups xml:chapter \startsection[title=\xmlatt{#1}{id}] \startitemize[packed] \xmlfilter{#1}{**/span[@class='special']/command(xml:special)} \stopitemize \stopsection \stopxmlsetups \startxmlsetups xml:special \startitem\xmlflush{#1}\stopitem \stopxmlsetups \starttext \xmlprocessbuffer{main}{demo}{} \stoptext -- http://www.ousia.tk ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \checkpage in the TOC
Beste Hans! thank you so much for your solution! After plying I will remember your last statement in your answer :-) Kind regards Willi > On 12 Aug 2020, at 02:04, Hans Hagen wrote: > > On 8/10/2020 11:02 PM, Willi Egger wrote: >> Hello! >> humble, in another book I am trying to improve the list of contents. On >> different places occur page breaks which should be addressed and corrected. >> I tried to use the method \checkpage[][], however my attempts are not >> succesful. >> For your reference I include a screenshot of the problematic pagebreak. >> \definepagechecker >> [willi] >> [method=1,before=,after=,inbetween={\page}] >> \setuplist >> [chapter] >> [prefix=no, >> sectionnumber=no, >> headnumber=no, >> alternative=command, >> command=\Mychaptercommand, >> inbetween={\checkpage[willi][lines=4]} >> Thank you for advice! >> Kind regards >> Willi >> ] > Here's an example of an actually already quite old mechanism .. > > \showinjector > > \setinjector[register][3][\column] > \setinjector[list] [2][{\blank[3*big]}] > > \starttext > \placelist[section][criterium=text] > \blank[3*big] > \placeregister[index][criterium=text] > \page > \startsection[title=Alpha] first \index{first} \stopsection > \startsection[title=Beta] second \index{second} \stopsection > \startsection[title=Gamma] third \index{third} \stopsection > \startsection[title=Delta] fourth \index{fourth} \stopsection > \stoptext > > .. so you now have something to wikify .. > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \checkpage in the TOC
On 8/10/2020 11:02 PM, Willi Egger wrote: Hello! humble, in another book I am trying to improve the list of contents. On different places occur page breaks which should be addressed and corrected. I tried to use the method \checkpage[][], however my attempts are not succesful. For your reference I include a screenshot of the problematic pagebreak. \definepagechecker [willi] [method=1,before=,after=,inbetween={\page}] \setuplist [chapter] [prefix=no, sectionnumber=no, headnumber=no, alternative=command, command=\Mychaptercommand, inbetween={\checkpage[willi][lines=4]} Thank you for advice! Kind regards Willi ] Here's an example of an actually already quite old mechanism .. \showinjector \setinjector[register][3][\column] \setinjector[list][2][{\blank[3*big]}] \starttext \placelist[section][criterium=text] \blank[3*big] \placeregister[index][criterium=text] \page \startsection[title=Alpha] first \index{first} \stopsection \startsection[title=Beta] second \index{second} \stopsection \startsection[title=Gamma] third \index{third} \stopsection \startsection[title=Delta] fourth \index{fourth} \stopsection \stoptext .. so you now have something to wikify .. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] About the numbering of theorems
Hello, I have a little problem with the numbering of theorems when there is no subsection. I would like to know : Theorem 1.1 Theorem 1.2 Theorem 2.3 Theorem 2.4 Thank you Fabrice begin example \setuplabeltext[chapter=Chapitre~] \unexpanded\def\Title#1#2{\framed[frame=off,width=fit,align=flushleft]{#1\blank#2}} \startbuffer[mybuffer] \starttheorem \input ward \stoptheorem \stopbuffer \setuphead [chapter] [style=\bfd, align={flushleft,broad}, command=\Title] \setuphead [section] [style=\bfc, distance=\zeropoint, sectionsegments=section, conversion={R}, align={flushleft,broad}, commandbefore={\space\endash\space}] \setuphead [subsection] [sectionsegments=subsection, conversion={n}, style=\bfb, align={flushleft,broad}] \setupenumerations [before={\blank}, after={\blank}, alternative=serried, title=yes, prefix=yes, prefixsegments=chapter, titlestyle=bold, width=broad] \defineenumeration [theorem] [text=Théorème, number=yes, style=italic] \starttext \startchapter [title={First chapter}] \startsection [title={First section}] \startsubsection [title={First subsection}] \dorecurse{2}{\getbuffer[mybuffer]} \stopsubsection \stopsection \stopchapter \startchapter [title={Second chapter}] \startsection [title={Second section}] \dorecurse{2}{\getbuffer[mybuffer]} \stopsection \stoptheorem \stopchapter \stoptext end example ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Placing a section ending depending on odd/even sectionnumber
Wolfgang, thank you so much for your help! Hm, when reading your explanation I start to understand my short cut in thinking about solving the problem. I will build it into my project… Thanks and kind regards Willi > On 4 Aug 2020, at 19:46, Wolfgang Schuster > wrote: > > Willi Egger schrieb am 04.08.2020 um 18:56: >> Hi, >> now I have another hurdle to be taken :-) — Depending on the odd or even >> number of the section I have to place an ornament at the end of the section. >> I have sofar the following setup: >> [...] >> However the the evaluation of the sectionnumber results always in “false”, >> having therefore always odd as a sectionending. > > You have two problem: > > 1. To get the current value for \currentheadnumber you have use > \determineheadnumber[section] before you use it but the example below shows a > better method. > > 2. What you do with \doifelse{...}{even} is to compare the numeric value of > the section with the string "even" which is always false. To check whether > the value is odd or even you have to use the \ifodd command. > >> What to change in order to get the desired result? > > begin example > \startsetups [section:odd] > \vfill > \bold {End of odd numbered section} > \stopsetups > > \startsetups [section:even] > \vfill > \bold {End of even numbered section} > \stopsetups > > \startsetups [section:end] > \ifodd\namedheadnumber{section} > \directsetup{section:odd} > \else > \directsetup{section:even} > \fi > \stopsetups > > \setuphead > [section] > [aftersection=\directsetup{section:end}] > > \starttext > > \startsection[title=Ward] > \input ward > \stopsection > > \page > > \startsection[title=Knuth] > \input knuth > \stopsection > > \stoptext > end example > > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Placing a section ending depending on odd/even sectionnumber
Willi Egger schrieb am 04.08.2020 um 18:56: Hi, now I have another hurdle to be taken :-) — Depending on the odd or even number of the section I have to place an ornament at the end of the section. I have sofar the following setup: [...] However the the evaluation of the sectionnumber results always in “false”, having therefore always odd as a sectionending. You have two problem: 1. To get the current value for \currentheadnumber you have use \determineheadnumber[section] before you use it but the example below shows a better method. 2. What you do with \doifelse{...}{even} is to compare the numeric value of the section with the string "even" which is always false. To check whether the value is odd or even you have to use the \ifodd command. What to change in order to get the desired result? begin example \startsetups [section:odd] \vfill \bold {End of odd numbered section} \stopsetups \startsetups [section:even] \vfill \bold {End of even numbered section} \stopsetups \startsetups [section:end] \ifodd\namedheadnumber{section} \directsetup{section:odd} \else \directsetup{section:even} \fi \stopsetups \setuphead [section] [aftersection=\directsetup{section:end}] \starttext \startsection[title=Ward] \input ward \stopsection \page \startsection[title=Knuth] \input knuth \stopsection \stoptext end example 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Placing a section ending depending on odd/even sectionnumber
Hi, now I have another hurdle to be taken :-) — Depending on the odd or even number of the section I have to place an ornament at the end of the section. I have sofar the following setup: \define\stopmysection {\setups{endsection}} \startsetups endsection \doifelse {\currentheadnumber} %{\headnumber[section][current]}{odd} {even} {\vfil {\bf End of even numbered section} \stopsection% } {\vfil {\bf End of odd numbered section} \stopsection% } \stopsetups \starttext \startsection[title=Ward] \setuppagenumbering[conversion=romannumerals] \input ward \stopmysection \startsection[title=Knuth] \setuppagenumbering[conversion=numbers] \input knuth \stopmysection \stoptext However the the evaluation of the sectionnumber results always in “false”, having therefore always odd as a sectionending. What to change in order to get the desired result? Kind regards Willi ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Fwd: \emph not working in LMTX (bug?)
Now it works. Thank you very much, Wolfgang! Cordially, Jairo El lun., 3 de ago. de 2020 a la(s) 23:17, Wolfgang Schuster ( wolfgang.schuster.li...@gmail.com) escribió: > Jairo A. del Rio schrieb am 04.08.2020 um 06:07: > > > The following worked some days ago. Now it crashes: > > > > > \setuphead[chapter][alternative=middle,textstyle=\cap,numbercommand=\WORDS] > > > \setuphead[section][sectionsegments=section,align=middle,textstyle={\bf},conversion=R,numbercommand={\bf}] > > > \setuphead[subsection][numbercommand=,textstyle={\it},sectionsegments=subsection,conversion=n] > > \starttext > > \startchapter[title=Dummy chapter] > > \startsection[title=Dummy section] > > \startsubsection[title=Dummy subsection] > > \input knuth > > \stopsubsection > > \stopsection > > \stopchapter > > \stoptext > > This caused by the second related problem mentioned in my answer, you > get the error message for the \cap and \WORDS command. > > In this case there is a easy fix and also better chapter setup: > > \setuphead >[chapter] >[alternative=middle, > textstyle=cap, > numberstyle=WORD] > > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Fwd: \emph not working in LMTX (bug?)
Jairo A. del Rio schrieb am 04.08.2020 um 06:07: The following worked some days ago. Now it crashes: \setuphead[chapter][alternative=middle,textstyle=\cap,numbercommand=\WORDS] \setuphead[section][sectionsegments=section,align=middle,textstyle={\bf},conversion=R,numbercommand={\bf}] \setuphead[subsection][numbercommand=,textstyle={\it},sectionsegments=subsection,conversion=n] \starttext \startchapter[title=Dummy chapter] \startsection[title=Dummy section] \startsubsection[title=Dummy subsection] \input knuth \stopsubsection \stopsection \stopchapter \stoptext This caused by the second related problem mentioned in my answer, you get the error message for the \cap and \WORDS command. In this case there is a easy fix and also better chapter setup: \setuphead [chapter] [alternative=middle, textstyle=cap, numberstyle=WORD] 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Fwd: \emph not working in LMTX (bug?)
-- Forwarded message - De: Jairo A. del Rio Date: lun., 3 de ago. de 2020 a la(s) 23:05 Subject: Re: [NTG-context] \emph not working in LMTX (bug?) To: Wolfgang Schuster The following worked some days ago. Now it crashes: \setuphead[chapter][alternative=middle,textstyle=\cap,numbercommand=\WORDS] \setuphead[section][sectionsegments=section,align=middle,textstyle={\bf},conversion=R,numbercommand={\bf}] \setuphead[subsection][numbercommand=,textstyle={\it},sectionsegments=subsection,conversion=n] \starttext \startchapter[title=Dummy chapter] \startsection[title=Dummy section] \startsubsection[title=Dummy subsection] \input knuth \stopsubsection \stopsection \stopchapter \stoptext The log says: \endgroup \22>:157>:middle ...headshownumber \strut \headnumbercontent \par \else \fakeheadnumbercontent \fi \begstrut \headtextcontent \endstrut } \strc_rendering_inject_number_and_text ...def \p_command {\headparameter \c!command }\ifx \p_command \empty \directsetup \currentheadrenderingsetup \else \p_command \headnumbercontent \headtextcontent \fi \strc_rendering_place_head_number_and_text ...}\useheadstyleparameter \c!style \setinlineheadreferenceattributes \strc_rendering_inject_number_and_text }\fi \strc_rendering_stop_placement \strc_sectioning_handle ...onditional \headshownumber \let \getheadnumber \fullheadnumber \strc_rendering_place_head_number_and_text \else \strc_rendering_place_head_text \fi \dostoptagged \strc_sectioning_after_yes \else \ifconditional \c_strc_sectioning_hidden \strc_se... \strc_sectioning_start_named_section ...de \currenthead \headparameter \c!beforesection \the \everybeforehead \strc_sectioning_handle {#1}{#2}{#3} \headparameter \c!insidesection ... I guess it's unrelated to Pablo's issue (\emph works again after the patch). El lun., 3 de ago. de 2020 a la(s) 22:48, Wolfgang Schuster ( wolfgang.schuster.li...@gmail.com) escribió: > Jairo A. del Rio schrieb am 04.08.2020 um 03:37: > > The following crashes with LMTX (current version: 2020.08.03 14:25): > > > > > > \starttext > > \emph{Hola} > > \stoptext > > > > Log: > > > > > > \emphasiscorrection ->\ifhmode \ifnum \currentgrouptype =\aligngroupcode > > > > \else \expandafter \expandafter \expandafter \font_emphasis_look \fi \fi > > > > \egroup > > > > \egroup > > > > l.2 \emph{Hola} > > > > Is it a bug? \emph worked for older versions. Thank you in advance. > > Yes and it was already reported by Pablo but don't hesitate report > future bugs. > > https://www.mail-archive.com/ntg-context@ntg.nl/msg95268.html > > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] no reference output for \namedstructurevariable
Hello, I am facing some issue with \usernamedvariable. Consider this MWE \starttext \startsection[title={Mammals and eggs},reference={mammals}] \namedstructurevariable{section}{title} \namedstructurevariable{section}{reference} and \currentstructurereference \stopsection \stoptext \namedstructurevariable{section}{reference} doesn't give any output, while \currentstructurereference does. Is this a bug or something I miss? I get also no output when I define custom key/value with startsection and call them with namedstructurevariable. Best regards, Damien Thiriet - End forwarded message - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Using variables and macros for styling of section title and line in table of contents
Thanks so much for such a quick reply Wolfgang <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail> Virus-free. www.avast.com <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Wed, 22 Jul 2020 at 20:38, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> wrote: > James Withers schrieb am 22.07.2020 um 21:20: > > Dear list > > > > I have a document with section headings which include a title, date and > > reference spread over two lines with different font style and > > justification, plus a slightly different text for the table of contents. > > > > So that I can alter the styling of the section headings without having > > to recode each \startsection command, I have used variables and a macro > > command for the style. > > > > This works for section 'title' and 'marking', but not for the 'list' > > attribute. > > The title argument works only because it is placed in the text but it > won't work when you try to show the argument in the ToC like the list > argument. > > > The minimal working example below shows what I'm trying to do. > > > > Best wishes and many thanks in advance. > > > > James > > > > > \define\mytitle{\getvariable{myvar}{title}\crlf{\tfx\getvariable{myvar}{date}\hfill\getvariable{myvar}{ref}}} > > \define\mylist{\getvariable{myvar}{list}---{\bf > \getvariable{myvar}{date}}} > > In this case you have to use \defineexpandable to create your commands > and enable expansion for sections. > > \defineexpandable\mytitle{...} > \defineexpandable\mylist {...} > > \setuphead[section][expansion=yes] > > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Using variables and macros for styling of section title and line in table of contents
James Withers schrieb am 22.07.2020 um 21:20: Dear list I have a document with section headings which include a title, date and reference spread over two lines with different font style and justification, plus a slightly different text for the table of contents. So that I can alter the styling of the section headings without having to recode each \startsection command, I have used variables and a macro command for the style. This works for section 'title' and 'marking', but not for the 'list' attribute. The title argument works only because it is placed in the text but it won't work when you try to show the argument in the ToC like the list argument. The minimal working example below shows what I'm trying to do. Best wishes and many thanks in advance. James \define\mytitle{\getvariable{myvar}{title}\crlf{\tfx\getvariable{myvar}{date}\hfill\getvariable{myvar}{ref}}} \define\mylist{\getvariable{myvar}{list}---{\bf \getvariable{myvar}{date}}} In this case you have to use \defineexpandable to create your commands and enable expansion for sections. \defineexpandable\mytitle{...} \defineexpandable\mylist {...} \setuphead[section][expansion=yes] 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Using variables and macros for styling of section title and line in table of contents
Dear list I have a document with section headings which include a title, date and reference spread over two lines with different font style and justification, plus a slightly different text for the table of contents. So that I can alter the styling of the section headings without having to recode each \startsection command, I have used variables and a macro command for the style. This works for section 'title' and 'marking', but not for the 'list' attribute. The minimal working example below shows what I'm trying to do. Best wishes and many thanks in advance. James \define\mytitle{\getvariable{myvar}{title}\crlf{\tfx\getvariable{myvar}{date}\hfill\getvariable{myvar}{ref}}} \define\mylist{\getvariable{myvar}{list}---{\bf \getvariable{myvar}{date}}} \starttext \completecontent \setvariables[myvar][ title={What I would like}, date={2020}, ref={Reference No 1}, list={Variation on title}, ] \startsection[title=\mytitle,list={Variation on title---{\bf 2020}}] Contents line to look like this: \mylist \stopsection \setvariables[myvar][ title={What I get}, date={2021}, ref={Reference No 2}, list={Something for the contents}, ] \startsection[title=\mytitle,list=\mylist] Contents line to look like this: \mylist \stopsection \stoptext <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail> Virus-free. www.avast.com <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] french translation of ConTeXt interface - progress (v3)
file name can be confusing, it's not yet complete TypeNames TranslationsAchievement commands3962954 24% constants 841 708 84% elements26 25 DONE setupstrings135 56 41% variables 1330680 51% 6294242339% Following your feedbacks, I will update it and improve its consistency. As you advised, I will try first to complete constants and variables (keys/values) during July and August. And, if it makes sense for ConTeXt's community to use it as a "new" or an "updated" french interface, I may try to produce a 40~50 pages documentation for the basics commands (during 2020 S2): • \starttext • \startchapter, \startsection, \starttitle, \startsubject, \setuphead, \completecontent • \em, \bf, \cap, • \startitemize, \startitem, \starthead, • \placefigure, \externalfigure, • \placetable, \starttable,\starttabulate, \setupTABLE, \bTABLE • \index, \completeindex • \setuplayout, \setupfootertexts et \setupheadertexts • \definedescription, \defineenumeration • \at, \in Anyway, thanks again for your support. Le 19/07/2020 à 22:55, Hans Hagen a écrit : On 7/19/2020 8:27 PM, Garulfo wrote: file: mult-def.lua.complet i'll have a look at it Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] white-space after section-head in columns
Hello Peter, playing with "grid" option within \setuplayout and \setuphead might help - see: \setuplayout[grid=no] \setuphead[section][grid=no] \starttext \startsection[title=Space is ok here] \input tufte \stopsection \blank \startcolumns[n=2] \startsection[title=Too much white-space here] \input tufte \stopsection \setuphead[section]%[after=\vskip-2ex] \startsection[title=Space is ok here with workaround] \input tufte \stopsection \stopcolumns \stoptext Best regards, Lukas -- Původní e-mail -- Od: Peter Münster Komu: ConTeXt users Datum: 15. 7. 2020 14:57:26 Předmět: [NTG-context] white-space after section-head in columns Hi, What is the right way please to get normal white-space after a section in columns, i.e. not too much? Example, that shows the problem: --8<---cut here---start->8--- \starttext \startsection[title=Space is ok here] \input tufte \stopsection \startcolumns[n=2] \startsection[title=Too much white-space here] \input tufte \stopsection \setuphead[section][after=\vskip-2ex] \startsection[title=Space is ok here with workaround] \input tufte \stopsection \stopcolumns \stoptext --8<---cut here---end--->8--- TIA, -- Peter ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___\setuplayout[grid=no] \setuphead[section][grid=no] \starttext \startsection[title=Space is ok here] \input tufte \stopsection \blank \startcolumns[n=2] \startsection[title=Too much white-space here] \input tufte \stopsection \setuphead[section]%[after=\vskip-2ex] \startsection[title=Space is ok here with workaround] \input tufte \stopsection \stopcolumns \stoptext t3.pdf Description: Adobe PDF document ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] white-space after section-head in columns
Peter Münster schrieb am 15.07.2020 um 14:55: Hi, What is the right way please to get normal white-space after a section in columns, i.e. not too much? Example, that shows the problem: --8<---cut here---start->8--- \starttext \startsection[title=Space is ok here] \input tufte \stopsection \startcolumns[n=2] \startsection[title=Too much white-space here] \input tufte \stopsection \setuphead[section][after=\vskip-2ex] \startsection[title=Space is ok here with workaround] \input tufte \stopsection \stopcolumns \stoptext --8<---cut here---end--->8--- https://www.mail-archive.com/ntg-context@ntg.nl/msg89563.html 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] white-space after section-head in columns
Hi, What is the right way please to get normal white-space after a section in columns, i.e. not too much? Example, that shows the problem: --8<---cut here---start->8--- \starttext \startsection[title=Space is ok here] \input tufte \stopsection \startcolumns[n=2] \startsection[title=Too much white-space here] \input tufte \stopsection \setuphead[section][after=\vskip-2ex] \startsection[title=Space is ok here with workaround] \input tufte \stopsection \stopcolumns \stoptext --8<---cut here---end--->8--- TIA, -- Peter ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] About the table of contents
Hello, I would like to reduce the space between the numbering and the title of the chapters, sections and subsections. I would also like to have this: 1 My first chapter 1.1 My first section 1.1.1 My first subsection \setuplist [chapter] [style=bold,width=10mm] \starttext \placelist [chapter,section,subsection] [criterium=all, interaction=all, alternative=c] \startchapter [title=My first chapter] \dorecurse{2}{\input knuth} \startsection [title=My first section] \dorecurse{2}{\input knuth} \startsubsection [title=My first subsection] \dorecurse{2}{\input knuth} \stopsubsection \stopsection \stopchapter \stoptext ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Translation of ConTeXt interface
Thanks a lot Wolfang for your answer. I have 5 additional questions... sorry. --- >> \placeFLOAT becomes \placerFLOAT >> \startplaceFLOAT becomes \debutplacerFLOAT >> \placerchemical becomes \placerchemical >> \startplacerchemical becomes \debutplacerchemical >\placefigure is a combination of the element "place" (\e!place) and the > variable "figure" (\v!figure) >\startplacefigure is a combination of the elements "start" (\e!start) >and "place" (\e!place) and the variable "figure" (\v!figure.) So, I'm still doing something wrong, because changing the translation of "figure" in "mult-def.lua" (in the part "variables"), only affect : 1- command "\startfigure\stopfigure" 2- "figure" in "\setuppageinjection" > alternative = figure buffer... --- I get another difficulty with \startitemize and \stopitemize the translation of the variable "itemize" has no impact on the setup-fr.pdf file produced with : context --interface=fr --global --result=setup-fr x-setups-overview.mkiv But, I just found that if I actually use the translated commands in a test.tex file, it just works. % interface=fr \debuttexte \debutlister \elem first \elem second \finlister \fintexte What should I do in order to have a setup-fr.pdf file that shows the translations actually available ? --- With the translation of the command textwidth, I can use "largeur=0.5\largeurtexte" (cool !) But this command is not listed in setup-fr.pdf. Is there a way to add these basic commands to setup-fr.pdf ? --- Math. I get the following error : fonts > preloading latin modern fonts (second stage) fonts > defining > font with asked name 'fichier' is not found using lookup 'file' fonts > defining > unknown font 'fichier', loading aborted I suppose that due to the translation of "file" to "fichier". It's OK when I switch back to - setupstrings cd:file ==> file - variables file==> file How can I translate the variable "file" into fichier, without messing with fonts (and maybe other file related functions) --- > Delimited command are problematic (especially when they change > catcodes), e.g. \startluacode use \stopluacode as hard coded delimiter > for the environment. While it is easy to create a synonym for > \startluacode this isn't the case for \stopluacode because the > environment always look for \stopluacode as stopper and alternative > names are ignored. \startsection \stopsection and \startformula \stopformula seem OK. How can I identify the delimited commands that should not be translated in order to avoid this issue. --- Thanks again ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] spacing before items
I really should have fiddled with this before thanking you, Wolfgang. I was focused on catching up on email etc. this morning. Thanks for trying though! Your "answer" is pretty much coded code to me. I don't understand it and don't have the first notion of how to implement it in my file. For one thing, I have no clue what "ttbf" means. Can't find it on the wiki or in the manuals. Google says it's the Texas Teen Book Festival but I'm guessing that ain't it. ??? Thanks anyway! -Original Message- From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Wolfgang Schuster Sent: Tuesday, June 16, 2020 1:14 PM To: mailing list for ConTeXt users Subject: Re: [NTG-context] spacing before items Mike Cooper schrieb am 16.06.2020 um 19:51: > Hello list, > > Another very simple issue—no doubt the answer is right in front of me > but I can’t find it or figure it out… > > (Please let me know where it is!) > > I want more space before each top-level item.MWE: > > \defineitemgroup[mdshw][levels=2] > > \setupitemgroup[mdshw][1][n] > > \setupitemgroup[mdshw][2][a, packed, 1*broad][left=(, right=), stopper=] > > \starttext > > \startsection{First Section} \startsection[title={...}] The first entry uses the "before" value while inner entries use "inbetween". \starttext \setupitemgroup [itemize][1] [ before={\endgraf{\ttbf[before]}\endgraf}, inbetween={\endgraf{\ttbf [inbetween]}\endgraf}, after={\endgraf{\ttbf [after]}\endgraf}] \startitemize \startitem Choose the correct answer. \startitemize \item This one \item This one \stopitemize \stopitem \startitem Choose the correct answer. \startitemize \item This one \item This one \stopitemize \stopitem \stopitemize \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] spacing before items
Thanks Tomáš! 1. Where can this solution be found? 2. This solution also adds space between the top-level and second-level lists... I only want some visual separation between the top-level chunks. Thanks! -Original Message- From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Tomas Hala Sent: Tuesday, June 16, 2020 1:18 PM To: mailing list for ConTeXt users Subject: Re: [NTG-context] spacing before items Hi Mike, \setupitemgroup[youritems][1][inbetween={\blank[5*big]}] could help you. Best wishes, Tomáš Tue, Jun 16, 2020 ve 05:51:20PM + Mike Cooper napsal(a): #Link: [1]File-List #Link: [2]Edit-Time-Data # #Hello list, # # # #Another very simple issue—no doubt the answer is right in front of me but #I can’t find it or figure it out… # #(Please let me know where it is!) # # # #I want more space before each top-level item. MWE: # # # #\defineitemgroup[mdshw][levels=2] # # \setupitemgroup[mdshw][1][n] # # \setupitemgroup[mdshw][2][a, packed, 1*broad][left=(, right=), #stopper=] # # # # # #\starttext # # # #\startsection{First Section} # # # #\startmdshw # # \item Choose the correct answer. # # \startmdshw # # \item This one # # \item This one # # \item This one # # \stopmdshw # # # # \item Choose the correct answer. # # \startmdshw # # \item This one # # \item This one # # \item This one # # \stopmdshw # # # # \item Choose the correct answer. # # \startmdshw # # \item This one # # \item This one # # \item This one # # \stopmdshw # # # #\startmdshw # # # #\stoptext # # # # # #THANK YOU!! # # # #Mike Cooper # #Technical Trainer # #Murchison Drilling Schools, Inc. # #2501 Juan Tabo NE # #Albuquerque, NM 87112 # #Tel: (505) 293-6271 # #Fax: (505) 298-5294 # #Email: [3]m...@murchisondrillingschools.com # #Website: [4]www.murchisondrillingschools.com # #[5]cid:image007.jpg@01D03ADC.BD6E6850 [6]cid:image008.jpg@01D03ADC.BD6E6850 [7]cid:image009.jpg@01D03ADC.BD6E6850 # #Murchison Drilling Schools is now part of # #[8]cid:image001.png@01D63515.857FD120 # # # # References # #Visible links #1. file:///home/thala/.mutt-tmp/cid:filelist.xml@01D643D4.723482A0 #2. file:///home/thala/.mutt-tmp/cid:editdata.mso #3. mailto:m...@murchisondrillingschools.com #4. http://www.murchisondrillingschools.com/ #5. https://www.facebook.com/pages/Murchison-Drilling-Schools/158018484232622 #6. http://www.linkedin.com/company/murchison-drilling-schools-inc- #7. https://twitter.com/trainingmds # ___ # 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://context.aanhet.net # archive : https://bitbucket.org/phg/context-mirror/commits/ # wiki : http://contextgarden.net # ___ Tomáš Hála Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky Zemědělská 1, CZ-613 00 Brno, tel. +420 545 13 22 28 http://akela.mendelu.cz/~thala ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] spacing before items
Thanks Wolfgang! 1. Where can this solution be found? (wiki or elsewhere) 2. I'm guessing that you're saying that my \startsection should have [title={...}] instead of what I gave? -Original Message- From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Wolfgang Schuster Sent: Tuesday, June 16, 2020 1:14 PM To: mailing list for ConTeXt users Subject: Re: [NTG-context] spacing before items Mike Cooper schrieb am 16.06.2020 um 19:51: > Hello list, > > Another very simple issue—no doubt the answer is right in front of me > but I can’t find it or figure it out… > > (Please let me know where it is!) > > I want more space before each top-level item.MWE: > > \defineitemgroup[mdshw][levels=2] > > \setupitemgroup[mdshw][1][n] > > \setupitemgroup[mdshw][2][a, packed, 1*broad][left=(, right=), stopper=] > > \starttext > > \startsection{First Section} \startsection[title={...}] The first entry uses the "before" value while inner entries use "inbetween". \starttext \setupitemgroup [itemize][1] [ before={\endgraf{\ttbf[before]}\endgraf}, inbetween={\endgraf{\ttbf [inbetween]}\endgraf}, after={\endgraf{\ttbf [after]}\endgraf}] \startitemize \startitem Choose the correct answer. \startitemize \item This one \item This one \stopitemize \stopitem \startitem Choose the correct answer. \startitemize \item This one \item This one \stopitemize \stopitem \stopitemize \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] spacing before items
Hi Mike, \setupitemgroup[youritems][1][inbetween={\blank[5*big]}] could help you. Best wishes, Tomáš Tue, Jun 16, 2020 ve 05:51:20PM + Mike Cooper napsal(a): #Link: [1]File-List #Link: [2]Edit-Time-Data # #Hello list, # # # #Another very simple issue—no doubt the answer is right in front of me but #I can’t find it or figure it out… # #(Please let me know where it is!) # # # #I want more space before each top-level item. MWE: # # # #\defineitemgroup[mdshw][levels=2] # # \setupitemgroup[mdshw][1][n] # # \setupitemgroup[mdshw][2][a, packed, 1*broad][left=(, right=), #stopper=] # # # # # #\starttext # # # #\startsection{First Section} # # # #\startmdshw # # \item Choose the correct answer. # # \startmdshw # # \item This one # # \item This one # # \item This one # # \stopmdshw # # # # \item Choose the correct answer. # # \startmdshw # # \item This one # # \item This one # # \item This one # # \stopmdshw # # # # \item Choose the correct answer. # # \startmdshw # # \item This one # # \item This one # # \item This one # # \stopmdshw # # # #\startmdshw # # # #\stoptext # # # # # #THANK YOU!! # # # #Mike Cooper # #Technical Trainer # #Murchison Drilling Schools, Inc. # #2501 Juan Tabo NE # #Albuquerque, NM 87112 # #Tel: (505) 293-6271 # #Fax: (505) 298-5294 # #Email: [3]m...@murchisondrillingschools.com # #Website: [4]www.murchisondrillingschools.com # #[5]cid:image007.jpg@01D03ADC.BD6E6850 [6]cid:image008.jpg@01D03ADC.BD6E6850 [7]cid:image009.jpg@01D03ADC.BD6E6850 # #Murchison Drilling Schools is now part of # #[8]cid:image001.png@01D63515.857FD120 # # # # References # #Visible links #1. file:///home/thala/.mutt-tmp/cid:filelist.xml@01D643D4.723482A0 #2. file:///home/thala/.mutt-tmp/cid:editdata.mso #3. mailto:m...@murchisondrillingschools.com #4. http://www.murchisondrillingschools.com/ #5. https://www.facebook.com/pages/Murchison-Drilling-Schools/158018484232622 #6. http://www.linkedin.com/company/murchison-drilling-schools-inc- #7. https://twitter.com/trainingmds # ___ # 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://context.aanhet.net # archive : https://bitbucket.org/phg/context-mirror/commits/ # wiki : http://contextgarden.net # ___ Tomáš Hála Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky Zemědělská 1, CZ-613 00 Brno, tel. +420 545 13 22 28 http://akela.mendelu.cz/~thala ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] spacing before items
Mike Cooper schrieb am 16.06.2020 um 19:51: Hello list, Another very simple issue—no doubt the answer is right in front of me but I can’t find it or figure it out… (Please let me know where it is!) I want more space before each top-level item.MWE: \defineitemgroup[mdshw][levels=2] \setupitemgroup[mdshw][1][n] \setupitemgroup[mdshw][2][a, packed, 1*broad][left=(, right=), stopper=] \starttext \startsection{First Section} \startsection[title={...}] The first entry uses the "before" value while inner entries use "inbetween". \starttext \setupitemgroup [itemize][1] [ before={\endgraf{\ttbf[before]}\endgraf}, inbetween={\endgraf{\ttbf [inbetween]}\endgraf}, after={\endgraf{\ttbf [after]}\endgraf}] \startitemize \startitem Choose the correct answer. \startitemize \item This one \item This one \stopitemize \stopitem \startitem Choose the correct answer. \startitemize \item This one \item This one \stopitemize \stopitem \stopitemize \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] spacing before items
Hello list, Another very simple issue-no doubt the answer is right in front of me but I can't find it or figure it out... (Please let me know where it is!) I want more space before each top-level item. MWE: \defineitemgroup[mdshw][levels=2] \setupitemgroup[mdshw][1][n] \setupitemgroup[mdshw][2][a, packed, 1*broad][left=(, right=), stopper=] \starttext \startsection{First Section} \startmdshw \item Choose the correct answer. \startmdshw \item This one \item This one \item This one \stopmdshw \item Choose the correct answer. \startmdshw \item This one \item This one \item This one \stopmdshw \item Choose the correct answer. \startmdshw \item This one \item This one \item This one \stopmdshw \startmdshw \stoptext THANK YOU!! Mike Cooper Technical Trainer Murchison Drilling Schools, Inc. 2501 Juan Tabo NE Albuquerque, NM 87112 Tel: (505) 293-6271 Fax: (505) 298-5294 Email: m...@murchisondrillingschools.com<mailto:m...@murchisondrillingschools.com> Website: www.murchisondrillingschools.com<http://www.murchisondrillingschools.com/> [cid:image007.jpg@01D03ADC.BD6E6850]<https://www.facebook.com/pages/Murchison-Drilling-Schools/158018484232622> [cid:image008.jpg@01D03ADC.BD6E6850] <http://www.linkedin.com/company/murchison-drilling-schools-inc-> [cid:image009.jpg@01D03ADC.BD6E6850] <https://twitter.com/trainingmds> Murchison Drilling Schools is now part of [cid:image001.png@01D63515.857FD120] ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] using modeset
Jan Willem Flamma schrieb am 11.06.2020 um 10:41: Dear list members, I write training manuals and use the Modes mechanism a lot to create documents at various competency levels using a single set of source files. So far the manuals have been written in English but now a separate Dutch translation has to be created. It is important that the two manuals are setup similarly so the section/subsection numbers and question numbers are the same in the English manual and the Dutch manual. Note: I do not intend to create a manual that has the English and Dutch text at opposite sides (as can be done using streams) I’m keen to continue using a single set of source files and thought it would be best to simply type the translated sections and subsections just below the original English sections and subsections using modeset. This gives me the option of creating an English case and a Dutch case. Within this two cases I would still apply all sorts of other modes using \startmode and \doifmode. Duplication is unavoidable but it would make sense to try and re-use the existing structural elements such as \startsection \startsubsection \placefigure etc as much as possible. After all, only the title and caption text needs to be translated. I tried doing this but in the case of \startchapter using a \doifmode but the PDF bookmarks text is not correctly generated. You need \enabledirectives[references.bookmarks.preroll] in your setup files to get the correct text in the bookmarks. I also tried placing a figure in between 2 modeset cases but this does not work. See attached .tex file. A alternative to modes is the selector mechanism to choose between different arguments. \setupinteraction[state=start] \placebookmarks \enabledirectives[references.bookmarks.preroll] \defineselector [language] [max=2,n=1] \startmode[en] \setupselector[language][n=1] \stopmode \startmode[nl] \setupselector[language][n=2] \stopmode \starttext \placecontent \section{\select{language}{English section title}{Dutch section title}} \startplacefigure[title=\select{language}{English float title}{Dutch float title}] \externalfigure[dummy] \stopplacefigure \stoptext Finally in the attached PDF below, I noticed that a double space appears depending on the position of the text and curly bracket. Is this intended? Yes because you add spaces between the braces and the text which appear in the output. \startmodeset [...] { ... } [...] { ... } \stopmodeset Questions: * Is the modeset mechanism indeed the best way forward or are there better ways to achieve the desired outcome? * How can I re-use the existing ConTeXt code as much as possible and still have the correct English and Dutch title and caption text for all the structural elements and floats. There are different ways with pros and contras: - But the english and dutch texts for each section in separate files - Use buffers for each paragraph and load the one you need - Store the texts in variables and flush the ones you need - Use XML as input and tags your texts which you can filter - ... 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] using modeset
Dear list members, I write training manuals and use the Modes mechanism a lot to create documents at various competency levels using a single set of source files. So far the manuals have been written in English but now a separate Dutch translation has to be created. It is important that the two manuals are setup similarly so the section/subsection numbers and question numbers are the same in the English manual and the Dutch manual. Note: I do not intend to create a manual that has the English and Dutch text at opposite sides (as can be done using streams) I’m keen to continue using a single set of source files and thought it would be best to simply type the translated sections and subsections just below the original English sections and subsections using modeset. This gives me the option of creating an English case and a Dutch case. Within this two cases I would still apply all sorts of other modes using \startmode and \doifmode. Duplication is unavoidable but it would make sense to try and re-use the existing structural elements such as \startsection \startsubsection \placefigure etc as much as possible. After all, only the title and caption text needs to be translated.I tried doing this but in the case of \startchapter using a \doifmode but the PDF bookmarks text is not correctly generated. I also tried placing a figure in between 2 modeset cases but this does not work.See attached .tex file. Finally in the attached PDF below, I noticed that a double space appears depending on the position of the text and curly bracket. Is this intended? Questions:Is the modeset mechanism indeed the best way forward or are there better ways to achieve the desired outcome?How can I re-use the existing ConTeXt code as much as possible and still have the correct English and Dutch title and caption text for all the structural elements and floats. Kind regards,Jan Willem Flamma test_modeset.pdf Description: Adobe PDF document test_modeset.tex Description: Binary data ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Minimal code for exporting custom tags
On Mon, 18 May 2020, Aditya Mahajan wrote: Thanks! This also helped me find the documentation in hybrid.pdf. Also epub-mkiv.pdf. Not sure why I didn't think of looking there. How do I pass options so that the export is ... (or some variant of that). I thought that \startelement[mycommand][name=whatever] should work (there are some such examples in the texmf tree), but it does not. epub-mkiv.pdf states that I need `\setupexport[properties=yes]`, but that doesn't work either: ``` \setupbackend[export=xml] \setupexport [properties=my] \setelementbackendtag[mycommand] \setelementnature[mycommand][mixed] \starttext \startsection[title={Sample document}] \startparagraph This is a paragraph \stopparagraph \startelement[mycommand][name=whatever] This is mycommand \stopelement \stopsection \stoptext ``` gives ``` http://www.w3.org/1998/Math/MathML;> 1 Sample document This is a paragraph This is mycommand ``` What am I still missing? On a different note, I didn't realize that interfaces.implement could create macros which could be used like this: ``` \unexpanded\def\dostartexport {%\glet\dostartexport\relax \let\currentexport\empty \clf_setupexport align {\exportparameter\c!align}% bodyfont \dimexpr\exportparameter\c!bodyfont\relax width \dimexpr\exportparameter\c!width\relax properties {\exportparameter\c!properties}% hyphen {\exportparameter\c!hyphen}% title {\exportparameter\c!title}% subtitle {\exportparameter\c!subtitle}% author {\exportparameter\c!author}% firstpage {\exportparameter\c!firstpage}% lastpage {\exportparameter\c!lastpage}% svgstyle {\exportparameter\c!svgstyle}% cssfile{\exportparameter\c!cssfile}% file {\exportparameter\c!file}% export {\backendparameter\c!export}% \relax} ``` This nicely gets around TeX's limitation of 9 arguments! Aditya ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Minimal code for exporting custom tags
On Mon, 18 May 2020, Aditya Mahajan wrote: On Mon, 18 May 2020, Hans Hagen wrote: On 5/18/2020 9:09 AM, Aditya Mahajan wrote: Hi, What is needed to enable export of user defined macros? Consider the following example: What am I missing in order to pass user-defined macros to the exporter? you're probably missing documentation + a high level define command This registers (extra) elements: \setelementbackendtag[mycommand] \setelementnature[mycommand][mixed] Thanks! This also helped me find the documentation in hybrid.pdf. How do I pass options so that the export is ... (or some variant of that). I thought that \startelement[mycommand][name=whatever] should work (there are some such examples in the texmf tree), but it does not. ``` \setelementbackendtag[mycommand] \setelementnature[mycommand][mixed] \setupbackend[export=xml, level=0] \starttext \startsection[title={Sample document}] \startparagraph This is a paragraph \stopparagraph \startelement[mycommand][name=whatever] This is mycommand \stopelement \stopsection \stoptext ``` Using `\dostarttagged{mycommand}{whatever}` does export as ``, and looking at the code, I don't see why `\startelement` should behave differently. Thanks, Aditya ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___