ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* columns and footnotes
@ 2019-10-20 13:51 Henning Hraban Ramm
  2019-10-21  6:28 ` luigi scarso
  2019-10-21  8:47 ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: Henning Hraban Ramm @ 2019-10-20 13:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread
* columns and footnotes
@ 2010-02-14 19:40 Wolfgang Werners-Lucchini
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Werners-Lucchini @ 2010-02-14 19:40 UTC (permalink / raw)
  To: ntg-context

Hallo,

I use:

ConTeXt  ver: 2009.11.24 10:13 MKII  fmt: 2009.11.24  int: 
english/english

and I have many problems with columns and footnotes.

Is there a possibility to set footnotes in two columns too?

I tried 

\setupfootnotes[location=columns]

but I can not see any difference to

\setupfootnotes[location=lastcolumn]

In the moment I use 

\setupfootnotes[location=page]

and it is often the case that footnotes are printed one page to 
early. It is sometimes the case that the columns and the footnote 
area overlapp. 

What can I do to avoid these problems?

Wolfgang
___________________________________________________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2019-10-21  8:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-20 13:51 columns and footnotes Henning Hraban Ramm
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

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).