ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* problem with \startcolumns[distance=0pt]
@ 2012-08-06 22:22 Peter Münster
  2016-10-06  6:40 ` Michael Witten
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Münster @ 2012-08-06 22:22 UTC (permalink / raw)
  To: ConTeXt users

Hi,

The distance is not 0pt here (MKIV):

--8<---------------cut here---------------start------------->8---
\starttext
\startcolumns[distance=0pt]
\input tufte
\stopcolumns
\stoptext
--8<---------------cut here---------------end--------------->8---

-- 
           Peter
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problem with \startcolumns[distance=0pt]
  2012-08-06 22:22 problem with \startcolumns[distance=0pt] Peter Münster
@ 2016-10-06  6:40 ` Michael Witten
  2016-10-06  9:22   ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Witten @ 2016-10-06  6:40 UTC (permalink / raw)
  To: Peter Münster; +Cc: ntg-context, Hans Hagen

On Tue, 07 Aug 2012 00:22:08 +0200, Peter Muenster wrote:

> The distance is not 0pt here (MKIV):
> 
> --8<---------------cut here---------------start------------->8---
> \starttext
> \startcolumns[distance=0pt]
> \input tufte
> \stopcolumns
> \stoptext
> --8<---------------cut here---------------end--------------->8---

It would appear that this problem is still the case, as of the
following version:

  $ context --version | sed -n 2p\;5p
  mtx-context     | ConTeXt Process Management 0.63
  mtx-context     | current version: 2016.09.24 12:40

In particular, Peter's example produces something like the following:
(I'm assuming these 90-character-plus-CRLF lines made it through the
Internet; if they did not make it, then someone's email-processing
software is non-conformant, so shame on him!)

   We thrive  in  information-thick  worlds     screen, pigeonhole, pick over, sort, inte-
   because  of  our  marvelous  and  every-     grate, blend, inspect, filter, lump, skip,
   day capacity  to  select,  edit,  single     smooth,   chunk,   average,   approximate,
   out, structure, highlight, group,  pair,     cluster,  aggregate,  outline,  summarize,
   merge, harmonize, synthesize, focus, or-     itemize, review, dip into,  flip  through,
   ganize,  condense,  reduce,  boil  down,     browse, glance into, leaf  through,  skim,
   choose, categorize,  catalog,  classify,     refine,   enumerate,   glean,   synopsize,
   list, abstract, scan, look into,  ideal-     winnow  the  wheat  from  the  chaff   and
   ize, isolate, discriminate, distinguish,     separate the sheep from  the  goats.     

However, a person whose thoughts are governed by reasonable logic might
instead expect the result to look more like this:

   We thrive  in  information-thick  worldsscreen, pigeonhole, pick over, sort, inte-
   because  of  our  marvelous  and  every-grate, blend, inspect, filter, lump, skip,
   day capacity  to  select,  edit,  singlesmooth,   chunk,   average,   approximate,
   out, structure, highlight, group,  pair,cluster,  aggregate,  outline,  summarize,
   merge, harmonize, synthesize, focus, or-itemize, review, dip into,  flip  through,
   ganize,  condense,  reduce,  boil  down,browse, glance into, leaf  through,  skim,
   choose, categorize,  catalog,  classify,refine,   enumerate,   glean,   synopsize,
   list, abstract, scan, look into,  ideal-winnow  the  wheat  from  the  chaff   and
   ize, isolate, discriminate, distinguish,separate the sheep from  the  goats.     

The ConTeXt facilities in question are [mostly] defined here:

   "$TEXROOT"/texmf-context/tex/context/base/mkiv/page-mul.mkiv

After a not-so-cursory review, it seems to me that the problem is a
result of [probably erroneous] references [in various calculations]
to the `offset' parameter, which is presumably a vestigial growth
inherited from `\setupframed'.

Fortunately, meddling by this `offset' parameter can be explicitly
nullfied via including `offset=0pt' in the setup parameters for the
`\startcolumns' command; that is, in order to get the results that
Peter expected, modify Peter's example to be this:

--8<---------------cut here---------------start------------->8---
\starttext
\startcolumns[offset=0pt,distance=0pt]
\input tufte
\stopcolumns
\stoptext
--8<---------------cut here---------------end--------------->8---

If you now include `rule=on', then you get:

   We thrive  in  information-thick  worlds|screen, pigeonhole, pick over, sort, inte-
   because  of  our  marvelous  and  every-|grate, blend, inspect, filter, lump, skip,
   day capacity  to  select,  edit,  single|smooth,   chunk,   average,   approximate,
   out, structure, highlight, group,  pair,|cluster,  aggregate,  outline,  summarize,
   merge, harmonize, synthesize, focus, or-|itemize, review, dip into,  flip  through,
   ganize,  condense,  reduce,  boil  down,|browse, glance into, leaf  through,  skim,
   choose, categorize,  catalog,  classify,|refine,   enumerate,   glean,   synopsize,
   list, abstract, scan, look into,  ideal-|winnow  the  wheat  from  the  chaff   and
   ize, isolate, discriminate, distinguish,|separate the sheep from  the  goats.     

If you now replace `distance=0pt' with `distance=2ex', then you get the
following (I chose `2ex', so as to be able to represent the results more
accurately in plain text):

   We thrive  in  information-thick  worlds | screen, pigeonhole, pick over, sort, inte-
   because  of  our  marvelous  and  every- | grate, blend, inspect, filter, lump, skip,
   day capacity  to  select,  edit,  single | smooth,   chunk,   average,   approximate,
   out, structure, highlight, group,  pair, | cluster,  aggregate,  outline,  summarize,
   merge, harmonize, synthesize, focus, or- | itemize, review, dip into,  flip  through,
   ganize,  condense,  reduce,  boil  down, | browse, glance into, leaf  through,  skim,
   choose, categorize,  catalog,  classify, | refine,   enumerate,   glean,   synopsize,
   list, abstract, scan, look into,  ideal- | winnow  the  wheat  from  the  chaff   and
   ize, isolate, discriminate, distinguish, | separate the sheep from  the  goats.     

While setting `offset=0pt' will work for existing distributions, I
suggest removing the `offset' cruft from MKIV altogether, especially
as it doesn't seem to be useful. That way, at least one thing in the
world of TeX will work without requiring some abstruse incantation.

At the end of this email, there is included a patch that makes
the changes I propose; to apply it, just save this email as:

  /path/to/patch
  
and then do the following:

  $ cd "$TEXROOT"
  $ patch -p0 < /path/to/patch

Note that `\setupmixedcolumns[distance=0pt]' works as expected for
those facilities to which it applies; it should be documented more
obviously (a sentiment that is unfortunately relevant to much of
ConTeXt, let alone TeX itself).

Sincerely,
Michael Witten

--- texmf-context/tex/context/base/mkiv/page-mul.mkiv
+++ texmf-context/tex/context/base/mkiv/page-mul.mkiv
@@ -149,7 +149,6 @@
 \newdimen      \d_page_mul_distance
 \newdimen      \d_page_mul_leftskip
 \newdimen      \d_page_mul_rightskip
-\newdimen      \d_page_mul_offset
 \newdimen      \d_page_mul_forced_height
 \newdimen      \d_page_mul_used_width
 \newdimen      \d_page_mul_temp
@@ -193,7 +192,6 @@
    \relax
    \d_page_mul_used_width\dimexpr
       \d_page_mul_available_width/\nofcolumns
-     -\d_page_mul_offset*\plustwo
    \relax
    \textwidth\d_page_mul_used_width % needs thinking ... grouping etc
    \hsize\d_page_mul_used_width}
@@ -274,7 +272,6 @@
 \unexpanded\def\page_mul_set_n_of_lines
   {\settotalinsertionheight
    \d_page_mul_temp\dimexpr
-     -\d_page_mul_offset*\plustwo
      +\textheight
       \ifdim\d_page_mul_preceding_height>\zeropoint -\d_page_mul_preceding_height \fi
      -\totalinsertionheight
@@ -1608,7 +1605,6 @@
     \ifx\p_option\v!background
         \let\finishcolumnbox\backgroundfinishcolumnbox
     \fi
-    \d_page_mul_offset\columnsparameter\c!offset\relax
     \edef\p_command{\columnsparameter\c!command}%
     \ifx\p_command\empty \else
         \let\postprocesscolumnline\p_command
@@ -1690,8 +1686,7 @@
    \c!align=\v!text,
    \c!blank={\v!line,\v!fixed},
    \c!option=,
-   \c!rulethickness=\linewidth,
-   \c!offset=.5\bodyfontsize]
+   \c!rulethickness=\linewidth]
 
 %D New: only at start of columns; may change ! Rather interwoven and therefore
 %D to be integrated when the multi column modules are merged.
@@ -1704,7 +1699,6 @@
 
     \setupcolumnspan
       [\c!n=2,
-       \c!offset=\v!overlay,
        \c!frame=\v!off]
 
     \newbox\b_page_columns_span \let\page_mul_postprocess_spanbox\gobbleoneargument
---
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problem with \startcolumns[distance=0pt]
  2016-10-06  6:40 ` Michael Witten
@ 2016-10-06  9:22   ` Hans Hagen
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2016-10-06  9:22 UTC (permalink / raw)
  To: Michael Witten, Peter Münster; +Cc: ntg-context

On 10/6/2016 8:40 AM, Michael Witten wrote:
> On Tue, 07 Aug 2012 00:22:08 +0200, Peter Muenster wrote:
>
>> The distance is not 0pt here (MKIV):
>>
>> --8<---------------cut here---------------start------------->8---
>> \starttext
>> \startcolumns[distance=0pt]
>> \input tufte
>> \stopcolumns
>> \stoptext
>> --8<---------------cut here---------------end--------------->8---
>
> It would appear that this problem is still the case, as of the
> following version:

i'll fix it (more in tune with mkii as this is the old columns handler)

soon we will default to the mixedcolumns handler and the old mechanism 
will become a module

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-06  9:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-06 22:22 problem with \startcolumns[distance=0pt] Peter Münster
2016-10-06  6:40 ` Michael Witten
2016-10-06  9:22   ` 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).