summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/univie-ling/tex/univie-ling-poster.cls
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-05-10 03:00:55 +0000
committerNorbert Preining <norbert@preining.info>2024-05-10 03:00:55 +0000
commit889ef8595dafee235cb1106ec4efbdd3169481c2 (patch)
tree45863693da937beb703aee0e4407cc51cfc9956b /macros/latex/contrib/univie-ling/tex/univie-ling-poster.cls
parent1feed955eca29818ea536dba591c12b7b3b55003 (diff)
CTAN sync 202405100300
Diffstat (limited to 'macros/latex/contrib/univie-ling/tex/univie-ling-poster.cls')
-rw-r--r--macros/latex/contrib/univie-ling/tex/univie-ling-poster.cls70
1 files changed, 54 insertions, 16 deletions
diff --git a/macros/latex/contrib/univie-ling/tex/univie-ling-poster.cls b/macros/latex/contrib/univie-ling/tex/univie-ling-poster.cls
index bb54e614ae..d2b68940af 100644
--- a/macros/latex/contrib/univie-ling/tex/univie-ling-poster.cls
+++ b/macros/latex/contrib/univie-ling/tex/univie-ling-poster.cls
@@ -33,8 +33,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\NeedsTeXFormat{LaTeX2e}[1997/06/01]
-\ProvidesClass{univie-ling-poster}[2023/03/31 v.2.4 Univie Ling poster class (JSp)]
+\NeedsTeXFormat{LaTeX2e}[2022/06/01]
+\ProvidesClass{univie-ling-poster}[2024/05/09 v.2.5 Univie Ling poster class (JSp)]
%% ============================================================
%% CLASS OPTIONS
@@ -76,10 +76,8 @@
}
\uvpt@cd@german
-% We use l3keys here since (1) LaTeX2e keys are rather
-% new and (2) do not provide for choice keys yet.
-\ExplSyntaxOn
-\keys_define:nn { uvpt }
+% Define keys and values
+\DeclareKeys[uvpt]
{
% all=<true|false>
% Load all (most) packages
@@ -223,17 +221,9 @@
\@uvpt@otffontsfalse
},
}
-\ExplSyntaxOff
% Process
-
-\IfFormatAtLeastTF{2022-06-01}
-{
- \ProcessKeyOptions[uvpt]
-}{
- \RequirePackage{l3keys2e}
- \ProcessKeysOptions{uvpt}
-}
+\ProcessKeyOptions[uvpt]
%% ============================================================
@@ -942,13 +932,61 @@
\fi
%% ============================================================
-%% Semantic markup
+%% SEMANTIC MARKUP:
%% ============================================================
\newcommand\Expression[1]{\textit{#1}}
\newcommand\Concept[1]{\textsc{#1}}
\newcommand\Meaning[1]{\enquote*{#1}}
+%% ============================================================
+%% ACCESSIBILITY:
+%% ============================================================
+
+% Helper function that reports on the remaining space on the poster
+% as of the point where the command has been entered
+\RequirePackage{tikzpagenodes}
+\usetikzlibrary{calc}
+
+\newcommand*\restspace[1][]{%
+ \begin{tikzpicture}[overlay,remember picture]
+ \node (cp) at (current page text area.south west) {};%
+ \path let \p0 = (0,0), \p1 = (cp.north) in node [inner sep=0pt,outer sep=0pt,anchor=south] at (\x1,\y1)%
+ {%
+ \pgfmathsetmacro\restheight{((\y0-\y1) / \baselineskip) + 1}%
+ \pgfkeys{/pgf/number format/precision=1}%
+ \pgfmathroundto{\restheight}%
+ \ifx#1\empty%
+ \edef\univie@space@warning{Remaining space: \pgfmathresult\space normal lines}%
+ \else%
+ \edef\univie@space@warning{Remaining space (#1): \pgfmathresult\space normal lines}%
+ \fi%
+ \let\firstpgfmathresult\pgfmathresult%
+ \pgfmathparse{\pgfmathresult > 0}%
+ \def\univie@tmpa{0}%
+ \ifx\pgfmathresult\univie@tmpa%
+ \pgfmathparse{\firstpgfmathresult > -1}%
+ \ifx\pgfmathresult\univie@tmpa%
+ \def\univie@space@expl{\univie@space@warning\MessageBreak
+ Text exceeds poster! You need to re-arrange the content.}%
+ \else%
+ \def\univie@space@expl{It is still OK, but the poster is quite full\MessageBreak
+ Better take out at least one line here.}%
+ \fi%
+ \else%
+ \pgfmathparse{\firstpgfmathresult > 1}%
+ \ifx\pgfmathresult\univie@tmpa%
+ \def\univie@space@expl{All good, but this is full now.}%
+ \else
+ \def\univie@space@expl{Good, still space left!}%
+ \fi
+ \fi%
+ \PackageWarning{univie-ling-poster}{\univie@space@warning\MessageBreak
+ \univie@space@expl}%
+ };%
+ \end{tikzpicture}%
+}
+
\endinput
%%
%% End of file `univie-ling-poster.cls'.