Tag Info

1

May be defining your own seq_mapthread_inline? \cs_new_protected:Npn \aellet_seq_mapthread_inline:NNn #1 #2 #3 { \cs_set:Npn \__aellet_tmp:w ##1 ##2 { #3 } \seq_mapthread_function:NNN #1 #2 \__aellet_tmp:w }

0

This was great help, I had missed the fact that I had to call the sty file as a package. On Windows I commented out the text to line 79 (the import statements). Then renamed the file de-macro.py and then called python-dir\python [-O] file.tex. This actually worked.

2

While one could use \tl_put_right:NV or similar here, there would be something of a loss of efficiency as you've got to introduce a brace group and that need several steps. Instead, I would here us an x-type expansion and appropriate control: \tl_set:Nn \l_tmpa_tl { \emph { emph } } \tl_set:Nx \l_tmpb_tl { \exp_not:N \overset { o } { \exp_not:V \l_tmpa_tl ...

11

\verb has no effect on tokens (even if you expanded \FileName), so you want something more like this \def\FileName{A_B} \documentclass{article} \usepackage[T1]{fontenc} \begin{document} \texttt{\detokenize\expandafter{\FileName}} \end{document}

10

The \scantokens command is not “dangerous” by itself, but it can have surprising effects. How does it work? Its argument is scanned like for a \write operation, but all symbolic tokens are considered unexpandable, based on the current category codes; the result is placed in a “pseudofile” that is read in exactly as if \input was used. This has various ...

18

TeX's scanner (eyes) convert characters in a file to tokens. That only happens once, macro replacement text and all expansion processing processes tokens (which are [character-code,catcode] pairs. the catcode table affects the conversion of characters to character tokens. So your definition locally makes the catcode of _ 13 so if a _ character is encounted ...

5

An explicit number can be expanded without changing it and the unwanted command sequence can be redefined to vanish itself, when expanded: % Setup \makeatletter \newif\ifintheway \def\@citeb{foobar} \def\bfoobar{\inthewayfalse 17} % Extract the number from \csname b\@citeb\endcsname % and store it in the macro \mynumber \begingroup ...

2

You need to fully expand the argument of \substitute before you use this command. That can be arranged but not with a \@for mapping, which is non-expandable. As you are already using xparse I'd just write this in expl3. See code comments for details: \documentclass{article} \usepackage{expl3,xparse} \ExplSyntaxOn % User command taking ones comma-list ...

0

I'm posting an answer to my own question because I've found a way to deal with this thing. So if anyone is trying to do something similar, here is my solution. The dependence on sageto generate my random problems is so heavy than instead of using probsoln to manage the problem database, I've found easier to let sage write both the problem text and the ...

1


1

The cause of the problem is that \\ and \hline are set apart from each other in your code (with some processing in between). The \\ is automatically set for the late after line option when the tabular key is used. So, the solution is to clear late after line and to set \\\hline directly. Version 1: If your table gets a line at the very beginning only by ...

4

One way to do this is to use \\\hline. However this results in extra vertical spacing so you can hack that out via \vspace{-12pt}: However, do you really need the vertical lines. It looks better just to use horizontal lines with booktabs: Alternate: Instead of using csvsimple you could also use the datatool package as shown in the MWE below. This ...

Top 50 recent answers are included