• 02 LaTex之小tips


    1.运行

     2.头+尾

    1. \documentclass[11pt]{article}
    2. \usepackage{algorithm, algpseudocode}
    3. \usepackage{amsmath,amssymb,amsthm}
    4. \usepackage{mathrsfs}% huaxie zimu
    5. \textwidth 16cm\textheight 22cm\oddsidemargin=0cm\evensidemargin=\oddsidemargin
    6. \usepackage{undertilde} %for the subsolution i.e., $\utilde{u}$
    7. \usepackage{subfig}
    8. \usepackage{color} %for the color,
    9. \usepackage{graphicx}
    10. \setlength{\textwidth}{6.2in} \setlength{\textheight}{8.7in}
    11. \setlength{\oddsidemargin}{0.25in}
    12. \setlength{\evensidemargin}{.25in} \setlength{\topmargin}{0pt}
    13. \setlength{\baselineskip}{20pt} \vspace{0.6cm}
    14. \renewcommand{\baselinestretch}{1.2}
    15. \renewcommand{\thefootnote}{\fnsymbol{\footnote}}
    16. \renewcommand{\figurename}{Fig.}
    17. \newtheorem{lemma}{Lemma}[section]
    18. \newtheorem{Defi}{Definition}[section]
    19. \newtheorem{them}[lemma]{Theorem}
    20. \newtheorem{lm}[lemma]{Lemma}
    21. \newtheorem{coro}[lemma]{Corollary}
    22. \newtheorem{Algm}{Algorithm}
    23. \newtheorem{rem}{Remark}
    24. \newtheorem{cor}{Corollary}
    25. \newtheorem{Con}{Conjecture}
    26. \newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}
    27. \begin{document}
    28. \end{document}

    3.tips 

    3.1公式

    3.1.1 行内公式+行间公式

     

    //行间公式另起一行 

    3.1.2 各种符号

    (11条消息) CTEX 各种命令、符号_woniuxyy的博客-CSDN博客

    3.1.3 矩阵 

    https://www.cnblogs.com/solvit/p/11345482.html

    如何用latex编写矩阵(包括各类复杂、大型矩阵)? - 知乎 (zhihu.com)

    3.2 部分操作表示

    \qquad空格

    \noindent 用于段落不缩进

    3.2.1 标注

    • 粗体:\textbf{粗体内容}
    • 斜体:\textit{斜体内容}
    • 下划线:\underline{下划线内容}
    • 强调斜体:\emph{强调斜体的内容},在都是斜体字的状态下,可以恢复原字体。

    4.参考文献

    1. \begin{thebibliography}{22}
    2. \end{thebibliography}

    ​​​​(11条消息) LaTeX基本命令使用说明书-小白版_MLgreenhand的博客-CSDN博客

    3.3 插入图片 

    \begin{figure}[h]%插入图片
    \centering%图片居中显示
    \includegraphics[scale=0.7]{pmjt.png}%花括号内为图片相对路径
    \caption{Caption of this picture.}%图片标题
    \label{fig0}%图片label,便于文中引用
    \end{figure}

    代码说明:

    \usepackage{graphicx} 为插入图片所需引入的宏包;

    [htbp] 为调整图片排版位置选项,说明如下:

    [h]当前位置。将图形放置在正文文本中给出该图形环境的地方。如果本页所剩的页面不够,这一参数将不起作用。
    [t]顶部。将图形放置在页面的顶部。
    [b]底部。将图形放置在页面的底部。
    [p]浮动页。将图形放置在一只允许有浮动对象的页面上。

    上一条中,图片位置为latex自动排版,如若我们一定要指定图片在当前位置,仅使用 [h] 命令是达不到效果的,此时方法如下:
    a) 引入float宏包;
    b) 将\begin{figure}[htbp]改为\begin{figure}[H],注意是大写的H。

    \centering 为图片居中命令;

    \includegraphics{1.eps} 用于插入图片,可用 ‘’[ ]’’ 添加图片尺寸,例如\includegraphics[width=9.5cm,height=8cm]{1.eps};花括号中为图片相对路径,通常应将图片放在与latex文档相同的路径下,图片格式采用.eps矢量格式会更清晰;

    \caption命令用于插入图注,其应用在\includegraphics的下方即将图注插在图片下方,反之亦然。

    (11条消息) LaTeX基本命令使用说明书-小白版_MLgreenhand的博客-CSDN博客

    1.插入一张图片

     2.插入多张,子图形式

    1. \begin{figure}[h]
    2. \centering %图片居中排列
    3. \subfloat[]{%前面中括号里面的a是子图标题
    4. \begin{minipage}[h]{0.3\textwidth}%每个图形大小
    5. \centering
    6. \includegraphics[width=3cm,height=2.5cm]{pmjt.png}%插入图片,括号里面是图片路径
    7. \end{minipage}
    8. }
    9. \subfloat[]{
    10. \begin{minipage}[h]{0.3\textwidth}
    11. \centering
    12. \includegraphics[width=3cm,height=2.5cm]{pmjt.png}
    13. \end{minipage}
    14. }
    15. \subfloat[]{
    16. \begin{minipage}[h]{0.3\textwidth}
    17. \centering
    18. \includegraphics[width=3cm,height=2.5cm]{pmjt.png}
    19. \end{minipage}
    20. }
    21. \end{figure}

    3.4 插入公式

    1. \begin{equation}
    2. a+b=1, \\a=c=2.
    3. \end{equation}
    4. \begin{equation}
    5. a+b=1, \\a=d=2.
    6. \end{equation}
    7. \begin{equation*}
    8. a+b=1, \\a=c=2.
    9. \end{equation*}
    10. \begin{equation}
    11. a+b=1, \\a=c=2.
    12. \end{equation}

     3.5 定义&定理&引用

    1. \begin{them}\label{Basic1}
    2. savage is a good song
    3. \end{them}
    4. we need to prove the prove of ~\ref{Basic1}
    5. \begin{lemma}\label{Basic3}
    6. savage is a new song
    7. \end{lemma}
    8. we need to prove the prove of ~\ref{Basic3}
    9. \begin{proof}\label{Basic3}
    10. savage is a new song
    11. \end{proof}
    12. \newtheorem{definition}{Definition}
    13. \begin{definition}
    14. come back
    15. \end{definition}

  • 相关阅读:
    K8S部署相关
    C语言 2 —— 常量
    【生日快乐】SpringBoot SpringBoot 提高篇(第二篇) 第5章 SpringBoot 日志 5.3 SpringBoot 的日志使用
    部署k8s dashboard(这里使用Kubepi)
    Leetcode 2327. 知道秘密的人数(思路很棒)
    新人学习笔记之(初识C语言)
    WSO2 API Manager代码问题漏洞(CVE-2022-29464)
    单商户商城系统功能拆解36—分销应用—分销商
    Spring源码解析(十二):TransactionInterceptor事务拦截器
    PyTorch中的CUDA操作
  • 原文地址:https://blog.csdn.net/m0_47017197/article/details/127958948