[NTG-context] Re: Wiki problem - labels missing from the main diagram on the Page Layout page

2023-11-05 Thread peter.hopcroft--- via ntg-context
I see this problem on my iPad: Safari and Orion browsers. 

I do not see this problem on my mac: Safari and Orion browsers. 

Peter

> On 6/11/2023, at 8:19 AM, Henning Hraban Ramm  wrote:
> 
> Am 05.11.23 um 19:11 schrieb Bruce Horrocks:
>> When I go to the page layout page on the Contextgarden wiki
>>   
>> the "typesetting areas" diagram is missing its text labels. If I click on 
>> the diagram the Wiki takes me to the underlying layout.svg file and then I 
>> /do/ see the labels.
>> This happens in both Safari and Firefox.
>> Any suggestions as to what needs to be changed to get the diagram to display 
>> correctly?
> 
> Probably a problem on your side – works for me with Firefox and Chrome based 
> browsers. And I’ve no clue which setting would influence that.
> 
> Web developer tools as well as Inkscape show that there’s no real text in the 
> SVG, just paths.
> 
> 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: How can I use a variable for a MetaPost coordinate ?

2023-10-05 Thread peter.hopcroft--- via ntg-context
Yes, indeed. The metafun manual also explains things about overlays and layers 
I hadn't known. I'd previously ignored that manual.

Thank you,
Peter

> On 5/10/2023, at 7:05 PM, Thomas A. Schmitz  
> wrote:
> 
> Have a look at chapter 6.4 of the metafun manual. You need StartPage ... 
> StopPage in your MPcode, then you can knock yourself out by using variables 
> such as PaperHeight or TextHeight and do all sorts of calculations.
> 
> All best
> 
> Thomas
> 
> On 10/5/23 05:54, peter.hopcroft--- via ntg-context wrote:
>> Hello list, I want to draw lines on a page. I want to pass my line 
>> coordinates as a percent of \width or \textheight, rather than as 
>> millimetres. So that if I change the page size I don't need to change the 
>> coordinates. The MWE below compiles but the pdf does not have any lines 
>> drawn on it. Is there a way of doing calculations on the coordinates for the 
>> draw using ConTexT variables like \textheight? Thank you, Peter Hopcroft
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id}
> 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 : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id}
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context 
wiki : https://wiki.contextgarden.net
___


[NTG-context] How can I use a variable for a MetaPost coordinate ?

2023-10-04 Thread peter.hopcroft--- via ntg-context
Hello list,

I want to draw lines on a page. I want to pass my line coordinates as a percent 
of \width or \textheight, rather than as millimetres. So that if I change the 
page size I don't need to change the coordinates. 

The MWE below compiles but the pdf does not have any lines drawn on it. 

Is there a way of doing calculations on the coordinates for the draw using 
ConTexT variables like \textheight?

Thank you,
Peter Hopcroft

--

\starttext
Some text

\startMPcode
pickup pensquare scaled 1pt;
draw (0mm,0mm)--(0mm,\textheight) withcolor red 
\stopMPcode

More text

\startMPcode
pickup pensquare scaled 1pt;
draw (0mm,0mm)--(0mm,50mm) scaled \numexpr\textheight/50mm\relax
\stopMPcode

\stoptext


--

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

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


[NTG-context] Finding the position of an image on the page.

2023-10-01 Thread peter.hopcroft--- via ntg-context


Hello list,

Can I find the position of an image on the page after I have placed the image 
with \externalfigure? 

For example, the top, left corner of the image might be 50 mm in from left side 
of page and 120 mm down from the top of the page.

I know I can use \getfiguredimensions to find information about the placed  
image, but it does  not give me the position of the image.

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Can ConTeXt write its pdf to a different directory?

2023-05-27 Thread peter.hopcroft--- via ntg-context
Max, that answer seems like magic to me, in the sense of an advanced 
technology. Thank you.

It's not quite working for me yet. I'll explore more tomorrow and learn about 
lua.

Peter

> On 27/05/2023, at 3:53 PM, Max Chernoff via ntg-context  
> wrote:
> 
> Hi Peter,
> 
>> My .tex file is in a directory within my working directory. I would like 
>> ConTeXt to write its output in the same directory as my .tex file. But it 
>> writes to the working directory.
>> 
>> This was asked 10 years ago:
>> `tex.stackexchange.com/questions/67928/how-to-set-output-directory-in-context-command`
>> 
>> The answer given then was to use:
>> `context filename --result=output-directory/filename`
>> 
>> But this doesn't work now. When I compile my .tex file, I get a message:
>> `results are to be on the running path, not on 'output-directory', ignoring 
>> --result`
> 
> This seems to work, although I'm not sure that I would call it a "good"
> solution:
> 
>   \startluacode
>   local function absolute(path)
>   return file.collapsepath(dir.expandname(path))
>   end
> 
>   local texfile = absolute(environment.filename)
>   local pdffile = file.addsuffix(
>   absolute(environment.inputfilebarename),
>   "pdf"
>   )
> 
>   luatex.wrapup(function()
>   os.rename(pdffile, file.replacesuffix(texfile, "pdf"))
>   end)
>   \stopluacode
> 
>   \starttext
>   Hello!
>   \stoptext
> 
> -- Max
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Can ConTeXt write its pdf to a different directory?

2023-05-26 Thread peter.hopcroft--- via ntg-context
My .tex file is in a directory within my working directory. I would like 
ConTeXt to write its output in the same directory as my .tex file. But it 
writes to the working directory.

This was asked 10 years ago:
`tex.stackexchange.com/questions/67928/how-to-set-output-directory-in-context-command`
 

The answer given then was to use:
`context filename --result=output-directory/filename`

But this doesn't work now. When I compile my .tex file, I get a message:
`results are to be on the running path, not on 'output-directory', ignoring 
--result`

I've looked in the wiki:
`https://wiki.contextgarden.net/Context`

Thank you,
Peter

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Bug with \startnarrow?

2023-02-23 Thread peter.hopcroft--- via ntg-context
It's the documentation that has the bug. With \startnarrow, you need two sets 
of square brackets, 1 for the \setupnarrower data and 1 for the \startnarrower 
data. Like this:

\starttext
Some text before
\startnarrow[left=5cm,right=1cm,before={\blank[2*line]},after={\blank[halfline]}][left,
 right]
narrower text
\stopnarrow
some text after
\stoptext

> On 23/02/2023, at 11:14 PM, Denis Maier via ntg-context  
> wrote:
> 
> Hi,
>  While doing some more tests with my example from yesterday (tables in 
> \startnarrow), I’ve realized that the example from the wiki doesn’t seem to 
> quite work as expected:
>  %%
> \starttext
> Some text before
> \startnarrow[left=2cm,right=1cm,before={\blank[2*line]},after={\blank[halfline]}]
> narrower text
> \stopnarrow
> some text after
> \stoptext
> %%
>  Already here, the extra margins on both sides seem to be equal. Changing the 
> size of the left extra margin has no effect at all.
>  %%
> \starttext
> \startnarrow[left=10cm,right=2cm]
> \input ward
> \stopnarrow
>  but:
>  \setupnarrower[left=5cm, right=2cm]
> \startnarrower[left,right]
> \input ward
> \stopnarrower
> \stoptext
> %%
>  Is this a bug or intended behaviour ?
>  Best,
> Denis
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Problem with float and new layout on same page

2022-12-25 Thread peter.hopcroft--- via ntg-context
My MWE below produces this pdf. My problem is that on page 2, the body text 
flows beyond its frame and into the footer distance.

Regards, Peter



Play.pdf
Description: Adobe PDF document



MWE:

\setuppapersize[A4][A3,landscape] \setuparranging[2SIDE] \showframe 

\definelayout[mypage][footerdistance=100mm, ]
\definelayout[odd][reset]   % ??
\definelayout[even][reset]

\starttext
\dorecurse{3}{\input{knuth} }   % change to \dorecurse{2} - it works  properly
\definelayout[2][mypage] 
\dorecurse{2}{\input{knuth} }
\placefigure [leftmargin]
 {} {\externalfigure[greybox][width=\leftmarginwidth]}
\dorecurse{5}{\input{knuth} }
\stoptext



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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] endofyeargreeting

2022-12-20 Thread peter.hopcroft--- via ntg-context
ivebeenwritingabitofcontextoverthelastmonthorso,andit'sbecomeahabit.ithinkConTeXtisgreat.manythankstothepeoplewhodevelopitandwhohelpmeoveronstackexchange,andtoallyouuserswhouseconTeXtandtherebyencouragethedeveloperstodevelopmore.%bestwishestoyouallfornextyear\relax
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Seems to be a bug with \definelayout

2022-12-10 Thread peter.hopcroft--- via ntg-context
Yes Pablo, that does  fix it. I'm sorry, I misunderstood your first reply. 
Peter 

> On 10/12/2022, at 10:44 PM, Pablo Rodriguez via ntg-context 
>  wrote:
> 
> On 12/9/22 21:23, peter.hopcroft--- via ntg-context wrote:
>> I’ve rewritten my last email. The context below produces the pdf in
>> the screenshot below.
>> 
>> I expect the layout[short] to be applied to pages 2 and 3. It is. But
>> there seem to be 2 bugs:
>> 
>> 1 - Pages 4, 5 and 6 have the [short] layout. They should have the
>> default layout.
>> 
>> 2 - On pages 5 and 6, the text flows beyond the bottom of the frame.
>> It should stop at the bottom of the frame.
> 
> Hi Peter,
> 
> as in my reply from yesterday, this seems to fix your bugs:
> 
>  \showframe
>  \setuppapersize[A4][A3,landscape] \setuparranging[2SIDE]
>  \setuplayout[backspace=80mm, width=100mm, topspace=50mm, header=0mm,
>  footer=0mm, height=200mm, margindistance=10mm, leftmargin=40mm]
> 
>  \definelayout[short][backspace=80mm, width=100mm, topspace=50mm,
>  header=0mm, footer=0mm, height=80mm, margindistance=10mm,
>  leftmargin=40mm]
> 
>  \starttext
>  \definelayout[even][reset]
>  \definelayout[odd][reset]
>  \definelayout[2][short]
>  \definelayout[3][short]
>  \dorecurse{10}{\input{knuth} }
>  \stoptext
> 
> It seems that you need to reset the layout in all other pages (where the
> special layout isn’t applied).
> 
> 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://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Seems to be a bug with \definelayout

2022-12-09 Thread peter.hopcroft--- via ntg-context
I’ve rewritten my last email. The context below produces the pdf in the 
screenshot below.

I expect the layout[short] to be applied to pages 2 and 3. It is. But there 
seem to be 2 bugs:

1 - Pages 4, 5 and 6 have the [short] layout. They should have the default 
layout.

2 - On pages 5 and 6, the text flows beyond the bottom of the frame. It should 
stop at the bottom of the frame.

Why do I think these are bugs? If I change the page number in 
\definelayout[3][short] to \definelayout[4][short], then it behaves differently 
and as I expect: only pages 2 and 4 have the [short] layout and the text flows 
within the frames.

Peter

%==
\showframe
\setuppapersize[A4][A3,landscape] \setuparranging[2SIDE]
\setuplayout[backspace=80mm, width=100mm, topspace=50mm, header=0mm, 
footer=0mm, height=200mm, margindistance=10mm, leftmargin=40mm]

\definelayout[short][backspace=80mm, width=100mm, topspace=50mm, header=0mm, 
footer=0mm, height=80mm, margindistance=10mm, leftmargin=40mm]

\starttext 
\definelayout[2][short]
\definelayout[3][short]
\dorecurse{10}{\input{knuth} }  
\stoptext 
%==

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] \definelayout[pagenumber][layout] behaving strangely

2022-12-08 Thread peter.hopcroft--- via ntg-context
The pdf from the tex below looks wrong to me, screenshot attached. It’s always 
like this when the page number in the second \definelayout is 1 more than the 
page number in the first. For other pairs of numbers, it behaves like I expect: 
the short layout is only on those 2 pages.

I’m using the LMTX I updated a few days ago. ConTeXt online’s pdf is the same.

%==
\showframe
\setuppapersize[A4][A3,landscape] \setuparranging[2SIDE]
\setuplayout[backspace=80mm, width=100mm, topspace=50mm, header=0mm, 
footer=0mm, height=200mm, margindistance=10mm, leftmargin=40mm]

\definelayout[short][backspace=80mm, width=100mm, topspace=50mm, header=0mm, 
footer=0mm, height=80mm, margindistance=10mm, leftmargin=40mm]

\starttext 
\definelayout[2][short]
\definelayout[3][short]
\dorecurse{10}{\input{knuth} }  
\stoptext 
%==

Also, https://wiki.contextgarden.net/Command/definelayout says:
% different layout for first two pages
\definelayout[1][wide]
\definelayout[3][reset]
This does not work for me.

Cheers, Peter

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Can I use \starthangaround?

2022-11-30 Thread peter.hopcroft--- via ntg-context
Thank you for your reply. Peter

> On 1/12/2022, at 8:23 PM, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> Am 01.12.22 um 04:15 schrieb peter.hopcroft--- via ntg-context:
>> \starthangaround is mentioned in these context garden wiki pages:
>> https://wiki.contextgarden.net/CD_Booklet
>> https://wiki.contextgarden.net/Unexpected_behavior
>> When I try to use examples from these pages I get an error that 
>> \starthangaround is undefined. It isn’t in any of my context installation 
>> files, including cont-new.tex. I'm using LMTX, installed a few days ago.
>> Is it possible for me to use \starthangaround ?
> 
> Apparently not.
> The CD_Booklet page is more than 10 years old.
> And the section on the Unexpected_behavior page links to a section in 
> Using_graphics that’s deleted. It also says “This poses a problem in MkIV” 
> which tells you it’s MkII code. I’ll delete it.
> 
> Hraban
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Can I use \starthangaround?

2022-11-30 Thread peter.hopcroft--- via ntg-context
\starthangaround is mentioned in these context garden wiki pages:
https://wiki.contextgarden.net/CD_Booklet
https://wiki.contextgarden.net/Unexpected_behavior

When I try to use examples from these pages I get an error that 
\starthangaround is undefined. It isn’t in any of my context installation 
files, including cont-new.tex. I'm using LMTX, installed a few days ago.

Is it possible for me to use \starthangaround ?

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___