Re: LaTeX2rtf question double spacing question

Scott Prahl <[email protected]> Thu, 13 Sep 2007 17:25:53 -0700
Newsgroups gmane.comp.tex.latex.latex2rtf.devel
Message-ID <[email protected]>
> I just received my copy of the RTF pocket guide, so that I might
> actually understand both the input _and_ the output of latex2rtf.
> Double spacing does indeed seem pretty straightforward, and I've added
> a simple command that will recognize the \doublespacing command (in
> the preamble at least) and modify the line spacing options to \pard
> accordingly. I've tested it on a basic text file, and it seems to work
> properly - without \doublespacing the document looks normal, and with
> \doublespacing the only thing that changes is, thankfully, the line
> spacing.

-    fprintRTF("\\pard\\q%c", alignment);
+    fprintRTF("\\pard\\q%c\\sl%i\\slmult1 ", alignment,  
g_line_spacing);

This is nice because it works.  Long term, I think that we should be
using style sheets for this sort of thing.  We should emit the proper
style sheet codes for a "normal" paragraph, but the style definition
for a normal paragraph should include double spacing.

One last thing.  When you add new functionality, you should add a new
test file to the latex files in the test directory.  In this case, the
file might contain a simple equation, table, to verify that these do
not fail.

> I'm not sure what this will do to things other than straight text, as
> I haven't searched out all the possible routes that lead to the
> CmdStartParagraph(int) function, so there may yet be surprises. Let me
> know if you find anything that breaks with the changes (likely
> suspects are tables, equations, captions etc.), or if there are more
> sophisticated options you'd like added.

You're right this is a bit scary because CmdStartParagraph() is used
in many, many places.  I looked at a few of the test files and they
look fine.

Scott

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/