From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
Gerion Entrup <gerion.entrup@flump.de>
Subject: [NTG-context] Re: Combine \setupdelimitedtext with an author (define custom variable?)
Date: Mon, 17 Jun 2024 21:20:19 +0200 [thread overview]
Message-ID: <b75dde1e-f207-78ad-1475-e5dacb7bfabb@gmail.com> (raw)
In-Reply-To: <2924302.TLnPLrj5Ze@falbala>
Gerion Entrup schrieb am 17.06.2024 um 13:04:
> Am Donnerstag, 6. Juni 2024, 16:34:03 MESZ schrieb Wolfgang Schuster:
>> [...]
>>
>> Wolfgang
>>
>
> I tried to combine this with the code of the mail thread: "setuphead in connection with the command argument" but had not luck.
> ConTeXt always stops with:
> ```
> close source > level 1, order 2, name './mwe.tex'
> tex error > runaway error: end of file encountered
> mtx-context | fatal error: return code: 1
> ```
>
> Here is the MWE:
> ```
> [...]
>
> \startsetups[my_chapter]
> \startlocalheadsetup
> \startframed[chapter_frame]
> \blank[2cm]
> \startfont[Serif sa 8]
> \color[darkgray]{\headnumbercontent}
> \stopfont
> \blank[5mm]
> \startfont[SerifBold sa 2]
> \color[m-indigo-800]{\headtextcontent}
> \stopfont
> \blank[1cm]
> \startfont[SerifBold sa 1.5]
> \color[m-indigo-800]{\structureuservariable{subtitle}}
> \stopfont
> \blank[3cm]
> \startextract[author={\structureuservariable{quoteauthor}}]
> \structureuservariable{quote}
> \stopextract
> \stopframed
> \stoplocalheadsetup
> \stopsetups
The userdata environment uses the buffer mechanism of Context which has
a few limitations where you can use it, e.g. putting the environment in
the arguments of other commands (like the setup-environment above)
fails. One way to avoid this is to replace the \startextract ...
\stopextract in this case with the code for the quoted text, another way
is to put all content in a buffer and just load the buffer in the
setups-environment.
\startbuffer[my_chapter]
\startlocalheadsetup
\startframed[chapter_frame]
...
\stopframed
\stoplocalheadsetup
\stopbuffer
\startsetups[my_chapter]
\getbuffer[my_chapter]
\stopsetups
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2024-06-17 19:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 10:30 [NTG-context] " Gerion Entrup
2024-06-06 11:51 ` [NTG-context] " Hans Hagen via ntg-context
2024-06-06 22:36 ` Gerion Entrup
2024-06-06 14:34 ` Wolfgang Schuster
2024-06-06 14:50 ` Hans Hagen via ntg-context
2024-06-06 20:07 ` Gerion Entrup
2024-06-17 11:04 ` Gerion Entrup
2024-06-17 19:20 ` Wolfgang Schuster [this message]
2024-06-18 7:57 ` Gerion Entrup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b75dde1e-f207-78ad-1475-e5dacb7bfabb@gmail.com \
--to=wolfgang.schuster.lists@gmail.com \
--cc=gerion.entrup@flump.de \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).