Help for this page

Select Code to Download


  1. or download this
    print <<'END';
    \documentclass{article}
    ...
    \usepackage{fullpage}
    \begin{document}
    END
    
  2. or download this
    sub substitute_vars {
      my ($template, $hash) = @_;
      (my $out = $template) =~ s/\${([^}]+)}/$$hash{$1}/ge;
      $out;
    }
    
  3. or download this
    my $template = <<'TEMPLATE_END';
    \section{${imfile}}
    ...
      chomp;
      print substitute_vars($template, { imfile => $_ } );
    }
    
  4. or download this
    \newcommand{\insert_figures}[1]{
    \section{#1}
    ...
    ...
    \newpage
    }