List parsing with special input/optional arguments
I’d like to parse a list where the elements can be given as either [<pre>]<text>[<post>], where <pre> and <post> are optional, or (<special text>). I found a...
View ArticleAnswer by egreg for List parsing with special input/optional arguments
This answers (at least partially) the parsing problem. But of course here I'm using specific features of math mode. But the principle should be clear.\documentclass{article}\makeatletter\def\mylist#1{%...
View ArticleAnswer by yannisl for List parsing with special input/optional arguments
This is not a final solution, as I think what you are asking can get very complicated, but is indicative of building a finite state machine. For demonstration purposes, I will use @tfor to scan the...
View ArticleAnswer by cjorssen for List parsing with special input/optional arguments
If a luatex solution is ok, then you can try the lpeg parser to achieve what you want.First the lua file (save it as listparsing.lua). Note that I use -2 as the first argument to make tex.sprint prints...
View ArticleAnswer by Tobi for List parsing with special input/optional arguments
This is a simple solution using the skills of...
View Article