[Top][All Lists]

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

Re: Choosing a LaTeX Compiler (my predilection for LuaTeX)

From: Juan Manuel Macías
Subject: Re: Choosing a LaTeX Compiler (my predilection for LuaTeX)
Date: Wed, 07 Apr 2021 17:29:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi Diego

Diego Zamboni writes:

> Hi Juan Manuel,
> Thank you for writing this, which is the clearest explanation I have
> seen of the advantages of LuaLaTeX/XeLaTeX. I have been using LaTeX
> for nearly 30 years, but stopped using it intensively every day when
> pdfLaTeX was still the bleeding edge. When I started again in the last
> couple of years, it has been a bit confusing to understand why and
> what all these different versions are. These days I use LuaLaTeX as
> well, but most of the documents I process are exported from Org-mode.

Certainly, LuaTeX has many possibilities, although perhaps we would have
liked more if there was a "LispTeX" :-D (by the way, the most lispy thing
I've seen on planet TeX is this strange and interesting package [a Lisp
interpreter written in TeX! language]:

This is a very simple example of what can be done in LuaTeX through its
 Lua interpreter (from Org): we define a command, with a simple Lua
 function, that put all capital letters of the document in TeX Gyre
 Pagella font, in red and scaled; and all digits in bold. (Anyway, this
 can also be done in Org Mode with a custom filter...):

#+begin_src lua :exports none
  function change_test ( text )
       text = string.gsub ( text, "%d",   "\\textbf{%0}" )
       text = string.gsub ( text, "%u",   "{\\myfamily %0}" )
       return text

#+begin_src latex :exports none :noweb yes
  \setmainfont{Linux Libertine O}
  \newfontfamily\myfamily{TeX Gyre Pagella}[Scale=2,Color=red]


       ( "process_input_buffer" , change_test , "change_test" )}}
        ( "process_input_buffer" , "change_test" )}}

#+begin_src latex :noweb yes :results raw
,#+LaTeX_HEADER: <<latexcode>>


Lorem ImpsuM DoloR Sit aMet



Lorem ImpsuM DoloR Sit aMet



For more esoteric features I recommend trying the chickenize
package (very didactic): https://www.ctan.org/pkg/chickenize

Best regards,

Juan Manuel 

reply via email to

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