Re: [NTG-context] problem embedding TABLE macros within wrapper macros "to reduce repetitive complexity")

2020-09-08 Thread Wolfgang Schuster

Rudd, Kevin schrieb am 09.09.2020 um 00:30:
Thanks. The immediate goal is to make a ”quad chart” w/ different 
pains in the four (2x2 => NW, NE, SW, SE) quadrants. It seemed that 
the concept was scalable to any NxM (even with multi-cell 
spreads---useful for larger structured posters) based on TABLE. But 
I'd settle for 2x2 at the moment; at one point I'd thought of 2x2+1 
having a spanning block for publication references per slide but 
decided a separate publications slide was a better idea visualy..


If they have to see an end command, would before/after tags work 
around a framedtext or buffer structure?


1. 2x2 panes, layout order not important, all panes independent; no 
flow (like Framemaker used to do) requiredbetween panes.
2. was going to have inner frames (i.e. + frame for 2x2 which was 
trivial to specify in TABLE) to separate the panes
3. other than wanting the + frame, inner margins  for panes wsn't 
an issue either way.


When you need one than single block per line this definition

\define\startPaneRow{bTR\bTD}
\define\stopPaneRow{\eTD\eTR}

doesn't make sense because you limit yourself and after each table cell 
there is a new row.


While you can write code which moves your blocks around you should ask 
yourself the question is it worth it. When you have only two or three 
posters in this format use the extra commands for table rows and cells 
because it takes more time to write something which does the work.


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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] problem embedding TABLE macros within wrapper macros "to reduce repetitive complexity")

2020-09-08 Thread Rudd, Kevin
Thanks. The immediate goal is to make a ”quad chart” w/ different pains in the 
four (2x2 => NW, NE, SW, SE) quadrants. It seemed that the concept was scalable 
to any NxM (even with multi-cell spreads---useful for larger structured 
posters) based on TABLE. But I'd settle for 2x2 at the moment; at one point I'd 
thought of 2x2+1 having a spanning block for publication references per slide 
but decided a separate publications slide was a better idea visualy..

If they have to see an end command, would before/after tags work around a 
framedtext or buffer structure?

1. 2x2 panes, layout order not important, all panes independent; no flow (like 
Framemaker used to do) requiredbetween panes.
2. was going to have inner frames (i.e. + frame for 2x2 which was trivial to 
specify in TABLE) to separate the panes
3. other than wanting the + frame, inner margins  for panes wsn't an issue 
either way.

Best,
---K

Kevin W. Rudd, Ph.D.
CAPT, USN (Ret)
Computer Architecture & Engineering (CAE)
Advanced Computing Systems (ACS) Research Program
Laboratory for Physical Sciences (LPS)
443-654-7878
ke...@lps.umd.edu
Visiting Research Professor
Electrical and Computer Engineering
United States Naval Academy
r...@usna.edu

From: Wolfgang Schuster 
Sent: Tuesday, September 8, 2020 4:31:38 PM
To: mailing list for ConTeXt users 
Cc: Rudd, Kevin 
Subject: Re: [NTG-context] problem embedding TABLE macros within wrapper macros 
"to reduce repetitive complexity")

Rudd, Kevin schrieb am 08.09.2020 um 19:50:
I have a number of slides using \...framedtext blocks to break the slides into 
panes within a TABLE environment (TMI: not in MWE; merely my justification for 
writing the wrapper macros). When the TABLE macros are invoked explicitly it 
all works fine and produces a suitable single-cell table with "quux blech baz 
bar foo" framed; when embedded in macros (whether defined by \def, 
\unexpanded\def, \define) then it fails with the error "The file ended when 
scanning an argument. => fatal error: return code: 256. A previous question on 
the topic seemed to indicate that TABLE was suitable, so I figure that 
something subtle is wrong as I've invoked the embedded TABLE macros. Any 
suggestions?

While most natural tables command can be embedded within other command the 
cells have to see the end command.

I guess this shouldn't be a problem for your case because something simpler can 
be used to create your desired layout but you have to provide more information:

1. Are there blocks side by side or do you stack them only vertically?

2. Do you need a frame around each block?

3. Are (small) gaps between the blocks allowed?

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] problem embedding TABLE macros within wrapper macros "to reduce repetitive complexity")

2020-09-08 Thread Wolfgang Schuster

Rudd, Kevin schrieb am 08.09.2020 um 19:50:
I have a number of slides using \...framedtext blocks to break the 
slides into panes within a TABLE environment (TMI: not in MWE; merely 
my justification for writing the wrapper macros). When the TABLE 
macros are invoked explicitly it all works fine and produces a 
suitable single-cell table with "quux blech baz bar foo" framed; when 
embedded in macros (whether defined by \def, \unexpanded\def, \define) 
then it fails with the error "The file ended when scanning an 
argument. => fatal error: return code: 256. A previous question on the 
topic seemed to indicate that TABLE was suitable, so I figure that 
something subtle is wrong as I've invoked the embedded TABLE macros. 
Any suggestions?


While most natural tables command can be embedded within other command 
the cells have to see the end command.


I guess this shouldn't be a problem for your case because something 
simpler can be used to create your desired layout but you have to 
provide more information:


1. Are there blocks side by side or do you stack them only vertically?

2. Do you need a frame around each block?

3. Are (small) gaps between the blocks allowed?

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Column not Balancing, Footnote is Missing

2020-09-08 Thread Wolfgang Schuster

Art Chimes schrieb am 08.09.2020 um 00:38:

Greetings, list. My first post here. Please be gentle!

The command \contextversion reports I am using 2020.09.03 20:03 on Windows 10.

The MWE below produces a column and a half of text, not balanced
(despite the \setupcolumns [...balance=yes...] command. Also, the
footnote *number* appears on the PDF, but the *text* of the footnote
doesn't.

However, when I use the online compiler (live.contextgarden.net,
reported version 2020.06.30 17:30, older than mine), the footnote text
*does* appear, though the columns are still not balanced.

%

\usemodule[ipsum]
\setupfootnotes[location=page,rule=on,bodyfont=8.5pt]
\setupcolumns [n=2,balance=yes,blank=line]

\starttext
\chapter{Footnote Test  —  \contextversion}
\startcolumns

\ipsum

Cursus metus aliquam eleifend mi in nulla posuere sollicitudin
aliquam. Id aliquet risus feugiat in ante metus dictum at
tempor.\footnote{Thor, A.U.: {\it Latin 101 for Dummies} (Rome,
Dummies Pub., MCMLXXIX)}

\ipsum[alternative=lines,n=20]

\end columns
\stoptext

%

Question (1) : Why don't the columns balance, and how can I fix it?


Replace

    \end columns

with

    \stopcolumns

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Appendix question

2020-09-08 Thread Wolfgang Schuster

jbf schrieb am 08.09.2020 um 12:40:

A (hopefully) simple question this time:

Why would my appendices be labelled as Appendix One, Appendix Two etc., 
instead of Appendix A, Appendix B? I thought Appendices would normally 
be labelled alphabetically, not numerically.


So I get APPENDIX as the label, I have:

\setuplabeltext
   [en]
   [chapter={\bf Chapter }, appendix=APPENDIX ]

But elsewhere I have:

\setupheads[chapter][indentnext=no,conversion=Words,distance=.25em]

So is that what is affecting my appendices, and if so how do I do it so 
that Chapters get words (One, Two, etc) and Appendices get letters (A,B, 
etc)?


Use sectionconversionset to set the number conversion for all section 
levels and ignore the conversion key.


\defineconversionset [bodypart:section] [n,Word] [n]
\defineconversionset [appendix:section] [n,A] [n]

\setupheads
  [sectionconversionset=section]

\setuplabeltext
  [en]
  [chapter=Chapter ,
   appendix=Appendix ]

\starttext

\startbodymatter

\stopbodymatter

\dorecurse{5}{\chapter{Chapter #1}}

\startappendices

\dorecurse{5}{\chapter{Chapter #1}}

\stopappendices

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] problem embedding TABLE macros within wrapper macros "to reduce repetitive complexity")

2020-09-08 Thread Rudd, Kevin
I have a number of slides using \...framedtext blocks to break the slides into 
panes within a TABLE environment (TMI: not in MWE; merely my justification for 
writing the wrapper macros). When the TABLE macros are invoked explicitly it 
all works fine and produces a suitable single-cell table with "quux blech baz 
bar foo" framed; when embedded in macros (whether defined by \def, 
\unexpanded\def, \define) then it fails with the error "The file ended when 
scanning an argument. => fatal error: return code: 256. A previous question on 
the topic seemed to indicate that TABLE was suitable, so I figure that 
something subtle is wrong as I've invoked the embedded TABLE macros. Any 
suggestions?

Many thanks,
 ---K

MWE: this code fails if the \...PaneSlide block is uncommented, succeeds if 
commented out.

\define\startPaneSlide{\bTABLE}
\define\startPaneRow{bTR\bTD}
\define\stopPaneRow{\eTD\eTR}
\define\stopPaneSlide{\eTABLE}

\starttext
\bTABLE
\bTR\bTD
quux blech baz bar foo
\eTD\eTR
\eTABLE

\startPaneSlide
\startPaneRow
foo bar baz blech quux
\stopPaneRow
\stopPaneSlide
\stoptext

Kevin W. Rudd, Ph.D.
CAPT, USN (Ret)

Computer Architecture & Computer Engineering
Advanced Computing Systems (ACS) Research Program
Laboratory for Physical Sciences (LPS)

443-654-7878
ke...@lps.umd.edu

Visiting Research Professor
United States Naval Academy

r...@usna.edu


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Fullwidth topfigure with caption in the margin

2020-09-08 Thread Mikael Sundqvist
On Mon, Sep 7, 2020 at 9:26 PM Mikael Sundqvist  wrote:

> Hi,
>
> Is there a way to have a fullwith topfigure with caption in the margin so
> that the figure does not interfere with the text? My try is
>
>
> %%%
> \setuplayout[
> rightmargin=2in,
> rightmargindistance=0.375in,
> width=4.125in,
> ]
>
> \showframe
>
> \definecolor [transparentred] [r=1,t=.5,a=1]
>
> \definefloat[topfigure][topfigures][figure]
>
> \setupfloat[topfigure][
> default={margin},
> location=flushleft,
> maxwidth=6.5in,
> ]
>
> \setupcaption[topfigure][
> number=no,
> location=bottom,
> style={\switchtobodyfont[8bp]},
> ]
> \starttext
> \dorecurse{4}{\samplefile{knuth}}
>
> \startplacetopfigure[title={\samplefile{ward}}]
> \blackrule[width=6.5in,height=2in,color=transparentred]
> \stopplacetopfigure
>
> \samplefile{knuth}
> \stoptext
> %%
>
> but, as one can see on page two, the text from the previous page just
> continues under the image. I want the "larg-scale user..." to start below
> the image. It would be good if it was also possible to configure the
> distance between the image and the text.
>
> (I guess one option would be to not use a margin figure, and use
> default=top, but then I don't know how to handle the caption.)
>
> /Mikael
>

An update: I am now able to get something closer to what I want. The figure
is where I want it, the caption is where I want it. The code might be bad
and there might be better ways to do it. For example, I could not find how
to use the title text but only the subtitle in the figure. The spacing is
also a bit manual in the \TopFigureCaption command. Any comments for
improvements (or completely different solutions) are very welcome.

/Mikael

\setuplayout[
rightmargin=2in,
rightmargindistance=0.375in,
width=4.125in,
]

\showframe

\definecolor [transparentred] [r=1,t=.5,a=1]

\definefloat[topfigure][topfigures][figure]

\setupfloat[topfigure][
default={top,none},
location=flushright,
maxwidth=6.5in,
]

\setupcaption[topfigure][
number=no,
]

\define\TopFigureCaption{%
\blank[-line,force,overlay]
\vsmash{%
\blank[line]
\framed[align=flushright,width=6.5in,frame=off,offset=overlay]{%
\startframedtext[
width=\rightmarginwidth,
frame=off,
offset=overlay,
style={\switchtobodyfont[8bp]},
align=flushleft,
]\floatuserdataparameter{subtitle}
\stopframedtext}}}


\starttext
\dorecurse{3}{\samplefile{knuth}}

\startplacetopfigure[title=This is the title][subtitle={\samplefile{ward}}]
\blackrule[width=6.5in,height=2in,color=transparentred]
\TopFigureCaption
\stopplacetopfigure

\dorecurse{3}{\samplefile{knuth}}

\startplacetopfigure[title=This is the title][subtitle={\samplefile{ward}}]
\blackrule[width=6.5in,height=2in,color=transparentred]
\TopFigureCaption
\stopplacetopfigure

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Appendix question

2020-09-08 Thread jbf

A (hopefully) simple question this time:

Why would my appendices be labelled as Appendix One, Appendix Two etc., 
instead of Appendix A, Appendix B? I thought Appendices would normally 
be labelled alphabetically, not numerically.


So I get APPENDIX as the label, I have:

\setuplabeltext
  [en]
  [chapter={\bf Chapter }, appendix=APPENDIX ]

But elsewhere I have:

\setupheads[chapter][indentnext=no,conversion=Words,distance=.25em]

So is that what is affecting my appendices, and if so how do I do it so 
that Chapters get words (One, Two, etc) and Appendices get letters (A,B, 
etc)?


Julian

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___