File: fppdf.sty

package info (click to toggle)
menhir 20201216-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,056 kB
  • sloc: ml: 23,365; makefile: 181; sh: 95; lisp: 8
file content (37 lines) | stat: -rw-r--r-- 1,312 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
% This tiny package invokes ``hyperref'' with appropriate options.
% Three modes are provided:
%   if \fppdf is defined, we configure ``hyperref'' for PDF output.
%   otherwise, if WhizzyTeX is active, we do configure ``softref'' for producing DVI output
%     containing ``advi''-style hyperlinks.
%   otherwise, we configure nothing.
\ProvidesPackage{fppdf}

\@ifundefined{fppdf}{
  \newcommand{\texorpdfstring}[2]{#1}
  \newcommand{\href}[2]{#2}
  \@ifundefined{WhizzyTeX}{
    % PostScript output.
    \typeout{No hyperlinks.}
  }{
    % WhizzyTeX output.
    \typeout{Hyperlinks in advi style.}
    %
    % Dfinissons les commandes \softlink et \softtarget, employes par locallabel,
    % de faon  ce que les labels de preuves deviennent des hyperliens.
    %
    \edef\hyper@quote{\string"}
    \edef\hyper@sharp{\string#}
    \def \softlink #1#2{\special 
      {html:<A href=\hyper@quote\hyper@sharp#1\hyper@quote>}#2\special
      {html:</A>}}
    \def \softtarget #1#2{\special
      {html:<A name=\hyper@quote#1\hyper@quote>}#2\special
      {html:</A>}}
  }
}{
  % PDF output.
  \typeout{Hyperlinks in pdflatex style.}
  \usepackage[bookmarks=true,bookmarksopen=true,colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref}
  \let\softlink\hyperlink
  \let\softtarget\hypertarget
}