From: physiculus <physiculus@gmail.com>
To: "Juan Manuel Macías" <maciaschain@posteo.net>
Cc: orgmode <emacs-orgmode@gnu.org>, physiculus <physiculus@gmail.com>
Subject: Re: Choosing a LaTeX Compiler (my predilection for LuaTeX)
Date: Wed, 07 Apr 2021 18:57:45 +0200 [thread overview]
Message-ID: <87sg42jaly.fsf@googlemail.com> (raw)
In-Reply-To: <87blar1b0r.fsf@posteo.net> ("Juan Manuel Macías"'s message of "Tue, 06 Apr 2021 21:13:56 +0200")
Am Di, 2021-04-06, 21:13 +0200, Juan Manuel Macías <maciaschain@posteo.net> schrieb:
Hello again,
thanks for the snippet, but unfortunately it doesn't work :-(
Now it doesn't stop with error, it happens nothing.
here is my config.
Variable:
org-preview-latex-default-process is a variable defined in ‘org.el’.
Its value is ‘luasvg’
Original value was ‘dvipng’
Variable:
org-preview-latex-process-alist
Value:
((luasvg :programs
("lualatex" "dvisvgm")
:description "dvi > svg" :message "you need to install lualatex and dvisvgm." :use-xcolor t :image-input-type "dvi" :image-output-type "svg" :image-size-adjust
(1.7 . 1.5)
:latex-compiler
("lualatex -interaction nonstopmode -output-format dvi -output-directory %o %f")
:image-converter
("dvisvgm %f -n -b min -c %S -o %O"))
(dvipng :programs
("latex" "dvipng")
:description "dvi > png" :message "you need to install the programs: latex and dvipng." :image-input-type "dvi" :image-output-type "png" :image-size-adjust
(1.0 . 1.0)
:latex-compiler
("latex -interaction nonstopmode -output-directory %o %f")
:image-converter
("dvipng -D %D -T tight -o %O %f"))
(dvisvgm :programs
("latex" "dvisvgm")
:description "dvi > svg" :message "you need to install the programs: latex and dvisvgm." :image-input-type "dvi" :image-output-type "svg" :image-size-adjust
(1.7 . 1.5)
:latex-compiler
("latex -interaction nonstopmode -output-directory %o %f")
:image-converter
("dvisvgm %f -n -b min -c %S -o %O"))
(imagemagick :programs
("latex" "convert")
:description "pdf > png" :message "you need to install the programs: latex and imagemagick." :image-input-type "pdf" :image-output-type "png" :image-size-adjust
(1.0 . 1.0)
:latex-compiler
("pdflatex -interaction nonstopmode -output-directory %o %f")
:image-converter
("convert -density %D -trim -antialias %f -quality 100
%O")))
here is the testfile:
\begin{displaymath}
\sqrt{a^2-b^2}=c
\end{displaymath}
\begin{equation} % arbitrary environments,
x=\sqrt{b} % even tables, figures
\end{equation} % etc
If $a^2=b$ and \( b=2 \), then the solution must be
either $$ a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \].
I use your luasvg snippet.
Do i have to do anything else?
Any command afterwards?
Hope someone could help :-)
Regards
Poul
> Hi physiculus,
>
> physiculus writes:
>
>> Hello,
>> i use LuaTex / LuaLatex successfully after some configs and readings.
>> The result (quality and speed) for me is better then with the old latex engine.
>> I'm satisfied.
>> BUT one thing isn't working and as far as i read here, there is no
>> solution yet :-(
>> The latex-preview inside org-mode is not possible, because it seems,
>> that org-mode needs the dvi subprocess for running the neccessary tools.
>> With LuaLatex there is no dvi file, because it produces a pdf right
>> away.
>> Any solution will be wellcome.
>
> I have this in my ~/.emacs:
>
> #+begin_src emacs-lisp
> (setq luamagick
> '(luamagick
> :programs ("lualatex" "convert")
> :description "pdf > png"
> :message "you need to install lualatex and imagemagick."
> :use-xcolor t
> :image-input-type "pdf"
> :image-output-type "png"
> :image-size-adjust (1.7 . 1.5)
> :latex-compiler ("lualatex -interaction nonstopmode -output-directory %o %f")
> :image-converter ("convert -density %D -trim -antialias %f -quality 100 %O")))
> (add-to-list 'org-preview-latex-process-alist luamagick)
>
> (setq luasvg
> '(luasvg
> :programs ("lualatex" "dvisvgm")
> :description "dvi > svg"
> :message "you need to install lualatex and dvisvgm."
> :use-xcolor t
> :image-input-type "dvi"
> :image-output-type "svg"
> :image-size-adjust (1.7 . 1.5)
> :latex-compiler ("lualatex -interaction nonstopmode -output-format dvi -output-directory %o %f")
> :image-converter ("dvisvgm %f -n -b min -c %S -o %O")))
> (add-to-list 'org-preview-latex-process-alist luasvg)
> (setq org-preview-latex-default-process 'luasvg)
> #+end_src
>
> You can set 'org-preview-latex-default-process' to luasvg or luamagick
>
> Best regards,
>
> Juan Manuel
>
> --
> --
> ------------------------------------------------------
> https://juanmanuelmacias.com/
>
--
Jens Reimer
next prev parent reply other threads:[~2021-04-07 16:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-05 20:48 Choosing a LaTeX Compiler (my predilection for LuaTeX) Juan Manuel Macías
2021-04-05 21:17 ` Dr. Arne Babenhauserheide
2021-04-05 21:36 ` Juan Manuel Macías
2021-04-06 19:03 ` physiculus
2021-04-06 19:13 ` Juan Manuel Macías
2021-04-07 16:57 ` physiculus [this message]
2021-04-07 17:26 ` Juan Manuel Macías
2021-04-07 17:53 ` physiculus
2021-04-07 19:52 ` Juan Manuel Macías
2021-04-06 19:46 ` tomas
2021-04-06 20:09 ` Juan Manuel Macías
2021-04-07 14:16 ` Diego Zamboni
2021-04-07 15:29 ` Juan Manuel Macías
-- strict thread matches above, loose matches on Subject: below --
2021-04-06 20:44 Ypo
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=87sg42jaly.fsf@googlemail.com \
--to=physiculus@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=maciaschain@posteo.net \
/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).