From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qOrGMkvENWOXrgAAbAwnHQ (envelope-from ) for ; Thu, 29 Sep 2022 18:14:03 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id IHuCMkvENWPl6QAAauVa8A (envelope-from ) for ; Thu, 29 Sep 2022 18:14:03 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 87EA4A106 for ; Thu, 29 Sep 2022 18:14:03 +0200 (CEST) Received: from localhost ([::1]:48230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odwAk-0000hI-6e for larch@yhetil.org; Thu, 29 Sep 2022 12:14:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odvYL-0005CK-PO for emacs-orgmode@gnu.org; Thu, 29 Sep 2022 11:34:21 -0400 Received: from ciao.gmane.io ([116.202.254.214]:52142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odvYK-0000B0-3Y for emacs-orgmode@gnu.org; Thu, 29 Sep 2022 11:34:21 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1odvYG-0001iH-Rq for emacs-orgmode@gnu.org; Thu, 29 Sep 2022 17:34:16 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org 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 Message-ID: References: <87a66lpm5p.fsf@localhost> <8735cdpkiz.fsf@localhost> <87y1u4fb7b.fsf@localhost> <87bkqy95ud.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US In-Reply-To: <87bkqy95ud.fsf@localhost> Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-4.099, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664468043; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=3GxAWLJ+4V4G7AT7kkj62bv8iFGad8SS+NWi5jRRjJQ=; b=rXUB4w0hNkfwH3sTx8DxBLb4JRyJrSriCw1pIeJUtHNV57yu7TEfKXvmpepwViM0pIQT8D r8HU/KqIy6HH0ou68UN3yNwQjLwNEgSGqCPoBIkT/sr753g+MJZSGoYMo6Gy/PnhY89kGu F8NvKDEXlCWK4juBxE+EMJ9dL2O4XyellX8G2W3aL6nAiY5gHlJJtex40/z+tPHBz6zxnl lVxrJCrEMElpHnKeTJF1SBz7aJnnZIwb/MCCEudfZBzLwrOB3ZWUfetzwZ5OkxddFQs3oz 2hMVGAgIGoS5kvuAveezz46KQcF6ZqiPOS5SW2MwGbdA14EZLodFg+S5GAWdGQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664468043; a=rsa-sha256; cv=none; b=J9SDzD8rNJ+4inyyTEVtRJpELE2GRRSxptuQjcZ5BYRIPP5tH6CUoU6jl8VSTDtLpODtIM 0JAflOpQWtXu0sAEa/HJbx2a2HLbbL/aMTviFidq/+OpD7QfADLyJwBSYzkRldnHyjg1l9 r+4FGlXjDAYY0CQ4+KM/FVMszRVdn7EUJHW6Dg5jLN6EyyHxwpVUCFWBQvZbQWLqePzMc2 RoCaapD2VttXFeRT74bc2dZemzIUXgmbMCchGrwAH8IK6O96cGjnKvH0hZuzhuRkcgjpsA 4sTB2R4L/wJndXcEFeEE0JFzLxw8Srm+7sWvRRXj+42T7xJ6hOrNvl8n0xOE2w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.36 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 87EA4A106 X-Spam-Score: 4.36 X-Migadu-Scanner: scn1.migadu.com X-TUID: q3EwgCq4wxbS 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.