| 1 |
% !TeX TXS-program:compile = txs:///pdflatex |
| 2 |
|
| 3 |
\documentclass[11pt,a4paper]{ltxdoc} |
| 4 |
\usepackage{ipsum} |
| 5 |
\usepackage{fancyvrb} |
| 6 |
\usepackage{fancyhdr} |
| 7 |
\usepackage{fontawesome5} |
| 8 |
\fancyhf{} |
| 9 |
\renewcommand{\headrulewidth}{0pt} |
| 10 |
\lfoot{\sffamily\small [ipsum]} |
| 11 |
\cfoot{\sffamily\small - \thepage{} -} |
| 12 |
\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}} |
| 13 |
\usepackage{hologo} |
| 14 |
\providecommand\tikzlogo{Ti\textit{k}Z} |
| 15 |
\providecommand\TeXLive{\TeX{}Live\xspace} |
| 16 |
\providecommand\PSTricks{\textsf{PSTricks}\xspace} |
| 17 |
\let\pstricks\PSTricks |
| 18 |
\let\TikZ\tikzlogo |
| 19 |
|
| 20 |
\usepackage{hyperref} |
| 21 |
\urlstyle{same} |
| 22 |
\hypersetup{pdfborder=0 0 0} |
| 23 |
\usepackage[margin=1.5cm]{geometry} |
| 24 |
\setlength{\parindent}{0pt} |
| 25 |
\def\TPversion{0.1.3} |
| 26 |
\def\TPdate{15/07/2025} |
| 27 |
\usepackage{tcolorbox} |
| 28 |
\tcbuselibrary{skins,hooks} |
| 29 |
\usepackage{soul} |
| 30 |
\sethlcolor{lightgray!25} |
| 31 |
\NewDocumentCommand\MontreCode{ m }{% |
| 32 |
\hl{\vphantom{\texttt{pf}}\texttt{#1}}% |
| 33 |
} |
| 34 |
\NewDocumentCommand\GenSample{ O{#2} m }{% |
| 35 |
%\hfill\textbf{\textsf{LANG=#1}}\par\smallskip |
| 36 |
\hrule\par\smallskip |
| 37 |
\ipsum<Type=sent,Lang=#2>\par\smallskip |
| 38 |
\hrule\par\smallskip |
| 39 |
\ipsum<Type=sent,Lang=#2>[5-6]\par\smallskip |
| 40 |
\hrule\par\smallskip |
| 41 |
\ipsum<Lang=#2>[2]\par\smallskip |
| 42 |
\hrule\par\smallskip |
| 43 |
\ipsum<Lang=#2>[1-3]\par\smallskip |
| 44 |
\hrule\par\smallskip |
| 45 |
\ipsum<Lang=#2>[6-7]\par\smallskip |
| 46 |
\hrule\par\smallskip |
| 47 |
\ipsum<Type=enum,Lang=#2>[2-4]\par\smallskip |
| 48 |
\hrule\par\smallskip |
| 49 |
\ipsum<Type=item,Lang=#2>[8-9]\par\smallskip |
| 50 |
\hrule\par\smallskip |
| 51 |
} |
| 52 |
|
| 53 |
\begin{document} |
| 54 |
|
| 55 |
\pagestyle{fancy} |
| 56 |
|
| 57 |
\thispagestyle{empty} |
| 58 |
|
| 59 |
\begin{center} |
| 60 |
\begin{minipage}{0.88\linewidth} |
| 61 |
\begin{tcolorbox}[colframe=yellow,colback=yellow!15] |
| 62 |
\begin{center} |
| 63 |
\begin{tabular}{c} |
| 64 |
{\Huge \texttt{ipsum}}\\ |
| 65 |
\\ |
| 66 |
{\LARGE Creating "Dummy Text" with multilingual support.} \\ |
| 67 |
\\ |
| 68 |
{\small \texttt{Version \TPversion{} -- \TPdate}} |
| 69 |
\end{tabular} |
| 70 |
\end{center} |
| 71 |
\end{tcolorbox} |
| 72 |
\end{minipage} |
| 73 |
\end{center} |
| 74 |
|
| 75 |
\begin{center} |
| 76 |
\begin{tabular}{c} |
| 77 |
\texttt{Cédric Pierquet}\\ |
| 78 |
{\ttfamily cpierquet -- at -- outlook . fr}\\ |
| 79 |
~ \\ |
| 80 |
\texttt{\url{https://forge.apps.education.fr/pierquetcedric/packages-latex}} \\ |
| 81 |
\texttt{\url{https://github.com/cpierquet/latex-packages/tree/main/ipsum}} \\ |
| 82 |
~ \\ |
| 83 |
\texttt{Thanks to \url{https://ipsum.one/} for the paragraphs, with free license !} |
| 84 |
\end{tabular} |
| 85 |
\end{center} |
| 86 |
|
| 87 |
\hrule |
| 88 |
|
| 89 |
\vspace*{5mm} |
| 90 |
|
| 91 |
\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5] |
| 92 |
\ipsum<Lang=EN>[6] |
| 93 |
\end{tcolorbox} |
| 94 |
|
| 95 |
\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5] |
| 96 |
\ipsum<Lang=LAT>[4] |
| 97 |
\end{tcolorbox} |
| 98 |
|
| 99 |
\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5] |
| 100 |
\ipsum<Lang=FR>[2] |
| 101 |
\end{tcolorbox} |
| 102 |
|
| 103 |
\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5] |
| 104 |
\ipsum<Type=enum,Lang=NL>[6-9] |
| 105 |
\end{tcolorbox} |
| 106 |
|
| 107 |
\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5] |
| 108 |
\ipsum<Type=item,Lang=ES>[1-3] |
| 109 |
\end{tcolorbox} |
| 110 |
|
| 111 |
\vfill~ |
| 112 |
|
| 113 |
\pagebreak |
| 114 |
|
| 115 |
\phantomsection |
| 116 |
|
| 117 |
\hypertarget{matoc}{} |
| 118 |
|
| 119 |
\tableofcontents |
| 120 |
|
| 121 |
\vspace*{5mm} |
| 122 |
|
| 123 |
\hrule |
| 124 |
|
| 125 |
\vspace*{5mm} |
| 126 |
|
| 127 |
\section{Introduction} |
| 128 |
|
| 129 |
\subsection{Description} |
| 130 |
|
| 131 |
With this package you can create dummy text, in several languages. |
| 132 |
|
| 133 |
Use \cmd{\ipsum} to get some paragraphs/sentences/lists, with optional languages and optional numbers. |
| 134 |
|
| 135 |
Details can be found at \url{https://ipsum.one/}. |
| 136 |
|
| 137 |
\subsection{Loading} |
| 138 |
|
| 139 |
To load the package (all languages are loaded), simply use: |
| 140 |
|
| 141 |
\begin{quote} |
| 142 |
\begin{verbatim} |
| 143 |
\usepackage{ipsum} |
| 144 |
\end{verbatim} |
| 145 |
\end{quote} |
| 146 |
|
| 147 |
In order to load 'user' languages, use: |
| 148 |
|
| 149 |
\begin{quote} |
| 150 |
\begin{verbatim} |
| 151 |
\usepackage[lng={...}]{ipsum} |
| 152 |
|
| 153 |
%within fr en de es pt nl it |
| 154 |
%lng=all is an alias for lng={fr,en,de,es,pt,nl,it} (by default) |
| 155 |
\end{verbatim} |
| 156 |
\end{quote} |
| 157 |
|
| 158 |
\vfill |
| 159 |
|
| 160 |
\subsection{History} |
| 161 |
|
| 162 |
\begin{quote} |
| 163 |
\begin{verbatim} |
| 164 |
0.1.3: Bugfix + option for lng loading |
| 165 |
0.1.2: Fix typo in doc |
| 166 |
0.1.0: Initial version |
| 167 |
\end{verbatim} |
| 168 |
\end{quote} |
| 169 |
|
| 170 |
\pagebreak |
| 171 |
|
| 172 |
\section{The macros} |
| 173 |
|
| 174 |
\subsection{General usage} |
| 175 |
|
| 176 |
In order to print one or several paragraphs/sentences/lists, the command is: |
| 177 |
|
| 178 |
\begin{quote} |
| 179 |
\begin{verbatim} |
| 180 |
\ipsum<Lang=...,Type=...>[range] |
| 181 |
\end{verbatim} |
| 182 |
\end{quote} |
| 183 |
|
| 184 |
Available \textsf{Lang} are: |
| 185 |
|
| 186 |
\begin{multicols}{4} |
| 187 |
\begin{itemize} |
| 188 |
\item \texttt{LAT}: Latin (def.) |
| 189 |
\item \texttt{~EN}: English |
| 190 |
\item \texttt{~FR}: French |
| 191 |
\item \texttt{~DE}: German |
| 192 |
\item \texttt{~ES}: Spanish |
| 193 |
\item \texttt{~PT}: Portuguese |
| 194 |
\item \texttt{~IT}: Italian |
| 195 |
\item \texttt{~NL}: Dutch |
| 196 |
\end{itemize} |
| 197 |
\end{multicols} |
| 198 |
|
| 199 |
Available \textsf{Type} are: |
| 200 |
|
| 201 |
\begin{multicols}{2} |
| 202 |
\begin{itemize} |
| 203 |
\item \texttt{~par}: paragraphs (def.) |
| 204 |
\item \texttt{sent}: sentences |
| 205 |
\item \texttt{enum}: enumerated list |
| 206 |
\item \texttt{item}: itemized list |
| 207 |
\end{itemize} |
| 208 |
\end{multicols} |
| 209 |
|
| 210 |
The \textsf{range} can be given (by default it's \texttt{1}): |
| 211 |
|
| 212 |
\begin{itemize} |
| 213 |
\item by one number, between \texttt{1} and \texttt{7} ; |
| 214 |
\item by two numbers, \texttt{a-b} (with $\mathtt{1 \leq a < b \leq 7}$ for paragraphs, and $\mathtt{1 \leq a < b \leq 9}$ for others). |
| 215 |
\end{itemize} |
| 216 |
|
| 217 |
\subsection{Samples} |
| 218 |
|
| 219 |
Each language is illustrated with: |
| 220 |
|
| 221 |
\begin{quote} |
| 222 |
\begin{verbatim} |
| 223 |
\ipsum<Type=sent,Lang=...> %the first sentence |
| 224 |
\ipsum<Type=sent,Lang=...>[5-6] %the 5/6th sentences |
| 225 |
\ipsum<Lang=...>[2] %the second paragraph |
| 226 |
\ipsum<Lang=...>[1-3] %the first three |
| 227 |
\ipsum<Lang=...>[6-7] %the last two |
| 228 |
\ipsum<Type=enum,Lang=...>[2-4] %enumlist with 2/3/4th sentences |
| 229 |
\ipsum<Type=item,Lang=...>[8-9] %itemist with last two sentences |
| 230 |
\end{verbatim} |
| 231 |
\end{quote} |
| 232 |
|
| 233 |
\pagebreak |
| 234 |
|
| 235 |
\subsubsection{Lang = Default} |
| 236 |
|
| 237 |
\GenSample[Default]{LAT} |
| 238 |
|
| 239 |
\pagebreak |
| 240 |
|
| 241 |
\subsubsection{Lang = EN} |
| 242 |
|
| 243 |
\GenSample{EN} |
| 244 |
|
| 245 |
\pagebreak |
| 246 |
|
| 247 |
\subsubsection{Lang = FR} |
| 248 |
|
| 249 |
\GenSample{FR} |
| 250 |
|
| 251 |
\pagebreak |
| 252 |
|
| 253 |
\subsubsection{Lang = DE} |
| 254 |
|
| 255 |
\GenSample{DE} |
| 256 |
|
| 257 |
\pagebreak |
| 258 |
|
| 259 |
\subsubsection{Lang = ES} |
| 260 |
|
| 261 |
\GenSample{ES} |
| 262 |
|
| 263 |
\pagebreak |
| 264 |
|
| 265 |
\subsubsection{Lang = PT} |
| 266 |
|
| 267 |
\GenSample{PT} |
| 268 |
|
| 269 |
\pagebreak |
| 270 |
|
| 271 |
\subsubsection{Lang = IT} |
| 272 |
|
| 273 |
\GenSample{IT} |
| 274 |
|
| 275 |
\pagebreak |
| 276 |
|
| 277 |
\subsubsection{Lang = NL} |
| 278 |
|
| 279 |
\GenSample{NL} |
| 280 |
|
| 281 |
\end{document} |