LaTeX技巧心得之一:建立参考文献的超链接

您所在的位置:网站首页 目录设置成超链接 LaTeX技巧心得之一:建立参考文献的超链接

LaTeX技巧心得之一:建立参考文献的超链接

2024-07-12 14:05:29| 来源: 网络整理| 查看: 265

1. 使用“hyperref”这个宏包,即在latex文档的导言部分添加“\usepackage{hyperref}”; 2. 使用“PdfLatex”对latex源文件进行编译,不要用“Latex”编译。

 

这样能确保生成的pdf文件中包含有可以用鼠标进行点击的超链接。但是这样存在一个问题,就是这些包含超链接的文本周围会出现彩色的方框,这种方框实在有碍观瞻,尤其是当出现在目录中时,大片的方框非常难看。

客服以上问题的方法是,不要使用“hyperref”宏包的默认属性,即使用如下方式引入宏包:

\usepackage[colorlinks,

            linkcolor=red,

            anchorcolor=blue,

            citecolor=green]{hyperref}

“colorlinks”的意思是将超链接以颜色来标识,而并非使用默认的方框来标识。 linkcolor, anchorcolor, citecolor分别表示用来标识link, anchor, cite等各种链接的颜色。 若正式的文档中不想使用彩色的标识,但又希望具有超链接的功能,则将上例中的各种颜色换成“black”即可。

如果您的pdf制作中文书签有乱码如下命令,就OK了

 

\usepackage[dvipdfm,  %pdflatex,pdftex    这里决定运行文件的方式不同             pdfstartview=FitH,             CJKbookmarks=true,             bookmarksnumbered=true,             bookmarksopen=true,             colorlinks, %注释掉此项则交叉引用为彩色边框(将colorlinks和pdfborder同时注释掉)             pdfborder=001,   %注释掉此项则交叉引用为彩色边框             linkcolor=green,             anchorcolor=green,             citecolor=green             ]{hyperref}

 若正式的文档中不想使用彩色的标识,但又希望具有超链接的功能,则将上例中的各种颜色换成“black”即可。 \href{URL}{text} \url{URL} \nolinkurl{URL} \hyperbaseurl{URL} \hyperimage{imageURL}{text} \hyperdef{category}{name}{text} \hyperref{URL}{category}{name}{text} \hyperref[label]{text} \hyperlink{name}{text} \hypertarget{name}{text} \phantomsection \cleardoublepage \phantomsection \addcontentsline{toc}{chapter}{\indexname} \printindex \autoref{label}

\url{网址}:生成网址链接,以等宽字体排版;\href{网址}{描述}:生成网址链接,以正常字体显示描述,隐藏网址。

选项中可供设置的常用选项见下表:

 Extension options

extension text

Set the file extension (e.g. dvi) which will be appended to file links created if you use the xrpackage.

hyperfigures boolean

 

backref boolean false

Adds ‘backlink’ text to the end of each item in the bibliography, as a list of section numbers. This can only work properly if there is a blank line after each \bibitem.

pagebackref boolean false

Adds ‘backlink’ text to the end of each item in the bibliography, as a list of page numbers.

hyperindex boolean true

Makes the page numbers of index entries into hyperlinks. Relays on unique page anchors (pageanchor, ...)

pageanchors and plainpages=false. hyperfootnotes boolean true

Makes the footnote marks into hyperlinks to the footnote text. Easily broken ...

encap

Sets encap character for hyperindex

linktocpage boolean false

make page number, not text, be link on TOC, LOF and LOT

breaklinks boolean false

allow links to break over lines by making links over multiple lines into PDF links to the same target

colorlinks boolean false

Colors the text of links and anchors. The colors chosen depend on the the type of link. At present the only types of link distinguished are citations, page references, URLs, local file references, and other links.

linkcolor color red

Color for normal internal links.

anchorcolor color black

Color for anchor text.

citecolor color green

Color for bibliographical citations in text.

filecolor color magenta

Color for URLs which open local files.

menucolor color red

Color for Acrobat menu items.

runcolor color filecolor

Color for run links (launch annotations).

urlcolor color cyan

Color for linked URLs.

frenchlinks boolean false

use small caps instead of color for links

详细信息,可参考:

 

http://www.tug.org/applications/hyperref/manual.html#x1-150005



【本文地址】

公司简介

联系我们

今日新闻


点击排行

实验室常用的仪器、试剂和
说到实验室常用到的东西,主要就分为仪器、试剂和耗
不用再找了,全球10大实验
01、赛默飞世尔科技(热电)Thermo Fisher Scientif
三代水柜的量产巅峰T-72坦
作者:寞寒最近,西边闹腾挺大,本来小寞以为忙完这
通风柜跟实验室通风系统有
说到通风柜跟实验室通风,不少人都纠结二者到底是不
集消毒杀菌、烘干收纳为一
厨房是家里细菌较多的地方,潮湿的环境、没有完全密
实验室设备之全钢实验台如
全钢实验台是实验室家具中较为重要的家具之一,很多

推荐新闻


图片新闻

实验室药品柜的特性有哪些
实验室药品柜是实验室家具的重要组成部分之一,主要
小学科学实验中有哪些教学
计算机 计算器 一般 打孔器 打气筒 仪器车 显微镜
实验室各种仪器原理动图讲
1.紫外分光光谱UV分析原理:吸收紫外光能量,引起分
高中化学常见仪器及实验装
1、可加热仪器:2、计量仪器:(1)仪器A的名称:量
微生物操作主要设备和器具
今天盘点一下微生物操作主要设备和器具,别嫌我啰嗦
浅谈通风柜使用基本常识
 众所周知,通风柜功能中最主要的就是排气功能。在

专题文章

    CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭