[NTG-context] Re: Draw cutting line

2025-04-08 Thread alan . caruanambom
I modified it, but it only affects the first page.

The mark appears on the edge of the page; I just want a line in the middle.

\setuppapersize[A5][A4,landscape]
\setuparranging[2*2]

\setuplayout[middle]

\startuniqueMPgraphic{MPfoldmark}
pickup pensquare scaled 0.5pt ;
drawoptions(dashed evenly withcolor "registration") ;
xd := OverlayWidth/2;
draw (xd,0)--(xd,\pagecutmarklength);
draw (xd,OverlayHeight)--(xd,(OverlayHeight - \pagecutmarklength));
\stopuniqueMPgraphic

\defineoverlay[foldmark][\uniqueMPgraphic{MPfoldmark}]

\definelayer[PagePlus][
   x=-\pagecutmarklength,
   y=-\pagecutmarklength,
   width=1\paperwidth+2\pagecutmarklength,
   height=1\paperheight+2\pagecutmarklength,
]
\setupbackgrounds[page][background=PagePlus]

\setlayerframed[PagePlus][
   y=-\measure{Trim},
   x=0mm,
   height=1\paperheight,
   width=1\paperwidth,
   background=foldmark,
]{}

\starttext
\dorecurse{100}{\input knuth \relax}
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Draw cutting line

2025-04-08 Thread Henning Hraban Ramm

Am 08.04.25 um 10:19 schrieb Alan Caruanambo:

Hello, I want to draw the cutting line on an A4 sheet.

cutting line (to draw)
      |

|    |     |
|    |     |
|    |     |


\setuppapersize[A5][A4,landscape]
\setuparranging[2*2]

\showframe

\setuplayout[middle]

\starttext
     \dorecurse{100}{\input knuth \relax}
\stoptext


I would use a layer and some MetaPost code, like this:



\startuniqueMPgraphic{MPfoldmark}
pickup pensquare scaled 0.5pt ;
drawoptions(dashed evenly withcolor "registration") ;
xd := OverlayWidth/2;
draw (xd,0)--(xd,\pagecutmarklength);
draw (xd,OverlayHeight)--(xd,(OverlayHeight - \pagecutmarklength));
\stopuniqueMPgraphic

\defineoverlay[foldmark][\uniqueMPgraphic{MPfoldmark}]

\definelayer[PagePlus][
  x=-\pagecutmarklength,
  y=-\pagecutmarklength,
  width=1pw+2\pagecutmarklength,
  height=1ph+2\pagecutmarklength,
]
\setupbackgrounds[page][background=PagePlus]

\setlayerframed[PagePlus][
  y=-\measure{Trim},
  x=0mm,
  height=1ph,
  width=1pw,
  background=foldmark,
]{}

This is not the most simple solution, but it should work with any page size.

Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Draw cutting line

2025-04-08 Thread Henning Hraban Ramm

Am 08.04.25 um 11:20 schrieb Henning Hraban Ramm:

\definelayer[PagePlus][
   x=-\pagecutmarklength,
   y=-\pagecutmarklength,
   width=1pw+2\pagecutmarklength,
   height=1ph+2\pagecutmarklength,
]
\setupbackgrounds[page][background=PagePlus]

\setlayerframed[PagePlus][
   y=-\measure{Trim},
   x=0mm,
   height=1ph,
   width=1pw,
   background=foldmark,
]{}


Sorry, I didn’t test the code; the measures make no sense.

Will you manage on your own?

Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Help \setuparranging

2025-04-08 Thread Henning Hraban Ramm

Am 08.04.25 um 08:35 schrieb Alan Caruanambo:
Hello, I need to arrange A5 paper inside A4, in order to save paper and 
so that the cut line always remains inside and the original edge outside.



I have this code. How can I modify it to achieve what I want?

\setuppapersize[A5][A4,landscape]
\setuparranging[2UP,2SIDE]


You can only use one imposition schema at once, 2UP should be the right one.

Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Draw cutting line

2025-04-08 Thread Alan Caruanambo
Hello, I want to draw the cutting line on an A4 sheet.

cutting line (to draw)
 |

|| |
|| |
|| |


\setuppapersize[A5][A4,landscape]
\setuparranging[2*2]

\showframe

\setuplayout[middle]

\starttext
\dorecurse{100}{\input knuth \relax}
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Draw cutting line

2025-04-08 Thread Henning Hraban Ramm

Am 08.04.25 um 12:18 schrieb alan.caruanam...@gmail.com:

I modified it, but it only affects the first page.

The mark appears on the edge of the page; I just want a line in the middle.

\setuppapersize[A5][A4,landscape]
\setuparranging[2*2]

\setuplayout[middle]

\startuniqueMPgraphic{MPfoldmark}
pickup pensquare scaled 0.5pt ;
drawoptions(dashed evenly withcolor "registration") ;
xd := OverlayWidth/2;
draw (xd,0)--(xd,\pagecutmarklength);
draw (xd,OverlayHeight)--(xd,(OverlayHeight - \pagecutmarklength));


I wanted the marks outside, just change the draw coordinates to
 draw (xd,0)--(xd,OverlayHeight);

Then you also don’t need the \pagecutmarklength anywhere.


\stopuniqueMPgraphic

\defineoverlay[foldmark][\uniqueMPgraphic{MPfoldmark}]

\definelayer[PagePlus][
x=-\pagecutmarklength,
y=-\pagecutmarklength,
width=1\paperwidth+2\pagecutmarklength,
height=1\paperheight+2\pagecutmarklength,

repeat=yes,

]
\setupbackgrounds[page][background=PagePlus,

state=repeat,
]

If a layer should be repeated on all pages, you must define it with 
"repeat=yes" and set it as background with "state=repeat".



Have fun,
Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Draw cutting line

2025-04-08 Thread vm via ntg-context

Cutting an A4 landscape in half is plain vanilla 148.5 mm,
folding the sheet in two, so why would there be a need to draw a line 
(that you have to cut exactly in two to avoid bleeding)


(just thinking)
.F


On 08/04/2025 12:36, Henning Hraban Ramm wrote:

Am 08.04.25 um 12:18 schrieb alan.caruanam...@gmail.com:

I modified it, but it only affects the first page.

The mark appears on the edge of the page; I just want a line in the 
middle.


\setuppapersize[A5][A4,landscape]
\setuparranging[2*2]

\setuplayout[middle]

\startuniqueMPgraphic{MPfoldmark}
pickup pensquare scaled 0.5pt ;
drawoptions(dashed evenly withcolor "registration") ;
xd := OverlayWidth/2;
draw (xd,0)--(xd,\pagecutmarklength);
draw (xd,OverlayHeight)--(xd,(OverlayHeight - \pagecutmarklength));


I wanted the marks outside, just change the draw coordinates to
  draw (xd,0)--(xd,OverlayHeight);

Then you also don’t need the \pagecutmarklength anywhere.


\stopuniqueMPgraphic

\defineoverlay[foldmark][\uniqueMPgraphic{MPfoldmark}]

\definelayer[PagePlus][
    x=-\pagecutmarklength,
    y=-\pagecutmarklength,
    width=1\paperwidth+2\pagecutmarklength,
    height=1\paperheight+2\pagecutmarklength,

repeat=yes,

]
\setupbackgrounds[page][background=PagePlus,

state=repeat,
]

If a layer should be repeated on all pages, you must define it with 
"repeat=yes" and set it as background with "state=repeat".



Have fun,
Hraban
___
If your question is of interest to others as well, please add an entry 
to the Wiki!


maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ 
ntg-context.ntg.nl

webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Alternate text for images?

2025-04-08 Thread Pablo Rodriguez via ntg-context
On 4/7/25 22:08, Hans Hagen wrote:
> On 4/4/2025 3:37 AM, Matthias Weber wrote:
>> [...]
>> in order to provide screen readability (but the above doesn’t
>> work, the PDF doesn’t have the alternate text).
>
> This one will add an Alt to the element
>
> \externalfigure[cow][label={this is a cow}]

Matthias,

this should work:

\enabledirectives [backend.usetags=crap]
\setuptagging[state=start]
\setupstructure[state=start]
\setupbackend
  [format=PDF/A-3a,
   intent=sRGB IEC61966-2.1,
   level=0]
\setupbackend[format=pdf/ua-1]

\setupexternalfigures[location=default]
\starttext
\externalfigure[cow][label={this is a cow}]
\stoptext

Let us know whether your Acrobat reads the text (but this is validated
fine by veraPDF).

I hope it helps,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Draw cutting line

2025-04-08 Thread alan . caruanambom
Thanks you.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: character replace

2025-04-08 Thread alan . caruanambom
Thanks, just what I needed!
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: regular online meet-up

2025-04-08 Thread Henning Hraban Ramm

Reminder: This is tonight!

Am 05.04.25 um 12:10 schrieb Henning Hraban Ramm:

You’re invited to our regular online meet-up, this upcoming
Wednesday, April 9th, 19:00 CEST (UTC+2)

at https://lecture.senfcall.de/hen-rbr-rku-oke
(same, but shorter: https://u.mtxrun.eu/ctxmtg)

ConTeXt users of all levels are welcome!

Looking forward to seeing you,
Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Draw cutting line

2025-04-08 Thread Pablo Rodriguez via ntg-context
On 4/8/25 10:19, Alan Caruanambo wrote:
> Hello, I want to draw the cutting line on an A4 sheet.
>
> cutting line (to draw)
>      |
> 
> |    |     |
> |    |     |
> |    |     |
> 

Hi Alan,

I think this is what you might need:

\setuppapersize[A4/2][A4,landscape]
\setuparranging[2*2]

\setuplayout[marking=page]

\starttext
\dorecurse{10}{\samplefile{knuth}}
\stoptext

I hope it might help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Alternate text for images?

2025-04-08 Thread Pablo Rodriguez via ntg-context
On 4/7/25 22:23, Hans Hagen wrote:
> On 4/5/2025 9:05 AM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> At least, the validator only complains for the use of /DocumentFragment
>> (unknown to PDF-1.7).
>
> I think that (cf the tagging.pdf manual)
>
> \enabledirectives [backend.usetags=crap]
>
> should work and one can  define ones own mappings

Now I get it
(https://www.pragma-ade.nl/general/manuals/tagging.pdf#search=enabledirectives).

Many thanks for the reference,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Alternate text for images?

2025-04-08 Thread Pablo Rodriguez via ntg-context
On 4/7/25 22:16, Hans Hagen wrote:
> On 4/4/2025 9:09 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Hans, I’m afraid this is the way to go. If my writting isn’t clear, let
>> me know.
>
> not sure what you mean: you either tag version 1 or you tag version 2;

Well, I tried to UA-2, but all output intents (since we have no PDF/A-4)
are for PDF-1.x.

So I needed a profile and I loaded PDF/A-3a (which is the newest we have).

BTW, from what Ulrike said I understood (as per RFC 2119, “should”
indicates recomendation and not obligation), PDF/UA-2 should use
PDF/A-4, but it didn’t have to.

After checking publication dates, I’m not sure whether PDF/UA-2 can only
use PDF/A-4.

> order matters so don't enable tagging for 2 and then choose some version
> 1 related format (maybe i can check someplace if users mix up) but we
> tested and got validated documents from vera .. unless of course the
> standard changed again (vera also changes and there are also differences
> between the used parsers)

Please, add a check (and a correction), so that users can forget about
loading order.

> it's not something i want to waste time on continuously ... just an
> occasional catch up with changes .. really it's not the complication but
> the mess that determines pace here

I want to waste as little from your time as possible with this.

That being said, I’m afraid that the accessibility directive includes
the possibility of sanctions for non-compliant services (ebooks are
considered services, if I’m not wrong).

Not sure (I’m not a lawyer and this is no legal advice) whether free
services may be liable for publishing unaccessible documents, but this
is the main reason why accessibility is important in ConTeXt.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: There is something wrong with this paragraph.

2025-04-08 Thread Aditya Mahajan
On Tue, 8 Apr 2025, Ursula Hermann wrote:

> Dear List,
> There is a problem with this paragraph, because the has not the right height?
> 
> \starttext
> \switchtobodyfont[termes, 7.70pt]
> \definetextbackground[MyBackground][
>   location=paragraph,
>   background=color,
>   backgroundcolor=greenyellow, x=F1E788,
>   leftoffset=.8\bodyfontsize,
>   rightoffset=.8\bodyfontsize,
>   topoffset=.8\bodyfontsize,
>   bottomoffset=.8\bodyfontsize,
>   frame=off,
>   width=.8\textwidth]
> \startMyBackground
> \usemodule[amsl]
> \startnarrow[left=2.90mm, right=2.90mm][left, right]
> {\bf Lebesque-integrierbare Funktionen}\par
> \definehspace[ein 1,2][0.25em]
> Wenn ($ a$,$ b$) $\subseteq$ $\reals$ ein Intervall bezeichnet, dann ist die 
> Menge $L$$^\uparrow$(($a$,$b$)) die Menge der Funktionen, die fast über- all 
> Grenzwert einer monoton wachsenden Folge von Trep
> penfunktionen ($\varphi_k$) sind für die  die Folge ($\int^b_a$ $\varphi_k$ 
> ($x$) $dx$) konvergiert. Für $f$  $\in$
> \startformula
> \quad \int[method=auto] {f(x) \dd 
> x}_{a}^{b}=\lim_{k\to\infty}\int[method=auto]_{a}^{b}\varphi_k (x) dx).
> \stopformula
> \stopMyBackground
> \stoptext

Wolfgang has already answered your main question but I would like to point out 
that the way you are writing math will give wrong horizontal spacing. The 
standard method is to use $ to start math mode and then $ again to stop math 
mode: so one would write

Wenn $(a,b) \subseteq \reals$ ein  Menge $L^{\uparrow}((a,b))$  Folge 
($\int^b_a \varphi_k(x) \dd x$)  etc.

Aditya___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Draw cutting line

2025-04-08 Thread Max Chernoff via ntg-context
Hi Alan,

On Tue, 2025-04-08 at 03:19 -0500, Alan Caruanambo wrote:
> Hello, I want to draw the cutting line on an A4 sheet.
>
> cutting line (to draw)
>  |
> 
> >| |
> >| |
> >| |
> 

You can use \showframe for this:

\setuppapersize[A5][A4,landscape]

\setuppaper[nx=2, ny=1, offset=-1.5pt]
\setuparranging[XY]

\definepalet[layout][page=black]
\showframe[page]
\setupbackgrounds[page][topframe=off, bottomframe=off, rulethickness=2pt]

\starttext
\dorecurse{10}{\samplefile{knuth}}
\stoptext

Thanks,
-- Max
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] There is something wrong with this paragraph.

2025-04-08 Thread Ursula Hermann
Dear List,
There is a problem with this paragraph, because the has not the right height?

\starttext
\switchtobodyfont[termes, 7.70pt]
\definetextbackground[MyBackground][
  location=paragraph,
  background=color,
  backgroundcolor=greenyellow, x=F1E788,
  leftoffset=.8\bodyfontsize,
  rightoffset=.8\bodyfontsize,
  topoffset=.8\bodyfontsize,
  bottomoffset=.8\bodyfontsize,
  frame=off,
  width=.8\textwidth]
\startMyBackground
\usemodule[amsl]
\startnarrow[left=2.90mm, right=2.90mm][left, right]
{\bf Lebesque-integrierbare Funktionen}\par
\definehspace[ein 1,2][0.25em]
Wenn ($ a$,$ b$) $\subseteq$ $\reals$ ein Intervall bezeichnet, dann ist die 
Menge $L$$^\uparrow$(($a$,$b$)) die Menge der Funktionen, die fast über- all 
Grenzwert einer monoton wachsenden Folge von Trep
penfunktionen ($\varphi_k$) sind für die  die Folge ($\int^b_a$ $\varphi_k$ 
($x$) $dx$) konvergiert. Für $f$  $\in$
\startformula
\quad \int[method=auto] {f(x) \dd 
x}_{a}^{b}=\lim_{k\to\infty}\int[method=auto]_{a}^{b}\varphi_k (x) dx).
\stopformula
\stopMyBackground
\stoptext

Many Thanks

Uschi


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___