From 1dd8057bc57485781d5cb07c06ef2623ecf436e5 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 18 Jun 2024 16:48:06 -0500 Subject: [PATCH] Update with latest C++ LaTex base changes. --- src/in_macros.tex | 8 ++++---- src/in_styles.tex | 18 ++++++++++++++---- src/in_tables.tex | 2 ++ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/in_macros.tex b/src/in_macros.tex index 8f36a4a..0a62428 100644 --- a/src/in_macros.tex +++ b/src/in_macros.tex @@ -78,12 +78,12 @@ % Set the xref label for a clause to be "Clause n", not just "n". \makeatletter -\newcommand{\customlabel}[2]{% -\@bsphack \begingroup \protected@edef \@currentlabel {\protect \M@TitleReference{#2}{\M@currentTitle}}\MNR@label{#1}\endgroup \@esphack% +\newcommand{\customlabel}[3]{% +\@bsphack \protected@write\@auxout{}{\string\newlabel{#1}{{#3}{\thepage}{}{#2.\thechapter}{}}} \@esphack% } \makeatother -\newcommand{\clauselabel}[1]{\customlabel{#1}{Clause \thechapter}} -\newcommand{\annexlabel}[1]{\customlabel{#1}{Annex \thechapter}} +\newcommand{\clauselabel}[1]{\customlabel{#1}{chapter}{Clause \thechapter}} +\newcommand{\annexlabel}[1]{\customlabel{#1}{appendix}{Annex \thechapter}} % Use prefix "Annex" in the table of contents \newcommand{\annexnumberlinebox}[2]{Annex #2\space} diff --git a/src/in_styles.tex b/src/in_styles.tex index e3710f9..094b90c 100644 --- a/src/in_styles.tex +++ b/src/in_styles.tex @@ -5,11 +5,11 @@ % footnotes %%-------------------------------------------------- -%% create chapter style +%% create chapter styles \makechapterstyle{cppstd}{% - \renewcommand{\beforechapskip}{\onelineskip} - \renewcommand{\afterchapskip}{\onelineskip} + \setlength{\beforechapskip}{\onelineskip} + \setlength{\afterchapskip}{\onelineskip} \renewcommand{\chapternamenum}{} \renewcommand{\chapnamefont}{\chaptitlefont} \renewcommand{\chapnumfont}{\chaptitlefont} @@ -17,6 +17,16 @@ \renewcommand{\afterchapternum}{} } +\makechapterstyle{cppannex}{% + \setlength{\beforechapskip}{\onelineskip} + \setlength{\afterchapskip}{\onelineskip} + \renewcommand{\chapternamenum}{} + \renewcommand{\chapnamefont}{\chaptitlefont} + \renewcommand{\chapnumfont}{\chaptitlefont} + \renewcommand{\printchapternum}{\chapnumfont\centering\thechapter\protect\\} + \renewcommand{\afterchapternum}{} +} + %%-------------------------------------------------- %% create page styles @@ -93,7 +103,7 @@ %%-------------------------------------------------- % set heading style for annexes -\newcommand{\Annex}[3]{\chapter[#2]{(#3)\protect\\#2\hfill[#1]}\relax\annexlabel{#1}} +\newcommand{\Annex}[3]{\chapter[#2]{\textnormal{(#3)}\protect\\[3ex]#2\hfill[#1]}\relax\annexlabel{#1}} \newcommand{\infannex}[2]{\addxref{#1}\Annex{#1}{#2}{informative}} \newcommand{\normannex}[2]{\addxref{#1}\Annex{#1}{#2}{normative}} diff --git a/src/in_tables.tex b/src/in_tables.tex index 7513039..2d641e9 100644 --- a/src/in_tables.tex +++ b/src/in_tables.tex @@ -48,6 +48,7 @@ % floattablebase without TableBase, used for lib2dtab2base \newenvironment{floattablebasex}[4] { + \protect\hypertarget{tab:#2}{} \begin{table}[#4] \caption{\label{tab:#2}#1 \quad [tab:#2]} \begin{center} @@ -196,6 +197,7 @@ \newenvironment{LongTable}[3] { \newcommand{\continuedcaption}{\caption[]{#1 (continued)}} + \protect\hypertarget{tab:#2}{} \begin{TableBase} \begin{longtable}{|#3|} \caption{#1 \quad [tab:#2]}\label{tab:#2}