GEX thesis source code, full text, references

ctuthesis.cls 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. %!TEX ROOT = ctutest.tex
  2. \RequirePackage{expl3,l3keys2e}
  3. \RequirePackage{environ}
  4. \RequirePackage{xparse}
  5. \RequirePackage[utf8]{inputenc}
  6. \ProvidesExplClass{ctuthesis}%
  7. {2015/11/15}{0.1 t1511151022}%MY TIMESTAMP HERE {0.1}
  8. {Class for typesetting CTU theses and alike}
  9. % Some general remarks: the module name for this class is `ctuthesis`. Yes, it is quite long,
  10. % but at the very same time, it's descriptive.
  11. % The core of the class.
  12. \input{ctuth-core.tex}
  13. % Process class keys (and call the trigger)
  14. \ProcessKeysOptions { ctuthesis }
  15. \ctuthesis_ctusetup_trigger:
  16. % Load the report class
  17. \LoadClass [
  18. a4paper, % pagesize option
  19. \bool_if:cT { g_ctuthesis_switch_draft_bool } { draft } , % draft option
  20. \bool_if:cTF { g_ctuthesis_switch_oneside_bool } { oneside } { twoside }, % one/twoside option
  21. \tl_use:N \g_ctuthesis_fontsize_tl % fontsize option
  22. ] { book }
  23. % Once the class is loaded, we disable keys marked 'nop'
  24. \ctuthesis_disable_keys:n { nop }
  25. % This is the macro that actually loads all the stuff. It ought to be used exactly in the preamble.
  26. % The reason for this setup is that it allows \ctusetup parameters to influence things that need
  27. % to be influenced.
  28. \DeclareDocumentCommand \ctuprocess { } {
  29. % Get to both LaTeX2e and LaTeX3 context
  30. \makeatletter
  31. \ExplSyntaxOn
  32. % Load the two files
  33. \input{ctuth-pkg.tex}
  34. \input{ctuth-templates.tex}
  35. \ExplSyntaxOff
  36. \makeatother
  37. % Once \ctuprocess is called, we disable keys marked 'nop'
  38. \ctuthesis_disable_keys:n { nopost }
  39. % Make more calls to \ctuprocess lead to an error
  40. \let\ctuprocess\ctuprocess@postprocess
  41. % Disable check for missing \ctuprocess
  42. \let\ctuprocess@check\relax
  43. }
  44. % The two macros that only invoke an error -- used in checks whether \ctuprocess was called exactly once
  45. \DeclareDocumentCommand \ctuprocess@postprocess { } { \msg_error:nn { ctuthesis } { ctuprocess-twice } }
  46. \DeclareDocumentCommand \ctuprocess@check { } { \msg_error:nn { ctuthesis } { ctuprocess-none } }
  47. \AtBeginDocument{\ctuprocess@check}
  48. \input{ctuth-names.tex}
  49. \endinput