diff --git a/packages/Color.sty b/packages/Color.sty index 363d5a1..2c2d929 100644 --- a/packages/Color.sty +++ b/packages/Color.sty @@ -32,16 +32,25 @@ } \definecolor{WarningBoxBGColor}{RGB}{255, 221, 118} -\definecolor{WarningBoxFGColor}{RGB}{255, 192, 0} +\definecolor{WarningBoxFGColor}{RGB}{255, 150, 0} -\newcommand{\boxedcolor}[3][white]{ - \fcolorbox{black}{#2}{\textcolor{#1}{#3}} +\RequirePackage{PrimeTeX/packages/Layout} + +\newcommand{\boxedcolor}[3][white]{% + \providelength[\fboxsep]{\fboxsepdefault}% + \setlength{\fboxsep}{2pt}% + \fcolorbox{black}{#2}{\textcolor{#1}{#3}}% + \setlength{\fboxsep}{\fboxsepdefault}% } -\newcommand{\warningbox}[2][\textwidth]{ - \fcolorbox{WarningBoxFGColor}{WarningBoxBGColor}{ - \begin{minipage}{#1} - #2 - \end{minipage} - } +\providelength[12.3599pt]{\warningboxsizeoffset} +\newcommand{\warningbox}[2][\textwidth - \warningboxsizeoffset]{% + \noindent% + \fcolorbox{WarningBoxFGColor}{WarningBoxBGColor}{% + \noindent% + \begin{minipage}{#1}% + \raggedbottom% + #2% + \end{minipage}% + }% } \ No newline at end of file diff --git a/packages/CrossRef.sty b/packages/CrossRef.sty index 74bef5a..803777c 100644 --- a/packages/CrossRef.sty +++ b/packages/CrossRef.sty @@ -12,7 +12,7 @@ \newcommand{\refSubparagraph}[2][Subparagraph~]{#1\ref{subpar:#2}} \newcommand{\refTable}[2][Table~]{#1\ref{tbl:#2}} \newcommand{\refFigure}[2][Figure~]{#1\ref{fig:#2}} - + \newcommand{\lblGeneral}[4][]{ \if\relax\detokenize{#1}\relax % Check if #1 is empty string. #3{#2}\label{#4:#2} diff --git a/packages/Graphics.sty b/packages/Graphics.sty index 6dce96f..addb4e5 100644 --- a/packages/Graphics.sty +++ b/packages/Graphics.sty @@ -75,31 +75,54 @@ }% } -\newlength{\twinfigwidth} -\setlength{\twinfigwidth}{\textwidth / 2 + \bigfloatoverhang} +\RequirePackage{tabularray} + +\providelength[3pt]{\twinfigspace} +\providelength[ + \textwidth / 2 + \bigfloatoverhang - \twinfigspace +]{\twinfigwidth} \newcommand{\twinfig}[7][\bigfloatoverhang]{% - \bigfloat[#1]{figure}{htp}{%begin{table}[htp]% - \begin{tabular}{*{2}{p{\twinfigwidth}}}%\begin{tblr}{Q[l,m]Q[l,m]}% - \vfill% + \bigfloat[#1]{figure}{htp}{% + \begin{tblr}{% + colspec = {% + *{2}{% + Q[% + c,% + m,% + wd=\twinfigwidth,% + ]% + }% + },% + vborder{1,Z} = { + leftspace = 0pt,% + rightspace = 0pt,% + },% + vborder{2} = {% + leftspace = \twinfigspace,% + rightspace = \twinfigspace,% + },% + }% + \vfill \captionsetup{type=figure}% \includegraphics[% keepaspectratio,width=\twinfigwidth% ]{#2}% \captionof{figure}{#4}% - \label{fig:#3}% + \label{fig:#3} \vfill% &% - \vfill% + \vfill \captionsetup{type=figure}% \includegraphics[% keepaspectratio,width=\twinfigwidth% ]{#5}% \captionof{figure}{#7}% - \label{fig:#6}% + \label{fig:#6} \vfill% - \end{tabular}%\end{tblr}% - }%\end{table}% + \\% + \end{tblr}% + }% } \newcommand{\wrapfig}[6][0in]{% diff --git a/packages/Layout.sty b/packages/Layout.sty index 02abee3..df12a94 100644 --- a/packages/Layout.sty +++ b/packages/Layout.sty @@ -4,6 +4,16 @@ % Suppress warning about \showhyphens being changed. \let\CheckCommand\providecommand +%\usepackage{ifmtarg} + +\providecommand{\providelength}[2][0pt]{% + \ifdeflength{#2}{% It is already defined! + }{% Not defined, so define it! + \newlength{#2}% + }% + \setlength{#2}{#1}% +} + \RequirePackage{microtype} % Page Layout diff --git a/packages/Tables.sty b/packages/Tables.sty index c358142..5d4981b 100644 --- a/packages/Tables.sty +++ b/packages/Tables.sty @@ -8,6 +8,7 @@ %\UseTblrLibrary{varwidth} \DeclareTblrTemplate{note-tag}{default}{\textsuperscript{\InsertTblrNoteTag}} +\DeclareTblrTemplate{remark-tag}{default}{\strong{\InsertTblrRemarkTag}} \NewTblrEnviron{tblrBoxout} \SetTblrInner[tblrBoxout]{