Skip to content

Instantly share code, notes, and snippets.

@rain1024
Last active May 2, 2024 05:27
Show Gist options
  • Save rain1024/98dd5e2c6c8c28f9ea9d to your computer and use it in GitHub Desktop.
Save rain1024/98dd5e2c6c8c28f9ea9d to your computer and use it in GitHub Desktop.
Install pdflatex ubuntu

PdfLatex is a tool that converts Latex sources into PDF. This is specifically very important for researchers, as they use it to publish their findings. It could be installed very easily using Linux terminal, though this seems an annoying task on Windows. Installation commands are given below.

  • Install the TexLive base
sudo apt-get install texlive-latex-base
  • Also install the recommended and extra fonts to avoid running into the error [1], when trying to use pdflatex on latex files with more fonts.
sudo apt-get install texlive-fonts-recommended
sudo apt-get install texlive-fonts-extra
  • Install the extra packages,
sudo apt-get install texlive-latex-extra

Once installed as above, you may be able to create PDF files from latex sources using PdfLatex as below.

pdflatex latex_source_name.tex

Error 1: grep: ptmr7t.log: No such file or directory mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ptmr7t' failed to make ptmr7t.tfm. kpathsea: Appending font creation commands to missfont.log.

! Font OT1/ptm/m/n/10=ptmr7t at 10.0pt not loadable: Metric (TFM) file not found.

Ref: http://kkpradeeban.blogspot.com/2014/04/installing-latexpdflatex-on-ubuntu.html

@Yelinz
Copy link

Yelinz commented Jan 5, 2024

https://askubuntu.com/questions/1429846/how-can-i-install-latex-on-ubuntu-20-04-5

Only doing this worked for me aswell sudo apt install texlive

@piiskop
Copy link

piiskop commented Jan 16, 2024

I do it on 22.04 and get:

sudo apt-get install texlive-latex-base

[sudo] password for kalmer:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
texlive-latex-base is already the newest version (2021.20220204-1).

I do it on 23.10 and get:

sudo apt-get install texlive-latex-base

[sudo] password for kalmer:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
texlive-latex-base is already the newest version (2023.20230613-3).

How can I get the newest pdflatex on 22.04 that recognizes hyphenation in other languages than English?

@rishi23root
Copy link

I do it on 22.04 and get:

sudo apt-get install texlive-latex-base

[sudo] password for kalmer:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
texlive-latex-base is already the newest version (2021.20220204-1).

I do it on 23.10 and get:

sudo apt-get install texlive-latex-base

[sudo] password for kalmer:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
texlive-latex-base is already the newest version (2023.20230613-3).

How can I get the newest pdflatex on 22.04 that recognizes hyphenation in other languages than English?

use this code to install latest text-live on 22.04 and use 'tlmgr' to install any required extra package,

i hope it helps

@rishi23root
Copy link

https://askubuntu.com/questions/1429846/how-can-i-install-latex-on-ubuntu-20-04-5

Only doing this worked for me as well sudo apt install texlive

can you please share more details because i want to achieve the same but i am not able to get latest version on text-live

@piiskop
Copy link

piiskop commented Feb 10, 2024

Maybe it is dangerous to install texlive's latest version as it might not work with your operating system. I guess this is why different operating systems have different versions of texlive available.

@rishi23root
Copy link

I wouldn't say it is dangerous, rather it is tricky to make it work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment