诚城的成长 诚城的成长
首页
  • 高数基础
  • 数一

    • 高等数学
    • 线性代数
    • 概率论与数理统计
  • 820

    • 数据结构
    • 计算机操作系统
  • 英一

    • 单词
    • 语法
    • 阅读理解
    • 作文
  • 政治

    • 马克思主义基本原理
    • 毛泽东
    • 近代史
    • 思修
    • 时事
  • openpose
  • html5
  • css3
  • UI

    • Tailwind Css
    • Element-Plus
    • UniApp
  • 框架

    • Vue3
  • 拓展包

    • 包管理工具
    • 包开发
  • 开发语言

    • C语言
    • PHP
    • Phyton
  • 框架

    • Laravel
  • 会计

    • 初级经济法基础
    • 初级会计实务
  • 软考

    • 信息系统项目管理师
  • 博客

    • vitepress
    • vuepress
  • manim
  • git
  • vsCode
  • latex
  • docker
  • axios
  • vim
  • mac
  • Jetbrains

    • phpstorm
    • clion
突发奇想
GitHub (opens new window)

诚城

我有N个梦想……
首页
  • 高数基础
  • 数一

    • 高等数学
    • 线性代数
    • 概率论与数理统计
  • 820

    • 数据结构
    • 计算机操作系统
  • 英一

    • 单词
    • 语法
    • 阅读理解
    • 作文
  • 政治

    • 马克思主义基本原理
    • 毛泽东
    • 近代史
    • 思修
    • 时事
  • openpose
  • html5
  • css3
  • UI

    • Tailwind Css
    • Element-Plus
    • UniApp
  • 框架

    • Vue3
  • 拓展包

    • 包管理工具
    • 包开发
  • 开发语言

    • C语言
    • PHP
    • Phyton
  • 框架

    • Laravel
  • 会计

    • 初级经济法基础
    • 初级会计实务
  • 软考

    • 信息系统项目管理师
  • 博客

    • vitepress
    • vuepress
  • manim
  • git
  • vsCode
  • latex
  • docker
  • axios
  • vim
  • mac
  • Jetbrains

    • phpstorm
    • clion
突发奇想
GitHub (opens new window)
  • git
  • vscode
  • Jetbrains

  • latex

    • introduction
      • 安装
        • win10
        • mac
      • 编辑器
        • vscode
        • 错误处理
      • 常用字符表
      • 常用公式
        • 一元二次方程
        • 方程组
      • 矩阵
      • 其他
    • 语法
    • 输出SVG
    • Latex常用
    • tikz
    • pdfplts
  • manim
  • markdown
  • axios
  • mysql
  • Regular Expression
  • Postman
  • mac
  • docker
  • nvm
  • vim
  • 工具
  • latex
诚城
2022-01-03
目录

introduction原创

用于生成复杂表格和数学公式以及各类图形的排版。

# 安装

# win10

Tex Live 官方下载 (opens new window)
Tex Live 官方iso下载 (opens new window)

ISO下载完成后直接解压,运行其中的

TeXstudio 官方下载 (opens new window) 我用CSCODE
TeXstudio 官方下载 win (opens new window) 我用CSCODE

参考链接 (opens new window)

# mac

MacTeX (opens new window)下载安装包,5G左右。
brew install (opens new window)

brew install --cask mactex

警告

国内建议还是直接去官网下载安装吧,不然 brew 网络问题引起各种麻烦!!!

# 编辑器

# vscode

# 插件

  1. LaTeX Workshop

    使用 VSCode 写 LaTeX 的都会使用这个扩展,可以认为是必备。

    1. mac 配置
      ::: datails
      settings.json 添加下列配置

          "latex-workshop.latex.tools": [
      //latex 编译工具命令
        {
            "name": "xelatex",
            "command": "xelatex",// 程序在电脑中的位置  绝对路径
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "-no-pdf", // 不生成PDF
                "%DOCFILE%"
            ]
        }, 
        {
            "name": "pdflatex",
            "command": "pdflatex",// 程序在电脑中的位置  绝对路径
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "-output-format=dvi",
                "%DOCFILE%"
            ]
        },
        {
            "name": "bibtex",
            "command": "bibtex",// 程序在电脑中的位置  绝对路径
            "args": [
                "%DOCFILE%"
            ]
        },
        // 使用  dvisvgm 生成 SVG
        {
            "name": "dvisvgm",
            "command": "dvisvgm",// 程序在电脑中的位置  绝对路径
            "args": [
                // "--synctex=1",
                "--zoom=1",
                "--exact",
                // "--font-format=woff",
                "%DOCFILE%.xdv"
            ]
        },
      

    ],
    // latex 编译方式 顺序
    "latex-workshop.latex.recipes": [
    // {
    // "name": "xelatex",
    // "tools": [
    // "xelatex"
    // ],
    // },
    // {
    // "name": "pdflatex",
    // "tools": [
    // "pdflatex",
    // ]
    // },
    // 使用 dvisvgm 将DVI转为 SVG
    {
    "name": "xdv->svg",
    "tools": [
    "xelatex",
    "pdflatex",
    "dvisvgm"
    ]
    },
    // {
    // "name": "xe->bib->xe->xe",
    // "tools": [
    // "xelatex",
    // "bibtex",
    // "xelatex",
    // "xelatex"
    // ]
    // },
    // {
    // "name": "pdf->bib->pdf->pdf",
    // "tools": [
    // "pdflatex",
    // "bibtex",
    // "pdflatex",
    // "pdflatex"
    // ]
    // },
    ],
    "bracketPairColorizer.depreciation-notice": false,
    "latex-workshop.view.pdf.viewer": "browser",
    "latex-workshop.view.svg.viewer": "browser",
    "latex-workshop.showContextMenu": true, // 添加右键菜单
    "explorer.confirmDelete": false,
    "workbench.startupEditor": "none",
    // "explorer.confirmDelete": false,
    // "latex-workshop.view.pdf.viewer": "external",

// "latex-workshop.view.pdf.external.viewer.command": "C:/.../SumatraPDF.exe",
// "latex-workshop.view.pdf.external.viewer.args": [
// "-forward-search",
// "%TEX%",
// "%LINE%",
// "-reuse-instance",
// "-inverse-search",
// ""C:/.../Microsoft VS Code/Code.exe" "C:/.../Microsoft VS Code/resources/app/out/cli.js" -gr "%f":"%l"",
// "%PDF%"
// ],

// "latex-workshop.view.pdf.external.synctex.command": "C:/.../SumatraPDF.exe",
// "latex-workshop.view.pdf.external.synctex.args": [
// "-forward-search",
// "%TEX%",
// "%LINE%",
// "-reuse-instance",
// "-inverse-search",
// ""C:/.../Microsoft VS Code/Code.exe" "C:/.../Microsoft VS Code/resources/app/out/cli.js" -gr "%f":"%l"",
// "%PDF%",
// ],
```
:::

  1. win 配置

    :::datails
    settings.json 添加下列配置。该配置为 使用 dvisvgm 将DVI转为 SVG 。

    // "latex-workshop.latex.autoBuild.run": "never",// 取消保存的时候自动编译
    // "latex-workshop.message.error.show": false, // 编译出错时弹窗取消
    // "latex-workshop.message.warning.show": false,// 编译警告时弹窗取消
     "latex-workshop.latex.tools": [
    //latex 编译工具命令
      {
          "name": "xelatex",
          "command": "C:/texlive/2021/bin/win32/xelatex.exe",// 程序在电脑中的位置  绝对路径
          "args": [
              "-synctex=1",
              "-interaction=nonstopmode",
              "-file-line-error",
              "-no-pdf", // 不生成PDF
              "%DOCFILE%"
          ]
      }, 
      {
          "name": "pdflatex",
          "command": "C:/texlive/2021/bin/win32/pdflatex.exe",// 程序在电脑中的位置  绝对路径
          "args": [
              "-synctex=1",
              "-interaction=nonstopmode",
              "-file-line-error",
              "-output-format=dvi",// 生成 dvi文件
              "%DOCFILE%"
          ]
      },
      {
          "name": "bibtex",
          "command": "C:/texlive/2021/bin/win32/bibtex.exe",// 程序在电脑中的位置  绝对路径
          "args": [
              "%DOCFILE%"
          ]
      },
      // 使用  dvisvgm 生成 SVG
      {
          "name": "dvisvgm",
          "command": "C:/texlive/2021/bin/win32/dvisvgm.exe",// 程序在电脑中的位置  绝对路径
          "args": [
              // "--synctex=1",
              "--zoom=1",
              "--exact",
              // "--font-format=woff",
              "%DOCFILE%.xdv"
          ]
      },
    
    
],
  // latex 编译方式  顺序 
  "latex-workshop.latex.recipes": [
     // {
     //     "name": "xelatex",
     //     "tools": [
     //         "xelatex"
     //     ],
     // },
     // {
     //     "name": "pdflatex",
     //     "tools": [
     //         "pdflatex",
     //     ]
     // },
     // 使用 dvisvgm 将DVI转为 SVG
     {
        "name": "xdv->svg",
        "tools": [
           "xelatex",
           "pdflatex",
           "dvisvgm"
        ]
     },
     // {
     //     "name": "xe->bib->xe->xe",
     //     "tools": [
     //         "xelatex",
     //         "bibtex",
     //         "xelatex",
     //         "xelatex"
     //     ]
     // },
     // {
     //     "name": "pdf->bib->pdf->pdf",
     //     "tools": [
     //         "pdflatex",
     //         "bibtex",
     //         "pdflatex",
     //         "pdflatex"
     //     ]
     // },
  ],
  "bracketPairColorizer.depreciation-notice": false,
  "latex-workshop.view.pdf.viewer": "browser", // 使用浏览器浏览 PDF文件
  "latex-workshop.view.svg.viewer": "browser", // 使用浏览器浏览 PDF文件
  // "explorer.confirmDelete": false,
  //     "latex-workshop.view.pdf.viewer": "external",

  //     "latex-workshop.view.pdf.external.viewer.command": "C:/.../SumatraPDF.exe",
  //     "latex-workshop.view.pdf.external.viewer.args": [
  //         "-forward-search",
  //         "%TEX%",
  //         "%LINE%",
  //         "-reuse-instance",
  //         "-inverse-search",
  //         "\"C:/.../Microsoft VS Code/Code.exe\" \"C:/.../Microsoft VS Code/resources/app/out/cli.js\" -gr \"%f\":\"%l\"",
  //         "%PDF%"
  //     ],

  //     "latex-workshop.view.pdf.external.synctex.command": "C:/.../SumatraPDF.exe",
  //     "latex-workshop.view.pdf.external.synctex.args": [
  //         "-forward-search",
  //         "%TEX%",
  //         "%LINE%",
  //         "-reuse-instance",
  //         "-inverse-search",
  //         "\"C:/.../Microsoft VS Code/Code.exe\" \"C:/.../Microsoft VS Code/resources/app/out/cli.js\" -gr \"%f\":\"%l\"",
  //         "%PDF%",
  //     ],
  ```
  :::
  1. LaTeX Utilities

    1. 字数统计

    2. 片段补全

    3. 格式化的粘贴

    4. Unicode 字符 LaTeX 字符(如 "is this...a test" ``is this\ldots a test'')

      1. 粘贴表格单元格 表式

      2. 粘贴图片,可定制模板

      3. 粘贴CSV/图片的位置,使其包含在其中。

    5. TikZ 预览

  2. s

# LaTeX language support

# LaTeX Workshop

# 错误处理

# MAC

  • ! LaTeX Error: File `standalone.cls' not found.
    s
  • sear

# 常用字符表

语法 Display 语法 Display 语法 Display 语法 Display
\times \div \pm \mp
\otimes \ominus \oplus \odot
\oslash \triangleq \ne \equiv
\lt \gt \le \ge
\cup \cap \Cup \Cap
\bigcup \bigcap \ast \star
\bigotimes \bigoplus \circ \bullet
\bigcirc \amalg \to \infty
\vee \wedge \lhd \rhd
\bigvee \bigwedge \unlhd \unrhd
\sqcap \sqcup \prec \succ
\subset \supset \sim \approx
\subseteq \supseteq \cong \doteq
\setminus \mid \ll \gg
\parallel \Join \in \notin
\propto \neg \ldots $ldots$ \cdots
\forall \exists \vdots \ddots
\aleph \nabla \imath \jmath
\ell \partial \int \oint
\uplus \biguplus

# 常用公式

# 一元二次方程

  • 公式

  • 解

    $$x={\frac{-b \pm \sqrt{b^2-4ac}}{2a}} \qquad\qquad\qquad x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$
    

# 方程组

  • 左花括号

    $$f(x) =\begin{equation}
    % \begin{equation*} 加'*'去掉公式编号
    \left\{
    \begin{aligned}     %请使用'aligned'或'align*'
    2x + y &= 1  \\     %加'&'指定对齐位置
    2x + 2y &= 2
    \end{aligned}
    \right.
    \end{equation}
    % \end{equation*}   加'*'去掉公式编号$$
    

    显示如下:

  • 分情况讨论

    ```
    $$f(x) =
    \begin{cases} % cases 用于分段函数
    x^2 \qquad & a \gt 0 \\
    e^x \qquad & a \le 0
    \end{cases}
    $$
    ```
    
    显示如下:
    $$f(x) =
    \begin{cases}
    x^2 \qquad & a \gt 0 \\
    e^x \qquad & a \le 0
    \end{cases}
    $$
    

# 矩阵

  • 无符号

    ```
    $$
    \begin{array}{ccc}
    x_1 & x_2 &\dots\\
    x_3 & x_4 &\dots\\
    \vdots&\vdots&\ddots
    \end{array}
    $$
    ```
    
    显示如下:
    $$
    \begin{array}{ccc}
    x_1 & x_2 &\dots\\
    x_3 & x_4 &\dots\\
    \vdots&\vdots&\ddots
    \end{array}
    $$
    
  • 有符号

    小括号
    
    ```
    $$
    \begin{pmatrix} 
    a & b\\ 
    c & d \\
    \end{pmatrix}
    $$
    ```
    

显示如下
$$
\begin{pmatrix}
a & b\
c & d \
\end{pmatrix}
$$
---

  中括号

  ```
  $$
  \begin{pmatrix} 
  a & b\\ 
  c & d \\
  \end{pmatrix}
  $$
  ```

显示如下
$$
\begin{pmatrix}
a & b\
c & d \
\end{pmatrix}
$$
---

  花括号

  ```
  $$
  \begin{Bmatrix} 
  a & b\\ 
  c & d \\
  \end{Bmatrix}
  $$
  ```

显示如下
$$
\begin{Bmatrix}
a & b\
c & d \
\end{Bmatrix}
$$
---

  单竖线

  ```
  $$
  \begin{vmatrix} 
  a & b\\ 
  c & d \\
  \end{vmatrix}
  $$
  ```

显示如下
$$
\begin{vmatrix}
a & b\
c & d \
\end{vmatrix}
$$
---

  双竖线

  ```
  $$
  \begin{Vmatrix} 
  a & b\\ 
  c & d \\
  \end{Vmatrix}
  $$
  ```

  显示如下:
  $$
  \begin{Vmatrix}
  a & b\\
  c & d \\
  \end{Vmatrix}
  $$
  • s

# 其他

语法 显示 语法 显示
\triangleleft \triangleleft
\bigtriangleup \bigtriangledown
\uparrow \downarrow
\Uparrow \Downarrow
\leftarrow \rightarrow
\Leftarrow \Rightarrow
\longleftarrow \longrightarrow
\Longleftarrow \Longrightarrow
\leftrightarrow \Leftrightarrow
\Longleftrightarrow \Longleftrightarrow
\leftharpoonup \leftharpoonup
\leftharpoondown \rightharpoondown
\rightleftharpoons \sum
\nwarrow \nearrow
\swarrow \searrow
\triangle \box
\diamond \diamondsuit
\heartsuit \heartsuit
\spadesuit
\overline{} \underline{}
\tilde{} \widetilde{}
\hat{} \widehat{}
\overleftarrow{} \overrightarrow{}
\vec{} \bar{}
#工具#latex
上次更新: 2022/09/12, 23:05:31
phpstorm
语法

← phpstorm 语法→

Theme by Vdoing | Copyright © 2022-2022 carveybunt | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式
×
×

特别申明:

本站所有内容均为个人理解或转载,如有不当之处,敬请大佬指导!