Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Thank you kindly. That is exactly what was needed to move me off of stuck. I just deployed the app tonight. I believe it to be doing the trick as I write, based on feedback from three testers (including myself).

And the working code looks like this:

$self->{'tt'} = Template->new({ INCLUDE_PATH => $self->{'cfg'}->param("pdf.include_path"), OUTPUT_PATH => $self->{'cfg'}->param("pdf.tmp_path") }); $self->{'tt'}->process($template,{ field => $field },$self->{'pdf_ou +tput'} . '.tex',binmode => 1) || die $self->{'tt'}->error(); my $cwd = cwd(); chdir $self->{'cfg'}->param("pdf.tmp_path"); $ENV{'USER'} = $self->{'cfg'}->param("pdf.user"); $ENV{'HOME'} = $self->{'cfg'}->param("pdf.home"); `latexmk -pdf $tmp_file.tex`; chdir $cwd; rename "$tmp_file.pdf", $file; unlink <$tmp_file.*>; $self->{'pdf_output_file'} = $file; $self->{'pdf_output_file_name'} = $self->{'pdf_output'} . '.pdf';
As I see this posted, it seems I ought to refactor some of my config paramters which no longer point to pdf files but now to tex files. But other than that, your solution moved me forward in rather quick style.

This is meeting all of my requirements, with respect to filing the resulting file appropriately and avoiding the risk of race conditions which would corrupt our archives. I have control over what to name the files.

So far, the only complaint I've had about latexmk is how noisy it has been when I'm running my test suite. I'll have to review the --help on that script again. I'll bet their is a switch to quiet it down. But it was an easy install. I would be more comfortable calling methods somehow, for some reason using backticks other than in a quick throw-away script makes me nervous. But I have no idea if there is any reason for that.

With this trick, the only thing holding me back now is my rudimentary latex skills.

But I'd guess this will give me more reason to practice with that.

Thanks again for the lead.

-- Hugh

if( $lal && $lol ) { $life++; }
if( $insurance->rationing() ) { $people->die(); }

In reply to Re^2: Template::Latex Frustrations . . . by hesco
in thread Template::Latex Frustrations . . . by hesco

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2023-05-28 00:05 GMT
Find Nodes?
    Voting Booth?

    No recent polls found