美文网首页
Latex常用

Latex常用

作者: 微雨旧时歌丶 | 来源:发表于2019-02-22 21:21 被阅读0次
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{listings} 
\usepackage{pythonhighlight}
\usepackage{xcolor}
  • 加图片
\begin{figure}[h]%%图
    \centering  %插入的图片居中表示
    \includegraphics[width=0.8\linewidth, trim=0 0 0 0,clip]{flowchart}  %插入的图,包括JPG,PNG,PDF,EPS等,放在源文件目录下
    \caption{Schematic diagram of query answering}  %图片的名称
    \label{fig:flow}   %标签,用作引用
\end{figure}
  • 双图片
\begin{figure*}[h]
    \centering
    \subfigure[Station numbers of different countries]{\includegraphics[width=0.48\textwidth]{barplot0221}}
    \subfigure[The ratios of the searched to the totals]{\includegraphics[width=0.48\textwidth]{barplot_ratio_0222}}
    \caption{Extraction results}
    \label{fig:results}
\end{figure*}

  • 列表
\begin{enumerate}
    \item 
    \item 
\end{enumerate}
  • 伪代码(算法)
\usepackage{algorithm}  
\usepackage{algorithmicx}  
\usepackage{algpseudocode}  
\usepackage{amsmath} 
\renewcommand{\algorithmicrequire}{\textbf{Input:}}  
\renewcommand{\algorithmicensure}{\textbf{Output:}}  
%使用
\begin{algorithm}  
    \caption{Explain semantics of notes}  
    \begin{algorithmic}[1] %每行显示行号  
        \Require {Text content of a footnote.}
        \Ensure  {An interpreted note.}
        \State {Divide note into sentences by detecting ";", "()" and ".".} 
        \For {\textbf{each} sentence}
            \State {Detect the \emph{"month" words}.} 
            \State {Explain the semantics after the last \emph{"month" word}.}
            \If {"-" is the previous word of the last \emph{"month" word}}
                \State {Construct the date interval.}
            \EndIf
            \If {\emph{qualifiers} before the first  \emph{"month" word}}
                \State {Explain the qualifier.}
            \EndIf  
            \If {\emph{signs for weekdays} before the first  \emph{"month" word}}
                \State {Explain the signs.}
            \EndIf      
        \EndFor  
        \State \Return{An interpreted note.}   
    \end{algorithmic}  
\end{algorithm}  
  • 代码段
\usepackage{listings}
\usepackage{xcolor}
\usepackage[colorlinks,linkcolor=blue]{hyperref}
\lstset{
    columns=fixed,       
    numbers=left,                                        % 在左侧显示行号
    numberstyle=\tiny\color{gray},                       % 设定行号格式
    frame=none,                                          % 不显示背景边框
    backgroundcolor=\color[RGB]{245,245,244},            % 设定背景颜色
    keywordstyle=\color[RGB]{40,40,255},                 % 设定关键字颜色
    numberstyle=\footnotesize\color{darkgray},           
    commentstyle=\it\color[RGB]{0,96,96},                % 设置代码注释的格式
    stringstyle=\rmfamily\slshape\color[RGB]{128,0,0},   % 设置字符串格式
    showstringspaces=false,                              % 不显示字符串中的空格
    language=python,                                        % 设置语言
}
%使用
\begin{lstlisting}
% 代码段
\end{lstlisting}

相关文章

  • latex 模板

    latex 常用模板

  • 2020-02-06

    Latex常用公式整理 目录 常用 常用数学公式 常用希腊字母 说明:博客园中的Latex编辑是以

  • Latex资料备忘

    常用数学符号的 LaTeX 表示方法

  • latex

    简介:这里写几个latex常用的语法示例以供参考。 ###1. latex代码 ``` \documentclas...

  • latex公式

    常用数学符号的 LaTeX 表示方法 相关资料: 一份不太简短的latex介绍 latex在线编辑器 1、指数和下...

  • 常用Latex

    点乘:a \cdot b 叉乘:a \times b 除:a \div b 绝对值: \left| w \rig...

  • Latex常用

    在线公式编辑器https://www.codecogs.com/latex/eqneditor.php 在线表格制...

  • 自学LaTeX【1】:LaTeX的安装与配置

    本小节主要涉及LaTeX发行版的安装配置问题。 LaTeX的发行版及其安装 常用的LaTeX发行版有CTeX和Te...

  • Latex 入门 (2)

    今天向大家介绍Latex的常用命令。 文件类别和字体大小 在Latex中三种最常用的标准文件类型包括,文章(art...

  • LaTeX 快速指南

    LaTeX 快速指南 文章中描述了常用的LaTex语法,内容会持续更新。。。 公式规范 公式分为两种形式,行内公式...

网友评论

      本文标题:Latex常用

      本文链接:https://www.haomeiwen.com/subject/nieyyqtx.html