ConTeXt writer: use braces, not start/stop, for inline language tags.
This prevents unwanted gobbling of spaces.
This commit is contained in:
parent
c4e198c84d
commit
8683cb596d
2 changed files with 8 additions and 9 deletions
|
@ -470,8 +470,8 @@ inlineToConTeXt (Span (_,_,kvs) ils) = do
|
|||
Just "ltr" -> braces $ "\\lefttoright " <> txt
|
||||
_ -> txt
|
||||
wrapLang txt = case mblang of
|
||||
Just lng -> "\\start\\language[" <> literal lng
|
||||
<> "]" <> txt <> "\\stop "
|
||||
Just lng -> braces ("\\language" <>
|
||||
brackets (literal lng) <> txt)
|
||||
Nothing -> txt
|
||||
(wrapLang . wrapDir) <$> inlineListToConTeXt ils
|
||||
|
||||
|
|
|
@ -98,10 +98,10 @@ German div contents
|
|||
|
||||
and more text.
|
||||
|
||||
Next paragraph with a \start\language[en-gb]British span\stop and a
|
||||
word-that-includesa\start\language[de-ch]Swiss German span\stop right?
|
||||
Next paragraph with a {\language[en-gb]British span} and a
|
||||
word-that-includesa{\language[de-ch]Swiss German span}right?
|
||||
|
||||
Some \start\language[es]Spanish text\stop .
|
||||
Some {\language[es]Spanish text}.
|
||||
|
||||
\section[title={Combined},reference={combined}]
|
||||
|
||||
|
@ -116,9 +116,8 @@ French rtl div contents
|
|||
|
||||
and more text.
|
||||
|
||||
Next paragraph with a \start\language[en-gb]{\lefttoright British ltr
|
||||
span}\stop and a
|
||||
word-that-includesa\start\language[de-ch]{\lefttoright Swiss German ltr
|
||||
span}\stop right?
|
||||
Next paragraph with a {\language[en-gb]{\lefttoright British ltr span}}
|
||||
and a word-that-includesa{\language[de-ch]{\lefttoright Swiss German ltr
|
||||
span}}right?
|
||||
|
||||
\stoptext
|
||||
|
|
Loading…
Add table
Reference in a new issue