A LaTeX class to write your proposal. The class is developed for the "Instituto Tecnológico de Morelia" and the course of "Seminario de Investigación 1"
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

159 lines
5.1 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. %************************************
  2. %1 Identification:
  3. \NeedsTeXFormat{LaTeX2e}
  4. \ProvidesClass{itmthesis}[2018/05/04 ITMorelia Thesis Class by Gerardo Marx]
  5. %************************************
  6. %2 Preliminary declarations
  7. %2.1 The basic class:
  8. \LoadClass{report}
  9. %2.2 Packages:
  10. \RequirePackage[utf8]{inputenc}
  11. \RequirePackage[colorlinks=true]{hyperref}
  12. \RequirePackage{blindtext}
  13. \RequirePackage{scrextend}
  14. \RequirePackage{booktabs}
  15. \RequirePackage{calligra}
  16. %2.2.1 Booleans
  17. \RequirePackage{ifthen}
  18. \newboolean{@drafting} % print version information on pages
  19. \newboolean{@spanish} % activates the spanish version at babel otherwise english
  20. \newboolean{@listings} % loads the listings package
  21. %2.2.2 Colors
  22. \PassOptionsToPackage{dvipsnames}{xcolor}
  23. \RequirePackage{xcolor}
  24. \definecolor{c1}{rgb}{0,0,1} % blue
  25. \definecolor{grisTec}{RGB}{125,125,125}
  26. \hypersetup{
  27. linkcolor={c1}, % internal links
  28. citecolor={c1}, % citations
  29. urlcolor={c1} % external links/urls
  30. }
  31. %2.2.2 This package is essentially a replacement—partial or total—for the LATEX macros related with sections—namely titles, headers and contents.
  32. \RequirePackage{titlesec}%
  33. \RequirePackage{xargs} % needed for extended newcommand and others
  34. \RequirePackage{array} % needed for extended options for array
  35. \RequirePackage{amsmath}
  36. \RequirePackage{graphicx}
  37. %2.3 Page settings:
  38. \RequirePackage[left=3cm,right=3cm,top=3cm,bottom=3cm]{geometry}
  39. %2.4 Macros and Commands:
  40. %Commands
  41. \newcommand{\myVersion}{version 1.0\xspace}
  42. %2.4.1 Derivatives
  43. \newcommandx{\pd}[3][1=]{%
  44. \frac{\partial^{#1} #2}{\partial #3^{#1}}
  45. }
  46. %2.4.1 Dbf
  47. \renewcommand{\d}{{\rm d}}
  48. %2.5 Environments:
  49. %2.5.1 Arrays of equations:
  50. %************************************
  51. %3 Options:
  52. % 3.1 DeclareOptions
  53. % Option sintax
  54. % \DeclareOption{⟨option⟩}{⟨code⟩}
  55. %Code option:
  56. \DeclareOption{drafting}{
  57. %Code
  58. \setboolean{@drafting}{true}
  59. }
  60. \DeclareOption{spanish}{
  61. %Code
  62. \setboolean{@spanish}{true}
  63. \typeout{spanish to babel}
  64. }%end code option
  65. \DeclareOption{listings}{
  66. \setboolean{@listings}{true}
  67. \typeout{listings option activated}
  68. }
  69. \ProcessOptions\relax
  70. % 3.2 PassOptionsToPackage
  71. %if sintax: \ifthenelse{⟨test⟩}{⟨then clause⟩}{⟨else clause⟩}
  72. % 3.2.1 drafting
  73. %+++++++++++++++++++++++++++++++++++++++++++++
  74. \RequirePackage{scrtime} %time access
  75. %Sintax: \newcommand{name}[num]{definition}
  76. \newcommand{\finalVersionString}{Revised}%Final version text
  77. \ifthenelse{\boolean{@drafting}}{%
  78. % Then clause
  79. % \RequirePackage{draftwatermark}%
  80. % \SetWatermarkLightness{0.9}
  81. % \SetWatermarkScale{.5}
  82. % \SetWatermarkText{\today\ at \thistime}
  83. \RequirePackage{prelim2e}
  84. \PassOptionsToPackage{draft}{prelim2e}
  85. \renewcommand{\PrelimWords}{\relax}
  86. \renewcommand{\PrelimText}{\footnotesize[\,\today\ at \thistime\ -- \texttt{itmorelia} \myVersion\,]}
  87. }
  88. %else clause
  89. {\renewcommand{\finalVersionString}{\emph{Final Version} as of \today\ (\texttt{itmorelia} \myVersion).}}
  90. %+++++++++++++++++++++++++++++++++++++++++++++
  91. % 3.2.2 babel
  92. \ifthenelse{\boolean{@spanish}}%test
  93. { %then clause
  94. \@ifpackageloaded{babel}
  95. {\relax}{\RequirePackage[es-tabla,spanish]{babel}}%
  96. }
  97. {\relax}% else clause
  98. %3.2.3 Listing related stuff
  99. \ifthenelse{\boolean{@listings}}%
  100. {%then clause
  101. \@ifpackageloaded{listings}%
  102. {\relax}{\RequirePackage{listings}}%
  103. }
  104. %else clause
  105. {\relax}%
  106. %************************************
  107. % 4 Declarations:
  108. %-------------------------------------
  109. %4.0 chapter
  110. %\renewcommand{\thechapter}{\Roman{chapter}} %Roman enumeration
  111. \titleformat{\chapter}[display]%shape
  112. {\Huge\filleft\sc}%Format applied to the title
  113. {\filleft\sc{\chaptertitlename} \thechapter}%Label text and format
  114. {4ex}%Separation between Label and Title
  115. {}%Before code
  116. [\vspace{2ex}
  117. \color{gray}\titlerule]%After code
  118. %
  119. %4.1 section
  120. %\titleformat{\section}%shape
  121. % {\large \scshape}%Format applied to the title
  122. % {\large\scshape \thesection}%Label text and format
  123. % {2ex}%Separation between Label and Title
  124. % {}%Before code
  125. % []%After code
  126. \titleformat{\section}
  127. {\normalfont\Large\bfseries}{\thesection}{1em}{}
  128. %4.2 subsection
  129. \titleformat{\subsection}
  130. {\normalfont\large\bfseries}{\thesubsection}{1em}{}
  131. %4.3 subsubsection
  132. \titleformat{\subsubsection}
  133. {\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}
  134. %4.4 Paragraph
  135. \titleformat{\paragraph}[runin]
  136. {\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
  137. %4.5 subparagraph
  138. \titleformat{\subparagraph}[runin]
  139. {\normalfont\normalsize\bfseries}{\thesubparagraph}{1em}{}
  140. %4.2 subsection
  141. \titleformat{\subsection}
  142. {\normalfont\Large\bfseries}{\thesubsection}{1em}{}
  143. %4.x Spacing
  144. \titlespacing*{\chapter} {0pt}{50pt}{40pt}
  145. \titlespacing*{\section} {0pt}{3.25ex plus 1ex minus .2ex}{2.3ex plus .2ex}
  146. \titlespacing*{\subsection}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
  147. \titlespacing*{\subsubsection}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
  148. \titlespacing*{\paragraph}{0pt}{3.25ex plus 1ex minus .2ex}{1em}
  149. \titlespacing*{\subparagraph}{\parindent}{3.25ex plus 1ex minus .2ex}{1em}