olsak / OpTeX

OpTeX - LuaTeX format with extended Plain TeX macros
http://petr.olsak.net/optex/
35 stars 14 forks source link

[Feature request] Change/modify symbol for \_startitem #28

Closed gromadan closed 3 years ago

gromadan commented 3 years ago

I am not sure if you are interested also in improvement ideas from users or should this section be kept only for reporting bugs. In case, I am sorry for spamming here. Anyway:

Since I am often working with operators or operator algebras, basically always when I am using opmac or optex, I redefine \startitem so that it uses @ instead of the asterisk * for starting an item. Therefore, I thought it might be useful if the user could choose which character to use for starting an item. Something like \activettchar chooses the character for inline verbatim.

Alternatively, since the asterisk is used mostly in mathematics, you could just define something like

\adef*{\ifmmode\ast\else\_startitem\fi}

so that the asterisk would work normally inside formulas.

[In general, I find it to be slightly a trap for the user that a macro changes the category of a character, which normally behaves like a letter. Like this, you can have a functioning code, then you copy it in a slide presentation and suddenly it stops working. I think that it would be more user friendly, if you used for example ^ (since it does not work outside math mode) or + (since it works outside math mode, but you should not use it there). But I guess you don't want to do such a dramatic change this at this point.]

olsak commented 3 years ago

The \ifmmode* idea is good, thanks for this. I added ti to the last comit.

gromadan commented 3 years ago

Great, please do it also for the slides (in styles.tex and slides.tex).