Subject: mailing-list for TeXmacs Users
List archive
From : David Allouche <address@hidden>- To: address@hidden
- Subject: Re: Background paragraph color
- Date: Mon, 30 Dec 2002 11:09:22 +0100
On Wed, Dec 18, 2002 at 12:36:33AM +0100, Latreyte David wrote:
> Le Mardi 17 Décembre 2002 15:38, Joris van der Hoeven a écrit :
> > > I was seeing on the TeXmacs help the Title of every help page. It has
> > > the draw of a Gnu on both sides and in the midle it has the title text.
> > > Is has also a nice Yellow color and a surrounded fine line. I was
> > > thinking that it was made by a table, but I see it isnt.
> > >
> > > * Are There some paragraph properties applied to get this kind of
> > > effect?.
> > >
> > > * I see on the code that is a tm-doc title style. Can be put on any
> > > parragraph? and change some parameters (like the draw of Gnu)?
> > >
> > > * Can somebody say me how can I get the same presentation effect?
> >
> > Well, in fact I *did* use a table for this, but I made a macro out of it.
> > You can see the source code of the macro by typing
> >
> > C-x C-s tmdoc-traversal.ts return
> >
> > It corresponds to the tmdoc-title macro.
> Hi,
> just a question : how did you make this macro ? using TeXmacs or writting
> everything from scratch by hand ? Because i don't hope being one day able
> to
> do this sort of thing :-( . It's even more difficult than LaTeX (just an
> opinion of course). It's a pity because TeXmacs is so much more useful than
> LaTeX ...
Creating that kind of macro is not very difficult. For example:
Insert->Table->Plain tabular.
M-x (set-cell-background "broken white") enter [1].
Select the whole table then Edit->Cut.
Insert->Macro->Assign.
Type "yellowbg".
Press right arrow key.
Insert->Macro->Macro.
Type "body" then press Tab.
Paste the table we have cut before.
Press left arrow key (to get in the table cell).
Insert->Macro->Argument.
Type "body" then press Enter.
Press right arrow key (to get out of the table).
Press enter twice (to activate "macro" and "assign").
[1] that trick is required because the user interface does not yet
provide a way to use all the color defined in TeXmacs internals.
You have defined a yellowbg macro. But it is not yet satisfying
because it will not perform line breaking.
Move the caret after the invisible "assign".
Press backspace to deactivate "assign".
Press left arrow twice to move into the table.
Table->Special table properties->Use paragraph width.
Table->Special cell properties->Hyphenation->Top.
Press right arrow then enter twice to activate assign again.
Now you have what you wanted.
What is a bit trickier is creating macros which provide table
templates (like tabular, block, equnarray*, matrix).
--
David Allouche | GNU TeXmacs -- Writing is a pleasure
Free software engineer | http://www.texmacs.org
http://ddaa.net | http://alqua.com/tmresources
address@hidden | address@hidden
TeXmacs is NOT a LaTeX front-end and is unrelated to emacs.
- Background paragraph color, offray . luna, 12/17/2002
- Re: Background paragraph color, Joris van der Hoeven, 12/17/2002
- Re: Background paragraph color, Latreyte David, 12/18/2002
- Re: Background paragraph color, David Allouche, 12/30/2002
- Re: Background paragraph color, Latreyte David, 12/18/2002
- Re: Background paragraph color, Joris van der Hoeven, 12/17/2002
Archive powered by MHonArc 2.6.19.