当前位置:网站首页>Latex configuration and use
Latex configuration and use
2022-04-23 06:39:00 【mightbxg】
1. Install package
Software package needed (archlinux/manjaro):
texlive-core # Tex Live Core distribution
texlive-bin # Tex Live Applications
texlive-langchinese # Chinese support
texlive-latexextra # multirow Support
texlive-science # algorithm、algorithmic Support
Installation command :
sudo pacman -S texlive-core texlive-bin texlive-langchinese texlive-latexextra texlive-science
2. LaTex Tips
Typesetting tools
LaTex There are many typesetting tools (pdfTeX, pdfLaTeX, XeTeX, XeLaTeX etc. ), Write documents in pure English abroad pdfLaTex A little more , We write in mixed Chinese and English. We suggest using XeLaTex.
How to insert pictures
Introduction area
\usepackage{graphicx, subfig}
Text area
% [ht] means Here&Top, use {figure*} instead if multirow
\begin{figure}[ht]
\centering
\includegraphics[width=2.5in]{my_awesome_picture.png}
\caption{The figure caption}
\label{fig_my_picture}
\end{figure}
How to insert SVG Vectorgraph
First you have to install inkscape package , And make sure it's in the environment variable , Execute... In the terminal inkscape -V
To check if it's available .
Introduction area
\usepackage{svg}
\svgsetup{inkscapelatex=false} % keep original font and size
Text area
\begin{figure}[ht]
\centering
\includesvg[width=5cm]{my_awesome_graph.svg}
\caption{The figure caption}
\label{fig_my_graph}
\end{figure}
in addition , Must be enabled at compile time shell escape (write18), That is, add... When executing the compilation command -shell-escape
Options .
See :
Other practical materials
- A better entry material : A short one LaTeX Introduction to the document
- Paper template :latex paper template ( source )
- How to insert pseudo code
- How to arrange multiple pictures
3. Editor
Tex Live The provided editor is Texworks, This itself is already very useful , And more people use it . But I recently found vscode With the help of LaTeX Workshop Plug ins are better for writing documents , For example, it supports :
- Automatic compilation : When saving documents , It can compile automatically pdf And update the preview interface
- Input Association : Input macro package 、 command 、 Even resource file names ( For example, when inserting pictures ) when , Can automatically associate
- log analysis : Compile time error and warning Will be automatically parsed and prompted in vscode The specific location in the editor
- Quick preview : Inserted formula 、 Pictures can be quickly previewed in the editor ( When pointed by the mouse pointer )
To support Chinese and svg Vectorgraph , You need to simply configure the plug-in . stay vscode Install in LaTeX Workshop After the plug-in , Enter the plug-in setting interface , find Latex-workshop > Latex:Tools
To configure , Click on Edit in settings.json, And then in settings.json Chinese vs latex-workshop.latex.tools
The first item in the list ( namely name Field is latexmk Project ) Of args
Make the following changes :
- Join in
-shell-escape
Parameters , That is, vector graphics support - take
-pdf
The parameter is changed to-xelatex
, That is to use XeLaTeX Typesetting tools
The modified latexmk Configure to :
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-shell-escape",
"-interaction=nonstopmode",
"-file-line-error",
"-xelatex",
"-outdir=%OUTDIR%",
"%DOC%"
],
"env": {
}
}
版权声明
本文为[mightbxg]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230546583292.html
边栏推荐
猜你喜欢
Dynamic creation and release, assignment and replication of objects
解决ArcGIS分区统计显示太多唯一值执行失败
Graduation project, viewing screenshots of epidemic psychological counseling system
【UDS统一诊断服务】四、诊断典型服务(2)— 数据传输功能单元
MySQL groups are sorted by a field, and the first value is taken
ArcGIS表转EXCEL超出上限转换失败
Robocode教程5——Enemy类
定位器
【UDS统一诊断服务】三、应用层协议(1)
搭建jpress个人博客
随机推荐
【UDS统一诊断服务】(补充)五、ECU bootloader开发要点详解 (1)
如何安装jsonpath包
Rust 中的 RefCell
日志写法(带时间)
数组旋转
LaTeX配置与使用
【UDS统一诊断服务】一、诊断概述(3)— ISO 15765体系结构
[ThreadX] h743zi + lan8720 + ThreadX + netx duo transplantation
C语言输入和输出(printf和scanf函数、putchar和getchar函数)
Excel打开超大csv格式数据
基于QQwebAPI 查询昵称和头像的爬虫
爬取手游网站游戏详情和评论(MQ+多线程)
大学概率论与数理统计知识点详细整理
识别验证码
Protection of shared data
Robocode教程4——Robocode的游戏物理
对象数组与对象指针
OpenCV使用 GenericIndex 进行 KNN 搜索
Wechat applet request encapsulation
【UDS统一诊断服务】一、诊断概述(4)— 基本概念和术语