texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Multiple column support


From: Nix N. Nix
Subject: [Texmacs-dev] Multiple column support
Date: 22 Apr 2003 16:28:51 -0600

Yaaaay !

The Good News:
After much thrashing about, I was able to implement multiple column
support in the LaTeX converter. It was easy to introduce (only 2 lines
added to the "with" drd table) however, I have learned that floating
stuff such as "figure" and "table" environments do not work. 
Fortunately, there is a more generic environment in LaTeX called
"minipage", which works well for both figures and floating tables. 
Consequently, I had to change the (tmtex-float-make ...) function to use
the "minipage" environment.

The Bad News:
Packages, packages, and more packages.  I needed to use two more:
"multicol" to provide support for multiple columns within one page, like
so:

+-------------------------+
|Normal paragraph         |
|                         |
+-------------------------+
+-----------+ +-----------+
|Paragraph  | |of multiple| 
|consisting | |columns    |
+-----------+ +-----------+
+-------------------------+
|Another normal paragraph |
|                         |
+-------------------------+

I also needed the "capt-of" package, which provides the following
command:

\captionof{float-type}{Caption}

where float-type is "figure" or "table" or whatever else
(tmtex-float-make ...) may receive.  This results in something very
close to what TeXmacs does, namely

Figure 1: This is the caption which gives the story behind this picture

or

Table 1: Various elementary measure given in SI units

The Debatable News:
So far, (tmtex-float-make ...) contained a statement whereby no caption
was created if the caption string passed to the function was empty.  I
think this is wrong.  A floating object should still say "Figure n" or
"Table n", even if there is no caption.  This is the default in TeXmacs
and, at least for \label and \ref purposes, it should be the same in
LaTeX.

The Other News:
I may also be able to do this:

       +--------------+
       |      __      |
       |     /  \     |
       |     \__/     |
       |     _||_/    |
       |    / ||      |
       |    _/  \_    |
       |              |
       +--------------+
    Figure 1.  Notice how
    the caption of this
    figure is bounded by
    the width of the
    graphic and not by
    the width of the line

This is doable using yet another LaTeX package called "calc", which
contains the command "widthof" to be used like so:

\widthof{\some{\LaTeX} code which \may{contain} anything, including \\
new lines.}

This command could then constitute the width parameter to the minipage,
which would constrain the total width of the minipage, making it appear
more like a TeXmacs figure.  Unfortunately, this means that we have to
(tmtex ...) the contents of the figure twice, and it causes LaTeX to
complain about "Runaway Argument" and such, especially if the figure
contains a lot of text, instead of just an EPS image.

Please have a look at the two patches (1400 - multiple columns and 1401
- minipage instead of figure) and let me know.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]