ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Questions/Comments
@ 2001-09-10 16:57 Marco Kuhlmann
  2001-09-11  8:27 ` Questions/Comments Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Marco Kuhlmann @ 2001-09-10 16:57 UTC (permalink / raw)


    Hello!

I am currently preparing my first major document with ConTeXt,
and just have to admit my astonishment about the great work that
lies behind the system. I am so fanatic about it, that I dare to
state some questions and comments for improvement. Please do not
mind if these issues have been raised before; I have not been
subscribed to the mailing list for a long time.

- The \setuppagenumbering command should provide a "strut" option
  to correctly cater for oldstyle digits: If no strut is
  inserted, the digits "dance" from page to page.

- Protruding information should be provided for all the different
  quotation marks. (I understand that support for protrusion is
  in an early state of development.)

- Is there a way to define custom itemisations? I mean, can one
  define e.g. a enumeration inparaenum which transforms

  We distinguish the following classes of problems:
  \startinparaenum
  \item neglectable problems,
  \item easy problems,
  \item hard problems,
  \item interesting problems.
  \stopinparaenum

  into

  We distinguish the following classes of problems: (a) neglectable
  problems, (b) easy problems, (c) hard problems, (d) interesting
  problems.

- When typesetting capitals (like in acronyms), one would like to
  avoid "screaming" by decreasing the font size a little -- not
  much, just one point or so. Is there a way to switch to, say, a
  font with 90% the size of the current bodyfont? I could then
  write a macro \versal{} for my purposes.

- In German, there are a lot of abbreviations that end with a
  colon, like usw. (und so weiter) etc. What is the correct way
  to define a synonym \USW which inserts the trailing colon only
  if no second colon is immediately following? I fiddled with
  \doifnextcharelse, but were not successful.

- I suggest that the \digits mechanism should not trigger math
  mode automatically: In my document, I want to use oldstyle
  figures in text mode, while in math mode, upright figures shall
  appear. (PS. The \digitpowerseperator macro used in
  supp-num.tex should be named \digitpowerseparator, I guess.)

- Do you think that the \digits mechanism can be generalised to
  cater for phone numbers, bank account numbers, postal codes,
  etc.? The correct typography for these is language dependent,
  as well, so it seems to be plausible to merge the mechanisms.

Please pardon this extensive mail; I just got intoxicated with
the ConTeXt fever and try to shorten the time from me moving from
LaTeX to ConTeXt to a minimum, so more might come to my mind. :-)

    Best regards,
    Marco

-- 
Marco Kuhlmann                             marco.kuhlmann@gmx.net


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

* Re: Questions/Comments
  2001-09-10 16:57 Questions/Comments Marco Kuhlmann
@ 2001-09-11  8:27 ` Hans Hagen
  2001-09-11 11:29   ` Questions/Comments Marco Kuhlmann
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2001-09-11  8:27 UTC (permalink / raw)
  Cc: ntg-context

Hi Marco

- The \setuppagenumbering command should provide a "strut" option
>   to correctly cater for oldstyle digits: If no strut is
>   inserted, the digits "dance" from page to page.

Ah, interesting. Since the height of a digit is about the height of a 
strut, this has gone unnoticed! If you set the headertexts, you will notice 
that they have a strut and that pagenumbers also get strutted so this bug 
was rather obscured. Since i consider it a bug, i will default to struts 
but provide a way to turn it off.

Now, what you can do is to set the style (letter) to \oldstyle\strut. 
Alternatively you can add these lines to cont-new.tex (after \unprotect):

\unexpanded\def\@@plaatspaginanummer% called in empty tests
   {\doif{\@@nmstatus\@@pnstatus}{\v!start\v!start}
      {{\doif{\@@nmstrut}{\v!ja}{\strut}%
        \@@nmcommando{\doattributes\??nm\c!letter\c!kleur
          {\volledigepaginanummer}}}}}

\stelnummeringin
   [c!strut=\v!ja]

it wil go into the next beta.

>- Protruding information should be provided for all the different
>   quotation marks. (I understand that support for protrusion is
>   in an early state of development.)

indeed, the named ones f possible, any input is welcom

>- Is there a way to define custom itemisations? I mean, can one
>   define e.g. a enumeration inparaenum which transforms
>
>   We distinguish the following classes of problems:
>   \startinparaenum
>   \item neglectable problems,
>   \item easy problems,
>   \item hard problems,
>   \item interesting problems.
>   \stopinparaenum
>
>   into
>
>   We distinguish the following classes of problems: (a) neglectable
>   problems, (b) easy problems, (c) hard problems, (d) interesting
>   problems.

\defineitemize is definitely on the todo list [even mentioned in 
core-itm.tex -)] but i want to combine this with a redo of the itemize 
module [i have a couple of more wishes]

for the moment, you can use \definestartstop

>- When typesetting capitals (like in acronyms), one would like to
>   avoid "screaming" by decreasing the font size a little -- not
>   much, just one point or so. Is there a way to switch to, say, a
>   font with 90% the size of the current bodyfont? I could then
>   write a macro \versal{} for my purposes.

There are several ways to accomplish this

(1) use \kap/\cap
(2) use a small caps font
(3) use a smaller typeface

(1) is not robust and (2) not flexible enough so given that you have a 
recent context running you can create a new typeface.

Method (3) is the best since here you create a whole new instance of a 
typeface but 90% scaled down of the main one:

\starttext

\showbaselines

\definetypeface [mainface] [rm] [serif] [palatino]
   [default] [encoding=texnansi]

\definetypeface [versface] [rm] [serif] [palatino]
   [default] [encoding=texnansi,rscale=.9]

\setupbodyfont[mainface]

\definestartstop
   [Verse]
   [style=versface]

\input tufte

\startVerse \input tufte \par \stopVerse

\input tufte

\stoptext

A fourth method [quick and dirty] is to simply define a font:

\definefont [ABitSmaller] [Serif sa .9]

\definestartstop
   [Verse]
   [style=ABitSmaller]

\input tufte

\startVerse \input tufte \par \stopVerse

\input tufte

or, better lookwing

\definestartstop
   [Verse]
   [style={\ABitSmaller\setupinterlinespace[.8]}]

>- In German, there are a lot of abbreviations that end with a
>   colon, like usw. (und so weiter) etc. What is the correct way
>   to define a synonym \USW which inserts the trailing colon only
>   if no second colon is immediately following? I fiddled with
>   \doifnextcharelse, but were not successful.

This is kind of tricky because capitalizing interferes with look ahead. I 
can consider adding a hook but this is a delicate process
[not quickly hackable]

>- I suggest that the \digits mechanism should not trigger math
>   mode automatically: In my document, I want to use oldstyle
>   figures in text mode, while in math mode, upright figures shall
>   appear. (PS. The \digitpowerseperator macro used in
>   supp-num.tex should be named \digitpowerseparator, I guess.)

for the moment you can change:

\let\handlemathdigits\firstofoneargument
\let\handletextdigits\mathematics

\def\handledigits%
   {\ifmmode
      \handlemathdigits{\dohandledigits}%
    \else
      \dontleavehmode\hbox{\handletextdigits{\dohandledigits}}%
    \fi
    \egroup}

and

\let\handletextdigits\firstofoneargument

>- Do you think that the \digits mechanism can be generalised to
>   cater for phone numbers, bank account numbers, postal codes,
>   etc.? The correct typography for these is language dependent,
>   as well, so it seems to be plausible to merge the mechanisms.

the simple digits is on the to do list of language related things, but for 
phone numbers and alike, i need to wrap it into a high level interface. no 
problem, but others must make me the lists of conventions -)

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: Questions/Comments
  2001-09-11  8:27 ` Questions/Comments Hans Hagen
@ 2001-09-11 11:29   ` Marco Kuhlmann
  2001-09-11 16:36     ` Questions/Comments Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Marco Kuhlmann @ 2001-09-11 11:29 UTC (permalink / raw)


Hans Hagen wrote (2001-09-11 (10:27)):

[concerning the \strut option for \setuppagenumbering]

> it wil go into the next beta.

Great!

> >- Protruding information should be provided for all the different
> >  quotation marks. (I understand that support for protrusion is
> >  in an early state of development.)
> 
> indeed, the named ones f possible, any input is welcom

How can I play with different protrusion values? The named
quotation marks are no single characters, but combinations, like

    \def\lowerleftdoubleninequote{,,}

But the protrusion information should be assigned to
characters, right?

> \defineitemize is definitely on the todo list [even mentioned
> in core-itm.tex -)] but i want to combine this with a redo of
> the itemize module [i have a couple of more wishes]

Okay.

[concerning typesetting of versals]

> (3) use a smaller typeface

Thanks, great; that typeface concept is not that bad after all.
:-) Just one problem:

\setupsynonyms
  [acronym]
  [textstyle=versface]  

While this works fine in normal text, \subsection{\URL} goes
nuts: It prints out versface instead of using it to switch to
another font. Is this a bug or a feature? :-)

does not yield the desired effect, though: 

[concerning abbreviations with colon lookahead]

> This is kind of tricky because capitalizing interferes with
> look ahead. I can consider adding a hook but this is a
> delicate process [not quickly hackable]

I think it would be worth it, though. Not only German is
concerned, and it is much more consistent to be able to type

    We offer foo, bar, baz, \ETC. And gnus.   than
    We offer foo, bar, baz, \ETC  And gnus.

(Using synonyms for \ETC may not seem so interesting, but for
abbreviations like \ZB [zum Beispiel], which comes out as z.B.,
German typography wants a small space after the first colon:

    \abbreviation [ZB] {z.$\,$B.} {zum Beispiel}

Thus, synonyms can be used to guarantee consistent typography.)

[concerning digits]

> the simple digits is on the to do list of language related
> things, but for phone numbers and alike, i need to wrap it
> into a high level interface. no problem, but others must make
> me the lists of conventions -)

Okay, I'll send you the conventions for German.

    Cheers,
    Marco

-- 
Marco Kuhlmann                             marco.kuhlmann@gmx.net


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

* Re: Questions/Comments
  2001-09-11 11:29   ` Questions/Comments Marco Kuhlmann
@ 2001-09-11 16:36     ` Hans Hagen
  2001-09-12 13:58       ` Questions/Comments Marco Kuhlmann
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2001-09-11 16:36 UTC (permalink / raw)
  Cc: ntg-context

At 01:29 PM 9/11/2001 +0200, Marco Kuhlmann wrote:

>How can I play with different protrusion values? The named
>quotation marks are no single characters, but combinations, like
>
>     \def\lowerleftdoubleninequote{,,}
>But the protrusion information should be assigned to
>characters, right?

there is a way out by having a font with dummy chars and put that one at 
the boundary but i don't know how to make one -)

\setupsynonyms
>   [acronym]
>   [textstyle=versface]
>
>While this works fine in normal text, \subsection{\URL} goes
>nuts: It prints out versface instead of using it to switch to
>another font. Is this a bug or a feature? :-)

no, you can use \definealternativestyle [see font-ini and bet manual] to 
define a style that acts differently in normal text and section headers

>does not yield the desired effect, though:
>
>[concerning abbreviations with colon lookahead]
>
> > This is kind of tricky because capitalizing interferes with
> > look ahead. I can consider adding a hook but this is a
> > delicate process [not quickly hackable]
>
>I think it would be worth it, though. Not only German is
>concerned, and it is much more consistent to be able to type
>
>     We offer foo, bar, baz, \ETC. And gnus.   than
>     We offer foo, bar, baz, \ETC  And gnus.

hm, i can look into it later, since using real fake caps is an option 
thereby avoiding \kap

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: Questions/Comments
  2001-09-11 16:36     ` Questions/Comments Hans Hagen
@ 2001-09-12 13:58       ` Marco Kuhlmann
  2001-09-14 11:10         ` Questions/Comments Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Marco Kuhlmann @ 2001-09-12 13:58 UTC (permalink / raw)


Hans Hagen wrote (2001-09-11 (18:36)):

> no, you can use \definealternativestyle [see font-ini and bet
> manual] to define a style that acts differently in normal text
> and section headers

I tried to accomplish that with

    \definealternativestyle [versface]
      [\versface]
      [\versface]

but (a) I do not understand why one needs such definitions (it
would be appropriate for the versface style to default to these
settings) and (b) it does not get me where I want to be: now,
the headers are typeset in boldface at 100% of the requested
size, while the inline abbreviation is typeset in medium face
at 92.5% (versface). What I want is to have it typeset in bold
versface. :-) Do I really have to type

    \definealternativestyle [versface]
      [\versface]
      [\versface\bf]

to accomplish that? But then, how do I handle cases like

    blabla {\em \FOO} blabla

in normal text, where I want to be typeset in italic versface,
or even the same line in a header, where I want it to appear in
bold italic versface? It seems that I have not yet understood
how to distinguish between font commands that are "absolute"
(\versface seems to be one of those) and commands that are
"relative" (like \it).

    Marco

-- 
Marco Kuhlmann                             marco.kuhlmann@gmx.net


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

* Re: Questions/Comments
  2001-09-12 13:58       ` Questions/Comments Marco Kuhlmann
@ 2001-09-14 11:10         ` Hans Hagen
  2001-09-14 19:39           ` Questions/Comments Marco Kuhlmann
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2001-09-14 11:10 UTC (permalink / raw)
  Cc: ntg-context

At 03:58 PM 9/12/2001 +0200, Marco Kuhlmann wrote:
>Hans Hagen wrote (2001-09-11 (18:36)):
>
> > no, you can use \definealternativestyle [see font-ini and bet
> > manual] to define a style that acts differently in normal text
> > and section headers
>
>I tried to accomplish that with ......

\starttext

\definefont[versface][Regular sa 3]

\definestartstop[xxx][style=versface]

\definealternativestyle [versface][\versface][\versface]

\section{Test \xxx{test}} {Test \xxx{test}}

\definealternativestyle [versface][\versface][]

\section{Test \xxx{test}} {Test \xxx{test}}

\stoptext

So, the second arg specifies the style to use in headers.

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: Questions/Comments
  2001-09-14 11:10         ` Questions/Comments Hans Hagen
@ 2001-09-14 19:39           ` Marco Kuhlmann
  2001-09-14 20:00             ` Questions/Comments Marco Kuhlmann
  2001-09-17 16:30             ` Questions/Comments Hans Hagen
  0 siblings, 2 replies; 10+ messages in thread
From: Marco Kuhlmann @ 2001-09-14 19:39 UTC (permalink / raw)


Hans Hagen wrote (2001-09-14 (13:10)):

> \definestartstop[xxx][style=versface]

But still, if I want a header to be typeset with let us say
\bf, then \xxx not only changes the font size, but also
switches to the regular (non-bold) font. What I need is a
command that just changes the size of the font, and keeps all
the other parameters.

    Sorry for bugging you,
    Marco :-)

-- 
Marco Kuhlmann                             marco.kuhlmann@gmx.net


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

* Re: Questions/Comments
  2001-09-14 19:39           ` Questions/Comments Marco Kuhlmann
@ 2001-09-14 20:00             ` Marco Kuhlmann
  2001-09-17 16:34               ` Questions/Comments Hans Hagen
  2001-09-17 16:30             ` Questions/Comments Hans Hagen
  1 sibling, 1 reply; 10+ messages in thread
From: Marco Kuhlmann @ 2001-09-14 20:00 UTC (permalink / raw)


Marco Kuhlmann wrote (2001-09-14 (21:39)):

> But still, if I want a header to be typeset with let us say
> \bf, then \xxx not only changes the font size, but also
> switches to the regular (non-bold) font. What I need is a
> command that just changes the size of the font, and keeps all
> the other parameters.

I think I got it:

\unexpanded\def\versal%
  {\let\versal\relax
   \let\scratchtoken\fontalternative
   \versface\csname\scratchtoken\endcsname}   

    Hooray!
    Marco


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

* Re: Questions/Comments
  2001-09-14 19:39           ` Questions/Comments Marco Kuhlmann
  2001-09-14 20:00             ` Questions/Comments Marco Kuhlmann
@ 2001-09-17 16:30             ` Hans Hagen
  1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2001-09-17 16:30 UTC (permalink / raw)
  Cc: ntg-context

At 09:39 PM 9/14/2001 +0200, Marco Kuhlmann wrote:
>Hans Hagen wrote (2001-09-14 (13:10)):
>
> > \definestartstop[xxx][style=versface]
>
>But still, if I want a header to be typeset with let us say
>\bf, then \xxx not only changes the font size, but also
>switches to the regular (non-bold) font. What I need is a
>command that just changes the size of the font, and keeps all
>the other parameters.

Hm, so you want to preserve a font state but do a rather massive change at 
the same time.

\definetypeface[one][rm][serif][computer-roman][default]
\definetypeface[two][rm][serif][computer-roman][default][rscale=.9]

\def\pushcurrentfont
   {\edef\popcurrentfont
      {\noexpand\def\noexpand\fontbody{\fontbody}%
       \noexpand\def\noexpand\fontstyle{\fontstyle}%
       \noexpand\dosetcurrentfontalternative{\fontalternative}%
       \noexpand\dosetcurrentfontsize{\fontsize}%
       \noexpand\synchronizefont}}

{\one \bf test \two test}

{\one \bf test \pushcurrentfont \two \popcurrentfont test}

I have to give this some thought. maybe make it an optional default or 
so.  I would say: play a bit with it and let me know.

btw, another option is:

{test \setcurrentfontbody{10pt} test}

{\bf test \setcurrentfontbody{6pt} test}

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: Questions/Comments
  2001-09-14 20:00             ` Questions/Comments Marco Kuhlmann
@ 2001-09-17 16:34               ` Hans Hagen
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2001-09-17 16:34 UTC (permalink / raw)
  Cc: ntg-context

At 10:00 PM 9/14/2001 +0200, Marco Kuhlmann wrote:
>Marco Kuhlmann wrote (2001-09-14 (21:39)):
>
> > But still, if I want a header to be typeset with let us say
> > \bf, then \xxx not only changes the font size, but also
> > switches to the regular (non-bold) font. What I need is a
> > command that just changes the size of the font, and keeps all
> > the other parameters.
>
>I think I got it:
>
>\unexpanded\def\versal%
>   {\let\versal\relax
>    \let\scratchtoken\fontalternative
>    \versface\csname\scratchtoken\endcsname}

hm, looks terrible, doens't it? anyway, you can safe a line by:

\expandafter\versface\csname\fontalternative\endcsname

which is still not something i want users to bother with,

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

end of thread, other threads:[~2001-09-17 16:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-10 16:57 Questions/Comments Marco Kuhlmann
2001-09-11  8:27 ` Questions/Comments Hans Hagen
2001-09-11 11:29   ` Questions/Comments Marco Kuhlmann
2001-09-11 16:36     ` Questions/Comments Hans Hagen
2001-09-12 13:58       ` Questions/Comments Marco Kuhlmann
2001-09-14 11:10         ` Questions/Comments Hans Hagen
2001-09-14 19:39           ` Questions/Comments Marco Kuhlmann
2001-09-14 20:00             ` Questions/Comments Marco Kuhlmann
2001-09-17 16:34               ` Questions/Comments Hans Hagen
2001-09-17 16:30             ` Questions/Comments 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).