Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{everypage}
- usepackage{ifthen}
- usepackage{lipsum}
- newififprintodd%<- false by default
- letoldSectionsection
- defhidesection{nullfontstepcounter{section}}
- newcommandshowsection[2][]{normalfontoldSection[#1]{#2}}
- renewcommandsection[2][]{%
- % Check if current section is odd numbered
- ifoddthesectionrelax%
- % Check if we should print it
- ifprintoddshowsection[#1]{#2}elsehidesectionfi
- else%
- % Current section is even. Check if we should print it
- ifprintoddhidesectionelseshowsection[#1]{#2}fi
- fi
- }
- % Uncomment below to switch
- % printoddtrue
- begin{document}
- section{First}This is shown when printoddfalse is called.lipsum[1]
- section{second}This is shown when printoddtrue is calledlipsum[2]
- end{document}
Add Comment
Please, Sign In to add comment