File: graphixx.perl

package info (click to toggle)
latex2html 2015-debian1-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 7,652 kB
  • ctags: 3,386
  • sloc: perl: 30,941; makefile: 429; sh: 155
file content (44 lines) | stat: -rw-r--r-- 1,441 bytes parent folder | download | duplicates (7)
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
43
44
# graphicx.perl
#    by Bruce Miller <bruce.miller@nist.gov>
# Support of the graphicx.sty standard LaTeX2e package
#    with `extended argument format'
# See graphics-support.perl
# ====================================================================== 
do_require_package('graphics-support');

# Package Options
sub do_graphicx_dvips {}
sub do_graphicx_draft {}
sub do_graphicx_final {}
sub do_graphicx_hiresbb {}
sub do_graphicx_hiderotate { 
  map($GRAPHICS_OPTHIDE{$_}=1, @GRAPHICS_ROTATEOPTS); }
sub do_graphicx_hidescale  { 
  map($GRAPHICS_OPTHIDE{$_}=1, @GRAPHICS_SCALEEOPTS); }

# ====================================================================== 
sub do_cmd_includegraphics {
  local($_)=@_;
  my $opt=x_next_optarg();
  my $op2=x_next_optarg();
  my $file = x_next_arg();
  if($op2){			# 2 optional args? Use `standard' arg format
    $opt = "bb=$opt,$op2"; $opt =~ s/,/ /g; }
  do_includegraphics($file,$opt,
		    "\\includegraphics".($opt && "[$opt]")."\{$file\}"); }

sub do_cmd_includegraphicsstar {
  local($_)=@_;
  my $opt=x_next_optarg();
  my $op2=x_next_optarg();
  my $file = x_next_arg();
  if($op2){			# 2 optional args? Use `standard' arg format
    $opt = "bb=$opt,$op2"; $opt =~ s/,/ /g; }
  $opt .= ", " if $opt;
  $opt .= "clip";
  do_includegraphics($file,"$opt",
		    "\\includegraphics".($opt && "[$opt]")."\{$file\}"); }

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