作者:金良([email protected]) csdn博客:http://blog.csdn.net/u012176591
导言区引入包\usepackage{hyperref},用命令pdfLaTeX进行编译,出错:
! Improper alphabetic constant. <to be read again> \@tempcntb l.54 \section{前言} ?问题扩展
\usepackage[CJKbookmarks=true]{hyperref}
错误就消失了。
\usepackage[colorlinks,linkcolor=red,anchorcolor=blue,citecolor=green]{hyperref}“colorlinks”的意思是将超链接以颜色来标识,而并非使用默认的方框来标识。
3.5 Extension options extension text Set the file extension (e.g. dvi) which will be appended to file links created if you use the xr package. hyperfigures boolean backref text 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. Supported values are section, slide, page, none, or false. If no value is given, section is taken as default. 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. Unlike colored boxes, the colored text remains when printing. 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 cyan 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 magenta Color for linked URLs. allcolors color Set all color options (without border and field options). frenchlinks boolean false Use small caps instead of color for links. hidelinks Hide links (removing color and border). Note that all color names must be defined before use, following the normal system of the standard LATEX color package. 3.6 PDF-specific display options bookmarks boolean true A set of Acrobat bookmarks are written, in a manner similar to the table of contents, requiring two passes of LATEX. Some postprocessing of the bookmark file (file extension .out) may be needed to translate LATEX codes, since bookmarks must be written in PDFEncoding. To aid this process, the .out file is not rewritten by LATEX if it is edited to contain a line \let\WriteBookmarks\relax bookmarksopen boolean false If Acrobat bookmarks are requested, show them with all the subtrees expanded. bookmarksopenlevel parameter level (\maxdimen) to which bookmarks are open bookmarksnumbered boolean false If Acrobat bookmarks are requested, include section numbers. bookmarkstype text toc to specify which ‘toc’ file to mimic CJKbookmarks boolean false This option should be used to produce CJK bookmarks. Package hyperref supports both normal and preprocessed mode of the CJK package; during the creation of bookmarks, it simply replaces CJK’s macros with special versions which expand to the corresponding character codes. Note that without the ‘unicode’ option of hyperref you get PDF files which actually violate the PDF specification because non-Unicode character codes are used – some PDF readers localized for CJK languages (most notably Acroread itself) support this. Also note that option ‘CJKbookmarks’ cannot be used together with option ‘unicode’. No mechanism is provided to translate non-Unicode bookmarks to Unicode; for portable PDF documents only Unicode encoding should be used. pdfhighlight name /I How link buttons behave when selected; /I is for inverse (the default); the other possibilities are /N (no effect), /O (outline), and /P (inset highlighting). citebordercolor RGB color 0 1 0 The color of the box around citations filebordercolor RGB color 0 .5 .5 The color of the box around links to files linkbordercolor RGB color 1 0 0 The color of the box around normal links menubordercolor RGB color 1 0 0 The color of the box around Acrobat menu links urlbordercolor RGB color 0 1 1 The color of the box around links to URLs runbordercolor RGB color 0 .7 .7 Color of border around ‘run’ links allbordercolors Set all border color options pdfborder 0 0 1 The style of box around links; defaults to a box with lines of 1pt thickness, but the colorlinks option resets it to produce no border.