all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: Max Nikulin <manikulin@gmail.com>
Cc: orgmode <emacs-orgmode@gnu.org>, Ihor Radchenko <yantar92@gmail.com>
Subject: Re: [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists
Date: Fri, 15 Jul 2022 14:36:07 +0000	[thread overview]
Message-ID: <878rou30ko.fsf@posteo.net> (raw)
In-Reply-To: <tarltp$pga$1@ciao.gmane.io> (Max Nikulin's message of "Fri, 15 Jul 2022 19:18:00 +0700")

Max Nikulin writes:

> I have tried on Ubuntu-20.04 LTS focal (Latest LTS is 22.04 jammy).
> Without explicit fontenc it may work, but emits a warning
>
> Package babel Warning: No Cyrillic font encoding has been loaded so far.
> (babel)                A font encoding should be declared before babel.
> (babel)                Default `T2A' encoding will be loaded  on input
> line 74.

Yeah, that's something I forgot to mention. The warning is from
russianb.ldf:

-------------
\ifx\cyrillicencoding\undefined
  \if@uni@ode
    %\ifdefined\XeTeXrevision
    %  \edef\cyrillicencoding{EU1}
    %\else\ifdefined\luatexversion
    %  \edef\cyrillicencoding{EU2}
    %\fi\fi
    \edef\cyrillicencoding{TU}
  \else
    \edef\cyrillicencoding{T2A}
  \fi
  \PackageWarning{babel}%
    {No Cyrillic font encoding has been loaded so far.\MessageBreak
     A font encoding should be declared before babel.\MessageBreak
     Default `\cyrillicencoding' encoding will be loaded
    }%
  \lowercase\expandafter{\expandafter\input\cyrillicencoding enc.def\relax}%
  \AtBeginDocument{\@setcyrillicencoding}
\fi
-------------

But there is no warning in the case of Greek, where the LGR fontencoding
is not explicitly indicated either. In any case, I have commented on
this issue on the Hispanic TeX mailing list, where Javier Bezos (current
Babel maintainer) participates. It would be interesting if he could
clarify this for us...

> Unfortunately in the case of
>
>     \usepackage[russian,english]{babel}
>
> \selectlanguage{russian} is required, without it compilation fails with
>
>    ! LaTeX Error: Command \cyrn unavailable in encoding OT1.

Yes, this is the case of the example that I put in my previous message
(russian as second language). If a explicit babel command is not added,
the T2A fontencoding is not loaded. Therefore, you would have to add a
selectlanguage{russian} or, at a low level,
\fontencoding{T2A}\selectfont

> With \usepackage[T2A]{fontenc} it behaves accordingly to acceptable
> for non-important documents graceful degradation. Text is readable,
> but no hyphenation applied.
>
> So I consider explicit loading of fontenc as more reliable.

Wouldn't it be easier in those cases to just load the fontenc package a
second time:

#+LaTeX_Header: \usepackage[T1,T2A]{fontenc}

According to what Egreg says in this thread
(https://tex.stackexchange.com/a/79112), "The only package that's
allowed to be loaded multiple times is fontenc".

So my logic is as follows: since Org has always loaded fontenc with the T1
option by default, I don't see much point in changing that behavior now
that pdfLaTeX is, so to speak, in retirement. And in any case, the user
can change (now) the fontencoding via the babel commands or by loading
the package a second time. For the record, I'm not opposed to redoing
the patch by adding the features you're proposing. Simply, from my point
of view, I think it's not worth the effort. But it's just my opinion,
and besides, I don't use pdfLaTeX, so I may have a bias here.

Best regards,

Juan Manuel 


  reply	other threads:[~2022-07-15 14:37 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-03 15:28 [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists Juan Manuel Macías
2022-07-10  9:25 ` Ihor Radchenko
2022-07-14 12:34   ` Juan Manuel Macías
2022-07-14 15:12     ` Max Nikulin
2022-07-14 15:53       ` Juan Manuel Macías
2022-07-14 18:17         ` Juan Manuel Macías
2022-07-15 12:18           ` Max Nikulin
2022-07-15 14:36             ` Juan Manuel Macías [this message]
2022-07-17  9:55     ` Ihor Radchenko
2022-07-17 14:48       ` Juan Manuel Macías
2022-07-18  6:44         ` Ihor Radchenko
2022-07-18 10:32           ` Juan Manuel Macías
2022-07-18 11:01             ` Juan Manuel Macías
2022-07-18 15:37             ` Max Nikulin
2022-07-18 16:21               ` Juan Manuel Macías
2022-07-19 15:01       ` Juan Manuel Macías
2022-07-19 17:01         ` Max Nikulin
2022-07-19 19:31           ` Juan Manuel Macías
2022-07-20 16:12             ` Max Nikulin
2022-07-20 21:30               ` Juan Manuel Macías
2022-07-21 14:36                 ` Max Nikulin
2022-07-21 15:39                   ` Juan Manuel Macías
2022-07-22 12:16                     ` Max Nikulin
2022-07-22 12:49                       ` Juan Manuel Macías
2022-07-22 14:07                         ` Juan Manuel Macías
2022-07-23 15:19                           ` Max Nikulin
2022-07-23 17:15                             ` Improvements in the default LaTeX preamble (was: [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists) Juan Manuel Macías
2022-07-24 12:06                               ` Improvements in the default LaTeX preamble: templates? " Juan Manuel Macías
2022-07-25  9:31                                 ` Ihor Radchenko
2022-07-25 10:45                                   ` Improvements in the default LaTeX preamble: templates? Juan Manuel Macías
2022-07-23  5:01         ` [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists Ihor Radchenko
2022-07-23 13:44           ` BUG " Kai von Fintel
2022-07-23 13:59             ` Ihor Radchenko
2022-07-23 14:07               ` Kai von Fintel
2022-07-23 14:22                 ` Ihor Radchenko
2022-07-23 14:39                   ` Kai von Fintel
2022-07-23 14:50                     ` Ihor Radchenko
2022-07-23 15:53                       ` Juan Manuel Macías
2022-07-24  7:15                         ` Ihor Radchenko
2022-07-24 11:29                           ` Juan Manuel Macías
2022-07-26 11:58                             ` Ihor Radchenko
2022-07-26 16:19                               ` Juan Manuel Macías
2022-07-28 12:36                                 ` Ihor Radchenko
2022-07-23 14:53                     ` Juan Manuel Macías
2022-07-23 14:11           ` Juan Manuel Macías
2022-07-23 14:25             ` Ihor Radchenko
2022-07-23 15:29           ` Max Nikulin
2022-07-24  7:23             ` Ihor Radchenko
2022-07-10 10:51 ` Max Nikulin
2022-07-15 15:38   ` Juan Manuel Macías

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rou30ko.fsf@posteo.net \
    --to=maciaschain@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.