(1) Latex极其重要的技巧:
就四个文件有用,后缀bib是参考文献,后缀texsty控制文章格式,后缀bst控制参考文献格式。有时编译不能通过,将其余格式文件都删除,重新编译就能通过了,可能是以前的编译错误残留下来的(以前xiaobo zhang and nannan wang 都这么演示过) 
 Latex 模板中如何输入双引号
 问题:左右双引号如何输入呢?我用"",或者两个单引号 '' '' 似乎都没有这个效果“”
 方案:``.....'' and `....'.
奇怪的是``hot topics"在FSDH的摘要和第一段结尾效果是不一样的
    Ref:http://www.ilovematlab.cn/thread-56935-1-1.html

如何显示©?  \textcopyright
Reference: http://hevea.inria.fr/examples/test/sym.html
如何显示é?    \'e
Reference: https://tex.stackexchange.com/questions/8857/how-to-type-special-accented-letters-in-latex#comment14849_8859

(2)公式

latex插入公式,导数:比如要显示U',$U^'$不能编译通过,U后面直接添加一个引号即可$U'$;
LATEX插入长公式:Latex的公式不具有类似表格能整体缩放(wei bian, nannan wang, mingming gong均这么说; 后来我发现是可以的: http://www.cppblog.com/guijie/archive/2018/02/07/215510.html),插入很长的公式,在mathtype中不用对称的(),这样不能换行。用单括号(.  另外一种方式,局部双栏变单栏,见书P142单栏与双栏的转换;TPAMI 2019 Truncated的公式7。wei bian 觉得没必要局部双栏变单栏,我现在用在mathtype中用单括号( 也行。
GSM-PAF论文公式3、4和5用到了Latex教材P288的
公式与上下文的间距调整\abovedisplayskip=1pt和\belowdisplayskip=1pt,不使用会有大片空白。也可采用addvspace(见教材P42)
(3)WORD或者LATEX插入PDF格式图片?
将ppt转化成pdf的两种方式(一、打印成pdf;二、另存为pdf(我的论文PACFS的流程图,graphs中间的线像是一段一段的,采用方式二就没有问题(This is under the help of Yong Luo))),工具->高级编辑->裁剪工具 (东大正版pdf, 编辑->编辑文本和图像->裁剪页面),选中,注意此时调整大小,只能拉角落的角,确定,就会打印出新的pdf文件出来。工具->选择和缩放->快照工具(东大正版pdf, 编辑->拍快照),选中复制到word就可以了。Latex中直接插入pdf格式图片就可以了,当然也可以将pdf存成eps格式,再插入eps格式的图片,方法:打开pdf文件,另存为eps即可。一般情况这样就可以了。如果存成eps,有部分被截怎么解决?解决方法:将pdf另存为png,不要另存为jpg,png是无损的,再用Zhibing Hong给我的以下三句matlab命令将png转成eps格式即可。a = imread('SystemDiagram.png');imshow(a); saveas(gcf,'SystemDiagram.eps', 'psc2')。这种存的是矢量图(Yong Luo)。

2012/11/11 Latex插入图片(我自己画的pdf图片(CVPR 2013),如果转成eps图片,就会产生问题:发现有一些被截断了(以前也遇到过,或者被翻转之类,而且用转换成png再转化为eps,仍然不能解决)。于是想到还是插入pdf图片),头文件只要\usepackage{graphicx}即可

注意1要插入pdf图片,所有图片都要求是pdf图片,不能是eps图片。编译方式1:WinEdt 6.0和7.0都有PDFTeXify直接能生成pdf文件(Yong Luo都用的这一种方式)。编译方式2:PDFLaTeX->BibTex-> PDFLaTeX-> PDFLaTeX; 注意此时不能再点div2pdf,直接到文件夹看生成的pdf文件即可(nannan wang的版本就不能点击div2pdf)。问题:WinEdt 6.0和7.0都有PDFTeXify直接能生成pdf文件,这和PDFLaTeX->BibTex-> PDFLaTeX-> PDFLaTeX这样编译有什么区别?答:Yong Luo都用的第一种方式。编译方式3:Mingming Cheng老师的latex基金模板,要安装texlive,安装完成后WinEdit 7就会出现XeLaTeX,运行XeLaTeX即可,不能运行PDFLaTeX,他说XeLaTeX相对PDFLaTeX的优点就是支持中文比较好。texlive不能删,否则XeLaTeX就没了。因为我首次运行发现引用参考文献的地方,显示的是问号,问他是不是首次运行时要先运行XeLaTeX,再运行BibTeX,再运行XeLaTeX?是不是只要参考文献改过了,都要这样运行一次?他说应该是,参考文献改过了,应该不要再编译参考文献了。怎么将“Figure”换成“图”?他的是自动就是“图”。我自己上网找到解决方案:https://zhidao.baidu.com/question/247603925.html,加\renewcommand\figurename{图} 即可

注意2:此时只能点击PDFLaTeX 编译,不能点击LaTeX编译,否则会有问题:cannot determine size of graphic (怎样在latex中插入jpg图片? 必须用pdf LaTeX 编译)

eps图片,编译方式LaTeX->BibTex-> LaTeX-> LaTeX->div2pdf,有时如果eps不显示,可能是点dvi2pdf没用;先点dvi2ps再dvi2pdf。编译方式:LaTex:编译论文文件;BibTex编译参考文献;再两次LaTex(是规定的)(Tianyi告诉Fangjun Wu:ctrl+shift+X等同于LaTex+BibTex+LaTex+LaTex,分四步,能看出是参考文献错误还是文中有错误)。

nannan wangpdf图片唯一的问题,质量不太高,他和Yong Luo现在都是插入pdf图片。Matlab生成的图片可以直接保存为pdf格式,例如我准备投CVPR 13的Yale结果图,发现问题:见我的文件Yale.pdf,NN的结果在matlab看效果是方块的,但到pdf是竖线。matlab画出图后,不保存为pdf,按打印,属性,在Adobe PDF设置,默认设置,编辑,选择图像,将彩色图像,“缩减像素采样”选择“关”,再确定,打印成pdf,这样就没有问题了。这是首次的方式,以后每次打印时将默认设置改为standard(1)即可 (This is with Fei Gao's help.)

双栏模式插入单栏图片:\begin{figure*},这种是因为图像比较大,必须单栏才能显示出来,如果图像很小就用\begin{figure}即可;
如何让图片或者表格置顶?\begin{figure}[t], nannan wang says [t]就是实现置顶的功能
Please note the differences between \usepackage{subfig} and \usepackage{subfigure}. These two can not be used together in 
my talk: "talk\2017\I\1\Jie Gui_3\Multi-view".

(4)LATEX中如何插入网址?(我的教材P379)
 使用以下方式即可:\usepackage{url} 
\url{http://www.ri.cmu.edu/projects/project_418.html}
【这种方式在我的SRDA正则化参数估计杂志论文中已经能够正确编译】

Latex参考文献中含有网址,对应的*.bib文件要如何编辑?
https://blog.csdn.net/techfield/article/details/19933589
用到这个包:
\usepackage{url}
然后在你的.bib文件里写上
@Misc{timmurphy.org,
howpublished = {[EB/OL]},
note = {\url{http://timmurphy.org/2009/07/22/line-spacing-in-latex-documents/} Accessed April 4, 2010},
title = {Line Spacing in LaTeX documents},
author = {Murphy, Timothy I}
}
我在引用https://cacm.acm.org/news/244720-yann-lecun-yoshuabengio-
self-supervised-learning-is-key-to-human-levelintelligence/
fulltext时将\url删除了,如果加上没法自动换行


我觉得有如下两种方式:
方式一:
@article{zhu2005semi,
  title={Semi-supervised learning literature survey, \url{http://www.cs.wisc.edu/~jerryzhu/pub/ssl_survey.pdf}},
  author={Zhu, X.},
  year={2005},
  publisher={Citeseer}
}
也可以用url={http://www.cs.wisc.edu/~jerryzhu/pub/ssl_survey.pdf} ,但这样有可能:编译没问题,但在最后参考文献中,这一项显示不出来
问题:要不要使用宏包\usepackage{hyperref} 

方式二: 
\bibitem{url} National Center for Biotechnology Information, \url{http://www.ncbi.nlm.nih.gov}

问题:要显示网址中的~,使用\~{}吗?审稿人说我的网址显示不对,我在latex用的是https://www.cs.toronto.edu/\~{}kriz/cifar.html
T
ongliang回答:usepackage{hyperref},在文中使用\url{https://www.cs.toronto.edu/~kriz/cifar.html}
继续产生问题:
伪代码中凡是有引用的,都加了红色的框。网址,图表的序号都加了框,这怎么解决呢?
Tongliang回答:在usepackage{hyperref}后面加上
\hypersetup{
    bookmarks=true,         % show bookmarks bar?
    unicode=false,          % non-Latin characters in Acrobat’s bookmarks
    pdftoolbar=true,        % show Acrobat’s toolbar?
    pdfmenubar=true,        % show Acrobat’s menu?
    pdffitwindow=false,     % window fit to page when opened
    pdfstartview={FitH},    % fits the width of the page to the window
    pdftitle={My title},    % title
    pdfauthor={Author},     % author
    pdfsubject={Subject},   % subject of the document
    pdfcreator={Creator},   % creator of the document
    pdfproducer={Producer}, % producer of the document
    pdfkeywords={keyword1, key2, key3}, % list of keywords
    pdfnewwindow=true,      % links in new PDF window
    colorlinks=true,       % false: boxed links; true: colored links
    linkcolor=black,          % color of internal links (change box color with linkbordercolor)
    citecolor=black,        % color of links to bibliography
    filecolor=black,      % color of file links
    urlcolor=black           % color of external links
}
即可,以上语句来自https://en.wikibooks.org/wiki/LaTeX/Hyperlinks,就最后五行修改了。我的论文SDHR就是这么处理的

我的latex中文简历V1版本,20170301咨询Yong Luo第二页脚注显示有问题。
他找到方案:把这个去掉就好了\usepackage{hyperref},这个包可能跟模板有冲突,会导致分页不正常。
产生新的问题:但删掉之后,有网址出现的地方就编译通不过了,怎么使得网址出现的地方和我原来效果一样呢?
他也没有办法解决,我想到的是用\url{}代替\href{},\usepackage{url},将V2版本发给他,感觉还行

(5)LATEX中,在输入有中文的情况下如何两端对齐?
以下例子可能是偶然情况,需要时再看教材4.2.7节。代码一:,cbscmvOptimizeAlpha有参数lambda\_a可能就对应这两个正则化参数;代码二:,cbscmvOptimizeAlpha有参数lambda\_a可能就对应这两个正则化参数.区别仅仅在于最前面中文还是英文逗号,中文就能自动两端对齐,像IEEE模板一样,长单词在截断处加-,不会硬放在一行。

(6)NaiveAlso note the existence of \i and \j, which produce dotless versions of “i” and “j” (viz., “i” and “j”). These are useful when the accent is supposed to replace the dot. For example, “na\"{\i}ve” produces a correct “naïve”, while “na\"{i}ve” would yield the rather odd-looking “naïve”. (“na\"{i}ve” does work in encodings other than OT1, however.)     (http://hevea.inria.fr/examples/sym.html)

参考文献多个作者只显示一个?
试试: Joe Gui and others 这种方式

如何设置成IEEE或者ACM的参考文献样式? https://www.sharelatex.com/learn/Bibtex_bibliography_styles

(末尾) LATEX插入参考文献完整攻略
Latex中插入参考文献遇到的问题:
在模板中,将最近的bib文件拷贝至当前目录,加上以下两句即可
\bibliographystyle{ieeetr} %plain
\bibliography{a}
如果模板有bibitem方式的参考文献,必须注释。如果文中没有加任何参考文献引用,直接编译是会出错的, 2012-09-18晚为这个问题很长时间都没搞定。回去想可能是在文中加一篇引用就能解决,确实是这个原因。以上就是Latex插入参考文献完整的步骤 。

Latex中参考文献如何设定专有名词大写
将所有参考文献写在bib file 中,然后在latex调用来生成参考文献,一般生成的参考文献的格式是:除了文章名字的第一个字母为大写外,其他均为小写。但是有些专有名词是需要全部大写或者部分大写的,要实现这样的功能就需要在bib file 中把需要显示为大写的字母用{}括起来。
例如:要实现 OFDMA network, 那么在bib file中,要写成 {OFDMA} network;
要实现 Nash bargaining solution, 那么在bib file 中要写成 {N}ash bargaining solution.
Latex插入会议参考文献时 BOOKTITLE统一采用以下方式:看了很多,感觉Ran He CVPR2012的方式最好
booktitle={Conference on Computer Vision and Pattern Recognition};注意不能是{International Conference on Computer Vision and Pattern Recognition}
booktitle={International Conference on Computer Vision},
booktitle={European Conference on Computer Vision},
booktitle={Neural Information Processing Systems},
booktitle={International Conference on Machine Learning},
booktitle={International Joint Conference on Artificial Intelligence},
booktitle={AAAI Conference on Artificial Intelligence},这就是AAAI会议
booktitle={ACM SIGKDD Conference on Knowledge Discovery and Data Mining},这就是KDD会议
注意这两个数据挖掘会议简称
booktitle={IEEE International Conference on Data Mining},
booktitle={SIAM International Conference on Data Mining},
mingming gong说UAI references用数字标没有问题, http://auai.org/uai2017/proceedings/papers/289.pdf,
http://auai.org/uai2017/proceedings/papers/11.pdf, 这两个最终接受的论文都是用数字标的, 他特地研究过。
不一定用那个,真的无所谓.Asymmetric LSH是NIPS最佳论文奖,参考文献19就写的In KDD, 5写的In SDM, 20写的In NIPS。关键格式一致就可以。

书的引用方式:
Top 10 algorithms in data mining的第83个文献,该文应该是非常标准的方式。
Vapnik V (1995) The nature of statistical learning theory. Springer, New York
对应的Latex方式:@book{vapnik2000nature,
title={The nature of statistical learning theory},
author={Vapnik, Vladimir},
year={2000},
publisher={
Springer, New York}
}

对于没有正式卷号期号的怎么写bib文件?
仿照tongliang主页写法:
@article{gui2016Re,
title={Representative Vector Machines: A unified framework for classical classifiers},
author={Gui, Jie and Liu, Tongliang and Tao, Dacheng and Sun, Zhenan and Tan, Tieniu},
journal={IEEE Transactions on Cybernetics},
doi={10.1109/TCYB.2015.2457234}
}
----------------------------------------以下内容不必再看------------------------------------
注意不要加简称CVPR 11之类,看Deng Cai Graph Regularized Nonnegative Matrix(TPAMI)第四十六个文献,patch alignment的第十八个文献都没有加会议简称,
Yangqingjia CVPR 2012和Jianchao Yang CVPR 2009格式都是In CVPR
@INPROCEEDINGS{CHZH07,
        Author = {Deng Cai and Xiaofei He and Wei Vivian Zhang and Jiawei Han},
        TITLE = {Regularized Locality Preserving Indexing via Spectral Regression},
        BOOKTITLE = {Proceedings of the 16th ACM Conference on information and knowledge management},
        YEAR = {2007},
        pages = {741--750},} 

@INPROCEEDINGS{HCN05b,
         AUTHOR = {Xiaofei He and Deng Cai and Partha Niyogi},
         TITLE = {Tensor Subspace Analysis},
         BOOKTITLE = {Advances in Neural Information Processing Systems 18},
         YEAR = {2005}, }
booktitle={Proceedings of 2011 IEEE Conference on Computer Vision and Pattern Recognition}
booktitle={Proceedings of the 24th IEEE Conference on Computer Vision and Pattern Recognition}
The differences are 24th and 2011. I asked Professor Ran He on msn on 20120327 and he said that both are OK.

nannan wang(20120827): 标准就是统一就行。会议最后不要用Proceedings,年份一般也不写,单独写,有简称CVPR、NIPS都有,没有都没有。
booktitle={IEEE Conference on Computer Vision and Pattern Recognition}

如何排序并压缩连续的引用,产生如[2,4-8] 形式的引用? [zhaofeng he]

   如果你在Latex 中使用\cite{a,b,c,d,e,f} 则Latex 不会对条目进行排序,因此,可能会产生象[6,2,5,8,4,7] 这样很难看的排版效果。大多数人都希望对引用的条目进行排序,并且对连续的条目使用压缩的表示方式,即用[2,4-8] 表示上面的例子。使用cite 宏包可以解决这个问题。另一种方法是使用宏包natbib 并指定选项numbers 和sort&compress ,可以得到一样的效果。如果使用BibTEX 则必须使用natbib所带的数字式参考文献风格(plainnat.bst 和unsrtnat.bst)。

   在使用 hyperref 宏包来生成超链接的时候会有点问题。cite 宏包会完全失效,产生没有排序和压缩的引用。而 natbib 则可以得到排序但没有压缩的引用效果。如果你想得到排序而且压缩的效果,可以在加入natbib 宏包后再使用宏包 hypernat。

参考文献:Ctex FAQ-P.26

方法1:具体例子如下:\usepackage[sort&compress,square,numbers]{natbib}, 则可以得到排序但没有压缩的引用效果,但再使用\usepackage{hypernat},编译出现错误:
'hypernat.sty' not found的错误。请chong wang帮忙,也没能解决。
   方法2:\usepackage[compress]{cite} [见我的Latex教材P367]。以后就用这个方法

在gmailstore里的“Latex学习记录”,20160826已经整理,绝不再看,但gmailstore里删不掉,本机的该文件已删