[latex3-commits] [git/LaTeX3-latex3-pdfresources] backendtest: doc view (c5fb92e)
Ulrike Fischer
fischer at troubleshooting-tex.de
Sun Aug 25 17:57:28 CEST 2019
Repository : https://github.com/latex3/pdfresources
On branch : backendtest
Link : https://github.com/latex3/pdfresources/commit/c5fb92eb517d6db59d4e9735ca7ffcc5faaa9942
>---------------------------------------------------------------
commit c5fb92eb517d6db59d4e9735ca7ffcc5faaa9942
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sun Aug 25 17:57:28 2019 +0200
doc view
>---------------------------------------------------------------
c5fb92eb517d6db59d4e9735ca7ffcc5faaa9942
pdfresources.dtx | 81 +++++++++++++-------------------------------------------
1 file changed, 18 insertions(+), 63 deletions(-)
diff --git a/pdfresources.dtx b/pdfresources.dtx
index 6a9ca3e..eea9a71 100644
--- a/pdfresources.dtx
+++ b/pdfresources.dtx
@@ -1814,9 +1814,7 @@
% for the same value with luatex and pdftex -- the other backends normally
% avoid this problem.
% We therefore setup a property which is filled and executed at a sensible
-% (not yet found) place.
-% \cs{pdfcatalog} has an option \texttt{openaction} to set the start view options.
-% This is ignored here but set in a separate command (to be in sync with other drivers).
+% (not fixed) place.
% /AF is even an array of dictionaries.
% There is probably no way to test what has already been added to the catalog,
% so doublettes can only be avoided with ``don't do it''.
@@ -2325,75 +2323,32 @@
}
% \end{macrocode}
% \end{macro}
-% XXXXXXXXXXXX
-%=================================================================
-% \subsection{other stuff}
-% \subsubsection{Openaction}
-% \begin{NOTE}{UF}
-% does this need a specific command???
-% the object number of the page is in \verb+\pdfpageref+, so probably it can
-% be handled along with the catalog commands.
-% \end{NOTE}
-% \begin{macrocode}
-
-\bool_if:nT {\sys_if_engine_pdftex_p: && \sys_if_output_pdf_p: }
-{
- \cs_new_protected:Nn \@@_backend_docview:nn %#1 page number, #2 e.g. /FitH
- {
- \pdfcatalog { } openaction~goto~page #1 {#2}
- }
-}
-\sys_if_engine_luatex:T
-{
- %allow version 2.0 in luatex. Needs sorting out later.
- \@namedef{Hy at pdfversion@2.0}{10}%
- \cs_new_protected:Nn \@@_backend_docview:nn %#1 page number, #2 e.g. /FitH
- {
- \pdfextension catalog { } openaction~goto~page #1 {#2}
- }
-}
-%need check ...
-\sys_if_engine_xetex:T
-{ %%
- \cs_new_protected:Nn \@@_backend_docview:nn
+% \subsubsection{Doc View / Openaction}
+% \begin{function}[added = 2019-08-18]
+% {\pdf_docview:nn}
+% \begin{syntax}
+% \cs{\pdf_docview:nn} \Arg{page} \Arg {view}
+% \end{syntax}
+% This command allows to set the OpenAction array. The \meta{page}
+% is an absolute page number. \Arg{view} a string for the destination
+% without the leading slash. Examples are e.g. |XYZ left top zoom| or |Fit|.
+% The OpenAction uses (and could also be set directly with)
+% \cs{\pdf_catalog_gput:nn}.
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \pdf_docview:nn #1 #2
{
- \@@_backend:n {docview << /OpenAction[@page#1~#2]>>}
+ \pdf_catalog_gput:nn { Openaction }[\pdf_pageobject_ref:n {#1}~/#2]
}
-}
-%dvips ????????????????
-\bool_if:nT {\sys_if_engine_pdftex_p: && !\sys_if_output_pdf_p: }
-{
- \cs_new_protected:Nn \@@_backend_docview:nn %#1 page number, #2 e.g. /FitH
- {
- }
-}
% \end{macrocode}
-%
-%
-% \section{Management code / pdf Module}
-%<@@=pdf>
-% \subsection{Objects and other rather low-level stuff}
-% NEEDS REVISING!!!
+
+% ??????????
% \begin{macrocode}
\cs_set_eq:NN \pdf_link_margin:n \@@_backend_link_margin:n
\cs_set_eq:NN \pdf_link_last: \@@_backend_link_last:
% \end{macrocode}
-
-
-% \subsubsection{Doc View}
-% This commands set Doc View options. This is rather crude /needs review. For now we
-% assume that only the equivalent of \verb+openaction~goto~page\@pdfstartpage{\@pdfstartview}+ in
-% hyperref is needed. The format of the second argument is quite unclear (slash, casing).
-% \begin{macrocode}
-\cs_new_protected:Npn \pdf_docview:nn #1 #2
- {
- \@@_backend_docview:nn {#1}{#2}
- }
-
-% \end{macrocode}
-
% \subsection{Setting / comparing pdf versions}
% The code assumes that the versions are two integers separated by a period.
% The pdf version should be set rather early, before any object has been written.
More information about the latex3-commits
mailing list