ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Possible bug with new \start ... \stop way for title, chapter, subject, etc.?
@ 2013-06-29  5:46 Andres Conrado Montoya
  2013-06-29 10:38 ` Pablo Rodríguez
  2013-06-29 16:10 ` Wolfgang Schuster
  0 siblings, 2 replies; 3+ messages in thread
From: Andres Conrado Montoya @ 2013-06-29  5:46 UTC (permalink / raw)
  To: ntg-context

I was trying to implement the solution provided by this thread:
http://www.mail-archive.com/ntg-context@ntg.nl/msg51152.html and it
works very well. However, finding a problem related to this
implementation, I found that the output of the new \start ... \stop
versions of the title, section, chapter, subject, etc. commands is
different from the old \title, \chapter, \subject, etc.
As you can see in the following MWE, the new implementation indents
the first paragraph of the given section, by some amount (even
different from the default for paragraphs).

Is this a bug or a new feature that I don't understand?

mtx-context     | current version: 2013.06.10 22:51

%******** START MWE **********%

\setuplayout[grid=yes]
\setuppagenumbering
  [alternative=doublesided,location={footer,center}]
\showgrid
\setupindenting[yes,big,next]
\usemodule[lettrine]

\define[2]\SectionCommand
  {\inoutermargin{#2}}

\setuphead
  [title,subject]
  [page=no,
   alternative=text,
   command=\SectionCommand,
   distance=0pt,
   style={\tf\sc},
   before={\blank[line]}]

\starttext

\title{Knuth}
  With title: \input knuth\par

\starttitle[title={Tufte}]
  With starttitle: \input tufte\par
\stoptitle

\subject{Knuth}
  With subject: \input knuth\par

\startsubject[title={Tufte}]
  With startsubject: \input tufte\par
\stopsubject

\stoptext

%******** STOP MWE ************%
___________________________________________________________________________________
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: Possible bug with new \start ... \stop way for title, chapter, subject, etc.?
  2013-06-29  5:46 Possible bug with new \start ... \stop way for title, chapter, subject, etc.? Andres Conrado Montoya
@ 2013-06-29 10:38 ` Pablo Rodríguez
  2013-06-29 16:10 ` Wolfgang Schuster
  1 sibling, 0 replies; 3+ messages in thread
From: Pablo Rodríguez @ 2013-06-29 10:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 29/06/13 07:46, Andres Conrado Montoya wrote:
> [...]
> Is this a bug or a new feature that I don't understand?
I don‘t know whether it’s a bug. But this works:

\startsubject[title={Tufte}]%
 With startsubject: \input tufte\par
\stopsubject

It seems that the \start... commands add an extra space. I don‘t know
whether it’s a bug, but this works:

\startsubject[title={Tufte}]%
 With startsubject: \input tufte\par
\stopsubject


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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: Possible bug with new \start ... \stop way for title, chapter, subject, etc.?
  2013-06-29  5:46 Possible bug with new \start ... \stop way for title, chapter, subject, etc.? Andres Conrado Montoya
  2013-06-29 10:38 ` Pablo Rodríguez
@ 2013-06-29 16:10 ` Wolfgang Schuster
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2013-06-29 16:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 29.06.2013 um 07:46 schrieb Andres Conrado Montoya <andresconrado@gmail.com>:

> I was trying to implement the solution provided by this thread:
> http://www.mail-archive.com/ntg-context@ntg.nl/msg51152.html and it
> works very well. However, finding a problem related to this
> implementation, I found that the output of the new \start ... \stop
> versions of the title, section, chapter, subject, etc. commands is
> different from the old \title, \chapter, \subject, etc.
> As you can see in the following MWE, the new implementation indents
> the first paragraph of the given section, by some amount (even
> different from the default for paragraphs).
> 
> Is this a bug or a new feature that I don't understand?

It’s a sometimes unwanted side effect of arguments for commands.
Even though there are ways to avoid the space you can’t add them
because there are cases where you want the space.

Below is a modified version of the older code which uses the new MkIV
mechanism to create customized head layouts which gobbles also
the space for \startsection.

\defineheadalternative
  [head:inleftmargin]
  [alternative=horizontal,
   renderingsetup=head:inleftmargin]

\startsetups[head:inleftmargin]
  \inleftmargin{\headtextcontent}
\stopsetups

\setuphead
  [section]
  [alternative=head:inleftmargin,
   style=bold,
   color=red,
   insidesection=\ignorespaces,
   distance=0pt]

\showframe

\starttext

\section{Knuth}
\input knuth

\startsection[title={Tufte}]
\input knuth
\stopsection

\stoptext

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] 3+ messages in thread

end of thread, other threads:[~2013-06-29 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-29  5:46 Possible bug with new \start ... \stop way for title, chapter, subject, etc.? Andres Conrado Montoya
2013-06-29 10:38 ` Pablo Rodríguez
2013-06-29 16:10 ` Wolfgang Schuster

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