summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/lgrx/greekhyperref.tex
blob: 2cd9ff848d1a5c3f62f5edd9cb07cf4ab1bd7e44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
\documentclass{article}
\usepackage{fixltx2e} % LaTeX patches, \textsubscript
\usepackage{cmap} % fix search and cut-and-paste in Acrobat
\usepackage[LGR,T1]{fontenc}
\usepackage{lmodern}

\usepackage[greek,english]{babel}
\usepackage{textalpha}
\usepackage[utf8]{inputenc}

\usepackage[unicode,colorlinks=true,linkcolor=blue]{hyperref}
\usepackage{bookmark}

\begin{document}

\section{Greek and hyperref bookmarks}

\subsection{\textgreek{logos} one}

\textbackslash{}textgreek + LGR transkription:

In the PDF-bookmark are Latin letters instead of Greek ones.

\subsection{\foreignlanguage{greek}{logos} two}

Greek language (babel) + LGR transkription:

In the PDF-bookmark are Latin letters instead of Greek ones.

\subsection{\textlambda\textomicron\textgamma\textomicron\textvarsigma{} three}

textalpha package with \textbackslash{}textgreek* macros:

Works, if the "unicode" option is given to hyperref.
(With xpdf, Greek letters are not shown in PDF bookmarks.)

\subsection{λογος four}

Literal Greek Unicode characters without babel language switch.

\subsection{\foreignlanguage{greek}{λογος} five}

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
character. Wrap the Greek part in a command switching to LGR font encoding
to fix this.

\subsection{Conclusion}

For Greek text parts in section headers use either
literal Unicode characters or single \verb+\text...+ macros.

For proper kerning in the main document, combine this with the
\verb+\textgreek+ or \verb+\foreignlanguage{greek}+ macros.



\end{document}