[NTG-context] How do I get an empty line in a \framed[align=flushleft]{} item?

Gerben Wierda gerben.wierda at rna.nl
Fri May 1 10:21:29 CEST 2020



> On 1 May 2020, at 09:38, Hans Hagen <j.hagen at xs4all.nl> wrote:
> 
> On 5/1/2020 1:44 AM, Gerben Wierda wrote:
>>    { ‘\n', ‘\\strut\\\\' },
> often a \zwj or \zwno also works ok (has zero dimensions, contraty to strut; you could also try \crlf

I tried \crlf{} and that worked too (the “{}” because I do not know what comes after even if I think any whitespace is eaten and to influence any catcode trickery, just feels it is more robust than a space).

Hans, an additional question about lmtx’s XML interface. As I want the TeX special characters to be able to be part of a label, I replace all of them. That works. But what if I would like a way to introduce TeX commands again by using some other UTF8 character, would there be a character that curvies the pass through lmtx, can be used in a lua table so that I can  (in a preferred order) get unescaped characters passed that flow?

E.g. code a \ as some weird UTF8 character in the XML file, and in that table I use

  local rep = lpeg.replacer {
   { '\n', '\\crlf{}' },
   { '{', '{\\textbraceleft}' },
   { '}', '{\\textbraceright}' },
   { '#', '{\\texthash}' },
   { '$', '{\\textdollar}' },
   { '&', '{\\textampersand}' },
   { '%', '{\\textpercent}' },
   { '\\','{\\textbackslash}' },
   { '|', '{\\textbar}' },
   { '_', '{\\textunderscore}' },
   { '~', '{\\textasciitilde}' },
   { '^', '{\\textasciicircum}' },
   { '"', "\"&ditto&\"" },
  }

code it back to a \ ? E.g. something like

   { ‘\U{XXX}', '\' },


> 
> Hans
> 
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20200501/6f7b53b2/attachment-0001.htm>


More information about the ntg-context mailing list