From 3416c5679e9cfa1ebba2296ecf401319a9f1cfe6 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Mon, 26 Sep 2022 03:03:51 +0000
Subject: CTAN sync 202209260303

---
 .../contrib/lettrine/doc/lettrine-demo-lua.tex     | 116 +++++++++++++++++++++
 1 file changed, 116 insertions(+)
 create mode 100644 macros/latex/contrib/lettrine/doc/lettrine-demo-lua.tex

(limited to 'macros/latex/contrib/lettrine/doc/lettrine-demo-lua.tex')

diff --git a/macros/latex/contrib/lettrine/doc/lettrine-demo-lua.tex b/macros/latex/contrib/lettrine/doc/lettrine-demo-lua.tex
new file mode 100644
index 0000000000..4492ade68e
--- /dev/null
+++ b/macros/latex/contrib/lettrine/doc/lettrine-demo-lua.tex
@@ -0,0 +1,116 @@
+\documentclass[12pt,paper=a4,german,french,british]{scrartcl}
+
+\usepackage{lettrine}
+\usepackage[dvipsnames]{xcolor}
+\usepackage[colorlinks, urlcolor=ForestGreen, linkcolor=blue]{hyperref}
+
+%%% Linux Libertine fonts...
+\usepackage{fontspec}
+\setmainfont{Linux Libertine O}
+%\setsansfont{TeX Gyre Heros}[Scale=MatchLowercase]
+\setmonofont{Latin Modern Mono}[Scale=MatchLowercase]
+
+\usepackage{Typocaps}
+
+\usepackage{babel}
+\frenchbsetup{AutoSpacePunctuation=false, og=«,fg=»}
+\babeltags{fr=french, de=german, uk=british}
+
+\newcommand*{\file}[1]{\texttt{#1}}
+\newcommand*{\cs}[1]{\texttt{\boi#1}}
+\newcommand*{\MF}{{\small\scshape metafont}}
+
+\setlength{\parindent}{0pt}
+\sloppy
+
+\begin{document}
+\thispagestyle{empty}
+\enlargethispage{2\baselineskip}
+
+\begin{center}
+\large\bfseries Some LuaLaTeX examples
+\end{center}
+
+Both files \file{demo-fr.tex} and \file{demo-de.tex} can be compiled either with
+pdfLaTeX or with LuaLaTeX or XeLaTeX. The purpose of the next examples is to
+show how easy it is to change the font for the dropped initial with Unicode
+engines: no need to care about the low-level NFSS syntax, a simple
+\cs{fontspec} call will do the trick.
+
+\vspace{.5\baselineskip}
+In the first example, \textit{ Linux Libertine Initials} is used for the
+dropped capital:\\
+\verb+\renewcommand{\LettrineFontHook}{\fontspec{LinLibertine_I.otf}}+\\
+\verb+\lettrine[lines=3]{E}{n plein marais de la Souteyranne...}+
+
+\begin{fr}
+  \renewcommand{\LettrineFontHook}{\fontspec{LinLibertine_I.otf}}
+  \lettrine[lines=3]{E}{n plein marais de la Souteyranne}, à quelques
+  kilomètres au nord d'Aigues-Mortes, se trouve la Tour Carbonnière.
+  Construite au XIII\ieme~siècle, elle contrôlait l'unique voie d'accès
+  terrestre de la ville fortifiée, celle qui menait à Psalmody,
+  l'une des « abbayes de sel» dont il ne reste que quelques vestiges.\par
+\end{fr}
+
+\vspace{.5\baselineskip}
+Of course, it is still possible to use Type\,1 fonts for the dropped capitals,
+here \textit{Typocaps} (red):\\
+\verb+\renewcommand{\LettrineFontHook}{\Typocapsfamily\color{red}}+\\
+\verb+\lettrine[findent=.3em]{E}{n plein marais de la Souteyranne}...+
+
+\begin{fr}
+\renewcommand{\LettrineFontHook}{\Typocapsfamily\color{red}}
+\lettrine[findent=.3em]{E}{n plein marais de la Souteyranne}, à quelques
+kilomètres au nord d'Aigues-Mortes, se trouve la Tour Carbonnière.
+Construite au XIII\ieme~siècle, elle contrôlait l'unique voie d'accès
+terrestre de la ville fortifiée.\par
+\end{fr}
+
+\vspace{.5\baselineskip}
+OpenType and TrueType free fonts are available for Old German, here is an example
+featuring the \textit{Yinit} OpenType font%
+\footnote{produced by Élie Roux from Yannis Haralambous’ Gothic Initials
+  originally in \MF.}
+for the initial and \textit{UnifrakturMaguntia} TrueType font%
+\footnote{\url{http://unifraktur.sourceforge.net/maguntia.html}}
+for the running text.  The later has several nice \textit{optional features},
+(here long s and old umlaut variant):
+
+\verb+\setmainfont{UnifrakturMaguntia.ttf}[StylisticSet=11,CharacterVariant=15]+\\
+\verb+\renewcommand{\LettrineTextFont}{\relax} % No small caps here!+ \\
+\verb+\renewcommand{\LettrineFontHook}{\fontspec{Yinit.otf}}+\\
+\verb+\lettrine[lhang=.2, loversize=.25, findent=0.1em]{W}{er} reitet+
+
+\begin{de}\Large
+\setmainfont{UnifrakturMaguntia.ttf}[StylisticSet=11,CharacterVariant=15]
+\renewcommand{\LettrineTextFont}{\relax}
+\renewcommand{\LettrineFontHook}{\fontspec{Yinit.otf}}
+\lettrine[lhang=.2, loversize=.25, findent=0.1em]
+{W}{er} reitet so spät durch Nacht und Wind?\\
+Es ist der Vater mit seinem Kind;\\
+Er hat den Knaben wohl in dem Arm,\\
+Er faßt ihn sicher, er hält ihn warm.\par
+\end{de}
+
+\vspace{.5\baselineskip}
+Without the \textit{optional features}, the output looks more modern:
+
+\begin{otherlanguage}{german}\Large
+\setmainfont{UnifrakturMaguntia.ttf}
+\renewcommand{\LettrineTextFont}{\relax}
+\renewcommand{\LettrineFontHook}{\fontspec{Yinit.otf}}
+\lettrine[lhang=.2, loversize=.25, findent=0.1em]
+{W}{er} reitet so spät durch Nacht und Wind?\\
+Es ist der Vater mit seinem Kind;\\
+Er hat den Knaben wohl in dem Arm,\\
+Er faßt ihn sicher, er hält ihn warm.\par
+\end{otherlanguage}
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% coding: utf-8
+%%% TeX-master: t
+%%% TeX-engine: luatex
+%%% End:
-- 
cgit v1.2.3

