发布时间:2009-10-15 11:06:32 文章类别:宏包使用 原文地址:http://blog.sina.com.cn/s/blog_5e16f1770100fkcz.html

QQ群:91940767/145316219/141877998/80300084/194770436 淘宝店:http://latexstudio.taobao.com

常见数学公式问题集下载

在Latex生成的pdf文档中建立超链接(如从正文到参考文献,从目录到相应内容,从页码编号到实际页面等),有利于读者快速定位当前阅读的信息。 如何在生成的pdf文件中包含超链接呢?需要注意一下两点: 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{网址}{描述}:生成网址链接,以正常字体显示描述,隐藏网址。
选项中可供设置的常用选项见下表:
选项 用途 参数 说明
a4paper 使用A4纸张
a5paper 使用A5纸张
anchorcolor 链接锚文本颜色 black 默认值
b5paper 使用B5纸张
backref 反向引用 false 默认值
baseurl 基本URL empty 默认值
bookmarks 生成书签 true 默认值
bookmarksnumbered 书签中章节编号 true 默认值
bookmarksopen 书签目录展开 true 默认值
bookmarksopenlevel 书签目录层次 \maxdimen 默认值,最高
1或2或3... 可选值
bookmarkstype 书签目录类型 toc 章节目录,默认
lof 图形目录
lot 表格目录
breaklinks 允许链接断行 false 默认值
citebordercolor 引用标记边框颜色 {0  1  0} 默认值
citecolor 引用标记颜色 green 默认值
colorlinks 彩色链接 true 默认值
CJKbookmarks 中文书签 true 默认值
debug log诊断信息打印 false 默认值
draft 超文本选项失效 false 默认值
dvipdf 使用dvipdf驱动
dvipdfm 使用dvipdf驱动
dvips 使用dvips驱动
dvipsone 使用dvipsone驱动
dviwindo 使用dviwindo驱动
encap 设置超索引符号
executivepaper 7.25in×10.5in纸
extension 设置文件扩展名 dvi 默认值
ps、pdf、... 可选值
filebordercolor 文件链接边框颜色 {0 .5  .5} 默认值
filecolor 文件链接颜色 cyan 默认值
final 超文本选项生效 true 默认值
frenchlinks 链接字体为小型大写 false 默认值
hyperfigures 图形链接 false 默认值
hyperindex 索引链接 true 默认值
hypertex hypertex驱动
hypertexnames 用推测名称链接 true 默认值
implicit 内部定义 true 默认值
latex2html latex2html驱动
legalpaper 8.5in×14in纸张
letterpaper 8.5in×11in纸张
linkbordercolor 内部链边框接颜色 {1 0 0} 默认值
linkcolor 内部链接颜色 red 默认值
linktocpage 目录页码链接 false 默认值
menubordercolor 菜单链接框颜色 {1 0 0} 默认值
menucolor 菜单链接颜色 red 默认值
naturalnames 使用编译名 false 默认值
nesting 允许链接嵌套 false 默认值
pageanchor 每页增设页锚 true 默认值
pagebackref 反向引用页码 false 默认值
pagebordercolor 页链接框颜色 {1 1 0} 默认值
pagecolor 页链接颜色 red 默认值
pdfauthor 作者
pdfborder 链接边框 {0 0 0} 默认值,无框
{0 0 1} 可选值,有框
pdfborderstyle 连接边框样式 {/S/U} 下划线
{/S/D/D[3 2]/W 1}虚线框
pdfcenterwindow 在屏幕上居中窗口 true 默认值
pdfcreator 应用程序(需用命令\hypersetup设置) LaTeX with hy-perref package 默认值
pdfdirection 方向设定 L2R 由左至右
R2L 由右至左
pdfdisplaydoctitle 显示文件标题 true 默认值
pdfduplex 双面打印 Simplex 单面
DuplexFlipShort-Edge 双面短边装订
DuplexFlipLong-Edge 双面长边装订
pdfescapeform 容错 false 默认值
pdffitwindow 调整窗口 false 默认值
pdfhighlight 点击链接时显示 /I 翻转,默认值
/N 外观不变
/O 出现黑色边框
/P 出现黑色半框
pdfkeywords 关键字
pdflang PDF标识符
pdfmenubar 显示菜单栏 true 默认值
pdfnewwindow 生成新窗口 false 默认值
pdfnumcopies 打印分数 1或2或3...
pdfnonfullscreen-pagemode 全屏显示样式 UseNone 无书签缩略图
UseOutlines 附书签
UseThumbs 附缩略图
FullScreen 无书签缩略图
pdfpagelayout 页面布局 TwoColumnLeft 对开,默认值
SinglePage 单页
OneColumn 连续
TwoColumnRight 连续-对开
pdfpagemode 文件打开模式 UseNone  (默认) 无书签和缩略图
UseThumbs 显示缩略图
UseOutlines 显示书签
FullScreen 全屏显示
pdfpagelabels 底部页码样式: “v(第 5/15 页)” 或“第 5/15 页” true 默认值
pdfpagescrop 设置裁切尺寸 例如:{53 486 389 754}
pdfpagetransition 页面过渡样式 参数后可加子参数: /Dm、/Bi、/M、/H /V、/I、/O (需全屏显示模式) Dissolve 马赛克散开
Wipe 下拉帘幕
Split 上下拉帘幕
Glitter 溶化
Blinds 百叶窗翻转
Box 渐缩框
pdfpicktraybypdfsize 纸张自动选择 true 默认值
pdfprintarea 打印范围 参数与pdfviewarea相同
pdfprintclip 参数与pdfviewarea相同
pdfprintpagerange 设置打印页码范围 {n n}
                       pdfprintscaling 打印放大率 AppDefault 默认
None
pdfproducer PDF加工程序 需用\hypersetup命令设置
pdfstartpage 打开到页码 1 默认值
pdfstartview PDF文件初始视图 /Fit 默认值
FitH 页宽适合窗口
FitV 页高适合窗口
FitR 适合窗口对角线
FitB 版面适合窗口
FitBH 版宽适合窗口
FitBV 版高适合窗口
XYZ 自定放大率
pdfsubject 文件主题
pdftex pdflatex驱动
pdftitle 文件标题
pdftoolbar 显示工具栏 true 默认值
pdfview 链接默认视图 参数与pdfstartview相同
pdfviewarea 显示区域 MediaBox 媒体框
CropBox 裁切框
BleedBox 出血框
TrimBox 修剪框
ArtBox 作品框
pdfviewclip 剪贴区域 参数与pdfviewarea相同
pdfwindowui 显示窗口控件 true 默认值
plainpages 页锚编号 true 默认值
ps2pdf ps2pdf驱动
raiselinks 抬高链接 false 默认值
runbordercolor run链接边框颜色 {0 .7 .7} 默认值
setpagesize 用命令设置页面尺寸 true 默认值
tex4ht TeX4ht驱动
textures Textures驱动
unicode Unicode编码书签 alse 默认值
urlbordercolor URL链接边框颜色 {0   1  1} 默认值
urlcolor 网页与电邮链接颜色 magenta 默认值
verbose 附加信息 false 默认值
vtex 使用VTeX驱动
vtexpdfmark vtexpdfmark驱动
xetex 使用XeTeX驱动
详细信息,可参考: http://www.tug.org/applications/hyperref/manual.html#x1-150005

点赞(3)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部