Guest User

Untitled

a guest
Jun 25th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{everypage}
  3. usepackage{ifthen}
  4. usepackage{lipsum}
  5. newififprintodd%<- false by default
  6. letoldSectionsection
  7. defhidesection{nullfontstepcounter{section}}
  8. newcommandshowsection[2][]{normalfontoldSection[#1]{#2}}
  9. renewcommandsection[2][]{%
  10. % Check if current section is odd numbered
  11. ifoddthesectionrelax%
  12. % Check if we should print it
  13. ifprintoddshowsection[#1]{#2}elsehidesectionfi
  14. else%
  15. % Current section is even. Check if we should print it
  16. ifprintoddhidesectionelseshowsection[#1]{#2}fi
  17. fi
  18. }
  19. % Uncomment below to switch
  20. % printoddtrue
  21. begin{document}
  22. section{First}This is shown when printoddfalse is called.lipsum[1]
  23. section{second}This is shown when printoddtrue is calledlipsum[2]
  24. end{document}
Add Comment
Please, Sign In to add comment