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