Hi,

Here's an example of a ConTeXt file where a header occurs at page bottom.
The subsection named "Perl snippet" occurs at the bottom of page 2, followed
by framed text on page 3. It would be much nicer if the header would be
written on page 3. Note: I extracted this example from a real-life text; for 
some reason
the frames in the example are drawn wrongly, but this is beside the point.

Run the example with texexec --pdf test.tex

These are the outputs of pdfetex --version and texexec --version on my system 
(Fedora Core 6):

               texexec : TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005
               texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004
                   tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
               context : ver: 2005.01.31
               cont-en : ver: 2005.01.31  fmt: 2009.1.26  mes: english

               pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
               kpathsea version 3.5.4

Thanks in advance,

Jos





________________________________
From: "ntg-context-requ...@ntg.nl" <ntg-context-requ...@ntg.nl>
To: ntg-context@ntg.nl
Sent: Monday, May 18, 2009 2:55:18 PM
Subject: ntg-context Digest, Vol 59, Issue 99

Send ntg-context mailing list submissions to
    ntg-context@ntg.nl

To subscribe or unsubscribe via the World Wide Web, visit
    http://www.ntg.nl/mailman/listinfo/ntg-context
or, via email, send a message with subject or body 'help' to
    ntg-context-requ...@ntg.nl

You can reach the person managing the list at
    ntg-context-ow...@ntg.nl

When replying, please edit your Subject line so it is more specific
than "Re: Contents of ntg-context digest..."


Today's Topics:

   1. Re: how to prevent header at page bottom (Wolfgang Schuster)
   2. Re: interlinespace (Thomas A. Schmitz)
   3. Re: formula-style alignment (afsmith)
   4. Re: columns(ets) and itemize[columns] (Alan BRASLAU)
   5. Re: replacing words by underlines (Alan Stone)
   6. Re: Fresh install & t-letter module (Markus Hubig)


----------------------------------------------------------------------

Message: 1
Date: Mon, 18 May 2009 12:12:00 +0200
From: Wolfgang Schuster <schuster.wolfg...@googlemail.com>
Subject: Re: [NTG-context] how to prevent header at page bottom
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Message-ID: <47526efc-131b-4ad0-a804-d5c98155f...@gmail.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes


Am 18.05.2009 um 12:07 schrieb Jos van Gisbergen:

> Hi Aditya,
>
> Your solution works for normal text following the header.
> But if I have a framed text with a background, which also
> has a "before={\testpage[3]}" (\definetextbackground[FramedText][
> ...,before={\testpage[3]},...]) and the section starts with such a  
> framed
> text, it can still go wrong. And I guess it can also go wrong if a  
> section
> starts with a figure. Is there some way to specify that if less than a
> certain number of items (lines of text, frames, figures etc.) fit on  
> the
> remainder of the current page, the next page should be taken?

Send a example.

Wolfgang


------------------------------

Message: 2
Date: Mon, 18 May 2009 12:45:27 +0200
From: "Thomas A. Schmitz" <thomas.schm...@uni-bonn.de>
Subject: Re: [NTG-context] interlinespace
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Message-ID: <4115ff75-aa44-4355-ab30-1532b7fa1...@uni-bonn.de>
Content-Type: text/plain; charset=US-ASCII; format=flowed


On May 18, 2009, at 11:56 AM, Taco Hoekwater wrote:

> {\switchtobodyfont[10pt]
> \setupinterlinespace[line=12pt] \input tufte \par }

*palmforehead*

Thanks, Taco and Wolfgang! Painful...

All best

Thomas


------------------------------

Message: 3
Date: Mon, 18 May 2009 03:53:15 -0700
From: afsmith <adventurecompl...@gmail.com>
Subject: Re: [NTG-context] formula-style alignment
To: ntg-context <ntg-context@ntg.nl>
Message-ID:
    <5df5befa0905180353t7e3036b6s7092d1c6d5d6e...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Thanks Wolfgang. That works...

Now how about inside a definition or subject header?

Here is an example. \localhsize in this case seems to resolve to a
width of 0, making the contained text break as often as it can...

\defineframed[lrframe][
width=\localhsize,
align=normal,
rulethickness=1pt]

\setuplayout[header=0pt,footer=0pt]
\definedescription[topdesc][
inbetween={\blank[none]},
headstyle={\bf},
style={\tf\rm},
location=top,
width=broad]

\define[3]\CHRONDESC
{\starttopdesc
{\dontleavehmode\lrframe{#1\hfill#2}}
\startnarrower[left]{#3}\stopnarrower
\stoptopdesc}

\definehead[mysubject][subject]
\setuphead[mysubject][style={\bf}]
\define[3]\CHRONSUB
{\mysubject{\dontleavehmode\lrframe{#1\hfill#2}}
\startnarrower[left]{#3}\stopnarrower}

\showframe[text]

\starttext

\startnarrower[left]
\dontleavehmode\lrframe[width=broad]
{leftleftleft \hfill right rightrightright}
\stopnarrower \crlf

\startnarrower[left]
\dontleavehmode\lrframe[width=\localhsize]
{leftleftleftleft\hfill right rightrightright}
\stopnarrower \crlf

\CHRONDESC
  {This happened from June 08 to June 09}
  {06/08--06/09}
  {\CHRONDESC
    {This happened from June 08 to December 08}
    {06/08--12/08}
    {\input tufte }
  \CHRONDESC
    {This happened from January 09 to June 09}
    {01/09--06/09}
    {\input zapf }}
\CHRONDESC
  {This happened from June 09 to July 09}
  {06/09-07/09}
  {\input knuth }
\crlf

\CHRONSUB
  {This happened from June 08 to June 09}
  {06/08--06/09}
  {\CHRONSUB
    {This happened from June 08 to December 08}
    {06/08--12/08}
    {\input tufte }
  \CHRONSUB
    {This happened from January 09 to June 09}
    {01/09--06/09}
    {\input zapf }}
\crlf

\stoptext



> Am 17.05.2009 um 21:23 schrieb afsmith:
>
> > Hey again, ntg-context.
> >
> > I would like to align one piece of a line to the left, and another
> > piece of the same line to the right, sort of like numbered math
> > equations, except not math.
> > Additionally I would like to do this inside a narrowed block
>
> \starttext
>
> \input knuth
>
> \startnarrower
>
> \input knuth
>
> \dontleavehmode\framed[width=\localhsize,align=normal]{left\hfill right}
>
> \stopnarrower
>
> \stoptext
>
> Wolfgang


------------------------------

Message: 4
Date: Mon, 18 May 2009 13:08:19 +0200
From: Alan BRASLAU <alan.bras...@cea.fr>
Subject: Re: [NTG-context] columns(ets) and itemize[columns]
To: ntg-context@ntg.nl
Message-ID: <200905181308.19704.alan.bras...@cea.fr>
Content-Type: Text/Plain;  charset="iso-8859-1"

On Monday 18 May 2009 08:45:16 Wolfgang Schuster wrote:
> Am 17.05.2009 um 23:31 schrieb Alan BRASLAU:
> > Two questions, first:
> > What is the real difference between columns and columnset?
> > I am a bit confused* about their coexistence. Is this purposeful or
> > necessary
> > (or is it simply historical)? Is \startcolumns simply an unnamed,
> > "default"
> > columnset?
>
> columns and columnset are two different mechanism two produce a document
> with text and two or more columns. the columns mechanism is the older
> one
> with limited control about the placement of figures but allows you to
> mix
> one column and multicolumns text on a page. columnsets are a new version
> of the column mechanism with more control about the placement of figures
> and other features like spanned columns etc. (look at the manual for
> more)
> and is better suited for magazine like layouts (Vit Zyka posted a few
> nice
> examples a few years ago).

Great! This is somewhat what I suspected (columns mechanism is the older one). 
Is there good reason to keep both mechanisms? That is, does the startcolumns 
mechanism have advantages? Can't one mix one column and multicolumns text on a 
page using columnsets?

> > (*and the wiki page needs to be clarified...)
>
> the wiki is from users for users, feel free to correct the articles

Of course, as soon as I feel that I understand the subject.

> > Second question, maybe a bug?
> > \startitemize[columns] does not interact well:
> > I suspect that it could or should use paragraphs internally rather
> > than
> > columns so as to work within a column(set).
>
> that's a limitation in tex, when you use the 'columns' key for itemize
> the items are typeset with a \startcolumns / \stopcolumns before and
> after the environment and you can nest columns /columnset environments
> (a tex limitation) but in normal one column text this is not the case
> and you can use multicolumn items in most cases but you can
>
> \startcolumns
> \startsimplecolumns
> \startitemize
> \item one
> \item two
> ...
> \stopitemize
> \stopsimplecolumns
> \stopcolumns

page-mul.tex
...
%D Undocumented and still under development.
\def\startsimplecolumns
...

May I suggest that \startitemize[columns] internally use such a mechanism, 
perhaps when under a columns or columnset environment. Of course, this may be 
a bit tricky according to the following remark:

> (in a few cases streamlayer are necessary, e.g. within framedtext)

Indeed!
Inside framed text I used paragraphs to manually typset into columns; now I 
get to learn about streamlayers...

Alan



------------------------------

Message: 5
Date: Mon, 18 May 2009 14:28:14 +0200
From: Alan Stone <software.list.1e...@gmail.com>
Subject: Re: [NTG-context] replacing words by underlines
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Message-ID: <4a1154a8.07a5660a.6a16.5...@mx.google.com>
Content-Type: text/plain; charset="us-ascii"; format=flowed

At Saturday 24/01/2009 21:07, you wrote:

>Am 24.01.2009 um 19:00 schrieb Alan Stone:
>
>>Hi,
>>
>>In the underneath example, how do you get each word replaced by an
>>underline ?
>>
>>Or, if not possible, underlined word groups with correct underline
>>breaks for multi-line phrases.
>
>\def\doUnderlineD#1%
>   {\bgroup
>    \setbox\scratchbox\hbox{#1}%
>    \underbar{\hskip\wd\scratchbox}\space
>    \egroup}
>
>\def\UnderlineD#1%
>   {\processseparatedlist[#1][ ]\doUnderlineD\removeunwantedspaces}
>
>Wolfgang

Ahoi,

A finishing touch question...

How do you cut off underbar parts which exceed \textwidth ?

\showframe

\setuplayout[width=7cm]

\def\doUnderlineD#1%
   {\bgroup
    \setbox\scratchbox\hbox{#1}%
    \underbar{\hskip\wd\scratchbox}\space
    \egroup}

\def\UnderlineD#1%
   {\processseparatedlist[#1][ ]\doUnderlineD\removeunwantedspaces}

  \starttext

  \UnderlineD{aaaaaaaaaaaa  bbbb  cccccccccc ddddddddddddd eeeeeeeee 
vvvvvvvvvv wwwwwww xxxxxxxxxxxxx yyyyyyyyyyy zzzzzzz}

  \stoptext


Thanks in advance.
Alan




------------------------------

Message: 6
Date: Mon, 18 May 2009 14:55:07 +0200
From: Markus Hubig <mhu...@gmail.com>
Subject: Re: [NTG-context] Fresh install & t-letter module
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Message-ID:
    <1a3190fd0905180555u171571fbrdd352d9322bfe...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Thank you!

I've replaced the "default.nli" in my context tree with the file you send
me.
Now "texexec letter.tex" and "texexec --xtx letter.tex" works,
but "texexec --lua letter.tex" fails with:

-------------8<----schnipp-----
ConTeXt  ver: 2009.05.14 16:44 MKIV  fmt: 2009.5.18  int: english/english

system          : letter.top loaded
(letter.top)
fonts           : preloading latin modern fonts
bodyfont        : 12pt rm is loaded
language        : language en is active
system          : module letter loaded
(letter.tex
system          : module letter (line 2) already loaded
systems         : begin file letter at line 2
! Undefined control sequence.
l.3 \startletter
-------------8<----schnapp-----

- Markus

On Fri, May 15, 2009 at 3:34 PM, Wolfgang Schuster <
schuster.wolfg...@googlemail.com> wrote:

>
>
> Fixed version is only (don't know how long it takes till you get it with
> the minimals),
> for the moment use the attached file. Sorry for the crash (which was my
> fault) but
> a few features I use in my module depend on the ConTeXt version (especially
> when
> you use MkIV).
>
> Wolfgang
>

-- 
-------------------"it's like this"------
even samurai have teddy bears
and even teddy bears get drunk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.ntg.nl/pipermail/ntg-context/attachments/20090518/e544e43a/attachment.html>

------------------------------

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


End of ntg-context Digest, Vol 59, Issue 99
*******************************************



      
\def\Doctitle{
  Yoyo reference guide
}

\def\Author{
  Flavius Aurelius
}

\def\Copyrightyear{
  2023
}

\def\Revision{
  (revision 0.1)
}

\def\Footertext{
  {\copyright} {\Copyrightyear} Yoyomatic {\Revision}
}

\installlanguage[en]

%------------------------------  Set papersize  --------------------------------
\setuppapersize[A4]

%--------------------------  Define layout geometry  ---------------------------
\definelayout[myCustomLayout][
 header=10mm,                    % height of header
 footer=10mm,                    % height of footer
 topspace=8mm,                   % space above header
 bottomspace=\topspace,          % space below footer
 backspace=25mm,
 cutspace=20mm,
 width=middle,
 height=middle,
 marking=on,                     % enable the marking of text
 grid=no,
]

\setuplayout[myCustomLayout]

% Experimental
\definelayout[TitlePageLayout][header=0pt,
                   footer=0pt,
                   backspace=0.25\paperwidth,
                   topspace=0.25\paperheight]

\definestartstop
  [TitlePageLayout]
  [before={\setuplayout[TitlePageLayout]},
   after={\page[left]\setuplayout[reset]}]

%------------------------------  Page numbering  -------------------------------
\setuppagenumbering [alternative=doublesided,
                     location={footer,right},  % where should page number appear
                     left={Page }]             % text to the left of page number

%------------------------------  Custom colors  --------------------------------
\setupcolors[state=start]
\definecolor[DarkYellow] [r=0.5,g=0.5,b=0.1]
\definecolor[LightYellow][r=1.0,g=1.0,b=0.8]
\definecolor[LightBlue]  [r=0.1,g=0.1,b=1.0]
\definecolor[VeryLightBlue]  [r=0.9,g=0.9,b=1.0]
\definecolor[DarkBlue]   [r=0.0,g=0.0,b=0.4]
\definecolor[LightBlack] [r=0.4,g=0.4,b=0.4]
\definecolor[DarkWhite]  [r=0.8,g=0.8,b=0.9]

%-------------------------  Custom font definitions  ---------------------------
% Define custom fonts for title, chapter etc.
\definebodyfont [10pt,11pt,12pt][rm][chapterFont=SansBold at 36pt,
                                     sectionFont=SansBold at 24pt,
                                     subsectionFont=SansBold at 24pt,
                                     subsubsectionFont=SansBold at 18pt,
                                     titleFont=SansBold at 36pt]

% The following setup defines the attributes for drawing horizontal lines
% across the page. These lines are drawn with macros \thinline and \hairline.
%\setupthinrules[color=black,rulethickness=0.5mm]
\setupthinrules[color=black]


\setuphead[title]        [style=\titleFont,
                          color=black]
\setuphead[chapter]      [before=\crlf, % insert empty line before chapter title
                          style=\chapterFont,
                          color=black,
                          prefix=+]
\setuphead[section]      [before=\crlf,
                          style=\sectionFont,
                          color=black,
                          prefix=+]
\setuphead[subsection]   [before=\crlf,
                          style=\subsectionFont,
                          color=black,
                          prefix=+]
\setuphead[subsubsection][before=\crlf,
                          style=\subsubsectionFont,
                          color=black,
                          prefix=+]

\definehead[myhead][section]
\setuphead[myhead] [before=\crlf,
                    page=yes, % start on new page
                    number=no,
                    style=\subsectionFont,
                    color=black]

\definehead[submyhead][myhead]
\setuphead[submyhead] [page=no, % don't start on new page
                       before={\testpage[3]\blank}, % start on new page if less
                                                    % than ... lines fit on the
                                                    % current page
                       style=\subsubsectionFont,
                       color=black]

%---------------------------  Headers and footers  -----------------------------
\setupheader[text][after=\hairline]
\setupfooter[text][before=\hairline]
\setupheadertexts[chapter][\Doctitle]
\setupfootertexts[text][\midaligned{\Footertext}][pagenumber]

%-----------------------  Attributes for framed texts  -------------------------
\setupframedtexts[width=fit,
                  height=fit,
                  offset=0mm,
                  location=middle,
                  bodyfont=12pt,
                  framecorner=rectangular,
                  framecolor=DarkYellow,
                  background=color,
                  backgroundcolor=LightYellow]
\setupframed[width=fit,
             height=fit,
             offset=2mm,
             location=middle,
             bodyfont=12pt,
             framecorner=rectangular,
             framecolor=DarkYellow,
             background=color,
             backgroundcolor=LightYellow]


% This is a better framed text -- it breaks over pages:
\definetextbackground[FramedText][
                      location=paragraph,
                      rulethickness=0.5pt,
                      framecolor=DarkYellow,
                      background=color,
                      backgroundcolor=LightYellow,
                      leftoffset=0.5\bodyfontsize,
                      rightoffset=0.5\bodyfontsize,
                      topoffset=1.0\bodyfontsize,
                      bottomoffset=1.0\bodyfontsize,
                      before={\testpage[3]}, % test if 3 lines fit on current
                                             % page, otherwise go to next page
                      frame=on]

%-------------------------  Attributes for footnotes  --------------------------
\setupfootnotes[rule=off,background=color,backgroundcolor=white]
\setupfootnotedefinition[background=color,backgroundcolor=red]

%----------------------  Attributes for verbatim texts  ------------------------
%
% This is meant for verbatim text and code examples.
\setuptyping[margin=3mm,
             space=off,               % Do not show space characters explicitely
             color=DarkBlue,          % Color of verbatim text
             before={\startFramedText}, % Draw verbatim text on a background
             after={\stopFramedText}, ]

\setupbackground[background=color,backgroundcolor=LightYellow]


%-----------------------------  Table attributes  ------------------------------
\setupcaption[table][location=bottom]
\setuptables[rulethickness=0.1mm,rulecolor=LightBlack,background=color,backgroundcolor=red]

% Experimental (splitting does not work in combination with placeTABLE)
\setupTABLE[split=yes]
\setupTABLE[row][each][background=none,frame=off]
\setupTABLE[column][each][frame=on,bottomframe=off,topframe=off]
\setupTABLE[column][first][leftframe=off]
\setupTABLE[column][last][rightframe=off]
\setupTABLE[row][first][bottomframe=on,
                        background=color,backgroundcolor=VeryLightBlue]
\setupTABLE[row][last][bottomframe=on]
\definefloat[TABLE][TABLEs]
\setupfloat[TABLE][location=middle]


%-------------------------  Set up table of contents  --------------------------
\setupheadtext[content={Table of Contents}]  % The title
\definecombinedlist [ToC][chapter,section,subsection,myhead][
                          placehead=yes, criterium=all]
\setupcombinedlist[ToC][interaction=all,alternative=c]
\def\placeToC{\crlf\chapter{Table of Contents}\crlf\placecombinedlist[ToC]}





\starttext
\chapter{Reference}

\section{Overview}

\myhead{Tiytiiiiuytiii}
\starttyping

  zxzzzz zxzAzzIzzzxzzz
           zxzzzz zxzzzzzzzz
           zxzzzz zzzzzzzzz
           zzzzzz zzzzxzzzzxzz
           zzzzzz zzzzzz
           zzzzzz zzzxzzzz
           zzzyzz z-zzxzzzxzzzz
           zzzyzz z-zzxzzzxzzzz
\stoptyping


\submyhead{Ejhgfjgjgjn}

Azzz xz zzzzxzzz zz zzzzzzzzz zz zxzzzzzzzz zxzzzz $<$zzzzz$>$zzzzxzzzzxzz$<$/zzzzz$>$
zzzz x zzxzzzzzzxzzzz zz zzzzzz, zzzxzzzz xzz zzxzzzxzzzz.  Azzzzzzz zxzzzz zzz
zzzzzz xzz \type{M0}, \type{MX} xzz \type{MY}.  Azzzzzzz zxzzzz zzz zzzxzzzz xzz \type{R0}, \type{R90}, \type{R180} xzz
\type{R270}.  Azzzzzzz zxzzzz zzz z-, xzz z-zzxzzzxzzzz xzz xzz zzzyzz zxzzz. Tzz
zzxzzzxzzzz zz zzzxzzzz zz zzz zxzzzzzzzz'z zzzzzz.  Tzz zzzzxzzz zxzz zzzzzzzzz
zzzzzz zzz zzzzz zzz zz $<$zzzzz$>$zxzzzzzzzz$<$/zzzzz$>$. Az zzzzz zzzzzz zz zzzzzzzxz
zxzzz xzz zzzzz, zz zzzz zzz zzzzxzzz zxzz zz zzzxzzz.  Iz xz zzzzxzzz zz zzz
zzzzzzz zz x zxzzzz zz zzzxzzz, zzz zxzzzz zz zzz zzzzxzzz zz zzzz xz zzz
zzzzzzz.

\submyhead{Python snippet}
\starttyping

  # Azz x zzzz "B" zz zzz zxzzzz, zzzzz zz zxzzzz zz zzz zzzzzzz
  zzz zxzzzz [zxzLzxzCzz zzz/zz.zzz]
  zzz zzzzzzz [zxzTzzCzzz $zxzzzz]
  zz [zxzzz {zxzAzzCzzz $zxzzzz "B"} zzzzzzz] {
      # zzzzz zzzzzzzz, zzzz zzzzzz!
      zzzz $zzzzzzz
      zzzz
  } zzzz {
      # zzzz xzzzz zz, xzz zzzzxzzz
      zz [zxzzz {zxzAzzIzzzxzzz $zzzzzzz $zzzzzzz "I0" M0 R0 0 0} zzzzzzz ]
  {
          # zzzzz zzzzzzzz, zzzzxzzz zxzz zzzzzz!
          zzzz $zzzzzzz
          zzzz
      }
  }
\stoptyping


\submyhead{Perl snippet}
\starttyping

  # Azz x zzzz "B" zz zzz zxzzzz, zzzzz zz zxzzzz zz zzz zzzzzzz
  zzz zzzzzz;
  zzz zxzzzzzzzy;
  zz $zxzzzz = zxzLzxzCzz("zzz/zz.zzz");
  zz $zzzzzzz = zxzTzzCzzz($zxzzzz);
  zz $zzzzzzz;
  zzxz { $zzzzzzz = zxzAzzCzzz($zxzzzz,"B") };
  zz ($@) {
      # zzzzz zzzzzzzz, zzzz zzzzzz!
      zzz $@;
  } zzzz {
      # zzzz xzzzz zz, xzz zzzzxzzz
      zz $zzzzzzz;
    zzxz { $zzzzzzz =
  zxzAzzIzzzxzzz($zzzzzzz,$zzzzzzz,"I0","M0","R0",0,0); };
      zz ($@) {
          # zzzzz zzzzzzzz, zzzzxzzz zxzz zzzzzz!
          zzz $@;
  }
\stoptyping

\stoptext
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to