Advertisement
Guest User

Untitled

a guest
Aug 28th, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. documentclass{article}
  2. begin{document}
  3. newcommandrnumber{mathop{mbox{$r$-$mathit{number}$}}}
  4. [
  5. rnumber(5) = 120
  6. ]
  7. end{document}
  8.  
  9. documentclass{article}
  10. usepackage{amsmath}
  11. mathchardefmhyphen="2D % Define a "math hyphen"
  12. begin{document}
  13. newcommandrnumber{mathop{rmhyphen number}}
  14. [
  15. rnumber(5) = 120
  16. ]
  17. end{document}
  18.  
  19. documentclass{article}
  20. usepackage{amsmath}
  21. begin{document}
  22. newcommandrnumber{operatorname{r-number}}
  23. [
  24. rnumber(5) = 120
  25. ]
  26. end{document}
  27.  
  28. documentclass{article}
  29. usepackage{amsmath}
  30. DeclareMathOperator{rnumber}{r-number}
  31.  
  32. % Remove the line above and use the following if
  33. % the "r" represents a math variable
  34. %newcommand{rnumber}{mathop{r{textnormal{-number}}}}
  35.  
  36. begin{document}
  37. $rnumber(2)$
  38.  
  39. % Just to show the effect of the alternative definition
  40. renewcommand{rnumber}{mathop{r{textnormal{-number}}}}
  41. $rnumber(2)$
  42.  
  43. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement