|
|
|
發新文章 |
|
|
(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{圖} 即可. 20250312 Xiaofeng Cong: TexWorks中編譯順序是XeLaTex->BibTex->XeLaTex->XeLaTex
注意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 wang講pdf圖片唯一的問題,質量不太高,他和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 Tongliang回答: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) Naive: Also 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里刪不掉,本機的該文件已刪
|