Re: Re: the latest style.cfg version
Johan Henselmans <[email protected]> Sun, 4 Jan 2004 13:10:24 +0100
| Newsgroups | gmane.comp.tex.latex.latex2rtf.devel |
|---|---|
| Message-ID | <[email protected]> |
On 2-jan-04, at 18:42, Scott Prahl wrote:
> (Moving the conversation back to the mailing list)
>
> On Friday, January 2, 2004, at 02:12 AM, Johan Henselmans wrote:
>
>> I am confronted with the situation that my publisher wants his
>> document in rtf, combined with his stylesheet. From that the document
>> is converted into a layout document in Corel Ventura. Not using his
>> stylesheet makes it horrible complicated to convert the document. I
>> assume there are more comparable situations. Making latex2rtf
>> adjustable for that, including adding list items, or having the
>> possibility to change listitems in such a way that one can insert the
>> code one wants to use for listitems would enhance latex2rtf >
>> enormously.
>
> I agree that this would be a good thing. I am willing to help to make
> it possible.
> Let us continue to work out the details by getting one style at a time
> to work.
> Let's get everything else working before attacking lists and tables.
Fine. Most of the stuff (headings) is already working. The indexes are
made by the publisher. There are a few commands that they implement
themselves, a remark style, a warning style and a tip style.
Furthermore they implement a picture with a caption, it is a pointer to
the picture, not the picture itself. Then menus and buttons have a
specific style and CLI commands. Furthermore each chapter starts with a
special section, called "you will learn..." and an introduction.
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\itap0
\f18\fs18\lang19\cgrid \sbasedon0 \snext0 Opmerking;}
========================================================================
==
\waarschuwing[caption]{text} : warning
{\s22\fi-283\li283\widctlpar\brdrt\brdrs\brdrw15\brsp100
\brdrb\brdrs\brdrw15\brsp100 {\*\pn
\pnlvlblt\ilvl10\ls2047\pnrnot0\pnf14\pnfs36\pnstart1\pn
indent283\pnhang{\pntxtb
M}}\aspalpha\aspnum\faauto\ls2047\ilvl10\adjustright\rin0\lin283\itap0
\f18\fs18\lang19\cgrid \sbasedon21 \snext0 Waarschuwing;}
========================================================================
==
\tip[caption]{text}: tip
{\s21\fi-283\li283\widctlpar\brdrt\brdrs\brdrw15\brsp100
\brdrb\brdrs\brdrw15\brsp100 {\*\pn
\pnlvlblt\ilvl10\ls2047\pnrnot0\pnf14\pnfs36\pnstart1\pn
indent283\pnhang{\pntxtb
\'fc}}\aspalpha\aspnum\faauto\ls2047\ilvl10\adjustright\rin0\lin283\itap
0 \f18\fs18\lang19\cgrid \sbasedon0 \snext0 Tip;}
========================================================================
==
These commands all are implemented in the way there there should be a
tab between the caption and the text. I first thought to add them to
style.cfg, but that does not solve the problem of the tab that should
be added between the caption and the rest of the text.
========================================================================
==
\opdracht{text}: CLI command
{\s19\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
\f2\fs20\lang19\cgrid \sbasedon0 \snext0 Opdracht;}
========================================================================
==
\uleert[caption]{text} : introductory text
{\s23\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0
\lin0\itap0 \b\lang19\cgrid \sbasedon3 \snext24 Kopje U leert;}
{\s24\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
\i\fs20\lang19\cgrid \sbasedon0 \snext24 U leert;}}
========================================================================
==
The style "uleert" consists in latex out of one command, but splits up
in rtf in two commands: a header and the rest of the text, as you can
see.
Some of the stuff the publisher wanted had to be handmade, which I
converted into commands. I think these could very well be added in
direct.cfg, presuming there was a way to add two argument commands in
there.
========================================================================
==
\plaatje[extra placing argument for latex]{location of
picture}{caption} : picture
should be replaced by: ***'location of picture'\tab 'caption'.
========================================================================
==
\menu{dutch menu}{english menu} : menu location
Dutch menu should be bold, english menu should be slanted
========================================================================
==
\knop{dutch button}{english button} : button to be pressed
Dutch button should be bold, english button should be slanted.
========================================================================
==
\folder{dutch folder}{english folder}: folder to be chosen
Dutch folder should be bold, english folder should be slanted.
========================================================================
====
What do you think? Is there an obvious cfg file to make it possible to
transfer ones own latex commands in the RTF equivalent?
If we can get this working, the next step would be a nice
implementation of lists in RTF styles.
>
>> I imagined something like this:
>>
>> \listbegin, {[rtfcode]},{[more retfcode]} definition
>> \listitem, {[rtf code]},{more rtfcode]} [definition]
>> \listend, {[rtf code]},{more rtfcode]} [definition]
>>
>> (everything between brackets optional)
>
> Handling lists properly will require some work and some decisions
> The issues are
> 1) we want to retain the ability to create list environments that
> can be read by most RTF readers
> 2) the current list method is pretty different from the style
> method
> from version 1.5
> 3) this means some rewriting of code
> 4) we may need to reactivate the command line flag that
> determined the
> RTF version used so that the user can select between 1.3 and
> 1.5
>
> To make the problem clearer, I would ask that you create three RTF
> lists. One
> that uses the current method, one that uses the RTF style that you are
> interested
> in using, and one that uses a MINIMAL RTF style with as few frills as
> possible.
>
In the same document? Or in three separate documents?
> This will be similar to the use of styles for \section commands. The
> default RTF
> is much simpler than the RTF that you want to use. However, latex2rtf
> has sufficient
> flexibility that you can use your publisher mandated styles.
>
> Scott
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills. Sign up for
> IBM's
> Free Linux Tutorials. Learn everything from the bash shell to sys
> admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> Latex2rtf-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/latex2rtf-developers
>
-johan
Johan Henselmans
http://www.netsense.nl
Tel: +31-20-6267538
Fax: +31-20-6273852
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click