科探空谷
  • Home
  • zhimind home
  • Categories
  • Tags
  • Archives
  • 留学
    • 学校库
    • 专业库
    • 研究方向与招生
    • 工具
    • GPA计算器
    • 脑洞背单词
    • 脱口而出

latex

目录

  • bad math environment delimiter
  • label 标签、公式交叉引用
  • No positions in optional float specifier.
  • 表格太宽
  • 代码算法显示 input output
  • 疯狂吐槽AAAI模板
  • 三段式表格
  • newif
  • 边缘空白过多
  • sty
  • synctex
目录

bad math environment delimiter¶

\begin{equation} 替换 $$, 不能嵌套

label 标签、公式交叉引用¶

\begin{equation}
    \begin{aligned}
    p(y=c|x, D_{train}) = & \int p(y=c|x,w)p(w|D_{train})dw \\
    \approx & \int p(y=c|x,w)q^*_{\theta}(w)dw \\
    \approx & \frac{1}{T} \sum_{t=1}^{T} p(y=c|x,\hat{w}_t)  
    \end{aligned}
\label{bayesian_posterior}
\end{equation}


\ref{bayesian_posterior}

No positions in optional float specifier.¶

\begin{figure}[] or \begin{table}[]

表格太宽¶

\documentclass{article}
\usepackage{graphicx}
\begin{document}

\begin{table}
\resizebox{\textwidth}{!}<div class="process"><input type="hidden" class="answers" value="{%\begin{tabular}{cc}Knuth&amp;Lamport\end{tabular}"/><input type="hidden" class="comments" value="{%\begin{tabular}{cc}Knuth&amp;Lamport\end{tabular}}"/><button onclick="checkQuiz(this, 0)">submit</button><br/></div>
\end{table}
\end{document}

代码算法显示 input output¶

\renewcommand{\algorithmicrequire}{\textbf{Input:}} % Use Input in the format of Algorithm
\renewcommand{\algorithmicensure}{\textbf{Output:}} % Use Output in the format of Algorithm

疯狂吐槽AAAI模板¶

\usepackage{amsmath,amsfonts}

这两个ams包没有默认加入, 坑死我了。

三段式表格¶

\usepackage[flushleft]{threeparttable}


\begin{center}

\begin{threeparttable}

\begin{tabular}{lc}

\toprule

\midrule

\midrule

\bottomrule

\end{tabular}

\end{threeparttable}

\end{center}

newif¶

使用newif定义一个逻辑(二值)变量logvar

define a logical variable logvar as follows:

\newif\iflogvar
\newif\iflogvar\logvarfalse
\newif\iflogvar\logvartrue
\newif\if@logvar\@logvarfalse

第一种

By default, it is set to false. We can set it to true by:

\logvartrue

边缘空白过多¶

remove white space after table

\vspace{-4mm}
\end{figure}
\end{table}

But the instruction in AAAI said that don't use vspace. 但AAAI的模板里明确说了不要用vspace。

sty¶

sudo yum -y install 'tex(multirow.sty)'

synctex¶

vscode latex-workshop

tex -> PDF: CTRL+ALT+J

PDF -> tex: Ctrl+click


Published

4月 2, 2018

Category

科研

Tags

  • 工具 6
  • 科研 4

Stay in Touch

  • Powered by Pelican. Theme: Elegant by Talha Mansoor