The Quote environment seems broken, starting from v 0.8.1. It was fine in v 0.8.0.
In LaTeX, an empty line is inserted between each two lines. This in itself seems undesirable, but it leads to complete failure when such an empty line is inserted in the middle of a Deplate macro.
I'm trying to repair this by patching the Ruby sources, but I'm not very familiar with these sources.
I have now changed deplate/fmt/latex.rb by simply disabling the wrapping in the Quote environment.
I'll publish a patch at
where I maintain the Deplate RPM package for my opensuse meta-distribution.
It seems the problem stems from format_quote() in latex.rb. The body gets wrapped twice and thus inserting the extraneous newlines. The easiest solution would be to remove the call to wrap_text():
env = invoker.args["long"] ? "quotation" : "quote"
# elt = wrap_text(invoker.elt)
elt = invoker.elt
format_environment(invoker, env, elt)
I'm not sure if this is a more subtle problem though. I'll have to check when this problem was introduced but this could take a while.
This problem is quite pervasive.
I've had to disable wrap_text in a lot of places in latex.rb in order to get texts compiled that compiled without problems in v 0.8.
There seems to be a cumulation of line-wrapping.
In any case, I don't see any merit in wrapping what doesn't need to be wrapped in a latex text. If the author of the deplate source text doesn't want it wrapped in the source, why should he want it wrapped for LaTeX?
Could you please send me a sample input file so that I can better understand these problems?
Most newlines are stripped when reading the input (with the exception of verbatim, native etc.).
For the records, you should be able to switch off line wrapping by setting wrapMargin to 0.
I'm having the same problem with footnotes.
For the record
does not do anything for me.
I second the suggestion above -- I don't wrap my txt files, and I don't want my tex files wrapped either.
The problem with not wrapping tex files is that certain implementations of tex have a limit on the line size. Basically, that's the reason why deplate does all this wrapping in the first place.
It's possible that you'll also have to set
The wrap method currently is in a state of flux.
I'll check the footnote problem. My test cases ignore whitespace which in general is a good thing but is also the reason why this problem passed unobserved.
The version in CVS is supposed to solve this problem. Maybe somebody could give it a try.
I checked out the CVS version, built the gem, and installed it (I'm a ruby newb, so that was easiest).
And it works! Cool. Thanks.
Thanks for testing.
In the meantime, I released 0.8.3 which should be the CVS version you checked out.
In general, the CVS version should be good. It's possible though that new features change until the next release.
Log in to post a comment.