Guest User

Untitled

a guest
Jul 14th, 2019
104
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %!TEX engine = LuaLaTeX
  2.  
  3. \documentclass{article}
  4. \usepackage{unicode-math}
  5. \usepackage{xparse}
  6.  
  7.  
  8. \makeatletter
  9. % Small amount of expl3 code for the DRY principle
  10. \ExplSyntaxOn
  11.  
  12. \cs_new_protected:Npn \michael__mathchoice:nnnn #1#2#3#4
  13.   { \mathchoice {#1} {#2} {#3} {#4} }
  14.  
  15. \cs_generate_variant:Nn \michael__mathchoice:nnnn { oooo }
  16.  
  17. \cs_new_protected:Npn \michael__small_rule:n #1
  18.  {
  19.    \vrule
  20.      height \dim_eval:n { \fontdimen 22 \use:c { #1font } 2 %+ 0.2pt
  21.       }
  22.   }
  23. % Generate the little vertical rule from middle to top of the fraction rule
  24. % in the appropriate style.
  25. \NewDocumentCommand \michaelsmallrule { }
  26.  {
  27.    \michael__mathchoice:oooo
  28.      { \michael__small_rule:n { text } }
  29.      { \michael__small_rule:n { text } }
  30.      { \michael__small_rule:n { script } }
  31.      { \michael__small_rule:n { scriptscript } }
  32.  }
  33.  
  34. \ExplSyntaxOff
  35.  
  36. \newcommand*{\strange}[2]{% with ad-hoc correction (kern) for horizontal space
  37.   { \frac{#1}{#2\,} \kern-1.2pt \michaelsmallrule }
  38. }
  39.  
  40. \makeatother
  41.  
  42. \begin{document}
  43.  
  44. $\Gamma_{ \strange{a+1}{1+\strange{x}{y}^{\strange{\alpha}{\beta}} }}$
  45.  
  46. \end{document}
RAW Paste Data