[Sharing] How to use LaTeX on deepin
Table of contents
No headings in the article.
Introduction to LaTeX
LaTeX is a typesetting language and a good tool for writing papers and books. The specific origins are not detailed here. Compared with editing and typesetting tools such as Word, LaTeX can write papers through Notepad, and can also generate documents in pdf, word and other formats through the LaTeX compiler and document generator. Because all formats are controlled by syntax, the control and adjustment of the document format is more comfortable.
In addition, LaTeX is very useful for typesetting mathematical formulas.
LaTeX installation
The installation of LaTeX is divided into two modules, the front-end text editor and the back-end compilation toolkit. The front-end text editor we choose is texstudio, and the back-end compilation toolkit is texlive.
1.Install LaTeX
sudo apt-get install texlive-full This command installs the XeLaTeX compilation engine texlive-xetex, Chinese support package texlive-lang-chinese and many other tools. You can also go to the official website tug.org/texlive to download the source code to compile and install. The advantage of this is that you can get the latest version.
2.Install the graphical interface editor texstudio sudo apt-get install texstudio Of course, you can also choose other editors, such as Visual Studio Code, which is more beautiful, and secondly, Visual Studio Code automatic syntax completion is easier to use.
Configure
In the Options of the texstudio menu bar, select Configure TeXstudio →Build →Default Compiler to use XeLaTeX. For other editors, you also need to configure the connection to the back-end compiler. Please search for online tutorials based on specific tools.
Introduction to LaTeX
LaTeX is a typesetting language and a good tool for writing papers and books. The specific origins are not detailed here. Compared with editing and typesetting tools such as Word, LaTeX can write papers through Notepad, and can also generate documents in pdf, word and other formats through the LaTeX compiler and document generator. Because all formats are controlled by syntax, the control and adjustment of the document format is more comfortable.
In addition, LaTeX is very useful for typesetting mathematical formulas.
LaTeX installation
The installation of LaTeX is divided into two modules, the front-end text editor and the back-end compilation toolkit. The front-end text editor we choose is texstudio, and the back-end compilation toolkit is texlive.
1.Install LaTeX sudo apt-get install texlive-full This command installs the XeLaTeX compilation engine texlive-xetex, Chinese support package texlive-lang-chinese and many other tools. You can also go to the official website tug.org/texlive to download the source code to compile and install. The advantage of this is that you can get the latest version.
2.Install the graphical interface editor texstudio sudo apt-get install texstudio Of course, you can also choose other editors, such as Visual Studio Code, which is more beautiful, and secondly, Visual Studio Code automatic syntax completion is easier to use.
Configure
In the Options of the texstudio menu bar, select Configure TeXstudio →Build →Default Compiler to use XeLaTeX. For other editors, you also need to configure the connection to the back-end compiler. Please search for online tutorials based on specific tools.
Test Create a new file in texstudio and enter the following text. \documentclass[UTF8]{ctexart} \title{deepin install LaTeX} \author{sinan} \date{\today} \CTEXsetup[format={\zihao{-3}\raggedright\bfseries}]{section} \begin{document} \maketitle \noindent \section{Introduction to LaTeX} LaTeX is a typesetting language and a good tool for writing papers and books. \end{document} Then press F5 to compile and view the result.
LaTeX tables Create a new file in texstudio and enter the following text. \documentclass[UTF8]{ctexart} \begin{document} \begin{tabular}{ccc} \hline Name & Student ID & Gender\ \hline Steve Jobs& 001& Male\ Bill Gates& 002& Female\ \hline \end{tabular} \end{document}
LaTeX formulas Create a new file in texstudio and enter the following text. \documentclass{article} \usepackage{ctex} \begin{document} Formula example \begin{equation} f(x) = \sum_{i=1}^{n} {x_i} \end{equation} \end{document}
Export to PDF In the Files in the texstudio menu bar, select Save As to export as a PDF document.
Tip: No need to install CTEX (LaTeX Tools Integration Package), this package is out of maintenance