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

博文

论文排版latex常用命令。

已有 11374 次阅读 2016-11-21 09:28 |个人分类:排版技能|系统分类:论文交流

1.修改图题

在导言区,加renewcommand{figurename}{Fig.}

在text中,这样引用 figurename ref{你的图的label}

这样生成的pdf中都是出现为Fig. 1等。

其次,将默认的“Figure 1:”中的冒号去掉,即修改图注分隔符,可以用caption2宏包:

usepackage[]{caption2}
renewcommand{captionlabeldelim}{.}
如果需要修改图注的字体等,在上面的[]内增加相应的选项即可,例如修改字体为footnotesize:

usepackage[footnotesize]{caption2}


\captionsetup[figure]{labelfont={bf},name={Fig.},labelsep=period}


http://blog.csdn.net/fandroid/article/details/50930137





2.图片格转换 bmeps -c example.jpg example.eps

3.公式编号在左侧 usepackage[leqno]{amsmath}

4.公式以及图表的引用 eqref{equ::1}  ref{fig::1}

5. 数学字体

usepackage{ dsfont }

$mathbb{R}$

$mathds{R}$

$mathcal{R}$

mathbb{R}空心

mathds{R}

mathcal{R}花体

6.数学公式


begin{equation}label{equ::1}

 text{arg} underset{{U}}{text{max}} sum_{j=1}^{D}sum^{L-1}_{t=1}dot{y}_{j,t}^2quad s.t.quad YY^T=I

end{equation}


多行上下标

  1. 第一种方法:我们可以使用命令substack,可以排版多重上标或下标,两行之间用\分隔,居中显示。

    例如:begin{equation}   sum_{substack{k_0,k_1,dots>0\   k_0+k_1+dots=n}}   F(k_i)end{equation}

    其运行结果为:

    LaTex排版技巧:[13]如何排版公式的多行下标
  2. 第二种方法:我们可以使用subarray环境来实现多行上下标,且可以自己选择对齐方式。

    begin{gather}

     sum_{substack{0 le i le m\

     0 < j < n}}P(i, j)\

     sum_{begin{subarray}{l}

       i in Lambda \

       0 le i le m \

       0 < j < n

     end{subarray}} P(i, j)

    end{gather}

    其运行结果:

    LaTex排版技巧:[13]如何排版公式的多行下标
  3. 3

    第二种方法中的subarray的选项l代表左对齐,也可换为c,r分别代表中心对齐和右对齐



分块矩阵

http://blog.csdn.net/lanchunhui/article/details/53323989



7. 修改字体颜色

usepackage{color}

1. {color{red} 文本}

2. textcolor[rgb]{1,0,0}{文本}  颜色参数范围为[0,1]


8.常用各种表格命令

%begin{table}[!h]%最佳表格

%caption{label{tab::sss} captions }
%centering
%begin{tabular}{ccccccc}hline单元格内的无线分隔
%Actual  & multicolumn{6}{l}{Predicted}  \ cline{2-7}
% &  Bend & Fall& Lie & Sit & Squat& Walk\ hline
%Bend&0.71&0.02&0.00&0.03&0.05&0.19\
%textbf{Fall}&textbf{0.06}&textbf{0.82}&textbf{0.00}&
%textbf{0.00}&textbf{0.00}&textbf{0.%12}\
%Lie&0.07&0.00&0.15&0.11&0.02&0.65\
%Sit&0.12&0.00&0.00&0.59&0.01&0.28\
%Squat&0.09&0.00&0.01&0.00&0.69&0.21\
%Walk&0.07&0.01&0.00&0.00&0.02&0.90\
% hline
%%multicolumn{7}{c}{$A$--Our algorithm $B$--spatial moments $C$--enclosing rectangle}
%end{tabular}%multicolumn{6}{@{}l}{$A$--Our algorithm }
%end{table}



%begin{table}[!h]%最佳表格

%  caption{label{tab::AccSixClassSet2} caption  }

%centering

%begin{tabular}{cc}hline%newline 单元格内的无线分隔

%%& multicolumn{8}{c}{Bin number}  \ cline{2-11}

%Method&Average accuracy \ hline
%S &64.30%\ hline%&96.9%&95.8% % % error rate 15.09%
%E &71.34% \ hline  % error rate 6.70%
%D &textbf{81.33}% \ hline
%end{tabular}
%end{table}

9.描述算法

所用宏包

usepackage{algorithm}  

usepackage{algorithmic}

begin{algorithm}

caption{A}

  1. label{alg:A}  

    begin{algorithmic}  

    STATE {set $r(t)=x(t)$}  

    REPEAT  

    STATE set $h(t)=r(t)$  

    REPEAT  

    STATE set $h(t)=r(t)$  

    UNTIL{B}  

    UNTIL{B}  

    end{algorithmic}  

    end{algorithm}




http://blog.csdn.net/lqhbupt/article/details/8723478


http://blog.csdn.net/xiaojidan2011/article/details/34534553


更多算法描述

http://blog.csdn.net/yumengkk/article/details/7540912


http://blog.sina.com.cn/s/blog_5e16f1770102ezhv.html




itemize和enumerate还有description 是LaTeX里列举的三种样式,分别讲一些使用技巧。

itemize(意为分条目):

begin{itemize}
item[*] a
item[*] b
end{itemize}
这样出来的形式为

* a
 * b
item的方括号里的内容是为定制前面的符号,可以不要(连同括号),那么前面的符号就是默认的黑点,也可以换为其他的符号,如-,+,等

enumerate(意为编号):
begin{enumerate}[1)]
item a
item b
end{enumerate}
这样出来的形式为:
 1) a
 2) b
方括号里的内容是定制前面的编号的形式,可以不加,默认就是简单的数字,也可以换成[step 1],[(i)]等,LaTeX可以自动识别。但是要注意,使用了方括号,必须在前面加usepackage{enumerate}.

description(意为描述):
begin{description}
item[item a] a
item[item b] b
end{description}
出来的形式为:
item a a
item b b
方括号的词会作为一个描述出现在item的前面

http://blog.163.com/chen_dawn/blog/static/11250632013719352254/




ctex中怎么在编辑窗口中同时打开几个文件用winedt的话:

把鼠标到winedt界面有数学符号那一横行的空白处点右键,在出现的菜单中选show document tabs 就可以了

latex 生成PDF文件显示行号

可以用lineno宏包
usepackage{lineno}
begin{document}
linenumbers


编写LaTeX宏包及其应用.pdf


Latex中插图中的标题的换行

如果一副图像的标题(caption)过长,我们一般希望中间加入一个换行,把较长的文字放在标题的第二行。
那么在figure环境中的caption{}中如何断行呢?
此时不再是用\了,而是用protect\,
例如caption{short text protect\ long text} 。
因为\是脆弱的,必须在其前面加上protect

http://blog.csdn.net/tina_lulu_21/article/details/7689321

在latex中碰到长标题,如果手动换行,需要用到newline(中文环境),但是新的行并不会居中,而是右对齐,




https://blog.sciencenet.cn/blog-597740-1015909.html

上一篇:pattern recognition and machine learning 中文版
下一篇:英文写作常用短语
收藏 IP: 202.113.11.*| 热度|

0

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

数据加载中...
扫一扫,分享此博文

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

GMT+8, 2024-5-8 13:02

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部