Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Converting from pdftex to luatex

31 views
Skip to first unread message

Ian Fantom

unread,
Oct 23, 2024, 5:27:45 AM10/23/24
to latexus...@googlegroups.com
I have a document in TeXstudio using Ubuntu and with PdflateX set in the
configuration. I wish to convert this to LualateX. So I selected Options
| Configure | LualateX, then Tools | Build & View.

I got a popup window saying:

- -----------

Could not get write permission on file

/usr/share/texlive/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty

Perhaps it is read-only or opened in another program?

- ------------

I clicked on OK, then another popup window appeared:

- -------

You cannot compile the document in a non writable directory.

- --------

The Messages section contained the message

- --------

Process started: lalatex -synctex=1 -instruction=nonstopmode
"unicode-mathluatex".tex

- --------

So then I changed the configuration back to PdflateX, Rebuilt, and got
the same message!

None of this is making sense to me.

I kept a backup of the original Texstudio file.

The .sty file the system objected to had permissions '-rw-r--r-- ',
which seems reasonable for a distribution file. Why is the system
suddenly wanting to write to a distribution file containing Unicode math
symbols?

More basically: How should I convert from Pdflatex to Luatex, starting
from scratch?

Regards,

Ian


Peter Flynn

unread,
Oct 23, 2024, 6:38:33 AM10/23/24
to latexus...@googlegroups.com
This sounds like a bug to me. I can think of no valid reason why Lua[La]TeX would need write access to a system-installed file like that, which is (correctly) set as read-only to user applications.

Can you see if you can process the file with XeLaTeX?

(BTW I am interested as to why you wanted to switch to LuaLaTeX.)

Peter

-- 
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to latexusersgro...@googlegroups.com.

Ian Fantom

unread,
Oct 23, 2024, 11:26:32 AM10/23/24
to latexus...@googlegroups.com
I started again, and this time I got:

- ----------

! LaTeX Error: File `lualatex-math.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:
! Emergency stop.

- -----------------

Any ideas?

Ian

Peter

unread,
Oct 23, 2024, 12:25:04 PM10/23/24
to LaTeX Users Group
Sorry, I replied to this earlier but some stupid config of Gmail said I wasn't on the list.

Do you have that file anywhere on your system in a place TeX can find it? Type kpsewhich lualatex-math.sty to find out.
IF you have the file, then LuaLaTeX config is broken if it claims it can't find it.
IF you do not have the file, then your TeX Live setup may have terminated prematurely and simply not copied it.
I seem to have a copy in my old (2018) TeX Live at /usr/share/texlive/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.sty

To answer the other questions, 

  1. I am curious to know why you wanted to switch to LuaLaTeX. Nothing wrong with doing so, especially if you want to embed Lua scripts in your LaTeX code.
  2. I'm not a LuaTeXpert, so I don't know why LuaLaTeX is looking for that file when processing an old document that makes no reference to it.
  3. You cannot compile the document in a non writable directory. appears to me to be completely bogus. There is no way LuaLaTeX (or any TeX) should even be in a protected directory used for TeX system file storage. 
  4. lalatex -synctex=1 -instruction=nonstopmode "unicode-mathluatex".tex I thought you were processing a file that you had previously used pdflatex on. So I'm not clear what unicode-mathluatex.tex is.
  5. I changed the configuration back to PdflateX, Rebuilt, and got the same message! Do it again. Perhaps the .aux file has stuff left over from the LuaLaTeX run.
  6. None of this makes any sense to me either.
  7. How should I convert from Pdflatex to Luatex? There is no such thing as "converting from pdflatex to LuaLaTeX" unless you have been using pdflatex-specific special features (most of which are supported by LuaLaTeX anyway). A LaTeX file is just a LaTeX file, normally. There would be problems converting back from a LuaLaTeX-specific file (ie one containing Lua scripts, or referencing TTF or OTF fonts) which simply are not supported in pdflatex.

Can you upload the file somewhere (or  email it to me at pe...@silmaril.ie) so I can try it out here?

Peter

Ian Fantom

unread,
Oct 23, 2024, 1:23:09 PM10/23/24
to latexus...@googlegroups.com

Thanks, Peter, for both replies. I'll deal with this one first because it's simpler!

I'm reassured in a way that some of this doesn't make sense to you either! I'm coming back to this after quite a long absence, attending to other things, so it's quite possible I did something silly.

My reason for wanting to switch to LuaLaTeX is for Unicode. Under pdflatex I was getting a lot of error messages  under the Log tab such as:

    Package inputenc Error: Unicode char μ (U+3B)(inputenc) not set up for use with Latex. 0.05"

This one was in response to text: (μ ≤ 0.05)''

I also got under the Messages tab:

    Process started: pdflatex -synctex=1 -interaction=nonstopmode "extremism_a_en_reduced".tex

    Process exited with error(s)

I have excerpts in foreign languages, and one chapter is mathematical. I would like in future to be able to convert directly from Unicode characters in my LibreOffice Writer to Latex. I converted my current text using a conversion program. That helped me to learn Latex, but in future I think it would be quicker and less problematic to do it by hand, if I can get the initial configuration right. So then no editing of the Unicode characters would be necessary.

I was under the apprehension, or misapprehension, that Lua[La]TeX was the way to go with that. But perhaps the only problem is with package inputenc?

Regards,

Ian

Ian Fantom

unread,
Oct 24, 2024, 11:11:21 AM10/24/24
to latexus...@googlegroups.com

I did a 'location' on inputenc and got:

/home/ian/.config/texstudio/completion/autogenerated/inputenc.cwl
/usr/share/doc/texlive-doc/latex/base/inputenc.pdf
/usr/share/texlive/texmf-dist/tex/generic/tex4ht/inputenc.4ht
/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
/usr/share/texlive/texmf-dist/tex/latex/lwarp/lwarp-inputenc.sty

The inputenc.sty file has permissions:

-rw-r--r-- 1 root root 4732 Nov 25  2016 /usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty

But the pdflatex configuration isn't recognising it.

Any ideas? I hope the additional information helps.

Regards,

Ian

Peter

unread,
Oct 24, 2024, 11:31:29 AM10/24/24
to LaTeX Users Group
OK. I chose XeLaTeX for the same reason, plus I wanted to use TTF/OTF fonts, and the whole LuaLaTeX setup seemed unnecessary as I didn't need to write scripts in Lua (and LuaLaTeX is a little slower than XeLaTeX). So far, so good.

You should not be using either inputenc or fontenc with LuaLaTeX or XeLaTeX. inputenc and fontenc are only for pdflatex. For XeLaTeX and (AFAIK) LuaLaTeX use fontspec. That's the package that provides access to TTF and OTF fonts and Unicode. For compatibility, I believe inputenc and fontenc are supported in XeLaTeX and LuaLaTeX but using them is to cripple their more advanced features.

The best wordprocessor conversion to LaTeX I have found so far is to open the file in AbiWord and pick File > Export > LaTeX. Easier, of course, is to author directly in LaTeX using a LaTeX editor. Then the whole character conversion thing vanishes.

Peter

Peter

unread,
Oct 24, 2024, 11:37:44 AM10/24/24
to LaTeX Users Group
I don't really understand what you are trying to do here. If pdflatex is claiming it can't find inputenc.sty, then something has been broken. 

I also don't really understand what "pdflatex configuration" means in this context. There isn't any such thing that I am aware of, except the global TeX configuration in texmf.cnf (which you REALLY do not want to get involved with) or the processing options with which the pdflatex source code was compiled, which are equally non-accessible. As shipped in TeX Live, the tex, latex, pdftex, pdflatex xetex, xelatex, luatex, and lualatex binaries all execute correctly, and they all use the kpsewhich libraries to find the files they are asked for.

What happens if you type kpsewhich inputenc.sty

In any case, if you are going to use XeLaTeX or LuaLaTeX, you won't be wanting inputenc.sty anyway.

Afterthought: does "pdflatex configuration" mean something you do inside your LaTeX editor to switch processors (ie from pdflatex to LuaLaTeX)? In that case perhaps it's something the editor authors can explain.

Peter

Reply all
Reply to author
Forward
0 new messages