gongzijingshang的个人博客分享 http://blog.sciencenet.cn/u/gongzijingshang

博文

Latex

已有 3656 次阅读 2017-2-28 22:54 |系统分类:科研笔记

1参考文献

 

1,在tex所在目录里,新建文件my.bib  

2,在ADS里搜索你的某篇参考文献,点击Bibtex entry for this abstract

    把从@ARTICLE{  开始的内容到最后  }  的内容,全部考到my.bib

3,把@ARTICLE{2004ApJ...613..898T 括号里的内容填写到citep{内容}

4,tex里的两行 begin{thebibliography}{}

                          end{thebibliography}注释掉

5,换成bibliographystyle{apj}

             bibliography{my}


6,在Terminal里敲  latex my

                                  bibtex my

                                  latex my

                                  latex my

                                  dvipdf my

           即可得文章my.pdf

2,比较好用的编辑器,这里推荐两个:

1,Texmaker  在ubuntu中很好用

2,texstudio  在centos中很好用   http://texstudio.sourceforge.net/


3,LaTex的安装

之前LaTex的安装命令是


yum -y install texlive texlive-latex texlive-xetex
yum -y install texlive-collection-latex
yum -y install texlive-collection-latexrecommended
yum -y install texlive-xetex-def
yum -y install texlive-collection-xetex
Only if needed:
yum -y install texlive-collection-latexextra

                   

但是,在Centos 7 上总是有毛病,后来各种删删删,装装装

在Centos 上装的是texlive,要装新版本的话首先要将旧版本删除

查看版本:tex --version

如果是用上述方法安装的,那么用下面的命令卸载:




sudo yum remove texlive-latex

sudo yum erase texlive texlive*


然后就可以安装新版本啦:

http://www.jianshu.com/p/3b3a6f1f11bc

http://www.cnblogs.com/snake553/p/4831588.html


3,并列两个图

\begin{figure}
   \centering
   \subfigure[hhh]{ \label{fig:subfig:a} %% label for first subfigure
   \includegraphics[width=3.0in]{left.eps}}
   \hspace{0.02in}
   \subfigure[Big Box]{ \label{fig:subfig:b} %% label for second subfigure
   \includegraphics[width=3.0in]{right.eps}}
   \caption{喵~ }
   \label{fig:first} %% label for entire figure
\end{figure}


4,表格(横排和竖排)

%table sample
\begin{sidewaystable}[h]
%\begin{table}[!bhtbp]
   \centering
   \begin{tabular}{ccccccccccccc}
       \hline
       SDSS&RAJ2000&DEJ2000&z&umag&gmag&rmag&$imag_lc$&zmag&w1mpro&w2mpro&w3mpro&w4mpro\\ \hline
       033156.88+002605.2&52.98699&0.43478&0.236&20.443&19.394&18.503&17.964&17.675&13.602&12.761&9.982&7.696\\
       034831.88-071145.9&57.13283&-7.19609&0.183&20.489&19.086&18.151&17.568&17.164&12.591&11.64&8.557&6.055\\
       080037.62+461257.9&120.15677&46.21608&0.238&19.281&18.777&18.252&17.891&17.81&13.309&12.403&9.127&6.478\\
       080652.11+564412.7&121.71712&56.73688&0.180&17.629&17.31&17.042&16.688&16.732&12.027&10.848&7.822&5.476\\
       081116.70+320935.3&122.81961&32.15981&0.153&18.444&18.037&17.582&17.142&17.066&12.544&11.743&9.215&6.648\\
       081835.59+390911.1&124.64831&39.15309&0.186&19.388&18.616&17.998&17.564&17.468&13.623&12.804&10.143&7.488\\ \hline
   \end{tabular}
   \caption{The main parameter of of our source}
   \label{table:observation}
%\end{table}
\end{sidewaystable}


长表格放不下去的时候可以通过缩小字体来解决。

Latex 设置字体大小命令由小到大依次为:

\tiny
\scriptsize
\footnotesize
\small
\normalsize
\large
\Large
\LARGE
\huge
\Huge

使用方法,例如:

\large{整个表格}




5,生成表格

https://www.zhihu.com/question/29734369

http://www.tablesgenerator.com/latex_tables



6,双引号

``An Systematic Analysis of Stellar Population for Host Galaxies of SDSS Type I QSOs ''




https://blog.sciencenet.cn/blog-2414991-1036731.html

上一篇:天文常数
下一篇:天文常识
收藏 IP: 47.52.166.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-6-3 12:46

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部