summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/responsive
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/responsive')
-rw-r--r--macros/latex/contrib/responsive/README4
-rw-r--r--macros/latex/contrib/responsive/responsive-doc.pdfbin77546 -> 75970 bytes
-rw-r--r--macros/latex/contrib/responsive/responsive-doc.tex5
-rw-r--r--macros/latex/contrib/responsive/responsive.sty12
4 files changed, 17 insertions, 4 deletions
diff --git a/macros/latex/contrib/responsive/README b/macros/latex/contrib/responsive/README
index dc2953cb54..c6ed3ea7ea 100644
--- a/macros/latex/contrib/responsive/README
+++ b/macros/latex/contrib/responsive/README
@@ -1,6 +1,6 @@
The Responsive Package
-Version 0.1
+Version v0.1a
Change font sizes and other typographic details in LaTeX documents depending on
the page dimensions.
@@ -21,7 +21,7 @@ elements for various output formats and devices. Key features include:
- Line Spacing Control: adjust line spacing determining the x-height percentage
for enhanced readability.
-Copyright: 2023-2023 Michal Hoftich
+Copyright: 2023-2024 Michal Hoftich
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/responsive/responsive-doc.pdf b/macros/latex/contrib/responsive/responsive-doc.pdf
index 1e7245c04f..498fcac9bb 100644
--- a/macros/latex/contrib/responsive/responsive-doc.pdf
+++ b/macros/latex/contrib/responsive/responsive-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/responsive/responsive-doc.tex b/macros/latex/contrib/responsive/responsive-doc.tex
index 4272397e3e..e5e5b3f074 100644
--- a/macros/latex/contrib/responsive/responsive-doc.tex
+++ b/macros/latex/contrib/responsive/responsive-doc.tex
@@ -22,7 +22,7 @@
\usepackage{booktabs}
\usepackage[style=iso-authoryear]{biblatex}
\addbibresource{responsive-doc.bib}
-\newenvironment{changelog}{\longtable{@{} l p{30em}}}{\endlongtable}
+\newenvironment{changelog}{\longtable{@{} l p{20em}}}{\endlongtable}
\newcommand\change[2]{#1 & #2\\}
\ifdefined\HCode
% I want to convert parts of the document to images,
@@ -525,6 +525,9 @@ under the terms of the \LaTeX\ Project Public License, version 1.3.
\section{Changes}
\begin{changelog}
+ \change{2024-07-14}{Version 0.1a released}
+ \change{2024-03-16}{Set the \texttt{topmargin} dimension}
+ \change{}{Call Geometry's \texttt{\textbackslash Gm@process} command to fix page dimensions, if Geometry is loaded}
\change{2023-12-13}{Version 0.1 released.}
\change{}{Finished documentation.}
\change{2023-12-07}{Added the \texttt{lineheight} property.}
diff --git a/macros/latex/contrib/responsive/responsive.sty b/macros/latex/contrib/responsive/responsive.sty
index 65e5061f45..289f04ca8b 100644
--- a/macros/latex/contrib/responsive/responsive.sty
+++ b/macros/latex/contrib/responsive/responsive.sty
@@ -3,7 +3,7 @@
\RequirePackage{expl3,l3keys2e}
\RequirePackage{kvoptions}
\ProvidesExplPackage{responsive}
-{2023-12-15}{0.1}{Responsive design for LaTeX}
+{2024-07-14}{v0.1a}{Responsive design for LaTeX}
%%%%%%%%%%%%%%%%%%%%%%
% keyval processing %
@@ -168,6 +168,10 @@
\@setfontsize#1{\resp_multiply_note:nnn\resp_font_size{#2}{1}}{\resp_multiply_note:nnn\resp_line_skip{#2}{\l_resp_lineheight_multiplier}}
}
+% This is a dummy definition. It should restore page dimensions using the Geometry package if it is loaded.
+% The correct definition is added in \AtBeginDocument
+\cs_set:Npn\resp_reset_geometry{}
+
% recalculate \textheight and \headheight with the changed font size
% this is necessary to prevent the underfull \vbox messages from the output rutine
\cs_set:Npn\resp_textheight:n {
@@ -182,6 +186,9 @@
\setlength\headheight{\resp_font_size}
\setlength\headsep {1.5\resp_font_size}
\setlength\footskip{\fp_to_dim:n{2*\resp_font_size+1}}
+ \setlength\topmargin{\fp_to_dim:n{(\paperheight-\textheight -\headheight-\headsep-\footskip)/2 - 1in}}
+ \resp_reset_geometry
+ % \addtolength\topmargin{\topskip}
}
% the functionality to fix the textheight should be available as a document command
@@ -355,6 +362,9 @@
% setup font sizes at the begin document, in order to support Geometry etc.
\AtBeginDocument{
+ \@ifpackageloaded{geometry}{
+ \cs_set:Npn\resp_reset_geometry{\Gm@process}
+ }{}
% set the default font size, based on numbers of characters we want to show on a line of text
% \fonttobox[32]\textwidth{\tl_range:Nnn\l_resp_charlist_tl{1}{\l_resp_charlines_int}}%
\bool_if:NTF\l_resp_no_execute {}{