ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Gerben Wierda <gerben.wierda@rna.nl>
To: Hans Hagen <j.hagen@xs4all.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: How do I get an empty line in a \framed[align=flushleft]{} item?
Date: Fri, 1 May 2020 10:21:29 +0200	[thread overview]
Message-ID: <79A023A5-FE16-40E8-8A6C-58D7D5CB3256@rna.nl> (raw)
In-Reply-To: <876872be-7536-1c4c-25ac-66e551d89bdd@xs4all.nl>


[-- Attachment #1.1: Type: text/plain, Size: 1892 bytes --]



> On 1 May 2020, at 09:38, Hans Hagen <j.hagen@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
> -----------------------------------------------------------------


[-- Attachment #1.2: Type: text/html, Size: 4906 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2020-05-01  8:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30 20:47 Gerben Wierda
2020-04-30 20:51 ` Henning Hraban Ramm
2020-04-30 23:07   ` Gerben Wierda
2020-04-30 20:54 ` Wolfgang Schuster
2020-04-30 21:26   ` Gerben Wierda
2020-04-30 23:44   ` Gerben Wierda
2020-05-01  7:38     ` Hans Hagen
2020-05-01  8:21       ` Gerben Wierda [this message]
2020-05-01 11:28         ` Hans Hagen
2020-05-01 11:45           ` Gerben Wierda
2020-05-01 11:58             ` Hans Hagen
2020-05-01 12:00             ` Hans Hagen

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=79A023A5-FE16-40E8-8A6C-58D7D5CB3256@rna.nl \
    --to=gerben.wierda@rna.nl \
    --cc=j.hagen@xs4all.nl \
    --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).