Skip to content

Commit

Permalink
fix bug in copying support files when space in path; run bibtex when …
Browse files Browse the repository at this point in the history
…creating PDF
  • Loading branch information
Fletcher T. Penney authored and Fletcher T. Penney committed Sep 25, 2009
1 parent 107db04 commit cfc39e4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions bin/MultiMarkdown/Support.pm
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ sub ProcessMMD2PDF {
# These are not all necessary for simple files, but are included to try
# and be as thorough as possible... Sort of a poor man's latexmk.pl

my $tex_string = "; pdflatex mmd.tex; makeindex -t mmd.glg -o mmd.gls -s mmd.ist mmd.glo; makeindex -s `kpsewhich basic.gst` -o mmd.gls mmd.glo; pdflatex mmd.tex; pdflatex mmd.tex; pdflatex mmd.tex; pdflatex mmd.tex";
my $tex_string = "; pdflatex mmd.tex; bibtex mmd; makeindex -t mmd.glg -o mmd.gls -s mmd.ist mmd.glo; makeindex -s `kpsewhich basic.gst` -o mmd.gls mmd.glo; pdflatex mmd.tex; pdflatex mmd.tex; pdflatex mmd.tex; pdflatex mmd.tex";

if ($^O =~ /MSWin/) {
$tex_string = "& pdflatex mmd.tex & makeindex -t mmd.glg -o mmd.gls -s mmd.ist mmd.glo & makeindex -s `kpsewhich basic.gst` -o mmd.gls mmd.glo & pdflatex mmd.tex & pdflatex mmd.tex & pdflatex mmd.tex & pdflatex mmd.tex";
$tex_string = "& pdflatex mmd.tex & bibtex mmd & makeindex -t mmd.glg -o mmd.gls -s mmd.ist mmd.glo & makeindex -s `kpsewhich basic.gst` -o mmd.gls mmd.glo & pdflatex mmd.tex & pdflatex mmd.tex & pdflatex mmd.tex & pdflatex mmd.tex";
}
PDFEngine($MMDPath, $input_file, $tex_string, $text);

Expand All @@ -163,10 +163,10 @@ sub ProcessMMD2PDFXeLaTeX {
# These are not all necessary for simple files, but are included to try
# and be as thorough as possible... Sort of a poor man's latexmk.pl

my $tex_string = "; xelatex mmd.tex; makeindex -t mmd.glg -o mmd.gls -s mmd.ist mmd.glo; makeindex -s `kpsewhich basic.gst` -o mmd.gls mmd.glo; xelatex mmd.tex; xelatex mmd.tex; xelatex mmd.tex; xelatex mmd.tex";
my $tex_string = "; xelatex mmd.tex; bibtex mmd; makeindex -t mmd.glg -o mmd.gls -s mmd.ist mmd.glo; makeindex -s `kpsewhich basic.gst` -o mmd.gls mmd.glo; xelatex mmd.tex; xelatex mmd.tex; xelatex mmd.tex; xelatex mmd.tex";

if ($^O =~ /MSWin/) {
$tex_string = "& xelatex mmd.tex & makeindex -t mmd.glg -o mmd.gls -s mmd.ist mmd.glo & makeindex -s `kpsewhich basic.gst` -o mmd.gls mmd.glo & xelatex mmd.tex & xelatex mmd.tex & xelatex mmd.tex & xelatex mmd.tex";
$tex_string = "& xelatex mmd.tex & bibtex mmd & makeindex -t mmd.glg -o mmd.gls -s mmd.ist mmd.glo & makeindex -s `kpsewhich basic.gst` -o mmd.gls mmd.glo & xelatex mmd.tex & xelatex mmd.tex & xelatex mmd.tex & xelatex mmd.tex";
}
PDFEngine($MMDPath, $input_file, $tex_string, $text);
}
Expand Down Expand Up @@ -231,7 +231,9 @@ sub PDFEngine {
} else {
# Not in Windows
$temp_tex_file = "$temp_folder/mmd.tex";
@support_files = <$parent_folder/*.{bib,pdf,png,gif,jpg}>;
my $temp_parent_folder = $parent_folder;
$temp_parent_folder =~ s/ /\\ /g;
@support_files = <$temp_parent_folder/*.{bib,pdf,png,gif,jpg}>;

# Try to be sure we have access to the LaTeX binaries in our PATH,
# especially if they were installed by Fink
Expand Down

0 comments on commit cfc39e4

Please sign in to comment.