Re: [NTG-context] notes in the margin

2017-04-09 Thread Wolfgang Schuster




Henning Hraban Ramm 
30. März 2017 um 10:30
While I’m still waiting for answers to my other questions, I got some 
more:


In my layout, left margin width is zero, but \inmargin always uses 
left margin.
I didn’t find a setup to change that – should 
\setupmargindata[location=right] do the trick? (it doesn’t, also not 
with left)


Further I’d like to place "foot"notes into the margin.
It works like this:

\setupnote[footnote][location=none]
\setupnotation[footnote][
align=flushleft,
location=serried,
width=broad,
]
\setuptexttexts[margin][]
[{\framed[%
align=right,
frame=off,
height=\textheight,
width=\rightmarginwidth
]{\placenotes[footnote]}}]

But I’d like the notes to start in the line of the marker, if there’s 
space.

How can I achieve that?
The only way I found to achieve this is by flushing the notes at the end 
of each footnote
entry which can be done with the next key. The positioning of each 
margin text is tricky
because \placenotes adds skips at the begin of the block (which can be 
reduced with
\placelocalnotes) but a inline version of the command (e.g. 
\placeinlinenotes) which

flushes the notes without vertical skips and a rule at the begin would help.

\define\PlaceFootnote
  {\inrightmargin{\vtop{\placelocalnotes[footnote][before=,after=]}}}

\setupnote
  [footnote]
  [location=text,
   bodyfont=,
   next=\PlaceFootnote]

\setupnotation
  [footnote]
  [alternative=serried]

\setuplayout
  [width=12cm,
   rightmargindistance=0.5cm,
   rightmargin=5cm]

\starttext
\dorecurse{6}{\input ward\expanded{\footnote{This is a footnote 
\recurselevel}} }

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

Re: [NTG-context] processing very big tables

2017-04-09 Thread Thomas A. Schmitz

On 04/09/2017 03:57 PM, Hans Hagen wrote:

\starttext

\setuplinetable[n=2,lines=25]
\setuplinetable[c][1][width=6cm] %
,background=color,backgroundcolor=red,color=white]
\setuplinetable[c][1][width=6cm] %
,background=color,backgroundcolor=red,color=white]
\setuplinetable[1][all][background=color,backgroundcolor=white]

\dontcomplain


Alright, so the answer is: "use linetables!" Thanks, Hans: I will play 
with them and report back!


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

Re: [NTG-context] XML inclusion

2017-04-09 Thread Hans Hagen

On 4/7/2017 1:42 PM, Meer, Hans van der wrote:

The command \xmlinclude{}{}{} includes the file specified by attribute 
IDENTIFIER of the element located by LPATH at NODE.
What I would like to do is including a bunch of .xml files where the directory 
to load from is given.

Is this a possibility or could this be a feature added to the ConTeXt 
XML-processing in a new beta?


can you be more explicit

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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] processing very big tables

2017-04-09 Thread Hans Hagen

On 4/9/2017 1:20 PM, Thomas A. Schmitz wrote:

Hi all,

I need some fundamental advice from experienced users: I'm processing
xml and collecting the data in lua tables, which I want to typeset in
some sort of table or tabular format. Typesetting requirements are
fairly low, just a couple of columns that need to be nicely aligned,
with the occasional horizontal overflow that should be handled
gracefully (i.e. longer lines should be broken), and of course, the
table has to break across pages. However, the lua tables have several
thousands of entries, and I expect the final document to have around
3,000 pages. When I tried Natural Tables, I got a "TeX capacity
exceeded" error, which disappeared when I tried with a smaller part of
my document. So my question is: what is the most "inexpensive" way of
typesetting this sort of material? One of the table environments? Which
one (would xtables be better?)? Or low-level vboxes within hboxes etc.?
Or just \framed within \framed? What would you suggest for this sort of
material?


\starttext

\setuplinetable[n=2,lines=25]
\setuplinetable[c][1][width=6cm] % 
,background=color,backgroundcolor=red,color=white]
\setuplinetable[c][1][width=6cm] % 
,background=color,backgroundcolor=red,color=white]

\setuplinetable[1][all][background=color,backgroundcolor=white]

\dontcomplain

\startlinetable
\dorecurse{100}{
\dorecurse{100}{
\NC aaa \NC test test test  test \NC \NR
}
}
\stoplinetable

\page

% \startluacode
% local context = context
% local NC = context.NC
% local NR = context.NR

% context.startlinetable()
% for i=1,100 do
% for i=1,100 do
% NC()
% context("aaa")
% NC()
% context("test test test test")
% NC()
% NR()
% end

% context.stoplinetable()
% \stopluacode



\stoptext



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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] processing very big tables

2017-04-09 Thread Thomas A. Schmitz

Hi all,

I need some fundamental advice from experienced users: I'm processing 
xml and collecting the data in lua tables, which I want to typeset in 
some sort of table or tabular format. Typesetting requirements are 
fairly low, just a couple of columns that need to be nicely aligned, 
with the occasional horizontal overflow that should be handled 
gracefully (i.e. longer lines should be broken), and of course, the 
table has to break across pages. However, the lua tables have several 
thousands of entries, and I expect the final document to have around 
3,000 pages. When I tried Natural Tables, I got a "TeX capacity 
exceeded" error, which disappeared when I tried with a smaller part of 
my document. So my question is: what is the most "inexpensive" way of 
typesetting this sort of material? One of the table environments? Which 
one (would xtables be better?)? Or low-level vboxes within hboxes etc.? 
Or just \framed within \framed? What would you suggest for this sort of 
material?


Thanks for your insights!

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

Re: [NTG-context] notes in the margin

2017-04-09 Thread Pablo Rodriguez
On 04/08/2017 07:01 PM, Henning Hraban Ramm wrote:
> Am 2017-04-05 um 20:42 schrieb Pablo Rodriguez:
>> doesn’t \setupmargindata[inmargin][location=right] do the trick?
> 
> No, but \setupmargindata[inmargin][location=outer]

Hi Hraban,

since your layout had left margin width set to zero, I recommended
[location=right].

Glad to read it helped.

> The notes collide with my moved "foot"notes, but I wasn’t planning to
> use both anyway.

Even if there were no collision, I guess that using the same margin for
both notes would be misleading.

>> But I guess that this may be implemented (if Hans agrees) with
>> \setupnote[location=margin].
> 
> That would be very nice.

I guess Hans won’t be able to take a look until ConTeXt and LuaTeX are
released for TeX Live 2017.

> I guess the stacking mechanism from \inmargin could be reused, so 
> that the notes start at the same height as the footnote marker, if
> there is enough space.
> 
> I don’t understand the code – is this in page-one.mkiv?

Which code? The file you mention is all Greek to me.

> Or should I try to use marginblocks (page-mbk.mvi) or margindata
> (typo-mar.mkiv)?

I don’t know, but both mechanisms aren’t able to split content between
pages:

\setupmarginblocks[width=.8\rightmarginwidth]
\starttext
\dorecurse{5}{\input zapf
\startmarginblock\input knuth\stopmarginblock}
\stoptext

Just in case it helps,

Pablo
-- 
http://www.ousia.tk
___
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
___