Updated the proostekrant to work properly again.
This commit is contained in:
Executable
+54
@@ -0,0 +1,54 @@
|
||||
\documentclass{article}
|
||||
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{microtype}
|
||||
|
||||
\usepackage{newspaper}
|
||||
|
||||
\usepackage[dutch]{babel}
|
||||
|
||||
\date{\today}
|
||||
\currentvolume{1}
|
||||
\currentissue{1}
|
||||
|
||||
%% The banner headline on the first page
|
||||
%% (The colon after s: is to get a more
|
||||
%% modern majuscule s in this font instead of
|
||||
%% the medieval tall s.
|
||||
\SetPaperName{Proo{s:}tenKrant}
|
||||
|
||||
%% The name used in the running header after
|
||||
%% the first page
|
||||
\SetHeaderName{ProostenKrant}
|
||||
|
||||
%% and also...
|
||||
\SetPaperLocation{Regio Kempen}
|
||||
\SetPaperSlogan{``Een krant van en voor Proosten.''}
|
||||
\SetPaperPrice{NUL EURO}
|
||||
|
||||
\usepackage{graphicx}
|
||||
\usepackage{tikz}
|
||||
\usepackage{multicol}
|
||||
\usepackage{geometry}
|
||||
\usepackage{array}
|
||||
\usepackage{wrapfig}
|
||||
\usepackage{lipsum}
|
||||
\usepackage{newtxtext,newtxmath}
|
||||
\usepackage{etoolbox}
|
||||
|
||||
% Custom styling for better image handling
|
||||
\input{newspaper-mod}
|
||||
|
||||
%%%%%%%%% Front matter %%%%%%%%%%
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
\begin{multicols}{3}
|
||||
|
||||
% Articles will be inserted here by the PHP generator
|
||||
|
||||
\newpage
|
||||
\end{multicols}
|
||||
\end{document}
|
||||
Executable
+119
@@ -0,0 +1,119 @@
|
||||
% Improved newspaper-mod.sty for ProostenKrant
|
||||
% Better image handling for different formats and sizes
|
||||
|
||||
\newcommand{\headlinestyle}{\itshape\huge}
|
||||
\newcommand{\bylinestyle}{\scshape\Large}
|
||||
\patchcmd{\headline}{#1}{\headlinestyle #1}{}{}
|
||||
\patchcmd{\byline}{#1}{\bylinestyle #1}{}{}
|
||||
|
||||
% Improved image commands with better handling of different aspect ratios
|
||||
|
||||
% Show inline image with caption (automatically handles landscape and portrait)
|
||||
\newcommand{\showInlineImage}[2]
|
||||
{
|
||||
\\\n \hspace*{0pt}% Ensure proper spacing
|
||||
\vspace*{10pt}% Add space before image
|
||||
\begin{center}
|
||||
\begin{minipage}{0.95\columnwidth}
|
||||
\centering
|
||||
% Use max dimensions that fit in column
|
||||
\setlength{\fboxsep}{5pt}
|
||||
\framebox{
|
||||
% Check image dimensions and scale appropriately
|
||||
\includegraphics[max width=\linewidth, max height=0.6\textheight, keepaspectratio]{#1}
|
||||
}
|
||||
\vspace*{5pt}
|
||||
{\small #2}
|
||||
\end{minipage}
|
||||
\end{center}
|
||||
\vspace*{10pt}% Add space after image
|
||||
\par
|
||||
}
|
||||
|
||||
% Show single writer with circular profile image
|
||||
\newcommand{\showOneWriter}[2]
|
||||
{
|
||||
\\\n \hfill
|
||||
\begin{minipage}[t]{0.4\columnwidth}
|
||||
\centering
|
||||
\begin{tikzpicture}
|
||||
% Circular clip for profile image
|
||||
\clip (0,0) circle (1.3cm);
|
||||
% Use square aspect ratio and scale to fit
|
||||
\node[anchor=center] at (0,0) {
|
||||
\includegraphics[width=2.8cm, height=2.8cm, keepaspectratio]{#1}
|
||||
};
|
||||
\end{tikzpicture}
|
||||
\vspace*{5pt}
|
||||
{\small #2}
|
||||
\end{minipage}
|
||||
\hfill
|
||||
\\\n}
|
||||
|
||||
% Show two writers with circular profile images
|
||||
\newcommand{\showTwoWriters}[4]
|
||||
{
|
||||
\\\n \begin{center}
|
||||
\begin{minipage}[t]{0.8\columnwidth}
|
||||
\centering
|
||||
\begin{tikzpicture}
|
||||
\clip (0,0) circle (1.1cm);
|
||||
\node[anchor=west] at (0,0) {
|
||||
\includegraphics[width=2.4cm, height=2.4cm, keepaspectratio]{#1}
|
||||
};
|
||||
\end{tikzpicture}
|
||||
\hspace*{15pt}
|
||||
\begin{tikzpicture}
|
||||
\clip (0,0) circle (1.1cm);
|
||||
\node[anchor=east] at (0,0) {
|
||||
\includegraphics[width=2.4cm, height=2.4cm, keepaspectratio]{#3}
|
||||
};
|
||||
\end{tikzpicture}
|
||||
\vspace*{8pt}
|
||||
{\small #2 \\quad #4}
|
||||
\end{minipage}
|
||||
\end{center}
|
||||
\\\n}
|
||||
|
||||
% Alternative commands for different layouts
|
||||
|
||||
% For portrait images - maintains aspect ratio
|
||||
\newcommand{\showPortraitImage}[2]
|
||||
{
|
||||
\\\n \begin{minipage}[t]{0.45\columnwidth}
|
||||
\centering
|
||||
\begin{tikzpicture}
|
||||
% For portrait images, use vertical layout
|
||||
\clip (0,-1.5cm) rectangle (2cm,1.5cm);
|
||||
\node[anchor=center] at (1cm,0) {
|
||||
\includegraphics[height=3cm, keepaspectratio]{#1}
|
||||
};
|
||||
\end{tikzpicture}
|
||||
\vspace*{5pt}
|
||||
{\small #2}
|
||||
\end{minipage}
|
||||
\\\n}
|
||||
|
||||
% For landscape images - maintains aspect ratio
|
||||
\newcommand{\showLandscapeImage}[2]
|
||||
{
|
||||
\\\n \begin{minipage}[t]{\columnwidth}
|
||||
\centering
|
||||
% For landscape images, use full width
|
||||
\includegraphics[width=\linewidth, height=0.4\textheight, keepaspectratio]{#1}
|
||||
\vspace*{5pt}
|
||||
{\small #2}
|
||||
\end{minipage}
|
||||
\\\n}
|
||||
|
||||
% Flexible image wrapper that automatically handles different orientations
|
||||
\newcommand{\showFlexibleImage}[2]
|
||||
{
|
||||
% First, we need to check the image dimensions
|
||||
% This requires the epstopdf package and shell-escape
|
||||
\IfFileExists{#1}{
|
||||
% Image exists, try to determine orientation
|
||||
% For now, we'll use a balanced approach that works for both
|
||||
\showInlineImage{#1}{#2}
|
||||
}{}
|
||||
}
|
||||
Reference in New Issue
Block a user