TB065

Trabajos Prácticos de la Materia Señales y Sistemas
Index Commits Files Refs
primera_parte/latex-template/base.tex.j2 (10684B)
   1 ((=- Latex base template (must inherit)
   2 This template builds upon the abstract template, adding common latex output
   3 functions. Figures, data_text,
   4 This template defines defines a default docclass, the inheriting class should
   5 override this.-=))
   6 
   7 ((*- extends 'document_contents.tex.j2' -*))
   8 
   9 %===============================================================================
  10 % Abstract overrides
  11 %===============================================================================
  12 
  13 ((*- block header -*))
  14     ((* block docclass *))\documentclass[11pt]{article}((* endblock docclass *))
  15 
  16     ((* block packages *))
  17 
  18     % Basic figure setup, for now with no caption control since it's done
  19     % automatically by Pandoc (which extracts ![](path) syntax from Markdown).
  20     \usepackage{graphicx}
  21     % Maintain compatibility with old templates. Remove in nbconvert 6.0
  22     \let\Oldincludegraphics\includegraphics
  23     % Ensure that by default, figures have no caption (until we provide a
  24     % proper Figure object with a Caption API and a way to capture that
  25     % in the conversion process - todo).
  26     \usepackage{caption}
  27     \DeclareCaptionFormat{nocaption}{}
  28     \captionsetup{format=nocaption,aboveskip=0pt,belowskip=-20pt}
  29     \setlength{\belowcaptionskip}{-20pt}
  30 
  31     \usepackage[spanish]{babel}
  32     \usepackage{float}
  33     \floatplacement{figure}{H} % forces figures to be placed at the correct location
  34     \usepackage{xcolor} % Allow colors to be defined
  35     \usepackage{enumerate} % Needed for markdown enumerations to work
  36     \usepackage[a4paper]{geometry} % Used to adjust the document margins
  37     \usepackage{amsmath} % Equations
  38     \usepackage{amssymb} % Equations
  39     \usepackage{textcomp} % defines textquotesingle
  40     % Hack from http://tex.stackexchange.com/a/47451/13684:
  41     \AtBeginDocument{%
  42         \def\PYZsq{\textquotesingle}% Upright quotes in Pygmentized code
  43     }
  44     \usepackage{upquote} % Upright quotes for verbatim code
  45     \usepackage{eurosym} % defines \euro
  46     \usepackage{helvet}
  47     \renewcommand\familydefault{\sfdefault}
  48 
  49     \usepackage{iftex}
  50     \ifPDFTeX
  51         \usepackage[T1]{fontenc}
  52         \IfFileExists{alphabeta.sty}{
  53               \usepackage{alphabeta}
  54           }{
  55               \usepackage[mathletters]{ucs}
  56               \usepackage[utf8x]{inputenc}
  57           }
  58     \else
  59         \usepackage{fontspec}
  60         \usepackage{unicode-math}
  61     \fi
  62 
  63     \usepackage{fancyvrb} % verbatim replacement that allows latex
  64     \usepackage{grffile} % extends the file name processing of package graphics
  65                          % to support a larger range
  66     \makeatletter % fix for old versions of grffile with XeLaTeX
  67     \@ifpackagelater{grffile}{2019/11/01}
  68     {
  69       % Do nothing on new versions
  70     }
  71     {
  72       \def\Gread@@xetex#1{%
  73         \IfFileExists{"\Gin@base".bb}%
  74         {\Gread@eps{\Gin@base.bb}}%
  75         {\Gread@@xetex@aux#1}%
  76       }
  77     }
  78     \makeatother
  79     \usepackage[Export]{adjustbox} % Used to constrain images to a maximum size
  80     \adjustboxset{max size={\linewidth}{\paperheight}}
  81 
  82     % The hyperref package gives us a pdf with properly built
  83     % internal navigation ('pdf bookmarks' for the table of contents,
  84     % internal cross-reference links, web links for URLs, etc.)
  85     \usepackage{hyperref}
  86     % The default LaTeX title has an obnoxious amount of whitespace. By default,
  87     % titling removes some of it. It also provides customization options.
  88     \usepackage{titling}
  89     \setlength{\droptitle}{-2em}
  90     \usepackage{longtable} % longtable support required by pandoc >1.10
  91     \usepackage{booktabs}  % table support for pandoc > 1.12.2
  92     \usepackage{array}     % table support for pandoc >= 2.11.3
  93     \usepackage{calc}      % table minipage width calculation for pandoc >= 2.11.1
  94     \usepackage[inline]{enumitem} % IRkernel/repr support (it uses the enumerate* environment)
  95     \usepackage[normalem]{ulem} % ulem is needed to support strikethroughs (\sout)
  96                                 % normalem makes italics be italics, not underlines
  97     \usepackage{soul}      % strikethrough (\st) support for pandoc >= 3.0.0
  98     \usepackage{mathrsfs}
  99     ((* endblock packages *))
 100 
 101     ((* block definitions *))
 102     % Colors for the hyperref package
 103     \definecolor{urlcolor}{rgb}{0,.145,.698}
 104     \definecolor{linkcolor}{rgb}{.71,0.21,0.01}
 105     \definecolor{citecolor}{rgb}{.12,.54,.11}
 106 
 107     % ANSI colors
 108     \definecolor{ansi-black}{HTML}{3E424D}
 109     \definecolor{ansi-black-intense}{HTML}{282C36}
 110     \definecolor{ansi-red}{HTML}{E75C58}
 111     \definecolor{ansi-red-intense}{HTML}{B22B31}
 112     \definecolor{ansi-green}{HTML}{00A250}
 113     \definecolor{ansi-green-intense}{HTML}{007427}
 114     \definecolor{ansi-yellow}{HTML}{DDB62B}
 115     \definecolor{ansi-yellow-intense}{HTML}{B27D12}
 116     \definecolor{ansi-blue}{HTML}{208FFB}
 117     \definecolor{ansi-blue-intense}{HTML}{0065CA}
 118     \definecolor{ansi-magenta}{HTML}{D160C4}
 119     \definecolor{ansi-magenta-intense}{HTML}{A03196}
 120     \definecolor{ansi-cyan}{HTML}{60C6C8}
 121     \definecolor{ansi-cyan-intense}{HTML}{258F8F}
 122     \definecolor{ansi-white}{HTML}{C5C1B4}
 123     \definecolor{ansi-white-intense}{HTML}{A1A6B2}
 124     \definecolor{ansi-default-inverse-fg}{HTML}{FFFFFF}
 125     \definecolor{ansi-default-inverse-bg}{HTML}{000000}
 126 
 127     % common color for the border for error outputs.
 128     \definecolor{outerrorbackground}{HTML}{FFDFDF}
 129 
 130     % commands and environments needed by pandoc snippets
 131     % extracted from the output of `pandoc -s`
 132     \providecommand{\tightlist}{%
 133       \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
 134     \DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
 135     % Add ',fontsize=\small' for more characters per line
 136     \newenvironment{Shaded}{}{}
 137     \newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{{#1}}}}
 138     \newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{{#1}}}
 139     \newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
 140     \newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
 141     \newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
 142     \newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
 143     \newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
 144     \newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{{#1}}}}
 145     \newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{{#1}}}
 146     \newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
 147     \newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{{#1}}}
 148     \newcommand{\RegionMarkerTok}[1]{{#1}}
 149     \newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
 150     \newcommand{\NormalTok}[1]{{#1}}
 151 
 152     % Additional commands for more recent versions of Pandoc
 153     \newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{{#1}}}
 154     \newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
 155     \newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
 156     \newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.73,0.40,0.53}{{#1}}}
 157     \newcommand{\ImportTok}[1]{{#1}}
 158     \newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.73,0.13,0.13}{\textit{{#1}}}}
 159     \newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
 160     \newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
 161     \newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{{#1}}}
 162     \newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{{#1}}}}
 163     \newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.40,0.40,0.40}{{#1}}}
 164     \newcommand{\BuiltInTok}[1]{{#1}}
 165     \newcommand{\ExtensionTok}[1]{{#1}}
 166     \newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.48,0.00}{{#1}}}
 167     \newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{{#1}}}
 168     \newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
 169     \newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
 170 
 171 
 172     % Define a nice break command that doesn't care if a line doesn't already
 173     % exist.
 174     \def\br{\hspace*{\fill} \\* }
 175     % Math Jax compatibility definitions
 176     \def\gt{>}
 177     \def\lt{<}
 178     \let\Oldtex\TeX
 179     \let\Oldlatex\LaTeX
 180     \renewcommand{\TeX}{\textrm{\Oldtex}}
 181     \renewcommand{\LaTeX}{\textrm{\Oldlatex}}
 182     % Document parameters
 183     % Document title
 184     ((* block title -*))
 185     ((*- set nb_title = nb.metadata.get('title', '') or resources['metadata']['name'] -*))
 186     ((*- set nb_subtitle = nb.metadata.get('subtitle', '') -*))
 187     \title{
 188         \Huge{\bfseries ((( nb_title | escape_latex ))) \\ 
 189         \large{\mdseries ((( nb_subtitle )))}}
 190     }
 191 
 192     ((*- endblock title *))
 193     ((* block date *))
 194     ((* if 'date' in nb.metadata *))
 195     \small{\date{((( nb.metadata.date | escape_latex )))}}
 196     ((* endif *))
 197     ((* endblock date *))
 198     ((* block author *))
 199     ((* if 'authors' in nb.metadata *))
 200     % ((( nb.metadata.authors | join('\\\\ ', attribute='name'))))
 201     % ((( nb.metadata.authors | join('\\\\ ', attribute='email'))))
 202 
 203     \author{
 204         ((*- for author in nb.metadata.authors -*))
 205             ((*- if not nb.metadata.authors.last -*))
 206                 \small\mdseries ((( author.name ))) - \itshape\href{mailto:((( author.email )))}{((( author.email )))} \\ 
 207             ((*- else -*))
 208                 ((( author.name ))) - ((( author.email )))
 209             ((*- endif -*))
 210         ((*- endfor -*))
 211     }
 212 
 213     ((* endif *))
 214     ((* endblock author *))
 215     ((* endblock definitions *))
 216 
 217     ((* block commands *))
 218     % Prevent overflowing lines due to hard-to-break entities
 219     \sloppy
 220     % Setup hyperref package
 221     \hypersetup{
 222       breaklinks=true,  % so long urls are correctly broken across lines
 223       colorlinks=true,
 224       urlcolor=urlcolor,
 225       linkcolor=linkcolor,
 226       citecolor=citecolor,
 227       }
 228     % Slightly bigger margins than the latex defaults
 229     ((* block margins *))
 230     \geometry{
 231         verbose,
 232         tmargin=2.50cm, 
 233         bmargin=1.25cm,
 234         lmargin=1.90cm,
 235         rmargin=1.90cm,
 236         includefoot,
 237         heightrounded,
 238         footskip=1.20cm
 239     }
 240 
 241     ((* endblock margins *))
 242     ((* endblock commands *))
 243 ((* endblock header *))
 244 
 245 ((* block body *))
 246 \begin{document}
 247     ((* block predoc *))
 248     ((* block maketitle *))
 249     \maketitle
 250     ((* endblock maketitle *))
 251     ((* block abstract *))((* endblock abstract *))
 252     \vspace{2em}
 253     ((* endblock predoc *))
 254 
 255     ((( super() )))
 256 
 257     % Add a bibliography block to the postdoc
 258     ((* block postdoc *))
 259     ((* block bibliography *))((* endblock bibliography *))
 260     ((* endblock postdoc *))
 261 \end{document}
 262 ((* endblock body *))