Latex的一些技巧

今天介绍点latex的小细节

1 label

example:

我们加入

\begin{figure}[!htbp]
\begin{center}
    \includegraphics[width = 0.4\textwidth]{wc.eps}
\end{center}
    \caption{Performance comparison of venue prediction with varying number of topics, with the number of word to be 30 and 50}
    \label{fig:3050}
\end{figure}
问引用时候用:

\ref{fig:3050}

2 标注:

\footnote{\url{http://wikitravel.org/}}

3 算法:

\begin{algorithm}
\caption{Dense Subgraph Detection}
\label{Algorithm 1}
\begin{algorithmic}[1]
\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}
\REQUIRE~~\\
 Weighted adjacency array $A$ and an initialization $x(0)$;\\
 Set $\mathbf{x} = x(0)$;\\
\indent\textbf{Repeat:}
    \STATE \quad Update the partial derivative $g(\mathbf{x})$ with respect to each variable $x_i$;
    \STATE \quad Find a pair $(v_i, v_j)$
    \STATE \quad Compute the best step size to maximize the increase the objective;
    \STATE \quad \textbf{Until:} $\mathbf{x}$ is a local maximizer;
    \STATE \quad \textbf{Output}: A KKT point $\mathbf{x}^*$
\end{algorithmic}
\end{algorithm}

4 table

这里主要有一个如何在一个element里面自动换行:

\begin{table}[!t]
\caption{Venue Category Distribution}\label{tab:venuecategory}
\centering
\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}
\begin{tabular}{|c|c|c|}
\hline\hline %inserts double horizontal lines
Category & Number & Examples \\
\hline
Hotel & 6 & \tabincell{c}{Gardens By The Bay}\\
\hline
Park & 3 & \tabincell{c}{Sands SkyPark}\\
\hline
Food & 17 & \tabincell{c}{Trasapura Masters Food Court}\\
\hline
Shopping & 8 & \tabincell{c}{Marina Square}\\
\hline
Landmark & 7 & \tabincell{c}{The Singapore Flyer} \\
\hline
\end{tabular}
\label{table:venuecategory}
\end{table}


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值