From 89b1e06e4e160994520618f6e5bcc04215566571 Mon Sep 17 00:00:00 2001 From: ppizarror Date: Fri, 26 Nov 2021 19:35:58 -0300 Subject: [PATCH] Version 1.0.4 --- example.tex | 2 +- main.tex | 2 +- src/cfg/final.tex | 2 +- src/cfg/init.tex | 12 +-- src/cfg/page.tex | 14 ++-- src/cfg/unicode.tex | 2 +- src/cmd/articulo.tex | 2 +- src/cmd/column.tex | 2 +- src/cmd/core.tex | 2 +- src/cmd/equation.tex | 2 +- src/cmd/image.tex | 60 ++++++++++---- src/cmd/math.tex | 2 +- src/cmd/other.tex | 2 +- src/cmd/title.tex | 68 +++++++++++++++- src/config.tex | 2 +- src/defs.tex | 2 +- src/env/environments.tex | 17 +++- src/env/imports.tex | 3 +- src/etc/example.tex | 2 +- src/style/code.tex | 2 +- src/style/color.tex | 2 +- src/style/other.tex | 2 +- template.tex | 164 +++++++++++++++++++++++++++++++++------ template_config.tex | 2 +- 24 files changed, 300 insertions(+), 72 deletions(-) diff --git a/example.tex b/example.tex index 106b823..cace765 100644 --- a/example.tex +++ b/example.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Archivo de ejemplo -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/main.tex b/main.tex index b0cf66f..02ad195 100644 --- a/main.tex +++ b/main.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Archivo principal -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/src/cfg/final.tex b/src/cfg/final.tex index e4dcdc3..f106b02 100644 --- a/src/cfg/final.tex +++ b/src/cfg/final.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Configuraciones finales -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/src/cfg/init.tex b/src/cfg/init.tex index 6725938..f97f82f 100644 --- a/src/cfg/init.tex +++ b/src/cfg/init.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Configuración inicial del template -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. @@ -65,16 +65,16 @@ Template.Author.Email={pablo@ppizarror.com}, Template.Author.Web={https://ppizarror.com}, Template.Author={Pablo Pizarro R.}, - Template.Date={23/11/2021}, + Template.Date={26/11/2021}, Template.Encoding={UTF-8}, Template.Latex.Compiler={pdflatex}, Template.License.Type={MIT}, Template.License.Web={https://opensource.org/licenses/MIT}, Template.Name={Template-Articulo}, Template.Type={Normal}, - Template.Version.Dev={1.0.3-ARTC}, - Template.Version.Hash={2676B03247B872C1582C869C896B8005}, - Template.Version.Release={1.0.3}, + Template.Version.Dev={1.0.4-ARTC}, + Template.Version.Hash={BCA565638623A35E91D525F9101107B8}, + Template.Version.Release={1.0.4}, Template.Web.Dev={https://github.com/Template-Latex/Template-Articulo}, Template.Web.Manual={https://latex.ppizarror.com/articulo}, }, @@ -82,7 +82,7 @@ pdfmenubar={\cfgpdfmenubar}, pdfpagelayout={\cfgpdflayout}, pdfpagemode={\cfgpdfpagemode}, - pdfproducer={Template-Articulo v1.0.3 | (Pablo Pizarro R.) ppizarror.com}, + pdfproducer={Template-Articulo v1.0.4 | (Pablo Pizarro R.) ppizarror.com}, pdfremotestartview={Fit}, pdfstartpage={1}, pdfstartview={\cfgpdfpageview}, diff --git a/src/cfg/page.tex b/src/cfg/page.tex index 3cf80bc..468f8b8 100644 --- a/src/cfg/page.tex +++ b/src/cfg/page.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Configuración de página -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. @@ -69,17 +69,19 @@ \color{\sssectioncolor} \sssectionfontsize \sssectionfontstyle \selectfont% } \titleformat{\subsubsubsection}{% - \color{\ssssectioncolor} \ssssectionfontsz \ssssectionfontstyle - }{% - \thesubsubsubsection\charaftersectionnum\spacingaftersection}{0em}{% + \color{\ssssectioncolor} \ssssectionfontsz \ssssectionfontstyle% + }{% + \thesubsubsubsection\charaftersectionnum\spacingaftersection% + \corepatchaftersubsubsubsection% + }{0em}{% } \def\bibfont {\fontsizerefbibl} % Tamaño de fuente de las referencias % ------------------------------------------------------------------------- % Estilo citas % ------------------------------------------------------------------------- - \ifthenelse{\equal{\stylecitereferences}{apacite}}{ - \renewcommand{\BOthers}[1]{\apacitebothers\hbox{}} + \ifthenelse{\equal{\stylecitereferences}{apacite}}{% + \renewcommand{\BOthers}[1]{\apacitebothers\hbox{}}% }{} % ------------------------------------------------------------------------- diff --git a/src/cfg/unicode.tex b/src/cfg/unicode.tex index c7c3ae1..4ef74b1 100644 --- a/src/cfg/unicode.tex +++ b/src/cfg/unicode.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Caracteres Unicode -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/src/cmd/articulo.tex b/src/cmd/articulo.tex index f97d26a..6ad1df2 100644 --- a/src/cmd/articulo.tex +++ b/src/cmd/articulo.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Funciones exclusivas de Template-Articulo -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/src/cmd/column.tex b/src/cmd/column.tex index d1b7ff1..76a2317 100644 --- a/src/cmd/column.tex +++ b/src/cmd/column.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Funciones para crear columnas con contenido -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/src/cmd/core.tex b/src/cmd/core.tex index b6a2880..c261009 100644 --- a/src/cmd/core.tex +++ b/src/cmd/core.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Funciones del núcleo del template -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/src/cmd/equation.tex b/src/cmd/equation.tex index c07b39a..a9b17cb 100644 --- a/src/cmd/equation.tex +++ b/src/cmd/equation.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Funciones para insertar ecuaciones -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/src/cmd/image.tex b/src/cmd/image.tex index 2ed818d..2e3853e 100644 --- a/src/cmd/image.tex +++ b/src/cmd/image.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Funciones para insertar imágenes -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. @@ -10,6 +10,7 @@ % Licencia MIT: [https://opensource.org/licenses/MIT] \global\def\GLOBALimagelink {} % Almacena el link de la imagen +\global\def\GLOBALimagenextmarginv {0 cm} % Almacena el margen vertical de las imágenes % Calcula largo hspace % Regresión entre 35,46446->9 y 52,68402->13,5 @@ -41,23 +42,32 @@ }{}% \ifthenelse{\equal{#5}{}}{ % Sin label \ifthenelse{\equal{\GLOBALimagelink}{}}{ % Sin link - \fbox{\includegraphics[#3]{#2}}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\includegraphics[#3]{#2}} + }% }{ % Con link - \fbox{\href{\GLOBALimagelink}{\includegraphics[#3]{#2}}}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\href{\GLOBALimagelink}{\includegraphics[#3]{#2}}}% + }% }% }{ % Con label \ifthenelse{\equal{\GLOBALimagelink}{}}{ % Sin link \subfloat[#5]{% - \fbox{\includegraphics[#3]{#2}}#1% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\includegraphics[#3]{#2}}#1% + }% }% }{ % Con link \subfloat[#5]{% - \fbox{\href{\GLOBALimagelink}{\includegraphics[#3]{#2}}#1}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\href{\GLOBALimagelink}{\includegraphics[#3]{#2}}#1}% + }% }% }% }% \endgroup% \global\def\GLOBALenvimageadded {true}% + \global\def\GLOBALimagenextmarginv {0 cm}% } % Añade una imagen a un env "image" con borde sin leyenda @@ -105,36 +115,53 @@ \ifthenelse{\equal{#7}{}}{ % Sin label \ifthenelse{\equal{\animatedimageloop}{true}}{ % Con loop \ifthenelse{\equal{\animatedimageautoplay}{true}}{ % Con autoplay - \fbox{\animategraphics[loop,autoplay,#3]{#4}{#2-}{0}{#5}}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[loop,autoplay,#3]{#4}{#2-}{0}{#5}}% + }% }{ % Sin autoplay - \fbox{\animategraphics[loop,#3]{#4}{#2-}{0}{#5}}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[loop,#3]{#4}{#2-}{0}{#5}}% + }% }% }{ % Sin loop \ifthenelse{\equal{\animatedimageautoplay}{true}}{ % Con autoplay - \fbox{\animategraphics[autoplay,#3]{#4}{#2-}{0}{#5}}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[autoplay,#3]{#4}{#2-}{0}{#5}}% + }% }{ % Sin autoplay - \fbox{\animategraphics[#3]{#4}{#2-}{0}{#5}}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[#3]{#4}{#2-}{0}{#5}}% + }% }% }% }{ % Con label \subfloat[#7]{% \ifthenelse{\equal{\animatedimageloop}{true}}{ % Con loop \ifthenelse{\equal{\animatedimageautoplay}{true}}{ % Con autoplay - \fbox{\animategraphics[loop,autoplay,#3]{#4}{#2-}{0}{#5}#1}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[loop,autoplay,#3]{#4}{#2-}{0}{#5}#1}% + }% }{ % Sin autoplay - \fbox{\animategraphics[loop,#3]{#4}{#2-}{0}{#5}#1}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[loop,#3]{#4}{#2-}{0}{#5}#1}% + }% }% }{ % Sin loop \ifthenelse{\equal{\animatedimageautoplay}{true}}{ % Con autoplay - \fbox{\animategraphics[autoplay,#3]{#4}{#2-}{0}{#5}#1}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[autoplay,#3]{#4}{#2-}{0}{#5}#1}% + }% }{ % Sin autoplay - \fbox{\animategraphics[#3]{#4}{#2-}{0}{#5}#1}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[#3]{#4}{#2-}{0}{#5}#1}% + }% }% }% }% }% \endgroup% \global\def\GLOBALenvimageadded {true}% + \global\def\GLOBALimagenextmarginv {0 cm}% } % Añade una imagen a un env "image" con borde sin leyenda animada @@ -220,6 +247,13 @@ ~ \\ \vspace*{#1}% } +% Establece el margen vertical de la siguiente imagen +% #1 Margen vertical +\newcommand{\setnextimagevmargin}[1]{% + \emptyvarerr{\setimagesvmargin}{#1}{Tamaño del margen}% + \global\def\GLOBALimagenextmarginv {#1}% +} + % Insertar una imagen % #1 Label (opcional) % #2 Dirección de la imagen diff --git a/src/cmd/math.tex b/src/cmd/math.tex index 5b2fb3b..0ceb7a1 100644 --- a/src/cmd/math.tex +++ b/src/cmd/math.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Funciones matemáticas -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/src/cmd/other.tex b/src/cmd/other.tex index 8734d61..db5ca0c 100644 --- a/src/cmd/other.tex +++ b/src/cmd/other.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Funciones para insertar elementos -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/src/cmd/title.tex b/src/cmd/title.tex index 2374217..fc657b4 100644 --- a/src/cmd/title.tex +++ b/src/cmd/title.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Funciones para insertar títulos -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. @@ -9,6 +9,13 @@ % Manual template: [https://latex.ppizarror.com/articulo] % Licencia MIT: [https://opensource.org/licenses/MIT] +\global\def\GLOBALtitlerequirechapter {false} +\global\def\GLOBALtitleinitchapter {false} +\global\def\GLOBALtitleinitsection {false} +\global\def\GLOBALtitleinitsubsection {false} +\global\def\GLOBALtitleinitsubsubsection {false} +\global\def\GLOBALtitleinitsubsubsubsection {false} + % Activa la numeración en las secciones \def\coreintializetitlenumbering {% % Capítulo @@ -56,6 +63,36 @@ \hbadness=10000% } +% Chequea si los capítulos han sido iniciados +\def\corecheckchapterinitialized {% + \ifthenelse{\equal{\GLOBALtitlerequirechapter}{true}}{% + \ifthenelse{\equal{\GLOBALtitleinitchapter}{false}}{% + \throwwarning{Se requiere un nuevo capitulo para iniciar las secciones}% + }{}% + }{}% +} + +% Chequea si una sección han sido iniciada +\def\corechecksectioninitialized {% + \ifthenelse{\equal{\GLOBALtitleinitsection}{false}}{% + \throwwarning{Se requiere una nueva seccion}% + }{}% +} + +% Chequea si una subsección han sido iniciada +\def\corechecksubsectioninitialized {% + \ifthenelse{\equal{\GLOBALtitleinitsubsection}{false}}{% + \throwwarning{Se requiere una nueva subseccion}% + }{}% +} + +% Chequea si una subsubsección han sido iniciada +\def\corechecksubsubsectioninitialized {% + \ifthenelse{\equal{\GLOBALtitleinitsubsubsection}{false}}{% + \throwwarning{Se requiere una nueva subsubseccion}% + }{}% +} + % Parcha el formato de capítulos \pretocmd{\chapter}{% \ifthenelse{\equal{\showsectioncaptioncode}{chap}}{ % Reinicia código fuente @@ -82,6 +119,11 @@ \global\def\GLOBALsectionanumenabled {false}% \global\def\GLOBALsubsectionanumenabled {false}% \global\def\GLOBALsubsubsectionanumenabled {false}% + \global\def\GLOBALtitleinitchapter {true}% + \global\def\GLOBALtitleinitsection {false}% + \global\def\GLOBALtitleinitsubsection {false}% + \global\def\GLOBALtitleinitsubsubsection {false}% + \global\def\GLOBALtitleinitsubsubsubsection {false}% \coreintializetitlenumbering% }{}{} @@ -111,6 +153,11 @@ \global\def\GLOBALsectionanumenabled {false}% \global\def\GLOBALsubsectionanumenabled {false}% \global\def\GLOBALsubsubsectionanumenabled {false}% + \global\def\GLOBALtitleinitsection {true}% + \global\def\GLOBALtitleinitsubsection {false}% + \global\def\GLOBALtitleinitsubsubsection {false}% + \global\def\GLOBALtitleinitsubsubsubsection {false}% + \corecheckchapterinitialized% \coreintializetitlenumbering% }{}{} @@ -139,6 +186,11 @@ }{}% \global\def\GLOBALsubsectionanumenabled {false}% \global\def\GLOBALsubsubsectionanumenabled {false}% + \global\def\GLOBALtitleinitsubsection {true}% + \global\def\GLOBALtitleinitsubsubsection {false}% + \global\def\GLOBALtitleinitsubsubsubsection {false}% + \corecheckchapterinitialized% + \corechecksectioninitialized% \coreintializetitlenumbering% }{}{} @@ -168,11 +220,16 @@ \setcounter{table}{0}% }{}% \global\def\GLOBALsubsubsectionanumenabled {false}% + \global\def\GLOBALtitleinitsubsubsection {true}% + \global\def\GLOBALtitleinitsubsubsubsection {false}% + \corecheckchapterinitialized% + \corechecksectioninitialized% + \corechecksubsectioninitialized% \coreintializetitlenumbering% }{}{} % Parcha sub-sub-subsecciones -\pretocmd{\subsubsubsection}{% +\def\corepatchaftersubsubsubsection {% \ifthenelse{\equal{\showsectioncaptioncode}{ssssec}}{ % Reinicia código fuente \addtocounter{templateListings}{\value{lstlisting}}% \setcounter{lstlisting}{0}% @@ -193,7 +250,12 @@ \addtocounter{templateTables}{\value{table}}% \setcounter{table}{0}% }{}% -}{}{} + \global\def\GLOBALtitleinitsubsubsubsection {true}% + \corecheckchapterinitialized% + \corechecksectioninitialized% + \corechecksubsectioninitialized% + \corechecksubsubsectioninitialized% +} % Insertar un título sin número % #1 Título diff --git a/src/config.tex b/src/config.tex index f71bb4a..472020d 100644 --- a/src/config.tex +++ b/src/config.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Configuraciones del template -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/src/defs.tex b/src/defs.tex index a39e060..05d9f7c 100644 --- a/src/defs.tex +++ b/src/defs.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Definiciones -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/src/env/environments.tex b/src/env/environments.tex index 3ddf017..e9095fc 100644 --- a/src/env/environments.tex +++ b/src/env/environments.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Definición de entornos -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. @@ -45,6 +45,7 @@ % Crea una sección de anexos \newenvironment{appendixd}{% \global\def\GLOBALenvappendix {true}% + \global\def\GLOBALtitlerequirechapter {false}% \begingroup % Inicia el grupo en nueva página y sección % \clearpage \phantomsection% @@ -55,6 +56,12 @@ \global\def\GLOBALformatnumssection {\formatnumapssection}% \global\def\GLOBALformatnumsssection {\formatnumapsssection}% \global\def\GLOBALformatnumssssection {\formatnumapssssection}% + % Define estado de numeración + \global\def\GLOBALtitleinitchapter {false}% + \global\def\GLOBALtitleinitsection {false}% + \global\def\GLOBALtitleinitsubsection {false}% + \global\def\GLOBALtitleinitsubsubsection {false}% + \global\def\GLOBALtitleinitsubsubsubsection {false}% \bookmarksetup{% numbered={true}, openlevel={\thetemplateBookmarksLevelPrev} @@ -83,12 +90,20 @@ \global\def\GLOBALformatnumssection {\formatnumssection}% \global\def\GLOBALformatnumsssection {\formatnumsssection}% \global\def\GLOBALformatnumssssection {\formatnumssssection}% + % Reestablece estado de numeración + \global\def\GLOBALtitleinitchapter {false}% + \global\def\GLOBALtitleinitsection {false}% + \global\def\GLOBALtitleinitsubsection {false}% + \global\def\GLOBALtitleinitsubsubsection {false}% + \global\def\GLOBALtitleinitsubsubsubsection {false}% \bookmarksetupnext{level={\thetemplateBookmarksLevelPrev}} % Restablece índice marcador \bookmarksetup{% numbered={\cfgpdfsecnumbookmarks}, openlevel={\cfgbookmarksopenlevel} }% \endgroup% + \global\def\GLOBALenvappendix {false}% + \global\def\GLOBALtitlerequirechapter {false}% } % Inicia código fuente con parámetros diff --git a/src/env/imports.tex b/src/env/imports.tex index e9bb9bf..908591d 100644 --- a/src/env/imports.tex +++ b/src/env/imports.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Importación de librerías -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. @@ -148,6 +148,7 @@ % ----------------------------------------------------------------------------- % Librerías con parámetros % ----------------------------------------------------------------------------- +\usepackage[export]{adjustbox} % Agrega nuevas etiquetas de posicionado \usepackage[makeroom]{cancel} % Cancelar términos en fórmulas \usepackage[inline]{enumitem} % Permite enumerar ítems \usepackage[subfigure,titles]{tocloft} % Maneja entradas en el índice diff --git a/src/etc/example.tex b/src/etc/example.tex index 106b823..cace765 100644 --- a/src/etc/example.tex +++ b/src/etc/example.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Archivo de ejemplo -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/src/style/code.tex b/src/style/code.tex index 477bd0a..7b58c1f 100644 --- a/src/style/code.tex +++ b/src/style/code.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Estilos de código fuente -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/src/style/color.tex b/src/style/color.tex index 7992451..4407cc3 100644 --- a/src/style/color.tex +++ b/src/style/color.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Definición de colores -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/src/style/other.tex b/src/style/other.tex index 5e6b7ad..a2ba6a5 100644 --- a/src/style/other.tex +++ b/src/style/other.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Otros estilos -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. diff --git a/template.tex b/template.tex index 55f488b..5e95cab 100644 --- a/template.tex +++ b/template.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Núcleo del template -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R. @@ -164,6 +164,7 @@ % ----------------------------------------------------------------------------- % Librerías con parámetros % ----------------------------------------------------------------------------- +\usepackage[export]{adjustbox} % Agrega nuevas etiquetas de posicionado \usepackage[makeroom]{cancel} % Cancelar términos en fórmulas \usepackage[inline]{enumitem} % Permite enumerar ítems \usepackage[subfigure,titles]{tocloft} % Maneja entradas en el índice @@ -2031,6 +2032,7 @@ } \global\def\GLOBALimagelink {} % Almacena el link de la imagen +\global\def\GLOBALimagenextmarginv {0 cm} % Almacena el margen vertical de las imágenes % Calcula largo hspace % Regresión entre 35,46446->9 y 52,68402->13,5 @@ -2062,23 +2064,32 @@ }{}% \ifthenelse{\equal{#5}{}}{ % Sin label \ifthenelse{\equal{\GLOBALimagelink}{}}{ % Sin link - \fbox{\includegraphics[#3]{#2}}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\includegraphics[#3]{#2}} + }% }{ % Con link - \fbox{\href{\GLOBALimagelink}{\includegraphics[#3]{#2}}}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\href{\GLOBALimagelink}{\includegraphics[#3]{#2}}}% + }% }% }{ % Con label \ifthenelse{\equal{\GLOBALimagelink}{}}{ % Sin link \subfloat[#5]{% - \fbox{\includegraphics[#3]{#2}}#1% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\includegraphics[#3]{#2}}#1% + }% }% }{ % Con link \subfloat[#5]{% - \fbox{\href{\GLOBALimagelink}{\includegraphics[#3]{#2}}#1}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\href{\GLOBALimagelink}{\includegraphics[#3]{#2}}#1}% + }% }% }% }% \endgroup% \global\def\GLOBALenvimageadded {true}% + \global\def\GLOBALimagenextmarginv {0 cm}% } % Añade una imagen a un env "image" con borde sin leyenda @@ -2126,36 +2137,53 @@ \ifthenelse{\equal{#7}{}}{ % Sin label \ifthenelse{\equal{\animatedimageloop}{true}}{ % Con loop \ifthenelse{\equal{\animatedimageautoplay}{true}}{ % Con autoplay - \fbox{\animategraphics[loop,autoplay,#3]{#4}{#2-}{0}{#5}}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[loop,autoplay,#3]{#4}{#2-}{0}{#5}}% + }% }{ % Sin autoplay - \fbox{\animategraphics[loop,#3]{#4}{#2-}{0}{#5}}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[loop,#3]{#4}{#2-}{0}{#5}}% + }% }% }{ % Sin loop \ifthenelse{\equal{\animatedimageautoplay}{true}}{ % Con autoplay - \fbox{\animategraphics[autoplay,#3]{#4}{#2-}{0}{#5}}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[autoplay,#3]{#4}{#2-}{0}{#5}}% + }% }{ % Sin autoplay - \fbox{\animategraphics[#3]{#4}{#2-}{0}{#5}}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[#3]{#4}{#2-}{0}{#5}}% + }% }% }% }{ % Con label \subfloat[#7]{% \ifthenelse{\equal{\animatedimageloop}{true}}{ % Con loop \ifthenelse{\equal{\animatedimageautoplay}{true}}{ % Con autoplay - \fbox{\animategraphics[loop,autoplay,#3]{#4}{#2-}{0}{#5}#1}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[loop,autoplay,#3]{#4}{#2-}{0}{#5}#1}% + }% }{ % Sin autoplay - \fbox{\animategraphics[loop,#3]{#4}{#2-}{0}{#5}#1}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[loop,#3]{#4}{#2-}{0}{#5}#1}% + }% }% }{ % Sin loop \ifthenelse{\equal{\animatedimageautoplay}{true}}{ % Con autoplay - \fbox{\animategraphics[autoplay,#3]{#4}{#2-}{0}{#5}#1}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[autoplay,#3]{#4}{#2-}{0}{#5}#1}% + }% }{ % Sin autoplay - \fbox{\animategraphics[#3]{#4}{#2-}{0}{#5}#1}% + \raisebox{\GLOBALimagenextmarginv}{% + \fbox{\animategraphics[#3]{#4}{#2-}{0}{#5}#1}% + }% }% }% }% }% \endgroup% \global\def\GLOBALenvimageadded {true}% + \global\def\GLOBALimagenextmarginv {0 cm}% } % Añade una imagen a un env "image" con borde sin leyenda animada @@ -2241,6 +2269,13 @@ ~ \\ \vspace*{#1}% } +% Establece el margen vertical de la siguiente imagen +% #1 Margen vertical +\newcommand{\setnextimagevmargin}[1]{% + \emptyvarerr{\setimagesvmargin}{#1}{Tamaño del margen}% + \global\def\GLOBALimagenextmarginv {#1}% +} + % Insertar una imagen % #1 Label (opcional) % #2 Dirección de la imagen @@ -2940,6 +2975,13 @@ \define@key{Gin}{resolution}{\pdfimageresolution=#1\relax} \makeatother +\global\def\GLOBALtitlerequirechapter {false} +\global\def\GLOBALtitleinitchapter {false} +\global\def\GLOBALtitleinitsection {false} +\global\def\GLOBALtitleinitsubsection {false} +\global\def\GLOBALtitleinitsubsubsection {false} +\global\def\GLOBALtitleinitsubsubsubsection {false} + % Activa la numeración en las secciones \def\coreintializetitlenumbering {% % Capítulo @@ -2987,6 +3029,36 @@ \hbadness=10000% } +% Chequea si los capítulos han sido iniciados +\def\corecheckchapterinitialized {% + \ifthenelse{\equal{\GLOBALtitlerequirechapter}{true}}{% + \ifthenelse{\equal{\GLOBALtitleinitchapter}{false}}{% + \throwwarning{Se requiere un nuevo capitulo para iniciar las secciones}% + }{}% + }{}% +} + +% Chequea si una sección han sido iniciada +\def\corechecksectioninitialized {% + \ifthenelse{\equal{\GLOBALtitleinitsection}{false}}{% + \throwwarning{Se requiere una nueva seccion}% + }{}% +} + +% Chequea si una subsección han sido iniciada +\def\corechecksubsectioninitialized {% + \ifthenelse{\equal{\GLOBALtitleinitsubsection}{false}}{% + \throwwarning{Se requiere una nueva subseccion}% + }{}% +} + +% Chequea si una subsubsección han sido iniciada +\def\corechecksubsubsectioninitialized {% + \ifthenelse{\equal{\GLOBALtitleinitsubsubsection}{false}}{% + \throwwarning{Se requiere una nueva subsubseccion}% + }{}% +} + % Parcha el formato de capítulos \pretocmd{\chapter}{% \ifthenelse{\equal{\showsectioncaptioncode}{chap}}{ % Reinicia código fuente @@ -3013,6 +3085,11 @@ \global\def\GLOBALsectionanumenabled {false}% \global\def\GLOBALsubsectionanumenabled {false}% \global\def\GLOBALsubsubsectionanumenabled {false}% + \global\def\GLOBALtitleinitchapter {true}% + \global\def\GLOBALtitleinitsection {false}% + \global\def\GLOBALtitleinitsubsection {false}% + \global\def\GLOBALtitleinitsubsubsection {false}% + \global\def\GLOBALtitleinitsubsubsubsection {false}% \coreintializetitlenumbering% }{}{} @@ -3042,6 +3119,11 @@ \global\def\GLOBALsectionanumenabled {false}% \global\def\GLOBALsubsectionanumenabled {false}% \global\def\GLOBALsubsubsectionanumenabled {false}% + \global\def\GLOBALtitleinitsection {true}% + \global\def\GLOBALtitleinitsubsection {false}% + \global\def\GLOBALtitleinitsubsubsection {false}% + \global\def\GLOBALtitleinitsubsubsubsection {false}% + \corecheckchapterinitialized% \coreintializetitlenumbering% }{}{} @@ -3070,6 +3152,11 @@ }{}% \global\def\GLOBALsubsectionanumenabled {false}% \global\def\GLOBALsubsubsectionanumenabled {false}% + \global\def\GLOBALtitleinitsubsection {true}% + \global\def\GLOBALtitleinitsubsubsection {false}% + \global\def\GLOBALtitleinitsubsubsubsection {false}% + \corecheckchapterinitialized% + \corechecksectioninitialized% \coreintializetitlenumbering% }{}{} @@ -3099,11 +3186,16 @@ \setcounter{table}{0}% }{}% \global\def\GLOBALsubsubsectionanumenabled {false}% + \global\def\GLOBALtitleinitsubsubsection {true}% + \global\def\GLOBALtitleinitsubsubsubsection {false}% + \corecheckchapterinitialized% + \corechecksectioninitialized% + \corechecksubsectioninitialized% \coreintializetitlenumbering% }{}{} % Parcha sub-sub-subsecciones -\pretocmd{\subsubsubsection}{% +\def\corepatchaftersubsubsubsection {% \ifthenelse{\equal{\showsectioncaptioncode}{ssssec}}{ % Reinicia código fuente \addtocounter{templateListings}{\value{lstlisting}}% \setcounter{lstlisting}{0}% @@ -3124,7 +3216,12 @@ \addtocounter{templateTables}{\value{table}}% \setcounter{table}{0}% }{}% -}{}{} + \global\def\GLOBALtitleinitsubsubsubsection {true}% + \corecheckchapterinitialized% + \corechecksectioninitialized% + \corechecksubsectioninitialized% + \corechecksubsubsectioninitialized% +} % Insertar un título sin número % #1 Título @@ -4045,6 +4142,7 @@ % Crea una sección de anexos \newenvironment{appendixd}{% \global\def\GLOBALenvappendix {true}% + \global\def\GLOBALtitlerequirechapter {false}% \begingroup % Inicia el grupo en nueva página y sección % \clearpage \phantomsection% @@ -4055,6 +4153,12 @@ \global\def\GLOBALformatnumssection {\formatnumapssection}% \global\def\GLOBALformatnumsssection {\formatnumapsssection}% \global\def\GLOBALformatnumssssection {\formatnumapssssection}% + % Define estado de numeración + \global\def\GLOBALtitleinitchapter {false}% + \global\def\GLOBALtitleinitsection {false}% + \global\def\GLOBALtitleinitsubsection {false}% + \global\def\GLOBALtitleinitsubsubsection {false}% + \global\def\GLOBALtitleinitsubsubsubsection {false}% \bookmarksetup{% numbered={true}, openlevel={\thetemplateBookmarksLevelPrev} @@ -4083,12 +4187,20 @@ \global\def\GLOBALformatnumssection {\formatnumssection}% \global\def\GLOBALformatnumsssection {\formatnumsssection}% \global\def\GLOBALformatnumssssection {\formatnumssssection}% + % Reestablece estado de numeración + \global\def\GLOBALtitleinitchapter {false}% + \global\def\GLOBALtitleinitsection {false}% + \global\def\GLOBALtitleinitsubsection {false}% + \global\def\GLOBALtitleinitsubsubsection {false}% + \global\def\GLOBALtitleinitsubsubsubsection {false}% \bookmarksetupnext{level={\thetemplateBookmarksLevelPrev}} % Restablece índice marcador \bookmarksetup{% numbered={\cfgpdfsecnumbookmarks}, openlevel={\cfgbookmarksopenlevel} }% \endgroup% + \global\def\GLOBALenvappendix {false}% + \global\def\GLOBALtitlerequirechapter {false}% } % Inicia código fuente con parámetros @@ -5535,16 +5647,16 @@ Template.Author.Email={pablo@ppizarror.com}, Template.Author.Web={https://ppizarror.com}, Template.Author={Pablo Pizarro R.}, - Template.Date={23/11/2021}, + Template.Date={26/11/2021}, Template.Encoding={UTF-8}, Template.Latex.Compiler={pdflatex}, Template.License.Type={MIT}, Template.License.Web={https://opensource.org/licenses/MIT}, Template.Name={Template-Articulo}, Template.Type={Normal}, - Template.Version.Dev={1.0.3-ARTC}, - Template.Version.Hash={2676B03247B872C1582C869C896B8005}, - Template.Version.Release={1.0.3}, + Template.Version.Dev={1.0.4-ARTC}, + Template.Version.Hash={BCA565638623A35E91D525F9101107B8}, + Template.Version.Release={1.0.4}, Template.Web.Dev={https://github.com/Template-Latex/Template-Articulo}, Template.Web.Manual={https://latex.ppizarror.com/articulo}, }, @@ -5552,7 +5664,7 @@ pdfmenubar={\cfgpdfmenubar}, pdfpagelayout={\cfgpdflayout}, pdfpagemode={\cfgpdfpagemode}, - pdfproducer={Template-Articulo v1.0.3 | (Pablo Pizarro R.) ppizarror.com}, + pdfproducer={Template-Articulo v1.0.4 | (Pablo Pizarro R.) ppizarror.com}, pdfremotestartview={Fit}, pdfstartpage={1}, pdfstartview={\cfgpdfpageview}, @@ -7065,17 +7177,19 @@ \color{\sssectioncolor} \sssectionfontsize \sssectionfontstyle \selectfont% } \titleformat{\subsubsubsection}{% - \color{\ssssectioncolor} \ssssectionfontsz \ssssectionfontstyle - }{% - \thesubsubsubsection\charaftersectionnum\spacingaftersection}{0em}{% + \color{\ssssectioncolor} \ssssectionfontsz \ssssectionfontstyle% + }{% + \thesubsubsubsection\charaftersectionnum\spacingaftersection% + \corepatchaftersubsubsubsection% + }{0em}{% } \def\bibfont {\fontsizerefbibl} % Tamaño de fuente de las referencias % ------------------------------------------------------------------------- % Estilo citas % ------------------------------------------------------------------------- - \ifthenelse{\equal{\stylecitereferences}{apacite}}{ - \renewcommand{\BOthers}[1]{\apacitebothers\hbox{}} + \ifthenelse{\equal{\stylecitereferences}{apacite}}{% + \renewcommand{\BOthers}[1]{\apacitebothers\hbox{}}% }{} % ------------------------------------------------------------------------- diff --git a/template_config.tex b/template_config.tex index f71bb4a..472020d 100644 --- a/template_config.tex +++ b/template_config.tex @@ -1,6 +1,6 @@ % Template: Artículo LaTeX % Documento: Configuraciones del template -% Versión: 1.0.3 (23/11/2021) +% Versión: 1.0.4 (26/11/2021) % Codificación: UTF-8 % % Autor: Pablo Pizarro R.