emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Add \usepackage{cmap} as default LaTeX class in ox-latex (was: org e


From: Max Nikulin
Subject: Re: Add \usepackage{cmap} as default LaTeX class in ox-latex (was: org exported pdf files)
Date: Thu, 29 Sep 2022 22:34:07 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 29/09/2022 11:12, Ihor Radchenko wrote:
Max Nikulin writes:

On 28/09/2022 10:07, Ihor Radchenko wrote:
Max Nikulin writes:

- What TeX engine do you use? E.g. for PdfLaTeX it may be necessary to
add \usepackage{cmap} immediately after \documentclass. Unicode engines
like LuaTeX likely do not require such trick.

I am wondering if having cmap should be a good default in general.
Not just for accessibility.

For me it must have, but I am a rare person on this mail list who is
happy with the Computer Modern font (actually cm-super Type 1 font). I
have never tried .ttf fonts with PdfLaTeX and I am unaware of effect of
\usepackage{cmap} in that case.

May others familiar with LaTeX comment on this?
If it is safe to add cmap to default LaTeX template, I see no reason why
we should not.

It seems something changed during last decade. I have not tried default Type3 raster fonts (I do not remember if it is possible to disable cm-super without uninstalling it), but at least with cm-super installed, the cmap package is not necessary to have Cyrillic text properly encoded in PDF files, not to mention ASCII. I have tried utf8 and cp1251 options of inputenc.

However with cmap more math characters get correct unicode symbols

\[ \forall \delta \exists \epsilon \ne t \]

I tried to search for problems that may cause cmap. There is no incompatibility with \usepackage[pdfa=true]{hyperref} anymore
https://tex.stackexchange.com/questions/64585/incompatibilities-of-cmap-with-fontenc-hyperref
(side note: the answer marked as accepted is incorrect). So I hope, it is safe to use this package for PdfLaTeX.

I have noticed mmap package intended to improve math representation
https://tex.stackexchange.com/questions/64409/proper-use-of-cmap-and-mmap
With the dumb example provided above I have not noticed difference between cmap and \usepackage[noTeX]{mmap}. I am unsure when TeX commands may be preferred to Unicode characters as it works for default mmap configuration.

There is a chance that mmap is not installed in the system since it is provided by "extra" system package in Ubuntu: texlive-latex-recommended: /usr/share/texlive/texmf-dist/tex/latex/cmap/cmap.sty
texlive-latex-extra: /usr/share/texlive/texmf-dist/tex/latex/mmap/mmap.sty
It should be possible to detect availability of mmap.sty in runtime using kpsewhich command.

So when I was writing that cmap is must have for me, I was not aware that nowadays PDF files generated from LaTeX source have mostly properly encoded text even without this package, in the past attempt to copy text resulted in some garbage.




reply via email to

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