| 1 |
\documentclass[a4paper,11pt]{article} |
| 2 |
|
| 3 |
% -------------------------------------------------- |
| 4 |
% Engine requirement |
| 5 |
% -------------------------------------------------- |
| 6 |
\usepackage{iftex} |
| 7 |
\ifPDFTeX |
| 8 |
\errmessage{This manual must be compiled with XeLaTeX or LuaLaTeX} |
| 9 |
\fi |
| 10 |
|
| 11 |
% -------------------------------------------------- |
| 12 |
% Packages |
| 13 |
% -------------------------------------------------- |
| 14 |
\usepackage{fontspec} |
| 15 |
\usepackage{geometry} |
| 16 |
\usepackage{hyperref} |
| 17 |
\usepackage{listings} |
| 18 |
\usepackage{xcolor} |
| 19 |
\usepackage{titlesec} |
| 20 |
|
| 21 |
% -------------------------------------------------- |
| 22 |
% Page layout |
| 23 |
% -------------------------------------------------- |
| 24 |
\geometry{margin=25mm} |
| 25 |
|
| 26 |
% -------------------------------------------------- |
| 27 |
% Fonts (manual only) |
| 28 |
% -------------------------------------------------- |
| 29 |
\setmainfont{TeX Gyre Termes} |
| 30 |
\setsansfont{TeX Gyre Heros} |
| 31 |
|
| 32 |
% -------------------------------------------------- |
| 33 |
% Hyperref setup |
| 34 |
% -------------------------------------------------- |
| 35 |
\hypersetup{ |
| 36 |
colorlinks=true, |
| 37 |
linkcolor=black, |
| 38 |
urlcolor=blue, |
| 39 |
pdftitle={modernnewspaper Package Manual}, |
| 40 |
pdfauthor={Laitei} |
| 41 |
} |
| 42 |
|
| 43 |
% -------------------------------------------------- |
| 44 |
% Listings setup |
| 45 |
% -------------------------------------------------- |
| 46 |
\lstset{ |
| 47 |
basicstyle=\ttfamily\small, |
| 48 |
frame=single, |
| 49 |
breaklines=true, |
| 50 |
keywordstyle=\color{blue} |
| 51 |
} |
| 52 |
|
| 53 |
% -------------------------------------------------- |
| 54 |
% Title info |
| 55 |
% -------------------------------------------------- |
| 56 |
\title{\textbf{modernnewspaper}\\ |
| 57 |
A Modern, Unicode-First Newspaper Package for LaTeX} |
| 58 |
\author{Laitei} |
| 59 |
\date{Version 0.2.1 --- January 2026} |
| 60 |
|
| 61 |
\begin{document} |
| 62 |
|
| 63 |
\maketitle |
| 64 |
|
| 65 |
% ================================================== |
| 66 |
\section{Introduction} |
| 67 |
|
| 68 |
The \textbf{modernnewspaper} package is a modern, Unicode-first LaTeX |
| 69 |
package for creating newspaper-style documents. It is designed as a |
| 70 |
clean, stable, and extensible alternative to the legacy |
| 71 |
\texttt{newspaper} package. |
| 72 |
|
| 73 |
The package supports multilingual content, multi-column layouts, |
| 74 |
right-to-left (RTL) scripts, custom drop caps, column-safe images, and |
| 75 |
newspaper-style headers, while remaining suitable for professional print |
| 76 |
output. |
| 77 |
|
| 78 |
% ================================================== |
| 79 |
\section{Requirements} |
| 80 |
|
| 81 |
This package \textbf{requires} one of the following engines: |
| 82 |
|
| 83 |
\begin{itemize} |
| 84 |
\item XeLaTeX |
| 85 |
\item LuaLaTeX |
| 86 |
\end{itemize} |
| 87 |
|
| 88 |
The package does \textbf{not} support pdfLaTeX, as full Unicode support |
| 89 |
is mandatory. |
| 90 |
|
| 91 |
% ================================================== |
| 92 |
\section{Installation} |
| 93 |
|
| 94 |
\subsection{Local Installation} |
| 95 |
|
| 96 |
Copy \texttt{modernnewspaper.sty} into the same directory as your |
| 97 |
\texttt{.tex} file. |
| 98 |
|
| 99 |
\subsection{User Installation} |
| 100 |
|
| 101 |
Alternatively, install it into your local \texttt{texmf} tree: |
| 102 |
|
| 103 |
\begin{verbatim} |
| 104 |
~/texmf/tex/latex/modernnewspaper/ |
| 105 |
\end{verbatim} |
| 106 |
|
| 107 |
% ================================================== |
| 108 |
\section{Basic Usage} |
| 109 |
|
| 110 |
Load the package in the document preamble: |
| 111 |
|
| 112 |
\begin{lstlisting} |
| 113 |
\usepackage{modernnewspaper} |
| 114 |
\end{lstlisting} |
| 115 |
|
| 116 |
% ================================================== |
| 117 |
\section{Metadata Commands} |
| 118 |
|
| 119 |
The following commands configure the newspaper metadata: |
| 120 |
|
| 121 |
\begin{lstlisting} |
| 122 |
\SetPaperName{Modern Newspaper} |
| 123 |
\SetPaperSlogan{Informing the future} |
| 124 |
\SetPaperLocation{Yangon, Myanmar} |
| 125 |
\SetPaperWebsite{https://example.com} |
| 126 |
\SetPaperVolume{1} |
| 127 |
\SetPaperIssue{5} |
| 128 |
\SetPaperDate{\today} |
| 129 |
\end{lstlisting} |
| 130 |
|
| 131 |
% ================================================== |
| 132 |
\section{Masthead} |
| 133 |
|
| 134 |
To typeset the main newspaper masthead (front page only), use: |
| 135 |
|
| 136 |
\begin{lstlisting} |
| 137 |
\MakePaperHeader |
| 138 |
\end{lstlisting} |
| 139 |
|
| 140 |
This command prints the paper name, slogan, location, volume, issue, |
| 141 |
date, and website URL. |
| 142 |
|
| 143 |
Inner pages typically use a simplified custom header. |
| 144 |
|
| 145 |
% ================================================== |
| 146 |
\section{Columns} |
| 147 |
|
| 148 |
Newspaper content is usually set in multiple columns. |
| 149 |
|
| 150 |
\begin{lstlisting} |
| 151 |
\BeginNewsColumns{3} |
| 152 |
% content |
| 153 |
\EndNewsColumns |
| 154 |
\end{lstlisting} |
| 155 |
|
| 156 |
The number of columns may be adjusted as needed. |
| 157 |
|
| 158 |
% ================================================== |
| 159 |
\section{Articles} |
| 160 |
|
| 161 |
Articles are created using the \texttt{article} environment together |
| 162 |
with headline and byline commands. |
| 163 |
|
| 164 |
\subsection{Headline} |
| 165 |
|
| 166 |
\begin{lstlisting} |
| 167 |
\headline{Article Title} |
| 168 |
\end{lstlisting} |
| 169 |
|
| 170 |
\subsection{Byline} |
| 171 |
|
| 172 |
\begin{lstlisting} |
| 173 |
\byline{Author Name} |
| 174 |
\end{lstlisting} |
| 175 |
|
| 176 |
The word ``By'' may be localized: |
| 177 |
|
| 178 |
\begin{lstlisting} |
| 179 |
\SetByWord{بقلم} |
| 180 |
\end{lstlisting} |
| 181 |
|
| 182 |
\subsection{Article Environment} |
| 183 |
|
| 184 |
\begin{lstlisting} |
| 185 |
\begin{article} |
| 186 |
\headline{Sample Article} |
| 187 |
\byline{Editor} |
| 188 |
|
| 189 |
This is the article body text. |
| 190 |
\end{article} |
| 191 |
\end{lstlisting} |
| 192 |
|
| 193 |
% ================================================== |
| 194 |
\section{Drop Caps} |
| 195 |
|
| 196 |
The package provides a Unicode-safe drop-cap command that works in |
| 197 |
multi-column layouts and with all scripts. |
| 198 |
|
| 199 |
\begin{lstlisting} |
| 200 |
\DropCap{E}nglish text starts here. |
| 201 |
\end{lstlisting} |
| 202 |
|
| 203 |
This implementation avoids the \texttt{lettrine} package to ensure |
| 204 |
stability with Unicode engines. |
| 205 |
|
| 206 |
% ================================================== |
| 207 |
\section{Images} |
| 208 |
|
| 209 |
Images are inserted using a column-safe command: |
| 210 |
|
| 211 |
\begin{lstlisting} |
| 212 |
\ArticleImage{0.9\columnwidth}{example-image}{Caption text} |
| 213 |
\end{lstlisting} |
| 214 |
|
| 215 |
This approach avoids floating conflicts inside multi-column layouts. |
| 216 |
|
| 217 |
% ================================================== |
| 218 |
\section{RTL Support} |
| 219 |
|
| 220 |
Right-to-left scripts such as Arabic and Hebrew are supported: |
| 221 |
|
| 222 |
\begin{lstlisting} |
| 223 |
\EnableRTL |
| 224 |
\SetByWord{بقلم} |
| 225 |
|
| 226 |
\begin{article} |
| 227 |
\headline{عنوان المقال} |
| 228 |
\byline{الكاتب} |
| 229 |
|
| 230 |
نص عربي تجريبي. |
| 231 |
\end{article} |
| 232 |
|
| 233 |
\DisableRTL |
| 234 |
\SetByWord{By} |
| 235 |
\end{lstlisting} |
| 236 |
|
| 237 |
% ================================================== |
| 238 |
\section{Unicode Support} |
| 239 |
|
| 240 |
The \textbf{modernnewspaper} package fully supports Unicode text across |
| 241 |
multiple scripts, provided appropriate fonts are installed. |
| 242 |
|
| 243 |
Supported scripts include: |
| 244 |
|
| 245 |
\begin{quote} |
| 246 |
မြန်မာစာ · العربية · हिन्दी · 中文 · English |
| 247 |
\end{quote} |
| 248 |
|
| 249 |
Fonts are selected explicitly per script to avoid missing glyphs. |
| 250 |
|
| 251 |
% ================================================== |
| 252 |
\section{Section Banners} |
| 253 |
|
| 254 |
Newspaper-style section banners may be created using horizontal rules |
| 255 |
with centered text: |
| 256 |
|
| 257 |
\begin{lstlisting} |
| 258 |
\SectionBanner{World News} |
| 259 |
\end{lstlisting} |
| 260 |
|
| 261 |
This produces a compact banner with rules above and below the text. |
| 262 |
|
| 263 |
% ================================================== |
| 264 |
\section{Limitations} |
| 265 |
|
| 266 |
Current limitations include: |
| 267 |
|
| 268 |
\begin{itemize} |
| 269 |
\item No automatic font switching (manual selection required) |
| 270 |
\item No theme presets |
| 271 |
\item No automatic page headers |
| 272 |
\end{itemize} |
| 273 |
|
| 274 |
These limitations are intentional to preserve layout stability. |
| 275 |
|
| 276 |
% ================================================== |
| 277 |
\section{Roadmap} |
| 278 |
|
| 279 |
Planned improvements include: |
| 280 |
|
| 281 |
\begin{itemize} |
| 282 |
\item Automatic font selection per script |
| 283 |
\item Newspaper class file (\texttt{modernnewspaper.cls}) |
| 284 |
\item Running headers and page numbers |
| 285 |
\item Theme presets |
| 286 |
\item CTAN submission |
| 287 |
\end{itemize} |
| 288 |
|
| 289 |
% ================================================== |
| 290 |
\section{License} |
| 291 |
|
| 292 |
This package is distributed under the |
| 293 |
\textbf{LaTeX Project Public License (LPPL) v1.3c}. |
| 294 |
|
| 295 |
See the \texttt{LICENSE} file or visit: |
| 296 |
\begin{center} |
| 297 |
\url{https://www.latex-project.org/lppl.txt} |
| 298 |
\end{center} |
| 299 |
|
| 300 |
% ================================================== |
| 301 |
\section{Contact} |
| 302 |
|
| 303 |
Project repository: |
| 304 |
|
| 305 |
\begin{center} |
| 306 |
\url{https://github.com/Laitei40/modernnewspaper} |
| 307 |
\end{center} |
| 308 |
|
| 309 |
\end{document} |