Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jun 2008 15:14:58 +0300
From:      Giorgos Keramidas <keramida@FreeBSD.org>
To:        Hiroki Sato <hrs@FreeBSD.org>
Cc:        freebsd-doc@FreeBSD.org
Subject:   Re: Language support in jadetex?
Message-ID:  <873anb0wjh.fsf@kobe.laptop>
In-Reply-To: <20080618.144751.42861091.hrs@allbsd.org> (Hiroki Sato's message of "Wed, 18 Jun 2008 14:47:51 %2B0900 (JST)")
References:  <87wskptbb2.fsf@kobe.laptop> <20080618.144751.42861091.hrs@allbsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 18 Jun 2008 14:47:51 +0900 (JST), Hiroki Sato <hrs@FreeBSD.org> wro=
te:
> Giorgos Keramidas <keramida@ceid.upatras.gr> wrote
>   in <87wskptbb2.fsf@kobe.laptop>:
>
> ke> I don't know if this is a FAQ, but I've been trying to find a way to
> ke> create readable Greek PDF output with jadetex, and I'm kind of stuck
> ke> there.
> ke>
> ke> The PDF file *is* created, but the Greek text is typeset with fonts t=
hat
> ke> look likeISO 8859-1, so the text is unreadable.
> ke>
> ke> Does anyone know how I can tweak jadetex to use a different charset?
> ke>
> ke> A pointer to jadetex docs would be sufficient, but a quick search at
> ke> Google didn't produce something that looks useful :-/
>
> Could you tell me what is needed for TeX to process Greek?  I am not
> familiar with Greek but I think it is possible to adjust JadeTeX to
> Greek if TeX is working with Greek text.  A sample .tex file in Greek
> and the typeset PDF would help.

XeLaTeX supports UTF-8 input of Greek text.  With a proper fontset, that
includes Greek characters, one can type directly into a XeLaTeX document
text in Greek.

Unfortunately, we don't have TeXlive in the ports, so that can't be
used in the doc/ tree.

Out other option is the {babel} package, but there's a catch there too.
With the current teTeX ports, one can use the {babel} package like this:

  \documentclass[12pt]{article}

  \usepackage[english,greek]{babel}         % Pull in both English and
                                            % Greek language support.
  \usepackage[iso-8859-7]{inputenc}         % Allow ISO 8859-7 input of
                                            % Greek text.

  \begin{document}

  \section{=C5=E9=F3=E1=E3=F9=E3=DE}

  =D3=DE=EC=E5=F1=E1 =E5=DF=E4=E1 =E3=E9=E1 =F0=F1=FE=F4=E7 =F6=EF=F1=DC =
=C5=EB=EB=E7=ED=E9=EA=FC =EA=E5=DF=EC=E5=ED=EF =E4=DF=F0=EB=E1 =E1=F0=FC
  \selectlanguage{english} English text \selectlanguage{greek}
  =F3=F4=EF \LaTeX{}.

  \end{document}

Roughly translated to English, the text above would read:

  \section{Introduction}

  Today I saw, for the first time, Greek text side by side with
  \selectlanguage{english} English text \selectlanguage{greek}
  in \LaTeX{}.

The tricky part is that switching between languages for every English
term has to be done with a filter.  Otherwise, we will end up with the
odd result of typesetting English text with Greek fonts.

A good way to start making changes to support Greek would be to:

  * Make sure that jadetex adds the two preamble commands shown above:

      \usepackage[english,greek]{babel}
      \usepackage[iso-8859-7]{inputenc}

  * Find a way to 'filter' the text and replace non-command sequences of
    English text with `\selectlanguage{english} ... \selectlanguage{greek}'.

We can probably keep the bloat to a semi-reasonable size by also making
jadetex define short-hand aliases in the document preamble, like:

      \newcommand{GR}{\selectlanguage{greek}}
      \newcommand{EN}{\selectlanguage{english}}




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?873anb0wjh.fsf>