From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kBhhLdp3a2DtdwAAgWs5BA (envelope-from ) for ; Mon, 05 Apr 2021 22:49:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WPpTJ9p3a2CoUwAAbx9fmQ (envelope-from ) for ; Mon, 05 Apr 2021 20:49:30 +0000 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 3B51912977 for ; Mon, 5 Apr 2021 22:49:29 +0200 (CEST) Received: from localhost ([::1]:45716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTWA3-0006FE-7G for larch@yhetil.org; Mon, 05 Apr 2021 16:49:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTW9Z-0006EJ-Av for emacs-orgmode@gnu.org; Mon, 05 Apr 2021 16:48:57 -0400 Received: from mout01.posteo.de ([185.67.36.65]:41107) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTW9W-0001ot-4G for emacs-orgmode@gnu.org; Mon, 05 Apr 2021 16:48:57 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 7109916005C for ; Mon, 5 Apr 2021 22:48:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1617655730; bh=rdkOKjRv0xFixGRguVGqVL6FltEvWvWdMjAh0b8hS1Y=; h=From:To:Subject:Date:From; b=rESLC6SpmOvNZbRwgXWs9PWqe6XJ+GZkPTjakbmalOhSI24DS4qL1G9censIDG3RL 9jaZG3k8NMj6ORN5W6Iyver6nQRRUasGa/yVwOcnoOi0XxP0Hby2e9bJOt3nTWoxNS X4zf6iEzGDbjxO0YfyDFi9B9Fio8DF8tOChmoeEO+qhm0E2z2jJRWzuLZxWeho20g+ ze3RZI8gv0lbs4LlvLmwGKWVaTbSnEdY4K9vb9O2NSxqNV6kRk6cvSxaoTHDwGPZWT 3P6rXhyUIXUINhINT4WTVQn3ZCkuE6RvkOMOjeE0IxNMUIjDDoWbE6631rOB518D1r KJQsgYLAbDEew== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FDjS16Fwsz9rxK for ; Mon, 5 Apr 2021 22:48:49 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: orgmode Subject: Choosing a LaTeX Compiler (my predilection for LuaTeX) Date: Mon, 05 Apr 2021 22:48:48 +0200 Message-ID: <87tuokh2z3.fsf@posteo.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617655770; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Qb6hsHa4jMpB8270B5cj/In6c3Dh9JMHS3z/h4MFfXM=; b=TISelkxCMIQuhTv9f60+4V8OsCAhnipvDRkodIGimIBNjcB7bOX86uIta8tuvFw6BI5NhS GxY3hhPuNriQSJOXBZypWIBRz5OQRMse04uN89tH5IcQu1MC/oPnQXS8RjjhQmyyjPz3eA AooJN4fBsbUTC3TUnsLfGBn+Nm7FRFcxaC4a1787aQdEJoyBLkfJDr24Nh/T3jgKI4vNu/ nn8dUx+YxIp468QboOncPoR7gmn0eGMcPlNvu5L2PBVgk1E3IAhfXUM533S14PubftU5+f OjaeWb8xOy069BANSJddKn64vkxceXLOzsbvo7OibYCweu6BrWD3WKISBeILcw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617655770; a=rsa-sha256; cv=none; b=VfTQZbeCEzkZ45dEuIoWKb26YYGAKUM586HbOoebcQXlyW+hhHc2EbVrobErWLs32fWos9 AotFlyGEfi3CYfqDKqrwGus3hh6l8HLqrlD2LTnWtpkIf7VchvZV7gBRd7+49zZVPST/rx Elap9RPFH0oP7gWOO8RNnFDgRGM5lNxuOay7GAOGJ3E+dlMgOu9LiEB/bD5KeY+sha8HKw pSw/md1nE3OC1MPotgzCaUKriCkvqcz0lCTiHUYNAbafdplR5zpJt8oP3MkmfCpM/B+Kn6 je/1XM1DIKq8QonaJSIcWVGRFWkrnbvgl+1A11SfqTLbCeTTuxpXishiNH4vRQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=rESLC6Sp; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=rESLC6Sp; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 3B51912977 X-Spam-Score: -3.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: /2BzrJFN5Th8 Hi all, There have been some threads recently about exporting to LaTeX, but I think something that I consider interesting for novice Org/LaTeX users has not been commented: the choice of the TeX engine. I think this is important because although people often say they "use LaTeX", what they actually use is TeX via the La-TeX format. What TeX engine to choose? I would dare to say the following: unless you want to maintain some backward compatibility with old documents, I highly recommend using LuaTeX or XeTeX, especially LuaTeX. Although pdfTeX is very popular among average or veterans LaTeX users, I think using it nowadays doesn't make much sense (IMHO). LuaTeX is the natural evolution of pdfTeX and adds the great advantage of accesing the TeX internals through Lua scripting. (What follows is specially intended for those Org users who haven't used XeTeX or LuaTeX yet). LuaTeX and XeTeX are *100% Unicode-based* and you can use your system fonts (open type, true type, etc.) in your documents in a simple way through the fontspec (https://www.ctan.org/pkg/fontspec) package, which provides a very neat interface and manages all OpenType features (LuaTeX and XeTeX use HarfBuzz as otf rendering engine). In LuaTeX also you can use any font that is not installed in your system: just indicate the path to the fonts files. This is very useful to test new fonts without installing them... In all modern word processing systems the user has always been able to pick a font easily, and that has been historically quite complex, hard and complicated in the (La)TeX ecosystem. For example, if we want to use globally the Palatino Linotype family in our LuaLaTeX document: \setmainfont{Palatino Linotype} We can add some OpenType features, like old style numbering: \setmainfont{Linux Libertine O}[Numbers=LowerCase] And if we want to use another font for italics, with certain properties (color[1] and scaling): \setmainfont{Crimson} [Numbers=Lowercase, ItalicFont=MinionPro-It.otf, ItalicFeatures={Color=red, Scale=MatchLowercase}] ([1] Requires the xcolor package) We can also define our own family with its properties (for example, with upper case numbers and letters tracking): \newfontfamily\myfamily{crimson} [Numbers=Lining,LetterSpace=3.0] Furthermore (for more advanced users), in LuaTeX we can define new opentype features on the fly, both positional and of substitution (as long as the typeface includes the glyphs needed to replace). For example, if I use the Crimson typeface, a contextual substitution for character Q + u can be defined, by including some Lua code through the LuaTeX primitive `directlua': \directlua{ fonts.handlers.otf.addfeature{ name = "mycontextual", type = "chainsubstitution", lookups = { { type = "substitution", data = { ["Q"] = "Q.alt01", }, }, }, data = { rules = { { after = { { "u" } }, current = { { "Q" } }, lookups = { 1 }, }, }, }, } } ... And add anywhere in the text: \addfontfeature{RawFeature=+mycontextual} If I had to choose, finally, between XeTeX and LuaTeX, I would choose LuaTeX, for things like these and many other reasons. In addition, there are emerging cool new packages that only work with LuaTeX. Anyway, XeTeX is another very good option too, especially for users who prefer something that works more "out of the box" and is less esotheric than LuaTeX. To export to PDF always with LuaTeX we can put in our ~ /.emacs: (setq org-latex-pdf-process '("lualatex -shell-escape -interaction nonstopmode -output-directory %o %f" "lualatex -shell-escape -interaction nonstopmode -output-directory %o %f" "lualatex -shell-escape -interaction nonstopmode -output-directory %o %f")) Or with latexmk, which will take care of compiling as many times as necessary for indexes, bibliographies, etc .: (setq org-latex-pdf-process '("latexmk -lualatex -e '$lualatex=q/lualatex %%O -shell-escape %%S/' %f")) Best regards, Juan Manuel