ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
Cc: NTG-Context ConTeXt users <ntg-context@ntg.nl>
Subject: Re: bizarre bug in xml
Date: Sat, 21 Nov 2020 11:04:18 +0100	[thread overview]
Message-ID: <d8e0a6e2-55f7-bd1d-19c5-eb9673335f5f@gmail.com> (raw)
In-Reply-To: <b5a7ee4f-2f0e-c60b-ea39-0de4c0bfef79@uni-bonn.de>

Thomas A. Schmitz schrieb am 20.11.2020 um 22:57:
>
> On 11/20/20 10:52 PM, Wolfgang Schuster wrote:
>> Optional arguments (e.g. plus/minus values for \hskip) for commands 
>> are handled different in LMTX but it was always recommended to add 
>> \relax after the last value.
>
> Thank you Wolfgang, that makes the file indeed compile again! Any 
> explanation for the strange behavior of the error?

In LMTX the order of the plus and minus values of \hskip can be written 
in any order and it's even possible to set them multiple times (try the 
example below with LuaTeX and LMTX).

To check whether a stretch or shrink value is set LMTX takes a look at 
the next character (p, P, m or M) before it makes a decision, when you 
have now a word after \hskip which start with one of these characters 
(e.g. Materiam) you trigger the scanner which fails because it didn't 
find a keyword. To avoid such problems always add \relax after the last 
value of \hskip, this is even explained in one of the exercises in the 
TeXbook.

\starttext

a\hskip 1cm plus 5mm minus 5mm b

a\hskip 1cm minus 5mm plus 5mm b

a\hskip 1cm pLuS 5mm MiNuS 5mm b

a\hskip 1cm plus 5mm minus 5mm plus 1cm b

\stoptext

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
___________________________________________________________________________________

  parent reply	other threads:[~2020-11-21 10:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-20 21:44 Thomas A. Schmitz
2020-11-20 21:52 ` Wolfgang Schuster
2020-11-21  1:09   ` Pablo Rodriguez
2020-11-21  9:35     ` Hans Hagen
     [not found]   ` <b5a7ee4f-2f0e-c60b-ea39-0de4c0bfef79@uni-bonn.de>
2020-11-21 10:04     ` Wolfgang Schuster [this message]
2020-11-21 10:13       ` Thomas A. Schmitz

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=d8e0a6e2-55f7-bd1d-19c5-eb9673335f5f@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=thomas.schmitz@uni-bonn.de \
    /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).