Reputation
748
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
4 13
Newest
 Yearling
Impact
~7k people reached

2d
comment Detect if a macro argument is only one symbol
Been using it for a while and it looks good, thanks @GustavoMezzetti!
Jul
29
comment Vertical spacing around align in a figure
BTW, here is a real-world-example of the problem, see page 3 of this paper.
Jul
28
comment Vertical spacing around align in a figure
Yes, sure. Hence I wrote “without affecting other vertical spaces around math environments”. The obvious “redefine figure to set \abovedisplayskip=0pt” would not work well. I’m surprised none else seems to be bothered by this extra space.
Jul
28
comment Vertical spacing around align in a figure
@Larifari, I want the first line of the pages to align. And there are environments derived from align etc. (e.g. lhs2tex), I’m using align only as an example here.
Jul
27
comment Vertical spacing around align in a figure
Done. You probably want to click on the image to have a closer look.
Jul
27
revised Vertical spacing around align in a figure
Added MWE
Jul
27
asked Vertical spacing around align in a figure
Jul
22
comment Detect if a macro argument is only one symbol
I’m using this for now and see how well it goes.
Jul
20
comment Detect if a macro argument is only one symbol
BTW, is this implementation of a custom argument to \if idiomatic? I see it the first time now, and it looks very hackish, if not downright evil. :-)
Jul
20
comment Detect if a macro argument is only one symbol
Fancy! It does’t feel right to apply a regex to the Code of the argument, when morally the condition applies to the result of the argument, but from a practical point of view it is great.
Jul
20
comment Detect if a macro argument is only one symbol
@Sigur: First, the braces in LaTeX are optional (I often write \fv e or \fv\alpha)`. But more importantly: I want to separate meaning (this is the argument) from presentation (i.e. where parenthesis are to be used and where not), and want to control the latter centrally. This is very similar to syntax highlighting with listing: You want to leave it to the system, and you want to control it centrally.
Jul
20
comment Detect if a macro argument is only one symbol
That might also be quite a viable solution, if the logic is kept in mind while using the such defined command. thanks!
Jul
20
comment Detect if a macro argument is only one symbol
I’d like to make that choice automatic, so that the style is consistent across a large document, and that I can easily switch between them.
Jul
20
comment Detect if a macro argument is only one symbol
No, of course not :-). Looks like xstring has more problems with my stuff, including breaking on arguments containing \phantom.
Jul
20
comment Detect if a macro argument is only one symbol
Also, I get TeX capacity exceeded, sorry [input stack size=5000]. if the argument is \textlambda with \usepackage[safe]{tipa} enabled.
Jul
20
comment Detect if a macro argument is only one symbol
Would that work with \fv{\alpha}?
Jul
20
comment Detect if a macro argument is only one symbol
Interesting idea to simply look for whitespace. It would not work in the case of \fv{e_1+e_2}, but I could probably avoid not putting a space in complex arguments.
Jul
20
revised Detect if a macro argument is only one symbol
Added example where whitespace is not a good indicator.
Jul
20
revised Detect if a macro argument is only one symbol
Added MWE
Jul
20
asked Detect if a macro argument is only one symbol