Re: [dev-context] [NTG-context] Side figure bug in mkiv?
Hi, While at this topic: I am currently processing streaming XML and I need a way to switch to a font alternative without gobbling up following whitespace. With \bf in plain TeX, I would do this: {\bf{} bla bla} but with \bold (that I am told I should use instead), that doesn't work because the empty group becomes the argument. I now have {\bold\relax{} bla bla} but that is quite silly. Is there some official command to ‘fix' this issue?
On 19 Jul 2019, at 13:52, Wolfgang Schuster
wrote: Henri Menke schrieb am 18.07.2019 um 23:29:
For what it's worth, the MKIV way to switch to bold face is \bold{text} instead of {\bf text} but it also doesn't fix your problem because neither of the two start a new paragraph before the first letter and therefore \the\everypar is still inside a group. The normal switch to use bold style is \bf and \bold{...} (or {\bold ...}) is only a alternative switch which uses \bf to change the font. The same applies to \italic{...}, \mono{...} etc.
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 ___________________________________________________________________________________
Taco Hoekwater Elvenkind BV
On 19 Jul 2019, at 16:03, Alan Braslau
wrote: On Fri, 19 Jul 2019 14:39:11 +0200 Taco Hoekwater
wrote: but that is quite silly. Is there some official command to ‘fix' this issue?
\bold{ bla bla}
Because of the streaming nature of xml processing via lua, that is not really an option for me, but even if I could make that work for me, I do not like having to write context(‘{‘) ... context(‘}‘) in a cld file. To me, that feels like it sort of defeats the purpose. I can easily define a command, of course, like this: \def\switchalternativeonly[#1]{\getvalue{#1}\relax} and then context.start() context.switchalternativeonly({myvariable}) lxml.flush(t) context.stop() I was just wondering if there was a nice pre-cooked solution somewhere. Best wishes, Taco
Taco Hoekwater schrieb am 19.07.2019 um 16:20:
On 19 Jul 2019, at 16:03, Alan Braslau
wrote: On Fri, 19 Jul 2019 14:39:11 +0200 Taco Hoekwater
wrote: but that is quite silly. Is there some official command to ‘fix' this issue? \bold{ bla bla} Because of the streaming nature of xml processing via lua, that is not really an option for me, but even if I could make that work for me, I do not like having to write
context(‘{‘) ... context(‘}‘)
in a cld file. To me, that feels like it sort of defeats the purpose.
I can easily define a command, of course, like this:
\def\switchalternativeonly[#1]{\getvalue{#1}\relax}
I had the same idea because we have a \switchstyleonly command. \unexpanded\def\switchalternativeonly[#1]% {\font_helpers_set_current_font_alternative{#1}}
and then
context.start() context.switchalternativeonly({myvariable}) lxml.flush(t) context.stop()
I was just wondering if there was a nice pre-cooked solution somewhere.
When you don't mind using bold, italic etc. to change the font style. \starttext xx {\applyalternativestyle{bold} xx} xx \stoptext Wolfgang
participants (3)
-
Alan Braslau
-
Taco Hoekwater
-
Wolfgang Schuster