Advertisement
Guest User

Untitled

a guest
Nov 24th, 2020
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 0.60 KB | None | 0 0
  1. \documentclass{article}
  2. \usepackage{chemnum}
  3. \RequirePackage{expl3}
  4.  
  5. \cs_new:Npn \int_to_lanthanide:n #1
  6. {
  7.     \int_to_symbols:nnn {#1} { 15 }
  8.     {
  9.         { 1 } { La }
  10.         { 2 } { Ce }
  11.         { 3 } { Pr }
  12.         { 4 } { Nd }
  13.         { 5 } { Pm }
  14.         { 6 } { Sm }
  15.         { 7 } { Eu }
  16.         { 8 } { Gd }
  17.         { 9 } { Tb }
  18.         { 10 } { Dy }
  19.         { 11 } { Ho }
  20.         { 12 } { Er }
  21.         { 13 } { Tm }
  22.         { 14 } { Yb }
  23.         { 15 } { Lu }
  24.     }
  25. }
  26.  
  27. \newcmpdcounterformat{lanthanide}{\int_to_lanthanide:n}
  28.  
  29. \begin{document}
  30. \cmpd{peroxo.meoh}
  31. \cmpd{DMSOcp}
  32.  
  33. \labelcmpd[sub-counter-format=lanthanide]{lnwater.la}
  34. \cmpd{lnwater.la}
  35.  
  36. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement