📄 manual.tex
字号:
There are six macros to prepare fields:\begin{cmdsyntax}\ci{TextField}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}|\end{cmdsyntax}\begin{cmdsyntax}\ci{CheckBox}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}|\end{cmdsyntax}\begin{cmdsyntax}\ci{ChoiceMenu}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}{|\emph{choices}\verb|}|\end{cmdsyntax}\begin{cmdsyntax}\ci{PushButton}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}|\end{cmdsyntax}\begin{cmdsyntax}\ci{Submit}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}|\end{cmdsyntax}\begin{cmdsyntax}\ci{Reset}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}|\end{cmdsyntax}The way forms and their labels are laid out is determined by:\begin{cmdsyntax}\ci{LayoutTextField}\verb|{|\emph{label}\verb|}{|\emph{field}\verb|}|\end{cmdsyntax}\begin{cmdsyntax}\ci{LayoutChoiceField}\verb|{|\emph{label}\verb|}{|\emph{field}\verb|}|\end{cmdsyntax}\begin{cmdsyntax}\ci{LayoutCheckboxField}\verb|{|\emph{label}\verb|}{|\emph{field}\verb|}|\end{cmdsyntax}These macros default to \#1 \#2What is actually shown in as the field is determined by:\begin{cmdsyntax}\ci{MakeRadioField}\verb|{|\emph{width}\verb|}{|\emph{height}\verb|}|\end{cmdsyntax}\begin{cmdsyntax}\ci{MakeCheckField}\verb|{|\emph{width}\verb|}{|\emph{height}\verb|}|\end{cmdsyntax}\begin{cmdsyntax}\ci{MakeTextField}\verb|{|\emph{width}\verb|}{|\emph{height}\verb|}|\end{cmdsyntax}\begin{cmdsyntax}\ci{MakeChoiceField}\verb|{|\emph{width}\verb|}{|\emph{height}\verb|}|\end{cmdsyntax}\begin{cmdsyntax}\ci{MakeButtonField}\verb|{|\emph{text}\verb|}|\end{cmdsyntax}These macros default to \verb|\vbox to #2{\hbox to #1{\hfill}\vfill}|, except thelast, which defaults to \#1; it is used for buttons, and the special \ci{Submit} and \ci{Reset}macros.You may also want to redefine the following macros:\begin{verbatim}\def\DefaultHeightofSubmit{12pt}\def\DefaultWidthofSubmit{2cm}\def\DefaultHeightofReset{12pt}\def\DefaultWidthofReset{2cm}\def\DefaultHeightofCheckBox{0.8\baselineskip}\def\DefaultWidthofCheckBox{0.8\baselineskip}\def\DefaultHeightofChoiceMenu{0.8\baselineskip}\def\DefaultWidthofChoiceMenu{0.8\baselineskip}\def\DefaultHeightofText{\baselineskip}\def\DefaultWidthofText{3cm}\end{verbatim}\subsection{Forms environment parameters}\smallskip\noindent\begin{longtable}{>{\ttfamily}l>{\itshape}lp{9cm}}action & URL & The URL that will receive the form data if a \textsf{Submit} button is included in the form \\encoding & name & The encoding for the string set to the URL; FDF-encoding is usual, and \texttt{html} is the only valid value \\method & name & Used only when generating HTML; values can be \texttt{post} or \texttt{get} \\\end{longtable}\subsection{Forms optional parameters}Note that all colors must be expressed as RGB triples, in the range 0..1 (i.e.\ \texttt{color=0 00.5})\smallskip\noindent\begin{longtable}{>{\ttfamily}ll>{\itshape}ll}accesskey & key & & (as per HTML) \\align & number & 0 & alignment within text field; 0 is left-aligned, \\ & & & 1 is centered, 2 is right-aligned. \\backgroundcolor & & & color of box \\bordercolor & & & color of border \\bordersep & & & box border gap \\borderwidth & & & width of box border \\calculate & & & JavaScript code to calculate the value of the field \\charsize & dimen & & font size of field text \\checked & boolean & false & whether option selected by default \\color & & & color of text in box \\combo & boolean & false & choice list is `combo' style \\default & & & default value \\disabled & boolean & false & field disabled \\format & & & JavaScript code to format the field \\height & dimen & & height of field box \\hidden & boolean & false & field hidden \\ketstroke & & & JavaScript code to control the keystrokes on entry \\maxlen & number & 0 & number of characters allowed in text field \\menulength & number & 4 & number of elements shown in list \\multiline & boolean & false & whether text box is multiline \\name & name & & name of field (defaults to label) \\onblur & & & JavaScript code \\onchange & & & JavaScript code \\onclick & & & JavaScript code \\ondblclick & & & JavaScript code \\onfocus & & & JavaScript code \\onkeydown & & & JavaScript code \\onkeypress & & & JavaScript code \\onkeyup & & & JavaScript code \\onmousedown & & & JavaScript code \\onmousemove & & & JavaScript code \\onmouseout & & & JavaScript code \\onmouseover & & & JavaScript code \\onmouseup & & & JavaScript code \\onselect & & & JavaScript code \\password & boolean & false & text field is `password' style \\popdown & boolean & false & choice list is `popdown' style \\radio & boolean & false & choice list is `radio' style \\readonly & boolean & false & field is readonly \\tabkey & & & (as per HTML) \\validate & & & JavaScript code to validate the entry \\value & & & initial value \\width & dimen & & width of field box\end{longtable}\section{Defining a new driver}A hyperref driver has to provide definitions for eight macros:\smallskip\noindent 1. \verb|\hyper@anchor|\noindent 2. \verb|\hyper@link|\noindent 3. \verb|\hyper@linkfile|\noindent 4. \verb|\hyper@linkurl|\noindent 5. \verb|\hyper@anchorstart|\noindent 6. \verb|\hyper@anchorend|\noindent 7. \verb|\hyper@linkstart|\noindent 8. \verb|\hyper@linkend|\smallskipThe draft option defines the macros as follows\qquad\begin{verbatim}\let\hyper@@anchor\@gobble\gdef\hyper@link##1##2##3{##3}%\def\hyper@linkurl##1##2{##1}%\def\hyper@linkfile##1##2##3{##1}%\let\hyper@anchorstart\@gobble\let\hyper@anchorend\@empty\let\hyper@linkstart\@gobbletwo\let\hyper@linkend\@empty\end{verbatim}\section{Special support for other packages}\textsf{hyperref} aims to cooperate with other packages, but there areseveral possible sources for conflict, such as\begin{itemize}\item Packages that manipulate the bibliographic mechanism. PeterWilliam's \textsf{harvard} package is supported. However, therecommended package is Patrick Daly's \textsf{natbib} package that hasspecific \textsf{hyperref} hooks to allow reliable interaction. Thispackage covers a very wide variety of layouts and citation styles, allof which work with \textsf{hyperref}.\item Packages that typeset the contents of the \ci{label} and \ci{ref}macros, such as \textsf{showkeys}. Since the \textsf{hyperref} packageredefines these commands, you must set \texttt{implicit=false} for thesepackages to work.\item Packages that do anything serious with the index.\end{itemize}The \textsf{hyperref} package is distributed with variants on two usefulpackages designed to work especially well with it. These are \textsf{xr}and \textsf{minitoc}, which support crossdocument links using \LaTeX'snormal \verb|\label/\ref| mechanisms and per-chapter tables of contents,respectively.\section{History and acknowledgments}The original authors of \textsf{hyperbasics.tex} and\textsf{hypertex.sty}, from which this package descends, are TanmoyBhattacharya (\texttt{tanmoy@qcd.lanl.gov}) and Thorsten Ohl\linebreak(\texttt{thorsten.ohl@physik.th-darmstadt.de}). \textsf{hyperref}started as a simple port of their work to \LaTeXe\ standards, buteventually I rewrote nearly everything, because I didn't understand alot of the original, and was only interested in getting it to work with\LaTeX. I would like to thank Arthur Smith, Tanmoy Bhattacharya, MarkDoyle, Paul Ginsparg, David Carlisle, T.\ V.\ Raman and Leslie Lamportfor comments, requests, thoughts and code to get the package into itsfirst useable state. Various other people are mentioned at the point inthe source where I had to change the code in later versions because ofproblems they found.Tanmoy found a great many of the bugs, and (even better) often providedfixes, which has made the package more robust. The days spent onRev\TeX\ are entirely due to him! The investigations of Bill Moss(\texttt{bmoss@math.clemson.edu}) into the later versions includingnative PDF support uncovered a good many bugs, and his testing isappreciated. Hans Hagen (\texttt{pragma@pi.net}) provided a lot ofinsight into PDF.Berthold Horn provided help, encouragement and sponsorship for the\textsf{dvipsone} and \textsf{dviwindo} drivers. Sergey Lesenko providedthe changes needed for \textsf{dvipdf}, and \Hanh{} supplied all theinformation needed for \textsf{pdftex}. Patrick Daly kindly updated his\textsf{natbib} package to allow easy integration with\textsf{hyperref}. Michael Mehlich's \textsf{hyper} package (developedin parallel with \textsf{hyperref}) showed me solutions for someproblems. Hopefully the two packages will combine one day.The forms creation section owes a great deal to: T.\ V.\ Raman, forencouragement, support and ideas; Thomas Merz, whose book \emph{WebPublishing with Acrobat/PDF} provided crucial insights; D.\ P.\ Story,whose detailed article about pdfmarks and forms solved many practicalproblems; and Hans Hagen, who explained how to do it in \textsf{pdftex}.Steve Dandy recreated the manual source in July 2003 after it had beenlost.Especial extra thanks to David Carlisle for the \textsf{backref} module,the ps2pdf and dviwindo support, frequent general rewrites of my badcode, and for working on changes to the \textsf{xr} package to suit\textsf{hyperref}.\begingroup \makeatletter \let\chapter=\section % subsections goes into bookmarks but not toc \hypersetup{bookmarksopenlevel=1} \addtocontents{toc}{\protect\setcounter{tocdepth}{1}} % The \section command acts as \subsection. % Additionally the title is converted to lowercase except % for the first letter. \def\section{% \let\section\lc@subsection \lc@subsection } \def\lc@subsection{% \@ifstar{\def\mystar{*}\lc@sec}% {\let\mystar\@empty\lc@sec}% } \def\lc@sec#1{% \lc@@sec#1\@nil } \def\lc@@sec#1#2\@nil{% \begingroup \def\a{#1}% \lowercase{% \edef\x{\endgroup \noexpand\subsection\mystar{\a#2}% }% }% \x } \include{fdl}\endgroup\end{document}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -