Guest User

Untitled

a guest
Apr 11th, 2024
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. \documentclass{standalone}
  2. \usepackage{amsmath}
  3.  
  4. \makeatletter
  5. \let\old@sup=^% save a copy of original ^ with catcode 7
  6. \catcode`\^=13% make ^ and activate character
  7. \def^#1{\old@sup{#1}}% change definition to call the original ^ with braces
  8.  
  9. % patch \pr@m@s using `^` with the new catcode.
  10. \def\pr@m@s{% copy of \@pr@m@s code from latex.ltx
  11. \ifx'\@let@token% <-- use U+0027
  12. \expandafter\pr@@@s%
  13. \else\ifx^\@let@token%
  14. \expandafter\expandafter\expandafter\pr@@@t%
  15. \else%
  16. \egroup%
  17. \fi\fi%
  18. }
  19. \makeatother
  20.  
  21. \newcommand\mesh{\mathrel{\#}}
  22. \newcommand\smallplus{\mathbin{\texttt{+}}}
  23. \newcommand\indep{\mathrel{\perp\!\!\!\perp}}
  24. \newcommand\myrel{\mathrel{\overset{\textsf{a.e.}}{\sim}}}
  25.  
  26. \begin{document}
  27. \begin{tabular}{lllllll}
  28. $A \mesh B $ & $A^\mesh $ & $A^{\mesh} $ & $A'^\mesh $ & $A'^{\mesh} $ & $A''^\mesh $ & $A''^{\mesh} $\\
  29. $A \smallplus B$ & $A^\smallplus$ & $A^{\smallplus}$ & $A'^\smallplus$ & $A'^{\smallplus}$ & $A''^\smallplus$ & $A''^{\smallplus}$\\
  30. $A \indep B $ & $A^\indep $ & $A^{\indep} $ & $A'^\indep $ & $A'^{\indep} $ & $A''^\indep $ & $A''^{\indep} $\\
  31. $A \myrel B $ & $A^\myrel $ & $A^{\myrel} $ & $A'^\myrel $ & $A'^{\myrel} $ & $A''^\myrel $ & $A''^{\myrel} $\\
  32. \end{tabular}
  33. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment