LaTeX使用小记

17.latex中打对勾

MulSSD & \checkmark  & \checkmark & 34.434 \\

16.latex中如何输入下划线

%%%%%%%处理下划线:

_%%%%%%%%% \usepackage{underscore}

%%%%%%%处理下划线:_%%%%%%%%%

15.LaTex论文排版图表caption居中显示

在导言区添加一行代码(使用宏包):

\usepackage[justification=centering]{caption}

 

14.LaTeX中,“Unknown graphics extension:.eps“

解决:最简单方法添加

\usepackage{epstopdf} 

13双栏插入单栏图:

另起一行:

\clearpage

12,LaTeX中 theta加粗

$ \boldsymbol \theta $ 

11.在文献中加点,是中间区的那种:

Single-image super-resolution $\cdot$ vanishing gradients

10.LaTeX参考文献:

有的

\bibliographystyle {splncs} 
\bibliography{references}

其中splncs为参考文献的格式,会议提供。

按照cite顺序自动排序文献编号,用\bibliographystyle{unsrt}
 
其他几种如下:
 
通过设置 bibliographystyle 就可以达到上述目的,Bibtex 自身已具备排序的功能,而且可以选择自己想要的排序方式。Bibtex 已自带有 8 种样式,分别如下(下面内容摘自 LaTeX 编辑部):
 
1. plain,按字母的顺序排列,比较次序为作者、年度和标题
 
2. unsrt,样式同plain,只是按照引用的先后排序
 
3. alpha,用作者名首字母+年份后两位作标号,以字母顺序排序
 
4. abbrv,类似plain,将月份全拼改为缩写,更显紧凑
 
5. ieeetr,国际电气电子工程师协会期刊样式
 
6. acm,美国计算机学会期刊样式
 
7. siam,美国工业和应用数学学会期刊样式
 
8. apalike,美国心理学学会期刊样式

 编译生成.bbl文件:
分成4步
1. Run latex: LaTeX finds the references that are cited in the .tex file
   and the declaration of the bibliography style file (.bst) and
   bibliography database (.bib) and records them in the .aux file.
2. Run bibtex: BibTeX reads the .aux file to determine what cited entries
   to pull from what .bib files, formats and sorts the cited references
   according to the rules in the .bst file, and write the .bbl file.
3. Run latex again: LaTeX now finds the .bbl file and will read it and
   write cross reference data to the .aux file.
4. Run latex once more: LaTeX now finds the cross reference data for the
   citations in the .aux file and will resolve the citations.

既:
1. 用LaTeX或PDFLaTeX编译你的主TeX文件一次,
2. 然后你在主TeX文件的WinEdt面板上点bibtex按钮,编译.bib 文件一次
3。再用LaTeX或PDFLaTeX编译你的主TeX文件两次.

xlatex--bibtex--xlatex-xlatex

9..Latex 设置行的高度

代码:

\begin{table}[]
\centering
\renewcommand\arraystretch{2}       
8.Latex 设置字体大小命令由小到大依次为:.Latex 设置字体大小命令由小到大依次为:

\tiny

\scriptsize

\footnotesize

\small

\normalsize

\large

\Large

\LARGE

\huge

\Huge

7.插入并列图片需要使用到的宏:

\usepackage{graphicx}

\usepackage{subfigure}

 

代码:
\begin{figure}[h]  
\begin{minipage}[t]{0.4\linewidth}  
\centering  
\includegraphics[width=1.2\textwidth]{Fig3.pdf}  
\caption{Figure1 \label{1}}  
\end{minipage}  
\hfill  
\begin{minipage}[t]{0.4\linewidth}  
\centering  
\includegraphics[width=1\textwidth]{Fig4.pdf}  
\caption{Figure2\label{2}}  
\end{minipage}  
\end{figure}  

6.绘制三线表格:

\begin{tabular}{ c|c|c|c|c|c|c }

这句中后边的cccc是居中,要是l就居左。

几个c就是几列,当中的竖线是表示的是先,要是不需要就用空格。

5.图片的如下样式:

代码:

\begin{figure}
\centering
\includegraphics[width=11cm,height=3cm]{png/5.png}

\begin{tabular}{  c  c  c  c  c  c  }
Ground Truth& A+ \cite{Timofte}& SelfEx \cite{dong2014image}& SRCNN \cite{schulter2015fast}& SelfEx \cite{Huang-CVPR-2015}& DRCN (Ours)\\
(PSNR)& (29.83, 0.9102)& (29.97, 0.9092)& (29.61, 0.9026)& ({\color{blue}{30.73}}, {\color{blue}{0.9193}})& ({\color{red}{32.17}}, {\color{red}{0.9350}})\\
\end{tabular}

\caption{Super-resolution results with scale factor ×2}
\end{figure}

4.写完一些代码后编译出了错误,然后把它改好了,再点击编译按钮,结果出现以下提示:

Another application is currently  running in WinEdt's Console.
Wait for the execution to finish or else terminate the application.
每次我都是把WinEdt程序关闭然后重新打开,有没有好的办法呢?

下方编译信息窗口的左上有一个红色的×,点击终止当前未完的编译即可

3.怎么把pdf转成 eps:

https://convertio.co/zh/pdf-converter/

输入想要转换的pdf就好了。

2.想用Latex并列插入多个图片,出现“latex error: file 'subfigure.sty' not found”错误!

原因:当前安装的Latex里面没有subfigure包!

解决方法:

把subfigure包添加到当前工程,具体步骤:

Step1:新建一个文档命名为:subfigure.sty;

Step2:将下列内容复制到创建的文件中(可以用notepad++打开)

Step3:注:插入图片要引用的包有:

    \usepackage{graphicx}
    \usepackage{subfigure}

http://www.tug.org.in/tutorial/src/subfigure.sty里面的内容如下:

 

%%   
%% This is file `subfigure.sty',  
%% generated with the docstrip utility.  
%%   
%% The original source files were:  
%%   
%% subfigure.dtx  (with options: `package')  
%%   
%% Copyright (C) 1988-1995 Steven Douglas Cochran.   
%%   
%% This file is NOT the source for subfigure, because almost all comments   
%% have been stripped from it. It is NOT the preferred form of subfigure   
%% for making modifications to it.   
%%   
%% Therefore you can NOT redistribute and/or modify THIS file. You can   
%% however redistribute the complete source (subfigure.dtx and   
%% subfigure.ins) and/or modify it under the terms of the GNU General   
%% Public License as published by the Free Software Foundation; either   
%% version 2, or (at your option) any later version.   
%%   
%% The subfigure package is distributed in the hope that it will be   
%% useful, but WITHOUT ANY WARRANTY; without even the implied warranty   
%% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the   
%% GNU General Public License for more details.   
%%   
%% You should have received a copy of the GNU General Public License   
%% along with this program; if not, write to the Free Software   
%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   
%%   
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
%% @LaTeX-style-file{  
%%    Author     = "Steven Douglas Cochran",  
%%    Version    = "2.0",  
%%    Date       = "1995/03/06",  
%%    Time       = "14:43:14",  
%%    Filename   = "subfigure.sty",  
%%    Address    = "Digital Mapping Laboratory, School of Computer Science  
%%                  Carnegie-Mellon University, 5000 Forbes Avenue  
%%                  Pittsburgh, PA 15213-3891, USA",  
%%    Telephone  = "(412) 268-5654",  
%%    FAX        = "(412) 268-5576",  
%%    Email      = "sdc+@CS.CMU.EDU (Internet)",  
%%    CodeTable  = "ISO/ASCII",  
%%    Keywords   = "LaTeX2e, float, figure, table",  
%%    Supported  = "yes",  
%%    Abstract   = "LaTeX package for providing support for the  
%%                  inclusion of small, `sub,' figures and tables.  It  
%%                  simplifies the positioning, captioning and  
%%                  labeling of them within a single figure or table  
%%                  environment.  In addition, this package allows  
%%                  such sub-captions to be written to the List of  
%%                  Figures or List of Tables if desired."  
%% }  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
\ifx\if@compatibility\undefined\else  
  \NeedsTeXFormat{LaTeX2e}  
  \ProvidesPackage{subfigure}[1995/03/06 v2.0 subfigure package]  
  \typeout{Package: subfigure 1995/03/06 v2.0}  
\fi  
\newif\ifsubcaphang  
\newif\ifsubcapcenter  
\newif\ifsubcapcenterlast  
\newif\ifsubcapnooneline  
\newcommand{\subfigtopskip}{10pt}  
\newcommand{\subfigbottomskip}{10pt}  
\newcommand{\subfigcapskip}{10pt}  
\newcommand{\subfigcapmargin}{10pt}  
\newcommand{\subcapsize}{}  
\newcommand{\subcaplabelfont}{}  
\newcounter{subfigure}[figure]  
\def\thesubfigure{(\alph{subfigure})}  
\newcommand{\@thesubfigure}{{\subcaplabelfont\thesubfigure}\space}  
\let\p@subfigure\thefigure  
\let\ext@subfigure\ext@figure  
\newcommand{\l@subfigure}{%  
  \@dottedxxxline{\ext@subfigure}{2}{3.9em}{2.3em}}  
\newcounter{lofdepth}  
\setcounter{lofdepth}{1}  
\newcounter{subtable}[table]  
\def\thesubtable{(\alph{subtable})}  
\newcommand{\@thesubtable}{{\subcaplabelfont\thesubtable}\space}  
\let\p@subtable\thetable  
\let\ext@subtable\ext@table  
\newcommand{\l@subtable}{%  
  \@dottedxxxline{\ext@subtable}{2}{3.9em}{2.3em}}  
\newcounter{lotdepth}  
\setcounter{lotdepth}{1}  
\ifx\if@compatibility\undefined  
  \subcaphangfalse  
  \subcapcenterfalse  
  \subcapcenterlastfalse  
  \def\subcapsize{\footnotesize}  
\else  
  \DeclareOption{normal}{%  
    \subcaphangfalse  
    \subcapcenterfalse  
    \subcapcenterlastfalse  
    \subcapnoonelinefalse}  
  \DeclareOption{hang}{\subcaphangtrue}  
  \DeclareOption{center}{\subcapcentertrue}  
  \DeclareOption{centerlast}{\subcapcenterlasttrue}  
  \DeclareOption{nooneline}{\subcapnoonelinetrue}  
  \DeclareOption{isu}{\ExecuteOption{hang}}  
  \DeclareOption{anne}{\ExecuteOption{centerlast}}  
  \DeclareOption{scriptsize}{\renewcommand{\subcapsize}{\scriptsize}}  
  \DeclareOption{footnotesize}{\renewcommand{\subcapsize}{\footnotesize}}  
  \DeclareOption{small}{\renewcommand{\subcapsize}{\small}}  
  \DeclareOption{normalsize}{\renewcommand{\subcapsize}{\normalsize}}  
  \DeclareOption{large}{\renewcommand{\subcapsize}{\large}}  
  \DeclareOption{Large}{\renewcommand{\subcapsize}{\Large}}  
  \DeclareOption{up}{\renewcommand{\subcaplabelfont}{\upshape}}  
  \DeclareOption{it}{\renewcommand{\subcaplabelfont}{\itshape}}  
  \DeclareOption{sl}{\renewcommand{\subcaplabelfont}{\slshape}}  
  \DeclareOption{sc}{\renewcommand{\subcaplabelfont}{\scshape}}  
  \DeclareOption{md}{\renewcommand{\subcaplabelfont}{\mdseries}}  
  \DeclareOption{bf}{\renewcommand{\subcaplabelfont}{\bfseries}}  
  \DeclareOption{rm}{\renewcommand{\subcaplabelfont}{\rmfamily}}  
  \DeclareOption{sf}{\renewcommand{\subcaplabelfont}{\sffamily}}  
  \DeclareOption{tt}{\renewcommand{\subcaplabelfont}{\ttfamily}}  
  \ExecuteOptions{normal,footnotesize}  
  \ProcessOptions  
\fi  
\newcommand{\subfigure}{%  
  \bgroup  
    \advance\csname c@\@captype\endcsname\@ne  
    \refstepcounter{sub\@captype}%  
    \leavevmode  
    \@ifnextchar [%  
      {\@subfloat{sub\@captype}}%  
      {\@subfloat{sub\@captype}[\@empty]}}  
\let\subtable\subfigure  
\def\@subfloat#1[#2]#3{%  
    \setbox\@tempboxa \hbox{#3}%  
    \@tempdima=\wd\@tempboxa  
    \vtop{%  
      \vbox{  
        \vskip\subfigtopskip  
        \box\@tempboxa}%  
      \ifx \@empty#2\relax \else  
        \vskip\subfigcapskip  
        \@subcaption{#1}{#2}%  
      \fi  
      \vskip\subfigbottomskip}%  
  \egroup}  
\newcommand{\@subfigcaptionlist}{}  
\newcommand{\@subcaption}[2]{%  
  \begingroup  
    \let\label\@gobble  
    \def\protect{\string\string\string}%  
    \xdef\@subfigcaptionlist{%  
      \@subfigcaptionlist,%  
      {\protect\numberline {\@currentlabel}%  
       \noexpand{\ignorespaces #2}}}%  
  \endgroup  
  \@nameuse{@make#1caption}{\@nameuse{@the#1}}{#2}}  
\newcommand{\@makesubfigurecaption}[2]{%  
  \setbox\@tempboxa \hbox{%  
    \subcapsize  
    \ignorespaces #1%  
    \ignorespaces #2}%  
  \@tempdimb=-\subfigcapmargin  
  \multiply\@tempdimb\tw@  
  \advance\@tempdimb\@tempdima  
    \hbox to\@tempdima{%  
      \hfil  
      \ifdim \wd\@tempboxa >\@tempdimb  
         \subfig@caption{#1}{#2}%  
      \else\ifsubcapnooneline  
         \subfig@caption{#1}{#2}%  
      \else  
        \box\@tempboxa  
      \fi\fi  
      \hfil}}  
\let\@makesubtablecaption\@makesubfigurecaption  
\newcommand{\subfig@caption}[2]{%  
  \ifsubcaphang  
    \sbox{\@tempboxa}{%  
      \subcapsize  
      \ignorespaces #1}%  
    \addtolength{\@tempdimb}{-\wd\@tempboxa}%  
    \usebox{\@tempboxa}%  
    \subfig@captionpar{\@tempdimb}{#2}%  
  \else  
    \subfig@captionpar{\@tempdimb}{#1#2}%  
  \fi}  
\newcommand{\subfig@captionpar}[2]{%  
  \parbox[t]{#1}{%  
    \strut  
    \ifsubcapcenter  
      \setlength{\leftskip}{\@flushglue}%  
      \setlength{\rightskip}{\@flushglue}%  
      \setlength{\parfillskip}{\z@skip}%  
    \else\ifsubcapcenterlast  
      \addtolength{\leftskip}{0pt plus 1fil}%  
      \addtolength{\rightskip}{0pt plus -1fil}%  
      \setlength{\parfillskip}{0pt plus 2fil}%  
    \fi\fi  
    \subcapsize  
    \ignorespaces #2%  
    \par}}  
\newcommand{\@dottedxxxline}[6]{%  
  \ifnum #2>\@nameuse{c@#1depth}\else  
    \@dottedtocline{0}{#3}{#4}{#5}{#6}  
  \fi}  
\let\subfig@oldcaption\@caption  
\long\def\@caption#1[#2]#3{%  
  \subfig@oldcaption{#1}[{#2}]{#3}%  
  \@for \@tempa:=\@subfigcaptionlist \do {%  
    \ifx\@empty\@tempa\relax \else  
      \addcontentsline  
        {\@nameuse{ext@sub#1}}%  
        {sub#1}%  
        {\@tempa}%  
    \fi}%  
  \gdef\@subfigcaptionlist{}}  
\endinput  
%%   
%% End of file `subfigure.sty'.

1.LaTeX文档插入png图片
要有库:

\usepackage{graphicx} 

代码:

 \begin{figure}[htb]        
 \center{\includegraphics[width=5cm]  {pic-name.png}}        
 \caption{\label{1} My figure.  An example of a cool figure}      
 \end{figure}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

向阳+

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值