Skip to content

Commit

Permalink
Merge pull request #12 from Zubax/typesetting
Browse files Browse the repository at this point in the history
Fixed missing List of Tables
  • Loading branch information
pavel-kirienko authored Jun 11, 2020
2 parents d5ff7ed + c7577ad commit a476072
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions documentation_template_latex/zubaxdoc.cls
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
\RequirePackage{chngcntr}
\RequirePackage{changepage}
\RequirePackage{csquotes}
\RequirePackage{xparse}

%
% Minor definitions.
Expand Down Expand Up @@ -230,19 +231,17 @@
% Use this wrapper environment to define tables in it.
% This environment provides proper placement of the table within the page, and the properly positioned caption.
% An optional [wide] parameter can be specified to align the table with the left margin instead of leftskip.
\newsavebox{\tablecaption}
\newenvironment{ZubaxTableWrapper}[2][\empty]{
\NewDocumentEnvironment{ZubaxTableWrapper}{ o m }{%
\ifthenelse{\equal{#1}{wide}}{
\NoLeftSkip
\begin{minipage}{\textwidth} % Minipage is needed to prevent page breaks before the caption
}{
\begin{minipage}{\textwidth-\leftskip} % Minipage is needed to prevent page breaks before the caption
}
\sbox{\tablecaption}{#2}
\begin{ThreePartTable}
}{
% https://github.com/Zubax/document_templates/pull/6#issuecomment-640133791
\captionof{table}{\usebox{\tablecaption}}
\captionof{table}{#2}
\end{ThreePartTable}
\end{minipage}
}
Expand All @@ -257,7 +256,7 @@
}

% Use this environment to define a table within the wrapper environment defined above.
\newenvironment{ZubaxWrappedTable}[2][\empty]{
\newenvironment{ZubaxWrappedTable}[2][\empty]{%
\begin{tabu} to \textwidth {#2}
\hline
\ifx\empty#1\everyrow{\hline}\fi %every row has the border by default
Expand Down

0 comments on commit a476072

Please sign in to comment.