Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{memoir}
- usepackage{letltxmacro}
- LetLtxMacro{oldsection}{section}
- renewcommand{section}[2][]{oldsection[#1]{#2}index{#1}label{sec:#1}}
- LetLtxMacro{oldchapter}{chapter}
- renewcommand{chapter}[2][]{oldchapter[#1]{#2}index{#1}label{chap:#1}}
- begin{document}
- chapter[ABC]{ABC}
- section[One]{One}
- section{Two}
- section*[Three]{Three}
- Test reference ref{chap:ABC}
- Test reference ref{chap:XYZ}
- Test reference ref{sec:One}
- Test reference ref{sec:Two}
- chapter{DEF}
- chapter*[XYZ]{XYZ}
- end{document}
Add Comment
Please, Sign In to add comment