diff options
author | Norbert Preining <norbert@preining.info> | 2023-09-13 03:01:35 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-09-13 03:01:35 +0000 |
commit | de0fb15550a55ba5685a755fec7326e21a79fccd (patch) | |
tree | d31a21d9ea35405a0482f92ff12caabd84eae9e4 /language/greek/greek-fontenc/hyperref-with-greek.tex | |
parent | becf79ac9bbdddd15ef9d66a35c6d64252a2cd46 (diff) |
CTAN sync 202309130301
Diffstat (limited to 'language/greek/greek-fontenc/hyperref-with-greek.tex')
-rw-r--r-- | language/greek/greek-fontenc/hyperref-with-greek.tex | 360 |
1 files changed, 248 insertions, 112 deletions
diff --git a/language/greek/greek-fontenc/hyperref-with-greek.tex b/language/greek/greek-fontenc/hyperref-with-greek.tex index c8906a36d2..227807d420 100644 --- a/language/greek/greek-fontenc/hyperref-with-greek.tex +++ b/language/greek/greek-fontenc/hyperref-with-greek.tex @@ -1,20 +1,30 @@ \documentclass{article} \usepackage[unicode,colorlinks=true,linkcolor=blue]{hyperref} -% \usepackage{bookmark} +\usepackage{bookmark} +% \pagestyle{headings} -\usepackage[LGR,T1]{fontenc} -\usepackage{lmodern} -\usepackage[greek,english]{babel} +\ifdefined \UnicodeEncodingName + \usepackage{fontspec} + \setmainfont[Renderer=Harfbuzz]{FreeSerif} + \ifdefined\luatexversion + \newcommand*{\texengine}{LuaTeX} + \else + \newcommand*{\texengine}{XeTeX} + \fi +\else + \usepackage[LGR,T1]{fontenc} + \usepackage{lmodern} + \newcommand*{\texengine}{pdfTeX} +\fi + +\usepackage[greek.polutoniko,english]{babel} \usepackage[normalize-symbols]{alphabeta} -\usepackage[utf8]{inputenc} - -% \pagestyle{headings} -\IfFormatAtLeastTF{2022/06/01} - {\newcommand*{\testnewmakeuppercase}{\MakeUppercase}} - {\newcommand*{\testnewmakeuppercase}{\relax}} +% auxiliary commands +\newcommand{\cs}[1]{\texttt{\textbackslash #1}} +\newcommand*{\TestUppercase}[1]{#1 → \MakeUppercase{#1}} \begin{document} @@ -23,11 +33,13 @@ \date{2020/10/30} \maketitle +\tableofcontents + \noindent On 2010-11-05, Heiko Oberdiek wrote in comp.text.tex: % \begin{quote} - \textbackslash pdfstringdef (converting TeX code to PDF strings for + \cs{pdfstringdef} (converting TeX code to PDF strings for bookmarks) supports NFSS2 and needs active characters. Encoding stuff based on the internal font machinery of TeX (letters with catcode 11 or 12, ligatures) does not work, because the strings @@ -49,7 +61,7 @@ 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}{λογος}| +switch: |\foreignlanguage{greek}{λογος}|. \section{Transcription: \ensuregreek{logos}, \foreignlanguage{greek}{logos}} @@ -58,15 +70,15 @@ In the PDF-bookmark are Latin letters instead of Greek ones. \section{Macros: \foreignlanguage{greek}{% - \textlambda\textomicron\textgamma\textomicron\textvarsigma}, - \textlambda\textomicron\textgamma\textomicron\textvarsigma{}, - \lambda\omicron\gamma\omicron\varsigma{}, + \textlambda\textomicron\textgamma\textomicron\textfinalsigma}, + \textlambda\textomicron\textgamma\textomicron\textfinalsigma{}, + \lambda\omicron\gamma\omicron\finalsigma{}, λογος, } -\emph{Babel-Greek} or \emph{textalpha} package with \verb|\textalpha| \ldots -\verb|textomega| macros; \emph{alphabeta} package with -\verb|alpha| \ldots \verb|Omega| macros. +\emph{Babel-Greek} or \emph{textalpha} package with \cs{textalpha} … +\cs{textomega} macros; \emph{alphabeta} package with +\cs{alpha} … \cs{Omega} macros. With 8-bit TeX (pdflatex), literal Greek Unicode characters are converted to LICR Macros, too. @@ -82,7 +94,7 @@ to \emph{hyperref}.% \foreignlanguage{greek}{\textAlpha\textUpsilon\textLambda}% } -Kerning is impossible if the font encoding is switched for every single +Kerning is impeded if the font encoding is switched for every single character. To fix this, wrap the Greek part in a command switching to a font encoding supporting Greek, either \verb+\ensuregreek{...}+ (with package \emph{textalpha} or \emph{Babel}) or \verb+\foreignlanguage{greek}{...}+ @@ -104,7 +116,7 @@ Greek and Coptic Unicode block: lowercase letters \subsection{ἀἁἂἃἄἅἆἇἈἉἊἋἌἍἎἏ} \subsection{ἐἑἒἓἔἕἘἙἚἛἜἝ} \subsection{ἠἡἢἣἤἥἦἧἨἩἪἫἬἭἮἯ} -\subsection{ἰἱἲἳἴἵἶἷἸἹἺἻἼἽἾἿ} +\subsection{ἰ ἱ ἲ ἳ ἴ ἵ ἶ ἷ Ἰ Ἱ Ἲ Ἳ Ἴ Ἵ Ἶ Ἷ} \subsection{ὀὁὂὃὄὅὈὉὊὋὌὍ} \subsection{ὐὑὒὓὔὕὖὗὙὛὝὟ} \subsection{ὠὡὢὣὤὥὦὧὨὩὪὫὬὭὮὯ} @@ -114,7 +126,7 @@ Greek and Coptic Unicode block: lowercase letters \subsection{ᾠᾡᾢᾣᾤᾥᾦᾧᾨᾩᾪᾫᾬᾭᾮᾯ} \subsection{ᾰᾱᾲᾳᾴᾶᾷᾸᾹᾺΆᾼ᾽ι᾿} \subsection{῀῁ῂῃῄῆῇῈΈῊΉῌ῍῎῏} -\subsection{ῐῑῒΐῖῗῘῙῚΊ῝῞῟} +\subsection{ῐ ῑ ῒ ΐ ῖ ῗ Ῐ Ῑ Ὶ Ί ῝῞῟} \subsection{ῠῡῢΰῤῥῦῧῨῩῪΎῬ῭΅`} \subsection{ῲῳῴῶῷῸΌῺΏῼ´῾} @@ -123,9 +135,9 @@ works fine. \section{LICR command input} -\subsection{\ensuregreek{ - \textnumeralsigngreek - \textnumeralsignlowergreek +\newcommand*{\GreekAndCopticI}{\greekscript + \textdexiakeraia + \textaristerikeraia { }\ypogegrammeni \texterotimatiko \acctonos{ } @@ -151,8 +163,9 @@ works fine. \textKappa \textLambda \textMu - \textNu}} -\subsection{\ensuregreek{ + \textNu +} +\newcommand*{\GreekAndCopticII}{\greekscript \textXi \textOmicron \textPi @@ -166,9 +179,8 @@ works fine. \textOmega \"\textIota \"\textUpsilon -}} - -\subsection{\ensuregreek{ +} +\newcommand*{\GreekAndCopticIII}{\greekscript \'\textalpha \'\textepsilon \'\texteta @@ -186,13 +198,13 @@ works fine. \textkappa \textlambda \textmu - \textnu}} -\subsection{\ensuregreek{ + \textnu} +\newcommand*{\GreekAndCopticIV}{\greekscript \textxi \textomicron \textpi \textrho - \textvarsigma + \textfinalsigma \textsigma \texttau \textupsilon @@ -219,13 +231,12 @@ works fine. \textkoppa \textSampi \textsampi -}} - +} -\emph{textalpha} load definitions for LICR input with non-standard +\emph{textalpha} loads definitions for LICR input with non-standard accents or combined diacritics characters also for PU (hyperref). -\subsection{\ensuregreek{ +\newcommand*{\GreekExtendedI}{\greekscript \>\textalpha \<\textalpha \>`\textalpha @@ -233,7 +244,7 @@ accents or combined diacritics characters also for PU (hyperref). \>'\textalpha \<'\textalpha \~>\textalpha - \~<\textalpha + \~<\textalpha{} \>\textAlpha \<\textAlpha \>`\textAlpha @@ -242,22 +253,22 @@ accents or combined diacritics characters also for PU (hyperref). \<'\textAlpha \~>\textAlpha \~<\textAlpha -}} -\subsection{\ensuregreek{ +} +\newcommand*{\GreekExtendedII}{\greekscript \>\textepsilon \<\textepsilon \>`\textepsilon \<`\textepsilon \>'\textepsilon - \<'\textepsilon + \<'\textepsilon{} \>\textEpsilon \<\textEpsilon \>`\textEpsilon \<`\textEpsilon \>'\textEpsilon \<'\textEpsilon -}} -\subsection{\ensuregreek{ +} +\newcommand*{\GreekExtendedIII}{\greekscript \>\texteta \<\texteta \>`\texteta @@ -265,7 +276,7 @@ accents or combined diacritics characters also for PU (hyperref). \>'\texteta \<'\texteta \~>\texteta - \~<\texteta + \~<\texteta{} \>\textEta \<\textEta \>`\textEta @@ -274,40 +285,40 @@ accents or combined diacritics characters also for PU (hyperref). \<'\textEta \~>\textEta \~<\textEta -}} -\subsection{\ensuregreek{ - \>\textiota - \<\textiota - \>`\textiota - \<`\textiota - \>'\textiota - \<'\textiota - \~>\textiota - \~<\textiota - \>\textIota - \<\textIota - \>`\textIota - \<`\textIota - \>'\textIota - \<'\textIota - \~>\textIota - \~<\textIota -}} -\subsection{\ensuregreek{ +} +\newcommand*{\GreekExtendedIV}{\greekscript + \>\textiota{} + \<\textiota{} + \>`\textiota{} + \<`\textiota{} + \>'\textiota{} + \<'\textiota{} + \~>\textiota{} + \~<\textiota{}\ {} + \>\textIota{} + \<\textIota{} + \>`\textIota{} + \<`\textIota{} + \>'\textIota{} + \<'\textIota{} + \~>\textIota{} + \~<\textIota{} +} +\newcommand*{\GreekExtendedV}{\greekscript \>\textomicron \<\textomicron \>`\textomicron \<`\textomicron \>'\textomicron - \<'\textomicron + \<'\textomicron{} \>\textOmicron \<\textOmicron \>`\textOmicron \<`\textOmicron \>'\textOmicron \<'\textOmicron -}} -\subsection{\ensuregreek{ +} +\newcommand*{\GreekExtendedVI}{\greekscript \>\textupsilon \<\textupsilon \>`\textupsilon @@ -315,13 +326,13 @@ accents or combined diacritics characters also for PU (hyperref). \>'\textupsilon \<'\textupsilon \~>\textupsilon - \~<\textupsilon + \~<\textupsilon{} \<\textUpsilon \<`\textUpsilon \<'\textUpsilon \~<\textUpsilon -}} -\subsection{\ensuregreek{ +} +\newcommand*{\GreekExtendedVII}{\greekscript \>\textomega \<\textomega \>`\textomega @@ -329,7 +340,7 @@ accents or combined diacritics characters also for PU (hyperref). \>'\textomega \<'\textomega \~>\textomega - \~<\textomega + \~<\textomega{} \>\textOmega \<\textOmega \>`\textOmega @@ -338,8 +349,8 @@ accents or combined diacritics characters also for PU (hyperref). \<'\textOmega \~>\textOmega \~<\textOmega -}} -\subsection{\ensuregreek{ +} +\newcommand*{\GreekExtendedVIII}{\greekscript \accvaria\textalpha \accoxia\textalpha \accvaria\textepsilon @@ -354,8 +365,8 @@ accents or combined diacritics characters also for PU (hyperref). \accoxia\textupsilon \accvaria\textomega \accoxia\textomega -}} -\subsection{\ensuregreek{ +} +\newcommand*{\GreekExtendedIX}{\greekscript \>\textalpha\ypogegrammeni \<\textalpha\ypogegrammeni \>`\textalpha\ypogegrammeni @@ -372,8 +383,8 @@ accents or combined diacritics characters also for PU (hyperref). \<'\textAlpha\ypogegrammeni \~>\textAlpha\ypogegrammeni \~<\textAlpha\ypogegrammeni -}} -\subsection{\ensuregreek{ +} +\newcommand*{\GreekExtendedX}{\greekscript \>\texteta\ypogegrammeni \<\texteta\ypogegrammeni \>`\texteta\ypogegrammeni @@ -390,8 +401,8 @@ accents or combined diacritics characters also for PU (hyperref). \<'\textEta\ypogegrammeni \~>\textEta\ypogegrammeni \~<\textEta\ypogegrammeni -}} -\subsection{\ensuregreek{ +} +\newcommand*{\GreekExtendedXI}{\greekscript \>\textomega\ypogegrammeni \<\textomega\ypogegrammeni \>`\textomega\ypogegrammeni @@ -408,8 +419,8 @@ accents or combined diacritics characters also for PU (hyperref). \<'\textOmega\ypogegrammeni \~>\textOmega\ypogegrammeni \~<\textOmega\ypogegrammeni -}} -\subsection{\ensuregreek{ +} +\newcommand*{\GreekExtendedXII}{\greekscript \u\textalpha \=\textalpha \accvaria\textalpha\ypogegrammeni @@ -425,8 +436,8 @@ accents or combined diacritics characters also for PU (hyperref). \>{ } { }\prosgegrammeni \>{ } -}} -\subsection{\ensuregreek{ +} +\newcommand*{\GreekExtendedXIII}{\greekscript \accperispomeni\textcompwordmark \"\~{ } \accvaria\texteta\ypogegrammeni @@ -442,23 +453,23 @@ accents or combined diacritics characters also for PU (hyperref). \>`{ } \>'{ } \~>{ } -}} -\subsection{\ensuregreek{ - \u\textiota - \=\textiota - \`"\textiota - \'"\textiota - \~\textiota - \~"\textiota - \u\textIota - \=\textIota - \accvaria\textIota - \accoxia\textIota +} +\newcommand*{\GreekExtendedXIV}{\greekscript + \u\textiota{} + \=\textiota{} + \`"\textiota{} + \'"\textiota{} + \~\textiota{} + \~"\textiota{} + \u\textIota{} + \=\textIota{} + \accvaria\textIota{} + \accoxia\textIota{} \<`{ } \>'{ } \~<{ } -}} -\subsection{\ensuregreek{ +} +\newcommand*{\GreekExtendedXV}{\greekscript \u\textupsilon \=\textupsilon \`"\textupsilon @@ -475,8 +486,8 @@ accents or combined diacritics characters also for PU (hyperref). \`"{ } \'"{ } \accvaria{ } -}} -\subsection{\ensuregreek{ +} +\newcommand*{\GreekExtendedXVI}{\greekscript \accvaria\textomega\ypogegrammeni \textomega\ypogegrammeni \accoxia\textomega\ypogegrammeni @@ -489,40 +500,165 @@ accents or combined diacritics characters also for PU (hyperref). \textOmega\ypogegrammeni \accoxia{ } \<{ } +} + +\subsection{Greek and Coptic} + +\subsubsection{\GreekAndCopticI} +\subsubsection{\GreekAndCopticII} +\subsubsection{\GreekAndCopticIII} +\subsubsection{\GreekAndCopticIV} + + +\subsection{Greek Extended} + +\subsubsection{\GreekExtendedI} +\subsubsection{\GreekExtendedII} +\subsubsection{\GreekExtendedIII} +\subsubsection{\GreekExtendedIV} +\subsubsection{\GreekExtendedV} +\subsubsection{\GreekExtendedVI} +\subsubsection{\GreekExtendedVII} +\subsubsection{\GreekExtendedVIII} +\subsubsection{\GreekExtendedIX} +\subsubsection{\GreekExtendedX} +\subsubsection{\GreekExtendedXI} +\subsubsection{\GreekExtendedXII} +\subsubsection{\GreekExtendedXIII} +\subsubsection{\GreekExtendedXIV} +\subsubsection{\GreekExtendedXV} +\subsubsection{\GreekExtendedXVI} + + +\section{Alias character names} + +\subsection{\ensuregreek{ + \textvarTheta + \textvarepsilon + \textvarphi + \textvarsigma + \textvarbeta + \textvartheta + \textvarpi + \textvarkappa + \textvarrho + \textnumeralsigngreek + \textnumeralsignlowergreek + \textmugreek + \textStigmagreek + \textDigammagreek + \textdigammagreek + \textSampigreek + \textsampigreek }} + \section{Makeuppercase} According to Greek typesetting conventions, diacritics (except the dialytika) are dropped in UPPERCASE. -The LaTeX \verb|\Makeuppercase| implementation changed fundamentally +The LaTeX \cs{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. +Since the change, \cs{Makeuppercase} is also supported in 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|. +set to \texttt{greek} with Babel's \cs{setlanguage} or +\cs{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{ἀἁἂἃἄἅἆἇἈἉἊἋἌἍἎἏ}} +Support is restored as of 2023-09-07, some issues remain with PDF strings. + +\ifdefined \AddToNoCaseChangeList + % skip \MakeUppercase tests for LaTeX older than 2022/6 + + \subsection{Literal Unicode input} + + \subsubsection{\MakeUppercase{ʹ͵ͺ; ΄ ΅ Ά·ΈΉΊΌΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝ}} + Text language English --- diacritics not dropped. + + \subsubsection{\foreignlanguage{greek}{% + \MakeUppercase{ʹ͵ͺ; ΄ ΅ Ά·ΈΉΊΌΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝ}}} + Language set to Greek inside the \cs{subsection} command -- + diacritics dropped in the text and ToC but not in the PDF sidebar (sic!). + + \selectlanguage{greek} + \subsubsection{\MakeUppercase{ʹ͵ͺ; ΄ ΅ Ά·ΈΉΊΌΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝ}} + + \ensureascii{Language switched before the \cs{subsection} command -- + diacritics dropped in text, ToC, and PDF sidebar.} + + \subsubsection{\MakeUppercase{ΞΟΠΡΣΤΥΦΧΨΩΪΫϘϚϜϠ}} + \subsubsection{\MakeUppercase{άέήίΰαβγδεζηθικλμν}} + \subsubsection{\MakeUppercase{ξοπρςστυφχψωϊϋόύώϐϑϕϖϘϙϛϝϟϡ}} + + \subsubsection{\MakeUppercase{ἀἁἂἃἄἅἆἇἈἉἊἋἌἍἎἏ}} + \subsubsection{\MakeUppercase{ἐἑἒἓἔἕἘἙἚἛἜἝ}} + \subsubsection{\MakeUppercase{ἠἡἢἣἤἥἦἧἨἩἪἫἬἭἮἯ}} + \subsubsection{\MakeUppercase{ἰ ἱ ἲ ἳ ἴ ἵ ἶ ἷ Ἰ Ἱ Ἲ Ἳ Ἴ Ἵ Ἶ Ἷ}} + \subsubsection{\MakeUppercase{ὀὁὂὃὄὅὈὉὊὋὌὍ}} + \subsubsection{\MakeUppercase{ὐὑὒὓὔὕὖὗὙὛὝὟ}} + \subsubsection{\MakeUppercase{ὠὡὢὣὤὥὦὧὨὩὪὫὬὭὮὯ}} + \subsubsection{\MakeUppercase{ὰάὲέὴήὶίὸόὺύὼώ}} + \subsubsection{\MakeUppercase{ᾀᾁᾂᾃᾄᾅᾆᾇᾈᾉᾊᾋᾌᾍᾎᾏ}} + \subsubsection{\MakeUppercase{ᾐᾑᾒᾓᾔᾕᾖᾗᾘᾙᾚᾛᾜᾝᾞᾟ}} + \subsubsection{\MakeUppercase{ᾠᾡᾢᾣᾤᾥᾦᾧᾨᾩᾪᾫᾬᾭᾮᾯ}} + \subsubsection{\MakeUppercase{ᾰᾱᾲᾳᾴᾶᾷᾸᾹᾺΆᾼ᾽ι᾿}} + \ % dummy content to allow page-break + \subsubsection{\MakeUppercase{῀῁ῂῃῄῆῇῈΈῊΉῌ῍ ῎ ῏}} + \subsubsection{\MakeUppercase{ῐ ῑ ῒ ΐ ῖ ῗ Ῐ Ῑ Ὶ Ί ῝῞῟}} + \subsubsection{\MakeUppercase{ῠῡῢΰῤῥῦῧῨῩῪΎῬ῭΅`}} + \subsubsection{\MakeUppercase{ῲῳῴῶῷῸΌῺΏῼ´῾}} + + \subsection{\ensureascii{LICR input}} + + \subsubsection{\MakeUppercase{\GreekAndCopticI}} + \subsubsection{\MakeUppercase{\GreekAndCopticII}} + \subsubsection{\MakeUppercase{\GreekAndCopticIII}} + \subsubsection{\MakeUppercase{\GreekAndCopticIV}} + + \subsubsection{\MakeUppercase{\GreekExtendedI}} + \subsubsection{\MakeUppercase{\GreekExtendedII}} + \subsubsection{\MakeUppercase{\GreekExtendedIII}} + \subsubsection{\MakeUppercase{\GreekExtendedIV}} + \subsubsection{\MakeUppercase{\GreekExtendedV}} + \subsubsection{\MakeUppercase{\GreekExtendedVI}} + \subsubsection{\MakeUppercase{\GreekExtendedVII}} + \subsubsection{\MakeUppercase{\GreekExtendedVIII}} + \subsubsection{\MakeUppercase{\GreekExtendedIX}} + \subsubsection{\MakeUppercase{\GreekExtendedX}} + \subsubsection{\MakeUppercase{\GreekExtendedXI}} + \subsubsection{\MakeUppercase{\GreekExtendedXII}} + \subsubsection{\MakeUppercase{\GreekExtendedXIII}} + \subsubsection{\MakeUppercase{\GreekExtendedXIV}} + \subsubsection{\MakeUppercase{\GreekExtendedXV}} + \subsubsection{\MakeUppercase{\GreekExtendedXVI}} + + \subsection{Hiatus} + \subsubsection{\TestUppercase{άι άυ έι ἄι ἄυ ἔι ἀυ}} + \subsubsection{\TestUppercase{\'\textalpha\textiota{} + \'\textalpha\textupsilon{} \'\textepsilon\textiota{} + \>'\textalpha\textiota{} \>'\textalpha\textupsilon{} + \>'\textepsilon\textiota{} \>\textalpha\textupsilon{} + }} + +\fi \selectlanguage{english} -\verb|Makeuppercase| is not supported in PDF strings with LaTeX versions -older than 06/2022. + +In PDF strings, the hiatus feature only works with literal input. \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.} + \footnote{Combining Unicode characters do not work + with inputenc and 8-bit LaTeX. (This is a general restriction.) + Use pre-composed Unicode characters or accent macros + for letters with diacritics. } or macros. For proper kerning und upcasing in the main document, set the -language with \verb|\foreignlanguage{greek}|. +text language of Greek text parts to \texttt{greek}. If you use polytonic +Greek, set the \texttt{polutoniko} language attribute. \end{document} |