On 2012-02-09, Nikos Alexandris wrote:

...

> Well, it seems I haven't figured it out exactly. Any additional text
> in Greek raises a failure to compile properly. I am (more) puzzled.
> I'll try more combinations (since it's the only thing I can do for the
> moment) and will eventually report a success to the list.

On Thursday 09 of February 2012 23:26:00 Guenter Milde wrote:

It seems like there is no "force" flag for the Greek letters in
"unicodesymbols". This means that Greek Unicode-chars are kept as-is
when exporting to LaTeX.

* This is good for the pdfstring

* It does not work with "Unicode (utf8)" unless you add a `lgrenc.dfu` file
  for Greek Unicode with the inputenc standard UTF-8 support (e.g. from
  http://milde.users.sourceforge.net/LGR/).

  (There should be something about Greek and Unicode at the lyx wiki.)

Thank you so much Guenter! I've copied over "lgrxenc.def" [1], "lgrenc.dfu" [2] and "textgreek.sty" [3] to the local "/usr/share/texmf-texlive/tex/latex/base/" directory, ran "sudo texhash afterwords" and went ahead to run pure LaTeX code (through TeXmaker):

The "expanded" minimal working example looks like:

--%<---
\documentclass[greek,english]{scrbook}
\usepackage[LGRx,T1]{fontenc} % define LGR and T1 encodings
\usepackage[utf8]{inputenc} % standard UTF-8 input encoding
\usepackage[greek,english]{babel}
\usepackage[unicode]{hyperref}
\usepackage{bookmark}


\begin{document}
\mainmatter

\addchap{\texorpdfstring{Ambivalence/\textgreek{Amfijum'ia}}{Ambivalence/A&#956;&#966;&#953;&#952;&#965;&#956;&#943;&#945;}}

\textit{Ambivalence}, catalyst in spreading the great disease which is called Fear.\\
\begin{otherlanguage}{greek}
\textit{A&#956;&#966;&#953;&#952;&#965;&#956;&#943;&#945;}, &#954;&#945;&#964;&#945;&#955;&#973;&#964;&#951;&#962; &#963;&#964;&#951;&#957; &#949;&#958;&#940;&#960;&#955;&#969;&#963;&#951; &#964;&#951;&#962; &#956;&#949;&#947;&#940;&#955;&#951;&#962; &#957;&#972;&#963;&#959;&#965; &#960;&#959;&#965; &#959;&#957;&#959;&#956;&#940;&#950;&#949;&#964;&#945;&#953; &#934;&#972;&#946;&#959;&#962;.
\end{otherlanguage}

\addsec{\texorpdfstring{Ending sigma:~\textgreek{&#962;},~\textgreek{Telik'o s'igma: c}}{Ending sigma: &#962;/T&#949;&#955;&#953;&#954;&#972; &#962;}}

\begin{otherlanguage}{greek}
&#932;&#959; &#964;&#949;&#955;&#953;&#954;&#972; &#963;&#943;&#947;&#956;&#945; &#963;&#949; &#954;&#949;&#943;&#956;&#949;&#957;&#959; &#956;&#949; &#949;&#955;&#955;&#951;&#957;&#953;&#954;&#940; &#948;&#949;&#957; &#949;&#956;&#966;&#945;&#957;&#943;&#950;&#949;&#964;&#945;&#953; &#963;&#969;&#963;&#964;&#940; &#963;&#964;&#945; &#960;&#949;&#961;&#953;&#949;&#967;&#972;&#956;&#949;&#957;&#945; &#964;&#959;&#965; &#945;&#961;&#967;&#949;&#943;&#959;&#965; \end{otherlanguage} PDF!

\end{document}
--->%--

And another one with [english,greek] instead of [greek,english]:

--%<---
\documentclass[english,greek]{scrbook}
\usepackage[LGRx,T1]{fontenc} % define LGR and T1 encodings
\usepackage[utf8]{inputenc} % standard UTF-8 input encoding
\usepackage[english,greek]{babel}
\usepackage[unicode]{hyperref}
\usepackage{bookmark}


\begin{document}
\mainmatter

\selectlanguage{english}
\addchap{\texorpdfstring{Ambivalence/\textgreek{Amfijum'ia}}{Ambivalence/A&#956;&#966;&#953;&#952;&#965;&#956;&#943;&#945;}}

\textit{Ambivalence}, catalyst in spreading the great disease which is called Fear.\\
\\
\begin{otherlanguage}{greek}
\textit{A&#956;&#966;&#953;&#952;&#965;&#956;&#943;&#945;}, &#954;&#945;&#964;&#945;&#955;&#973;&#964;&#951;&#962; &#963;&#964;&#951;&#957; &#949;&#958;&#940;&#960;&#955;&#969;&#963;&#951; &#964;&#951;&#962; &#956;&#949;&#947;&#940;&#955;&#951;&#962; &#957;&#972;&#963;&#959;&#965; &#960;&#959;&#965; &#959;&#957;&#959;&#956;&#940;&#950;&#949;&#964;&#945;&#953; &#934;&#972;&#946;&#959;&#962;.
\end{otherlanguage}

\addsec{\texorpdfstring{Small and Ending sigma: \textgreek{&#963;}~and~\textgreek{&#962;},~\textgreek{Mikr'o kai Telik'o s'igma: sv kai s}}{Small and Ending sigma: &#963; and &#962;, &#924;&#953;&#954;&#961;&#972; &#954;&#945;&#953; T&#949;&#955;&#953;&#954;&#972;: &#963; &#954;&#945;&#953; &#962;}}

\foreignlanguage{english}{However, in LyX, both sigma~(\textgreek{\textit{&#963;, &#962;}})~in a Greek text, do not appear correctly in the Contents of a PDF file}! Why?
\begin{otherlanguage}{greek}\\
\\
&#937;&#963;&#964;&#972;&#963;&#959;, &#963;&#964;&#959; \foreignlanguage{english}{LyX}, &#954;&#945;&#953; &#964;&#945; &#948;&#965;&#959; &#963;&#943;&#947;&#956;&#945;~(\textit{&#963;, &#962;})~&#963;&#949; &#949;&#955;&#955;&#951;&#957;&#953;&#954;&#972; &#954;&#949;&#943;&#956;&#949;&#957;&#959;, &#948;&#949;&#957; &#949;&#956;&#966;&#945;&#957;&#943;&#950;&#959;&#957;&#964;&#945;&#953; &#963;&#969;&#963;&#964;&#940; &#963;&#964;&#945; &#960;&#949;&#961;&#953;&#949;&#967;&#972;&#956;&#949;&#957;&#945; &#949;&#957;&#972;&#962; &#945;&#961;&#967;&#949;&#943;&#959;&#965; \end{otherlanguage} PDF! &#915;&#953;&#945;&#964;&#943;;

\end{document}
--->%--

Full success :-) Yet, within LyX the sigma(s) come out as either "c" or "sv" out(?)!

Cheers, Nikos

ps- posted this also in tex.stackexchange: <http://tex.stackexchange.com/a/44130/8272>
---
[1] <http://milde.users.sourceforge.net/LGR/lgrxenc.def>
[2] <http://milde.users.sourceforge.net/LGR/lgrenc.dfu>
[3] <http://milde.users.sourceforge.net/LGR/textgreek.sty>

Reply via email to