Latex example done during lecture 2022b
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.

167 lines
3.3 KiB

2 years ago
  1. % comments
  2. % Preamble
  3. \documentclass[twoside]{article} %document's style
  4. \usepackage{blindtext} %dummy text
  5. \usepackage[utf8]{inputenc} %keyboard
  6. \usepackage{amsmath} %math symbols
  7. \usepackage{graphicx} %images and figures
  8. \usepackage[spanish]{babel} %env translation
  9. \usepackage{caption} % subfigures
  10. \usepackage{subcaption} %subfigures
  11. \usepackage{booktabs} %fancy tables
  12. \usepackage[left=2cm, right=2cm, top=2cm, bottom=2cm]{geometry}%page limits
  13. \usepackage{fancyhdr}
  14. \title{My \LaTeX{} Example project}
  15. \author{Gerardo Marx}
  16. %Body
  17. \begin{document}
  18. \pagestyle{fancy}
  19. \fancyhead{}
  20. \fancyhead[RO,LE]{\textbf{My headers}}
  21. \fancyfoot{}
  22. \fancyfoot[CO,RE]{\thepage}
  23. \maketitle
  24. \tableofcontents
  25. \section{List}
  26. \subsection{Type Itemize}
  27. \begin{itemize}
  28. \item Primer punto
  29. \item Segundo punto
  30. \item Tercer punto
  31. \end{itemize}
  32. \subsection{Type enumerate}
  33. \begin{enumerate}
  34. \item Primer punto
  35. \item Segundo punto
  36. \item Tercer punto
  37. \end{enumerate}
  38. \subsection{Nested Lists}
  39. \begin{enumerate}
  40. \item Primer punto
  41. \begin{enumerate}
  42. \item Sub punto
  43. \item Sub punto
  44. \item Sub punto
  45. \end{enumerate}
  46. \item Segundo punto
  47. \item Tercer punto
  48. \end{enumerate}
  49. \blindtext{1}
  50. \section{Equations}
  51. \blindtext{1}
  52. \subsection{Inline Equations}
  53. Some text to refer here $E=mc^2$, and the text continues again here ...
  54. \blindtext{1}
  55. \subsection{Enumerated equations}
  56. Some text here to refer, next Equation \eqref{eq:fourier}:
  57. \begin{equation}
  58. \label{eq:fourier-cos}
  59. f(x)=\int_{0}^{\infty}f(x)\cos(\omega t)dt
  60. \end{equation}
  61. \begin{equation}
  62. \label{eq:fourier}
  63. f(x)=\int_{0}^{\infty}f(x)\sin(\omega t)dt
  64. \end{equation}
  65. \begin{equation*}
  66. \label{eq:example}
  67. \frac{1}{\sqrt{2}+\frac{1}{\sqrt{2}}+}
  68. \end{equation*}
  69. \begin{equation}
  70. \label{eq:matrix}
  71. \begin{bmatrix}
  72. a_1 & b_8 & c_9\\
  73. d_{10} & e & f\\
  74. g & h & i
  75. \end{bmatrix}
  76. \end{equation}
  77. \section{Graphics}
  78. \blindtext{1}
  79. \begin{figure}[htb!]
  80. \centering
  81. \caption{Pie de la figura}
  82. \includegraphics[width=3.5in]{lion-latex}
  83. \end{figure}
  84. \subsection{Sub-Figures}
  85. The Fig.~\ref{fig:eg-captions}, next in the sub-figure \ref{fig:eg-captions-b}
  86. \begin{figure}[htb]
  87. \centering
  88. \begin{subfigure}[t]{0.45\textwidth}
  89. \centering
  90. \includegraphics[width=\textwidth]{example-image-a}
  91. \caption{Image A}
  92. \label{fig:eg-captions-a}
  93. \end{subfigure}
  94. \hfill
  95. \begin{subfigure}[t]{0.45\textwidth}
  96. \centering
  97. \includegraphics[width=\textwidth]{example-image-b}
  98. \caption{Image B}
  99. \label{fig:eg-captions-b}
  100. \end{subfigure}
  101. \caption{Complete caption}
  102. \label{fig:eg-captions}
  103. \end{figure}
  104. \section{Tables and Headers}
  105. \subsection{Tabular}
  106. \begin{tabular}{c|cc}
  107. Col 1 & Col 2 & Col 3\\\hline
  108. data & res & note \\
  109. data & res & note \\
  110. data & res & note \\
  111. data & res & note \\
  112. \end{tabular}
  113. \subsection{Table}
  114. In the Table \ref{tb:table-example}
  115. \begin{table}[htb]
  116. \centering
  117. \caption{\sc{My Basic Table Example.}}
  118. \label{tb:table-example}
  119. \begin{tabular}{c|cc}
  120. Col 1 & Col 2 & Col 3\\\toprule
  121. data & res & note \\
  122. data & res & note \\
  123. data & res & note \\\midrule
  124. data & res & note \\
  125. \bottomrule
  126. \end{tabular}
  127. \end{table}
  128. \section{Results}
  129. \blindtext{1}
  130. \section{Conclusions}
  131. \blindtext{1}
  132. \end{document}
  133. %%% Local Variables:
  134. %%% mode: latex
  135. %%% TeX-master: t
  136. %%% End: