[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] Check engines before running LaTeX
From: |
Mosè Giordano |
Subject: |
Re: [AUCTeX-devel] Check engines before running LaTeX |
Date: |
Fri, 21 Aug 2015 15:34:38 +0200 |
Hi Tassilo,
2015-08-21 8:15 GMT+02:00 Tassilo Horn <address@hidden>:
> Mosè Giordano <address@hidden> writes:
>
> Hi Mosè,
>
>> I sometimes happen to try to compile documents with a wrong engine
>> (above all example documents found on the Internet and the culprits
>> are fontspec and polyglossia, which require LuaTeX or XeTeX). I'd
>> like to be warned by AUCTeX that I'm going to get an error, then I
>> wrote the attached patch.
>>
>> Style authors should specify the engines required by the package (e.g.
>> LuaTeX and XeTeX for fontspec and polyglossia), then if the option
>> `TeX-check-engine' is non-nil the user will be warned before running
>> LaTeX command that a wrong engine has been selected, for example when
>> `TeX-engine' is set to `default'.
>>
>> If you know other packages requiring a specific engine please tell us.
>
> No, not exactly engine dependencies. But other packages have other
> requirements. For example, minted requires that you use -shell-escape
> (--shell-escape with LuaTeX). And to use pstricks with LuaTeX, you need
> something like
>
> \RequirePackage{ifluatex}
> \documentclass{article}
>
> \ifluatex
> \usepackage{fontspec}
> \setmainfont{TeX Gyre Pagella}
> \else
> \usepackage{tgpagella}
> \usepackage{pstricks}
> \fi
> \usepackage{auto-pst-pdf}
>
> which is not really testable.
Uhm, I'm not sure this isn't testable, but this would be anyway too
much tailored to a non basic package. Instead, fontspec and
polyglossia are almost mandatory when using Lua/XeLaTeX. By the way,
I once wrote down a style file for polyglossia, I should review and
update it one day.
> And hyperref, varioref, and cleveref can be used only if they are
> use-packaged in one specific order.
>
> So the constraints can be much more complex than just being restricted
> to some special engine, and I think the engine is the simplest part of
> it.
>
> But that shouldn't stop you of course. If you think it's helpful, then
> by all means do it.
Thanks, done.
Bye,
Mosè