[NTG-context] set headings in the margins

2007-10-09 Thread Aric Bills
Hello all,

I'm a total newbie Context user trying to do something that is apparently
way beyond me.  I'm trying to set up a conceptual three-column design grid.
The idea was to use the two columns on the right for body text, the column
on the left for margin paragraphs, and the full three-column spread for
headings.  The easiest way I could find to set such a thing up was this:

\setuplayout[backspace=3.083in,
leftmargin=2.083in,
leftmargindistance=.25in,
width=4.417in,
rightmargin=1in]

where leftmargin represents the leftmost column and width represents the
other two columns (plus gutter).  So far so good.

To get my heading to stretch across all three conceptual columns, I thought
I'd use something along the lines of:

\start
\startlocal
\setuplayout[...]
\stoplocal
\section{This heading was supposed to start at the left edge of the left
margin and wrap at the right edge of the text area}
\stop

where [...] would eliminate the left margin and margindistance and
re-allocate that space to the text width.
However, I haven't yet found any [...] that does the trick.

Whether my approach is basically right or totally wrong, I'd love to get
guidance on the best way to typeset a heading across both the margin and the
text area.  I'm aware that it's trivial to make section numbers appear in
the margin; this is not the solution I'm looking for, though.

Thanks for your help,
Aric
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Hiding PDF-Layer

2007-10-09 Thread Wolfgang Schuster
Hi,

I want to include PDF layers in document and the should be hidden by default,
the current behaviour is to show all layers I defined in my document and this
should be later by the user and not when I open the file.

The following shortened example from the modules show what I mean,
the text Text can be seen when you open the document but it should
appear only if you press the VIDE button.

\starttext

\setupinteraction[state=start]

\defineproperty[L1][layer][title=layer 1]

\button{HIDE   L1}[HideLayer{L1}]
\button{VIDE   L1}[VideLayer{L1}]

\midaligned
  {\definedfont[Mono at 150pt]%
   \startproperty[L1]
   TEST
   \stopproperty}

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


Re: [NTG-context] set headings in the margins

2007-10-09 Thread Wolfgang Schuster
2007/10/9, Aric Bills [EMAIL PROTECTED]:
 Hello all,

 I'm a total newbie Context user trying to do something that is apparently
 way beyond me.  I'm trying to set up a conceptual three-column design grid.
 The idea was to use the two columns on the right for body text, the column
 on the left for margin paragraphs, and the full three-column spread for
 headings.  The easiest way I could find to set such a thing up was this:

 \setuplayout[backspace=3.083in,
 leftmargin=2.083in,
 leftmargindistance=.25in,
 width=4.417in,
 rightmargin=1in]

 where leftmargin represents the leftmost column and width represents the
 other two columns (plus gutter).  So far so good.

 To get my heading to stretch across all three conceptual columns, I thought
 I'd use something along the lines of:

 \start
 \startlocal
 \setuplayout[...]
 \stoplocal
 \section{This heading was supposed to start at the left edge of the left
 margin and wrap at the right edge of the text area}
 \stop

 where [...] would eliminate the left margin and margindistance and
 re-allocate that space to the text width.
 However, I haven't yet found any [...] that does the trick.

 Whether my approach is basically right or totally wrong, I'd love to get
 guidance on the best way to typeset a heading across both the margin and the
 text area.  I'm aware that it's trivial to make section numbers appear in
 the margin; this is not the solution I'm looking for, though.

 Thanks for your help,
 Aric

Hi Aric,

you can start with my solution, sorry but I have at the moment no time
for a better one.

\setuplayout[backspace=6cm,width=fit]
\def\myheader#1#2%
  {\hbox to\makeupwidth
 {\hss\hbox
to\dimexpr\leftmarginwidth+\leftmargindistance+\makeupwidth\relax

{\vbox{\hsize=\dimexpr\leftmarginwidth+\leftmargindistance+\makeupwidth\relax#1#2

\setuphead[section][command=\myheader]

\starttext

\dorecurse{5}
  {\section{\dorecurse{100}{text }}
   \dorecurse{5}{\input knuth\par}}

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


Re: [NTG-context] Hiding PDF-Layer

2007-10-09 Thread Peter Rolf
Hi Wolfgang,

Wolfgang Schuster schrieb:
 Hi,
 
 I want to include PDF layers in document and the should be hidden by default,
 the current behaviour is to show all layers I defined in my document and this
 should be later by the user and not when I open the file.
 
 The following shortened example from the modules show what I mean,
 the text Text can be seen when you open the document but it should
 appear only if you press the VIDE button.
 
 \starttext
 
 \setupinteraction[state=start]
 
 \defineproperty[L1][layer][title=layer 1]
   ^^
[title={layer 1}, state=stop]

should work.

Best wishes, Peter

 
 \button{HIDE   L1}[HideLayer{L1}]
 \button{VIDE   L1}[VideLayer{L1}]
 
 \midaligned
   {\definedfont[Mono at 150pt]%
\startproperty[L1]
TEST
\stopproperty}
 
 \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  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 

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


[NTG-context] Problem with chemistry in display mode

2007-10-09 Thread Shen Chen
Hi all, 

The following example with the chemical module complains that ! Argument of
\mtharrowfill has an extra }..

---
\usemodule[chemic]
\starttext
$$ \chemical{2H_2,PLUS,O_2,GIVES,2H_2O} $$
\stoptext
---

The result pdf looks fine, though. The annoying problem only occurs when
there's an arrow GIVES, and only in display mode.

I am using ConTeXt 2007.08.24, and the complete warning message is

---
! Argument of \mtharrowfill has an extra }.
inserted text 
\par
to be read again 
   }
\chemicaloutermolecule ...chemicalstyle {\strut #1
  }$}\doresetsubscripts
}\ma...

\dochemicalouterarrow ...\!!zeropoint \box 4\fi }
  \egroup
\p!compareprocessactionD ...ommalistelement {#3}#2
  \expandafter
\quitcommalis...

\next2 #1,-\p!dodoprocessaction {#1}
 \doprocesscommaitem
...
---


Thanks a lot,
shenchen

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


Re: [NTG-context] Problem with chemistry in display mode

2007-10-09 Thread Aditya Mahajan
On Tue, 9 Oct 2007, Shen Chen wrote:

 Hi all,

 The following example with the chemical module complains that ! Argument of
 \mtharrowfill has an extra }..

 ---
 \usemodule[chemic]
 \starttext
 $$ \chemical{2H_2,PLUS,O_2,GIVES,2H_2O} $$
 \stoptext
 ---

 The result pdf looks fine, though. The annoying problem only occurs when
 there's an arrow GIVES, and only in display mode.

This error is due to a change that I suggested in math-ext (for over 
and under arrows). I did not check that it breaks ppchtex. Here is a 
fix. Add this somewhere in your style file:

\def\chemicalsingleouterarrow
   {\dochemicalouterarrow
  {\hbox to \dimen2{\rightarrowfill\textstyle}}}

\def\chemicaldoubleouterarrow
   {\dochemicalouterarrow
  {\lower.5\ht0\vbox
 {\offinterlineskip
  \hbox to \dimen2{\rightarrowfill\textstyle}
  \hbox to \dimen2{\leftarrowfill\textstyle

\def\chemicaltwintipouterarrow
   {\dochemicalouterarrow
  {\hbox
 {\hbox to \dimen2{\rightarrowfill\textstyle}%
  \hskip-\dimen2
  \hbox to \dimen2{\leftarrowfill\textstyle


Hans, this should be corrected in ppchtex. There are a few other 
chemistry modules that use arrowfills, which now needs an argument 
specifying the math mode in which arrow should be drawn.

I will look into it, but I have examples of working chemical 
formulas.

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


[NTG-context] set headings in the margins

2007-10-09 Thread Aric Bills
Thanks Wolfgang--your solution does just what I needed.  I'll study it.

Best regards,
Aric

(Apologies if I've sent my reply improperly)
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] need help with creating a grid with context

2007-10-09 Thread MASON Peter J
I'm trying to layout a grid of bullets. The results isn't the expected one. 
Perhaps someone could offer help here? Thanks.

Here's the sort of thing I'm doing 

\setuplayout[leftmargin=0pt, leftmargindistance=0pt, backspace=0pt, 
rightmargin=0pt, rightmargindistance=0pt, cutspace=0pt, width=middle, 
topspace=0pt, header=0pt, headerdistance=0pt, footer=0pt, footerdistance=0pt, 
bottomspace=0pt, height=middle]
%\showlayout

\starttext
\setuppositioning[unit=cm]
\startpositioning
\newcount\Row

\Row= 0
\loop
{
\newcount\Col

\Col = 0
\loop
\position(\Col, \Row) {$\bullet$}
\ifnum\Col  14
\advance\Col by 1
\repeat
}
\ifnum\Row  36
\advance\Row by 1
\repeat
\stoppositioning
\stoptext


IMPORTANT NOTICE: This e-mail and any attachment to it are intended only to be 
read or used by the named addressee. It is confidential and may contain legally 
privileged information. No confidentiality or privilege is waived or lost by 
any mistaken transmission to you. The RTA is not responsible for any 
unauthorised alterations to this e-mail or attachment to it. Views expressed in 
this message are those of the individual sender, and are not necessarily the 
views of the RTA. If you receive this e-mail in error, please immediately 
delete it from your system and notify the sender. You must not disclose, copy 
or use any part of this e-mail if you are not the intended recipient.
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] need help with creating a grid with context

2007-10-09 Thread MASON Peter J
Perhaps I ought to tell what I'm expecting :-) ...
 
Hope to create a regular (1cm spacing) grid on page, of bullets. Ultimately 
over the whole page.
 
The context code supplied produces successive rows with an offset to the right.
 
Have I missed something obvious?

IMPORTANT NOTICE: This e-mail and any attachment to it are intended only to be 
read or used by the named addressee. It is confidential and may contain legally 
privileged information. No confidentiality or privilege is waived or lost by 
any mistaken transmission to you. The RTA is not responsible for any 
unauthorised alterations to this e-mail or attachment to it. Views expressed in 
this message are those of the individual sender, and are not necessarily the 
views of the RTA. If you receive this e-mail in error, please immediately 
delete it from your system and notify the sender. You must not disclose, copy 
or use any part of this e-mail if you are not the intended recipient.
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Problem with chemistry in display mode

2007-10-09 Thread Shen Chen
The fix works. Thanks a lot!

shenchen

On 10/10/07 1:59 AM, Aditya Mahajan [EMAIL PROTECTED] wrote:

 On Tue, 9 Oct 2007, Shen Chen wrote:
 
 Hi all,
 
 The following example with the chemical module complains that ! Argument of
 \mtharrowfill has an extra }..
 
 ---
 \usemodule[chemic]
 \starttext
 $$ \chemical{2H_2,PLUS,O_2,GIVES,2H_2O} $$
 \stoptext
 ---
 
 The result pdf looks fine, though. The annoying problem only occurs when
 there's an arrow GIVES, and only in display mode.
 
 This error is due to a change that I suggested in math-ext (for over
 and under arrows). I did not check that it breaks ppchtex. Here is a
 fix. Add this somewhere in your style file:
 
 \def\chemicalsingleouterarrow
{\dochemicalouterarrow
   {\hbox to \dimen2{\rightarrowfill\textstyle}}}
 
 \def\chemicaldoubleouterarrow
{\dochemicalouterarrow
   {\lower.5\ht0\vbox
  {\offinterlineskip
   \hbox to \dimen2{\rightarrowfill\textstyle}
   \hbox to \dimen2{\leftarrowfill\textstyle
 
 \def\chemicaltwintipouterarrow
{\dochemicalouterarrow
   {\hbox
  {\hbox to \dimen2{\rightarrowfill\textstyle}%
   \hskip-\dimen2
   \hbox to \dimen2{\leftarrowfill\textstyle
 
 
 Hans, this should be corrected in ppchtex. There are a few other
 chemistry modules that use arrowfills, which now needs an argument
 specifying the math mode in which arrow should be drawn.
 
 I will look into it, but I have examples of working chemical
 formulas.
 
 Aditya
 __
 _
 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  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 __
 _

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