You are not logged in.

#1 2022-01-31 17:55:29

loh.tar
Member
Registered: 2010-10-17
Posts: 49

The Arch Latex Situation

Edit/Update: This thread is not about some PKGBUILD, but to improve TeX on ArchLinux. The insights gained are collected in this wiki page

Hello Arch-Gurus, Latex-Professionals and interested parties

For those who are in hurry, skip the first paragraph.

A short trip to my Latex history: It was ~7 years ago that I've so long dealt with Latext that it fulfilled my simple purposes, writing a letter when needed. Following the Wiki I ended up with ~2GB texlive-stuff, the biggest chunk texlive-fontsextra ~1.3GB :-( If I really need all that, I don't know.
Around 5 Years ago I switched my aged 32-Bit Laptop into a new 64-Bit Laptop, and put all that textlive-stuff again on it. No desire to deal with it.
Um, sadly f**d up my disk now. So I had become the chance to set up my Laptop from scratch.

Coincidentally there was an article in german IT-News portal Golem about Latex, there was mentioned MiKTex. It was described as lightweight, where only is installed what really is needed. That got my interest!

I found MiKTeX in AUR, and got it running. package size 27MB. Installed, so that my letters are fine, ~20MB in home and ~275MB in /opt. I love it!


The MiKTeX Situation, not only on Arch

To become the nice little 27MB package you need to build it on your own, which take quite a lot of time and ended up in a 750MB folder! Not so nice :-(
That's the point where you Arch gurus are addressed. Other distribution have packages, which are promoted by the MiKTeX boss. Arch silently not.

But it is even worse. The MiKTeX-AUR guys run some time ago into an issue, due to strict compiler rules, and filed a report where the answer was not so charming. :-/

I think I got this bug fixed. But noticed a bunch of warnings anyway which for my taste should be fixed too.

$ grep Woverflow miktex-21.12-3-x86_64-build.log |wc -l
53
$ grep Wunused-result miktex-21.12-3-x86_64-build.log |wc -l
72

But code quality is not the only issue of MiKTeX. It is by it's origin a Latex distribution for Windows and the promoted installation target and configuration is'nt *nix-Like and certainly not Arch-Like.

I may wrong, but a personal install in home looks stupid/ugly to me, just for a single one unser. The install to /opt may be fine, to have there the Latex packages. But these linking of the MiKTeX programs from there to /usr/share/bin looks strange. And running updates of the Latex stuff by root/sudo looks bad too. Even more when running the gui as root.

What I would expect is, to have the config in /etc and all other stuff where it usually is. But I have no idea if it could simply be done by a proper PKGBUILD build with some chown and probably some handy work after install, like add the user to some MiKTeX-Admin or MiKTeX-User group. Or if the MiKTeX programs need some patches to fit these requirements. e.g. when mpm, initexmf and miktex-console test in admin-mode of root and not if they have write access to some directory. miktex-console complained already about missing kdesudo.

So, the situation for me is: It works, even it looks ugly. I may look at some of the 53 warnings when I'm in the mood.

When you Arch-Gurus give some advice where everything has to be, and give some tips how to achieve the root free power to run these MiKTeX programs, I may try to submit a patch at the AUR guys. All in the hope MiKTeX becomes an binary package soon. But if, for what ever reason, is no chance, or if you suggest some complete different Arch-Latex solution, please let me/us know.

Just for completeness, not for support: (but if you can, fine :-)

I did these setup steps linked above inclusive "Finalizing" as root with --admin (not without nagging about log4cxx, but nagging was gone after next step). And "Testing" as user. I had expected that now the stuff pulled by pdflatex will go to the /opt dir, but nope, it's in my home. Now is pdflatex complaining that no admin has looked for updates. But, my letter looks fine...

Thanks for reading.

PS You Gurus knows about the Arch Latex Situation, as the wiki discussion shows
PS Move this elsewhere when "Arch Discussion" isn't fitting in your opinion, but don't scold

Last edited by loh.tar (2022-02-13 08:13:02)

Offline

#2 2022-01-31 18:01:12

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,864
Website

Re: The Arch Latex Situation

It isn't clear if there is a question here, but assuming you want help with addressing those warnings, I'll move this to the AUR subforum.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2022-01-31 19:21:49

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: The Arch Latex Situation

Although I don't find any specific questions in your post that I could answer, I share your general concerns with texlive. Instead of looking into MiKTeX, I switched to tectonic-bin (AUR) and found it perfect for my needs.

Offline

#4 2022-02-01 08:13:37

loh.tar
Member
Registered: 2010-10-17
Posts: 49

Re: The Arch Latex Situation

@WorMzy Well, I agree this post isn't as clear as it should be. But it wasn't to get help for those warnings. I had the feeling that Arch should be have an "official" (better?) alternative to texlive. I don't know if, from a Latex-Professional view, some exist.

@tucuxi I had read about it in the linked Wiki discussion but didn't look at it. But now I have. It reads very interesting

Pro:
- Only one executable
- No setup fumbling, ready to use
- Automatic download on demand missing Latex stuff, similar to MiKTeX
- AUR -bin package only pull ready to use executable from official side
- Coded in Rust, no ugly code insecurities(?)
- ...?

Cons:
- Save Latex stuff in users ~/.cache/Tectonic which couldn't be free chosen? link (use Rust’s app_dirs)
- Each user will have it's own Latex stuff, which may surprising much
- May not fit Latex-Professional needs?  link
- ...?

The use of ~/.cache concerned me. I have it mount to /tmp

May you tell us how big your ~/.cache/Tectonic is, tucuxi and the package build by PKGBUILD?

Offline

#5 2022-02-01 11:33:26

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: The Arch Latex Situation

$ du -hs .cache/Tectonic
74M	.cache/Tectonic

$ du -h /usr/bin/tectonic /usr/share/licenses/tectonic-bin 
39M	/usr/bin/tectonic
8.0K	/usr/share/licenses/tectonic-bin

I produce documents from 1-page letters to 100+ page reports with tables and figures, but I don't write my own packages.

Offline

#6 2022-02-01 20:42:18

loh.tar
Member
Registered: 2010-10-17
Posts: 49

Re: The Arch Latex Situation

Oh, that's looks good, I must try it, thanks tucuxi!

I have done some research and getting the sense that it may be best to install TeXLive direct from tug.org. And using tlmrg to keep it up to date, at least when you try to have a small install.

The default full scheme installs everything available...Collections are one level more detailed than schemes — in essence, a scheme consists of several collections, a collection consists of one or more packages, and a package (the lowest level grouping in TeX Live) contains the actual TeX macro files, font files, and so on.

If you want more control than the collection menus provide, you can use the TeX Live Manager (tlmgr) program after installation...using that, you can control the installation at the package level.

Furthermore seems really not much alternatives to exist to TeXLive. In this 6 years old question is Tectronic not mentioned, guess too new.

And there is some similar TeX system ConTeXt. Ready to go, without the need for some Arch package.

Offline

#7 2022-02-02 06:51:45

dtbaumann
Member
Registered: 2015-07-03
Posts: 28

Re: The Arch Latex Situation

+1 for texlive from tug.org, which is actually the one and only program suite which I have installed outside of the official arch and aur packages.

pros:
+ resides nicely separated in /usr/local/texlive/year with no side effects on the rest of the installation
+ allows for installations w/ reduced space
+ easy installation and failsafe upgrade
+ stable and complete!
+ can nicely be integrated into arch with a texlive-dummy package (paths, provides, etc)

cons:
- disk space (if that's an issue)
- texlive-dummy has been on aur but obviously isn't any longer. If there is some need, I'll push my version (still working out the hooks)

I'm usually updating texlive every now and then between years and 1 month after a new version has been released. As this is way longer compared to my usual arch update cycle, I can nicely live with doing this outside of pacman.

using LaTeX for more than 25 years and texlive for almost that long and for almost everything that needs to be written....

Offline

#8 2022-02-02 09:23:30

loh.tar
Member
Registered: 2010-10-17
Posts: 49

Re: The Arch Latex Situation

@dtbaumann You seem to be the Latex professional I addressed in the first post, thanks for your input.
You may sure can give me a hint with my issue below. Even if this thread was not intended to support me, but to improve the Arch Wiki and/or Arch package repository.

I tried Tectonic shortly, just as MikTeX. While MiKTeX produce a perfect copy of the old correspondence, Tectonic didn't print the german letter Eszett "ß" properly, which was shown as "SS". The reason should be that Tectonic cut-off old workarounds. So I may need to modify my sources to fit the modern way of Tectonic.

Interesting are the file sizes of the different letter versions. Tectonic is much smaller while MiKTeX some bigger as the old original.

    $ stat -c "%s %n" some-letter*.pdf
    70269 some-letter-old-texlive.pdf
    103130 some-letter-miktex.pdf
    14499 some-letter-tectonic.pdf

To compile this letter Tectonic download only ~40MB, that's nice :-)

So all in all I think I have a clear winner. Tectonic is easy to install and require very little disk space.

Offline

#9 2022-02-03 16:15:49

dtbaumann
Member
Registered: 2015-07-03
Posts: 28

Re: The Arch Latex Situation

this seems to get off topic for AUR :-)

My guess for the file sizes would be a different way of embedding the fonts into the pdf document and maybe optimization of pdfs. No chance to test, here, but pdfinfo, pdffonts and others from poppler-utils might be helpful.

Offline

#10 2022-02-03 16:26:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: The Arch Latex Situation

I'd also wager it was font embedding vs not.  Font handling was always my big gripe about "classical" latex approaches - it was a complete PITA ... always.  XeTeX with fontspec was a huge game changer.  Of course these can be used with a texlive install from tug.org, but you have to specifically configure tools to use xetex while tectonic uses the xetex approach by default.  So with your different file sizes I'd guess your "old-texlive" version did not use xetex while the tectonic version did (and I have no idea about miktex); I'd bet you'd close most of the size gap by using xetex with the "old-texlive" tools.

I've used a variety of *tex systems.  I use them extensively, but can't say I know much of the inner workings.  But I'm competely sold on tectonic being leaps and bounds above any other option for my uses.  Most relevant for me is that it works "out of the box" in sane suitable ways for everything I do.  So if I install a new system, all I need to do is install tectonic and I'm set.  With a texlive install from tug.org, there's a lot of hunting down the packages needed, installing, configuring, or transferring configs from one system to the next.  Arguably this is the "arch linux" approach to a *tex system - but I like knowing all about my OS.  I don't need to know all about my typsetting tools - I just want them to work.  So tectonic may be the "Apple" approach to a *tex system.

EDIT: actually maybe it's not so much the "arch" approach as texlive does things it's own way and doesn't play well with others.  That's more of a ubuntu approach (we don't need wayland, we'll make our own "mir").  Tectonic plays well with others - e.g., fontconfig for fonts.

Last edited by Trilby (2022-02-03 16:35:22)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#11 2022-02-03 19:31:30

loh.tar
Member
Registered: 2010-10-17
Posts: 49

Re: The Arch Latex Situation

File sizes: Yeah, this idea I got too, that the fond may not be included. But wouldn't that against the goal of such PDF, to look always the same? I copied one to my Android phone for a stupid test. Hm, looks good, but who knows what "special" font I had used, guess pretty average. pdffonts? Here we are:

$ pdffonts some-letter-old-texlive.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
MYTGLU+LMSans8-Regular               Type 1            Custom           yes yes no       4  0
SUEENT+LMRoman12-Regular             Type 1            Custom           yes yes no       5  0
KVJYNZ+LMRoman12-Bold                Type 1            Custom           yes yes no       6  0

$ pdffonts some-letter-miktex.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
FEIATB+LMSans8-Regular               Type 1            Custom           yes yes yes      4  0
MKHCTZ+LMMathSymbols8-Regular        Type 1            Custom           yes yes yes      5  0
FMIIUN+LMRoman12-Regular             Type 1            Custom           yes yes yes      6  0
EAMGWE+LMRomanCaps10-Regular         Type 1            Custom           yes yes yes      7  0
AUBTDG+LMRoman12-Bold                Type 1            Custom           yes yes yes      8  0

$ pdffonts some-letter-tectonic.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
IHAIZV+LMSans8-Regular               Type 1C           Custom           yes yes yes      4  0
BZIVMZ+LMMathSymbols8-Regular        Type 1C           Custom           yes yes yes      5  0
IXFAWU+LMRoman12-Regular             Type 1C           Custom           yes yes yes      6  0
TQTHRL+LMRomanCaps10-Regular         Type 1C           Custom           yes yes yes      7  0
YEUUOC+LMRoman12-Bold                Type 1C           Custom           yes yes yes      8  0

Looks to me there is always some font included. Well, to be fair, the old pdf had a slightly different "design". I had made a change in one of my .loc file at some time. Therefore not optimally chosen as a test object, sorry. Hu, the size difference wasn't an issue, it only popped up.

Edit: Typo+Oh, there is a C at Tectronic file Type. C=compressed I guess?

Thanks for your exchange of experiences Trilby.

I noticed some pro/cons of MikTeX/Tectonic.

- Neutral: Once installed MikTeX is just as painless to use as Tectonic
- Pro: MikTeX offer more than one, what's the term, Engine? to complile some file
- Con: Tectonic only xelatex
- Pro: MikTeX stores fetched stuff in a Tex standard directory structure
- Con: Tectonic stores it's stuff in obscure hash files, WTF?!?

Just for completeness, and probably help for some reader: My "ß/SS" problem is fixed by this hint. My letter looks now good but while compile there is a lot of grumble(link to posting in german)

Last edited by loh.tar (2022-02-03 19:35:15)

Offline

#12 2022-02-06 10:20:05

loh.tar
Member
Registered: 2010-10-17
Posts: 49

Re: The Arch Latex Situation

I have created a Wiki proposal you please take note.

Offline

#13 2022-02-06 12:04:14

dtbaumann
Member
Registered: 2015-07-03
Posts: 28

Re: The Arch Latex Situation

Looks nice, thanks for the proposal.

After Trilby's and your comments I obviously had to try tectonic (tectonic on aur compiles just fine). First results are, well, mediocre (no offense meant or implied, just personal experience). While some documents didn't compile at all (eg. \url was not known to the system), others did compile but without all personalisation, eg. letter class options to scrlttr2 are (silently!) ignored although present on the kpsepath. The results seem to call for a lot of adjustments to the system. Of course all documents compiled with no errors or warnings w/ my standard system.

I'll add to the pros:
+ setup is fast
+ download size is very small compared to full distributions
+ files are small
+ no clutter is left on the hard disk

and to the cons:
- needs fast internet connection for first time compilation to download required packages
- packages are per user, stored/cached with obscure filenames, and w/o documentation
- documents with local packages and styles don't compile out of the box (one has to put the packages into the local folder)
- needs significant adjustments for old documents (and packages)

I would think that tectonic is a very nice wrapper around (parts of) TeXLive. It definitively helps getting into LaTeX and into producing documents which are pleasant. The more you get into it and the more adjustments you have, the more you would probably dive into the original distribution.

Offline

#14 2022-02-06 13:56:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: The Arch Latex Situation

FWIW, I use \url in my documents and they worked fine when I rebuilt old .tex files with tectonic.  I'm not sure why it failed for you, but that isn't a limitation of tectonic.

Your first three cons are valid.  Though the third has been defended by the tectonic devs as intentional for "reproducible builds": their thinking is that the same source files should make the same document on any system they are compiled on, and not be influenced by contents in remote parts of the filesystem.  I've argued against their point of view on this, but it is a reasoned and deliberate choice, not a bug/error.

The fourth con may be true in some cases, but in my use I've never run into such a problem.  Documents I used with xelatex from the texlive repo packages all worked well with tectonic with the single exception of the local packages/styles issue.

Last edited by Trilby (2022-02-06 13:57:39)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#15 2022-02-06 14:53:20

loh.tar
Member
Registered: 2010-10-17
Posts: 49

Re: The Arch Latex Situation

dtbaumann

> letter class options to scrlttr2 are (silently!) ignored although present on the kpsepath

I guess Tectronic didn't care about an existing TeXLive configuration, but should(?)

> I would think that tectonic is a very nice wrapper around (parts of) TeXLive.

Would be nice to have some clarification about the TeX ecosystem (for the Wiki). I guess TeXLive, MikTeX and even Tectronic relies on the same upstream resources, just as any other TeX distribution.

> - needs significant adjustments for old documents (and packages)

Gues it's these "stuck to XeTeX" issue?

Ah, meanwhile Trilby had some proper information

Offline

#16 2022-02-07 07:42:30

dtbaumann
Member
Registered: 2015-07-03
Posts: 28

Re: The Arch Latex Situation

FWIW, I use \url in my documents and they worked fine when I rebuilt old .tex files with tectonic.  I'm not sure why it failed for you, but that isn't a limitation of tectonic.

In my case one of the bibtex entries contains \url but the bibliographystyle does not use it at all. Consequently, the main document does not include hyperref. Running xelatex/bibtex/xelatex compiles fine, but tectonic does not. At this point, even keeping all logs and intermediates did not give a clue to where the actual error was (bisecting the document does, of course).

This is clearly not an aur issue and should be reported to the tectonic developers, but it underlines my personal impression that switching to tectonic will require changes to my older documents, packages and styles (coming from the 80286 era).

However, I would probably recommend tectonic to new students as one alternative.

Offline

#17 2022-02-09 22:48:21

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: The Arch Latex Situation

loh.tar wrote:

dtbaumann

Would be nice to have some clarification about the TeX ecosystem (for the Wiki). I guess TeXLive, MikTeX and even Tectronic relies on the same upstream resources, just as any other TeX distribution.

No, tectonic doesn't. It is written in rust from scratch. btw, it is in [community] now.

Offline

#18 2022-02-09 22:57:36

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: The Arch Latex Situation

loh.tar wrote:

Would be nice to have some clarification about the TeX ecosystem (for the Wiki). I guess TeXLive, MikTeX and even Tectronic relies on the same upstream resources, just as any other TeX distribution.

No, tectonic doesn't. It is written in rust from scratch. Btw, it is in [community] now.

Offline

#19 2022-02-10 20:20:37

loh.tar
Member
Registered: 2010-10-17
Posts: 49

Re: The Arch Latex Situation

@Stefan I must have expressed myself in a misleading way.
Yes, Tectronic is brand new. But that's only the "compiler". I mean all these stuff which is fetched from the net on the fly, just like MikTex do, and you have do yourself when using TeXLive's package manager.

Offline

#20 2022-02-11 15:58:39

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: The Arch Latex Situation

The website states it quite clearly:

"Tectonic is a modernized, complete, self-contained TeX/LaTeX engine, powered by XeTeX and TeXLive."

Offline

#21 2022-02-11 16:43:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: The Arch Latex Situation

And that is not inconsistent with the accurate statement that it also relies on the same upstream resources as other tex systems.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#22 2022-02-11 19:16:33

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: The Arch Latex Situation

If you define "upstream resources" as averything but the binaries, you are right. I consider the binaries as most important part of the "upstream resources", since these are the parts that produce the output at the end.

Offline

#23 2022-02-13 08:21:08

loh.tar
Member
Registered: 2010-10-17
Posts: 49

Re: The Arch Latex Situation

Stefan Husmann wrote:

...tectonic ... is in [community] now.

Thanks at least for this hint.

Well, looks like this thread was not pointless. BTW I have updated the wiki page

Offline

#24 2022-03-05 11:00:28

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: The Arch Latex Situation

Just to let you know: Regarding the problems with old LaTeX documents: Upstream declares it as non-goal.

Offline

Board footer

Powered by FluxBB