Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{article}
- \usepackage{xparse}
- \let\oldsection\section
- \RenewDocumentCommand{\section}{s o m}{%
- \IfBooleanTF{#1}
- {\oldsection*{\MakeUppercase{#3}}}% \section*
- {\IfValueTF{#2}
- {\oldsection[\MakeUppercase{#2}]{\MakeUppercase{#3}}}% \section[.]{..}
- {\oldsection{\MakeUppercase{#3}}}% \section{..}
- }%
- }
- \begin{document}
- \tableofcontents
- \section{A section}
- \section[Another section]{A section}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement