Re: Any progress in adding styles in various ways?
"Scott Prahl" <[email protected]> Wed, 4 Feb 2004 12:47:56 -0800
| Newsgroups | gmane.comp.tex.latex.latex2rtf.devel |
|---|---|
| Message-ID | <[email protected]> |
On Feb 4, 2004, at 10:58 AM, Johan Henselmans wrote:
>
> On 4-feb-04, at 16:19, Scott Prahl wrote:
>>
>> On Wednesday, February 4, 2004, at 12:09 AM, Johan Henselmans wrote:
>>
>>> Most of these consist of two arguments: a caption part and a text
>>> part. I have implemented them in latex (with rtf on the next line)
>>> as:
>>>
>>> =====================================================================
>>> =====
>>> \opmerking[caption]{text} : remark
>>>
>>> {\s20\fi-283\li283\widctlpar\brdrt\brdrs\brdrw15\brsp100
>>> \brdrb\brdrs\brdrw15\brsp100 {\*\pn
>>> \pnlvlblt\ilvl10\ls2047\pnrnot0\pnf14\pnfs36\pnstart1\pn
>>> indent283\pnhang{\pntxtb
>>> &}}\aspalpha\aspnum\faauto\ls2047\ilvl10\adjustright\rin0\lin283\itap
>>> 0 \f18\fs18\lang19\cgrid \sbasedon0 \snext0 Opmerking;}
>>>
>>
>> The current style system will allow you to have a .cfg file with
>> Opmerking in it.
>> So that is not a problem. Do you want to have a better macro
>> substitution mechanism?
>> Do you have any general mechanism in mind?
>
> I don't see how I can separate the caption and the text in the style
> now. It only works for one argument stuff, not for two argument stuff.
>
> What should be possible is something like this:
> two argument latexcommands leads to:
> \rtfstuffa argument a \rtfstuffb argumentb \rtfstuffclosing
>
> EG:
> I have a command \menu{arga}{argb} : nothing fancy, for now it
> translates into a bold arga, and a slanted (argb). I cannot see how I
> can do that in the current structure of latex2rtf.
>
> Or am I missing something in the setup of latex2rtf?
No you are not missing something.
Your proposal makes sense. I think that we could extend style.cfg to
be a bit more general.
Instead of
part, \s1\qc\sb240\sa60\keepn\f*Roman*\b\fs40,\sbasedon0\snext0
part.
we could specify the number of optional and required parts. For
example,
part,0,1,\rtfarg1,\rtfend,\rtfheader part.
\part{text} produces: \rtfarg1 text \rtfend
part,1,1,\rtfoption1, \rtfarg1, \rtfend, \rtfheader part.
\part[option]{text} produces: \rtfoption1 option \ rtfarg1 text \rtfend
\part{text} produces: \ rtfarg1 text \rtfend
part,0,2,\rtfarg1, \rtfarg2, \rtfend, \rtfheader part.
\part{arg1}{text} produces: \rtfarg1 arg1 \ rtfarg2 text \rtfend
Does this make sense?
Scott
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn