Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

QUEST FOR TeX WIZZARDS: TeX or WYSIWYG

5 views
Skip to first unread message

Gunther Schadow

unread,
May 30, 1997, 3:00:00 AM5/30/97
to

QUEST FOR TeX WIZZARDS

This is a quest for a TeXhacker who really understands the
system and how to do wizzardy things. I am looking for a
LaTeX style or plainTeX macros which implements a kind of
insertion that can float not only vertically but also
horizontally on the page. For example, if you have a
figure that is about 0.4\hsize
wide and 0.5\vsize high (or +----------------------------+
deep) it should be mounted | |
somewhere in the middle of the | ><><><><><><><><><><> |
page, say, bound to the outer | < |
margin with the text floating | > A NICE FIGURE PLACED |
around the figure. I try to | < |
give a demonstration in this | > AT THE OUTER MARGIN |
posting. | < |
| > STICKING OUT BY SOME |
I find this a very beautiful | < |
way to place figures in a | > FIXED AMOUNT. TEXT |
text, but it is not easily | < |
done. I once tried it in | > BEAUTIFULLY FLOATING |
WinWord (ugh!) and interested | < |
people might want to look at | > AROUND THE INSERTION |
the result, which is available | < |
at [1] What I did here is to | ><><><><><><><><><><> |
write the text and then anchor | |
the floating material hard | |
onto the page. As the figures +----------------------------+
are fixed, the text has to
flow around them. The result is quite nice, I think, but
it is too much a WYSIWYG way of doing it.

With a LaTeX style I would like to have some automaticity
added to the placement of floats. Of corse they should
honor twoside style with \evensidemargin greater than
\oddsidemargin. Then I could imagin arbitrary
constraints, e.g. do not place more than one float per
_________________________
[1] http://userpage.fu-berlin.de/~gusw/vortrag.ps.



1



____________________________________________________________________

2 QUEST FOR TeX WIZZARDS
__________________________________________________________

page. Or: always try to produce some flow around effect,
i.e. have paragraphs start three to four lines above the
figure with a hanging left or right (!) indent. Or: Try
to avoid having just one line below
+---------------------+ the figure at the bottom of the page.
| |
| | What do you think, is this possible
| ! | with TeX or do we need desktop
| ! WILL | publishing or other WYSIWYG processors
| ! | to have such a page style? I
| ! > Y O U < | personally hate the Idea that WinWord
| ! | & Co. is technically superior when
| ! RESTORE | styling such fancy pages. I really
| ! | would like to use such a style in my
| ! THE | 200+ pages book and I certainly do not
| ! | want to layout my book using WinWord
| ! HONOR OF | or Messy Windows at all. But I admit,
| ! | that I am not enough a wizzard to
| ! TeX ? | solve this problem.
| ............... |
| | So here is the provoking question that
+---------------------+ I give you to answer: Is WYSIWYG
really better than TeX? Is the
aesthetics of style impossible to formulate into
algorithms. Please your flame shall come over me! But
someone might get famous by submitting a LaTeX style to do
this. If I had a lot of money to give, I would set a prize
of $1000 for the one who comes up with the best such
package. But I have no $1000 to give away. But I will
promise that the one who comes up with a useable thing
that comes close to what I suggest will be named in the
acknowledgements of my book.

PS: please excuse the many words I made here, I needed
some text quickly in order to show my ideas here. Thanks
GNU emacs this was quite easy to do with ASCII text ...
althoug in a WYSIWYG way :-)


Gunther Schadow





____________________________________________________________________

PS: view these pages at an 70x51 window

Gunther Schadow--------Windsteiner Weg 54a, Berlin 14165, FR. Germany
Dept. of Anaesthesia, Benjamin Franklin Univerity Hospital, Berlin.
gu...@zedat.fu-berlin.de http://userpage.fu-berlin.de/~gusw
-------------------------------#include <usual/disclaimer>-----------

Roland Roussillon

unread,
May 31, 1997, 3:00:00 AM5/31/97
to

Hello,

I am not a wizzard, but i know about the picinpar package (avaible in the CTAN sites) : you can place your floating window on the left, right or center of the page, with text around.
For more detail, see Latex Companion p 53

Roland Roussillon

e-mail : rous...@imaginet.fr

Philip A. Viton

unread,
May 31, 1997, 3:00:00 AM5/31/97
to

Two other possibilities (according to the Companion, see ch 6.4) are floatfig
and wrapfig. I've worked only with the latter and achieved very satisfactory
results; however it is a non-floating environment: you decide which paragraph
your figure should be next to, and latex does the rest. You can control on
which side of the text the figure appears.

----------------
Philip A. Viton
City & Regional Planning, OSU, 190 W. 17th Avenue, Columbus OH 43210
pvi...@magnus.acs.ohio-state.edu

Stephan Boettcher

unread,
Jun 1, 1997, 3:00:00 AM6/1/97
to


I had the following thoughts on this.

A newspaper page-layout style, built on several existing packages, like
multicol, and those mentioned in other replies to this port, could work as
follows:

You first define the placement of illustrations on the page. The the text
columns are defined, how many, and their width , e.t.c.
Afterwards, the text is filled in the space left by the illustrations.

Too achieve this probably means a lot of hacking in the \output routine, I
don't know how much of this can be done with the existing packages. The
easiest approach may even be to do it from scratch, like: cutting the space
for text into rectangular pieces and let TeXs pagebuilder fill the pieces.
Floats need to be disabled.

It's not trivial to find a scheme how to specify the placement of things,
and how to calculate the remaining space for text. You might also want to
have a part of the text (like an article on a newspaper titlepage) in three
balanced columns, which are in turn partially covered by an illustration.
Some interaction/iterations are needed to get such a layout right anyway.
It should be robust enough to be able to fix some typos in a finished
layout, without the whole thing collapsing. Subpages, with a given text,
and fixed columns structure, including illustrations, could be placed like
illustrations on the main page.

Has anything like this been done?

Is it useful?

Is it feasible?

Stephan

PS: $1000 is not enough to pay for this work. I guess it needs to be done
for free, for the fun of it.

---------------------------------------------------------------------------
Stephan B"ottcher FAX: +972-3-640-7932
School of Physics and Astronomy Tel: +972-3-640-7722
High Energy Physics Department or -6094
Tel Aviv University Email: ste...@alzt.tau.ac.il
69978 Tel Aviv or Stephan....@cern.ch
Israel WWW: http://www-zeus.desy.de/~stephan/home.html
---------------------------------------------------------------------------

Piet van Oostrum

unread,
Jun 2, 1997, 3:00:00 AM6/2/97
to

>>>>> rous...@imaginet.fr (Roland Roussillon) (RR) writes:

RR> Hello,
RR> I am not a wizzard, but i know about the picinpar package (avaible in
RR> the CTAN sites) : you can place your floating window on the left, right
RR> or center of the page, with text around. For more detail, see Latex
RR> Companion p 53

Don't use picinpar. It's dangerous. I have seen examples where it changed
the text in subtle ways.
--
Piet van Oostrum <pi...@cs.ruu.nl>
URL: http://www.cs.ruu.nl/~piet [PGP]

Donald Arseneau

unread,
Jun 2, 1997, 3:00:00 AM6/2/97
to

In article <338F49F1...@gusw.dialup.fu-berlin.de>, Gunther Schadow <gun...@gusw.dialup.fu-berlin.de> writes...

> insertion that can float not only vertically but also
> horizontally on the page. For example, if you have a
> figure that is about 0.4\hsize
> wide and 0.5\vsize high (or +----------------------------+
> deep) it should be mounted | |
> somewhere in the middle of the | ><><><><><><><><><><> |
> page, say, bound to the outer | < |
> margin with the text floating [flowing]
> around the figure.

\usepackage{wrapfig}
\setlength{\wrapoverhang}{\marginparwidth}
\addtolength{\wrapoverhang}{\marginparsep}
..
\begin{wrapfigure}{O}{2.5in}
\caption{This is the figure}
\end{wrapfigure}

% \begin{wrapfigure}[12]{r}[34pt]{5cm} <figure> \end{wrapfigure}
% -- - ---- ---
% [number of narrow lines] {placement} [overhang] {width of figure}
%
% Placement is one of r, l, i, o, R, L, I, O, for right, left,
% inside, outside, (here / FLOAT).
% The figure sticks into the margin by `overhang', if given, or by the
% length \wrapoverhang, which is normally zero.
% The number of wrapped text lines is normally calculated from the height
% of the figure, but may be specified manually ("12" above).

As for floating to be vertically centered on a page, I will implement that
for $1000.

Donald Arseneau as...@reg.triumf.ca

Ian Hutchinson

unread,
Jun 3, 1997, 3:00:00 AM6/3/97
to

This is a multi-part message in MIME format.

--------------211B0E324BDB531913F4CA3C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Stephan Boettcher wrote:


>
> Gunther Schadow wrote:
> >
> > QUEST FOR TeX WIZZARDS
> >
> > This is a quest for a TeXhacker who really understands the
> > system and how to do wizzardy things. I am looking for a
> > LaTeX style or plainTeX macros which implements a kind of
> > insertion that can float not only vertically but also
> > horizontally on the page. For example, if you have a
> > figure that is about 0.4\hsize
> > wide and 0.5\vsize high (or +----------------------------+
> > deep) it should be mounted | |
> > somewhere in the middle of the | ><><><><><><><><><><> |
> > page, say, bound to the outer | < |
> > margin with the text floating | > A NICE FIGURE PLACED |
> > around the figure. I try to | < |
> > give a demonstration in this | > AT THE OUTER MARGIN |
> > posting. | < |


Try the attached macro for plain TeX.
Ian Hutchinson

--------------211B0E324BDB531913F4CA3C
Content-Type: application/x-tex; name="flowmac.tex"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="flowmac.tex"

% FIGFLOW: plain TEX macro by Ian Hutchinson, 21 Oct 95.
% Make text flow round figure.
% Usage: \figflow{<width>}{<height>}{<[Figure+][Caption]>}
% at start of new paragraph. Figure top starts at insert.
% #1 figure width dimen. If negative, fig on right, else left.
% #2 figure height (including caption) dimen. (E.g.: 4 truein)
% #3 \special for figure if desired, then \vfill caption. (Both optional).
% Example: figflow{4 truein}{5 truein}{\epsfbox{figure.ps}\vfill Figure 1.}
% User is responsible for the figure fitting within the space defined.
% If figure won't fit on page, it is moved over the page break.
% If a new figflow starts before the old one is finished, a message is given
% and the second figure is skipped. Fix manually.
% Does not work for Latex.

\newdimen\pageremains\newdimen\pdepth
\newdimen\figwidth
\newdimen\figheight
\newcount\figlines
\newcount\flevel

\def\figflow#1#2#3{
\ifnum\flevel>0
\message{******Figure collision. Ignoring second figure.******}
\else
\figwidth=#1
\figheight=#2
\def\contents{#3}
% Put figure contents in an appropriate box.
\def\figure{\let\temp=\par \let\par=\plainpar
\line{\overfullrule=0pt% Avoid black box.
\ifdim \figwidth<0pt \hsize=-\figwidth \hss\else \hsize=\figwidth\fi
\advance \hsize by -10pt% Give a little extra hspace.
\vbox to \figheight{\vfil\noindent\contents}
\ifdim \figwidth>0pt \hss\fi
} \vskip-\figheight
\let\par=\temp%
}
\advance\figheight by \baselineskip
\divide\figheight by \baselineskip% convert height to lines.
\figlines=\figheight \multiply\figheight by \baselineskip
\begingroup\overfullrule=0pt% Turn off black box outside fig
\tolerance=1000% Allow more spaced out lines.
\flevel=1
% Store \par
\let\plainpar=\par
% Define new \par to process figures each paragraph.
\def\par{
\ifnum\flevel=1
% We are starting a new figure. Set to look for enough room.
\plainpar
% End the previous paragraph.
\pageremains=\pagegoal \advance\pageremains by -\pagetotal
\ifdim\pageremains<\figheight \message{Moving figure...}%keep looking
\else
% Found the starting place. Store prevdepth. Remove glue. Place the figure.
\pdepth=\prevdepth
\nointerlineskip
\figure
\hangindent \figwidth \hangafter -\figlines \hfuzz 5 pt
\flevel=2
\prevgraf=0
\figheight=\baselineskip% Removed parskip adjust.
\fi
\else
\ifnum\flevel=2%level 2, making the figure.
\ifdim\figheight<\parskip
\advance\figlines -1 \advance\hangafter 1
\advance\figheight\baselineskip
\else
\advance\figheight -\parskip%\message{else \the\figheight}
\fi
\hangcarrypar\relax% I don't know why, but this is needed.
\fi
\fi
}
\par
\vskip-\pdepth%Restore the prevdepth from the previous paragraph.
\fi
}

% Macros.
\def\endflow{\global\let\par=\plainpar\endgroup}% terminate main group.
\def\hangcarrypar{% Carry the hangindent to next par.
\edef\next{\hangafter=\the\hangafter\hangindent=\the\hangindent}
\plainpar\next
\edef\next{\prevgraf=\the\prevgraf}
\ifnum\prevgraf>0
\ifnum\prevgraf>\figlines \endflow \flevel=0
\else
\message{FIGFLOW: line \the\prevgraf, of \the\figlines.}
\leavevmode% Sets prevgraf to 0. So reset it using next.
\next
\fi
\fi
}

--------------211B0E324BDB531913F4CA3C--


Thierry Bouche

unread,
Jun 5, 1997, 3:00:00 AM6/5/97
to

and how much would you ask for doing this kind of ancient layout:

(notes surround the main text, that is in a single column, in a larger
point size, if the page is large, you can also have two text columns
with notes all around) Someone proposed a _very good_ meal for this on
the gut mailing list...

|
| note note note note note note
| note note note note note note
note txt txt txt txt txt txt | txt txt txt txt txt txt note
note txt txt txt txt txt txt | txt txt txt txt txt txt note
note txt txt txt txt txt txt | txt txt txt txt txt txt note
note txt txt txt txt txt txt | txt txt txt txt txt txt note
note txt txt txt txt txt txt | txt txt txt txt txt txt note
note txt txt txt txt txt txt | txt txt txt txt txt txt note
note txt txt txt txt txt txt | txt txt txt txt txt txt note
note note note note note note | note note note note note note
note note note note note note | note note note note note note

0 new messages