* LMTX deeptextcommand issue
@ 2019-04-02 18:41 Jan Tosovsky
2019-04-02 21:13 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Jan Tosovsky @ 2019-04-02 18:41 UTC (permalink / raw)
To: mailing list for ConTeXt users
Dear All,
my document ends with the index
\startbackmatter
\chapter{Rejstřík jmenný}
\start
\switchtobodyfont[8pt]
\placeindexname
\stop
\stopbackmatter
\startbackmatter
\chapter{Rejstřík věcný}
\start
\switchtobodyfont[8pt]
\placeindexsubject
\stop
\stopbackmatter
At the beginning there is a condition for one word (kind of manual column
balancing) - but according to the log, see below, this seems to be an issue:
\newconditional\IndexState
\define[1]\IndexInternalCommand
{\doifelse{#1}{Dolsko}{\global\settrue\IndexState}{\global\setfalse\IndexSta
te}#1}
\define[1]\IndexCommand
{\setfalse\IndexState
\setbox\scratchbox\hbox{#1}%
\ifconditional\IndexState
\column
\fi
\box\nextbox}
\defineregister[indexname][indexnames]
\setupregister[indexname][command=\Word, textcommand=\IndexCommand,
deeptextcommand=\IndexInternalCommand]
\defineregister[indexsubject][indexsubjects]
\setupregister[indexsubject][command=\Word]
\setupheadtext[indexname=Rejstřík jmenný]
\setupheadtext[indexsubject=Rejstřík věcný]
This worked in luatex 1.0.1, but in LMTX I am getting:
structures > begin of sectionblock 'backpart'
structure > sectioning > chapter @ level 2 : 0.1 -> Rejstřík jmenný
fonts > defining > font 'palab', feature 'locl', script 'latn', no
language 'dflt'
tex error > tex error on line 25 in file
D:/context-lmtx/tex/texmf-context/tex/context/base/mkiv/page-run.mkiv: ?
<argument> [internal expandable lua function call]
\IndexInternalCommand ...\setfalse \IndexState }#1
\IndexCommand ...ate \setbox \scratchbox \hbox {#1
}\ifconditional
\IndexStat...
\doapplyregisterentrycommand ...extcommand {#2}}}}
\dostoptagged
\registerentry ...plyregisterentrycommand {#2}{#5}
\fi \else \let
\currentreg...
l.25 }
...l.11633 \stop
15
16 \registerctxluafile{page-run}{}
17
18 \unprotect
19
20 \unexpanded\gdef\showprint{\dotripleempty\page_layouts_show_print}
21
22 \gdef\page_layouts_show_print[#1][#2][#3]% only english
23 {\setbuffer[crap]%
24 \unprotect
25 >> \definepapersize[X][\c!width=4em, \c!height=6em]
26 \definepapersize[Y][\c!width=12em,\c!height=14em]
27 \setuppapersize[X,#1][Y,#2]
28 \setuplayout[#3]
29 \setuplayout[\v!page]
30 \framed
31 [\c!offset=\v!overlay,\c!strut=\v!no,
32 \c!width=\paperwidth,\c!height=\paperheight]
33 {\ss ABC\par DEF}%
34 \protect
35 \endbuffer
When I've seen that 'crap' and weird page dimensions, I thought it is part
of the April fool, like all that LMTX announcement.
This issue is not urgent, I was just curious how different the output is.
Thanks,
Jan
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: LMTX deeptextcommand issue
2019-04-02 18:41 LMTX deeptextcommand issue Jan Tosovsky
@ 2019-04-02 21:13 ` Hans Hagen
2019-04-02 22:35 ` Jan Tosovsky
0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2019-04-02 21:13 UTC (permalink / raw)
To: ntg-context@ntg.nl >> mailing list for ConTeXt users
On 4/2/2019 8:41 PM, Jan Tosovsky wrote:
> Dear All,
>
> my document ends with the index
>
> \startbackmatter
> \chapter{Rejstřík jmenný}
> \start
> \switchtobodyfont[8pt]
> \placeindexname
> \stop
> \stopbackmatter
> \startbackmatter
> \chapter{Rejstřík věcný}
> \start
> \switchtobodyfont[8pt]
> \placeindexsubject
> \stop
> \stopbackmatter
>
> At the beginning there is a condition for one word (kind of manual column
> balancing) - but according to the log, see below, this seems to be an issue:
> \newconditional\IndexState
> \define[1]\IndexInternalCommand
>
> {\doifelse{#1}{Dolsko}{\global\settrue\IndexState}{\global\setfalse\IndexSta
> te}#1}
>
> \define[1]\IndexCommand
> {\setfalse\IndexState
> \setbox\scratchbox\hbox{#1}%
> \ifconditional\IndexState
> \column
> \fi
> \box\nextbox}
does
\unexpanded\def\IndexCommand#1%
{....
work?
> \defineregister[indexname][indexnames]
> \setupregister[indexname][command=\Word, textcommand=\IndexCommand,
> deeptextcommand=\IndexInternalCommand]
>
> \defineregister[indexsubject][indexsubjects]
> \setupregister[indexsubject][command=\Word]
> \setupheadtext[indexname=Rejstřík jmenný]
> \setupheadtext[indexsubject=Rejstřík věcný]
>
>
> This worked in luatex 1.0.1, but in LMTX I am getting:
>
> structures > begin of sectionblock 'backpart'
> structure > sectioning > chapter @ level 2 : 0.1 -> Rejstřík jmenný
> fonts > defining > font 'palab', feature 'locl', script 'latn', no
> language 'dflt'
>
> tex error > tex error on line 25 in file
> D:/context-lmtx/tex/texmf-context/tex/context/base/mkiv/page-run.mkiv: ?
>
> <argument> [internal expandable lua function call]
>
> \IndexInternalCommand ...\setfalse \IndexState }#1
>
> \IndexCommand ...ate \setbox \scratchbox \hbox {#1
> }\ifconditional
> \IndexStat...
> \doapplyregisterentrycommand ...extcommand {#2}}}}
> \dostoptagged
> \registerentry ...plyregisterentrycommand {#2}{#5}
> \fi \else \let
> \currentreg...
> l.25 }
>
> ...l.11633 \stop
>
>
> 15
> 16 \registerctxluafile{page-run}{}
> 17
> 18 \unprotect
> 19
> 20 \unexpanded\gdef\showprint{\dotripleempty\page_layouts_show_print}
> 21
> 22 \gdef\page_layouts_show_print[#1][#2][#3]% only english
> 23 {\setbuffer[crap]%
> 24 \unprotect
> 25 >> \definepapersize[X][\c!width=4em, \c!height=6em]
> 26 \definepapersize[Y][\c!width=12em,\c!height=14em]
> 27 \setuppapersize[X,#1][Y,#2]
> 28 \setuplayout[#3]
> 29 \setuplayout[\v!page]
> 30 \framed
> 31 [\c!offset=\v!overlay,\c!strut=\v!no,
> 32 \c!width=\paperwidth,\c!height=\paperheight]
> 33 {\ss ABC\par DEF}%
> 34 \protect
> 35 \endbuffer
>
>
> When I've seen that 'crap' and weird page dimensions, I thought it is part
> of the April fool, like all that LMTX announcement.
>
> This issue is not urgent, I was just curious how different the output is.
>
> Thanks,
>
> Jan
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : http://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
>
--
-----------------------------------------------------------------
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: LMTX deeptextcommand issue
2019-04-02 21:13 ` Hans Hagen
@ 2019-04-02 22:35 ` Jan Tosovsky
2019-04-02 22:42 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Jan Tosovsky @ 2019-04-02 22:35 UTC (permalink / raw)
To: 'mailing list for ConTeXt users'
On 2019-04-02 Hans Hagen wrote:
> On 4/2/2019 8:41 PM, Jan Tosovsky wrote:
> >
> > my document ends with the index
> >
> > \startbackmatter
> > \chapter{Rejstřík jmenný}
> > \start
> > \switchtobodyfont[8pt]
> > \placeindexname
> > \stop
> > \stopbackmatter
> > \startbackmatter
> > \chapter{Rejstřík věcný}
> > \start
> > \switchtobodyfont[8pt]
> > \placeindexsubject
> > \stop
> > \stopbackmatter
> >
> > At the beginning there is a condition for one word (kind of manual column
> > balancing) - but according to the log, see below, this seems to be an issue:
> > \newconditional\IndexState
> > \define[1]\IndexInternalCommand
> >
> >
> {\doifelse{#1}{Dolsko}{\global\settrue\IndexState}{\global\setfalse\IndexSt
> a
> > te}#1}
> >
> > \define[1]\IndexCommand
> > {\setfalse\IndexState
> > \setbox\scratchbox\hbox{#1}%
> > \ifconditional\IndexState
> > \column
> > \fi
> > \box\nextbox}
>
> does
>
> \unexpanded\def\IndexCommand#1%
> {....
>
> work?
I've modified that block this way:
\newconditional\IndexState
%\define[1]\IndexInternalCommand
\unexpanded\def\IndexInternalCommand#1%
{\doifelse{#1}{Dolsko}{\global\settrue\IndexState}{\global\setfalse\IndexState}#1}
%\define[1]\IndexCommand
\unexpanded\def\IndexCommand#1%
{\setfalse\IndexState
\setbox\scratchbox\hbox{#1}%
\ifconditional\IndexState
\column
\fi
\box\nextbox}
Is it what you propose? If so, I am still getting the same error.
Jan
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-02 22:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-02 18:41 LMTX deeptextcommand issue Jan Tosovsky
2019-04-02 21:13 ` Hans Hagen
2019-04-02 22:35 ` Jan Tosovsky
2019-04-02 22:42 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).