Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error with \usepackage{fontspec}

112 views
Skip to first unread message

Cecil Westerhof

unread,
Oct 4, 2022, 11:14:09 AM10/4/22
to
I want to change the font that is used. I understood that instead of
pdflatex I should use lualatex and use:
\usepackage{fontspec}

But at the moment I do that I get:
[\directlua]:1: module 'luaotfload-main' not found:
no field package.preload['luaotfload-main']
[kpse lua searcher] file not found: 'luaotfload-main'
Error in luaotfload: reverting to OT1 L3 programming layer <2021-01-09>

What is going wrong here?
I am using Debian 11.

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Peter Flynn

unread,
Oct 4, 2022, 6:34:37 PM10/4/22
to
On 04/10/2022 17:11, Cecil Westerhof wrote:
> I want to change the font that is used. I understood that instead of
> pdflatex I should use lualatex and use:

Or XeLaTeX. I don't think there is any advantage in using LuaLaTeX if
you are not using Lua (but I'm happy to be proved wrong)

> \usepackage{fontspec}
>
> But at the moment I do that I get:
> [\directlua]:1: module 'luaotfload-main' not found:
> no field package.preload['luaotfload-main']
> [kpse lua searcher] file not found: 'luaotfload-main'
> Error in luaotfload: reverting to OT1 L3 programming layer <2021-01-09>
>
> What is going wrong here?
> I am using Debian 11.

Try xelatex.

Peter

Cecil Westerhof

unread,
Oct 4, 2022, 7:14:07 PM10/4/22
to
Cecil Westerhof <Ce...@decebal.nl> writes:

> I want to change the font that is used. I understood that instead of
> pdflatex I should use lualatex and use:
> \usepackage{fontspec}
>
> But at the moment I do that I get:
> [\directlua]:1: module 'luaotfload-main' not found:
> no field package.preload['luaotfload-main']
> [kpse lua searcher] file not found: 'luaotfload-main'
> Error in luaotfload: reverting to OT1 L3 programming layer <2021-01-09>
>
> What is going wrong here?
> I am using Debian 11.

When the \usepackage{fontspec} is removed, the pdf is generated
without a problem.
But when looking a little bit clearer I see I still get:
[\directlua]:1: module 'luaotfload-main' not found:
no field package.preload['luaotfload-main']
[kpse lua searcher] file not found: 'luaotfload-main'
Error in luaotfload: reverting to OT1 L3 programming layer <2021-01-09>

Cecil Westerhof

unread,
Oct 4, 2022, 8:28:15 PM10/4/22
to
Peter Flynn <pe...@silmaril.ie> writes:

> On 04/10/2022 17:11, Cecil Westerhof wrote:
>> I want to change the font that is used. I understood that instead of
>> pdflatex I should use lualatex and use:
>
> Or XeLaTeX. I don't think there is any advantage in using LuaLaTeX if
> you are not using Lua (but I'm happy to be proved wrong)

I understood that the default nowadays is lualatex.

But I found the problem. I had to install texlive-luatex.

Peter Flynn

unread,
Oct 5, 2022, 7:15:23 AM10/5/22
to
On 05/10/2022 01:14, Cecil Westerhof wrote:
> Peter Flynn <pe...@silmaril.ie> writes:
>
>> On 04/10/2022 17:11, Cecil Westerhof wrote:
>>> I want to change the font that is used. I understood that instead of
>>> pdflatex I should use lualatex and use:
>>
>> Or XeLaTeX. I don't think there is any advantage in using LuaLaTeX if
>> you are not using Lua (but I'm happy to be proved wrong)
>
> I understood that the default nowadays is lualatex.

Can you identify the source for this opinion?

I *think* the distribution default is still pdflatex,
although the TeX Live 2022 DVD arrived just yesterday
and I haven't had a chance to look at it.

If not, I would assume xelatex. As I said, lualatex is
very good if you want to embed scripting using Lua.
I can't think of a good use case for using it otherwise
(yet!).

> But I found the problem. I had to install texlive-luatex.

That is one of the reasons. I can't recommend this to new
users who probably don't know what Lua is or what they
might want it for.

Peter

Peter Flynn

unread,
Oct 5, 2022, 7:15:55 AM10/5/22
to
On 05/10/2022 00:06, Cecil Westerhof wrote:
> Cecil Westerhof <Ce...@decebal.nl> writes:
>
>> I want to change the font that is used. I understood that instead of
>> pdflatex I should use lualatex and use:

Have you tried using xelatex as I recommended?

Peter

Cecil Westerhof

unread,
Oct 5, 2022, 7:59:07 AM10/5/22
to
Peter Flynn <pe...@silmaril.ie> writes:

> On 05/10/2022 01:14, Cecil Westerhof wrote:
>> Peter Flynn <pe...@silmaril.ie> writes:
>>
>>> On 04/10/2022 17:11, Cecil Westerhof wrote:
>>>> I want to change the font that is used. I understood that instead of
>>>> pdflatex I should use lualatex and use:
>>>
>>> Or XeLaTeX. I don't think there is any advantage in using LuaLaTeX if
>>> you are not using Lua (but I'm happy to be proved wrong)
>> I understood that the default nowadays is lualatex.
>
> Can you identify the source for this opinion?

Sadly not. I did a lot of duckduckgo. One page sent me in the right
direction. He said that I had to use fontspec and that this does not
work with pdflatex, so I should use lualatex, or xelatex. But he also
said that lualatex would be the default in LaTeX3.


>> But I found the problem. I had to install texlive-luatex.
>
> That is one of the reasons. I can't recommend this to new
> users who probably don't know what Lua is or what they
> might want it for.

I only know it is a programming language. I was told it is a quit
interesting language and wanted to explore it. Until now I did not get
to it.
I think I should start with getting LaTeX in my fingers and starting
at lua in about half a year.

Cecil Westerhof

unread,
Oct 5, 2022, 8:14:13 AM10/5/22
to
Well, in one of my many searches I was told to use xelatex, or
lualatex. I was there also told that LaTeX3 uses lualatex as default.
It is working now, so I will for the moment keep using lualatex, but
when I get another problem: I will try xelatex.
0 new messages