summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3experimental/l3pdf.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-01-30 03:00:54 +0000
committerNorbert Preining <norbert@preining.info>2021-01-30 03:00:54 +0000
commit431a21790bcbf7d842f7a3d5e6e3eaef4ae823af (patch)
tree5ae95f1f34bf81d03294fc88ed5cab6eb0e25a88 /macros/latex/contrib/l3experimental/l3pdf.dtx
parentbc31a53b31d92ddf5db3e7df811734a0141f8b3f (diff)
CTAN sync 202101300300
Diffstat (limited to 'macros/latex/contrib/l3experimental/l3pdf.dtx')
-rw-r--r--macros/latex/contrib/l3experimental/l3pdf.dtx94
1 files changed, 90 insertions, 4 deletions
diff --git a/macros/latex/contrib/l3experimental/l3pdf.dtx b/macros/latex/contrib/l3experimental/l3pdf.dtx
index e51606a130..218f4bd5d5 100644
--- a/macros/latex/contrib/l3experimental/l3pdf.dtx
+++ b/macros/latex/contrib/l3experimental/l3pdf.dtx
@@ -2,7 +2,7 @@
%
%% File: l3pdf.dtx
%
-% Copyright(C) 2019,2020 The LaTeX3 Project
+% Copyright(C) 2019-2021 The LaTeX Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -38,7 +38,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2020-10-27}
+% \date{Released 2020-01-29}
%
% \maketitle
%
@@ -175,6 +175,74 @@
% initialised.
% \end{function}
%
+% \subsection{Destinations}
+%
+% Destinations are the places a link jumped too.
+% Unlike the name may suggest they don't described
+% an exact location in the PDF. Instead a destination contains a reference to
+% a page along with an instruction how to display this page.
+% The normally used \enquote{XYZ \textit{top left zoom}} for example instructs
+% the viewer to show the page with the given \textit{zoom} and
+% the top left corner at the \textit{top left} coordinates---which then gives
+% the impression that there is an anchor at this position.
+%
+% If an instruction takes a coordinate, it is calculated by the following
+% commands relative to the location the command is issued.
+% So to get a specific coordinate one has to move the command to the right place.
+%
+% \begin{function}[added = 2021-01-03]
+% {\pdf_destination:nn}
+% \begin{syntax}
+% \cs{pdf_destination:nn} \Arg{name} \Arg{type or integer}
+% \end{syntax}
+% This creates a destination. \Arg{type or integer} can be one of |fit|, |fith|,
+% |fitv|, |fitb|, |fitbh|, |fitbv|, |fitr|, |xyz|
+% or an integer representing a scale factor in percent.
+% |fitr| here gives only a lightweight version of |/FitR|:
+% The backend code defines |fitr| so that it will with pdf\LaTeX{} and
+% Lua\LaTeX{} use the coordinates of the surrounding box,
+% with \texttt{dvips} and \texttt{dvipdfmx} it falls back to |fit|.
+% For full control use \cs{pdf_destination:nnnn}.
+%
+% The keywords match to the PDF names as described in the following tabular.
+%
+% \medskip
+% \noindent\begin{tabular}{ll>{\raggedright\arraybackslash}p{6cm}}
+% \toprule
+% Keyword & PDF & Remarks \\ \midrule
+% |fit| & |/Fit|
+% & Fits the page to the window\\
+% |fith| & |/FitH| \textit{top}
+% & Fits the width of the page to the window \\
+% |fitv| & |/FitV| \textit{left}
+% & Fits the height of the page to the window \\
+% |fitb| & |/FitB|
+% & Fits the page bounding box to the window \\
+% |fitbh|& |/FitBH| \textit{top}
+% & Fits the width of the page bounding box to the window. \\
+% |fitbv|& |/FitBV| \textit{left}
+% & Fits the height of the page bounding box to the window. \\
+% |fitr| & |/FitR| \textit{left bottom right top}
+% & Fits the rectangle specified by the four coordinates to the window
+% (see above for the restrictions)\\
+% |xyz| & |/XYZ| \textit{left top} null
+% & Sets a coordinate but doesn't change the zoom.\\
+% \Arg{integer} & |/XYZ| \textit{left top zoom}
+% & Sets a coordinate and a zoom meaning \Arg{integer}\%.
+% \\\bottomrule
+% \end{tabular}
+%
+% \end{function}
+%
+% \begin{function}[added = 2021-01-17]
+% {\pdf_destination:nnnn}
+% \begin{syntax}
+% \cs{pdf_destination:nnnn} \Arg{name} \Arg{width} \Arg{height} \Arg{depth}
+% \end{syntax}
+% This creates a destination with |/FitR| type with the given dimensions relative
+% to the current location. The destination is in a box of size zero, but it doesn't
+% switch to horizontal mode.
+% \end{function}
% \end{documentation}
%
% \begin{implementation}
@@ -190,7 +258,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3pdf}{2020-10-27}{}
+\ProvidesExplPackage{l3pdf}{2020-01-29}{}
{L3 Experimental core PDF support}
% \end{macrocode}
%
@@ -347,6 +415,24 @@
% \end{macrocode}
% \end{macro}
%
+% \subsection{Destinations}
+%
+% \begin{macro}{\pdf_destination:nn}
+% \begin{macrocode}
+\cs_new_protected:Npn \pdf_destination:nn #1 #2
+ { \@@_backend_destination:nn {#1}{#2} }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pdf_destination:nnnn}
+% \begin{macrocode}
+\cs_new_protected:Npn \pdf_destination:nnnn #1 #2 #3 #4
+ {
+ \hbox_to_zero:n
+ { \@@_backend_destination:nnnn {#1} {#2} {#3} {#4} }
+ }
+% \end{macrocode}
+% \end{macro}
% \begin{macrocode}
%</package>
% \end{macrocode}