caption.dtx.svn-base

来自「moses开源的机器翻译系统」· SVN-BASE 代码 · 共 1,916 行 · 第 1/5 页

SVN-BASE
1,916
字号
% % Three examples:% \begin{Example}%   \begin{quote}%     |labelsep=period|%   \end{quote}%   \captionsetup{aboveskip=0pt}%   \example{labelsep=period}{\figuretext}% \end{Example}% % \begin{Example}%   \begin{quote}%     |labelsep=newline,singlelinecheck=false|%   \end{quote}%   \captionsetup{aboveskip=0pt}%   \example{labelsep=newline,singlelinecheck=false}{\figuretext}% \end{Example}% % \begin{Example}%   \begin{quote}%     |labelsep=endash|%   \end{quote}%   \captionsetup{aboveskip=0pt}%   \example{labelsep=endash}{\figuretext}% \end{Example}%% \iffalse% --------------------------------------------------------------------------- %% \fi% % \subsection{Justification}% \label{justification}% % \DescribeMacro{justification=}% As addition to the caption format you could also specify a% \emph{caption justification}; it is specified with the option% \begin{quote}%   |justification=|\meta{justification name}\quad.% \end{quote}%% You can choose one of the following:% % \begin{Options}{\OptionLabel}%   \item[justified]%   Typesets the caption as a normal paragraph. (This is the default.)% %   \item[centering]%   Each line of the caption will be centered.% % \iffalse%   \item[Centering]%   Each line of the caption will be centered, too.%   But this time the command |\Centering| of the \package{ragged2e} package%   will be used to achieve this. This difference is that this time the word%   breaking algorithm of \TeX\ will work inside the caption.% \fi% %   \item[centerlast]%   The last line of each paragraph of the caption text will be centered.% %   \item[centerfirst]%   Only the first line of the caption will be centered.% %   \item[raggedright]%   Each line of the caption will be moved to the left margin.% % \iffalse%   \item[RaggedRight]%   Each line of the caption will be moved to the left margin using%   the command |\RaggedRight| from the \package{ragged2e} package.% \fi%   \item[RaggedRight]%   Each line of the caption will be moved to the left margin, too.%   But this time the command |\RaggedRight| of the \package{ragged2e} package%   will be used to achieve this. This difference is that this time the word%   breaking algorithm of \TeX\ will work inside the caption.% %   \item[raggedleft]%   Each line of the caption will be moved to the right margin.% % \iffalse%   \item[RaggedLeft]%   Each line of the caption will be moved to the right margin using%   the command |\RaggedLeft| from the \package{ragged2e} package.% \fi% %   \item[\UserDefined]%   Own justifications can be defined using |\DeclareCaptionJustification|.%   \SeeUserDefined% \end{Options}% % Two examples:% \begin{Example}%   \begin{quote}%     |justification=centerlast|%   \end{quote}%   \captionsetup{aboveskip=0pt}%   \example{justification=centerlast}{\figuretext}% \end{Example}% % \begin{Example}%   \begin{quote}%     |format=hang,justification=raggedright|%   \end{quote}%   \captionsetup{aboveskip=0pt}%   \example{format=hang,justification=raggedright}{\figuretext}% \end{Example}% % \begin{Example}%   \begin{quote}%     |labelsep=newline,justification=centering|%   \end{quote}%   \captionsetup{aboveskip=0pt}%   \example{belowskip=\abovecaptionskip,labelsep=newline,justification=centering}{\figuretext}% \end{Example}% % \DescribeMacro{singlelinecheck=}% The standard \LaTeX\ document classes (|article|, |report|, and |book|)% automatically center a caption if it fits in one single line:%% \example{belowskip=\abovecaptionskip}{A short caption.}%% \DANGER% The \thispackage\ package adapts this behaviour and therefore usually% ignores the justification you have set with |justification=| in such case.% But you can switch this special treatment of such short captions off% with the option% \begin{quote}%   |singlelinecheck=|\meta{bool}\quad.% \end{quote}% Using |false|, |no|, |off| or |0| for \meta{bool} you switch off the% extra centering:% \begin{quote}%   |singlelinecheck=false|% \end{quote}% Doing so the above short caption would look like% % \begingroup% \captionsetup{type=figure}% \ContinuedFloat% \endgroup% \example{belowskip=\abovecaptionskip,singlelinecheck=false}{A short caption.}% % Using |true|, |yes|, |on| or |1| for \meta{bool} you switch on the% extra centering again. (The default is on.)% % \iffalse% --------------------------------------------------------------------------- %% \fi% % \subsection{Fonts}% \label{fonts}% % \DescribeMacro{font=}% \DescribeMacro{labelfont=}% \DescribeMacro{textfont=}% There are three font options which affects different parts of the caption:% One affecting the whole caption (|font|), one which only affects the caption% label and separator (|labelfont|) and at last one which only affects the% caption text (|testfont|).% You set them up using the options% \begin{quote}\begin{tabular}{@{}r@{}ll}%   |font=|      & \marg{font options} & ,\\%   |labelfont=| & \marg{font options} & and\\%   |textfont=|  & \marg{font options} & .\\% \end{tabular}\end{quote}% % And these are the available font options:% % \begin{Options}{\OptionLabel}%   \item[scriptsize]   {\scriptsize Very small size}%   \item[footnotesize] {\footnotesize The size usually used for footnotes}%   \item[small]        {\small Small size}%   \item[normalsize]   {\normalsize Normal size}%   \item[large]        {\large Large size}%   \item[Large]        {\Large Even larger size}% %   \item[up]           {\upshape Upright shape}%   \item[it]           {\itshape Italic shape}%   \item[sl]           {\slshape Slanted shape}%   \item[sc]           {\scshape Small Caps shape}% %   \item[md]           {\mdseries Medium series}%   \item[bf]           {\bfseries Bold series}% %   \item[rm]           {\rmfamily Roman family}%   \item[sf]           {\sffamily Sans Serif family}%   \item[tt]           {\ttfamily Typewriter family}% %   \item[\UserDefined]%   Own font options can be defined using |\DeclareCaptionFont|.%   \SeeUserDefined% \end{Options}% % If you use only one of these options you can omit the braces;% e.g., the options% \iffalse% \begin{quote}% \fi%   |font={small}|% \iffalse% \end{quote}% \fi% and% \iffalse% \begin{quote}% \fi%   |font=small|% \iffalse% \end{quote}% \fi% yield the same result.% % Two examples:% \begin{Example}%   \begin{quote}%     |font={small,it},labelfont=bf|%   \end{quote}%   \captionsetup{aboveskip=0pt}%   \example{font={small,it},labelfont=bf}{\figuretext}% \end{Example}% % \begin{Example}%   \begin{quote}%     |font=small,labelfont=bf,textfont=it|%   \end{quote}%   \captionsetup{aboveskip=0pt}%   \example{font=small,labelfont=bf,textfont=it}{\figuretext}% \end{Example}% % \iffalse% --------------------------------------------------------------------------- %% \fi% % \subsection{Margins and further paragraph options}% \label{margins}% % \DescribeMacro{margin=}% \DescribeMacro{width=}% For all captions you can specify \emph{either} an extra margin \emph{or}% a fixed width. You do this using the options% \begin{quote}\begin{tabular}{@{}r@{}ll}%   |margin=| & \meta{amount}   & \emph{or}\\%   |width=|  & \meta{amount} & \\% \end{tabular}\end{quote}% Nevertheless what option you use, the left and right margin will be the% same.% % Two examples illustrating this:% \begin{Example}%   \begin{quote}%     |margin=10pt|%   \end{quote}%   \captionsetup{aboveskip=0pt}%   \example{margin=10pt}{\figuretext}% \end{Example}% % \begin{Example}%   \begin{quote}%     |width=.75\textwidth|%   \end{quote}%   \captionsetup{aboveskip=0pt}%   \example{width=.75\textwidth}{\figuretext}% \end{Example}% % \DescribeMacro{parskip=}% This option is useful for captions containing more than one paragraph.% If specifies the extra vertical space inserted between them:% \begin{quote}%   |parskip=|\meta{amount}% \end{quote}% One example:% \begin{Example}%   \begin{quote}%     |margin=10pt,parskip=5pt|%   \end{quote}%   \captionsetup{aboveskip=0pt}%   \example{margin=10pt,parskip=5pt}{%     First paragraph of the caption. This one contains some test, just to%     show how these options affect the layout of the caption.% %     Second paragraph of the caption. This one contains some text, too, to%     show how these options affect the layout of the caption.}% \end{Example}% % \DescribeMacro{hangindent=}% The option% \begin{quote}%   |hangindent=|\meta{amount}% \end{quote}% is for setting up a hanging indention starting from the second line of each% paragraph. If the caption contains just a single paragraph, using this option% leads to the same result as the option |indention=| you already know about.% But if the caption contains multiple paragraphs you will notice the difference:% % \begin{Example}%   \begin{quote}%     |format=hang,indention=-.5cm|%   \end{quote}%   \captionsetup{aboveskip=0pt}%   \example{format=hang,indention=-.5cm}{%     First paragraph of the caption. This one contains some test, just to%     show how these options affect the layout of the caption.% %     Second paragraph of the caption. This one contains some text, too, to%     show how these options affect the layout of the caption.}% \end{Example}% % \begin{Example}%   \begin{quote}%     |format=hang,hangindent=-.5cm|%   \end{quote}%   \captionsetup{aboveskip=0pt}%   \example{format=hang,hangindent=-.5cm}{%     First paragraph of the caption. This one contains some test, just to%     show how these options affect the layout of the caption.% %     Second paragraph of the caption. This one contains some text, too, to%     show how these options affect the layout of the caption.}% \end{Example}% % \iffalse% --------------------------------------------------------------------------- %% \fi% % \subsection{Styles}% \label{style}% % \DescribeMacro{style=}% A suitable combination of caption options is called \emph{caption style}.% You can compare them more or less to page styles which you set up with% |\pagestyle|: The caption style provides all settings for a whole caption layout.% % You switch to an already defined caption style with the option% \begin{quote}%   |style=|\meta{style name}\quad.% \end{quote}% The \thispackage\ package usually defines only the style |default| which% puts all options you already know about to the default ones.% This means that specifying the option% \begin{quote}%   |style=default|% \end{quote}% has the same effect as specifying all these options:% \begin{quote}%   |format=default,labelformat=default,labelsep=default,|\\%   |justification=default,font=default,labelfont=default,|\\%   |textfont=default,margin=0pt,indention=0pt,parindent=0pt|\\%   |hangindent=0pt,singlelinecheck=true|% \end{quote}% % Own caption styles can be defined using |\DeclareCaptionStyle|.% \SeeUserDefined% % \iffalse% --------------------------------------------------------------------------- %% \fi% % \subsection{Skips}% % \DescribeMacro{aboveskip=}% \DescribeMacro{belowskip=}% The spaces above and below the caption are controlled by the skips% |\abovecaptionskip| and |\belowcaptionskip|. The standard \LaTeX\ document% classes |article|, |report| and |book| set |\abovecaptionskip| to |10pt|% and |\belowcaptionskip| to |0pt|.%% \pagebreak[3]% Both skips can be changed with the command |\setlength|, but you can% use these options, too:% \nopagebreak[3]% \begin{quote}\begin{tabular}{@{}r@{}ll}%   |aboveskip=| & \meta{amount} & and\\%   |belowskip=| & \meta{amount} & .\\% \end{tabular}\end{quote}%% \DescribeMacro{position=}% Using |\abovecaptionskip| and |\belowcaptionskip| has a major design flaw:% If the caption is typeset \emph{above} (and not \emph{below}) the figure% or table they are not set up very useful at default, because there will be% some extra space above the caption but no space between the caption and the% figure or table itself. (Remember: |\belowcaptionskip| is usually set to |0pt|.)% % Please compare the spacing in these small tables:

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?