Ubuntu16.04 Texlive TeXstudio Tikz 安装与环境配置

参考:

https://blog.csdn.net/williamyi96/article/details/90732304

下载地址:

texlive

https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/texlive.iso

texstudio

http://download.opensuse.org/repositories/home:/jsundermeyer/xUbuntu_16.04/amd64/texstudio_3.0.1-1+2.1_amd64.deb

https://github.com/texstudio-org/texstudio/releases/download/3.0.1/texstudio-3.0.1-x86_64.AppImage

Tikz

https://sourceforge.net/projects/pgf/files/pgf/version%203.1.1/pgf_3.1.1.tds.zip/download

http://mirrors.ctan.org/graphics/pgf/base.zip

xcolor

http://mirrors.ctan.org/macros/latex/contrib/xcolor.zip

everyshi

http://mirrors.ctan.org/macros/latex/contrib/ms.zip

pgfplots

https://www.ctan.org/pkg/pgfplots

http://mirrors.ctan.org/graphics/pgf/contrib/pgfplots.zip

Tikz样例集下载--Martin Thoma

https://www.latexstudio.net/archives/2276.html

http://pgfplots.net/和http://texample.net/

Ubuntu Texlive TeXstudio Tikz 安装与环境配置

https://blog.csdn.net/williamyi96/article/details/90732304
中文文档:

https://mirrors.ustc.edu.cn/CTAN/info/lshort/chinese/lshort-zh-cn.pdf
Latex 安装tikz(tikz.sty not found 引发的学习)

https://blog.csdn.net/myriad_dreamin/article/details/83384110
TeX系列: tikz & pgf 宏包安装步骤

https://blog.csdn.net/mathsoperator/article/details/6747170
在 Debian GNU Linux 中安装 TeXLive

https://www.bilibili.com/video/BV1vx411P7JM?from=search&seid=13827856952040857618
[LaTeX 绘图指南 - 001] TikZ 的简介、资源以及学习方法

https://www.latexstudio.net/archives/51577.html
Ubuntu中如何安装LaTeX宏包

https://blog.51cto.com/lavenliu/1537368
ubuntu 下安装 texlive 并设置 ctex 中文套装

https://blog.csdn.net/weixin_34390996/article/details/85621215
klatexformular输出tikz & pgfplots绘图

https://blog.csdn.net/ouening/article/details/102758849
pgf笔记1-简介、安装和问题

https://blog.csdn.net/hecssy/article/details/3201067

Texlive下载地址

https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/

https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/texlive.iso

http://www.latexstudio.net/

开始:

1.安装图形化用户界面

sudo apt-get install perl-tk

2.挂载 .iso 镜像文件

sudo mount -o loop texlive.iso /mnt

3.启动图形化安装配置

cd /mnt/

sudo ./install-tl -gui

4.卸载镜像文件

cd /; sudo umount /mnt

5.字体配置

sudo cp /usr/local/texlive/2020/texmf-var/fonts/conf/texlive-fontconfig.conf /etc/fonts/conf.d/09-texlive.conf
sudo fc-cache -fsv
6.添加环境变量
在 ~/.bashrc 和 ~/.profile 中均添加如下变量:

export MANPATH=${MANPATH}:/usr/local/texlive/2020/texmf-dist/doc/man
export INFOPATH=${INFOPATH}:/usr/local/texlive/2020/texmf-dist/doc/info
export PATH=${PATH}:/usr/local/texlive/2020/bin/x86_64-linux

export PATH=/usr/local/texlive/2020/bin/x86_64-linux:PATH export MANPATH=/usr/local/texlive/2020/texmf-dist/doc/man:MANPATH
export INFOPATH=/usr/local/texlive/2020/texmf-dist/doc/info:$INFOPATH

7.使添加变量立即生效

source ~/.bashrc

source ~/.profile

8.全局变量配置 /etc/manpath.config 下添加:

MANPATH_MAP /usr/local/texlive/2020/bin/x86_64-linux /usr/local/texlive/2020/texmf-dist/doc/man
9.测试latex是否成功:

/usr/local/texlive/2020/bin/x86_64-linux/tex --version

echo $PATH

source ~/.bashrc

echo $PATH

which latex

10.安装texstudio

texstudio_3.0.1-1+2.1_amd64.deb

sudo dpkg -i texstudio_3.0.1-1+2.1_amd64.deb

然后通过打开终端, ./texstudio

启动texstudio,否则在我这里会有一些问题,应该是因为latex默认在root用户路径下,访问权限问题

简单的测试

11.安装Tikz

解压下载的

base.zip

cd base

将文件夹中的tex重命名tikz

sudo cp -r tikz /usr/local/texlive/2020/texmf-dist/tex/latex/

sudo /usr/local/texlive/2020/bin/x86_64-linux/texhash

上面这一块操作,在texlive中不需要,默认安装了pgf,也就是tikz

/usr/local/texlive/2020/bin/x86_64-linux/tlmgr info pgf

ms.zip

cd ms

/usr/local/texlive/2020/bin/x86_64-linux/latex everysel.ins

sudo cp -r everysel.sty /usr/local/texlive/2020/texmf-dist/tex/latex/

sudo /usr/local/texlive/2020/bin/x86_64-linux/texhash

xcolor.zip

cd xcolor

/usr/local/texlive/2020/bin/x86_64-linux/latex xcolor/xcolor.ins

sudo cp -r ../xcolor/xcolor.sty /usr/local/texlive/2020/texmf-dist/tex/latex/

sudo /usr/local/texlive/2020/bin/x86_64-linux/texhash

pgfplots.zip

cd pgfplots

将文件夹中的tex重命名tikz

sudo cp -r pgfplots /usr/local/texlive/2020/texmf-dist/tex/latex/

sudo /usr/local/texlive/2020/bin/x86_64-linux/texhash

查看版本信息:

/usr/local/texlive/2020/bin/x86_64-linux/tlmgr info pgfplots

例子:

\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{amsmath}
\usepackage{xcolor}
\begin{document}
    \pgfplotscreateplotcyclelist{mylist}{%
        {yellow},
        {neongreen, densely dashed},
        {turquoise, dashed},
        {blue,densely dotted},
        {lila,dotted},
        {red,loosely dotted},
        {black}}
    \begin{tikzpicture}
        \begin{axis}
            \addplot3[
            surf,
            ]
            {exp(-x^2-y^2)*x};
        \end{axis}
    \end{tikzpicture}
\end{document}

————————————————
版权声明:本文为CSDN博主「知识在于分享」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/baidu_40840693/article/details/109565585

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 219,539评论 6 508
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 93,594评论 3 396
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 165,871评论 0 356
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,963评论 1 295
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,984评论 6 393
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,763评论 1 307
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,468评论 3 420
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,357评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,850评论 1 317
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 38,002评论 3 338
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 40,144评论 1 351
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,823评论 5 346
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,483评论 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 32,026评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 33,150评论 1 272
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,415评论 3 373
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 45,092评论 2 355

推荐阅读更多精彩内容