summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/lgrx/greekhyperref.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/lgrx/greekhyperref.tex')
-rw-r--r--Master/texmf-dist/doc/latex/lgrx/greekhyperref.tex93
1 files changed, 66 insertions, 27 deletions
diff --git a/Master/texmf-dist/doc/latex/lgrx/greekhyperref.tex b/Master/texmf-dist/doc/latex/lgrx/greekhyperref.tex
index 2cd9ff848d1..7076a162b62 100644
--- a/Master/texmf-dist/doc/latex/lgrx/greekhyperref.tex
+++ b/Master/texmf-dist/doc/latex/lgrx/greekhyperref.tex
@@ -5,59 +5,98 @@
\usepackage{lmodern}
\usepackage[greek,english]{babel}
-\usepackage{textalpha}
+\usepackage{alphabeta}
\usepackage[utf8]{inputenc}
\usepackage[unicode,colorlinks=true,linkcolor=blue]{hyperref}
\usepackage{bookmark}
-\begin{document}
+% \pagestyle{headings}
-\section{Greek and hyperref bookmarks}
+\begin{document}
-\subsection{\textgreek{logos} one}
+\title{Greek and hyperref}
+\maketitle
-\textbackslash{}textgreek + LGR transkription:
+\noindent
+On 2010-11-05, Heiko Oberdiek wrote in comp.text.tex:
+%
+\begin{quote}
+ \textbackslash 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
+ don't reach TeX's stomach.
+\end{quote}
+%
+The \emph{lgrx} bundle allows input of Greek characters that work in both,
+the main document as well as in PDF strings (e.g. bookmarks).
-In the PDF-bookmark are Latin letters instead of Greek ones.
-\subsection{\foreignlanguage{greek}{logos} two}
-
-Greek language (babel) + LGR transkription:
+\section{Transcription: \TextGreek{logos}, \foreignlanguage{greek}{logos}}
+\textbackslash{}textgreek + LGR transcription or
+Greek language (babel) + LGR transcription:
In the PDF-bookmark are Latin letters instead of Greek ones.
-\subsection{\textlambda\textomicron\textgamma\textomicron\textvarsigma{} three}
-textalpha package with \textbackslash{}textgreek* macros:
+\section{Macros:
+ \textlambda\textomicron\textgamma\textomicron\textvarsigma{},
+ \lambda\omicron\gamma\omicron\varsigma{},
+ λογος}
+
+textalpha package with \textbackslash{}textgreek* macros,
+alphabeta package with \textbackslash{}alpha ... \textbackslash{}Omega macros,
+and literal Greek Unicode characters (using \textbackslash{}textgreek*
+macros internally).
Works, if the "unicode" option is given to hyperref.
(With xpdf, Greek letters are not shown in PDF bookmarks.)
-\subsection{λογος four}
+The generic short macros from the \emph{alphabeta} package result in
+hyperref warnings:
+\begin{verbatim}
+ Package hyperref Warning: Token not allowed in a PDF string (Unicode):
+ (hyperref) removing `\TextOrMath ' on input line 44.
-Literal Greek Unicode characters without babel language switch.
+ Package hyperref Warning: Token not allowed in a PDF string (Unicode):
+ (hyperref) removing `\mathlambda' on input line 44.
+\end{verbatim}
+However, the warnings can be ignored and the output is OK.
-\subsection{\foreignlanguage{greek}{λογος} five}
+\section{%
+ Kerning: \textAlpha\textUpsilon\textLambda{}
+ \TextGreek{\textAlpha\textUpsilon\textLambda}
+ \foreignlanguage{greek}{\textAlpha\textUpsilon\textLambda}%
+}
-Greek language (babel) + Literal Greek Unicode characters
-
-\subsection{Kerning: \textAlpha\textUpsilon\textLambda{}
-\textgreek{\textAlpha\textUpsilon\textLambda}
-\foreignlanguage{greek}{\textAlpha\textUpsilon\textLambda}}
-
-Kerning is impossible, if the font encoding is switched for every single
+Kerning is impossible if the font encoding is switched for every single
character. Wrap the Greek part in a command switching to LGR font encoding
-to fix this.
-
-\subsection{Conclusion}
+to fix this, either \verb+\TextGreek{...}+ (with package textalpha) or
+\verb+\foreignlanguage{greek}{...}+ (with babel).
+
+% letters of the Greek and Coptic Unicode Block supported by LGR:
+\newcommand{\GreekAndCoptic}{ʹ͵ͺ; ΄ ΅ Ά·ΈΉΊΌΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫϘϚϜϠ}
+\newcommand{\greekandcoptic}{άέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϙϛϝϟϡ}
+
+\section{Testing supported Unicode chars}
+\subsection{\GreekAndCoptic}
+\subsection{\greekandcoptic}
+\subsection{ἀἁἂἃἄἅἆἇἈἉἊἋἌἍἎἏ ἐἑἒἓἔἕἘἙἚἛἜἝ}
+\subsection{ἠἡἢἣἤἥἦἧἨἩἪἫἬἭἮἯ ἰἱἲἳἴἵἶἷἸἹἺἻἼἽἾἿ}
+\subsection{ὀὁὂὃὄὅὈὉὊὋὌὍ ὐὑὒὓὔὕὖὗὙὛὝὟ}
+\subsection{ὠὡὢὣὤὥὦὧὨὩὪὫὬὭὮὯ ὰάὲέὴήὶίὸόὺύὼώ}
+\subsection{ᾀᾁᾂᾃᾄᾅᾆᾇᾈᾉᾊᾋᾌᾍᾎᾏ ᾐᾑᾒᾓᾔᾕᾖᾗᾘᾙᾚᾛᾜᾝᾞᾟ}
+\subsection{ᾠᾡᾢᾣᾤᾥᾦᾧᾨᾩᾪᾫᾬᾭᾮᾯ ᾰᾱᾲᾳᾴᾶᾷᾸᾹᾺΆᾼ᾽ι᾿}
+\subsection{῀῁ῂῃῄῆῇῈΈῊΉῌ῍῎῏ ῐῑῒΐῖῗῘῙῚΊ῝῞῟}
+\subsection{ῠῡῢΰῤῥῦῧῨῩῪΎῬ῭΅` ῲῳῴῶῷῸΌῺΏῼ´῾}
+
+\section{Conclusion}
For Greek text parts in section headers use either
-literal Unicode characters or single \verb+\text...+ macros.
+literal Unicode characters or macros.
For proper kerning in the main document, combine this with the
\verb+\textgreek+ or \verb+\foreignlanguage{greek}+ macros.
-
-
\end{document}