Quantcast
Channel: List parsing with special input/optional arguments - TeX - LaTeX Stack Exchange
Browsing index pages (5 articles)
↧

Image may be NSFW.
Clik here to view.

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 Article


Image may be NSFW.
Clik here to view.

Answer 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 Article


Answer 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 Article

Image may be NSFW.
Clik here to view.

Answer 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 Article

Answer by Tobi for List parsing with special input/optional arguments

This is a simple solution using the skills of...

View Article

Browsing index pages (5 articles)


Latest Images