Skip to content

Commit

Permalink
Elimina env duplicado images en auxiliar
Browse files Browse the repository at this point in the history
  • Loading branch information
ppizarror committed Apr 29, 2023
1 parent be7e706 commit 3f0cf7f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 90 deletions.
82 changes: 0 additions & 82 deletions src/cmd/auxiliar.tex
Original file line number Diff line number Diff line change
Expand Up @@ -42,86 +42,4 @@
\changefontsizes{\documentfontsize pt}
}

% Crea una sección de imágenes múltiples
% #1 Label (opcional)
% #2 Caption
\newenvironment{images}[2][]{%
% Modifica globales
\def\envimageslabelvar {#1}%
\def\envimagescaptionvar {#2}%
\def\GLOBALenvimageinitialized {true}%
\def\GLOBALenvimageadded {false}%

% Configura caption y márgenes
\corevspacevarcm{\marginimagetop}%
\setcaptionmargincm{\captionmarginmultimg} % Eso es para los wrapfig

% Inicia la figura
\begin{samepage}%
\begin{figure}[H] \centering%
\corevspacevarcm{\marginimagemulttop}%
}{%
\setcaptionmargincm{\captionlrmargin}%
\ifthenelse{\equal{\envimagescaptionvar}{}}{ % \ifx\hfuzz no sirve
\corevspacevarcm{\captionlessmarginimage}%
}{%
\corevspacevarcm{\captionmarginimages}%
\caption{\envimagescaptionvar\envimageslabelvar}%
}%
\end{figure}

% Restablece caption y márgenes
\setcaptionmargincm{\captionlrmargin}%
\corevspacevarcm{\marginimagebottom}%
\end{samepage}

% Restablece globales
\def\GLOBALenvimageinitialized {false}%
}

% Crea una sección de imágenes múltiples completa dentro de un multicol
% #1 Label (opcional)
% #2 Posición de la imagen, "bottom", "top"
% #3 Caption
\newenvironment{imagesmc}[3][]{%
% Modifica globales
\def\envimageslabelvar {#1}%
\def\envimagesmcpos {#2}%
\def\envimagescaptionvar {#3}%
\global\def\GLOBALenvimageinitialized {true}%
\global\def\GLOBALenvimageadded {false}%
\checkinsidemulticol%
\checkoutsideappendix%

% Configura caption y márgenes
\setcaptionmargincm{\captionmarginmultimg} % Eso es para los wrapfig

% Inicia la figura
\ifthenelse{\equal{#2}{bottom}}{%
\begin{figure*}[b] \centering%
}{%
\ifthenelse{\equal{#2}{top}}{%
\begin{figure*}[t] \centering%
}{%
\errmessage{LaTeX Warning: Posicion de imagen invalida, valores esperados: bottom,top}
\stop
}}%
\corevspacevarcm{\marginimagemulttop}%
}{%
\setcaptionmargincm{\captionlrmargin}%
\ifthenelse{\equal{\envimagescaptionvar}{}}{%
\corevspacevarcm{\captionlessmarginimage}%
}{%
\ifthenelse{\equal{\captionmarginimagesmc}{0}}{}{\corevspacevarcm{\captionmarginimagesmc}}%
\caption{\envimagescaptionvar\envimageslabelvar}%
}%
\end{figure*}

% Restablece caption y márgenes
\setcaptionmargincm{\captionlrmarginmc}%

% Restablece globales
\global\def\GLOBALenvimageinitialized {false}%
}

% END
8 changes: 0 additions & 8 deletions src/env/environments.tex
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,9 @@
\def\envimagescaptionvar {#2}%
\global\def\GLOBALenvimageadded {false}%
\global\def\GLOBALenvimageinitialized {true}%

% Configura caption y márgenes
\corevspacevarcm{\marginimagetop}%
\setcaptionmargincm{\captionmarginmultimg} % Eso es para los wrapfig

% Inicia la figura
\begin{samepage}%
\begin{figure}[H] \centering%
Expand All @@ -351,12 +349,10 @@
}%
}%
\end{figure}%

% Restablece caption y márgenes
\setcaptionmargincm{\captionlrmargin}%
\corevspacevarcm{\marginimagebottom}%
\end{samepage}

% Restablece globales
\global\def\GLOBALenvimageinitialized {false}%
}
Expand All @@ -375,10 +371,8 @@
\global\def\GLOBALenvimageinitialized {true}%
\checkinsidemulticol%
\checkoutsideappendix%

% Configura caption y márgenes
\setcaptionmargincm{\captionmarginmultimg} % Eso es para los wrapfig

% Inicia la figura
\ifthenelse{\equal{#2}{bottom}}{%
\begin{figure*}[!b] \centering%
Expand Down Expand Up @@ -408,10 +402,8 @@
}%
}%
\end{figure*}%

% Restablece caption y márgenes
\setcaptionmargincm{\captionlrmarginmc}%

% Restablece globales
\global\def\GLOBALenvimageinitialized {false}%
}
Expand Down

0 comments on commit 3f0cf7f

Please sign in to comment.