Re: [NTG-context] issue with interaction=all and \insertpages

2020-09-22 Thread Andres Conrado Montoya Acosta
I am also following this question and some related ones by Pablo with great
interest, and it seems to me that it's falling through the cracks... so, I
am asking again: is it possible to preserve links correctly when imposing /
inserting pdf pages in ConTeXt?

El lun., 21 sept. 2020 a las 5:00,  escribió:

>3. issue with interaction=all and \insertpages (Pablo Rodriguez)
>
> Dear list,
>
> I have the following sample:
>
>   \setuplayout[page]
>   \setupinteraction
>  [state=start, color=, contrastcolor=, focus=standard]
>   \enabledirectives[references.border=red]
>   \setupexternalfigures[interaction=all, method=pdf]
>   \setupinteractionscreen[option={portrait, paper}]
>   \starttext
>   %~ \insertpages[http://gaceta.rsme.es/abrir.php?id=1495][width=0pt]
>   \insertpages[GacRSocMatEsp.pdf][width=0pt]
>   \stoptext
>
> I have some issues with it.
>
> 1. For some strange reason, the first \insertpages command with a remote
> file cannot deal with the interaction from the file (no internal or
> external links).
>
> 2. The local file includes internal destinations to page parts. After
> imposition, destinations to page for internal links cannot reach the
> page parts as links in original document do.
>
> 3. Even external links are converted. On last page,
> https://www.cs.umb.edu/~offner/files/pi.pdf is rewritten as
> https://www.cs.umb.edu/õffner/files/pi.pdf.
>
> Besides the rewritten link, would it be possible that links are added so
> they reach the same destinations as their source PDF document?
>
> Many thanks for your help,
>
> Pablo
> --
> http://www.ousia.tk
>

Thanks for your attention.
-- 
Andrés Conrado Montoya
http://chiquitico.org
___
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] PDF/A conformance

2020-09-22 Thread Denis Maier

Am 22.09.2020 um 16:42 schrieb Henning Hraban Ramm:



Am 22.09.2020 um 16:35 schrieb Henning Hraban Ramm :
Did you try veraPDF?
https://openpreservation.org/products/verapdf/


Here you can download it without registration:
https://github.com/veraPDF/veraPDF-apps
i.e. http://downloads.verapdf.org/rel/verapdf-installer.zip

(Java required)

Hraban


Thanks. I'll have a look tomorrow.

Denis

___
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] More table questions

2020-09-22 Thread Denis Maier

Am 22.09.2020 um 16:31 schrieb Henning Hraban Ramm:



tabulate as far as it fits your needs, then natural tables (Hans dixit in 2019).



That's in fact part of the question: I can not easily tell what the 
particular shortcomings are. As this is for an XML setup that supposed 
for more than one product, I have to make some design decisions right at 
the beginning and I won't be able to make ad hoc adjustments.




In tabulate you have several kinds of horizontal lines (\HL, \FL, \ML, \LL), 
but you need to set them and define their width individually.

IMO the different line widths of booktabs are very oldfashioned. Try to avoid 
lines as far as possible, and then use them unobtrusively.
Depending on your product (black printing, CMYK printing, screen only) you can 
use light colors, but be aware that thin, rasterized lines look jagged, while 
you can e.g. use 100% cyan even in 0.25pt, if the resolution of the press 
(offset/digital) works with such thin lines.

Also don’t use indented table lines if you don’t use vertical lines (and you 
should usually avoid those).


Thanks for the suggestions. I'll keep that in mind. As said before, I 
don't really regularly use tables so I don't have much experience here.


Best,
Denis

___
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] More table questions

2020-09-22 Thread Denis Maier

Am 22.09.2020 um 20:55 schrieb Aditya Mahajan:

On Tue, 22 Sep 2020, Denis Maier wrote:


Also, how do you easiest define booktabs style tables? I mean: can you
define tables such that the last row end with thicker lines without
having to make this explicit? Is there a mechanism for this?


You can get this behavior using any of table mechanism. The wiki has an example 
when using the (now deprecated) TaBlE macros

https://wiki.contextgarden.net/Table#Booktabs

The same effect is rather easy to achieve when using natural tables as well.

\startsetups booktabs
   \setupTABLE[each][each][frame=off]
   \setupTABLE[row][first][topframe=on,rulethickness=1.2bp]
   \setupTABLE[row][2][topframe=on,rulethickness=0.6bp]
   \setupTABLE[row][last] [bottomframe=on, rulethickness=1.2bp]

   \setupTABLE[row][first][style=bold]
\stopsetups

\starttext

\startTABLE[setups=booktabs]
   \NC Heading 1 \NC Heading 2 \NC Heading 3 \NC \NR
   \NC Value 1   \NC Value 2   \NC Value 3   \NC \NR
   \NC Value 1   \NC Value 2   \NC Value 3   \NC \NR
   \NC Value 1   \NC Value 2   \NC Value 3   \NC \NR
\stopTABLE
\stoptext

Aditya


Thanks. That's exactly what I was looking for.
By the way, I couldn't get the \startTABLE syntax working in a XML 
setting. Is this the same as with extreme tables? The classic syntax 
with \bTABLE \eTABLE works though.


Best,
Denis

___
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] More table questions

2020-09-22 Thread Aditya Mahajan
On Tue, 22 Sep 2020, Peter Münster wrote:

> On Tue, Sep 22 2020, Aditya Mahajan wrote:
> 
> > The same effect is rather easy to achieve when using natural tables as
> > well.
> 
> But it fails, when there is only one data-row... :(

Then don't create tables with only one data row :-)

A better solution is to create a dedicate framehandler which draws the bottom 
frame at half the thickness:

\startuseMPgraphic{booktabs_bottom}
   draw bottomboundary OverlayBox withpen pencircle scaled (OverlayLineWidth/2)
withcolor OverlayColor;
   setbounds currentpicture to OverlayBox;
\stopuseMPgraphic

\defineoverlay[booktabs_bottom] [\uniqueMPgraphic{booktabs_bottom}]
\installbottomframerenderer{booktabs}{\uniqueMPgraphic{booktabs_bottom}}


\startsetups booktabs
  \setupTABLE[each][each][frame=off, rulethickness=1.2bp]
  \setupTABLE[row][first][topframe=on, bottomframe=booktabs]
  \setupTABLE[row][last] [bottomframe=on]

  \setupTABLE[row][first][style=bold]
\stopsetups

\starttext

\startTABLE[setups=booktabs]
  \NC Heading 1 \NC Heading 2 \NC Heading 3 \NC \NR
  \NC Value 1   \NC Value 2   \NC Value 3   \NC \NR
  \NC Value 1   \NC Value 2   \NC Value 3   \NC \NR
  \NC Value 1   \NC Value 2   \NC Value 3   \NC \NR
\stopTABLE

\blank[2*line]

\startTABLE[setups=booktabs]
  \NC Heading 1 \NC Heading 2 \NC Heading 3 \NC \NR
  \NC Value 1   \NC Value 2   \NC Value 3   \NC \NR
\stopTABLE
\stoptext

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


Re: [NTG-context] More table questions

2020-09-22 Thread Peter Münster
On Tue, Sep 22 2020, Aditya Mahajan wrote:

> The same effect is rather easy to achieve when using natural tables as
> well.

But it fails, when there is only one data-row... :(

\startsetups booktabs
  \setupTABLE[each][each][frame=off]
  \setupTABLE[row][first][topframe=on,rulethickness=1.2bp]
  \setupTABLE[row][2][topframe=on,rulethickness=0.6bp]
  \setupTABLE[row][last] [bottomframe=on, rulethickness=1.2bp]
  \setupTABLE[row][first][style=bold]
\stopsetups
\startsetups workaround
  \setupTABLE[each][each][frame=off]
  \setupTABLE[row][first][topframe=on,rulethickness=1.2bp,offset=0pt]
  \setupTABLE[row][2][style=bold, bottomframe=on,rulethickness=0.6bp]
  \setupTABLE[row][last] [bottomframe=on, rulethickness=1.2bp]
\stopsetups
\starttext
\startTABLE[setups=booktabs]
  \NC Heading 1 \NC Heading 2 \NC Heading 3 \NC \NR
  \NC Value 1   \NC Value 2   \NC Value 3   \NC \NR
\stopTABLE
\blank
\startTABLE[setups=workaround]
  \NC\NC\NC\NC\NR
  \NC Heading 1 \NC Heading 2 \NC Heading 3 \NC \NR
  \NC Value 1   \NC Value 2   \NC Value 3   \NC \NR
\stopTABLE
\stoptext

-- 
   Peter
___
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] More table questions

2020-09-22 Thread Aditya Mahajan
On Tue, 22 Sep 2020, Denis Maier wrote:

> Also, how do you easiest define booktabs style tables? I mean: can you 
> define tables such that the last row end with thicker lines without 
> having to make this explicit? Is there a mechanism for this? 

You can get this behavior using any of table mechanism. The wiki has an example 
when using the (now deprecated) TaBlE macros

https://wiki.contextgarden.net/Table#Booktabs

The same effect is rather easy to achieve when using natural tables as well. 

\startsetups booktabs
  \setupTABLE[each][each][frame=off]
  \setupTABLE[row][first][topframe=on,rulethickness=1.2bp]
  \setupTABLE[row][2][topframe=on,rulethickness=0.6bp]
  \setupTABLE[row][last] [bottomframe=on, rulethickness=1.2bp]

  \setupTABLE[row][first][style=bold]
\stopsetups

\starttext

\startTABLE[setups=booktabs]
  \NC Heading 1 \NC Heading 2 \NC Heading 3 \NC \NR
  \NC Value 1   \NC Value 2   \NC Value 3   \NC \NR
  \NC Value 1   \NC Value 2   \NC Value 3   \NC \NR
  \NC Value 1   \NC Value 2   \NC Value 3   \NC \NR
\stopTABLE
\stoptext

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


[NTG-context] Full page image and caption in another page?

2020-09-22 Thread José de Mattos Neto
Hi, it's my first message on this list.

I've searched in ConTeXt manuals, TeX.SX and here, but couldn't find a way
to achieve these 4 requirements altogether:

   1. Place a figure as full-page figure
   2. Change orientation accordingly (if it's a landscape PDF, for instance)
   3. Make that using \setupfloat (or other setup), not directly in
   \placefloat
   4. Place captions in another page (ideally on opposite page)

Problems:

   - I can't get # 1 and # 3 at same time
   - \setupfloat doesn't have before option, which I could use to change
   orientation
   - I have no idea how to accomplish # 4

A minimal working example (PDF in attachment):

%%%
\definepapersize[default][A4, portrait]
\definelayout[default][topspace=0.6cm, topdistance=0cm, header=1cm,
headerdistance=0cm,
   height=27.3cm, footer=0cm,
   backspace=4.2cm, width=13.6cm]
\setuppapersize[default]
\setuplayout[default]
\setuppagenumbering[alternative=doublesided, location={header}]
\setupexternalfigures[location={default}]

\definepapersize[rotate][A4, landscape]
\definefloat[bigfigure][bigfigures][figure]
\setupfloat[bigfigure][default={page},
   width=1\textwidth, height=1\textheight,
   before={\setuppapersize[rotate]}] % there's no
before in setupfloat
\setupcaption[bigfigure][location={opposite}] % there's no opposite
location in setupcaption

\starttext
\showframe
\dorecurse{2}{\input{knuth}}

\setuppapersize[rotate] % this doesn't work because is in same page
\startplacebigfigure[title={A cow}]{\externalfigure[cow]}\stopplacebigfigure
\setuppapersize[default]

\dorecurse{2}{\input{knuth}}
\stoptext
%%%

Thanks in advance!
José Neto


mwe.pdf
Description: Adobe PDF document
___
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] Judeo-Arabic punctuation

2020-09-22 Thread Denis Maier

Hi,

I'm getting weird punctuation with a judeo-arabic text:


%This gives correct results
\definefontfamily[hebrew][rm][SBL Hebrew] [range=hebrew, force=yes, 
features=hebrew]

\setupbodyfont[hebrew]

% This doesn't
%\definefallbackfamily[mainface][rm][SBL Hebrew] [range=hebrew, 
force=yes, features=hebrew]

%\definefontfamily[mainface][rm][Tex Gyre Pagella]
%\setupbodyfont[mainface]

\setupalign[r2l]
\setupdirections[bidi=global,method=unicode]

\starttext

פאדא וג̇ד אפעאל אללה תעאלי עלי ג̇איה̈ אלאחכאם ואלאתסאק נחו כלקה̈ 
אלאנסאן עלי עג̇יב צורתה ותכֿטיטה̈ וחואסה ומג̇ארי טעאמה ושראבה ותרכיב(ה) 
אעצ̇איה  ותרתיבהא פי אמאכנהא וכמה קאל אלואלי ע׳אלס׳ הלא כֶֿחָלָבֿ 
ת[ת]יכֵֿני וכגבינה תקפיאני. עור ובשר תלבי[שני] ובעצמות וגידים תסוככני 
חיים וחסד [עשי]ת עמדי. ופקדתך שמרה [רוחי].


\stoptext
===

The first setting produces correct punctuation. The second setting works 
well with regular Hebrew text, even with punctuation. But the special 
diacrital marks needed for judeo-arabic texts are misplaced with this 
settting. (I can only guess, but it has probably to do with the Unicode 
range that is covered by `range=hebrew`.)


Best,
Denis

___
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] PDF/A conformance

2020-09-22 Thread Henning Hraban Ramm

> Am 22.09.2020 um 16:35 schrieb Henning Hraban Ramm :
> Did you try veraPDF?
> https://openpreservation.org/products/verapdf/

Here you can download it without registration:
https://github.com/veraPDF/veraPDF-apps
i.e. http://downloads.verapdf.org/rel/verapdf-installer.zip

(Java required)

Hraban
___
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] PDF/A conformance

2020-09-22 Thread Henning Hraban Ramm


> Am 22.09.2020 um 16:06 schrieb Denis Maier :
> 
> Hi,
> I need to produce PDF/a. I've followed the advice on the Wiki, and the file 
> validates with: https://www.pdf-online.com/osa/validate.aspx
> But Acrobat complains about some problem with the XMP definition.
> Does anyone know more about this?

Different validators have different opinions on valid PDF/A. :-/

But that might be the state of 2017 when Luigi(? or was it Giuseppe?) presented 
his work on PDF/A...

Did you try veraPDF?
https://openpreservation.org/products/verapdf/


Hraban
___
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] More table questions

2020-09-22 Thread Henning Hraban Ramm


> Am 22.09.2020 um 10:03 schrieb Denis Maier :
> 
> I usually don't need tables, therefore this maybe stupid question: What is 
> the currently recommended way to typeset tables? Still natural tables? Or 
> extreme tables? (My tables won't be 30 pages long.)

tabulate as far as it fits your needs, then natural tables (Hans dixit in 2019).

> Also, how do you easiest define booktabs style tables? I mean: can you define 
> tables such that the last row end with thicker lines without having to make 
> this explicit? Is there a mechanism for this? (That would make the XML 
> mapping much simpler.)

In tabulate you have several kinds of horizontal lines (\HL, \FL, \ML, \LL), 
but you need to set them and define their width individually.

IMO the different line widths of booktabs are very oldfashioned. Try to avoid 
lines as far as possible, and then use them unobtrusively.
Depending on your product (black printing, CMYK printing, screen only) you can 
use light colors, but be aware that thin, rasterized lines look jagged, while 
you can e.g. use 100% cyan even in 0.25pt, if the resolution of the press 
(offset/digital) works with such thin lines.

Also don’t use indented table lines if you don’t use vertical lines (and you 
should usually avoid those).

Hraban
___
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] PDF/A conformance

2020-09-22 Thread Denis Maier

Hi,
I need to produce PDF/a. I've followed the advice on the Wiki, and the 
file validates with: https://www.pdf-online.com/osa/validate.aspx

But Acrobat complains about some problem with the XMP definition.
Does anyone know more about this?

Best,
Denis

___
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] ZapfDingbats Unicode differences MKIV vs LMTX

2020-09-22 Thread Taco Hoekwater


> On 22 Sep 2020, at 13:51, Hans Hagen  wrote:
> 
> On 9/22/2020 7:19 AM, Christoph Reller wrote:
>> On Mon, Sep 21, 2020 at 3:27 PM Hans Hagen > > wrote:
>>On 9/21/2020 2:55 PM, Christoph Reller wrote:
>> >
>>\definefontsynonym[ZapfDingbats][file:ZapfDingbats][features=dingbats]
>>I don't know what the previous line does ... but it works ok here when
>>you remove it.
>> This line loads the font from a file ZapfDingbats.ttf. Without this line I 
>> get no check marks in the output and the following log messages:
> 
> i don't know that one

MacOS has it.



___
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] ZapfDingbats Unicode differences MKIV vs LMTX

2020-09-22 Thread Hans Hagen

On 9/22/2020 7:19 AM, Christoph Reller wrote:
On Mon, Sep 21, 2020 at 3:27 PM Hans Hagen > wrote:


On 9/21/2020 2:55 PM, Christoph Reller wrote:

 >
\definefontsynonym[ZapfDingbats][file:ZapfDingbats][features=dingbats]

I don't know what the previous line does ... but it works ok here when
you remove it.

This line loads the font from a file ZapfDingbats.ttf. Without this line 
I get no check marks in the output and the following log messages:


i don't know that one

fonts           > defining > font with asked name 'uzdr' is not found 
using lookup 'file'

fonts           > defining > unknown font 'uzdr', loading aborted


i guess you can get it from ctan (or ask Mojca to add it)

Hans

-
  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] How to get the last item from an XML node

2020-09-22 Thread Denis Maier

Am 22.09.2020 um 09:18 schrieb Taco Hoekwater:




On 21 Sep 2020, at 18:31, Denis Maier  wrote:

Hi

struggling again: Shouldn't the code below give me the last element under 
? Right now \xmlfilter{#1}{/tr/last()/command(xml:table:tbody:tr)} gives 
me nothing...

(Use case is that I want to have a frame above the table and one bar below. So 
I think I should wrap the last line in the \startxtablefoot ...\stopxtablefoot, 
i.e., I need one command for the last element, and one for the rest (Or is 
there a better way?). What would be the everything but the last?

What am I missing?


You need to read some more on the "Expressions and filters” chapter of the xml 
manual, as it does not work quite the way you think. Here is a quick fix:




\startxmlsetups xml:table:tbody
 \xmlfilter{#1}{/tr/last()/command(xml:table:tbody:tr)}


\xmlfilter{#1}{/tr[position()==last()]/command(xml:table:tbody:tr)}

Best wishes,
Taco


Thanks! That works. I have to admit, it's not entirely clear to me.

I adapted my pattern from the one given on page 78: /whocares/last()
Obviously, it's not that easy.

Best,
Denis


___
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] More table questions

2020-09-22 Thread Denis Maier

Hi,

I usually don't need tables, therefore this maybe stupid question: What 
is the currently recommended way to typeset tables? Still natural 
tables? Or extreme tables? (My tables won't be 30 pages long.)


Also, how do you easiest define booktabs style tables? I mean: can you 
define tables such that the last row end with thicker lines without 
having to make this explicit? Is there a mechanism for this? (That would 
make the XML mapping much simpler.)


Best
Denis

___
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] How to get the last item from an XML node

2020-09-22 Thread Taco Hoekwater


> On 21 Sep 2020, at 18:31, Denis Maier  wrote:
> 
> Hi
> 
> struggling again: Shouldn't the code below give me the last element under 
> ? Right now \xmlfilter{#1}{/tr/last()/command(xml:table:tbody:tr)} 
> gives me nothing...
> 
> (Use case is that I want to have a frame above the table and one bar below. 
> So I think I should wrap the last line in the \startxtablefoot 
> ...\stopxtablefoot, i.e., I need one command for the last element, and one 
> for the rest (Or is there a better way?). What would be the everything but 
> the last?
> 
> What am I missing?

You need to read some more on the "Expressions and filters” chapter of the xml 
manual, as it does not work quite the way you think. Here is a quick fix:

> 
> 
> \startxmlsetups xml:table:tbody
> \xmlfilter{#1}{/tr/last()/command(xml:table:tbody:tr)}

\xmlfilter{#1}{/tr[position()==last()]/command(xml:table:tbody:tr)}

Best wishes,
Taco

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