Advertisement
berurux

매크로로 감싼버전

Jan 14th, 2020
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 0.66 KB | None | 0 0
  1. \documentclass[a4paper,12pt]{article}
  2. \usepackage{amsmath,amsthm,kotex}
  3.  
  4. \newtheorem{thm}{Theroem}
  5. \let\origthethm=\thethm
  6. \def\MakeThmMultiple#1{%
  7.     \def\thethm{\arabic{thm}\kern2pt--\kern2pt\addtocounter{thm}{\the\numexpr #1 - 1\relax}\arabic{thm}}%
  8. }
  9. \def\MakeThmSingle{%
  10.   \let\thethm=\origthethm%
  11. }
  12.  
  13. \title{Multiple indices for a theorem}
  14.  
  15. \begin{document}
  16. \maketitle
  17. \begin{thm}[A single theorem]
  18.    I am a theorem.
  19. \end{thm}
  20.  
  21. \MakeThmMultiple{4}
  22.  
  23. \begin{thm}[Multiple theorems]
  24.    I am a collection of theorems.
  25. \end{thm}
  26.  
  27. \MakeThmSingle
  28.  
  29.  
  30. \begin{thm}[Another single theorem]
  31.    I am another theorem.
  32. \end{thm}
  33. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement