ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* textcommand=\uppercase in setuphead is propagated to lower level settings
@ 2011-02-20 23:04 Dinh Tran
  2011-02-21  8:46 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Dinh Tran @ 2011-02-20 23:04 UTC (permalink / raw)
  To: ntg-context


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

Hello.

I apply textcommand=\uppercase to a section heading but it is propagated to
subheadings.  Is there a good reason for this.

Some other notes in this test design:
1) textcommand=\uppercase does not work with luatex engine
2) textcommand=\WORD works in the luatex engine, but the propagation of
uppercase to subheadings is also encountered.
3) numbercolor=red only works with luatex.

I submit the pdf's also.

Thanks,
Dinh

---
Code:

%%% CHAPTER AND SECTION STYLING
\def\BookchapterCommand#1#2{\framed[frame=off,rightframe=on]{#1\space}\framed[frame=off]{\space#2}}
%\setuphead[chapter][command=\BookchapterCommand,page=chapter,numbercolor=red,alternative=inmargin]
\setuphead[chapter][command=\BookchapterCommand,numbercolor=red,alternative=inmargin]

\setuphead[section][numbercolor=red, after=\nowhitespace,
style={\ss\bfa},textcommand=\uppercase]
%% textcommand also applied on lower level headings.  Why?
%% Note: \WORD does not seem to work with textcommand for xetex and pdftex
engines, but \uppercase, \Words, \lowercase work.
%% For luatex, textcommand=\uppercase does not work.  Use \WORD.  But
encounter same problems of propagating the uppercase to lower levels.
%% also, numbercolor

\setuphead[subsection][number=no,style={\ss\bf},after=\nowhitespace]

\setuphead[subsubsection][style=slanted,number=no,before={\blank[big]},before={\testpage[1]},after=\nowhitespace]

\environment env_basic

\starttext

\chapter{First Chapter}
\input knuth

\section{First Section}
\input douglas

\subsection{First SubSection}
\input davis

\stoptext

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

[-- Attachment #2: basic-context_luatex.pdf --]
[-- Type: application/pdf, Size: 21766 bytes --]

[-- Attachment #3: basic-context_pdftex.pdf --]
[-- Type: application/pdf, Size: 79548 bytes --]

[-- Attachment #4: basic-context_xetex.pdf --]
[-- Type: application/pdf, Size: 16657 bytes --]

[-- Attachment #5: Type: text/plain, Size: 486 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: textcommand=\uppercase in setuphead is propagated to lower level settings
  2011-02-20 23:04 textcommand=\uppercase in setuphead is propagated to lower level settings Dinh Tran
@ 2011-02-21  8:46 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2011-02-21  8:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 21-2-2011 12:04, Dinh Tran wrote:
> Hello.
>
> I apply textcommand=\uppercase to a section heading but it is propagated to
> subheadings.  Is there a good reason for this.

all subsection inherit from their parent

> Some other notes in this test design:
> 1) textcommand=\uppercase does not work with luatex engine

sure, it's a low level tex command and never to be used in unpredictable 
situations (think of an \framed[frame=on]{...} being uppercased when you 
actually want ... to be)

also, it's unreliable for daily use which is why we have \WORD etc

> 2) textcommand=\WORD works in the luatex engine, but the propagation of
> uppercase to subheadings is also encountered.

indeed, inheritance

> 3) numbercolor=red only works with luatex.

mkii (for pdftex/xetex) will not be patched so mkiv is the (future) 
reference in this

> I submit the pdf's also.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2011-02-21  8:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-20 23:04 textcommand=\uppercase in setuphead is propagated to lower level settings Dinh Tran
2011-02-21  8:46 ` Hans Hagen

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