File: graphics.perl

package info (click to toggle)
latex2html 2023-debian1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,924 kB
  • sloc: perl: 34,024; makefile: 437; sh: 32
file content (42 lines) | stat: -rw-r--r-- 1,567 bytes parent folder | download | duplicates (4)
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
38
39
40
41
42
# graphics.perl
#    by Bruce Miller <bruce.miller@nist.gov>
# Support of the graphics.sty standard LaTeX2e package
#    with `standard argument format'
# See graphics-support.perl
# ====================================================================== 
do_require_package('graphics-support');

# Package Options
sub do_graphics_dvips {}
sub do_graphics_draft {} # What'd be the point?
sub do_graphics_final {}
sub do_graphics_hiresbb {}
sub do_graphics_hiderotate { 
  map($GRAPHICS_OPTHIDE{$_}=1, @GRAPHICS_ROTATEOPTS); }
sub do_graphics_hidescale  { 
  map($GRAPHICS_OPTHIDE{$_}=1, @GRAPHICS_SCALEEOPTS); }

# ====================================================================== 
sub do_cmd_includegraphics {
  local($_)=@_;
  my $opt=x_next_optarg();   $opt =~ s/,/ /;
  my $op2=x_next_optarg();   $op2 =~ s/,/ /;
  my $file = x_next_arg();
  my $file_from_subdir = find_from_subdir($file);
  do_includegraphics($file,
     ($op2 ? "bb=$opt $op2" : ($opt ? "bb=0 0 $opt" : '')),
     "\\includegraphics".($opt && "[$opt]").($op2 && "[$op2]")."\{$file_from_subdir\}"); }

sub do_cmd_includegraphicsstar {
  local($_)=@_;
  my $opt=x_next_optarg();  $opt =~ s/,/ /;
  my $op2=x_next_optarg();  $op2 =~ s/,/ /;
  my $file = x_next_arg();
  my $file_from_subdir = find_from_subdir($file);
  do_includegraphics($file,
     ($op2 ? "bb=$opt $op2, clip" : ($opt ? "bb=0 0 $opt, clip" : "clip")),
     "\\includegraphics*".($opt && "[$opt]").($op2 && "[$op2]")."\{$file_from_subdir\}"); }

# ====================================================================== 
1;