olsak/OpTeX

Idea: Add \texorpdfstring

robertbachmann opened this issue · 2 comments

texdoc hyperref has \texorpdfstring{TEXstring}{PDFstring}. I'll need something similar for Pandoc-OpTeX.

Example usage would be:

\sec \texorpdfstring{H$_2$O is Water}{H2O is water}

My current implementation is

\let\texorpdfstring=\usefirst
\regmacro{}{}{\let\texorpdfstring=\usesecond}

Can we implement that to in the base format? If yes, I can prepare a pull-request with code and documentation.

olsak commented

If it doesn't enlarge the user documentation then it is good idea. I always balance between "short documentation without many commands and parameters" and "macros are ready for users". The first case has (of course) a disadvantage: users are forced "do it yourself".

Not needed anymore. I've found a nicer solution for pandoc-optex.