[NTG-context] Natural Tables---Including a bit of cell style in a \define

2011-11-22 Thread Pavneet Arora
I am creating documentation labeling the circuits of electrical and network 
panels for a project of mine.


Enclosed is a minimal example.

What I would like is to define two macros:  \unused and \spare (\unused 
referring to a circuit with no breaker installed, while \spare referring to a 
circuit with a breaker, but no load).  I wish these definitions to not only 
include the represented text and font directives, i.e., {\tt [Unused]}, but also 
shade the cell in a background color.  However, I cannot seem to figure out how 
to do that.  Including the `[background=color,backgroundcolor=gray]' in the 
\define seems to be expanded back simply as text.


Any suggestions?

advTHANKSance.

--
-
- Pavneet Arora



test.pdf
Description: Adobe PDF document
\setuppapersize[letter]
\setuplayout[header=0in,footer=0in,topspace=0.75in,backspace=1.25in]
\setuppagenumbering[location=]
\starttext
% \showlayout
% \showbodyfont
\define\unused{{\tt [Unused]}}
\define\spare{{\tt [Spare]}}
\startalignment[center]
{\tfb\sc Storage Room Electrical Panel}
\blank
{\tfa Panel Model: Cutler-Hammer}
\blank
{\tfb \tt [DRAFT---To Be Verfied]}
\blank[2*big]

\setupTABLE[frame=off]
\setupTABLE[r][each][height=0.35in]
\setupTABLE[c][1,3][align={center,lohi},width=0.75in]
\setupTABLE[c][2,4][align={flushleft,lohi},width=2.25in,offset=2mm]
\setupTABLE[r][1][topframe=on,bottomframe=on]
\setupTABLE[r][last][bottomframe=on]
\setupTABLE[c][3][leftframe=on]
\setupTABLE[r][4][topframe=on]
\setupTABLE[r][6][topframe=on]
\setupTABLE[1,2][6][bottomframe=on]
\bTABLE
\bTABLEbody
	\bTR
		\bTD Circuit \eTD
		\bTD Description \eTD
		\bTD Circuit \eTD
		\bTD Description \eTD
	\eTR
	\bTR
		\bTD [nr=2] 1 \eTD \bTD [nr=4] Electrical Baseboard Heater \eTD
		\bTD 2A \eTD \bTD[background=color,backgroundcolor=gray] \unused \eTD
	\eTR
	\bTR
		\bTD 2B \eTD \bTD \unused \eTD
	\eTR
	\bTR
		\bTD [nr=2] 3 \eTD
		\bTD 4A \eTD \bTD Island Plugs \eTD
	\eTR
	\bTR
		\bTD 4B \eTD \bTD Dishwasher \eTD
	\eTR
	\bTR
		\bTD [nr=2] 5 \eTD \bTD [nr=2] \spare  \eTD
		\bTD 6A \eTD \bTD Freezer \eTD
	\eTR
	\bTR
		\bTD 6B \eTD \bTD Counter Plugs \eTD
	\eTR
\eTABLEbody
\eTABLE
\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
___

[NTG-context] What is the prescribed way to add attachments to a list posting?

2011-11-22 Thread Pavneet Arora
In my last posting, I had included the source and .pdf output as attachments, 
but it seems that the source was included in-line and the .pdf was discarded. 
Is there a prescribed way to include attachments?


Thanks.

--
-
- Pavneet Arora


___
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] What is the prescribed way to add attachments to a list posting?

2011-11-22 Thread Mojca Miklavec
On Tue, Nov 22, 2011 at 14:17, Pavneet Arora wrote:
 In my last posting, I had included the source and .pdf output as
 attachments, but it seems that the source was included in-line and the .pdf
 was discarded. Is there a prescribed way to include attachments?

Attachments usually survive, but they may not exceed a certain size
limit. Usually that is problematic - PDF documents may get very large,
even the most simple ones usually exceed size limit (it depends on
what engine and what fonts you use).

I don't know why text attachment was converted into an inline one
(gmail often displays simple text documents inline, but that doesn't
mean that they were converted by mailman). Usually that doesn't happen
unless a moderator did that or something weird happened :).

Many people upload PDFs to their own servers and post a link if PDFs
are large. Sometimes you can attach PNG with a screenshot of
problematic part. You could also make an attachment in bug reporting
software (http://tracker.luatex.org/) if you are reporting a bug.

Mojca
___
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] What is the prescribed way to add attachments to a list posting?

2011-11-22 Thread Pavneet Arora
Thanks, Mojca. I was looking at the web-interface of the archives. It seems 
that the attachments *were* including in the mailing list message, but were 
converted/stripped in the archives.

Regards.
--
Sent from my Nokia N900. Please excuse my brevity.

- Original message -
 On Tue, Nov 22, 2011 at 14:17, Pavneet Arora wrote:
  In my last posting, I had included the source and .pdf output as
  attachments, but it seems that the source was included in-line and the
  .pdf was discarded. Is there a prescribed way to include attachments?

 Attachments usually survive, but they may not exceed a certain size
 limit. Usually that is problematic - PDF documents may get very large,
 even the most simple ones usually exceed size limit (it depends on
 what engine and what fonts you use).

 I don't know why text attachment was converted into an inline one
 (gmail often displays simple text documents inline, but that doesn't
 mean that they were converted by mailman). Usually that doesn't happen
 unless a moderator did that or something weird happened :).

 Many people upload PDFs to their own servers and post a link if PDFs
 are large. Sometimes you can attach PNG with a screenshot of
 problematic part. You could also make an attachment in bug reporting
 software (http://tracker.luatex.org/) if you are reporting a bug.

 Mojca

___
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] What is the prescribed way to add attachments to a list posting?

2011-11-22 Thread Mojca Miklavec
On Tue, Nov 22, 2011 at 15:20, Pavneet Arora wrote:
 Thanks, Mojca. I was looking at the web-interface of the archives. It seems
 that the attachments *were* including in the mailing list message, but were
 converted/stripped in the archives.

They are not really removed, but it might be that they are not shown
in lurker (archive.contextgarden.net) for whatever reason.

Mojca
___
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] Text in a box now broken

2011-11-22 Thread Kip Warner
On Tue, 2011-11-22 at 06:49 +0100, Wolfgang Schuster wrote:
 This is tested and works on my machine:
 
 \definebackground
   [TimelineDocumentFrame]
   [frame=on,
before=\blank,
after=\blank,
corner=round,
topoffset=0.5cm,
rightoffset=0.5cm]
 
 \definestartstop
   [TimelineDocument]
   [before=\startTimelineDocumentFrame,
after=\stopTimelineDocumentFrame,
style=italic]
 
 \starttext
 
 \startTimelineDocument
 Some stuff in a box.
 \stopTimelineDocument
 
 \stoptext
 
 Wolfgang

Thanks Wolfgang. You're always very helpful. Any idea why my version
stopped working or why it is not a good approach?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] latest beta

2011-11-22 Thread Thomas A. Schmitz

Hi Hans,

the files typo-itc.lua and typo-itc.mkvi are missing in today's beta; I 
assume that's just an oversight?


All best

Thomas
___
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] current version?

2011-11-22 Thread Jon Crump
Dear all,

Can someone help? By some incantation that I cannot now seem to
reproduce, I was able to obtain and install:
mtx-context | current version: 2011.11.14 16:17

In an attempt to update this version, I ran first-setup.sh found at
http://minimals.contextgarden.net/setup/first-setup.sh and what got
installed was:
mtx-context | current version: 2011.05.18 18:04

Can anyone tell me how to get back to 2011.11.14 or to the latest version?

Jon
___
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] Text in a box now broken

2011-11-22 Thread Kip Warner
On Tue, 2011-11-22 at 06:49 +0100, Wolfgang Schuster wrote:
 This is tested and works on my machine:
 
 \definebackground
   [TimelineDocumentFrame]
   [frame=on,
before=\blank,
after=\blank,
corner=round,
topoffset=0.5cm,
rightoffset=0.5cm]
 
 \definestartstop
   [TimelineDocument]
   [before=\startTimelineDocumentFrame,
after=\stopTimelineDocumentFrame,
style=italic]
 
 \starttext
 
 \startTimelineDocument
 Some stuff in a box.
 \stopTimelineDocument
 
 \stoptext
 
 Wolfgang

Hey Wolfgang. One other thing. Your \definebackground and
\defomestartstop works fine in the minimal example you gave, but if I
take it into my environment of my existing project and replace my old
\definestartstop with that, I still have the same problem of the mangled
box with no visible text in it.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com



signature.asc
Description: This is a digitally signed message part
___
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] Text in a box now broken

2011-11-22 Thread Kip Warner
On Tue, 2011-11-22 at 06:49 +0100, Wolfgang Schuster wrote:
 This is tested and works on my machine:
 
 \definebackground
   [TimelineDocumentFrame]
   [frame=on,
before=\blank,
after=\blank,
corner=round,
topoffset=0.5cm,
rightoffset=0.5cm]
 
 \definestartstop
   [TimelineDocument]
   [before=\startTimelineDocumentFrame,
after=\stopTimelineDocumentFrame,
style=italic]
 
 \starttext
 
 \startTimelineDocument
 Some stuff in a box.
 \stopTimelineDocument
 
 \stoptext
 
 Wolfgang

Hey Wolfgang. I just retested your minimal and realized that while it
does work, only for the first box. Try this and you'll see what I mean:

\definebackground
[TimelineDocumentFrame]
[frame=on,
before=\blank,
after=\blank,
corner=round,
topoffset=0.5cm,
rightoffset=0.5cm]

\definestartstop
[TimelineDocument]
[before=\startTimelineDocumentFrame,
after=\stopTimelineDocumentFrame,
style=italic]

\starttext

\startTimelineDocument
Some stuff in a box.
\stopTimelineDocument

\startTimelineDocument
Some more stuff in a box.
\stopTimelineDocument

\stoptext

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Placing text in the margin of a header or the top right corner of a page

2011-11-22 Thread Matthias Weber
Dear All,

I am trying to place a framed text in the top right corner of each page of a 
screen document and it looks like (cont-eni)  some
invocation of \setupheadertexts might do the job. Unfortunately, I have only 
been able to place my text in the margin of the body of the page,
using \margintext. Ideally, I would like to have the framed text box flush with 
the top and right edge of a page, but any approximate solution or a pointer
to some document to read (that could educate me) will be much appreciated.

Thanks,

Matthias



___
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] Placing text in the margin of a header or the top right corner of a page

2011-11-22 Thread Christian
 Dear All,
 
 I am trying to place a framed text in the top right corner of each page of a
 screen document and it looks like (cont-eni)  some invocation of
 \setupheadertexts might do the job. Unfortunately, I have only been able to
 place my text in the margin of the body of the page, using \margintext.
 Ideally, I would like to have the framed text box flush with the top and right
 edge of a page, but any approximate solution or a pointer to some document
 to read (that could educate me) will be much appreciated.

Smells like Layers to me. Try this, for starters:

\definelayer[mybg][x=180mm, y=0mm,width=3cm, height=3cm,repeat=yes]
\setlayer[mybg][hoffset=0cm, voffset=0cm]{\framed[frame=on, width=3cm, 
height=2cm,background=color,backgroundcolor=black,foregroundcolor=white]{LAYER}}
\setupbackgrounds[page][background=mybg]
\starttext
Test
\page
Test1
\page
Test2
\stoptext

More info here:
http://wiki.contextgarden.net/layers

Hope that helps :)

___
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] Placing text in the margin of a header or the top right corner of a page

2011-11-22 Thread Matthias Weber
Fascinating. Thanks a lot. That is more than I hoped for, and was easy to adapt 
to what I wanted. 

One small issue: There is a tiny gap between the black layer box and the right 
margin (in white) that doesn't even disappear when I increase hoffset.
Any chance to make that disappear, too?

Thanks again -

Matthias


On Nov 22, 2011, at 11:30 PM, Christian wrote:

 Dear All,
 
 I am trying to place a framed text in the top right corner of each page of a
 screen document and it looks like (cont-eni)  some invocation of
 \setupheadertexts might do the job. Unfortunately, I have only been able to
 place my text in the margin of the body of the page, using \margintext.
 Ideally, I would like to have the framed text box flush with the top and 
 right
 edge of a page, but any approximate solution or a pointer to some document
 to read (that could educate me) will be much appreciated.
 
 Smells like Layers to me. Try this, for starters:
 
 \definelayer[mybg][x=180mm, y=0mm,width=3cm, height=3cm,repeat=yes]
 \setlayer[mybg][hoffset=0cm, voffset=0cm]{\framed[frame=on, width=3cm, 
 height=2cm,background=color,backgroundcolor=black,foregroundcolor=white]{LAYER}}
 \setupbackgrounds[page][background=mybg]
 \starttext
 Test
 \page
 Test1
 \page
 Test2
 \stoptext
 
 More info here:
 http://wiki.contextgarden.net/layers
 
 Hope that helps :)
 
 ___
 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
 ___

___
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] Placing text in the margin of a header or the top right corner of a page

2011-11-22 Thread Christian
I think I see what you mean. It disappeared after I tossed the box 1mm to the 
right with adjusting the x position:
change
x=180mm
to
x=181mm

Is that it?

 -Ursprüngliche Nachricht-
 Von: ntg-context-boun...@ntg.nl [mailto:ntg-context-boun...@ntg.nl] Im
 Auftrag von Matthias Weber
 Gesendet: Mittwoch, 23. November 2011 05:55
 An: mailing list for ConTeXt users
 Betreff: Re: [NTG-context] Placing text in the margin of a header or the top
 right corner of a page
 
 Fascinating. Thanks a lot. That is more than I hoped for, and was easy to
 adapt to what I wanted.
 
 One small issue: There is a tiny gap between the black layer box and the right
 margin (in white) that doesn't even disappear when I increase hoffset.
 Any chance to make that disappear, too?
 
 Thanks again -
 
 Matthias
 
 
 On Nov 22, 2011, at 11:30 PM, Christian wrote:
 
  Dear All,
 
  I am trying to place a framed text in the top right corner of each
  page of a screen document and it looks like (cont-eni)  some
  invocation of \setupheadertexts might do the job. Unfortunately, I
  have only been able to place my text in the margin of the body of the
 page, using \margintext.
  Ideally, I would like to have the framed text box flush with the top
  and right edge of a page, but any approximate solution or a pointer
  to some document to read (that could educate me) will be much
 appreciated.
 
  Smells like Layers to me. Try this, for starters:
 
  \definelayer[mybg][x=180mm, y=0mm,width=3cm,
 height=3cm,repeat=yes]
  \setlayer[mybg][hoffset=0cm, voffset=0cm]{\framed[frame=on,
 width=3cm,
 
 height=2cm,background=color,backgroundcolor=black,foregroundcolor=whit
  e]{LAYER}} \setupbackgrounds[page][background=mybg]
  \starttext
  Test
  \page
  Test1
  \page
  Test2
  \stoptext
 
  More info here:
  http://wiki.contextgarden.net/layers
 
  Hope that helps :)
 
 
 __
 
  _ 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
 
 __
 
  _
 
 __
 _
 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
 __
 _

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