[NTG-context] uservariables in heads and lists

Henning Hraban Ramm texml at fiee.net
Sun Jan 14 17:24:31 CET 2018


Hi, it’s been a while...

For a scientific magazine I need subtitles in the margin and authors as well as subtitles in my ToC. I didn’t yet try the latter, since I got stuck with the first.

Here’s my complete, not really working example:

"""
\usemodule[visual]
\setuplayout[
    backspace=21mm,
    topspace=12mm,
    width=117mm,
    height=270mm,
    header=15mm,
    headerdistance=2mm,
    footer=3mm,
    footerdistance=4mm,
    rightmargindistance=5mm,
    rightmargin=55mm,
    leftmargin=0mm,
    grid=yes,
    location=doublesided
]

\define[2]\ChapterCmd{%
  {\bfa #2}
  {\inouter{\structureuservariable{subtitle}}}
}
\setuphead[chapter][
    page=right,
    command=\ChapterCmd,
    ]

\starttext
%\showlayout

\starttitle[title={Content}][subtitle={}]
%\placelist[chapter][criterium=all]
\stoptitle

\startchapter
  [title=My Title,][% is this necessary?
  subtitle=My Subtitle,
  author=Me and I]

\fakewords{100}{200}
\stopchapter

\stoptext
"""

Problems:
(1) The subtitle is not in the margin as defined by \setuplayout, but beside the chapter title.

(2) \starttitle throws 
...xmf/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:823: table index is nil
stack traceback:
	...xmf/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:823: in function 'setprop'
	...xmf/tex/texmf-context/tex/context/base/mkiv/typo-mar.lua:207: in function <...xmf/tex/texmf-context/tex/context/base/mkiv/typo-mar.lua:204>

What does that mean?

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD



More information about the ntg-context mailing list