another surprising change (line break in TOC)
Hi, the good old command for breaking list entries (eg. headings in the TOC) like this ... \startLevelOne[ title={Das Krankenhaus als Leistungserbringer in der GKV}, marking={Das Krankenhaus als Leistungserbringer in der GKV}, list={Das Krankenhaus\\als Leistungserbringer in der GKV}, bookmark={Das Krankenhaus als Leistungserbringer in der GKV}] ... pop up this error message: ! Missing } inserted. system > tex > error on line 1 in file TOCDateien/TOCtocDatei.tex: Missing ... ... <inserted text> } <to be read again> \endgroup \\->\endgroup \par \doalignline {\hss }{\hss }\begingroup l.1 Das Krankenhaus\\ als Leistungserbringer in der GKV \structurelistgenerictitle ...\currentlistindex )} \dostoptagged \063>MyListItemIT ...]{\TOCstyleBF \midaligned {#2 }}\hfill \tf #3 ... l.86 \placeTOCtoc[criterium=text,interaction=all] ? Process aborted Is this a bug, or do we have an other syntax today? Steffen
Am 16.01.2012 um 15:21 schrieb Steffen Wolfrum:
Hi,
the good old command for breaking list entries (eg. headings in the TOC) like this ...
\startLevelOne[ title={Das Krankenhaus als Leistungserbringer in der GKV}, marking={Das Krankenhaus als Leistungserbringer in der GKV}, list={Das Krankenhaus\\als Leistungserbringer in der GKV}, bookmark={Das Krankenhaus als Leistungserbringer in der GKV}]
... pop up this error message:
! Missing } inserted.
system > tex > error on line 1 in file TOCDateien/TOCtocDatei.tex: Missing ...
...
<inserted text> } <to be read again> \endgroup \\->\endgroup \par \doalignline {\hss }{\hss }\begingroup l.1 Das Krankenhaus\\ als Leistungserbringer in der GKV \structurelistgenerictitle ...\currentlistindex )} \dostoptagged \063>MyListItemIT ...]{\TOCstyleBF \midaligned {#2 }}\hfill \tf #3 ... l.86 \placeTOCtoc[criterium=text,interaction=all]
? Process aborted
Is this a bug, or do we have an other syntax today?
Send a example where we can see how the list entries are formatted. Wolfgang
Send a example where we can see how the list entries are formatted.
Wolfgang
Sorry, no example now: I am just about to leave the desk. In the TUC file it looks like this: { ["metadata"]=49, ["numberdata"]=48, ["references"]={ ["block"]="bodypart", ["component"]="chap_01", ["internal"]=25, ["realpage"]=15, ["referenceprefix"]="chap_01", ["section"]=2, ["tag"]="?", }, ["titledata"]={ ["bookmark"]="Das Krankenhaus als Leistungserbringer in der GKV", ["label"]="chapter", ["marking"]="Das Krankenhaus als Leistungserbringer in der GKV", ["title"]="Das Krankenhaus\\\\als Leistungserbringer in der GKV", }, } HTH, Steffen
On 16-1-2012 15:39, Steffen Wolfrum wrote:
Send a example where we can see how the list entries are formatted.
Wolfgang
Sorry, no example now: I am just about to leave the desk.
no example == no answer Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 16.01.2012 um 17:18 schrieb Hans Hagen:
On 16-1-2012 15:39, Steffen Wolfrum wrote:
Send a example where we can see how the list entries are formatted.
Wolfgang
Sorry, no example now: I am just about to leave the desk.
Back again ... Here is the corresponding minimal example: \definelistplacement[MyListItemIT][none]#1#2#3% {\hfill\kern-1em\it#1\hfill\strut\crlf\strut\hfill\hphantom{\tf#3}\framedtext[frame=off,offset=overlay]{\bf\midaligned{#2}}\hfill\tf#3} \setuplist[chapter] [alternative=MyListItemIT] \definecombinedlist[TOCtoc] [chapter] \setupcombinedlist[TOCtoc] [aligntitle=yes,criterium=text,interaction=all] \starttext \placeTOCtoc[criterium=text,interaction=all] \startchapter[ title={Das Krankenhaus als Leistungserbringer in der GKV}, marking={Das Krankenhaus als Leistungserbringer in der GKV}, list={Das Krankenhaus\\als Leistungserbringer in der GKV}, bookmark={Das Krankenhaus als Leistungserbringer in der GKV}] \stopchapter \stoptext Best, Steffen
On Tue, Jan 17, 2012 at 11:37 AM, Steffen Wolfrum
Am 16.01.2012 um 17:18 schrieb Hans Hagen:
On 16-1-2012 15:39, Steffen Wolfrum wrote:
Send a example where we can see how the list entries are formatted.
Wolfgang
Sorry, no example now: I am just about to leave the desk.
Back again ... Here is the corresponding minimal example:
\definelistplacement[MyListItemIT][none]#1#2#3%
{\hfill\kern-1em\it#1\hfill\strut\crlf\strut\hfill\hphantom{\tf#3}\framedtext[frame=off,offset=overlay]{\bf\midaligned{#2}}\hfill\tf#3}
Probably a bug, but this is ok \definelistplacement[MyListItemIT][none]#1#2#3% {\hfill\kern-1em\it#1% \hfill\strut\crlf\strut\hfill\hphantom{\tf#3}% \framedtext[frame=off,offset=overlay,align=middle,style=bold]% {#2}% \hfill\tf#3 } -- luigi
Am 17.01.2012 um 12:19 schrieb luigi scarso:
Probably a bug, but this is ok \definelistplacement[MyListItemIT][none]#1#2#3% {\hfill\kern-1em\it#1% \hfill\strut\crlf\strut\hfill\hphantom{\tf#3}% \framedtext[frame=off,offset=overlay,align=middle,style=bold]% {#2}% \hfill\tf#3 }
Not really ok. That's a pitfall with minimal examples ... "the devil is in the details" ;o) For getting it minimal I wrote \bf, but in the original file it is used as a bold style with a certain size and a certain interlineskip: \TOCstyleBF And this interlineskip is ignored in your solution, test the following please: \def\TOCstyleBF{\switchtobodyfont[9pt]\bf\setupinterlinespace[line={40pt}]} \definelistplacement[MyListItemIT][none]#1#2#3% {\hfill\kern-1em\it#1\hfill\strut\crlf\strut\hfill\hphantom{\tf#3}\framedtext[frame=off,offset=overlay,align=middle,style=TOCstyleBF]{#2}\hfill\tf#3} % here the interlinespace is ignored % {\hfill\kern-1em\it#1\hfill\strut\crlf\strut\hfill\hphantom{\tf#3}\framedtext[frame=off,offset=overlay]{\TOCstyleBF\midaligned{#2}}\hfill\tf#3} % here the interlinespace worked \setuplist[chapter] [alternative=MyListItemIT] \definecombinedlist[TOCtoc] [chapter] \setupcombinedlist[TOCtoc] [aligntitle=yes,criterium=text,interaction=all] \starttext \placeTOCtoc[criterium=text,interaction=all] \startchapter[ title={Das Krankenhaus als Leistungserbringer in der GKV}, marking={Das Krankenhaus als Leistungserbringer in der GKV}, list={Das Krankenhaus\\als Leistungserbringer in der GKV}, bookmark={Das Krankenhaus als Leistungserbringer in der GKV}] \stopchapter \stoptext ------- Steffen
Am 17.01.2012 um 13:14 schrieb Steffen Wolfrum:
Am 17.01.2012 um 12:19 schrieb luigi scarso:
Probably a bug, but this is ok \definelistplacement[MyListItemIT][none]#1#2#3% {\hfill\kern-1em\it#1% \hfill\strut\crlf\strut\hfill\hphantom{\tf#3}% \framedtext[frame=off,offset=overlay,align=middle,style=bold]% {#2}% \hfill\tf#3 }
Not really ok. That's a pitfall with minimal examples ... "the devil is in the details" ;o) For getting it minimal I wrote \bf, but in the original file it is used as a bold style with a certain size and a certain interlineskip: \TOCstyleBF
And this interlineskip is ignored in your solution, test the following please:
\def\TOCstyleBF{\switchtobodyfont[9pt]\bf\setupinterlinespace[line={40pt}]}
\definelistplacement[MyListItemIT][none]#1#2#3% {\hfill\kern-1em\it#1\hfill\strut\crlf\strut\hfill\hphantom{\tf#3}\framedtext[frame=off,offset=overlay,align=middle,style=TOCstyleBF]{#2}\hfill\tf#3} % here the interlinespace is ignored % {\hfill\kern-1em\it#1\hfill\strut\crlf\strut\hfill\hphantom{\tf#3}\framedtext[frame=off,offset=overlay]{\TOCstyleBF\midaligned{#2}}\hfill\tf#3} % here the interlinespace worked
You should try to make your code more readable. \definelistplacement[MyListItemIT][none]#1#2#3% {\maxaligned\bgroup \rlap{\it#1}% \framed[frame=off,align=middle,location=bottom,width=broad,foregroundstyle=\TOCstyleBF]{#2}% \llap{\tf#3}% \egroup} Wolfgang
Am 17.01.2012 um 23:41 schrieb Wolfgang Schuster:
You should try to make your code more readable.
\definelistplacement[MyListItemIT][none]#1#2#3% {\maxaligned\bgroup \rlap{\it#1}% \framed[frame=off,align=middle,location=bottom,width=broad,foregroundstyle=\TOCstyleBF]{#2}% \llap{\tf#3}% \egroup}
I did not know "\maxaligned" Steffen
On Wed, Jan 18, 2012 at 7:25 AM, Steffen Wolfrum
Am 17.01.2012 um 23:41 schrieb Wolfgang Schuster:
You should try to make your code more readable.
\definelistplacement[MyListItemIT][none]#1#2#3% {\maxaligned\bgroup \rlap{\it#1}%
\framed[frame=off,align=middle,location=bottom,width=broad,foregroundstyle=\TOCstyleBF]{#2}%
\llap{\tf#3}% \egroup}
I did not know "\maxaligned"
even me --- it's normal, it's hard to be in sync with all the changes of
the source. I suspect that it's an internal macro, can even change. Wolfgang often uses internal macro, gaining speed but loosing compatibility. As general rule (another...) in my stylesheets I try to use TeX macros and ConTeXt switches (i.e. key=val) especially if they are related to long term projects. -- luigi
On Wed, Jan 18, 2012 at 8:30 AM, luigi scarso
Wolfgang often uses internal macro, gaining speed but loosing compatibility.
Uh uh it sounds offensive (there is the fog here outside, but maybe
something is still in my head). Just to be clear: I read *all* the Wolfgang answers because they help me to be in sync with the source --- in an automatic workflow speed is a concern. Sorry for the noise. -- luigi
Am 18.01.2012 um 08:30 schrieb luigi scarso:
On Wed, Jan 18, 2012 at 7:25 AM, Steffen Wolfrum
wrote: Am 17.01.2012 um 23:41 schrieb Wolfgang Schuster:
You should try to make your code more readable.
\definelistplacement[MyListItemIT][none]#1#2#3% {\maxaligned\bgroup \rlap{\it#1}% \framed[frame=off,align=middle,location=bottom,width=broad,foregroundstyle=\TOCstyleBF]{#2}% \llap{\tf#3}% \egroup}
I did not know "\maxaligned"
even me --- it's normal, it's hard to be in sync with all the changes of the source. I suspect that it's an internal macro, can even change.
\maxaligned is the ConTeXt version of "\hbox to \hsize" or plain TeX’s "\line" command.
Wolfgang often uses internal macro, gaining speed but loosing compatibility.
That’s not true, since a while I use only high level commands and sometimes less known or undocumented macros. Wolfgang
On 18-1-2012 08:30, luigi scarso wrote:
On Wed, Jan 18, 2012 at 7:25 AM, Steffen Wolfrum
wrote: Am 17.01.2012 um 23:41 schrieb Wolfgang Schuster:
You should try to make your code more readable.
\definelistplacement[MyListItemIT][none]#1#2#3% {\maxaligned\bgroup \rlap{\it#1}%
\framed[frame=off,align=middle,location=bottom,width=broad,foregroundstyle=\TOCstyleBF]{#2}%
\llap{\tf#3}% \egroup}
I did not know "\maxaligned"
even me --- it's normal, it's hard to be in sync with all the changes of the source. I suspect that it's an internal macro, can even change. Wolfgang often uses internal macro, gaining speed but loosing compatibility. As general rule (another...) in my stylesheets I try to use TeX macros and ConTeXt switches (i.e. key=val) especially if they are related to long term projects.
Actually, Wolfgang seldom uses internal macros. Macros like \maxaligned are helpers that are used to build regular commands, so they're part of the infrastructure and Wolfgang knows the context internals amazingly well. There are some obscure helpers that might dissappear but most are there for a reason and will stay. So, we have: commands: offcial interface helpers : more low level, no key/values etc hidden : not meant to be used unless on your own risk Btw, \rlap and \llap are quite standard in a tex system. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Tue, Jan 17, 2012 at 1:14 PM, Steffen Wolfrum
And this interlineskip is ignored in your solution, test the following please:
\def\TOCstyleBF{\switchtobodyfont[9pt]\bf\setupinterlinespace[line={40pt}]}
\definelistplacement[MyListItemIT][none]#1#2#3%
{\hfill\kern-1em\it#1\hfill\strut\crlf\strut\hfill\hphantom{\tf#3}\framedtext[frame=off,offset=overlay,align=middle,style=TOCstyleBF]{#2}\hfill\tf#3} % here the interlinespace is ignored % {\hfill\kern-1em\it#1\hfill\strut\crlf\strut\hfill\hphantom{\tf#3}\framedtext[frame=off,offset=overlay]{\TOCstyleBF\midaligned{#2}}\hfill\tf#3} % here the interlinespace worked
\setuplist[chapter] [alternative=MyListItemIT]
\definecombinedlist[TOCtoc] [chapter]
\setupcombinedlist[TOCtoc] [aligntitle=yes,criterium=text,interaction=all]
\starttext
\placeTOCtoc[criterium=text,interaction=all]
\startchapter[ title={Das Krankenhaus als Leistungserbringer in der GKV}, marking={Das Krankenhaus als Leistungserbringer in der GKV}, list={Das Krankenhaus\\als Leistungserbringer in der GKV}, bookmark={Das Krankenhaus als Leistungserbringer in der GKV}]
\stopchapter
\stoptext
Now the above example it's ok for me with # context --version mtx-context | main context file: /opt/luatex/standalone/tex/texmf-context/tex/context/base/context.mkiv mtx-context | current version: 2012.01.16 18:33 -- luigi
participants (4)
-
Hans Hagen
-
luigi scarso
-
Steffen Wolfrum
-
Wolfgang Schuster