[NTG-context] $\sin \theta$ behave differently in metafun

Jeong Dal haksan at me.com
Sat Apr 16 01:04:32 CEST 2022


Dear all,

I use $\sin \theta$ and $\cos \theta$ behave differently in text and in metafun.
It works well sometime before but it doesn’t  in metafun now.
What is wrong in my example?

Thank you for reading.
Best regards,

Dalyoung

Here is a MWE.

\startbuffer[pointCircle]
numeric u; u:=1cm;
pair A,B,C;
draw fullcircle scaled 4u;
A := dir(25)*2u; 
label.top(textext("$P=(\cos\theta, \sin\theta)$"), A);
B := dir(-25)*2u;
label.bot(textext("$Q=(\cos(-\theta), \sin(-\theta))$"), B);
C := (xpart A, 0); label.lrt(textext("$A$"), C);
label(textext("$O$"), origin);
\stopbuffer
\starttext
I'd like use $\sin$ and $\cos$ in the metafun. But it shows strange text instead of $\sin$ and $\cos$. 

\processMPbuffer[pointCircle]

\stoptext


> 2022. 4. 13. 오전 11:09, ntg-context-request at ntg.nl 작성:
> 
> Send ntg-context mailing list submissions to
> 	ntg-context at ntg.nl
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://mailman.ntg.nl/mailman/listinfo/ntg-context
> or, via email, send a message with subject or body 'help' to
> 	ntg-context-request at ntg.nl
> 
> You can reach the person managing the list at
> 	ntg-context-owner at ntg.nl
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ntg-context digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: Setting up zint on a mac with macOS Montery Version
>      12.3.1 (Keith McKay)
>   2. Re: fatal error in LMTX (Bruce Horrocks)
>   3. Re: Setting up zint on a mac with macOS Montery Version
>      12.3.1 (Bruce Horrocks)
>   4. Re: Proper formatting of itemized bullets in ConTeXt (śrīrāma)
>   5. Re: Proper formatting of itemized bullets in ConTeXt (śrīrāma)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Tue, 12 Apr 2022 21:04:50 +0100
> From: Keith McKay <mckaymeister at gmail.com>
> To: Bruce Horrocks <ntg at scorecrow.com>, mailing list for ConTeXt users
> 	<ntg-context at ntg.nl>, monty.luis at gmail.com
> Subject: Re: [NTG-context] Setting up zint on a mac with macOS Montery
> 	Version 12.3.1
> Message-ID: <475d96e6-0905-7d2d-a51d-84b06d340de9 at gmail.com>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
> 
> 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<ntg-context at ntg.nl>  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
>> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20220412/a5b05969/attachment-0001.htm>
> 
> ------------------------------
> 
> Message: 2
> Date: Tue, 12 Apr 2022 23:27:43 +0100
> From: Bruce Horrocks <ntg at scorecrow.com>
> To: mailing list for ConTeXt users <ntg-context at ntg.nl>
> Cc: Pablo Rodriguez <oinos at gmx.es>
> Subject: Re: [NTG-context] fatal error in LMTX
> Message-ID: <5414357E-8929-4A9A-A9FA-F85EF21043E8 at scorecrow.com>
> Content-Type: text/plain;	charset=utf-8
> 
> 
> 
>> On 12 Apr 2022, at 18:14, Pablo Rodriguez via ntg-context <ntg-context at ntg.nl> 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
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Tue, 12 Apr 2022 23:47:11 +0100
> From: Bruce Horrocks <ntg at scorecrow.com>
> To: Keith McKay <mckaymeister at gmail.com>
> Cc: mailing list for ConTeXt users <ntg-context at ntg.nl>,
> 	monty.luis at gmail.com
> Subject: Re: [NTG-context] Setting up zint on a mac with macOS Montery
> 	Version 12.3.1
> Message-ID: <26994114-7E84-4809-986C-70429F4C1A7A at scorecrow.com>
> Content-Type: text/plain;	charset=utf-8
> 
> 
> 
>> On 12 Apr 2022, at 21:04, Keith McKay <mckaymeister at gmail.com> 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:
> <https://unix.stackexchange.com/questions/71253/what-should-shouldnt-go-in-zshenv-zshrc-zlogin-zprofile-zlogout>
> 
>> 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
> 
> 
> 
> ------------------------------
> 
> Message: 4
> Date: Wed, 13 Apr 2022 07:37:58 +0530
> From: śrīrāma <citturs at gmail.com>
> To: mailing list for ConTeXt users <ntg-context at ntg.nl>, A A
> 	<amine.aboufirass at gmail.com>
> Subject: Re: [NTG-context] Proper formatting of itemized bullets in
> 	ConTeXt
> Message-ID: <11959935.O9o76ZdvQC at sreeramtplt>
> Content-Type: text/plain; charset="UTF-8"
> 
> 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
> 
> 
> 
> 
> ------------------------------
> 
> Message: 5
> Date: Wed, 13 Apr 2022 07:39:06 +0530
> From: śrīrāma <citturs at gmail.com>
> To: mailing list for ConTeXt users <ntg-context at ntg.nl>, A A
> 	<amine.aboufirass at gmail.com>
> Subject: Re: [NTG-context] Proper formatting of itemized bullets in
> 	ConTeXt
> Message-ID: <5813959.lOV4Wx5bFT at sreeramtplt>
> Content-Type: text/plain; charset="UTF-8"
> 
> 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
> 
> 
> 
> 
> ------------------------------
> 
> Subject: Digest Footer
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 
> 
> ------------------------------
> 
> End of ntg-context Digest, Vol 214, Issue 19
> ********************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20220416/5030cb28/attachment-0001.htm>


More information about the ntg-context mailing list