Re: [NTG-context] LMTX install

2021-05-23 Thread Bruce Horrocks
I just setup a Mint virtual machine as a test and it all worked as expected so 
I'm not sure why you're having a problem. However you wrote earlier that you 
are using "Mint 21" but I can only find "Mint 20.1 LTS" - I assume that's what 
you meant?

If so then I suggest that you create a new Linux user and try installing under 
that new user. If it works then it's something in your user account. If it 
fails then ... well, we're no worse off. :-)

> On 23 May 2021, at 11:14, jbf  wrote:
> 
> Then something is not making sense (to me).
> 
> .bashrc clearly shows: export 
> PATH=$PATH:/home/me/bin/context/tex/texmf-linux-64/bin, so does that not mean 
> that bin can be found via the path? So why does 'context myfile.tex' not work?
> 
> If I run a full path (. /home/me/bin/context/tex/texmf-linux-64/bin/mtxrun 
> context myfile.tex) I get the message 'cannot execute binary file' and yet 
> mtxrun is executable. I checked. Clearly I am making a basic error, but 
> cannot work out what.

—
Bruce Horrocks
Hampshire, UK

___
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] LMTX install

2021-05-23 Thread Bruce Horrocks
On 23 May 2021, at 07:52, jbf  wrote:
> 
> Someone will quickly clarify what I am doing wrong here. Have used mkiv until 
> now but decided to download and install LMTX in /home/me/bin/context.
> 
> I then ran  export PATH=/home/me/bin/context/tex/texmf-linux-64/bin:$PATH as 
> the install script indicated at the end.
> 
> When running mk iv, I always first ran a setup line (in my case it was . 
> /home/me/Documents/Freedom/Context/tex/setuptex). Do I need to run a setup 
> also for LMTX installed as above? And what one, because there is no 
> 'setuptex' as far as I can see. If I just run context myfile.tex I get the 
> mtxrun  | unknown script 'context.lua' or 'mtx-context.lua' message. 
> Does this mean my 'path' command didn't work (and why not? It should have) or 
> do I still need to run a setup before I try to compile?

You don't say which Linux you are using so I would first check to see that 
 /home/me/bin/context/tex/texmf-linux-64/bin/mtxrun
is executable.

I assume that you followed the instructions on the wiki page here?
<https://wiki.contextgarden.net/Installation>

(Sorry to be so pedantic but it helps us to know exactly what you have done.)

—
Bruce Horrocks
Hampshire, UK

___
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] Issue running ConTeXt from TeX Live 2019 on Alpine Linux 3.12

2021-05-06 Thread Bruce Horrocks
On 3 May 2021, at 09:29, Nicola  wrote:
> 
> 
> Sorry, my explanation of what I am trying to achieve was a bit too
> terse.
> 
> There is a little wonderful app on the App Store, called iSH
> (https://github.com/ish-app/ish), which essentially allows you to run
> a 32-bit x86 Alpine Linux distribution on the iPad. One feature of the
> app is that it can import and mount several "file systems". One way to
> create such a file system is to export a Docker container.
> 
> So, what one can do is create a Docker container in some other device (I
> use my laptop), configure it as desired, then export it into a .tar
> archive, copy it into the iPad, and import it into iSH. This is better
> than installing/building packages directly inside the app, because (a)
> compiling on the iPad is extremely slow, and (b) some packages may raise
> errors if one tries to install them inside the app (TeX Live being one
> of them: this link explains the issue and the Docker workaround:
> https://github.com/ish-app/ish/issues/1123).
> 
> iSH emulates x86_32 and uses Musl. AFAICS, ConTeXt LMTX currently only
> provides a 64-bit download for Linux Musl. So, the next best alternative
> is to use ConTeXt from TeX Live.
> 
> So, this is where I am at: I am trying to make ConTeXt work inside an
> x86 Alpine Linux Musl container, using the official Alpine package.


Thank-you for the explanation - that's much clearer.

I've experimented a bit with Docker and I've managed to get a stand-alone LMTX 
install to work under a 32-bit Alpine Linux that has had the glibc library 
added. This should - fingers crossed - work in iSH.

You need to set up a working directory containing:
- the 32-bit LMTX downloaded from 
"http://lmtx.pragma-ade.nl/install-lmtx/context-linux.zip;
- the file "Dockerfile" that is attached to this email
- the modified LMTX install file "alpine-glibc-install.sh" that is attached to 
this email
- a subdirectory "sources" where you can place a hello world tex file

Use the following commands to build and run the container:

  $ docker build . -t context-alpine-glibc
  $ docker run -it -v $(pwd)/sources:/src context-alpine-glibc /bin/ash

The run command bind mounts the sub-directory "sources" so that it is 
accessible from within the container as the /src directory.[2]

Once you are in the container run these commands to process the hello world 
document:

  # cd /src
  # context hello_world.tex

There's no PDF viewer installed so you'll need to view it from the host in 
"sources". On the Mac this works as expected. Over to you to try in iSH. :-)


[1] The install.sh file needs to be hacked because the CPU architecture check 
(uname -m) returns the word size of the host computer, not the container, so I 
just hard-coded the values. :-)

[2] On Windows use something like:
  $ docker run -it -v %cd%/sources:/src context-alpine-glibc /bin/ash


—
Bruce Horrocks
Hampshire, UK


Dockerfile
Description: Binary data


alpine-glibc-install.sh
Description: Binary data
___
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] Issue running ConTeXt from TeX Live 2019 on Alpine Linux 3.12

2021-05-02 Thread Bruce Horrocks


> On 1 May 2021, at 21:35, Nicola  wrote:
> 
> On 2021-05-01, Bruce Horrocks  wrote:
>>> On 30 Apr 2021, at 19:53, Nicola  wrote:
>>> 
>>> I'd like to run ConTeXt on Alpine Linux (ultimately, to run it on an
>>> iPad with the iSH app). I am currently testing it with Docker. This is
>>> what I have done:
>>> 
>>>  docker pull econcz/x86-alpine-glibc:ish-import
>> 
>> Why is your first line not
>> 
>>  $ docker pull alpine
> 
> I was following the documentation of iSH, which is where I want to use
> the container eventually. But I may probably use the alpine image as
> well, which is more up to date and allows me to install TeX Live 2020.
> 
>> I would start with that then test each new step at the interactive
>> shell before adding to the compose file and moving onto the next step.
> 
> Unfortunately, even with the image above I get the same errors.

Sorry for the late reply - I missed this in the thread.

You're not going to be able to get the Docker container to run on the iPad if 
that's what you were ultimately hoping. This is because of the different 
processor types used by most PCs versus the iPad. As far as I know there is no 
way to get Docker installed on a PC to cross-compile for the ARM architecture 
of an iPad; and even if you could, the resulting image would have to be 
cryptographically signed by a registered Apple developer and then signed by 
Apple or it won't run. The iSH documentation that I briefly looked at used a 
'side-load' technique i.e. relied on what's called a 'jailbroken' iPad. This 
invalidates your warranty yadda yadda and you don't really want to go there 
except perhaps for the intellectual exercise.

The next best alternative would be to run TeX Live plus LMTX on a PC and 
connect to it remotely using the iPad. This could be via a text-only terminal 
app or a remote desktop app.

The remote PC that you connect to could be yours at home (cheap but carries a 
security risk unless you know what you're doing) or in the cloud (requires a 
subscription but the security is less of an issue since you build the machine 
to be disposable on the assumption that hackers will get to it).

Either way, I don't think Docker is the first choice solution (unless, perhaps, 
you have a home NAS that supports Docker - yet another option).

If you still want to build a Docker container then please say so - as I'm sure 
it could be done.

—
Bruce Horrocks
Hampshire, UK

___
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] Issue running ConTeXt from TeX Live 2019 on Alpine Linux 3.12

2021-05-01 Thread Bruce Horrocks


> On 30 Apr 2021, at 19:53, Nicola  wrote:
> 
> I'd like to run ConTeXt on Alpine Linux (ultimately, to run it on an
> iPad with the iSH app). I am currently testing it with Docker. This is
> what I have done:
> 
>docker pull econcz/x86-alpine-glibc:ish-import

Why is your first line not

   $ docker pull alpine

?

I would start with that then test each new step at the interactive shell before 
adding to the compose file and moving onto the next step.
—
Bruce Horrocks
Hampshire, UK

___
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] margin in TocEntry definition

2021-03-11 Thread Bruce Horrocks


> On 11 Mar 2021, at 22:22, jbf  wrote:
> 
> Thanks for trying, Bruce. That earlier question you refer to was for a 
> similar situation and the answer resolved that one at the time (it was my 
> question even then!) but not the precise one I am facing now.
> 
> The problem, you see, is that \startalignment only offers a few key words 
> like flushleft, middle etc. and not what I need this time, which is a precise 
> indentation feature like .5cm. I suppose my real problem is not being 
> sufficiently au fait with how definitions work. I just can't seem to get a 
> definition that gives me a result like
> 
> Chapter title
>author . page number
> 
> the \startalignment approach with flushleft would not give me the indentation 
> obviously, and middle does not work for what I need, and either of them also 
> pushes the page number line down onto the next line, which I don't want. I 
> tried \skip .5cm, so:
> 
> \define[1]\SectionTocEntry{%
> #1\crlf% title
> \hskip 
> .5cm\doifnot{\structurelistuservariable{author}}{}{\structurelistuservariable{author}}%
> }
> 
> But the \hskip is ignored at the beginning of a line. I wonder if there is 
> something else I can substitute it for?

D'oh! Sorry - completely forgot about the indent.

Best I can come up with at the moment is this - but I'm not sure how to get 
leading dots.

\starttext

\define[3]\SectionToCEntry{
  #2\crlf
  \leftaligned
  \bgroup
\hskip 0.5cm
\structurelistuservariable{author}
\rightaligned
 \bgroup
   #3
 \egroup
  \egroup
}

\setuplist
  [chapter]
  [alternative=command,
   command=\SectionToCEntry,
   after=\endgraf]

\completecontent

\startchapter
  [title={This is my chapter title}]
  [author={Dummy Name}]
\input Tufte
\stopchapter

\stoptext

—
Bruce Horrocks
Hampshire, UK

___
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] margin in TocEntry definition

2021-03-11 Thread Bruce Horrocks

> On 11 Mar 2021, at 02:20, jbf  wrote:
> 
> Hi list,
> 
> I have:
> 
> \define[1]\SectionTocEntry{%
> #1\crlf% title
> \doifnot{\structurelistuservariable{author}}{}{\structurelistuservariable{author}}%
>   }
> 
> which successfully gives me a ToC with:
> 
> Chapter title
> Author name
> 
> But I want the author name indented by .5cm and do not know how to use 
> 'margin' in the above definition, or some other way of getting the 
> indentation. I have tried various versions of 'margin' before the \doifnot 
> part of the definition, but to no avail.

There is a very similar previous question that might be what you are looking 
for.
<https://www.mail-archive.com/ntg-context@ntg.nl/msg97548.html>

Try that but use 'flushleft' instead of 'middle'.

—
Bruce Horrocks
Hampshire, UK

___
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] Possible problem with context using the ARM 64bit download for Apple Silicon M1

2021-02-23 Thread Bruce Horrocks
On 23 Feb 2021, at 19:20, Hans Hagen  wrote:
> 
> On 2/23/2021 8:10 PM, Keith McKay wrote:
>> Thanks for your reply Hans.
>> I half suspected that the ARM version was experimental but thought I should 
>> report it anyway.
>> Much as I would love to donate an ARM mini to the farm the best I can do is 
>> offer to compile on my mac mini Silicon M1, however, I would have to add the 
>> caveat that this is something I have never done so would need a lot of hand 
>> holding.
> it would mean opening up your machien to mojca, adding it to the compile farm 
> etc etc .. not a good idea, keeping it running 24/7 because we cannot afforc 
> to miss a binary ... so we just wait till these arm machines make in into our 
> homes .. no hurry i guess

Are the source files and test cases in a Git / Mercurial / Fossil / whatever 
repository somewhere? It would be easy enough to set up an automated daily 
check to see if there had been a change and then trigger a fresh build.

It doesn't even need to be that integrated - just a check on the latest intel 
binary and if that has been touched then trigger a download and local compile.

If Keith's scripting skills aren't up to it then I could do it and then 
developer sign and upload the resulting binary to OneDrive or similar.

Regards,
—
Bruce Horrocks
Hampshire, UK

___
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] Lua code and table

2021-02-17 Thread Bruce Horrocks


> On 17 Feb 2021, at 17:40, Fabrice Couvreur  
> wrote:
> 
> Hi, The code works, but is it possible to make it shorter ? 
> Thank you
> Fabrice
> 

You can reduce the size of the test by storing the pattern in a table:

\startluacode
  local background_one = {
   align = "middle",
   style = "type",
   background = "DiagonalRule",
  }

  local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H" }
  local pattern_1 = { 
".XXX..XX",
"X...XXX.",
"X..X.XXX",
"X.X.X..X",
".X.X.XX.",
".XX.X...",
"XXX.X...",
"X.XX" }
  context.startxtable({"align={middle,lohi}, 
width=0.8cm,offset=0.8ex,bodyfont=9pt,framecolor=cyan"})
  context.startxrow()
  context.startxcell({"frame=off"})
  context()
  context.stopxcell()
  for _, letter in ipairs(letters_1) do
context.startxcell()
context(letter) context.stopxcell()
  end
  context.stopxrow()
   for i, letter in ipairs(letters_1) do
  context.startxrow()
context.startxcell()
context(letter)
    context.stopxcell()
  for j = 1, 8 do
context.startxcell( string.sub(pattern_1[i],j,j) == "X" and background_one )
  context()
  context.stopxcell()
  end
  context.stopxrow()
  end
  context.stopxtable()
\stopluacode

—
Bruce Horrocks
Hampshire, UK

___
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] A not so short introduction to ConTeXt Mark IV

2021-01-05 Thread Bruce Horrocks


> On 5 Jan 2021, at 20:31, Garulfo  wrote:
> 
> Hi all,
> 
> I saw that Mojca created a directory
> https://github.com/contextgarden/not-so-short-introduction-to-context
> 
> Joaquín, if you agree, and if
> - you provide me with the spanish + english source codes
> - Mojca provide you and me with github write access (garulfogb account)
> 
> i could :
> 1/ push the current code
> 2/ start to write a github wiki page (+ link on contextgarden) to describe :
> - for you : how to update from your own computer (the official source)
> - for any user : how to use git to get the source + link to this list for 
> discussion.
> 
> Does anybody has a guide about "how to set up a documentation translation 
> project with git ?".
> One requirement will probably to define how propositions are officially 
> validated. Does it requires Joaquín to learn how to use git ? Can we just 
> work by sending files (or patches) to Joaquín who will update with a single 
> git command ?

I think we need to be really clear about what we want to achieve here.

1) Is it just making the source plus the PDF available for download? If so then 
there are plenty of simpler ways to do that than using Git.

2) If it is to gather feedback on things like typos then we don't need Git. For 
example I spotted a missing ']' in the English translation so all I need is a 
way to submit a 'bug report' not access to the source.

3) So what is left? To provide a way for translators to be notified of changes 
to the original? To provide a collaboration mechanism for significant changes 
to the document?

I don't see that Git adds much in the way of value unless Joaquín and the 
translators are already very familiar with it -- because the learning curve is 
very steep and recovering from mistakes (made to the repository itself rather 
than to the document content) can sometimes be extremely difficult.

--
Bruce Horrocks
Hampshire, UK

___
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] xrightarrow specific size issue

2021-01-02 Thread Bruce Horrocks


> On 1 Jan 2021, at 14:25, Johann Birnick  wrote:
> 
> Hi Aditya,
> 
> I know the syntax, my problem is about the options for the length of the 
> arrow.
> 
> For example
> 
> \xrightarrow[big]{abc}
> 
> gives a longer arrow than
> 
> \xrightarrow{abc}
> 
> According to different manuals also specific lengths should be possible. But
> they don't work. I think it's a bug. (because the example from a documentation
> doesn't work)
> 
> Best regards,
> Johann

I'm not sure which manual you are looking in to find a reference to the ability 
to add a specific dimension.

In the source I can only find named sizes of 'none', 'normal', 'small', 
'medium' and 'big'. You can 'kludge' these by extending the length of the text 
using hard spaces. Alternatively there is \rightarrowfill which you might be 
able to put into a frame of the desired width?

\starttext
$1\xrightarrow[none]{blah} 1$
\par
$2\xrightarrow[normal]{blah} 2$
\par
$3\xrightarrow[small]{blah} 3$
\par
$4\xrightarrow[medium]{blah} 4$
\par
$5\xrightarrow{~~~blah~~~} 5$
\par
$6\xrightarrow[big]{blah} 6$
\par
$7\rightarrowfill 7$
\par
\stoptext

--
Bruce Horrocks
Hampshire, UK

___
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] checkbox in fields show the word yes

2020-12-11 Thread Bruce Horrocks


> On 11 Dec 2020, at 08:21, Floris van Manen  wrote:
> 
> 
> 
> On 11/12/2020 08:46, Jan U. Hasecke wrote:
>> as nobody answered I would like too repeat my question.
> 
> This is what I see


On a Mac running BigSur...
1) using the TeXShop built-in PDF viewer I see the word "yes" inside the box
2) in the 'Preview' app I see "yes" in the box
3) using Adobe Acrobat Reader DC I get:
  a) Initially a blank / grey box
  b) Hovering the mouse over the grey bit displays "yes" and the cursor changes 
from I-beam to hand
  c) Single clicking displays the word "yes"
  d) Move focus to another app and the word "yes" is replaced with a tick mark 
in the box
  e) Move focus back to Acrobat, hover over the box and the tick mark changes 
to "yes"
  f) Click the tick and the box changes to "yes"
  g) Move focus to another app and the box changes to blank i.e. unticked

I've no idea whatsoever what to do about it or suggest which is why I didn't 
reply before.

--
Bruce Horrocks
Hampshire, UK

___
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] Quirk with \userpagenumber, datasets and the .tuc file

2020-12-09 Thread Bruce Horrocks
Here's an odd quirk...

I wanted to get at some of my dataset data for use outside of ConTeXt so I 
thought I would just extract it from the .tuc file. MWE:

  \definedataset [MyDS][delay=yes]
  \starttext
  \input tufte
  \setdataset [MyDS]
[ title={Test title},
  page={\userpagenumber},
]
  \stoptext

In the TUC file I get:

  utilitydata.job.datasets.collected={
   ["MyDS"]={
{
 ["index"]=1,
 ["order"]=1,
 ["page"]="1\\relax ",
 ["realpage"]=1,
 ["title"]="Test title",
},
   },
  }

Note the \\relax following the page number. This isn't a problem for me at the 
moment but I wondered if it is something that needs to be looked at?

--
Bruce Horrocks
Hampshire, UK

___
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] Scite and Mac OS

2020-12-05 Thread Bruce Horrocks

> On 5 Dec 2020, at 11:48, MANUEL GONZALEZ SUAREZ  
> wrote:
> 
> Regarding the first question, Scite comes from the App Store. I have 
> downloaded and installed it. When I open Scite, I can open .tex files without 
> problem, but when I try to compile, I get an error. On the other hand, there 
> is no syntax highlighting nor do they appear in the taskbar> options, the 
> preferences to configure ConTeXt.properties, etc.
>  Thank you.

I never thought to look on the App store - but now I have ... I won't be 
buying. ;-)

For that kind of money I suggest you email the author for help. Failing that I 
assume you have tried everything suggested here 
<http://www.pragma-ade.com/general/manuals/scite-context-readme.pdf> ?

--
Bruce Horrocks
Hampshire, UK

___
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] Scite and Mac OS

2020-12-04 Thread Bruce Horrocks


> On 4 Dec 2020, at 08:18, MANUEL GONZALEZ SUAREZ  
> wrote:
> 
> Hello everyone:
> I don't know if anyone can help me. I have installed the Scite editor on a 
> Mac OS Catalina computer and I cannot configure the editor to work with 
> ConTeXt files. Could someone give me some quick setup instructions? With 
> Windows and Linux I have no problems.
> Thank you.
> M. González.

I don't have it installed and when I Googled I couldn't find what appeared to 
be a definitive pre-built image. So the first question is: where did you get 
your image from?

Secondly, what exactly do you mean by "configure the editor to work with 
ConTeXt files"? Simply open them? Or understand the syntax to allow syntax 
highlighting? Or something else?

To open them you need to pick an extension - I use .tex - then option-click a 
.tex file -> choose 'other' -> find Scite in the list of apps -> tick "Always 
open with" -> click Open and it should then associate Scite with .tex files.

--
Bruce Horrocks
Hampshire, UK

___
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] Placing extra bookmarks?

2020-12-02 Thread Bruce Horrocks


> On 2 Dec 2020, at 18:42, Hans Hagen  wrote:
> 
> On 12/2/2020 12:10 AM, Bruce Horrocks wrote:
>> On 1 Dec 2020, at 16:37, Henning Hraban Ramm  wrote:
>>> 
>>>> Am 01.12.2020 um 15:36 schrieb Bruce Horrocks :
>>>> 
>>>> I have \placebookmarks[chapter] in my doc and all is fine except that I'd 
>>>> like to force an extra bookmark at the top of the list that jumps to the 
>>>> cover page. However there is no chapter title, or other built in style on 
>>>> the cover.
>>>> 
>>>> I tried inserting \bookmark[chapter]{The Cover} but nothing happened - no 
>>>> error, no bookmark.
>>>> 
>>>> Any suggestions please? There's no need to bookmark to a specific point - 
>>>> just going to page 1 would be enough.
>>> 
>>> Did you enable interactions? \setupinteractions[state=start]
>>> 
>>> But when I recently tried to manually set some bookmarks instead of visible 
>>> chapter titles, I also didn’t get any; didn’t investigate further yet.
> there are some examples in the test suite (sections/bookmarks-*.tex)
> 
> You can specify bookmarks when you use \startsection etc an dalso add them 
> any place to named lists.

Thanks Hans - I never thought to look in the test cases (d'oh!).

For the benefit of those searching the archives in the future, here is an MWE 
adapted from one of the test cases that places one bookmark via a chapter 
heading and one manually that is not linked to any document section.

\enabletrackers[references.bookmarks,backend.resources] % For debug only

\setupinteraction
  [state=start]

\setupinteractionscreen
  [option=bookmark]

\definelist
  [mylist]
  
\placebookmarks[chapter,mylist]

\starttext
\input zapf
\bookmark[mylist]{Bookmark not linked to a section heading}
\input zapf

\page[yes]
\startchapter[title=Tufte]
\input tufte
\stopchapter
\stoptext

I shall add it to the Wiki.
--
Bruce Horrocks
Hampshire, UK

___
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] Placing extra bookmarks?

2020-12-01 Thread Bruce Horrocks
On 1 Dec 2020, at 16:37, Henning Hraban Ramm  wrote:
> 
>> Am 01.12.2020 um 15:36 schrieb Bruce Horrocks :
>> 
>> I have \placebookmarks[chapter] in my doc and all is fine except that I'd 
>> like to force an extra bookmark at the top of the list that jumps to the 
>> cover page. However there is no chapter title, or other built in style on 
>> the cover.
>> 
>> I tried inserting \bookmark[chapter]{The Cover} but nothing happened - no 
>> error, no bookmark.
>> 
>> Any suggestions please? There's no need to bookmark to a specific point - 
>> just going to page 1 would be enough.
> 
> Did you enable interactions? \setupinteractions[state=start]
> 
> But when I recently tried to manually set some bookmarks instead of visible 
> chapter titles, I also didn’t get any; didn’t investigate further yet.

Thanks for the suggestion, but I already had \setupinteraction[state=start] 
set. (Note 'interaction' - no 's')

I eventually found a previous thread on the mailing list archive.
<https://www.mail-archive.com/ntg-context@ntg.nl/msg86919.html>

From that I was able to add the following to my document setup:

  \definehead [Bookmark] [title] 
[ placehead=empty,
  before={},
  after={},
]
  \setupinteraction[state=start]
  \setupinteractionscreen[option=bookmark] 
  \placebookmarks[chapter,heading,Bookmark][chapter][force=yes]

And then in the text where I want each extra bookmark to appear I use:

  \Bookmark[title={The text of the bookmark}]
  
This works but is a bit of a kludge because it assumes that you aren't using 
'title' sections in your document already. If you are then they will all appear 
in the PDF bookmarks.

Also note that the bookmark is inserted at the chapter/title level. If you want 
a sub-bookmark then you need to add another custom heading, viz:

  \definehead [SubBookmark] [subject] 
[ placehead=empty,
  before={},
  after={},
]

and add it into the \placebookmarks list:

  \placebookmarks[chapter,heading,Bookmark,SubBookmark][chapter][force=yes]

and invoke it using:

  \SubBookmark[title={A sub-bookmark}]

In the PDF, this will be nested under the previous higher-level bookmark.

Given that this is a kludge, and that the \bookmark command doesn't seem to 
work at all, perhaps it can be resurrected into a new form, something like:

  \bookmark[n][focus]{Text}

  - n is the level 1, 2, 3 etc
  - (optional) focus overrides \setupinteraction (assuming PDF allows it)
  - text is the text to show 

and have this insert a bookmark at that point, regardless of whatever the 
heading mechanism is doing?

Regards,
--
Bruce Horrocks
Hampshire, UK

___
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] Placing extra bookmarks?

2020-12-01 Thread Bruce Horrocks
I have \placebookmarks[chapter] in my doc and all is fine except that I'd like 
to force an extra bookmark at the top of the list that jumps to the cover page. 
However there is no chapter title, or other built in style on the cover.

I tried inserting \bookmark[chapter]{The Cover} but nothing happened - no 
error, no bookmark.

Any suggestions please? There's no need to bookmark to a specific point - just 
going to page 1 would be enough.

(I have looked through the mailing list archives but can't find quite the same 
scenario.)

--
Bruce Horrocks
Hampshire, UK

___
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 with word not hyphenating

2020-11-30 Thread Bruce Horrocks
The word "re-implementation" refuses to hyphenate and consequently stick outs 
into the right margin.

I've tried using \hyphenation but it makes no difference.

\showframe
\starttext
\hyphenation{re-im-ple-men-ta-tion}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
re-implementation
tempor incididunt ut labore et doloremagna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 
consequat.
\stoptext

Any suggestions, please?

(LMTX current version: 2020.11.30 10:24)
--
Bruce Horrocks
Hampshire, UK

___
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] Orphan issue with \startitemize

2020-11-26 Thread Bruce Horrocks
With the following MWE:

\def\Lorem{Lorem ipsum dolor sit amet, consectetur adipiscing
elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat. }

\showframe
\starttext

%\dorecurse{32}{ ~ \par }
%\dorecurse{33}{ ~ \par }
\dorecurse{34}{ ~ \par }

The following items are blah blah blsh:
\startitemize
\sym{-} \Lorem
\sym{-} \Lorem
\sym{-} \Lorem
\sym{-} \Lorem
\stopitemize
\stoptext

I find that \dorecurse{32} fits two items on the bottom of the first page and 
two at the top of the next. This is fine.

With \dorecurse{33} I get one and three - which is also fine.

With \dorecurse{34} all of the items move to the second page even though only 
one extra line has been added and there is now quite a large gap at the bottom 
of the first page.

Is there a setting that controls this a bit more precisely, please? (So that 
\dorecurse{34} and possibly even 35 would still split one and three.)

--
Bruce Horrocks
Hampshire, UK

___
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] new upload

2020-11-26 Thread Bruce Horrocks


> On 26 Nov 2020, at 18:43, Mojca Miklavec  
> wrote:
> 
> There are three options:
> - the existing Intel binaries should work just fine
> - yes, you should be able to compile the binaries yourself
> - we should eventually get hold of one device for our build farm, or
> in the meantime just ask someone for the initial build which should
> keep you covered for a while

There's a 4th option: use Xcode on an Intel Mac to generate a fat binary 
containing both ARM and intel code. After all, if Xcode can cross-compile to 
produce native ARM iPad and iPhone apps then there's no reason why it shouldn't 
be able to do so for Mac apps.

The M1 code would be untested of course, but beyond that... ;-)

--
Bruce Horrocks
Hampshire, UK

___
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] Unexpected underbar behaviour in sections

2020-11-24 Thread Bruce Horrocks


> On 24 Nov 2020, at 22:26, Aditya Mahajan  wrote:
> 
> On Tue, 24 Nov 2020, Bruce Horrocks wrote:
> 
>> The following is giving me a section title with triple underbars instead of 
>> single. 
>> 
>> \definehead [Heading] [section]
>> \setuphead [Heading] [style={\underbar}]
> 
> Change this to:
> 
> \setuphead [Heading] [textcommand={\underbar}, numbercommand=\underbar]
> 

Thanks - that worked nicely.
--
Bruce Horrocks
Hampshire, UK

___
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] bTABLEhead not working

2020-11-24 Thread Bruce Horrocks
This worked for me a couple of versions ago but not under 2020.11.24 00:41. The 
headings are being printed as ordinary text at the top of the table rather than 
framed.

\starttext
\bTABLE[split=yes, header=repeat]
\bTABLEhead
  \bTR
\bTH A \eTH
\bTH B \eTH
  \eTR
\eTABLEhead
\bTABLEbody
  \bTR
\bTD 0 \eTD
\bTD zzz\eTD
  \eTR
\eTABLEbody
\eTABLE
\stoptext

--
Bruce Horrocks
Hampshire, UK

___
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] Unexpected underbar behaviour in sections

2020-11-24 Thread Bruce Horrocks
The following is giving me a section title with triple underbars instead of 
single. 

\definehead [Heading] [section]
\setuphead [Heading] [style={\underbar}]
\starttext
\Heading{First level section heading}
\underbar{This is single underlined as expected}
\stoptext

(Same with \startHeading .. \stopHeading and for subsections, which is where I 
first noticed it.)

It looks quite attractive in its own way - and certainly acts as a visual 
highlight - just not quite what I was expecting. ;-)

version 2020.11.24 00:41

--
Bruce Horrocks
Hampshire, UK

___
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] reusableMPgraphic not working

2020-11-18 Thread Bruce Horrocks


> On 18 Nov 2020, at 13:28, Rik Kabel  wrote:
> 
> 
> On 11/18/2020 08:11, Bruce Horrocks wrote:
>> Just working through the Metafun manual and have hit a problem. In the 
>> following MWE the green circle appears but the blue one doesn't. Surely 
>> reusable graphics must be so commonly used that it has to be me that's doing 
>> something wrong?
>> 
>> (Context version is: 2020.11.05 23:01)
>> 
>> \starttext
>> \startuseMPgraphic{name1}
>>  fill fullcircle scaled 100pt withcolor green ;
>> \stopuseMPgraphic
>> Green circle: \useMPgraphic{name1}
>> 
>> \startreusableMPgraphic{name2}
>>  fill fullcircle scaled 100pt withcolor blue ;
>> \stopreusableMPgraphic
>> Blue circle:\reuseMPgraphic{name2}
>> \stoptext
>> 
> 
> Works as expected here, producing both circles. I am using 2020.11.17 12:39, 
> both LMTX and MkIV.

Thanks. A complete wipe and reinstall of TeX Live and ConTeXt has fixed it for 
me. No idea what was corrupted though.

--
Bruce Horrocks
Hampshire, UK

___
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] reusableMPgraphic not working

2020-11-18 Thread Bruce Horrocks
Just working through the Metafun manual and have hit a problem. In the 
following MWE the green circle appears but the blue one doesn't. Surely 
reusable graphics must be so commonly used that it has to be me that's doing 
something wrong?

(Context version is: 2020.11.05 23:01)

\starttext
\startuseMPgraphic{name1}
 fill fullcircle scaled 100pt withcolor green ;
\stopuseMPgraphic
Green circle: \useMPgraphic{name1}

\startreusableMPgraphic{name2}
 fill fullcircle scaled 100pt withcolor blue ;
\stopreusableMPgraphic
Blue circle:\reuseMPgraphic{name2}
\stoptext

--
Bruce Horrocks
Hampshire, UK

___
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] MacOS+TeXlive: installation problems

2020-11-17 Thread Bruce Horrocks
On 17 Nov 2020, at 20:23, Tomas Hala  wrote:
> 
> Hi all,
> 
> one student of mine asked me for a help with installation TeXlive 
> (from http://www.tug.org/mactex/mactex-download.html) 
> on her MacBook Air 16 with macOS Catalina.
> 
> Despite the fact that the site states 
> "All install packages are developer-signed and notarized by Apple.",
> she got:
> "Cannot be opened because its from unidentified developer, MacOS cannot 
> verify that this app is free from malware."
> 
> What could it be? 
> I have got no experience with MacOS, so I would like to ask for some hints 
> how we can fix it.

For the first run, you need to 'deliberately' run the application rather than 
just double-clicking it or choosing from the Launcher. (This is intended to 
prevent people casually running anything they download from the Internet 
without thinking.)

To deliberately run the app, go to the Applications folder, option-click (aka 
right click) the TeXLive app and choose Open" from the contextual menu that 
pops up. You should then get a warning dialog asking if you really want to run 
the app. Agree and the app will open and the Mac should then remember so that 
next time a simple double-click will be sufficient.

--
Bruce Horrocks
Hampshire, UK

___
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] Tables in multiple columns?

2020-11-16 Thread Bruce Horrocks


> On 16 Nov 2020, at 08:55, Bruce Horrocks  wrote:

[snip]

> I'm interested because I have a long thin table that I would to avoid having 
> to manually split, but I would also like the heading to repeat at the top of 
> each column and \starttabulation doesn't do the latter. I was hoping that 
> \bTABLE did.

Sorry I meant \startabulate not \startabulation

--
Bruce Horrocks
Hampshire, UK

___
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] Tables in multiple columns?

2020-11-16 Thread Bruce Horrocks
There's an example in the Wiki on how to put a table into multiple columns that 
no longer works in LMTX (version 2020.11.05 23:01).
<https://wiki.contextgarden.net/TABLE#Tables_in_multiple_columns>

\starttext
\startcolumns[n=3]
\bTABLE
\dorecurse{21}
{\bTR \bTD a\eTD \bTD b \eTD \eTR}
\eTABLE
\stopcolumns
\stoptext

I'm interested because I have a long thin table that I would to avoid having to 
manually split, but I would also like the heading to repeat at the top of each 
column and \starttabulation doesn't do the latter. I was hoping that \bTABLE 
did.

--
Bruce Horrocks
Hampshire, UK

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

2020-09-03 Thread Bruce Horrocks
It looks to be the same screen as the one reviewed here. The video has a 
comparison of the resolution versus a regular b e-ink display.
<https://blog.the-ebook-reader.com/2020/08/19/review-onyx-boox-poke2-color-with-color-e-ink-screen-video/>


> On 3 Sep 2020, at 18:25, Hans Hagen  wrote:
> 
> Hi,
> 
> Has anyone seen this device:
> 
> https://www.pocketbook-int.com/nl/products/pocketbook-color-lux
> 
> I wonder what the quality is (300 dpi bw, 100 dpi color overlayed).
> 
> 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
> ___

--
Bruce Horrocks
Hampshire, UK

___
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] A simpler way to install LMTX in macOS Catalina

2020-05-30 Thread Bruce Horrocks
Thank-you Nicola that was very timely and helpful. :-)

> On 30 May 2020, at 12:09, Nicola  wrote:
> 
> Today I wanted to try LMTX and I have found these instructions in the wiki:
> 
>https://wiki.contextgarden.net/Installing_ConTeXt_LMTX_on_MacOS
> 
> Rather than disabling SIP, I have proceeded as follows:
> 
> 1. Download macOS's version of LMTX from 
> https://wiki.contextgarden.net/Installation
> 2. Unpack
> 3. cd context-osx-64
> 4. xattr -d com.apple.quarantine bin/mtxrun
> 5. sh ./install.sh
> 
> Point 4 is important to avoid the dialog "mtxrun cannot be opened
> because the developer cannot be verified." Of course, it would be
> better if the binary were signed...
> 
> Nicola
> 
> 
> ___
> 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
> ___

--
Bruce Horrocks
Hampshire, UK

___
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] Anyone managed a tabulated table of contents

2020-05-25 Thread Bruce Horrocks
I can't be the first to have wanted to try something like this. Is it possible 
to use tabulate (or any of the table types) to customise the layout of the 
table of contents?

I'd like 4 columns - title, subject, author and page - where subject and author 
will (eventually) be additional parameters supplied to \startchapter. Bonus 
points if it works in interactive mode as well.

Minimum non-working example below. This generates the 4 column values per 
chapter heading but they run together into a single paragraph as if the table 
formatting was not present.

%%% Begin %%%
\setuppapersize [A4] [A4]
\setupinteraction [state=start]
\setuplist [chapter]
  [ alternative=command, %interactive
command=\myTOCrow,
before=\myTOCbefore,
after=\myTOCafter
  ]

% #1 == Section number; #2 == text; #3 == page number
\define[3]\myTOCrow{\NC #2 \NC dummy \NC John Doe \NC #3 \NC\NR }

\define\myTOCbefore{
  \starttabulate[|pw(8.75cm)|l|lw(4.2cm)|r|]
  \NC \underbars{Title}
  \NC \underbars{Subject}
  \NC \underbars{Author}
  \NC \underbars{Page}
  \NC\NR
}

\define\myTOCafter{%
  \stoptabulate }

\starttext
\title{Tabulated Table of Contents}
\placelist[chapter]

\startchapter[title=Tufte 1]
\input tufte
\stopchapter

\startchapter[title=Tufte 2]
\input tufte
\stopchapter
\stoptext
%%% End %%%


--
Bruce Horrocks
Hampshire, UK

___
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] Text for proofing fonts

2020-05-19 Thread Bruce Horrocks


> On 19 May 2020, at 15:45, Pavneet Arora  wrote:
> 
> The texts are on 
> github, but no mention of license:

The license is given on the Github page: "This work is licensed under a 
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International 
License."

<https://github.com/hoeflerco/proofs/blob/master/license.md>

--
Bruce Horrocks
Hampshire, UK

___
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 with \vfill in extreme table

2020-05-17 Thread Bruce Horrocks
If I want the words Top and Bottom at the top and bottom of a page then "Top 
\vfill Bottom" works as expected. If I use the same in an extreme table I get 
an error and I don't know why.

What's the 'official' way to align top and bottom in an xrow? 

 MWE
\setuppapersize [A4] [A4]
\starttext
\startxtable[width=\textwidth]
  \startxrow[height=150mm]
\startxcell[align=middle]
  Top
  \vfill
  Bottom
\stopxcell
  \stopxrow
\stopxtable
\stoptext


The error message is:
> tex error   > tex error on line 4 in file virtual://buffer.x_table_1.2: ! 
> Missing } inserted
> 
>  
> }
>  
> \vfill 
> l.4   \vfill
> 

Version: This is LuaTeX, Version 1.12.0 (TeX Live 2020) 
--
Bruce Horrocks
Hampshire, UK

___
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] Custom list layout with PDF bookmarks

2020-05-17 Thread Bruce Horrocks

> On 16 May 2020, at 12:02, Henning Hraban Ramm  wrote:
> 
>> 
>> Am 16.05.2020 um 08:30 schrieb Wolfgang Schuster 
>> :
>> 
>> Bruce Horrocks schrieb am 16.05.2020 um 00:47:
>>> When I customise the table of contents layout I lose the automatic 
>>> hyperlinks. Is there a simple configuration option that I have missed or do 
>>> I need to create my own links somehow?
[snip]
>> alternative=command : Cutsom TOC without hyperlinks
>> 
>> alternative=interactive : Custom TOC with hyperlinks
> 
> Thank you! Wikified: https://wiki.contextgarden.net/Command/setuplist

Thank-you Wolfgang for the quick reply and also Hraban for beating me to it on 
the Wiki - I was going to (honest!)

--
Bruce Horrocks
Hampshire, UK

___
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] Custom list layout with PDF bookmarks

2020-05-15 Thread Bruce Horrocks
When I customise the table of contents layout I lose the automatic hyperlinks. 
Is there a simple configuration option that I have missed or do I need to 
create my own links somehow?

Example:

\setupinteraction[state=start]
\setupinteractionscreen[option=bookmark] 

\define[3]\SectionListEntry
  {\par \leftaligned\bgroup
 \hbox to 2em{#3}%
 \hskip   1em
 \vtop{\hsize\dimexpr\textwidth-3em\relax#2}
  \egroup \par}

% Comment out this next line to regain section hyperlinks in the ToC
\setuplist[section][alternative=command,command=\SectionListEntry]

\starttext
Table of Contents
\placecontent[criterium=all]
\placebookmarks[chapter,subject]

\chapter{Tufte}
\section{Section 1}
\input tufte
\page
\section{Section 2}
\input tufte
\page
\section{Section 3}
\input tufte
\page
\stoptext


Thanks in advance.
--
Bruce Horrocks
Hampshire, UK

___
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] METAPOST subpath rounding issue

2020-05-09 Thread Bruce Horrocks
> You can save extracting the xparts and yparts by using direct subtraction of 
> pairs and comparing with (0,0) like this:

Aaaargh, no, ignore that, it's nonsense. It's amazing how you can stare at 
something for minutes but only see the flaw the moment you press send. Sorry 
for the noise.

--
Bruce Horrocks
Hampshire, UK

___
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] METAPOST subpath rounding issue

2020-05-09 Thread Bruce Horrocks


> On 8 May 2020, at 13:58, Gerben Wierda  wrote:
> 
>> On 8 May 2020, at 00:46, n...@scorecrow.com wrote:
>> 
>>> On 7 May 2020, at 20:28, Gerben Wierda  wrote:
>>> 
>>> I have a METAPOST algorithm that splits a path at a certain time in two, 
>>> does something with both ends (not the ends where they were split) and then 
>>> rejoins them.
>>> 
>>> In very rare cases this crashes, because the subpath doesn’t work as 
>>> expected.
>>> 
>>>  firstPart := subpath (0,halfWayTime) of workingConn;
>>>  secondPart := subpath (halfWayTime,pathTimeLen) of workingConn;
>>> 
>>> may sometimes result in something like this:
>>> 
>>> metapost log> >> Path at line 0:
>>> metapost log> (273,-427)..controls (259.50,-427) and 
>>> (246.013335,-427)
>>> metapost log>  ..(232.520001,-427)
>>> metapost log> 
>>> metapost log> >> Path at line 0:
>>> metapost log> (232.519998,-427)..controls 
>>> (161.680001,-427) and (90.84000
>>> metapost log> 03,-427)
>>> metapost log>  ..(20,-427)
>>> 
>>> As can be seen in these (rare) cases the two calls to subpath result in a 
>>> different point resulting from both. so, when I later try to rejoin them 
>>> with & it fails:
>>> 
>>> metapost log> ! Paths don't touch; '&' will be changed to '..'.
>>> metapost log>  
>>> 
>>> Which means subpath doesn’t always exactly do what I expect it to do (and 
>>> many explanations, but not the official manual) state. Again, this is rare.
>>> 
>>> I’ve done this to work around it but I wondered if there was a better 
>>> (reliable) solution
>>> 
>>>  save cutFirstPart; path cutFirstPart; cutFirstPart := firstPart 
>>> maxcutbefore fromPicOutline;
>>>  save cutSecondPart; path cutSecondPart; cutSecondPart := secondPart 
>>> maxcutafter toPicOutline;
>>>  if ((xpart point 0 of cutSecondPart) <> (xpart point infinity of 
>>> cutFirstPart))
>>>or ((ypart point 0 of cutSecondPart) <> (ypart point infinity of 
>>> cutFirstPart)):
>>>resultConn := cutFirstPart--cutSecondPart;
>>>  else:
>>>resultConn := cutFirstPart & cutSecondPart;
>>>  fi
>> 
>> A crude test of 
>> 
>>  path pb;
>>  pb:=(5.5cm,0cm)--(5.5cm,0cm)--(10.5cm,0cm);
>>  draw pb;
>> 
>> gives no errors so why not just join using -- all the time and save the test?
> 
> Because the double exact points are also creating (different) problems in my 
> algorithm as they make the path have 'no direction' at that point (direction 
> is (0,0).

You can save extracting the xparts and yparts by using direct subtraction of 
pairs and comparing with (0,0) like this:

\starttext
\startMPcode
path cutFirstPart,cutSecondPart;

cutFirstPart := (0,0) -- (232.520001,-427);
cutSecondPart := (232.519998,-427) -- (999,-427);
%cutFirstPart := (0,0) -- (232.520001,-427);
%cutSecondPart := (232.520001,-427) -- (999,-427);

if (point infinity of cutFirstPart) - (point 0 of cutSecondPart) = (0,0) :
  label("same", (1cm,1cm))
else :
  label("different", (1cm,1cm))
fi;
\stopMPcode
\stoptext

*Except* that the example doesn't work with floats that are so close. Changing 
232.52_etc to 332.52_etc works as expected. I'm hoping that this is a "feature" 
of the parser reading in the example at a lower precision than the number of 
decimals provided. For your code, where the different values are created by 
calculation, the two pairs should be recognised as different.

--
Bruce Horrocks
Hampshire, UK

___
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] Which version is best for MSWindows users.?

2005-02-21 Thread Bruce Horrocks
In message [EMAIL PROTECTED], John Culleton 
[EMAIL PROTECTED] writes
So how would you start an absolute newbie to e.g., Context and pdfetex? 
Where would you point them for their first download?
Mswintex.zip is another option for a basic (Context only) setup that 
avoids the frighteningly large list of checkbox options presented by 
MikTeX. The only problems I had installing mswintex.zip were in trying 
to find any installation instructions. :-) (Note to Hans: if 
installation instructions do exist then please make them more visible.)

So I wrote my own :-) which I have attached and which you are welcome to 
use freely. The only caveat is that I already had ActiveState Perl 
installed on my machine so I don't know whether it needs to be installed 
separately in order to make texexec work or whether mswintex.zip handles 
this on its own as well. I would be grateful if you could check this out 
for me.

If the instructions do work then please also let Hans know and maybe he 
could add them to the mswintex.zip distribution? No need to keep my name 
in there - people might start asking me for help (which would be bad for 
them). ;-)

Regards,
--
Bruce Horrocks
Surrey
England
firstname@surname.plus.com -- fix the obvious for email
I can't find a proper install guide for mswintex.zip under XP Professional 
(SP2) so here is a quick summary:

1) Unzip mswintex.zip into c:\tex (d:\tex etc. should be fine if you have 
another drive/partition).

2) Start a CMD shell and run the commands:
   C:\tex c:\tex\setuptex.bat
   C:\tex mktexlsr
   C:\tex texexec --make --alone en metafun

(The last line sets up ConTeXt for English. Use nl for Dutch, de for German.)

3) Now the problems start.  The setuptex.bat file ought to go into autoexec.nt 
so that it is run on startup. Unfortunately texexec doesn't seem to want to run 
at all from a command.com shell (only a cmd.exe shell) but cmd.exe isn't 
interested in running autoexec.nt. So far I've just been starting a shell and 
running the c:\tex\setuptex.bat by hand each time.

Since setuptex.bat only sets environment variables (type 'set' to see which) 
you could enter them into the registry via START - Settings - Control Panel 
- System - Advanced - Environment Variables and then they would be set 
permanently.

4) Create a sample file to test the installation. Copy the following to a file 
called demo.tex using Notepad. Put it into a working directory somewhere - I'm 
assuming c:\work. (Tip: In Notepad, when you save the file, enter the filename 
as demo.tex *including* the quotes and it won't add .txt to the filename.) 
Don't include the start and end lines.

-- start --
% interface=en

\setuppapersize
  [S6][S6]

\setuplayout
  [width=middle,
   height=middle]

\setuphead
  [chapter]
  [header=high,
   style=\bfc,
   alternative=middle]

\starttext

\title{Peter D. Ward}
The Earth, as a habitat for animal life, is in old age and
has a fatal illness. Several, in fact. It would be happening
whether humans had ever evolved or not. But our presence is
like the effect of an old|-|age patient who smokes many packs
of cigarettes per day |.| and we humans are the cigarettes.

\stoptext
-- end --

5) Start a cmd shell (or use the current one) and cd to c:\work. Run the 
texsetup.bat script as per step 2 if you're using a fresh shell. Now run the 
command:
  c:\work texexec --batch --output=pdftex demo

This will create several working files (all called demo.something) plus a 
demo.pdf (assuming that all has gone well).

Hope this helps.
Bruce Horrocks, Jan 2005___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Which version is best for MSWindows users.?

2005-02-20 Thread Bruce Horrocks
In message [EMAIL PROTECTED], John Culleton 
[EMAIL PROTECTED] writes
So how would you start an absolute newbie to e.g., Context and pdfetex?
[Apologies if you get this twice - first time I used the wrong email 
identity so I think that the list server has quarantined or deleted it.]

Mswintex.zip is another option for a basic (Context only) setup that 
avoids the frighteningly large list of checkbox options presented by 
MikTeX. The only problems I had installing mswintex.zip were in trying 
to find any installation instructions. :-) (Note to Hans: if 
installation instructions do exist then please make them more obvious.)

So I wrote my own :-) which I have attached and which you are welcome to 
use freely. The only caveat is that I already had ActiveState Perl 
installed on my machine so I don't know whether it needs to be installed 
separately in order to make texexec work or whether mswintex.zip handles 
this on its own as well. I would be grateful if you could check this out 
for me.

If the instructions do work then please also let Hans know and maybe he 
could add them to the mswintex.zip distribution? No need to keep my name 
in there - people might start asking me for help (which would be bad for 
them). ;-)

Regards,
--
Bruce Horrocks
Surrey, UK
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Which version is best for MSWindows users.?

2005-02-20 Thread Bruce Horrocks
In message [EMAIL PROTECTED], Bruce Horrocks 
[EMAIL PROTECTED] writes

So I wrote my own :-) which I have attached and which you are welcome
Okay, this time they're attached. :-)
Regards,
--
Bruce Horrocks
Surrey, UK
I can't find a proper install guide for mswintex.zip under XP Professional 
(SP2) so here is a quick summary:

1) Unzip mswintex.zip into c:\tex (d:\tex etc. should be fine if you have 
another drive/partition).

2) Start a CMD shell and run the commands:
   C:\tex c:\tex\setuptex.bat
   C:\tex mktexlsr
   C:\tex texexec --make --alone en metafun

(The last line sets up ConTeXt for English. Use nl for Dutch, de for German.)

3) Now the problems start.  The setuptex.bat file ought to go into autoexec.nt 
so that it is run on startup. Unfortunately texexec doesn't seem to want to run 
at all from a command.com shell (only a cmd.exe shell) but cmd.exe isn't 
interested in running autoexec.nt. So far I've just been starting a shell and 
running the c:\tex\setuptex.bat by hand each time.

Since setuptex.bat only sets environment variables (type 'set' to see which) 
you could enter them into the registry via START - Settings - Control Panel 
- System - Advanced - Environment Variables and then they would be set 
permanently.

4) Create a sample file to test the installation. Copy the following to a file 
called demo.tex using Notepad. Put it into a working directory somewhere - I'm 
assuming c:\work. (Tip: In Notepad, when you save the file, enter the filename 
as demo.tex *including* the quotes and it won't add .txt to the filename.) 
Don't include the start and end lines.

-- start --
% interface=en

\setuppapersize
  [S6][S6]

\setuplayout
  [width=middle,
   height=middle]

\setuphead
  [chapter]
  [header=high,
   style=\bfc,
   alternative=middle]

\starttext

\title{Peter D. Ward}
The Earth, as a habitat for animal life, is in old age and
has a fatal illness. Several, in fact. It would be happening
whether humans had ever evolved or not. But our presence is
like the effect of an old|-|age patient who smokes many packs
of cigarettes per day |.| and we humans are the cigarettes.

\stoptext
-- end --

5) Start a cmd shell (or use the current one) and cd to c:\work. Run the 
texsetup.bat script as per step 2 if you're using a fresh shell. Now run the 
command:
  c:\work texexec --batch --output=pdftex demo

This will create several working files (all called demo.something) plus a 
demo.pdf (assuming that all has gone well).

Hope this helps.
Bruce Horrocks, Jan 2005___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context