zoukankan      html  css  js  c++  java
  • LaTex

    LaTex 编译器 (下载 TexLive 会自动安装)

    Tex

      

    LaTex

    命令行

    查看版本

    latex -v

    编译 .tex 后缀的文件, 输出的文件为 .dvi 后缀的

    latex file.tex

    .dvi 转为 .pdf 文件

    dvipdfmx file.dvi

    XeLaTex (推荐)

    命令行

    查看版本

    xelatex -v

    编译 .tex 为 .pdf 文件(无需生成中间 .dvi 文件)

    xelatex file.tex

    特性

    • 支持 UTF-8 编码 (要想使用中文,需要导入 ctex 宏包并且源文件使用 UTF-8 编码)

    TexStudio (LaTex IDE)

    • Preference -> Build -> Default Compiler 修改为 XeLaTex (因为支持中文且可以直接生成 PDF 文件)

    LaTex 源文件结构

    导言区(文档元属性设置)

    命令

    功能

    额外说明

    documentclass{article}

    文档类型

    还有 article, book, report, letter

    itle{标题}

    文档标题

      

    author{作者名}

    文档作者

      

    正文区(只能有一个)

    命令

    功能

    额外说明

    egin{document} content… end{document}

    声明正文区

      

    maketitle

    将导言区设置的 title 输出

      

    LaTex 字体

    属性

    字体编码

    • 正文字体编码
    • 数学字体编码

    字体族

    • 罗马字体
    • 无衬线字体
    • 打印机字体

    字体系列

    • 粗细
    • 宽度

    字体形状

    • 直立
    • 斜体
    • 伪斜体
    • 小型大写

    字体大小

      

    属性设置

    属性

    命令

    说明

    字体族

    extrm{Roman Family}, 接着在下文使用 mfamily + 文本 使用字体, 可以使用 { mfamily + 文本} 进行字体的局部使用

    rm 表示 Roman, 还有 extsf{Sans Serif Family}, exttt{Typewritter Family} 这些命令和参数都是固定的

    字体系列

    extmd{Medium Series} 中等, 在下文使用 mdseries + 文字 应用到指定的文字

    extbf{Boldface Series} 加粗, 使用 fseries + 文本 应用

    字体形状

    • upshape + 文字
    • itshape + 文字: 斜体
    • slshape + 文字: Slanted Shape
    • scshape + 文字: Small Caps Shape

      

    字体大小

    • iny
    • scriptsize
    • footnotesize
    • small
    • ormalsize
    • large
    • Large
    • LARGE
    • huge
    • Huge

      

    LaTex 的插图

    • 使用 usepackage {graphicx} 宏包
    • graphicspath {{figures/}, {pics/}} 指定查找路径
    • 使用 includegraphics 插入图像
  • 相关阅读:
    JS中的call()和apply()方法和bind()
    reactjs入门到实战(十)----one-first_app
    49-Reverse Linked List II
    48-Merge Sorted Array
    47-Generate Parentheses
    46.Valid Parentheses
    45-Letter Combinations of a Phone Number
    44-Count and Say
    43-Reverse Nodes in k-Group
    42-Remove Nth Node From End of List
  • 原文地址:https://www.cnblogs.com/megachen/p/12636352.html
Copyright © 2011-2022 走看看