Install LaTeX in Ubuntu Linux

This guide explains how to install LaTeX in Ubuntu Linux. LaTeX is a document preparation system for high-quality typesetting. It is most often used for medium-to-large technical or scientific documents but it can be used for almost any form of publishing.

LaTeX is not a word processor! Instead, LaTeX encourages authors not to worry too much about the appearance of their documents but to concentrate on getting the right content.

Installing LaTeX is also compatible to any hosting, Just make sure that the hosting you have is a reliable one.

How to install LaTeX in Ubuntu

In Ubuntu Linux, you have to first install LaTeX to use it. This is how LaTeX is installed in Ubuntu.

$ sudo apt-get install texlive

The above command will install a basic subset of TeX Live’s functionality. To install all the packages in the LaTeX distribution, you have to run the following command.

$ sudo apt-get install texlive-full

Gedit LaTeX Plugin

Gedit has a plugin for LaTeX which converts Gedit into a LaTeX editor. You can install the Gedit LaTeX plugin as follows :

$ sudo apt-get install gedit-latex-plugin

Once you install the plug-in, you will have to enable the plug-in in Gedit to begin using it. This is achieved by opening Gedit Preferences (GEdit > Edit > Preferences). Then clicking on the Plugins tab and turning on the “Gedit LaTeX plugin”. Now when ever you open a TeX file, you will have access to the LaTeX menu in Gedit.

Recommended LaTeX Packages

  • latex-beamer – Beamer package is used to create presentations. It is an excellent LaTeX class that supports dynamic effects.
  • TeXPower – Is a bundle of style and class files for creating dynamic online presentations with LaTeX.
  • Prosper – A LaTeX class for writing transparencies.
  • texlive-pictures – This is a LaTeX package for drawing graphics. It contain several classes such as ‘curve’ (for creating resumes), ‘bardiag’ (for bar graphs), ‘pmgraph’ (poor man’s graphics) and so on.
  • texlive-latex-extra – This is a large collection of addon packages for LaTeX. The full list of classes in this package are listed here.

This is the full command I used to install LaTeX on my machine running Ubuntu Linux.

$ sudo apt-get install gedit-latex-plugin texlive-fonts-recommended latex-beamer texpower texlive-pictures texlive-latex-extra texpower-examples imagemagick

### 如何在 Ubuntu 上配置 VSCode 进行 LaTeX 开发 #### 安装必要的软件包 为了使 VSCode 能够支持 LaTeX 编辑,在 Ubuntu 中需要先安装 TeX Live 发行版。可以通过终端执行以下命令完成安装: ```bash sudo apt-get update sudo apt-get install texlive-full ``` 这会安装完整的 TeX Live 环境,包括编译所需的工具链。 #### 安装 Visual Studio Code 接着需获取并安装最新版本的 Visual Studio Code (VSCode),具体操作如下所示[^3]: 1. 访问官方网址下载适用于 Linux 的 .deb 文件; 2. 使用 `dpkg` 或者图形化软件中心来进行安装; 或者直接利用命令行方式快速部署: ```bash curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list' sudo apt-get update sudo apt-get install code ``` #### 安装扩展插件 启动 VSCode 后,前往 Extensions 商店搜索名为 “LaTeX Workshop”的插件,并点击 Install 来添加它。此插件提供了丰富的特性集用于辅助 LaTeX 文档创建过程中的各项任务,例如语法高亮显示、自动补全建议等功能[^2]。 #### 配置 JSON 设置 对于大多数用户而言,默认设置已经足够良好工作。不过如果希望进一步优化体验,则可以在 `.vscode/settings.json` 文件内加入自定义参数调整行为模式。下面给出一段常见的个性化设定实例: ```json { "latex-workshop.latex.toolchain": [ { "command": "pdflatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "%DOC%" ] }, { "command": "bibtex", "args": ["%DOCFILE%"] } ], "latex-workshop.view.pdf.viewer": "tab" } ``` 上述片段指定了 PDF 输出的具体处理流程以及预览窗口的位置安排等细节事项[^1]。 通过以上几个简单的步骤就可以成功搭建起基于 Ubuntu 平台运行的高效 LaTeX 编辑环境啦!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值