diff options
Diffstat (limited to 'language/greek/greek-fontenc/hyperref-with-greek.tex')
-rw-r--r-- | language/greek/greek-fontenc/hyperref-with-greek.tex | 345 |
1 files changed, 182 insertions, 163 deletions
diff --git a/language/greek/greek-fontenc/hyperref-with-greek.tex b/language/greek/greek-fontenc/hyperref-with-greek.tex index e0c8d94b15..c8906a36d2 100644 --- a/language/greek/greek-fontenc/hyperref-with-greek.tex +++ b/language/greek/greek-fontenc/hyperref-with-greek.tex @@ -1,16 +1,21 @@ \documentclass{article} -\usepackage[LGR,T1]{fontenc} -\usepackage{lmodern} \usepackage[unicode,colorlinks=true,linkcolor=blue]{hyperref} % \usepackage{bookmark} +\usepackage[LGR,T1]{fontenc} +\usepackage{lmodern} + \usepackage[greek,english]{babel} \usepackage[normalize-symbols]{alphabeta} \usepackage[utf8]{inputenc} % \pagestyle{headings} +\IfFormatAtLeastTF{2022/06/01} + {\newcommand*{\testnewmakeuppercase}{\MakeUppercase}} + {\newcommand*{\testnewmakeuppercase}{\relax}} + \begin{document} \title{Greek and hyperref} @@ -39,39 +44,37 @@ All utf8-encoded literal Unicode characters work in PDF strings. With \emph{greek-fontenc} and \emph{greek-inputenc}, this enables use of all Greek character in text and PDF strings. +With the \emph{textalpha} package, Greek letters can be used without +explicit change of the font encoding or Babel language (with some caveats, +see textalpha-doc.pdf). +For correct hyphenation and other fixes, mark Greek text parts with the +Babel language \texttt{greek}. There should be no space around a language +switch: |\foreignlanguage{greek}{λογος}| + \section{Transcription: \ensuregreek{logos}, \foreignlanguage{greek}{logos}} -\textbackslash{}textgreek + LGR transcription or -Greek language (babel) + LGR transcription: +Text input using the Latin transliteration: In the PDF-bookmark are Latin letters instead of Greek ones. - \section{Macros: - \textlambda\textomicron\textgamma\textomicron\textvarsigma{}, - \lambda\omicron\gamma\omicron\varsigma{}, - λογος} - -\emph{textalpha} package with \textbackslash{}textalpha \ldots -\textbackslash{}textomega macros or \emph{alphabeta} package with -\textbackslash{}alpha \ldots \textbackslash{}Omega macros. With 8-bit TeX -engines (pdflatex), literal Greek Unicode characters are converted to LICR -Macros, too. + \foreignlanguage{greek}{% + \textlambda\textomicron\textgamma\textomicron\textvarsigma}, + \textlambda\textomicron\textgamma\textomicron\textvarsigma{}, + \lambda\omicron\gamma\omicron\varsigma{}, + λογος, + } + +\emph{Babel-Greek} or \emph{textalpha} package with \verb|\textalpha| \ldots +\verb|textomega| macros; \emph{alphabeta} package with +\verb|alpha| \ldots \verb|Omega| macros. +With 8-bit TeX (pdflatex), literal Greek Unicode characters are +converted to LICR Macros, too. Works, if the \texttt{unicode} or \texttt{pdfencoding=auto} option is given to \emph{hyperref}.% \footnote{With the ``xpdf'' viewer, Greek letters are not shown in PDF bookmarks.} -The generic short macros from the \emph{alphabeta} package result in -hyperref warnings. See \href{alphabeta-doc.pdf}{alphabeta-doc.pdf} and -\href{alphabeta-doc.tex}{alphabeta-doc.tex} -for details and workarounds. - - -\section{LGR + Macros: \foreignlanguage{greek}{ - \textlambda\textomicron\textgamma\textomicron\textvarsigma{}}} - -LICR-macro input works also if the font encoding is LGR. \section{% Kerning: \textAlpha\textUpsilon\textLambda{} @@ -219,120 +222,120 @@ works fine. }} -Currently, there is no hyperref support for LICR input with non-standard -accents or combined diacritics characters. +\emph{textalpha} load definitions for LICR input with non-standard +accents or combined diacritics characters also for PU (hyperref). \subsection{\ensuregreek{ - \accpsili\textalpha - \accdasia\textalpha - \accpsili`\textalpha - \accdasia`\textalpha - \accpsili'\textalpha - \accdasia'\textalpha + \>\textalpha + \<\textalpha + \>`\textalpha + \<`\textalpha + \>'\textalpha + \<'\textalpha \~>\textalpha \~<\textalpha - \accpsili\textAlpha - \accdasia\textAlpha - \accpsili`\textAlpha - \accdasia`\textAlpha - \accpsili'\textAlpha - \accdasia'\textAlpha + \>\textAlpha + \<\textAlpha + \>`\textAlpha + \<`\textAlpha + \>'\textAlpha + \<'\textAlpha \~>\textAlpha \~<\textAlpha }} \subsection{\ensuregreek{ - \accpsili\textepsilon - \accdasia\textepsilon - \accpsili`\textepsilon - \accdasia`\textepsilon - \accpsili'\textepsilon - \accdasia'\textepsilon - \accpsili\textEpsilon - \accdasia\textEpsilon - \accpsili`\textEpsilon - \accdasia`\textEpsilon - \accpsili'\textEpsilon - \accdasia'\textEpsilon + \>\textepsilon + \<\textepsilon + \>`\textepsilon + \<`\textepsilon + \>'\textepsilon + \<'\textepsilon + \>\textEpsilon + \<\textEpsilon + \>`\textEpsilon + \<`\textEpsilon + \>'\textEpsilon + \<'\textEpsilon }} \subsection{\ensuregreek{ - \accpsili\texteta - \accdasia\texteta - \accpsili`\texteta - \accdasia`\texteta - \accpsili'\texteta - \accdasia'\texteta + \>\texteta + \<\texteta + \>`\texteta + \<`\texteta + \>'\texteta + \<'\texteta \~>\texteta \~<\texteta - \accpsili\textEta - \accdasia\textEta - \accpsili`\textEta - \accdasia`\textEta - \accpsili'\textEta - \accdasia'\textEta + \>\textEta + \<\textEta + \>`\textEta + \<`\textEta + \>'\textEta + \<'\textEta \~>\textEta \~<\textEta }} \subsection{\ensuregreek{ - \accpsili\textiota - \accdasia\textiota - \accpsili`\textiota - \accdasia`\textiota - \accpsili'\textiota - \accdasia'\textiota + \>\textiota + \<\textiota + \>`\textiota + \<`\textiota + \>'\textiota + \<'\textiota \~>\textiota \~<\textiota - \accpsili\textIota - \accdasia\textIota - \accpsili`\textIota - \accdasia`\textIota - \accpsili'\textIota - \accdasia'\textIota + \>\textIota + \<\textIota + \>`\textIota + \<`\textIota + \>'\textIota + \<'\textIota \~>\textIota \~<\textIota }} \subsection{\ensuregreek{ - \accpsili\textomicron - \accdasia\textomicron - \accpsili`\textomicron - \accdasia`\textomicron - \accpsili'\textomicron - \accdasia'\textomicron - \accpsili\textOmicron - \accdasia\textOmicron - \accpsili`\textOmicron - \accdasia`\textOmicron - \accpsili'\textOmicron - \accdasia'\textOmicron + \>\textomicron + \<\textomicron + \>`\textomicron + \<`\textomicron + \>'\textomicron + \<'\textomicron + \>\textOmicron + \<\textOmicron + \>`\textOmicron + \<`\textOmicron + \>'\textOmicron + \<'\textOmicron }} \subsection{\ensuregreek{ - \accpsili\textupsilon - \accdasia\textupsilon - \accpsili`\textupsilon - \accdasia`\textupsilon - \accpsili'\textupsilon - \accdasia'\textupsilon + \>\textupsilon + \<\textupsilon + \>`\textupsilon + \<`\textupsilon + \>'\textupsilon + \<'\textupsilon \~>\textupsilon \~<\textupsilon - \accdasia\textUpsilon - \accdasia`\textUpsilon - \accdasia'\textUpsilon + \<\textUpsilon + \<`\textUpsilon + \<'\textUpsilon \~<\textUpsilon }} \subsection{\ensuregreek{ - \accpsili\textomega - \accdasia\textomega - \accpsili`\textomega - \accdasia`\textomega - \accpsili'\textomega - \accdasia'\textomega + \>\textomega + \<\textomega + \>`\textomega + \<`\textomega + \>'\textomega + \<'\textomega \~>\textomega \~<\textomega - \accpsili\textOmega - \accdasia\textOmega - \accpsili`\textOmega - \accdasia`\textOmega - \accpsili'\textOmega - \accdasia'\textOmega + \>\textOmega + \<\textOmega + \>`\textOmega + \<`\textOmega + \>'\textOmega + \<'\textOmega \~>\textOmega \~<\textOmega }} @@ -353,56 +356,56 @@ accents or combined diacritics characters. \accoxia\textomega }} \subsection{\ensuregreek{ - \accpsili\textalpha\ypogegrammeni - \accdasia\textalpha\ypogegrammeni - \accpsili`\textalpha\ypogegrammeni - \accdasia`\textalpha\ypogegrammeni - \accpsili'\textalpha\ypogegrammeni - \accdasia'\textalpha\ypogegrammeni + \>\textalpha\ypogegrammeni + \<\textalpha\ypogegrammeni + \>`\textalpha\ypogegrammeni + \<`\textalpha\ypogegrammeni + \>'\textalpha\ypogegrammeni + \<'\textalpha\ypogegrammeni \~>\textalpha\ypogegrammeni \~<\textalpha\ypogegrammeni - \accpsili\textAlpha\ypogegrammeni - \accdasia\textAlpha\ypogegrammeni - \accpsili`\textAlpha\ypogegrammeni - \accdasia`\textAlpha\ypogegrammeni - \accpsili'\textAlpha\ypogegrammeni - \accdasia'\textAlpha\ypogegrammeni + \>\textAlpha\ypogegrammeni + \<\textAlpha\ypogegrammeni + \>`\textAlpha\ypogegrammeni + \<`\textAlpha\ypogegrammeni + \>'\textAlpha\ypogegrammeni + \<'\textAlpha\ypogegrammeni \~>\textAlpha\ypogegrammeni \~<\textAlpha\ypogegrammeni }} \subsection{\ensuregreek{ - \accpsili\texteta\ypogegrammeni - \accdasia\texteta\ypogegrammeni - \accpsili`\texteta\ypogegrammeni - \accdasia`\texteta\ypogegrammeni - \accpsili'\texteta\ypogegrammeni - \accdasia'\texteta\ypogegrammeni + \>\texteta\ypogegrammeni + \<\texteta\ypogegrammeni + \>`\texteta\ypogegrammeni + \<`\texteta\ypogegrammeni + \>'\texteta\ypogegrammeni + \<'\texteta\ypogegrammeni \~>\texteta\ypogegrammeni \~<\texteta\ypogegrammeni - \accpsili\textEta\ypogegrammeni - \accdasia\textEta\ypogegrammeni - \accpsili`\textEta\ypogegrammeni - \accdasia`\textEta\ypogegrammeni - \accpsili'\textEta\ypogegrammeni - \accdasia'\textEta\ypogegrammeni + \>\textEta\ypogegrammeni + \<\textEta\ypogegrammeni + \>`\textEta\ypogegrammeni + \<`\textEta\ypogegrammeni + \>'\textEta\ypogegrammeni + \<'\textEta\ypogegrammeni \~>\textEta\ypogegrammeni \~<\textEta\ypogegrammeni }} \subsection{\ensuregreek{ - \accpsili\textomega\ypogegrammeni - \accdasia\textomega\ypogegrammeni - \accpsili`\textomega\ypogegrammeni - \accdasia`\textomega\ypogegrammeni - \accpsili'\textomega\ypogegrammeni - \accdasia'\textomega\ypogegrammeni + \>\textomega\ypogegrammeni + \<\textomega\ypogegrammeni + \>`\textomega\ypogegrammeni + \<`\textomega\ypogegrammeni + \>'\textomega\ypogegrammeni + \<'\textomega\ypogegrammeni \~>\textomega\ypogegrammeni \~<\textomega\ypogegrammeni - \accpsili\textOmega\ypogegrammeni - \accdasia\textOmega\ypogegrammeni - \accpsili`\textOmega\ypogegrammeni - \accdasia`\textOmega\ypogegrammeni - \accpsili'\textOmega\ypogegrammeni - \accdasia'\textOmega\ypogegrammeni + \>\textOmega\ypogegrammeni + \<\textOmega\ypogegrammeni + \>`\textOmega\ypogegrammeni + \<`\textOmega\ypogegrammeni + \>'\textOmega\ypogegrammeni + \<'\textOmega\ypogegrammeni \~>\textOmega\ypogegrammeni \~<\textOmega\ypogegrammeni }} @@ -419,9 +422,9 @@ accents or combined diacritics characters. \accvaria\textAlpha \accoxia\textAlpha \textAlpha\ypogegrammeni - \accpsili{ } + \>{ } { }\prosgegrammeni - \accpsili{ } + \>{ } }} \subsection{\ensuregreek{ \accperispomeni\textcompwordmark @@ -436,8 +439,8 @@ accents or combined diacritics characters. \accvaria\textEta \accoxia\textEta \textEta\ypogegrammeni - \accpsili`{ } - \accpsili'{ } + \>`{ } + \>'{ } \~>{ } }} \subsection{\ensuregreek{ @@ -451,8 +454,8 @@ accents or combined diacritics characters. \=\textIota \accvaria\textIota \accoxia\textIota - \accdasia`{ } - \accpsili'{ } + \<`{ } + \>'{ } \~<{ } }} \subsection{\ensuregreek{ @@ -460,15 +463,15 @@ accents or combined diacritics characters. \=\textupsilon \`"\textupsilon \'"\textupsilon - \accpsili\textrho - \accdasia\textrho + \>\textrho + \<\textrho \~\textupsilon \~"\textupsilon \u\textUpsilon \=\textUpsilon \accvaria\textUpsilon \accoxia\textUpsilon - \accdasia\textRho + \<\textRho \`"{ } \'"{ } \accvaria{ } @@ -485,25 +488,41 @@ accents or combined diacritics characters. \accoxia\textOmega \textOmega\ypogegrammeni \accoxia{ } - \accdasia{ } + \<{ } }} \section{Makeuppercase} According to Greek typesetting conventions, -diacritics (except the dialytika) are dropped in ALL CAPS. +diacritics (except the dialytika) are dropped in UPPERCASE. + +The LaTeX \verb|\Makeuppercase| implementation changed fundamentally +with the release in 06/2022.\footnote{% + This change cannot be reverted with the rollback mechanism + ``for technical reasons''.} +\verb|\Makeuppercase| is now supported PDF-strings. +Greek typesetting rules are ony applied if the text language is +set to \texttt{greek} with Babel's \verb|\setlanguage| or +\verb|\foreignlanguage|. + +The changes broke the support for upcasing of polutonic Greek (combined +accents) with LICR input and of Greek with the LGR Latin transliteration. +Restoring support is currently (2023/02/10) worked on. + +\selectlanguage{greek} +\subsection{\testnewmakeuppercase{ἀἁἂἃἄἅἆἇἈἉἊἋἌἍἎἏ}} -However, \verb|\Makeuppercase| is not supported in PDF-strings, so we -do not need to care for this. +\selectlanguage{english} +\verb|Makeuppercase| is not supported in PDF strings with LaTeX versions +older than 06/2022. \section{Conclusion} -For Greek text parts in section headers use either literal Unicode -characters% -\footnote{Pre-composed Unicode characters must be used for multi-accented -letters or non-standard accents. Combining Unicode characters do not work -with inputenc and 8-bit LaTeX – this is a general restriction.} or macros. -For proper kerning in the main document, combine this with the -\verb+\textgreek+ or \verb+\foreignlanguage{greek}+ macros. +For Greek text parts in section headers use either literal Unicode characters% + \footnote{Pre-composed Unicode characters must be used for multi-accented + letters or non-standard accents. Combining Unicode characters do not work + with inputenc and 8-bit LaTeX – this is a general restriction.} +or macros. For proper kerning und upcasing in the main document, set the +language with \verb|\foreignlanguage{greek}|. \end{document} |