ubuntu18.04 安装LaTex

1. 选择安装LaTeX发行版

LaTeX有很多发型版,TeX Live就是其中一种。TeX Live 是 TUG (TeX User Group) 维护和发布的 TeX 系统,可说是「官方」的 TeX 系统。TeX Live可以保持在跨操作系统平台、跨用户的一致性。而且TeX Live在Ubuntu18.04上的安装也比较方便。

sudo apt-get install texlive-full

2. 安装XeLaTeX编译引擎

sudo apt-get install texlive-xetex

3. 安装中文支持包

安装的是xeCJK, 较为成熟的一种中文支持包。

sudo apt-get install texlive-lang-chinese

4. 安装图像化界面

图形化界面有TeXworks,TeXmaker和TeXstudio等,很多在Ubuntu终端都可以直接安装,这里安装了TeXstudio。

sudo apt-get install texstudio

5. 示例

\documentclass{article}
\usepackage[ruled]{algorithm2e}
 
\begin{document}
\begin{algorithm}[H]
\caption{How to write algorithms}
\KwIn{this text}
\KwOut{how to write algorithm with \LaTeX2e }
initialization\;
\While{not at end of this document}{
    read current\;
    \eIf{understand}{
        go to next section\;
        current section becomes this one\;
    }{
        go back to the beginning of current section\;
    }
}
\end{algorithm}
\end{document}

效果展示:


效果展示
软件界面

参考博文

在 Ubuntu 上安装 LaTeX
Ubuntu18.04安装LaTeX并配置中文环境
Ubuntu下安装latex

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容