ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: rulecolor in columns
Date: Fri, 23 Feb 2018 14:53:02 +0100	[thread overview]
Message-ID: <5A901CBE.9000402@gmail.com> (raw)
In-Reply-To: <FF89E5A2-55C7-4E15-9B7C-00910565C749@fiee.net>


[-- Attachment #1.1: Type: text/plain, Size: 1331 bytes --]


> Henning Hraban Ramm <mailto:texml@fiee.net>
> 23. Februar 2018 um 14:38
> I tried to add the example to the garden, but at least there it 
> doesn’t work:
> http://wiki.contextgarden.net/Columns
>
> As soon as I use \setupcolors, I get only a single column or the 
> example doesn’t compile at all. Strange.

The garden uses MkIV where \color expects a argument (i.e. 
\color[<name>]{<argument>}).


Below is a example how you can add a colored rule to \startcolumns but 
the better solution
is to switch to MkIV and and use mixedcolumns environment which has a 
option to change
the color of the rule between the columns.


\enableregime[utf-8]
\mainlanguage[fr]

\setupcolors[state=start]

% \unexpanded\def\ColumnsRule
%   {\bgroup
%    \hskip\dimexpr(1.5\bodyfontsize+\linewidth)/2\relax
%    \color[red]{\vrule width\linewidth}%
%    \hskip\dimexpr(1.5\bodyfontsize+\linewidth)/2\relax
%    \egroup}

\definemeasure[columndistance][2em]

\setupcolumns[distance=\measure{columndistance}]

\unexpanded\def\ColumnsRule
   {\bgroup
    \hskip\dimexpr(\measure{columndistance}+\linewidth)/2\relax
    \color[red]{\vrule width\linewidth}%
    \hskip\dimexpr(\measure{columndistance}+\linewidth)/2\relax
    \egroup}

\setupcolumns[rule=\ColumnsRule]

\starttext

\startcolumns
\input tufte
\stopcolumns

\stoptext


Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 2590 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 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:[~2018-02-23 13:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20 11:30 show header text only on first page of chapter Henning Hraban Ramm
2018-02-20 14:30 ` Henning Hraban Ramm
2018-02-20 16:17   ` Wolfgang Schuster
2018-02-20 16:35     ` Henning Hraban Ramm
2018-02-20 16:56       ` Wolfgang Schuster
2018-02-20 18:50         ` Henning Hraban Ramm
2018-02-23 11:04           ` rulecolor in columns Gerard
2018-02-23 12:23             ` Schmitz Thomas A.
2018-02-23 12:50               ` Gerard
2018-02-23 13:38                 ` Henning Hraban Ramm
2018-02-23 13:53                   ` Wolfgang Schuster [this message]

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=5A901CBE.9000402@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --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).