emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Maxim Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: org-mode export to (latex) PDF
Date: Thu, 15 Jul 2021 00:30:15 +0700	[thread overview]
Message-ID: <scn6v8$i9q$1@ciao.gmane.io> (raw)
In-Reply-To: <m18s299yxm.fsf@nobis-it.eu>

On 14/07/2021 13:44, Stefan Nobis wrote:
> The main point: utf8x and the associated package ucs are not
> maintained for quite some time (utf8x seems to be last changed in
> 2004) and as far as I understand have always been more of a workaround
> than a solution. But I'm not an expert in this regard.
> Nowadays the LaTeX kernel and input encodings like (plain) utf8 are
> much more powerful and extensible and do play much better with other
> packages.

I was unlucky to notice the utf8x option when ≠ character was discussed 
on this mail list in the context of pseudocode listings. I am afraid, 
year 2004 is impressive in other sense than you expected. "Better" 
solution still unable to handle ≠ (unlike deprecated one). Actually 
necessity to explicitly specify several fonts reminds me end of previous 
century when Cyrillic fonts was not in default package set and required 
manual adjustment of config files (not to mention missed support in 
babel and inputenc, so several partially incompatible variants were used 
at that time).

> You need to specify all fonts that you want to use and that deviate
> from the default (Latin Modern in the case of lualatex). How else
> should the system now that you want something else?

There are cm-super fonts for at least of 15 years. OK, they are Type1, 
not otf or ttf and conversion from metafont was not lossless. (Actually 
the only real problem I noticed is that some rare printers ignore 
hairlines.) Why is the Latin Modern family used if CMU is available? 
Nowadays most of applications have no problem with wide range of Unicode 
characters. However it is a kind of trade-off to preserve traditional 
Computer Modern font (a kind of feature of TeX) or to pick a system font 
with more characters.

> The package "unicode-math" should always be used with lualatex and
> xelatex, in order to support unicode math input.

Thank you for the hint. Do you think Org should use it by default? Are 
there any caveats?

> In your minimal example neither polyglossia nor babel are required

They are almost unavoidable in any real document unless it is preview of 
e.g. particular equation.

On 14/07/2021 00:53, Juan Manuel Macías wrote:> And here I add that 
feature to Linux Libertine font:
> \setmainfont{Linux Libertine O}[RawFeature=+mysub]

It is wonderful that custom font can be chosen so easily. I was never 
brave enough and I did not have strong enough reason to follow lengthy 
guides how to use ttf font in latex+dvips+ps2pdf workflow. However 
custom fonts are for special documents. It perfectly suits for e.g. a 
book when camera ready variant is required. For routine notes it is 
better to keep from defaults as minimal as possible to minimize problems 
that may arise a decade later. I would prefer to avoid Linux Libertine 
if I am going to send source file to a colleague having another OS. I 
prefer to do fine tuning at the last stages of preparation of a 
document. It is sad that default fonts are often unusable for me.

> For multilingual management I recommend using Babel instead of
> Polyglossia.

I have no experience with polyglossia yet. I added it just because most 
of examples for LuaLaTeX or XeLaTeX use it.

TeX takes responsibility for a lot of things and it allows to get rather 
pleasant results with minimal efforts due to reasonable defaults. Unlike 
Apache FO processor for general formatting. Equations were looking 
disgusting in MS Word till ~2010.

This topic started from question concerning multilingual support out of 
the box. I can not help with Japanese quotes. However some problems can 
be noticed with e.g. (sorry for some raw LaTeX):

---- >8 ----
Test¹ of superscript and ½ fraction.

*«Теорема».* /Пусть/ $α → ∞$ и $\beta \to \infty$.

=Катет= и \textsf{гипотенуза}.

Åå. Text Greek α. µm.

Text utf8x ≠ utf8 and math $8 ≠ x$.
---- 8< -----

Current default in Org is pdflatex. It requires at least adjusting of 
fontspec by adding T2A option.

If LuaTeX and XeLaTeX handles Unicode better, is it possible to make any 
of them the default option and to leave pdflatex as a fallback? Is it 
possible to detect lualatex and xelatex in runtime? I have noticed that 
/usr/bin/lualatex belongs to texlive-latex-base package. Originally I 
did not have texlive-luatex package installed, so likely lualatex was 
rather broken despite presence of the binary in the system.

Should some packages for lualatex and xelatex be added to default list 
to minimize user problems and at the same time keeping configuration 
safe? (unicode-math, etc.)

Is it possible to provide reasonable defaults for fonts? Since lmodern 
is hardcoded in luatex and xetex, it may be done either by some usually 
available latex package or by org code and custom variables.

If some defaults can not be determined (e.g. \setmainfont) likely they 
should be explicitly mentioned in the org manual.

  reply	other threads:[~2021-07-14 17:32 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-10 13:42 org-mode export to (latex) PDF Jean-Christophe Helary
2021-07-10 13:52 ` Juan Manuel Macías
2021-07-10 14:13   ` Jean-Christophe Helary
2021-07-10 14:38     ` Juan Manuel Macías
2021-07-10 14:59       ` Tim Cross
2021-07-10 17:40         ` Juan Manuel Macías
2021-07-12  3:09           ` Tim Cross
2021-07-12  8:15             ` Eric S Fraga
2021-07-10 15:01       ` Jean-Christophe Helary
2021-07-10 16:13   ` Maxim Nikulin
2021-07-10 16:44     ` Stefan Nobis
2021-07-13 16:53       ` Maxim Nikulin
2021-07-13 17:53         ` Juan Manuel Macías
2021-07-14  6:44         ` Stefan Nobis
2021-07-14 17:30           ` Maxim Nikulin [this message]
2021-07-14 19:05             ` Stefan Nobis
2021-07-14 23:26               ` Tim Cross
2021-07-15 12:06                 ` Juan Manuel Macías
2021-07-15 17:10               ` Maxim Nikulin
2021-07-15 19:40                 ` Juan Manuel Macías
2021-07-16 16:56                   ` Maxim Nikulin
2021-07-16 18:34                     ` Juan Manuel Macías
2021-07-17 12:35                       ` Maxim Nikulin
2021-07-17 14:27                         ` Juan Manuel Macías
2021-07-16  9:20                 ` Stefan Nobis
2021-07-16 10:38                   ` Jean-Christophe Helary
2021-07-16 11:11                     ` Stefan Nobis
2021-07-16  5:58               ` Jean-Christophe Helary
2021-07-14 19:29             ` Juan Manuel Macías
2021-07-10 18:43 ` Jonathan McHugh
2021-07-10 19:24   ` 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:

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to='scn6v8$i9q$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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 public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).