Re: [NTG-context] setupinmargin, setupmargindata ; page numbers ; fonts

2014-11-25 Thread Richard Sherman
Wolfgang Schuster schuster.wolfgang at gmail.com writes:

...
 \setuppagenumbering[style=\ttc]
 
 \setuplayout[backspace=4cm]
 
 \showframe
 
 \setupmarginframed[inmargin][align=flushleft]
 \setupmargindata  [inmargin][style={\switchtobodyfont[ss,18]}]
 
 % Faster method to switch the font for \inmargin
 %\definefont[InmarginStyle][Sans at 18pt]
 %\setupmargindata[inmargin][style=InmarginStyle]
 
 \starttext
 
 \dorecurse{10}
   {\inmargin{Ward}
\input ward\par
\inmargin[][align=flushleft]{Knuth}
\input knuth\par
\inmargin[][align=flushright]{Tufte}
\input tufte\par
\inmargin[][align=middle]{Zapf}
\input zapf\par}
 
 \stoptext

---

Thank you, this is beginning to look good. 

Your first method, uncommented, does not work for me. I get an error at 
the first occurrence of \inmargin.

Using the method you commented out, I get what I want. I'm a little 
perplexed at why I can't include align=flushleft as in 
\setupmargindata[inmargin]
[style=InMarginStyle, align=flushleft]. I'm unable to find any reference 
to \setupmarginframed via Google. 

Using \setuppagenumbering[style=\rmx, location={header, inmargin}, 
align=right], 
I'm able to get close to what I want, though 'align=right' has no effect.

Oddly (?), my system knows no Ward, nor Tufte, nor Zapf, nor any 
of the rest of them. :)

Thanks, -Richard


___
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
___

Re: [NTG-context] setupinmargin, setupmargindata ; page numbers ; fonts

2014-11-25 Thread Wolfgang Schuster

 Am 25.11.2014 um 10:14 schrieb Richard Sherman rss@gmail.com:
 
 Wolfgang Schuster schuster.wolfgang at gmail.com writes:
 
 ...
 \setuppagenumbering[style=\ttc]
 
 \setuplayout[backspace=4cm]
 
 \showframe
 
 \setupmarginframed[inmargin][align=flushleft]
 \setupmargindata  [inmargin][style={\switchtobodyfont[ss,18]}]
 
 % Faster method to switch the font for \inmargin
 %\definefont[InmarginStyle][Sans at 18pt]
 %\setupmargindata[inmargin][style=InmarginStyle]
 
 \starttext
 
 \dorecurse{10}
  {\inmargin{Ward}
   \input ward\par
   \inmargin[][align=flushleft]{Knuth}
   \input knuth\par
   \inmargin[][align=flushright]{Tufte}
   \input tufte\par
   \inmargin[][align=middle]{Zapf}
   \input zapf\par}
 
 \stoptext
 
 ---
 
 Thank you, this is beginning to look good. 
 
 Your first method, uncommented, does not work for me. I get an error at 
 the first occurrence of \inmargin.

The first line is a comment which says

\definefont[InmarginStyle][Sans at 18pt]
\setupmargindata[inmargin][style=InmarginStyle]

takes less time to change the font than

\setupmargindata[inmargin][style={\switchtobodyfont[ss,18]}]

but you won’t notice the difference unless your document has thousands of pages
and even then you will notice it only will large fonts (e.g. chinese fonts).

 Using the method you commented out, I get what I want. I'm a little 
 perplexed at why I can't include align=flushleft as in 
 \setupmargindata[inmargin]
 [style=InMarginStyle, align=flushleft]. I'm unable to find any reference 
 to \setupmarginframed via Google. 
 
 Using \setuppagenumbering[style=\rmx, location={header, inmargin}, 
 align=right], 
 I'm able to get close to what I want, though 'align=right' has no effect.

The command has no align option but you can use the command key to use a 
alignment command.

\setuppagenumbering
  [location={header,inmargin},
   alternative=doublesided,
   command={\alignedline{outer}{right}}] % command=\doalignline{outer}

\showframe

\starttext
\dorecurse{20}{\input knuth\par}
\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
___

Re: [NTG-context] setupinmargin, setupmargindata ; page numbers ; fonts

2014-11-25 Thread Richard Sherman
Wolfgang Schuster schuster.wolfgang at gmail.com writes:

 The first line is a comment which says
 
 \definefont[InmarginStyle][Sans at 18pt]
 \setupmargindata[inmargin][style=InmarginStyle]
 
 takes less time to change the font than
 
 \setupmargindata[inmargin][style={\switchtobodyfont[ss,18]}]
 


Thank you again, very much.

I understood what you meant regarding the two methods. What I meant was that
this method:

\setupmargindata[inmargin][style={\switchtobodyfont[ss,18]}]

results in an error, causing Context to stop executing, when it first 
encounters 
the \inmargin{} statement.

-Richard


___
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
___

Re: [NTG-context] setupinmargin, setupmargindata ; page numbers ; fonts

2014-11-25 Thread Wolfgang Schuster

 Am 26.11.2014 um 02:39 schrieb Richard Sherman rss@gmail.com:
 
 Wolfgang Schuster schuster.wolfgang at gmail.com writes:
 
 The first line is a comment which says
 
 \definefont[InmarginStyle][Sans at 18pt]
 \setupmargindata[inmargin][style=InmarginStyle]
 
 takes less time to change the font than
 
 \setupmargindata[inmargin][style={\switchtobodyfont[ss,18]}]
 
 
 
 Thank you again, very much.
 
 I understood what you meant regarding the two methods. What I meant was that
 this method:
 
 \setupmargindata[inmargin][style={\switchtobodyfont[ss,18]}]
 
 results in an error, causing Context to stop executing, when it first 
 encounters 
 the \inmargin{} statement.

Replace “18” with “18pt”.

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
___

[NTG-context] setupinmargin, setupmargindata ; page numbers ; fonts

2014-11-24 Thread Richard Sherman
Hi all,

I am having trouble with the control of fonts in \inmargin{} and in page
numbers. I'm also having trouble with the alignment in \inmargin{}, and with
font sizes generally.

I've used what I know about \setupmargindata and \setupinmargin(and
\setuppagenumbering).

Below is an example that (almost) does what I want.

The two or three problems I've tried and failed to solve are

1. control over the font size of the marginal note (rather than just \small; I
want to choose a point-size)

2. control over the font and size of the page number. At first I used
\setuppagenumbering[location={header, right, inmargin}] (yes, one of 'right' and
'inmargin' seems to be redundant).  Getting a sans-serif page number, I assumed
that \setupmargindata was controlling that, so I just switched to 'right', but
my page number is still sans-serif. I've tried such things as [location={header,
right}, style={normal, small}], as well as variants {\small}, {normal},
{\normal}, serif, \serif, etc. with not luck

3. in \setupmargindata and \setupinmargin, none of the 'align=' options seems to
have any effect.

More generally, I have trouble understanding how to specify font sizes in
ConTeXt, how to set up the font and font-size of page elements, how to include
comma-separated lists following 'style=', where even within braces all but the
first option seems to be ignored (at least in my margin setup commands).

I also can't figure out why, though the default (location) for
\setuppagenumbering is {header, center} (and (font style) normal?), my page
numbers default to sans, and when 'location=right' is specified without
'header', the page number is on the right in the ... footer (?!)

Thanks for any help. -Richard


\setuplayout[width=5in, header=.5in, footer=.5in, backspace=2in, location=right]
\setupwhitespace[big] \setupindenting[none] \setupmargindata[location=left,
align=outer, style={\ss \small}] \setuppagenumbering[location={header, right}]


\definefontfamily [myfamily] [serif] [baskervaldx] \definefontfamily [myfamily]
[italic] [baskervaldxita] \definefontfamily [myfamily] [bold] [baskervaldxbol]
\definefontfamily [myfamily] [sans] [gillsansstd] \definefontfamily [myfamily]
[mono] [CourierNew] \setupbodyfont [myfamily]

\starttext

ConTeXt is software\inmargin{A brief description of \ConTeXt} for typesetting
high-quality documents. Unlike familiar word processors where the
\emph{formatting} of the final document is crafted while writing the content,
ConTeXt documents are written \bold{without} formatting, in \mono{plain text},
using a macro language. This means that the document's content can change
independently of its formatting and vice versa.

ConTeXt is software for typesetting high-quality documents.\inmargin{This
repeats the brief description above} Unlike familiar word processors where the
formatting of the final document is crafted while writing the content, ConTeXt
documents are written without formatting, in plain text, using a macro language.
This means that the document's content can change independently of its
formatting and vice versa.

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

Re: [NTG-context] setupinmargin, setupmargindata ; page numbers ; fonts

2014-11-24 Thread Wolfgang Schuster

 Am 25.11.2014 um 03:47 schrieb Richard Sherman rss@gmail.com:
 
 Hi all,
 
 I am having trouble with the control of fonts in \inmargin{} and in page
 numbers. I'm also having trouble with the alignment in \inmargin{}, and with
 font sizes generally.
 
 I've used what I know about \setupmargindata and \setupinmargin(and
 \setuppagenumbering).
 
 Below is an example that (almost) does what I want.
 
 The two or three problems I've tried and failed to solve are
 
 1. control over the font size of the marginal note (rather than just \small; I
 want to choose a point-size)
 
 2. control over the font and size of the page number. At first I used
 \setuppagenumbering[location={header, right, inmargin}] (yes, one of 'right' 
 and
 'inmargin' seems to be redundant).  Getting a sans-serif page number, I 
 assumed
 that \setupmargindata was controlling that, so I just switched to 'right', but
 my page number is still sans-serif. I've tried such things as 
 [location={header,
 right}, style={normal, small}], as well as variants {\small}, {normal},
 {\normal}, serif, \serif, etc. with not luck
 
 3. in \setupmargindata and \setupinmargin, none of the 'align=' options seems 
 to
 have any effect.
 
 More generally, I have trouble understanding how to specify font sizes in
 ConTeXt, how to set up the font and font-size of page elements, how to include
 comma-separated lists following 'style=', where even within braces all but the
 first option seems to be ignored (at least in my margin setup commands).
 
 I also can't figure out why, though the default (location) for
 \setuppagenumbering is {header, center} (and (font style) normal?), my page
 numbers default to sans, and when 'location=right' is specified without
 'header', the page number is on the right in the ... footer (?!)


1. The font for the pagenumber can be changed with \setuppagenumbering[style=…].

2. To use a certain font size for the margin text you can either use the 
\switchtobodyfont
   command or define a font command with \definefont and use this name as 
argument
   for the style key in \setupmargindata.

3. The alignment in the margin text can be set with \setupmarginframed or the 
second
   optional argument of \inmargin.

\setuppagenumbering[style=\ttc]

\setuplayout[backspace=4cm]

\showframe

\setupmarginframed[inmargin][align=flushleft]
\setupmargindata  [inmargin][style={\switchtobodyfont[ss,18]}]

% Faster method to switch the font for \inmargin
%\definefont[InmarginStyle][Sans at 18pt]
%\setupmargindata[inmargin][style=InmarginStyle]

\starttext

\dorecurse{10}
  {\inmargin{Ward}
   \input ward\par
   \inmargin[][align=flushleft]{Knuth}
   \input knuth\par
   \inmargin[][align=flushright]{Tufte}
   \input tufte\par
   \inmargin[][align=middle]{Zapf}
   \input zapf\par}

\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
___