1、LaTeX技巧1latex建立参考文献的超链接LaTeX超级链接那些事儿LaTeX技巧1:latex建立参考文献的超链接-LaTeX超级链接那些事儿 在Latex生成的pdf文档中建立超链接(如从正文到参考文献,从目录到相应内容,从页码编号到实际页面等),有利于读者快速定位当前阅读的信息。如何在生成的pdf文件中包含超链接呢?需要注意一下两点:1.使用“hyperref”这个宏包,即在latex文档的导言部分添加“usepackagehyperref”;2. 使用“PDFLaTeX”对latex源文件进行编译,不要用“LaTeX”编译。这样能确保生成的pdf文件中包含有可以用鼠标进行点击的超链
2、接。但是这样存在一个问题,就是这些包含超链接的文本周围会出现彩色的方框,这种方框实在有碍观瞻,尤其是当出现在目录中时,大片的方框非常难看。克服以上问题的方法是,不要使用“hyperref”宏包的默认属性,即使用如下方式引入宏包:usepackagecolorlinks, linkcolor=red, anchorcolor=blue, citecolor=green hyperref“colorlinks”的意思是将超链接以颜色来标识,而并非使用默认的方框来标识。linkcolor,anchorcolor, citecolor分别表示用来标识link, anchor,cite等各种链接的颜色。
3、若正式的文档中不想使用彩色的标识,但又希望具有超链接的功能,则将上例中的各种颜色换成“black”即可。如果您的pdf制作中文书签有乱码如下命令,就OK了usepackagedvipdfm, %pdflatex,pdftex这里决定运行文件的方式不同 pdfstartview=FitH, CJKbookmarks=true, bookmarksnumbered=true, bookmarksopen=true, colorlinks, %注释掉此项则交叉引用为彩色边框(将colorlinks和pdfborder同时注释掉) pdfborder=001, %注释掉此项则交叉引用为彩色边框 lin
4、kcolor=green, anchorcolor=green, citecolor=green hyperref 若正式的文档中不想使用彩色的标识,但又希望具有超链接的功能,则将上例中的各种颜色换成“black”即可。hrefURLtexturlURLnolinkurlURLhyperbaseurlURLhyperimageimageURLtexthyperdefcategorynametexthyperrefURLcategorynametexthyperreflabeltexthyperlinknametexthypertargetnametextphantomsectioncleard
5、oublepagephantomsectionaddcontentslinetocchapterindexnameprintindexautoreflabelurl网址:生成网址链接,以等宽字体排版;href网址描述:生成网址链接,以正常字体显示描述,隐藏网址。选项中可供设置的常用选项见下表:extensiontext Set the file extension (e.g. dvi)which will be appended to file links created if you use the xrpackage.hyperfiguresboolean backrefbooleanFA
6、LSEAdds backlink text to the end of each item in thebibliography, as a list of section numbers. This can only workproperly if there is a blank line after each bibitem.pagebackrefbooleanFALSEAdds backlink text to the end of each item in thebibliography, as a list of page numbers.hyperindexbooleanTRUE
7、Makes the page numbers of index entries into hyperlinks. Relayson unique page anchors (pageanchor, .)pageanchors and plainpages=false. hyperfootnotesbooleanTRUEMakes the footnote marks into hyperlinks to the footnote text.Easily broken .encap Sets encap character for hyperindexlinktocpagebooleanFALS
8、Emake page number, not text, be link on TOC, LOF and LOTbreaklinksbooleanFALSEallow links to break over lines by making links over multiplelines into PDF links to the same targetcolorlinksbooleanFALSEColors the text of links and anchors. The colors chosen dependon the the type of link. At present th
9、e only types of linkdistinguished are citations, page references, URLs, local ?lereferences, and other links.linkcolorcolorredColor for normal internal links.anchorcolorcolorblackColor for anchor text.citecolorcolorgreenColor for bibliographical citations in text.filecolorcolormagentaColor for URLs which open local ?les.menucolorcolorredColor for Acrobat menu items.runcolorcolorfilecolorColor for run links (launch annotations).urlcolorcolorcyanColor for linked URLs.frenchlinksbooleanFALSEuse small caps instead of color for links
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1