emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: Tim Cross <theophilusx@gmail.com>
Cc: Maxim Nikulin <manikulin@gmail.com>,
	Ihor Radchenko <yantar92@gmail.com>,
	Matt Huszagh <huszaghmatt@gmail.com>,
	"Thomas S. Dye" <tsd@tsdye.online>,
	Dominik Schrempf <dominik.schrempf@gmail.com>,
	orgmode <emacs-orgmode@gnu.org>, orgmode <emacs-orgmode@gnu.org>
Subject: Re: LaTeX export: when is it more useful to use LuaTeX instead of pdfTeX?
Date: Sat, 09 Jul 2022 09:59:56 +0000	[thread overview]
Message-ID: <87sfna8v37.fsf@posteo.net> (raw)
In-Reply-To: <87o7xzdkc0.fsf@gmail.com> (Tim Cross's message of "Sat, 09 Jul 2022 13:24:06 +1000")

Hi, Tim, thank you for your comments,

Tim Cross writes:

> Juan, I think it would be great to add your post to worg. I'm happy to
> do this, but I think it wold also be good if we could include a basic
> 'setup' i.e. what changes people might need to (or should do to maximise
> benefit) in order to try out luatex. For example, what settings to put
> in org-latex-pdf-process (I'm guessing something like "lualatex
> -interaction nonstopmode -output-directory %o %f") and what (if any)
> packages to add/remove from the org-latex-packages-alist etc (I'm
> guessing that perhaps some font related packages may need tweaking?).
>
> Ideally, what would be good is a very simple recipe for what someone
> should do in order to try out luatex and get the most out of it (or at
> least see potential).

I have no problem with my post being added to worg, but I don't have
much experience in working with worg... Of course, I can prepare
everything you need, if you think it might be useful.

The *only* difference between a minimal document for lualatex and a
minimal document for pdfLaTeX is that for LuaLaTeX it is not necessary
to load the fontenc and inputenc packages. The following mwe
compiles perfectly in LuaLaTeX:

\documentclass{article}
\begin{document}
Hello world!
á é í ó ú ñ à è ì ò ù
\end{document}

LuaTeX defaults to an otf version of the Computer Modern font, so any
user who isn't interested in fonts and writing in non-Latin languages,
but wants to work in a real Unicode environment, won't need to fine-tune
fonts, nor load any special package. The rest is exactly the same as any
document for pdfLaTeX.

If in the Org document is added:

#+LATEX_COMPILER: lualatex 

the fontenc and inputenc packages are not loaded in the output, which is
correct and it is the minimum requirement for LuaLaTeX. I think Org is
already doing a good job here.

If the user wants to use other fonts, the fontspec package must be
loaded. Depending on the user's needs, you can go from the simplest to
the most complex configurations (the different options and possibilities
are explained in detail in the fontspec manual). The simplest: if a user
just wants to use the Times New Roman font as the main font in his
document, this lines would suffice:

\usepackage{fontspec}
\setmainfont{Times New Roman}

That is, by indicating the name of the family (Times New Roman), luatex
would use this family for normal text, italics, bold, etc. Of course,
it's a good idea to load a family that has italic, bold, bold italic,
and other subtypes. Fontspec has tons more options, but this would be
the basics. But I think this aspect is more on the LaTeX side than in
the Org side.

LuaTeX can use the fonts installed on the system, without the need to
add more (that is, simply by putting the name of the family, LuaTeX
accesses them); and you can also use any font in any directory, just by
giving the path. I wrote BTW this little package to preview any font in
Emacs, and test the opentype features. it uses org-latex-preview in the
background and compiles with LuaTeX:

https://gitlab.com/maciaschain/org-font-spec-preview

Best regards,

Juan Manuel 







  parent reply	other threads:[~2022-07-09 10:01 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08 12:17 LaTeX export: when is it more useful to use LuaTeX instead of pdfTeX? Juan Manuel Macías
2022-07-08 15:49 ` Uwe Brauer
2022-07-08 16:46   ` Juan Manuel Macías
2022-07-08 15:54 ` Greg Minshall
2022-07-08 16:13 ` Thomas S. Dye
2022-07-08 17:27 ` Bruce D'Arcus
2022-07-08 19:03   ` Juan Manuel Macías
2022-07-08 18:49 ` Thomas S. Dye
2022-07-09  2:23   ` Max Nikulin
2022-07-09  3:23     ` Thomas S. Dye
2022-07-09 11:10       ` Juan Manuel Macías
2022-07-09  3:24     ` Tim Cross
2022-07-09  3:50       ` Ihor Radchenko
2022-07-09  4:10         ` Tim Cross
2022-07-09  5:35           ` Dominik Schrempf
2022-07-09  6:31         ` Max Nikulin
2022-07-09  9:59       ` Juan Manuel Macías [this message]
2022-07-09 23:49         ` Tim Cross
2022-07-10 11:19           ` M-x org-create-worg-article command? (was: LaTeX export: when is it more useful to use LuaTeX instead of pdfTeX?) Ihor Radchenko
2022-07-10 19:06             ` Tim Cross
2022-07-11  2:09               ` Ihor Radchenko
2022-07-11  2:49                 ` Tim Cross
2022-07-11  3:18                   ` Ihor Radchenko
2022-07-11  4:00                     ` Tim Cross
2022-07-11  4:20                       ` Ihor Radchenko
2022-07-10 19:31           ` LaTeX export: when is it more useful to use LuaTeX instead of pdfTeX? Juan Manuel Macías
2022-07-09 10:42     ` Juan Manuel Macías
2022-07-09 12:15       ` Max Nikulin
2022-07-09 14:58         ` Juan Manuel Macías
     [not found]           ` <b58ee3cc-c58c-b627-9cc5-51993020db2c@gmail.com>
2022-07-09 20:22             ` Juan Manuel Macías
2022-07-10 20:23               ` [possible patch] Basic fontspec code for LuaLaTeX and XelaTeX (was "LaTeX export: when is it more useful...") Juan Manuel Macías
2022-07-10 20:31                 ` Juan Manuel Macías
2022-07-10 20:58                 ` Tim Cross
2022-07-11 13:34                   ` Juan Manuel Macías
2022-07-11  2:19                 ` Ihor Radchenko
2022-07-11  7:50                   ` Stefan Nobis
2022-07-11 14:19                   ` Timothy
2022-07-11 15:00                     ` Juan Manuel Macías
2022-07-11 17:45                       ` fontsets (was: [possible patch] Basic fontspec code for LuaLaTeX and XelaTeX (was "LaTeX export: when is it more useful...")) Timothy
2022-07-11 22:09                         ` fontsets Juan Manuel Macías
2022-07-12  7:12                           ` fontsets Stefan Nobis
2022-07-12 11:37                             ` fontsets Juan Manuel Macías
2022-07-12 15:26                               ` Fallback fonts in LuaTeX via 'luaotfload.add_fallback' (was "Fontsets") Juan Manuel Macías
2022-07-15 14:35                                 ` Max Nikulin
2022-07-11  3:59                 ` [possible patch] Basic fontspec code for LuaLaTeX and XelaTeX (was "LaTeX export: when is it more useful...") Greg Minshall
2022-07-11  8:05                 ` Stefan Nobis
2022-07-11 11:39                   ` Juan Manuel Macías
2022-07-11 12:04                     ` Juan Manuel Macías
2022-07-11 12:31                 ` Max Nikulin
2022-07-11 14:23                   ` Juan Manuel Macías
2022-07-11 17:20                     ` Max Nikulin
2022-07-16  3:01                     ` Max Nikulin
2022-07-11 17:08               ` LaTeX export: when is it more useful to use LuaTeX instead of pdfTeX? Max Nikulin
2022-07-10  2:12           ` Max Nikulin
2022-07-09  0:34 ` Matt Huszagh

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=87sfna8v37.fsf@posteo.net \
    --to=maciaschain@posteo.net \
    --cc=dominik.schrempf@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=huszaghmatt@gmail.com \
    --cc=manikulin@gmail.com \
    --cc=theophilusx@gmail.com \
    --cc=tsd@tsdye.online \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).