ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Henning Hraban Ramm <texml@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: columns and footnotes
Date: Sun, 20 Oct 2019 15:51:50 +0200	[thread overview]
Message-ID: <278A9D22-C682-4E56-A643-F6C0E6C9F3C0@fiee.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1060 bytes --]

Hi again,
I’m testing columns again, and before I publish an article on the subject, I’d like to check with you.

Find attached my testing environment, env_test.tex, and columns.tex, a "product", as well as the result of compiling with —mode=oldcolumns,grid and —mode=grid

The "oldcolumns" example shows the result of \usemodule[old-columns] and looks like it should. The new columns code still has errors:

Previously it wasn’t possible to start (new) columns mid-page, i.e. after an image or chapter/intro like in the example.
This works now (progress!), but the pre-columns stuff is still shifted to the right. (And I don’t know where the yellow box comes from.)

Additionally, footnotes in old-columns use the whole width and don’t interfere with the text columns, while in new columns, footnotes start in their column but use the whole width anyway and thus interfere with the main text.
I tried \setupnotes[footnote][location=columns] (and other options) but saw no change.

Many more options to check…

Best, Hraban



[-- Attachment #2: newcolumns.png --]
[-- Type: image/png, Size: 64971 bytes --]

[-- Attachment #3: oldcolumns.png --]
[-- Type: image/png, Size: 60822 bytes --]

[-- Attachment #4: columns.tex --]
[-- Type: application/octet-stream, Size: 607 bytes --]

\startproduct dummy
\environment env_test

\setupnotes[footnote][
  %location=columns,
  %alternative={grid,columns},
]

\dorecurse{5}{%
  %\edef\Loc{\ctxlua{NumLocation(\recurselevel)}}%
\chapter{\fakewords{1}{4}}\par
  \fakewords{30}{30}\endgraf
  \startcolumns[n=3]
    \dorecurse{4}{%
      %\edef\Mod{\ctxlua{NumMod(\recurselevel)}}%
      \section{\fakewords{1}{5}}
      \dorecurse{2}{%
        \dorecurse{2}{\fakewords{30}{30}\footnote{\fakewords{10}{10}}\fakewords{40}{40}\endgraf}
        %\Blindbild{\Loc,\Mod}
        \dorecurse{2}{\fakewords{50}{50}\endgraf}
  }}
  \stopcolumns
}
\stopproduct

[-- Attachment #5: env_test.tex --]
[-- Type: application/octet-stream, Size: 3165 bytes --]

\startenvironment env_test
\project tests

\setuppapersize[A6]

\startmode[print]
\newdimen\Bleed
\Bleed=3mm
\setupbleeding[offset=\Bleed]

\setuppapersize[A6][A6,oversized]
\setuplayout[
  marking=on,
  location=middle,
  cropoffset=-5mm,
	bleedoffset=\Bleed,
	trimoffset=-5mm,
]
\stopmode

\startmode[grid]
\setuplayout[
  grid=yes,
]
\stopmode
\showgrid

\setupbodyfont[ss,8pt]
\setupindenting[yes,next,medium]

\setupcolors[state=start]
\setupinteraction[state=start]
\placebookmarks[chapter,section]

\startmode[oldcolumns]
\usemodule[old-columns]
\usemodule[old-columnsets]
\usemodule[old-multicolumns]
\stopmode
\definecolumnset[TwoColumns][n=2]

\useMPlibrary[dum]
\usemodule[visual]
\definecolor[fakerulecolor][c=.3,m=0,y=0,k=.2,t=.5]
\definecolor[fakebaselinecolor][c=1,m=0,y=0,k=0,t=.5]
\definecolor[fakeparindentcolor][c=.05,m=0,y=0,k=0,t=.5]

\startsetups captionsetups
  \definecolor[fakerulecolor][c=0,m=.3,y=0,k=.2,t=.5]
\stopsetups

\setuphead[
  page=no,
  number=no,
  before={\placefloats},
  after={\testpage{5}},
]

\setupheadertexts[\doifmodeelse{*grid}{grid}{no grid}][\doifmodeelse{oldcolumns}{old columns}{new columns}]

\setupfloats[grid=tolerant]
\setupcaptions[
  setups=captionsetups,
  style={\bfx},
]

\startmode[*grid]
\setuphead[
  before={\startlinecorrection},
  after={\stoplinecorrection\testpage{5}},
]
\setupcaptions[
  before={\startlinecorrection},
  after={\stoplinecorrection},
]
\stopmode

\definelayer[WholePage][
  x=0mm,
  y=0mm,
  width=\paperwidth,
  height=\paperheight,
]
\definelayer[TypeArea][
  x=0mm,
  y=0mm,
  width=\textwidth,
  height=\textheight,
]
\setupbackgrounds[page][background={WholePage},state=start]
\setupbackgrounds[text][background={TypeArea},state=start]

\startluacode

local locations = {
  'top',
  'bottom',
  'left',
  'right',
  'here',
}

local locmods = {
  '',
  'high',
  'low',
  'fit',
}

function RandomLocation()
  context(locations[math.random(1,#locations)] .. "," .. locmods[math.random(1,#locmods)])
end

function NumLocation(p)
  context(locations[p])
end

function NumMod(m)
  context(locmods[m])
end

\stopluacode

\define[1]\Blindbild{
\edef\PicLocation{#1}%
\getrandomnumber\imgH{1}{6}%
\getrandomnumber\imgW{3}{10}%
\startplacefigure[
  location={\PicLocation},
  title={\PicLocation \fakewords{3}{20}}]%
%\placefigure[\PicLocation]{\PicLocation \fakewords{3}{20}}{%
\doifmode{*grid}{\startlinecorrection}%
\externalfigure[testbild][
  width=\dimexpr\textwidth * \imgW / 10 \relax,
  height=\dimexpr\textheight * \imgH / 10 \relax,
]%
\doifmode{*grid}{\stoplinecorrection}%
\stopplacefigure%
}

\def\Blindtext{%
  \dorecurse{5}{%
    \edef\Loc{\ctxlua{NumLocation(\recurselevel)}}%
    \chapter{\Loc}
    \dorecurse{4}{%
      \edef\Mod{\ctxlua{NumMod(\recurselevel)}}%
      \section{\Loc, \Mod}
      \dorecurse{2}{%
        \dorecurse{2}{\fakewords{50}{100}\endgraf}
        \Blindbild{\Loc,\Mod}
        \dorecurse{2}{\fakewords{50}{100}\endgraf}
}}}}

\def\BlindtextOhneBilder{%
  \dorecurse{5}{%
    \chapter{\fakewords{2}{5}}
    \dorecurse{4}{%
      \section{\fakewords{2}{6}}
      \dorecurse{4}{%
        \fakewords{50}{100}\endgraf}
}}}

\stopenvironment

[-- Attachment #6: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2019-10-20 13:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-20 13:51 Henning Hraban Ramm [this message]
2019-10-21  6:28 ` luigi scarso
2019-10-21  8:47 ` Hans Hagen
2019-10-21  8:57   ` Hans Hagen
  -- strict thread matches above, loose matches on Subject: below --
2010-02-14 19:40 Wolfgang Werners-Lucchini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=278A9D22-C682-4E56-A643-F6C0E6C9F3C0@fiee.net \
    --to=texml@fiee.net \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).