[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-mode export to (latex) PDF

From: Maxim Nikulin
Subject: Re: org-mode export to (latex) PDF
Date: Thu, 15 Jul 2021 00:30:15 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

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

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

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 via email to

[Prev in Thread] Current Thread [Next in Thread]