* balancing columns with little formatted entries @ 1999-09-22 20:59 Ed L. Cashin 1999-09-26 22:53 ` Hans Hagen [not found] ` <37EEB0E9.FA9A6530@wxs.nl> 0 siblings, 2 replies; 8+ messages in thread From: Ed L. Cashin @ 1999-09-22 20:59 UTC (permalink / raw) I'm using two-column mode to format a directory with entries that are set up as vboxes. I'm finding that the columns often turn out unbalanced, and I suspect that perhaps my code is not high-level enough. I'm interested in making sure that any given entry on the page is not ever split between pages, so a vbox seems OK, but then, it's not working as I expected. Rather than post a large amount of code to show how multiple pages look, I've put several files at this URL: http://www.coe.uga.edu/~ecashin/temp Basically, I try to use rubber vertical glue between the vboxes to ensure that TeX will expand the vertical space between the vboxes so that the columns might be balanced easily. -- --Ed Cashin ecashin@coe.uga.edu ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: balancing columns with little formatted entries 1999-09-22 20:59 balancing columns with little formatted entries Ed L. Cashin @ 1999-09-26 22:53 ` Hans Hagen [not found] ` <37EEC4DD.34E1DD18@gc.maricopa.edu> [not found] ` <37EEB0E9.FA9A6530@wxs.nl> 1 sibling, 1 reply; 8+ messages in thread From: Hans Hagen @ 1999-09-26 22:53 UTC (permalink / raw) Cc: ConTeXt mailing list > Rather than post a large amount of code to show how multiple pages > look, I've put several files at this URL: > > http://www.coe.uga.edu/~ecashin/temp I'll have a look. Sorry for the delay but we were at eurotex. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl ----------------------------------------------------------------- ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <37EEC4DD.34E1DD18@gc.maricopa.edu>]
* context on miktex [not found] ` <37EEC4DD.34E1DD18@gc.maricopa.edu> @ 1999-09-27 11:09 ` Hans Hagen 0 siblings, 0 replies; 8+ messages in thread From: Hans Hagen @ 1999-09-27 11:09 UTC (permalink / raw) Hi Walter, > I apologize for your time since this is a small matter. I have been > using AMS-LaTeX on UNIX for years and now using MiKTeX\WinEdt. I've > recently discovered ConTeXT (and pdfTeX and MetaPost) and would like to > try it out. However, I'm having difficulty getting first of all getting > it properly installed (how can I tell?) and getting started as a user. > Do you have any advice or pointers to comprehensive installation and > user's manual? [I have ActivePerl.] There are several miktex users on the context list, so I cc this mail them. I still have to update the readme/installation files, but given that you have tex running, installation should not be that hard. (1) make sure you can run texexec from any path (by using a bat file or the runperl.exe launch program) (2) rename texexec.rme to texexec.ini, enable the miktex section, make sure the ini is in the same path as texexec (not needed when using web2c), check the miktex path definitions in the ini file. (3) say: texexec --make to generate a format (--verbose gives a bit more info) after that you should be able to run context. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl ----------------------------------------------------------------- ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <37EEB0E9.FA9A6530@wxs.nl>]
* Re: balancing columns with little formatted entries [not found] ` <37EEB0E9.FA9A6530@wxs.nl> @ 1999-11-15 17:53 ` Ed L. Cashin 1999-11-15 19:40 ` Hans Hagen 1999-11-15 20:30 ` Hans Hagen 0 siblings, 2 replies; 8+ messages in thread From: Ed L. Cashin @ 1999-11-15 17:53 UTC (permalink / raw) Cc: NTG-ConTeXt mailing list Back in September, I asked about balancing a two-column series of entries in a directory. Hans suggested a solution that used the grid feature in context. Hans Hagen <pragma@wxs.nl> writes: > See attached file [attached file simple.tex contents follow] ... > \setuplayout > [grid=yes] > > % and > > \setuphead > [subsection] > [number=no,style=bold,command=\Example, > before=\blank,after=\blank] ... and for formatting the subsection head: > \def\Example#1#2% > {\hbox to \hsize > {\vrule width 1em height .6ex depth -.5ex > \quad\strut#2\quad > \leaders\vrule height .6ex depth -.5ex\hfill}} ... > % #1: last name #5: email > % #2: first name #6: dept > % #3: phone number #7: room > % #4: position > > \def\fsdhcentry#1#2#3#4#5#6#7% > {\snaptogrid\vbox > {\forgetall > \bf > \strut\uppercase{#1},\space#2\space\dotfill\ #3\par > \tfx > \strut\quad#4\hfill#5\par > \strut\quad#6\hfill#7}} That produces output that looks better than before using the grid. However, while the entries are lining up with the grid, the "subsectionhead"s are not. That means that the bottom of the page will sometimes have unbalanced columns; namely, on pages that have subsectionheads. Here is a pdf that shows how on pages that have subsectionheads two vboxes across from one another snap to different lines on the grid: http://www.coe.uga.edu/~ecashin/temp/fsdhc-grid1.pdf (Page nine, for example.) I thought that I would solve the problem by putting both the entries and the subsectionheads into vboxes of equal height. That way, all the vboxes across from one another would snap to the same line. It looks promising, but when I try to put the subsectionhead in a vbox of "entryheight" and snap it to the grid, I get errors about missing braces. I feel like I'm on the right track (getting vboxes of equal height to line up), although I worry about what will happen if one of the boxes has to be bigger than entryheight. I'm not sure why it is failing, though. Here's a simplified demonstration what I'm trying: \setupwhitespace [halfline] \setupbodyfont [10pt] \setuplayout [grid=yes] \setuphead [section] [number=no,style=\bfb,textcommand=\BoxedSection, before=\blank,after=\blank,header=high,footer=section, page=yes] \setuphead [subsection] [number=no,style=bold,textcommand=,command=\RuleSubsection] \def\entryheight{2cm} \def\BoxedSection#1% {\framed[width=broad,height=1cm,corner=round]{#1}} \def\RuleSubsection#1#2% {\snaptogrid \vbox to \entryheight{% \forgetall \vfil \hbox to \hsize{% {\vrule width 1em height .6ex depth -.5ex \quad\strut#2\quad \leaders\vrule height .6ex depth -.5ex\hfill}}}} % #1: last name #5: email % #2: first name #6: dept % #3: phone number #7: room % #4: position \def\fsdhcentry#1#2#3#4#5#6#7% {\snaptogrid\vbox to \entryheight {\forgetall \bf \strut\uppercase{#1},\space#2\space\dotfill\ #3\par \tfx \strut\quad#4\hfill#5\par \strut\quad#6\hfill#7\blank[small]\vfil}} \starttext \section{College of Education Personnel} \startcolumns % \input personnel % % personnel.tex consists of many entries like this: \subsection{Z} \fsdhcentry{Zeitler}% {William R.}% {}% {}% {wzeitler@coe.uga.edu}% {Sci. Ed.}% {}% \fsdhcentry{Zepeda}% {Sally .}% {}% {}% {szepeda@coe.uga.edu}% {Educational Leadership}% {}% \stopcolumns \stoptext -- --Ed Cashin PGP public key: ecashin@coe.uga.edu http://www.coe.uga.edu/~ecashin/pgp/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: balancing columns with little formatted entries 1999-11-15 17:53 ` balancing columns with little formatted entries Ed L. Cashin @ 1999-11-15 19:40 ` Hans Hagen 1999-11-16 14:47 ` Ed L. Cashin 1999-11-15 20:30 ` Hans Hagen 1 sibling, 1 reply; 8+ messages in thread From: Hans Hagen @ 1999-11-15 19:40 UTC (permalink / raw) Cc: Hans Hagen, NTG-ConTeXt mailing list Just a remark: >\fsdhcentry{Zepeda}% > {Sally .}% > {}% > {}% > {szepeda@coe.uga.edu}% > {Educational Leadership}% > {}% No %'s needed here. Looks better and saves typing. ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl ----------------------------------------------------------------- ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: balancing columns with little formatted entries 1999-11-15 19:40 ` Hans Hagen @ 1999-11-16 14:47 ` Ed L. Cashin 1999-11-16 15:16 ` Hans Hagen 0 siblings, 1 reply; 8+ messages in thread From: Ed L. Cashin @ 1999-11-16 14:47 UTC (permalink / raw) Cc: NTG-ConTeXt mailing list Hans Hagen <pragma@wxs.nl> writes: > Just a remark: > > >\fsdhcentry{Zepeda}% > > {Sally .}% > > {}% > > {}% > > {szepeda@coe.uga.edu}% > > {Educational Leadership}% > > {}% > > No %'s needed here. Looks better and saves typing. Oops! You've said that before. What is the rule that makes it OK to leave out the percent signs there? Intuitively, I imagine that for the case: \foo{bar} {baz} ... foo sees the tokens "bar", " ", "baz"; but that is not the case. -- --Ed Cashin PGP public key: ecashin@coe.uga.edu http://www.coe.uga.edu/~ecashin/pgp/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: balancing columns with little formatted entries 1999-11-16 14:47 ` Ed L. Cashin @ 1999-11-16 15:16 ` Hans Hagen 0 siblings, 0 replies; 8+ messages in thread From: Hans Hagen @ 1999-11-16 15:16 UTC (permalink / raw) Cc: Hans Hagen, NTG-ConTeXt mailing list At 09:47 AM 11/16/99 -0500, Ed L. Cashin wrote: >> No %'s needed here. Looks better and saves typing. > >Oops! You've said that before. What is the rule that makes it OK to >leave out the percent signs there? Intuitively, I imagine that for >the case: > > \foo{bar} {baz} > >... foo sees the tokens "bar", " ", "baz"; but that is not the case. You only need %'s in macros, and then only in situations where tex stops reading: \def\something#1% otherwise tex wants a space as delimiter {...} \count4=123 tex sees the space as end of number \ifdim\dimen0=10pt idem dimension \somemacro {a} {b} {c}% only after the last one, only in hmode \ifnum\count2=456% 789 is actually wrong! \ifnum\count2=456 is ok 789 in normal cases no % is needed after any \abc since the space stops the scanner etc etc In a context text you seldom need %'s. ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl ----------------------------------------------------------------- ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: balancing columns with little formatted entries 1999-11-15 17:53 ` balancing columns with little formatted entries Ed L. Cashin 1999-11-15 19:40 ` Hans Hagen @ 1999-11-15 20:30 ` Hans Hagen 1 sibling, 0 replies; 8+ messages in thread From: Hans Hagen @ 1999-11-15 20:30 UTC (permalink / raw) Cc: Hans Hagen, NTG-ConTeXt mailing list At 12:53 PM 11/15/99 -0500, Ed L. Cashin wrote: >Back in September, I asked about balancing a two-column series of >entries in a directory. Hans suggested a solution that used the grid >feature in context. I'll send you an alternative. Gridsnapping is a rather tricky thing and in order to get your own macros working, one needs to be aware of when tex inserts whitespace, breaks and so. Unless others long to hear those details, I'll handle this beyond the list. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl ----------------------------------------------------------------- ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~1999-11-16 15:16 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 1999-09-22 20:59 balancing columns with little formatted entries Ed L. Cashin 1999-09-26 22:53 ` Hans Hagen [not found] ` <37EEC4DD.34E1DD18@gc.maricopa.edu> 1999-09-27 11:09 ` context on miktex Hans Hagen [not found] ` <37EEB0E9.FA9A6530@wxs.nl> 1999-11-15 17:53 ` balancing columns with little formatted entries Ed L. Cashin 1999-11-15 19:40 ` Hans Hagen 1999-11-16 14:47 ` Ed L. Cashin 1999-11-16 15:16 ` Hans Hagen 1999-11-15 20:30 ` Hans Hagen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).