latex操作

表格大小放缩

\scalebox{0.65}{table content}
\resizebox{h-size}{v-size}{table content}
(size可填10pt、50mm等,表格内文字会变形)

\begin{tabular}{ |s|p{2cm}|p{2cm}|  }(手动设置列宽)

调整宽度
过宽:
\resizebox{\textwidth}{12mm}{ 
过窄:
\setlength{\tabcolsep}{7mm}{
}

\resizebox{linewidth}{}{  #此处!表示根据根据宽高比进行自适应缩放

表格内文字左右移动

左: \!
右: ~ 或 \,

例:

\multicolumn{2}{l}{$\!\!\!\!\!\!\!$security}
\multicolumn{2}{c}{~~~\texttt{DANE Valid} }
\multicolumn{2}{l}{$\,$security}

设置图表位置

\begin{table}[*]  
	xxxxxxx
\end{table}

*处可填:
h: 当前位置。如果本页所剩的页面不够,这一参数将不起作用。
t: 顶部。将图形放置在页面的顶部。
b: 底部。将图形放置在页面的底部。
p: 浮动页。将图形放置在允许有浮动对象的页面上。


一般使用[htb]这样的组合,只用[h]是没有用的。这样组合的意思就是latex会尽量满足排在前面的浮动格式,就是h-t-b这个顺序,让排版的效果尽量好。

!h 只是试图放在当前位置。如果页面剩下的部分放不下,还是会跑到下一页的。一般页言,用 [!h] 选项经常会出现不能正确放置的问题,所以常用 [ht][htbp] 等。
% ! 忽略阻止浮动体放置的大多数内部参数

如果你确实需要把图片放在当前位置,不容改变,可以用float宏包的[H]选项。不过如果这样做,出现放不下的问题时需要手工调整。
换行
//

调整空白大小

\vspace{-4cm}

可调整表格,图片上下方空白(若要调整上方空白,则放在caption上方,调整下方同理)

也可调整title前面空白,:\title{\vspace{-4cm}YourTitle}

使用\cite{}引用bib文件中的文献

\usepackage{cite}

\cite{bibtex1}\cite{bibtex2}\cite{bibtex3}
[1][2][3]
\cite{bibtex1,bibtex2,bibtex3}
[1,2,3]

字体大小

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

\tiny

\scriptsize

\footnotesize

\small

\normalsize

\large

\Large

\LARGE

\huge

\Huge

在右上方添加标注

$^{\rm a}$

圆圈里加字符

\textcircled{1} ①
\textcircled{a} 

bibtex参考文献过长不换行

\def\UrlBreaks{\do\/\do-}

制作bib文件,并引用

1. 新建一个txt文件,叫example.txt。
2. 论文期刊等可在谷歌学术或dblp中查找,复制引用中bibtex到example.txt中.:
   @inproceedings{FeltB-2017-r1,
  author    = {Adrienne Porter Felt and
               Richard Barnes and
               April King and
               Chris Palmer and
               Chris Bentzel and
               Parisa Tabriz},
  editor    = {Engin Kirda and
               Thomas Ristenpart},
  title     = {Measuring {HTTPS} Adoption on the Web},
  booktitle = {26th {USENIX} Security Symposium, {USENIX} Security 2017, Vancouver,
               BC, Canada, August 16-18, 2017},
  pages     = {1323--1338},
  publisher = {{USENIX} Association},
  year      = {2017},
  url       = {https://www.usenix.org/conference/usenixsecurity17/technical-sessions/presentation/felt},
  timestamp = {Mon, 01 Feb 2021 08:43:17 +0100},
  biburl    = {https://dblp.org/rec/conf/uss/FeltBKPBT17.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}


//其中FeltB-2017-r1为自己取的名字,以便在laytex中引用

3. 把txt后缀名改成bib,拷贝到和tex相同的文件夹
4. 在\end{document}前加代码(IEEEtran为模板)
    \bibliographystyle{IEEEtran}
    \bibliography{example}
5. 使用\cite{FeltB-2017-r1}就可以引用
6. 先编译tex文件生成aux文件,然后编译bib文件.
7. 编译bib文件,可以使用ide自带编译.或在bib文件路径中打开cmd,输入bibtex example.aux进行编译
8. 然后再次编译tex文件,就可以生成有引用文献的PDF.
使参考文献可以跳转:
\usepackage[backref]{hyperref}

表格图片跳转:
在正文中加入~\ref{f7}(f7为图片名字)
github:
@misc{Charles2013,
  author = {Charles, P.W.D.},
  title = {Project Title},
  year = {2013},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/charlespwd/project-title}},
  commit = {4f57d6a0e4c030202a07a60bc1bb1ed1544bf679}
}

RFC:
@misc{CRL,
  author        = "D. Cooper and S. Santesson and S. Farrell and S. Boeyen and R. Housley and W. Polk",
  title         = "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile",
  howpublished  = "RFC  5280 ",
  month         = "May",
  year          = "2008"
}
表格粗线
\toprule[1pt]

latex特殊符号

https://blog.csdn.net/ying_xu/article/details/51240291

错误

 ! File ended while scanning use of \@newl@bel.  
 删掉所有临时文件重新运行

File ended while scanning use of \url.
加入\usepackage{url}宏包

BiBTeX found no citation commands
1. bib文献参考格式不对
2. bib文件中有的没有引用或定义
3. 临时文件过旧或出错,删掉重新运行
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值