Skip to content

Commit

Permalink
Agrega \tabularframerepeatleftcolumn
Browse files Browse the repository at this point in the history
  • Loading branch information
ppizarror committed Oct 23, 2023
1 parent 392f0d3 commit 779e032
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
24 changes: 20 additions & 4 deletions src/cmd/presentacion.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
\global\def\GLOBALtabularframecontentrightfontsize {\normalsize}
\global\def\GLOBALtabularframecontentwidthleft {0.4}
\global\def\GLOBALtabularframecontentwidthright {0.6}
\global\def\GLOBALtabularframeupdateleftcontent {true}

\def\LOCALtabularframecolumnselected {1}
\def\LOCALtabularframeinit {false}
\def\LOCALtabularframestorevar {true}

% Archivo que guarda el código generado del framehead
% Archivo que guarda códigos generados
\newwrite\filetabularframehead
\newwrite\filetabularframeleftcontent

% Define contadores
\newcounter{tabularcolnumber}
Expand Down Expand Up @@ -174,7 +176,7 @@
{\begin{minipage}[t][\GLOBALtabularframecontentheight \textheight][t]{\dimexpr\textwidth - 15\fboxrule}%
\vspace{\tabularframepaddingtop em}%
\hspace{\tabularframepaddingleft em}%
\begin{minipage}[t][\dimexpr\GLOBALtabularframecontentheight \textheight-\tabularframepaddingtop em][t]{\dimexpr\linewidth - \tabularframepaddingleft em - \tabularframepaddingright em}
\begin{minipage}[t][\dimexpr\GLOBALtabularframecontentheight \textheight-\tabularframepaddingtop em][t]{\dimexpr\linewidth - \tabularframepaddingleft em - \tabularframepaddingright em}%
\GLOBALtabularframecontentleftfontsize%
\ifthenelse{\equal{\GLOBALtabularframecontentleftcentered}{false}}{%
#1%
Expand All @@ -184,11 +186,11 @@
\end{minipage}
\end{minipage}}
\column{\GLOBALtabularframecontentwidthright\linewidth}%
\centering
\centering%
{\begin{minipage}[t][\GLOBALtabularframecontentheight \textheight][t]{\dimexpr\textwidth - 10\fboxrule}%
\vspace{\tabularframepaddingtop em}%
\hspace{\tabularframepaddingleft em}%
\begin{minipage}[t][\dimexpr\GLOBALtabularframecontentheight \textheight-\tabularframepaddingtop em][t]{\dimexpr\linewidth - \tabularframepaddingleft em - \tabularframepaddingright em}
\begin{minipage}[t][\dimexpr\GLOBALtabularframecontentheight \textheight-\tabularframepaddingtop em][t]{\dimexpr\linewidth - \tabularframepaddingleft em - \tabularframepaddingright em}%
\GLOBALtabularframecontentrightfontsize%
\ifthenelse{\equal{\GLOBALtabularframecontentrightcentered}{false}}{%
#2%
Expand All @@ -199,7 +201,21 @@
\end{minipage}
\end{minipage}}
\end{columns}
\ifthenelse{\equal{\GLOBALtabularframeupdateleftcontent}{true}}{%
\immediate\openout\filetabularframeleftcontent=\jobname.tframelc%
\immediate\write\filetabularframeleftcontent{\unexpanded{#1}\LOCALpercentchar}%
\immediate\closeout\filetabularframeleftcontent%
}{}%
\def\LOCALtabularframeinit {false}%
\global\def\GLOBALtabularframeupdateleftcontent {true}%
}

% Repite el tabularframe
\newcommand{\tabularframerepeatleftcolumn}{%
\ifthenelse{\equal{\thetabularcolnumber}{-1}}{}{%
\throwwarning{Funcion \noexpand\tabularframerepeatleftcolumn no puede usarse sin haber inicializado \noexpand\tabularframehead}\stop}%
\input{\jobname.tframelc}%
\global\def\GLOBALtabularframeupdateleftcontent {false}%
}

% Tabular frame de una sola columna
Expand Down
13 changes: 12 additions & 1 deletion src/etc/example_presentacion.tex
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,19 @@ \section{Segunda sección}
}
\end{frame}

\begin{frame}{Entorno tabular (1/3)}
\tabularframeheadrepeat{1} % Repite el header anterior, pasa como argumento la columna activa
\tabularframecontent{
\tabularframerepeatleftcolumn % Repite el mismo contenido anterior
}{
\begin{center}
\Huge\LaTeX
\end{center}
}
\end{frame}

\begin{frame}{Entorno tabular (2/3)}
\tabularframeheadrepeat{2} % Repite el header anterior, pasa como argumento la columna activa
\tabularframeheadrepeat{2} % Repite el header anterior
\tabularframecontent{
La ecuación \eqref{eqtabular} indica la profundidad de un elemento, aunque no tiene mucho sentido ya que sólo se usa dentro del template. \\
\insertequation[\label{eqtabular}]{a = \frac{1}{2} + \cos c}
Expand Down

0 comments on commit 779e032

Please sign in to comment.