Skip to content

Commit

Permalink
Version 1.2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
ppizarror committed Oct 29, 2023
1 parent 755ed39 commit 84aa507
Show file tree
Hide file tree
Showing 23 changed files with 566 additions and 536 deletions.
2 changes: 1 addition & 1 deletion example.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% Template: Artículo LaTeX
% Documento: Archivo de ejemplo
% Versión: 1.2.8 (26/10/2023)
% Versión: 1.2.9 (29/10/2023)
% Codificación: UTF-8
%
% Autor: Pablo Pizarro R.
Expand Down
2 changes: 1 addition & 1 deletion main.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% Template: Artículo LaTeX
% Documento: Archivo principal
% Versión: 1.2.8 (26/10/2023)
% Versión: 1.2.9 (29/10/2023)
% Codificación: UTF-8
%
% Autor: Pablo Pizarro R.
Expand Down
232 changes: 116 additions & 116 deletions src/cfg/final.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% Template: Artículo LaTeX
% Documento: Configuraciones finales
% Versión: 1.2.8 (26/10/2023)
% Versión: 1.2.9 (29/10/2023)
% Codificación: UTF-8
%
% Autor: Pablo Pizarro R.
Expand All @@ -9,7 +9,7 @@
% Manual template: [https://latex.ppizarror.com/articulo]
% Licencia MIT: [https://opensource.org/licenses/MIT]

\newcommand{\templateFinalcfg}{
\newcommand{\templateFinalcfg}{%

% -------------------------------------------------------------------------
% Se restablecen headers y footers
Expand All @@ -21,207 +21,207 @@
% Crea funciones para numerar objetos
% -------------------------------------------------------------------------
% Numeración de la sección en los objetos código fuente
\ifthenelse{\equal{\showsectioncaptioncode}{none}}{
\ifthenelse{\equal{\showsectioncaptioncode}{none}}{%
\def\sectionobjectnumcode {}
}{
\ifthenelse{\equal{\showsectioncaptioncode}{sec}}{
}{%
\ifthenelse{\equal{\showsectioncaptioncode}{sec}}{%
\def\sectionobjectnumcode {\thesection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptioncode}{ssec}}{
}{%
\ifthenelse{\equal{\showsectioncaptioncode}{ssec}}{%
\def\sectionobjectnumcode {\thesubsection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptioncode}{sssec}}{
}{%
\ifthenelse{\equal{\showsectioncaptioncode}{sssec}}{%
\def\sectionobjectnumcode {\thesubsubsection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptioncode}{ssssec}}{
}{%
\ifthenelse{\equal{\showsectioncaptioncode}{ssssec}}{%
\def\sectionobjectnumcode {\thesubsubsubsection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptioncode}{chap}}{
}{%
\ifthenelse{\equal{\showsectioncaptioncode}{chap}}{%
\def\sectionobjectnumcode {\thechapter\sectioncaptiondelimiter}
}{
}{%
\throwbadconfig{Valor configuracion incorrecto}{\showsectioncaptioncode}{none,chap,sec,ssec,sssec,ssssec}}}}}}
}

% Numeración de la sección en los objetos ecuaciones
\ifthenelse{\equal{\showsectioncaptioneqn}{none}}{
\ifthenelse{\equal{\showsectioncaptioneqn}{none}}{%
\def\sectionobjectnumeqn {}
}{
\ifthenelse{\equal{\showsectioncaptioneqn}{sec}}{
}{%
\ifthenelse{\equal{\showsectioncaptioneqn}{sec}}{%
\def\sectionobjectnumeqn {\thesection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptioneqn}{ssec}}{
}{%
\ifthenelse{\equal{\showsectioncaptioneqn}{ssec}}{%
\def\sectionobjectnumeqn {\thesubsection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptioneqn}{sssec}}{
}{%
\ifthenelse{\equal{\showsectioncaptioneqn}{sssec}}{%
\def\sectionobjectnumeqn {\thesubsubsection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptioneqn}{ssssec}}{
}{%
\ifthenelse{\equal{\showsectioncaptioneqn}{ssssec}}{%
\def\sectionobjectnumeqn {\thesubsubsubsection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptioneqn}{chap}}{
}{%
\ifthenelse{\equal{\showsectioncaptioneqn}{chap}}{%
\def\sectionobjectnumeqn {\thechapter\sectioncaptiondelimiter}
}{
}{%
\throwbadconfig{Valor configuracion incorrecto}{\showsectioncaptioneqn}{none,chap,sec,ssec,sssec,ssssec}}}}}}
}

% Numeración de la sección en los objetos figuras
\ifthenelse{\equal{\showsectioncaptionfig}{none}}{
\ifthenelse{\equal{\showsectioncaptionfig}{none}}{%
\def\sectionobjectnumfig {}
}{
\ifthenelse{\equal{\showsectioncaptionfig}{sec}}{
}{%
\ifthenelse{\equal{\showsectioncaptionfig}{sec}}{%
\def\sectionobjectnumfig {\thesection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptionfig}{ssec}}{
}{%
\ifthenelse{\equal{\showsectioncaptionfig}{ssec}}{%
\def\sectionobjectnumfig {\thesubsection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptionfig}{sssec}}{
}{%
\ifthenelse{\equal{\showsectioncaptionfig}{sssec}}{%
\def\sectionobjectnumfig {\thesubsubsection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptionfig}{ssssec}}{
}{%
\ifthenelse{\equal{\showsectioncaptionfig}{ssssec}}{%
\def\sectionobjectnumfig {\thesubsubsubsection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptionfig}{chap}}{
}{%
\ifthenelse{\equal{\showsectioncaptionfig}{chap}}{%
\def\sectionobjectnumfig {\thechapter\sectioncaptiondelimiter}
}{
}{%
\throwbadconfig{Valor configuracion incorrecto}{\showsectioncaptionfig}{none,chap,sec,ssec,sssec,ssssec}}}}}}
}

% Numeración de la sección en los objetos tablas
\ifthenelse{\equal{\showsectioncaptiontab}{none}}{
\ifthenelse{\equal{\showsectioncaptiontab}{none}}{%
\def\sectionobjectnumtab {}
}{
\ifthenelse{\equal{\showsectioncaptiontab}{sec}}{
}{%
\ifthenelse{\equal{\showsectioncaptiontab}{sec}}{%
\def\sectionobjectnumtab {\thesection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptiontab}{ssec}}{
}{%
\ifthenelse{\equal{\showsectioncaptiontab}{ssec}}{%
\def\sectionobjectnumtab {\thesubsection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptiontab}{sssec}}{
}{%
\ifthenelse{\equal{\showsectioncaptiontab}{sssec}}{%
\def\sectionobjectnumtab {\thesubsubsection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptiontab}{ssssec}}{
}{%
\ifthenelse{\equal{\showsectioncaptiontab}{ssssec}}{%
\def\sectionobjectnumtab {\thesubsubsubsection\sectioncaptiondelimiter}
}{
\ifthenelse{\equal{\showsectioncaptiontab}{chap}}{
}{%
\ifthenelse{\equal{\showsectioncaptiontab}{chap}}{%
\def\sectionobjectnumtab {\thechapter\sectioncaptiondelimiter}
}{
}{%
\throwbadconfig{Valor configuracion incorrecto}{\showsectioncaptiontab}{none,chap,sec,ssec,sssec,ssssec}}}}}}
}

% -------------------------------------------------------------------------
% Modifica numeración de objetos
% -------------------------------------------------------------------------
% Código fuente, incluir sección
\ifthenelse{\equal{\captionnumcode}{arabic}}{
\ifthenelse{\equal{\captionnumcode}{arabic}}{%
\renewcommand{\thelstlisting}{\sectionobjectnumcode\arabic{lstlisting}}
}{
\ifthenelse{\equal{\captionnumcode}{alph}}{
}{%
\ifthenelse{\equal{\captionnumcode}{alph}}{%
\renewcommand{\thelstlisting}{\sectionobjectnumcode\alph{lstlisting}}
}{
\ifthenelse{\equal{\captionnumcode}{Alph}}{
}{%
\ifthenelse{\equal{\captionnumcode}{Alph}}{%
\renewcommand{\thelstlisting}{\sectionobjectnumcode\Alph{lstlisting}}
}{
\ifthenelse{\equal{\captionnumcode}{roman}}{
}{%
\ifthenelse{\equal{\captionnumcode}{roman}}{%
\renewcommand{\thelstlisting}{\sectionobjectnumcode\roman{lstlisting}}
}{
\ifthenelse{\equal{\captionnumcode}{Roman}}{
}{%
\ifthenelse{\equal{\captionnumcode}{Roman}}{%
\renewcommand{\thelstlisting}{\sectionobjectnumcode\Roman{lstlisting}}
}{
}{%
\throwbadconfig{Tipo numero codigo fuente desconocido}{\captionnumcode}{arabic,alph,Alph,roman,Roman}}}}}
}

% Ecuaciones, incluir sección
\ifthenelse{\equal{\captionnumequation}{arabic}}{
\ifthenelse{\equal{\captionnumequation}{arabic}}{%
\renewcommand{\theequation}{\sectionobjectnumeqn\arabic{equation}}
}{
\ifthenelse{\equal{\captionnumequation}{alph}}{
}{%
\ifthenelse{\equal{\captionnumequation}{alph}}{%
\renewcommand{\theequation}{\sectionobjectnumeqn\alph{equation}}
}{
\ifthenelse{\equal{\captionnumequation}{Alph}}{
}{%
\ifthenelse{\equal{\captionnumequation}{Alph}}{%
\renewcommand{\theequation}{\sectionobjectnumeqn\Alph{equation}}
}{
\ifthenelse{\equal{\captionnumequation}{roman}}{
}{%
\ifthenelse{\equal{\captionnumequation}{roman}}{%
\renewcommand{\theequation}{\sectionobjectnumeqn\roman{equation}}
}{
\ifthenelse{\equal{\captionnumequation}{Roman}}{
}{%
\ifthenelse{\equal{\captionnumequation}{Roman}}{%
\renewcommand{\theequation}{\sectionobjectnumeqn\Roman{equation}}
}{
}{%
\throwbadconfig{Tipo numero ecuacion desconocido}{\captionnumequation}{arabic,alph,Alph,roman,Roman}}}}}
}

% Figuras, incluir sección
\ifthenelse{\equal{\captionnumfigure}{arabic}}{
\ifthenelse{\equal{\captionnumfigure}{arabic}}{%
\renewcommand{\thefigure}{\sectionobjectnumfig\arabic{figure}}
}{
\ifthenelse{\equal{\captionnumfigure}{alph}}{
}{%
\ifthenelse{\equal{\captionnumfigure}{alph}}{%
\renewcommand{\thefigure}{\sectionobjectnumfig\alph{figure}}
}{
\ifthenelse{\equal{\captionnumfigure}{Alph}}{
}{%
\ifthenelse{\equal{\captionnumfigure}{Alph}}{%
\renewcommand{\thefigure}{\sectionobjectnumfig\Alph{figure}}
}{
\ifthenelse{\equal{\captionnumfigure}{roman}}{
}{%
\ifthenelse{\equal{\captionnumfigure}{roman}}{%
\renewcommand{\thefigure}{\sectionobjectnumfig\roman{figure}}
}{
\ifthenelse{\equal{\captionnumfigure}{Roman}}{
}{%
\ifthenelse{\equal{\captionnumfigure}{Roman}}{%
\renewcommand{\thefigure}{\sectionobjectnumfig\Roman{figure}}
}{
}{%
\throwbadconfig{Tipo numero figura desconocido}{\captionnumfigure}{arabic,alph,Alph,roman,Roman}}}}}
}

% Subfiguras, no usar secciones ya que son hijas de figura
\ifthenelse{\equal{\captionnumsubfigure}{arabic}}{
\ifthenelse{\equal{\captionnumsubfigure}{arabic}}{%
\renewcommand{\thesubfigure}{\arabic{subfigure}}
}{
\ifthenelse{\equal{\captionnumsubfigure}{alph}}{
}{%
\ifthenelse{\equal{\captionnumsubfigure}{alph}}{%
\renewcommand{\thesubfigure}{\alph{subfigure}}
}{
\ifthenelse{\equal{\captionnumsubfigure}{Alph}}{
}{%
\ifthenelse{\equal{\captionnumsubfigure}{Alph}}{%
\renewcommand{\thesubfigure}{\Alph{subfigure}}
}{
\ifthenelse{\equal{\captionnumsubfigure}{roman}}{
}{%
\ifthenelse{\equal{\captionnumsubfigure}{roman}}{%
\renewcommand{\thesubfigure}{\roman{subfigure}}
}{
\ifthenelse{\equal{\captionnumsubfigure}{Roman}}{
}{%
\ifthenelse{\equal{\captionnumsubfigure}{Roman}}{%
\renewcommand{\thesubfigure}{\Roman{subfigure}}
}{
}{%
\throwbadconfig{Tipo numero subfigura desconocido}{\captionnumsubfigure}{arabic,alph,Alph,roman,Roman}}}}}
}

% Tablas, incluir sección
\ifthenelse{\equal{\captionnumtable}{arabic}}{
\ifthenelse{\equal{\captionnumtable}{arabic}}{%
\renewcommand{\thetable}{\sectionobjectnumtab\arabic{table}}
}{
\ifthenelse{\equal{\captionnumtable}{alph}}{
}{%
\ifthenelse{\equal{\captionnumtable}{alph}}{%
\renewcommand{\thetable}{\sectionobjectnumtab\alph{table}}
}{
\ifthenelse{\equal{\captionnumtable}{Alph}}{
}{%
\ifthenelse{\equal{\captionnumtable}{Alph}}{%
\renewcommand{\thetable}{\sectionobjectnumtab\Alph{table}}
}{
\ifthenelse{\equal{\captionnumtable}{roman}}{
}{%
\ifthenelse{\equal{\captionnumtable}{roman}}{%
\renewcommand{\thetable}{\sectionobjectnumtab\roman{table}}
}{
\ifthenelse{\equal{\captionnumtable}{Roman}}{
}{%
\ifthenelse{\equal{\captionnumtable}{Roman}}{%
\renewcommand{\thetable}{\sectionobjectnumtab\Roman{table}}
}{
}{%
\throwbadconfig{Tipo numero tabla desconocido}{\captionnumtable}{arabic,alph,Alph,roman,Roman}}}}}
}

% Subtablas, no incluir sección ya que son hijas de las tablas
\ifthenelse{\equal{\captionnumsubtable}{arabic}}{
\ifthenelse{\equal{\captionnumsubtable}{arabic}}{%
\renewcommand{\thesubtable}{\arabic{subtable}}
}{
\ifthenelse{\equal{\captionnumsubtable}{alph}}{
}{%
\ifthenelse{\equal{\captionnumsubtable}{alph}}{%
\renewcommand{\thesubtable}{\alph{subtable}}
}{
\ifthenelse{\equal{\captionnumsubtable}{Alph}}{
}{%
\ifthenelse{\equal{\captionnumsubtable}{Alph}}{%
\renewcommand{\thesubtable}{\Alph{subtable}}
}{
\ifthenelse{\equal{\captionnumsubtable}{roman}}{
}{%
\ifthenelse{\equal{\captionnumsubtable}{roman}}{%
\renewcommand{\thesubtable}{\roman{subtable}}
}{
\ifthenelse{\equal{\captionnumsubtable}{Roman}}{
}{%
\ifthenelse{\equal{\captionnumsubtable}{Roman}}{%
\renewcommand{\thesubtable}{\Roman{subtable}}
}{
}{%
\throwbadconfig{Tipo numero subtabla desconocido}{\captionnumsubtable}{arabic,alph,Alph,roman,Roman}}}}}
}

Expand All @@ -235,13 +235,13 @@
% Se restablecen números de página y secciones
% -------------------------------------------------------------------------
% Se usa número de páginas en arábigo si es que se tenía activado los números romanos
\ifthenelse{\equal{\predocpageromannumber}{true}}{
\renewcommand{\thepage}{\arabic{page}}}{
\ifthenelse{\equal{\predocpageromannumber}{true}}{%
\renewcommand{\thepage}{\arabic{page}}}{%
}

% Reinicia número de página
\ifthenelse{\equal{\predocresetpagenumber}{true}}{
\setcounter{page}{1}}{
\ifthenelse{\equal{\predocresetpagenumber}{true}}{%
\setcounter{page}{1}}{%
}

\setcounter{section}{0}
Expand All @@ -250,8 +250,8 @@
% -------------------------------------------------------------------------
% Muestra los números de línea
% -------------------------------------------------------------------------
\ifthenelse{\equal{\showlinenumbers}{true}}{
\linenumbers}{
\ifthenelse{\equal{\showlinenumbers}{true}}{%
\linenumbers}{%
}

% -------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 84aa507

Please sign in to comment.