summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/greek-fontenc/lgrenc-test.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/greek-fontenc/lgrenc-test.tex')
-rw-r--r--Master/texmf-dist/doc/latex/greek-fontenc/lgrenc-test.tex22
1 files changed, 16 insertions, 6 deletions
diff --git a/Master/texmf-dist/doc/latex/greek-fontenc/lgrenc-test.tex b/Master/texmf-dist/doc/latex/greek-fontenc/lgrenc-test.tex
index e569e6cdc5d..619a130003e 100644
--- a/Master/texmf-dist/doc/latex/greek-fontenc/lgrenc-test.tex
+++ b/Master/texmf-dist/doc/latex/greek-fontenc/lgrenc-test.tex
@@ -1,5 +1,4 @@
\documentclass{article}
-\usepackage{cmap} % fix search and cut-and-paste in Acrobat Reader
% Test with various LGR-encoded fonts:
\usepackage%
@@ -20,15 +19,26 @@
\usepackage{textcomp}
\usepackage[LGR,T1]{fontenc}
-\usepackage[utf8]{inputenc}
+% With XeTeX/LuaTeX, use Unicode for Latin script:
+\ifdefined\luatexversion \usepackage{fontspec}\else
+ \ifdefined\XeTeXrevision \usepackage{fontspec}\else
+ \usepackage[utf8]{inputenc}
+ \fi
+\fi
+% This is experimental. The general advise is not to mix fontenc and fontspec.
+% One problem is that xunicode makes \nobreakspace font encoding specific
+% We provide a default:
+\DeclareTextCommandDefault{\nobreakspace}{\leavevmode\nobreak\ }
+
+% PDF hyperlinks:
\usepackage[pdfencoding=auto]{hyperref}
+\usepackage{bookmark}
+\hypersetup{colorlinks=true,linkcolor=blue,urlcolor=blue,pdfencoding=auto}
+% font encoding switch declarations:
\newcommand{\LGR}{\fontencoding{LGR}\selectfont}
-\newcommand{\Latin}{\fontencoding{T1}\selectfont}
-\DeclareTextCommandDefault{\ensuregreek}[1]{{\fontencoding{LGR}\selectfont #1}}
+\newcommand{\Latin}{\fontencoding{\encodingdefault}\selectfont}
-% \pagestyle{empty}
-% -------------------------------------------------------------------------
\begin{document}