Install LaTeX on Ubuntu or Debian
LaTeX is a document markup language and a text preparation system to create documents. LaTeX is recommended to create technical or scientific articles, papers, reports, books and other documents like PhDs.
1. OPEN YOUR TERMINAL
A terminal is a Command Line Interface (CLI) where you type commands to tell the computer what to do. Make sure you’ve opened the terminal, if so, continues in the next step.
2. INSTALL TEX LIVE
TeX Live is a TeX distribution to get up and running with the TeX document production system. To install it, once you’re in the terminal, enter the following command:
sudo apt-get install texlive-full
texlive-full版本较大
我安装的是texlive,使用命令sudo apt-get install texlive
,即使是这样,也需要额外的1.1G左右的安装空间
Then, type your ‘sudo’ password and you’ll have installed Tex Live. This operation may take a long time.
测试texlive是否安装成功
tex --version
3. INSTALL TEXMAKER
Now you need a text editor. I recommend using a specific editor for LaTeX. There are many text editors for LaTeX on the Internet as Kile, TeXworks, JLatexEditor, Gedit LaTeX Plugin, etc. My favorite text editor for Latex is Texmaker. Texmaker is a cross-platform open source LaTeX editor. To install it, go to the Ubuntu or Debian terminal and enter the following command:
sudo apt-get install texmaker
In a few minutes you’ll have installed Texmaker.
4. CREATE YOUR FIRST DOCUMENT
To check that everything is working properly, create a LaTeX blank document. Open Texmaker and click on File, New. Then write the following code:
\documentclass{article}
\begin{document}
Hello, world!
\end{document}
Now save the document as a ‘tex’ file going to File, Save. Finally, compile the document clicking on Tools, PDFLaTeX. Make sure the ‘pdf’ file has been created and it’s working. And that’s it! You’ve created your first LaTeX document!
Do you like this article? Share it with this link. Thanks for reading!
References:
https://www.sharelatex.com/learn/Choosing_a_LaTeX_Compiler
ubutnu ! LaTeX Error: File fontawesome.sty' not found.
sudo apt-get install texlive-fonts-extra`
原因:
texlive缺少字体导致,Ubuntu 下面安装字体方法:
reference: https://www.scivision.co/adding-missing-fonts-to-latex-ubuntu/
https://www.cnblogs.com/liutongqing/p/6413774.html
https://www.linuxidc.com/Linux/2016-08/133913.htm
https://www.linuxidc.com/Linux/2015-07/120634.htm
https://blog.youkuaiyun.com/qq_33429968/article/details/62928742