1 安装 TexLive
1.1 方法1:比较慢,推荐下面的方法2
cd /tmp
wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
zcat < install-tl-unx.tar.gz | tar xf -
下面的*
为自己解压后的文件名,可以只输入install-tl-
,然后按Tab
键自动补全,如下图我的是install-tl-20240407
cd install-tl-*
成功进入文件夹后执行:
sudo perl ./install-tl --no-interaction
然后就会开始漫长的安装,大约需要1个小时左右。安装完成后添加环境路径即可:
gedit ~/.bashrc
在打开的.bashrc
文件最后加入(注意修改为自己的路径,安装完后会有提示):
# TexLive
export TexMan="/usr/local/texlive/2024/texmf-dist/doc/man"
export TexInfo="/usr/local/texlive/2024/texmf-dist/doc/info"
export TexLive="/usr/local/texlive/2024/bin/x86_64-linux"
export MANPATH="$MANPATH:$TexMan"
export INFOPATH="$INFOPATH:$TexInfo"
export PATH="$PATH:$TexLive"
至此TexLive
就已经安装并配置完成。
1.2 方法2
下载TexLive镜像:TexLive
选择texlive2024.iso
下载:
下载完成后,进入文件所在目录执行:
sudo mount -o loop texlive2024.iso /mnt && cd /mnt
sudo ./install-tl
安装完成后同方法一
添加环境变量:
gedit ~/.bashrc
在打开的.bashrc
文件最后加入(注意修改为自己的路径,默认安装在/usr/local/texlive/2024
):
# TexLive
export TexMan="/usr/local/texlive/2024/texmf-dist/doc/man"
export TexInfo="/usr/local/texlive/2024/texmf-dist/doc/info"
export TexLive="/usr/local/texlive/2024/bin/x86_64-linux"
export MANPATH="$MANPATH:$TexMan"
export INFOPATH="$INFOPATH:$TexInfo"
export PATH="$PATH:$TexLive"
至此TexLive
就已经安装并配置完成。
2 安装 TeXstudio
sudo apt update
sudo apt install texstudio
3 配置 TeXstudio
打开TeXstudio
,然后依次点击Options
>>Configure TeXstudio
>>Commands
:
找到上图这四个LaTex
,PdfLaTex
,XeLaTex
,LuaLaTex
,点击后边的选择文件
(箭头所指)按钮,然后修改为对应的安装目录。
如Latex
对应目录修改为/usr/local/texlive/2024/bin/x86_64-linux/latex
;
PdfLaTex
修改为/usr/local/texlive/2024/bin/x86_64-linux/PdfLatex
;
XeLaTex
和LuaLaTex
以此类推,路径都与上面相同,全部修改完成后点击OK
即可。
至此,TeXstudio的环境配置已全部完成。
4 测试
新建一个.tex
文件,输入:
\special{dvipdfmx:config z 0}
\documentclass{article}
\usepackage[a4paper,left=2.5cm,right=2.5cm,top=3cm,bottom=3cm,bindingoffset=0cm]{geometry}
\usepackage{amsthm,amsmath,amssymb,amsfonts,mathrsfs,graphicx,pifont,xcolor,color}
\begin{document}
\thispagestyle{empty}
\setlength\parindent{0pt}
\Huge
{\centering\textbf{Review comments}}\\
\Large
\qquad This paper studies the improvement of the detection model for dense and small defects in photovoltaic panels in the field of target detection, and proposes an improved detection model, YoloV7-GX, which introduces GSConv, GAM, XIOU, etc., effectively preserving the feature information of the elevated defect on the panels after multiple layers of convolutional networks, thereby improving the robustness and detection efficiency of the model.
\end{document}
结果: