On 8/25/2022 9:44 PM, Thangalin via ntg-context wrote:
I've attempted to apply Wolfgang's subtle suggestion of using Lua to parse
the input document using a regular expression via lpeg.replacer. The
replacement itself works fine; however, in doing so the XML document
structure is converted to
I've attempted to apply Wolfgang's subtle suggestion of using Lua to parse
the input document using a regular expression via lpeg.replacer. The
replacement itself works fine; however, in doing so the XML document
structure is converted to text, which means that it is no longer possible
to "flush"
Good point, Wolfgang.
The Markdown is translated to XHTML then typeset as XML using the setups
listed here:
https://github.com/DaveJarvis/keenwrite-themes/tree/main/xhtml
Having an XML string replacement solution would be great. I suppose that
would help prevent substitutions within pre and code
Thangalin via ntg-context schrieb am 01.08.2022 um 21:58:
Hi list,
I'm looking to perform text replacements.
Please don't omit important information, on TeX SE you mentioned you
input is XML which means a lot more can be done than your simple TeX
based example demonstrates.
Wolfgang
Hi list,
I'm looking to perform text replacements.
\definereplacement[SubstPostmeridian][
match={[Pp].[Mm].]},
replace={\cap{pm}}
]
The \replaceword command doesn't handle periods well. The translate module
doesn't seem flexible enough to cover edge cases. Consider the following
example