LaTeX forum ⇒ Fonts & Character Setsexpl3: Nx expansion won't take math typesetting

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
erwann
Posts: 72
Joined: Thu Aug 25, 2016 2:24 am

expl3: Nx expansion won't take math typesetting

Postby erwann » Sun May 06, 2018 1:54 am

The code below says it all.
  1. \documentclass{minimal}
  2. \usepackage{expl3}
  3. \usepackage{amssymb}
  4.  
  5. \ExplSyntaxOn
  6.  
  7. \begin{document}
  8.  
  9. \tl_set:Nn \bar{A}
  10. \tl_set:Nf \baz{\ensuremath{\mathcal{\bar}}}
  11. %\tl_set:Nx \baz{\ensuremath{\mathcal{\bar}}} % :Nx generates error
  12. \tl_set:Nn \bar{B}
  13. \baz % want \mathcal{A}, get \mathcal{B}
  14.  
  15. \ExplSyntaxOff
  16.  
  17. \end{document}


Console output (1)
  1. This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=pdflatex)
  2. restricted \write18 enabled.
  3. entering extended mode
  4. (./Nx_mathcal.tex
  5. LaTeX2e <2017-04-15>
  6. Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
  7. (/usr/local/texlive/2017/texmf-dist/tex/latex/base/minimal.cls
  8. Document Class: minimal 2001/05/25 Standard LaTeX minimal class
  9. ) (/usr/local/texlive/2017/texmf-dist/tex/latex/l3kernel/expl3.sty
  10. (/usr/local/texlive/2017/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
  11. (/usr/local/texlive/2017/texmf-dist/tex/latex/l3kernel/l3pdfmode.def))
  12. (/usr/local/texlive/2017/texmf-dist/tex/latex/amsfonts/amssymb.sty
  13. (/usr/local/texlive/2017/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
  14. (./Nx_mathcal.aux)
  15. ! Undefined control sequence.
  16. \GenericError ...
  17. #4 \errhelp \@err@ ...
  18. l.11 \tl_set:Nx \baz{\ensuremath{\mathcal{\bar}}}
  19. % :Nx generates error


(1) The *.log file generated doesn't contain the error of the console output. TexWorks. Any suggestion?
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)

Tags:

erwann
Posts: 72
Joined: Thu Aug 25, 2016 2:24 am

Postby erwann » Sun May 06, 2018 4:39 am

\exp_not:N does the job.
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 3 guests