Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %!TEX engine = LuaLaTeX
- \documentclass{article}
- \usepackage{unicode-math}
- \usepackage{xparse}
- \makeatletter
- % Small amount of expl3 code for the DRY principle
- \ExplSyntaxOn
- \cs_new_protected:Npn \michael__mathchoice:nnnn #1#2#3#4
- { \mathchoice {#1} {#2} {#3} {#4} }
- \cs_generate_variant:Nn \michael__mathchoice:nnnn { oooo }
- \cs_new_protected:Npn \michael__small_rule:n #1
- {
- \vrule
- height \dim_eval:n { \fontdimen 22 \use:c { #1font } 2 %+ 0.2pt
- }
- }
- % Generate the little vertical rule from middle to top of the fraction rule
- % in the appropriate style.
- \NewDocumentCommand \michaelsmallrule { }
- {
- \michael__mathchoice:oooo
- { \michael__small_rule:n { text } }
- { \michael__small_rule:n { text } }
- { \michael__small_rule:n { script } }
- { \michael__small_rule:n { scriptscript } }
- }
- \ExplSyntaxOff
- \newcommand*{\strange}[2]{% with ad-hoc correction (kern) for horizontal space
- { \frac{#1}{#2\,} \kern-1.2pt \michaelsmallrule }
- }
- \makeatother
- \begin{document}
- $\Gamma_{ \strange{a+1}{1+\strange{x}{y}^{\strange{\alpha}{\beta}} }}$
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement