aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--latex/tikzcards.tex24
1 files changed, 19 insertions, 5 deletions
diff --git a/latex/tikzcards.tex b/latex/tikzcards.tex
index 8d3a29ae..de5441ab 100644
--- a/latex/tikzcards.tex
+++ b/latex/tikzcards.tex
@@ -21,6 +21,13 @@
\pgfmathsetmacro{\leftStripLongHeight}{
\cardheight - (3 * \strippadding) - \stripShortHeight
}
+
+% Thresholds for the text in the left strip
+\pgfmathsetmacro{\leftStripLongHeightNormal}{\leftStripLongHeight * 0.75}
+\pgfmathsetmacro{\leftStripLongHeightSmall}{\leftStripLongHeight * 0.85}
+\pgfmathsetmacro{\leftStripLongHeightFootnotesize}{\leftStripLongHeight * 0.95}
+\pgfmathsetmacro{\leftStripLongHeightScriptsize}{\leftStripLongHeight * 1.05}
+
\pgfmathsetmacro{\leftStripTextXCoord}{\strippadding + 0.5 * \stripwidth}
\pgfmathsetmacro{\costXCoord}{\cardwidth - 0.5 * \stripwidth - \strippadding}
@@ -123,19 +130,26 @@
\fill[strip, #1] \shapeLeftStripShort;
\end{scope}
- \node(leftStripTextInvisible) at (\leftStripTextXCoord, \leftStripLongHeight - \strippadding)
+ \node(leftStripTextInvisible) at (\leftStripTextXCoord, \leftStripLongHeight - \textpadding)
[rotate=90, anchor=east, font=\normalsize, opacity=0] {
\uppercase{#4 - #2}
};
\getnodedimen{leftStripTextInvisible}
- \node(leftStripText) at (\leftStripTextXCoord, \leftStripLongHeight - \strippadding)
+ \node(leftStripText) at (\leftStripTextXCoord, \leftStripLongHeight - \textpadding)
[rotate=90, anchor=east, font=\normalsize] {
\color{white}
- \ifdimgreater{\nodeheight}{\leftStripLongHeight cm - (\leftStripLongHeight cm / 4)}
- {{\small \uppercase{#4 - #2}}}
+
+ \ifdimgreater{\leftStripLongHeightNormal cm}{\nodeheight}
{\uppercase{#4 - #2}}
+ {\ifdimgreater{\leftStripLongHeightSmall cm}{\nodeheight}
+ {\small \uppercase{#4 - #2}}
+ {\ifdimgreater{\leftStripLongHeightFootnotesize cm}{\nodeheight}
+ {\footnotesize \uppercase{#4 - #2}}
+ {\ifdimgreater{\leftStripLongHeightScriptsize cm}{\nodeheight}
+ {\scriptsize \uppercase{#4 - #2}}
+ {\tiny \uppercase{#4 - #2}}}}}
};
\node at (\leftStripTextXCoord, \cardheight - \strippadding - \strippadding - 0.37) {
@@ -278,6 +292,6 @@
% Module containing the card
\newcommand{\cardmodule}[1]{
\node[rotate=90, right] at
- (\strippadding + 0.5 * \stripwidth, \strippadding + \strippadding)
+ (\strippadding + 0.5 * \stripwidth, \textpadding)
{\color{black}#1};
}