[NTG-context] Lorem ipsum module line limit

2022-04-12 Thread A A via ntg-context
Hello,

I am trying to fill up an entire page with dummy text using m-ipsum.
Unfortunately, it looks like m-ipsum only allows up to 12 lines, if I
increase it to 13+ lines I see no change in the resulting PDF file:






*\usemodule[m-ipsum]\starttext\ipsum[alternative=lines, n=12]\stoptext*

Is this intended behavior or a bug. How can I fill up the whole page with
dummy text?

Amine
___
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] Proper formatting of itemized bullets in ConTeXt

2022-04-12 Thread śrīrāma via ntg-context
On 4/13/22 7:37 AM śrīrāma wrote:
> I revisited this today after the (frankly) subpar solution I presented 
> yesterday. With the below example, we 
>   • neither lose the nice features of \setupitemgroup 
>   • nor do we need grouping of the items. 
> The only 'price to pay' is to use \citem (comma item) and \pitem (period 
> item) as required. 

cleaned up the example – 

%% start example
  \def\citem{\item\AfterPar{\hspace[-normal],}\GetPar}
  \def\pitem{\item\AfterPar{\hspace[-normal].}\GetPar}

  \defineitemgroup
[pitemize]
[command=\Word]

  \starttext
  \startpitemize[n]
  \citem first item
  \citem second item
  \citem third item
  \pitem fourth item
  \stoppitemize
  \stoptext
%% stop example


  Sreeram


___
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] Proper formatting of itemized bullets in ConTeXt

2022-04-12 Thread śrīrāma via ntg-context
On 4/12/22 1:57 PM A A via ntg-context wrote:
> Is there a straightforward way of setting up the itemize command such that
> every first letter is capitalized, regardless of whether I do so in the
> source file?
> 
> Also, is there a way to insert a comma at the end of each item except for
> the last, and then a full stop at the end of the last item like follows?
> 
>- First item,
>- Second item,
>- Third item,
>- Last item.

I revisited this today after the (frankly) subpar solution I presented 
yesterday. With the below example, we 
  • neither lose the nice features of \setupitemgroup 
  • nor do we need grouping of the items. 
The only 'price to pay' is to use \citem (comma item) and \pitem (period item) 
as required. 

%% start example
  \def\citem{\item\AfterPar{\hspace[-normal],}\GetPar}
  \def\pitem{\item\AfterPar{\hspace[-normal].}\GetPar}

  \defineitemgroup
[pitemize]
[command=\Word,numberconversion=words]

  \starttext
  \startpitemize[n]
  \citem first item
  \citem second item
  \citem third item
  \pitem fourth item
  \stoppitemize
  \stoptext
%% stop example

Best,
  Sreeram


___
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] Setting up zint on a mac with macOS Montery Version 12.3.1

2022-04-12 Thread Bruce Horrocks via ntg-context


> On 12 Apr 2022, at 21:04, Keith McKay  wrote:
> 
> Hi All
> I created the symbolic link as suggested by Bruce and Luis and still got the 
> error message 
> 
> optional> unable to locate library 'libzint'
> 
> in my text editor. I use TeXworks. However, I thought I would try running 
> from the Terminal app and it worked. It found libzint and output the pdf with 
> both barcodes and the qrcode. I have no idea why it works in the Terminal and 
> not TexWorks, I'm guessing I have a path issue which I need to investigate.

Could be a path issue - or some other environment variable. This link should 
help you decide what needs to go where:


> Notes
> 1) My machine is a mac-mini-M1 with macos Monterey and I'm running the latest 
> ConTeXt version
> 2) Bruce noted that my Homebrew was installed in a non-standard location so I 
> checked on the Hombrew website and it is installed in opt/homebrew for Apple 
> Silicon i.e the M1 chip. Maybe Bruce's homebrew was installed on an earlier 
> version.

Ah, I'm on an Intel Mac which still uses the old approach. Apologies for the 
red herring.

> Thanks to Luis and Bruce for their suggestions.
> Best Wishes
> Keith McKay

—
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] fatal error in LMTX

2022-04-12 Thread Bruce Horrocks via ntg-context


> On 12 Apr 2022, at 18:14, Pablo Rodriguez via ntg-context 
>  wrote:
> 
> I wonder whether it would be possible that ConTeXt or LuaMeTaTeX could
> be more verbose about an opened environment that isn’t closed.


$ mtxrun --script check  filename.tex

is something I learned from this list.

—
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] Setting up zint on a mac with macOS Montery Version 12.3.1

2022-04-12 Thread Keith McKay via ntg-context

Hi All

I created the symbolic link as suggested by Bruce and Luis and still got the 
error message

optional> unable to locate library 'libzint'

in my text editor. I use TeXworks. However, I thought I would try running from 
the Terminal app and it worked. It found libzint and output the pdf with both 
barcodes and the qrcode. I have no idea why it works in the Terminal and not 
TexWorks, I'm guessing I have a path issue which I need to investigate.

Notes
1) My machine is a mac-mini-M1 with macos Monterey and I'm running the latest 
ConTeXt version
2) Bruce noted that my Homebrew was installed in a non-standard location so I 
checked on the Hombrew website and it is installed in opt/homebrew for Apple 
Silicon i.e the M1 chip. Maybe Bruce's homebrew was installed on an earlier 
version.

Thanks to Luis and Bruce for their suggestions.
Best Wishes
Keith McKay

On 10/04/2022 22:26, Bruce Horrocks wrote:

Hi Keith,


On 10 Apr 2022, at 14:49, Keith McKay via ntg-context  
wrote:

Hi All

I have been struggling today trying to setup and use the Barcode module zint in 
ConTeXt and failed. I have followed the instructions on the wiki 
(https://wiki.contextgarden.net/Barcodes  ) but with some changes as follows. 
Which maybe why I failed.

1) I downloaded Zint using Homebrew since I'm using macOS, and installed it 
according to the instructions.


2) Since I'm using LMTX I looked for the file libzint.dylib and found it in 
/opt/homebrew/Cellar/zint/2.10.0/lib . This is different from the path given on 
the wiki. The directory contained three files, two of which were aliases,  
libzint.2.10.dylib and libzint.dylib, and an exe file libzint.2.10.0.0.dylib

You have Hombrew installed in a non-standard location. Mine is in 
/usr/local/Cellar with the executables linked into /usr/local/bin.

But, assuming other Homebrew commands work when run from Terminal then you 
might still be okay.


3) I created the path $TEXROOT/tex/texmf-osx-64/bin/lib/luametatex/zint and 
copied libzint.2.10.0.0.dylib into but replaced dylib with 'so' as suggested on 
the wiki instructions. So I basically added  lib/luametatex/zint to 
texmf-osx-64/bin .

"Yes" to creating the path but "no" to copying. Create a symbolic link instead.

So, in Terminal:

   $ cd $TEXROOT/tex/texmf-osx-64/bin/lib/luametatex/zint

   # In my case I used the following:
   $ ln -s /usr/local/Cellar/zint/2.10.0/lib/libzint.dylib libzint.so

   # For you with Homebrew in a different location, try:
   $ ln -s /opt/homebrew/Cellar/zint/2.10.0/lib/libzint.dylib libzint.so

Then steps 4 and 5 as below. I ran the MWE below: the ISBN worked, the ISBNX 
didn't, the QR code did. This is on Monterey.


4) I ran mtxrun --generate to update the database.

5) I ran the MWE below but no barcode appeared. The console output shows:
  


modules > using user prefixed file 'libs-imp-zint'
modules > 'zint' is loaded

  however further down the output it gives:


optional> unable to locate library 'libzint'

I have tried renaming libzint2.10.0.0.so to libzint.so, but still no barcode. 
Is their something I am missing? Tips or hints appreciated.
Best Wishes
Keith McKay

%% MWE 
\usemodule[zint]
\starttext
\barcode[alternative=isbn,text=9783865419026,width=4cm]
\barcode[alternative=isbnx, text=9783865419026, width=4cm]
\barcode[alternative=qrcode, text={https://wiki.contextgarden.net}, width=3cm]
\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] right item marks for associative questions?

2022-04-12 Thread Wolfgang Schuster via ntg-context

Damien Thiriet via ntg-context schrieb am 12.04.2022 um 20:46:

Thank you for all your answers.
I will have a deeper look at them.
My first comments:


If you are certain that the there will be no
multi-line item

Unfortunately there are often some. History
teachers are not known for loving short texts,
at least in France.


Using the “columns" feature is one way to go

Might be, but I do not always give the same
number of answers on both columns

Something I forgot to put in my MWE is that I
randomize both lists. Messing the answers is a
good way to prevent pupils from cheating,
especially with long answers..
That makes a four columns table more cumbersome,
so I believe.


You can use different alignment settings to move the bullet points to 
the right side of your lists.


\starttext

\bTABLE[frame=off,width=.4\textwidth,columndistance=.2\textwidth,align={normal,lohi}]
  \bTR
    \bTD
  \startitemize[circle,random][align=righttoleft]
  \startitem {\lefttoright One} \stopitem
  \startitem {\lefttoright Two} \stopitem
  \startitem {\lefttoright Three} \stopitem
  \stopitemize
    \eTD
    \bTD
  \startitemize[circle,random]
  \startitem First \stopitem
  \startitem Second \stopitem
  \startitem Third \stopitem
  \startitem Foruth \stopitem
  \stopitemize
    \eTD
  \eTR
\eTABLE

\stoptext

Wolfgang

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

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


Re: [NTG-context] right item marks for associative questions?

2022-04-12 Thread Damien Thiriet via ntg-context
Thank you for all your answers.
I will have a deeper look at them. 
My first comments:

> If you are certain that the there will be no
> multi-line item
Unfortunately there are often some. History
teachers are not known for loving short texts,
at least in France.

> Using the “columns" feature is one way to go
Might be, but I do not always give the same
number of answers on both columns

Something I forgot to put in my MWE is that I 
randomize both lists. Messing the answers is a 
good way to prevent pupils from cheating, 
especially with long answers..
That makes a four columns table more cumbersome,
so I believe.

Damien

___
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] fatal error in LMTX

2022-04-12 Thread Denis Maier via ntg-context
Hi Otared,
I think Pablo knows that \stopfrontmatter is missing. IIUC, his point is that 
the error message should be more useful.
Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Otared
> Kavian via ntg-context
> Gesendet: Dienstag, 12. April 2022 20:05
> An: mailing list for ConTeXt users 
> Cc: Otared Kavian 
> Betreff: Re: [NTG-context] fatal error in LMTX
> 
> Hi Pablo,
> 
> Your example works fine on my machine (MacOS 11.6.4) with LMTX version
> 2022.04.11. However in your example the \stopfrontmatter is missing.
> 
> Best regards: Otared
> 
> > On 12 Apr 2022, at 19:14, Pablo Rodriguez via ntg-context  cont...@ntg.nl> wrote:
> >
> > Hi Hans,
> >
> > I have a minimal sample that triggers a fatal error in ConTeXt LMTX
> > (current latest from 2022.04.11 19:27):
> >
> >  \starttext
> >  \startfrontmatter
> >  \input zapf
> >  \stoptext
> >
> > This gives the following error message:
> >
> >  mkiv lua stats  > runtime: 0.386 seconds, 1 processed pages,
> >1 shipped pages, 2.592 pages/second
> >  mtx-context | fatal error: return code: 1
> >
> > The one above is a stupid sample. But it took me about two hours to
> > discover what was triggering the fatal error message.
> >
> > I wonder whether it would be possible that ConTeXt or LuaMeTaTeX could
> > be more verbose about an opened environment that isn’t closed.
> >
> > Many thanks for your help and your excellent work,
> >
> > Pablo
> >
> __
> 
> > _ 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
> >
> __
> 
> > _
> 
> __
> _
> 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
> __
> _
___
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] fatal error in LMTX

2022-04-12 Thread Otared Kavian via ntg-context
Hi Pablo,

Your example works fine on my machine (MacOS 11.6.4) with LMTX version 
2022.04.11. However in your example the \stopfrontmatter is missing.

Best regards: Otared

> On 12 Apr 2022, at 19:14, Pablo Rodriguez via ntg-context 
>  wrote:
> 
> Hi Hans,
> 
> I have a minimal sample that triggers a fatal error in ConTeXt LMTX
> (current latest from 2022.04.11 19:27):
> 
>  \starttext
>  \startfrontmatter
>  \input zapf
>  \stoptext
> 
> This gives the following error message:
> 
>  mkiv lua stats  > runtime: 0.386 seconds, 1 processed pages,
>1 shipped pages, 2.592 pages/second
>  mtx-context | fatal error: return code: 1
> 
> The one above is a stupid sample. But it took me about two hours to
> discover what was triggering the fatal error message.
> 
> I wonder whether it would be possible that ConTeXt or LuaMeTaTeX could
> be more verbose about an opened environment that isn’t closed.
> 
> Many thanks for your help and your excellent work,
> 
> Pablo
> ___
> 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
> ___

___
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] fatal error in LMTX

2022-04-12 Thread Pablo Rodriguez via ntg-context
Hi Hans,

I have a minimal sample that triggers a fatal error in ConTeXt LMTX
(current latest from 2022.04.11 19:27):

  \starttext
  \startfrontmatter
  \input zapf
  \stoptext

This gives the following error message:

  mkiv lua stats  > runtime: 0.386 seconds, 1 processed pages,
1 shipped pages, 2.592 pages/second
  mtx-context | fatal error: return code: 1

The one above is a stupid sample. But it took me about two hours to
discover what was triggering the fatal error message.

I wonder whether it would be possible that ConTeXt or LuaMeTaTeX could
be more verbose about an opened environment that isn’t closed.

Many thanks for your help and your excellent work,

Pablo
___
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] Proper formatting of itemized bullets in ConTeXt

2022-04-12 Thread śrīrāma via ntg-context
On 4/12/22 1:57 PM A A via ntg-context wrote:
> Dear All,
> 
> Is there a straightforward way of setting up the itemize command such that
> every first letter is capitalized, regardless of whether I do so in the
> source file?
> 
> Also, is there a way to insert a comma at the end of each item except for
> the last, and then a full stop at the end of the last item like follows?
> 
>- First item,
>- Second item,
>- Third item,
>- Last item.

If this is just for unnumbered lists, then the following should suffice:

%%% start example
  \defineitemgroup
[pitemize]
[command=\Word]
  \define\citem{%
\incrementnumber[itemgroup:pitemize]%
\sym{\symbol[\currentitemgroupsymbol]}%
\groupedcommand{}{,}%
  }
  \define\pitem{%
\incrementnumber[itemgroup:pitemize]%
\sym{\symbol[\currentitemgroupsymbol]}%
\groupedcommand{}{.}%
  }

  \starttext
  \startpitemize
  \citem {first item}
  \citem {second item}
  \citem {third item}
  \pitem {fourth item}
  \stoppitemize
  \stoptext
%%% stop example

For numbered lists, more work is required I think. For example, you might need 
something like
  \unprotect
\define\citem{%
  \incrementnumber[itemgroup:pitemize]%
  \sym{%
\itemgroupparameter\c!left%
  \getnumber[itemgroup:pitemize]%
\itemgroupparameter\c!stopper%
\itemgroupparameter\c!right
  }%
  \groupedcommand{}{,}%
}
\define\pitem{%
  \incrementnumber[itemgroup:pitemize]%
  \sym{%
\itemgroupparameter\c!left%
  \getnumber[itemgroup:pitemize]%
\itemgroupparameter\c!stopper%
\itemgroupparameter\c!right
  }%
  \groupedcommand{}{.}%
}
  \protect

but this still does not provide for the various possible conversion sets and 
other features of \setupitemgroup. See strc-itm.mklx for hints.

  Sreeram


___
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] Proper formatting of itemized bullets in ConTeXt

2022-04-12 Thread A A via ntg-context
Dear All,

Is there a straightforward way of setting up the itemize command such that
every first letter is capitalized, regardless of whether I do so in the
source file?

Also, is there a way to insert a comma at the end of each item except for
the last, and then a full stop at the end of the last item like follows?

   - First item,
   - Second item,
   - Third item,
   - Last item.

Thanks in advance.

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