LaTeX快速上手--十分钟掌握发论文常用技能

目录


常用包

\usepackage{times}  %Required
\usepackage{helvet}  %Required
\usepackage{courier}  %Required
\usepackage{url}  %Required
\usepackage{graphicx}  %Required
\usepackage{amsmath}
\usepackage{algorithm}
\usepackage{algorithmicx}  
\usepackage{algpseudocode}  
\usepackage{multirow}

常用记号

 \frac{}{}
 \overrightarrow
 \textbf
 \hat
 \propto 
 \left \|  \right \|
 \left \  \right \
 \mathcal
 \partial
 \alpha
 \beta
 \lambda
 \theta
 \times
 \div

这里写图片描述

算法

\begin{algorithm}[htb]
  \caption{ ... Framework}
  \label{alg:Framwork}
  \begin{algorithmic}[1]
    \Require
	  in...
    \Ensure
      out...
    \State Construct ...
	\Repeat  
      \State Apply ... 
    \Until{converge} 
	\For{each $edge(u_i, v_j)\in E$}  
      \State Update ... 
    \EndFor  
    \Return ...
  \end{algorithmic}
\end{algorithm} 

公式

\begin{equation}
Precision = \frac {TP}{TP + FP}
\end{equation}

图片

\begin{figure}[h]%% fig
	\centering  % center
	\includegraphics[width=0.7\linewidth]{figures/metric_curve}  % location
	\caption{Performance comparison visualization.}  % name
	\label{fig:metric_curve}   % for reference
\end{figure}

表格

\begin{table*}
\begin{center}
\caption{。。。}
	\begin{tabular}{|c|c|c|c|c|}
	\hline
	\multirow{2}{*}{Multi-Row}&
	\multicolumn{2}{c|}{Multi-Column}&
	\multicolumn{2}{c|}{\multirow{2}{*}{Multi-RowandCol}} \\
	\cline{2-3}
	  & column-1&column-2 & \multicolumn{2}{c|}{}\\
	\hline
	label-1 & label-2&label-3 & label-4& label-5\\
	\hline
	\end{tabular}
\end{center}
\end{table*}

脚注

\footnote

作者上角标

\author{Lily\textsuperscript{1}        \and
        Alexw\textsuperscript{2}  
}

通讯作者的小信封标识

\usepackage[misc]{ifsym}
\begin{document}
\institute{ \Letter  Alexw\at
}

引用

\cite{Shen2012Learning}      % 编译之前 至少引用一次 ,否则会出错,引用bib文件第一行,ref.bib文件如下,自己对号入座。

\bibliographystyle{aaai}     % 对应下图的 aaai.bst
\bibliography{ref}           % 对应下图的 ref.bib

这里写图片描述

ref.bib 文件格式如下,可以通过百度文库自动导出,这里就不讲了,有兴趣去查。

@inproceedings{Shen2012Learning,
  title={Learning personal + social latent factor model for social recommendation},
  author={Shen, Yelong and Jin, Ruoming},
  booktitle={Proceedings of the 18th ACM SIGKDD international conference on Knowledge discovery and data mining},
  pages={1303-1311},
  year={2012},
 keywords={personal + social factor;social recommender system},
 abstract={Social recommendation, which aims to systematically leverage the social relationships between users as well as their past behaviors for automatic recommendation, attract much attention recently. The belief is that users linked with each other in social networks tend to share certain common interests or have similar tastes (homophily principle); such similarity is expected to help improve the recommendation accuracy and quality. There have been a few studies on social recommendations; however, they almost completely ignored the heterogeneity and diversity of the social relationship. In this paper, we develop a joint personal and social latent factor (PSLF) model for social recommendation. Specifically, it combines the state-of-the-art collaborative filtering and the social network modeling approaches for social recommendation. Especially, the PSLF extracts the social factor vectors for each user based on the state-of-the-art mixture membership stochastic blockmodel, which can explicitly express the varieties of the social relationship. To optimize the PSLF model, we develop a scalable expectation-maximization (EM) algorithm, which utilizes a novel approximate mean-field technique for fast expectation computation. We compare our approach with the latest social recommendation approaches on two real datasets, Flixter and Douban (both with large social networks). With similar training cost, our approach has shown a significant improvement in terms of prediction accuracy criteria over the existing approaches.},
}

...

文件都有了,接下来就是编译运行,有四步流程
- LaTeX编译 % 编译整篇文档
- BibTeX编译 % 加载bib文件
- LaTeX编译 % 重新编译
- LaTeX编译 % 这时才会在正文中出现正确引用

Misplaced alignment tab character &
在用latex导入参考文献时,有时会出现这种错误,原因在于参考文献中出现了&,这是我们在前面加上\就可以了。即 
& -> \& 
LaTeX Error: Something’s wrong–perhaps a missing \item.
确保在 .tex文件的正确位置引用了至少一篇参考文献, 如 \cite{Shen2012Learning} 
确保 .bib文件中有上面引用的这篇paper1;
删除 .bbl文件,重新编译即可。
  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值