Re: [NTG-context] Text editors

2023-03-28 Thread Jan-Erik Hägglöf via ntg-context
HI!

I’ve been using emacs and played around with configuration and finally found a 
good and very useful setup using LMTX installation.

Also I’ve customized with help from YAsnippet my own snippets så it goes very 
fast.

Below I have a setup on my macos that uses

- ConTeXt LMTX
- emacs-lisp setting in ~/.emacs.d/init.el
- customized setting for preview with Skim pdf reader
- YASnippet snippets on my dropbox cloudstoring so I can use it on several 
computers and has a macro syntax easy to learn.
- Bind-keys for fast build and preview on two pane "side by side editor and 
previewer" in "TeXshop style”.
  C-å Build document and C-c C-v for fast preview in Skim

Something to start playing with below to put in your init.el file


;; This is for getting preferred position and size of the emacs editor frame
(add-to-list 'default-frame-alist '(top . 25))
(add-to-list 'default-frame-alist '(left . 1))
(add-to-list 'default-frame-alist '(height . 56))
(add-to-list 'default-frame-alist '(width . 120))

;; For solving path issues install:  do M-x package-install RET 
exec-path-from-shel RETl
(when (memq window-system '(mac ns x))
  (exec-path-from-shell-initialize))

;; For configuring context
(add-to-list 'auto-mode-alist '("\\.tex\\'" . context-mode))
(eval-after-load 'tex '(add-to-list 'TeX-command-list
'("LuaMetaTeX"
"mtxrun --autogenerate --script context %t" TeX-run-command nil
(context-mode) :help "Run LuaMetaTeX")))

(defun myctx ()
"Saves the current buffer and runs ConTeXt, all with no prompts or further 
interaction."
  (interactive)
  (save-buffer)
  (TeX-command "LuaMetaTeX" 'TeX-master-file -1))
 ;; (add-hook 'ConTeXt-mode-hook 'turn-on-smartparens-strict-mode)
(add-hook 'ConTeXt-mode-hook (lambda () (define-key ConTeXt-mode-map (kbd 
"C-å") 'myctx)))

(setq TeX-output-view-style '("^pdf$" "." "open -a Skim.app %o"))

(setq TeX-view-program-list
  '(("Skim" "open -a Skim.app %o")
))

(add-hook 'ConTeXt-mode-hook (lambda () (setq TeX-view-program-selection 
'((output-pdf "Skim")

;; YASnippet config

(use-package yasnippet
  :config
  (setq yas-snippet-dirs '("~/Dropbox/filer/system/emacsgrejer/snippets"))
  (yas-global-mode 1)
  (setq yas/triggers-in-field t))

Hope this helps and gives some inspiration to get started if you choose emacs

/Jan-Erik



> 26 mars 2023 kl. 10:22 skrev Alexandre Christe via ntg-context 
> :
> 
> Dear ConTeXt users,
> 
> I'm wondering what kind of typesetting system / syntax highlighting / 
> completion you're using.
> 
> I've been using myself the simple_Context package for SublimeText which I 
> scavenged a while ago before it was made unavailable (I wanted to attach but 
> it's too big for the list). But it's sort of a dead-end.
> 
> Open to anything from vim/neovim to emacs or more exotic. Maybe it would be 
> nice to show the config. (And yes I've seen the Wiki page 
> https://wiki.contextgarden.net/Text_Editors but I've the feeling some content 
> is outdated.)
> 
> Thanks in advance,
> Alex
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

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

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


Re: [NTG-context] Can ConTeXt display a simple itemized list as a comma-separated list?

2023-02-27 Thread Jan-Erik Hägglöf via ntg-context
I added the braces but still no difference, still empty between items


Jan-Erik Hägglöf
skrantajanne...@gmail.com

ConTeXt  ver: 2023.02.23 21:26 LMTX  fmt: 2023.2.27  int: english/english

> 27 feb. 2023 kl. 12:53 skrev mf via ntg-context :
> 
> \setupitemgroup
>[fooditems]
>[each]
>[none,text]
>[textseparator={,}]
> 
> Comma is used to separate options; if you don't use braces, it means that the 
> textseparator is set to the empty string.
> 
> Massi
> 
> Il 27/02/23 12:33, Jan-Erik Hägglöf via ntg-context ha scritto:
>> I tested the code and the separator didn’t show up
>> \mainlanguage[sv]
>> \setupbodyfont[12pt]
>> \defineitemgroup
>>   [fooditems]
>> \setupitemgroup
>>   [fooditems]
>>   [each]
>>   [none,text]
>>   [textseparator=,]
>> \starttext
>> \startfooditems
>> \item fish
>> \item eggs
>> \item milk
>> \stopfooditems
>> \stoptext
>>> 26 feb. 2023 kl. 11:55 skrev Hans Hagen via ntg-context >> <mailto:ntg-context@ntg.nl> <mailto:ntg-context@ntg.nl 
>>> <mailto:ntg-context@ntg.nl>>>:
>>> 
>>> On 2/25/2023 5:01 PM, Joel via ntg-context wrote:
>>>> I have a list like this:
>>>> \startitemize[1]
>>>> \item fish
>>>> \item eggs
>>>> \item milk
>>>> \stopitemize
>>>> Is there any command in ConTeXt to make this display the items as a 
>>>> comma-separated list, like this:
>>>> fish, eggs, milk
>>>> Or a semi-colon-separated list?
>>>> fish; eggs; milk
>>> In the next update you can set a textseparator.
>>> 
>>> \starttext
>>> 
>>> \startitemize[none,text][textseparator=;]
>>>\item fish
>>>\item eggs
>>>\item milk
>>> \stopitemize
>>> 
>>> \defineitemgroup
>>>  [fooditems]
>>> 
>>> \setupitemgroup
>>>  [fooditems]
>>>  [each]
>>>  [none,text]
>>>  [textseparator=;]
>>> 
>>> \blank[2*line]
>>> 
>>> \startfooditems
>>>\item fish
>>>\item eggs
>>>\item milk
>>> \stopfooditems
>>> 
>>> \stoptext
>>> 
>>> -
>>>  Hans Hagen | PRAGMA ADE
>>>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>>   tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> 
>>> <http://www.pragma-ade.nl <http://www.pragma-ade.nl/>> | www.pragma-pod.nl 
>>> <http://www.pragma-pod.nl/><http://www.pragma-pod.nl 
>>> <http://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 <mailto:ntg-context@ntg.nl> 
>>> <mailto:ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>> / 
>>> https://www.ntg.nl/mailman/listinfo/ntg-context 
>>> <https://www.ntg.nl/mailman/listinfo/ntg-context><https://www.ntg.nl/mailman/listinfo/ntg-context
>>>  <https://www.ntg.nl/mailman/listinfo/ntg-context>>
>>> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> 
>>> <https://www.pragma-ade.nl <https://www.pragma-ade.nl/>> / 
>>> http://context.aanhet.net 
>>> <http://context.aanhet.net/><http://context.aanhet.net 
>>> <http://context.aanhet.net/>>
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>>> <https://bitbucket.org/phg/context-mirror/commits/> 
>>> <https://bitbucket.org/phg/context-mirror/commits/ 
>>> <https://bitbucket.org/phg/context-mirror/commits/>>
>>> wiki : https://contextgarden.net <https://contextgarden.net/> 
>>> <https://contextgarden.net <https://contextgarden.net/>>
>>> ___
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
>> https://www.ntg.nl/mailman/listinfo/ntg-conte

Re: [NTG-context] Can ConTeXt display a simple itemized list as a comma-separated list?

2023-02-27 Thread Jan-Erik Hägglöf via ntg-context
I tested the code and the separator didn’t show up\mainlanguage[sv]\setupbodyfont[12pt]\defineitemgroup  [fooditems]\setupitemgroup  [fooditems]  [each]  [none,text]  [textseparator=,]\starttext\startfooditems    \item fish    \item eggs    \item milk\stopfooditems\stoptext

test.log
Description: Binary data


test.pdf
Description: Adobe PDF document


test.tex
Description: Binary data
26 feb. 2023 kl. 11:55 skrev Hans Hagen via ntg-context :On 2/25/2023 5:01 PM, Joel via ntg-context wrote:I have a list like this:\startitemize[1]\item fish\item eggs\item milk\stopitemizeIs there any command in ConTeXt to make this display the items as a comma-separated list, like this:fish, eggs, milkOr a semi-colon-separated list?fish; eggs; milkIn the next update you can set a textseparator.\starttext\startitemize[none,text][textseparator=;]    \item fish    \item eggs    \item milk\stopitemize\defineitemgroup  [fooditems]\setupitemgroup  [fooditems]  [each]  [none,text]  [textseparator=;]\blank[2*line]\startfooditems    \item fish    \item eggs    \item milk\stopfooditems\stoptext-  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 / https://www.ntg.nl/mailman/listinfo/ntg-contextwebpage  : https://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/wiki : https://contextgarden.net__
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Curriculum example not working anymore (repost)

2023-02-24 Thread Jan-Erik Hägglöf via ntg-context
Dear List!

I’ve managed to solve the issue with some modification, though it seems not 
possible to handle it within a frame. See example below

Original settings in m-resume.tex

\define[5]\EDUITEM{\framed[frame=off,align=right,width=broad] % The reason 
seems to be the frame command
 {{\bf #1}\inmargin{\it #2}\ (#3).\crlf
 {\bf #4}, #5.\blank[small]}}

doesn’t work as expected.

My modification

\define[5]\EDUITEM{ \inleft{\bf #1} 
 {{\it #2}\ (#3).\crlf
 {\bf #4}, #5.\blank[small]}}

Then it seems to work as expected. 


> 23 feb. 2023 kl. 08:53 skrev Jan-Erik Hägglöf :
> 
> Dear List!
> 
> I discovered a flaw when I updated my personal cv built with inspiration from 
> the wiki example
> 
> https://wiki.contextgarden.net/Curriculum_Vitae
> 
> The margin text dissappear so it needs to be updated and modified in some way.
> 
> I’m sending the output and files from wiki example
> 
> My apologize for multiple posts in same issue due to size limit problems.
> 
> Thanks in advance
> 
> Jan-Erik
> 
> 
> 
> 
> 
> 
> 

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

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


[NTG-context] Curriculum example not working anymore (repost)

2023-02-22 Thread Jan-Erik Hägglöf via ntg-context
Dear List!I discovered a flaw when I updated my personal cv built with inspiration from the wiki examplehttps://wiki.contextgarden.net/Curriculum_VitaeThe margin text dissappear so it needs to be updated and modified in some way.I’m sending the output and files from wiki exampleMy apologize for multiple posts in same issue due to size limit problems.Thanks in advanceJan-Erik

cv.log
Description: Binary data


cv.pdf
Description: Adobe PDF document


cv.tex
Description: Binary data


m-resume.tex
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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Curriculum example on wiki not working anymore

2023-02-22 Thread Jan-Erik Hägglöf via ntg-context
Dear List!

I discovered a flaw when I updated my personal cv built with inspiration from 
the wiki example

https://wiki.contextgarden.net/Curriculum_Vitae 


The margin text dissappear so it needs to be updated and modified in some way.

Thanks in advance

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

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


Re: [NTG-context] Math alignment problem

2022-09-22 Thread Jan-Erik Hägglöf via ntg-context
That was the solution, it worked!

Thank you so much!

/Jan-Erik

> 22 sep. 2022 kl. 14:54 skrev Alexandre Christe via ntg-context 
> :
> 
> Hi Jan-Erik,
> 
> One way I came across searching the mailing list is the following:
> 
> \starttext
> 
> \startitemize [a,columns,joinedup] [n=3,grid=line]
> \item $ 56 + 2 \cdot 3 $
> \item $ 5-(7) $
> \item $ \frac{21}{7} $
> \stopitemize
> 
> \stoptext
> 
> Could be that there is a better way.
> 
> Le jeu. 22 sept. 2022 à 12:57, Jan-Erik Hägglöf via ntg-context 
> mailto:ntg-context@ntg.nl>> a écrit :
> Dear List!
> 
> I do not know how to solve this issue.
> 
> I want the formulas appear on same height, as you can se on the attachment 
> the formula containing a fraction displaces on another vertical position 
> compared to the other equations.
> 
> How do I correct this?
> 
> Code snippet pasted from garden
> 
> \starttext
> 
> \startitemize[a,columns,three]
> \item $ 56 + 2 \cdot 3 $
> \item $ 5-(7) $
> \item $ \frac{21}{7} $
> \stopitemize
> 
> \stoptext
> 
> 
> Thanks in advance
> 
> Jan-Erik
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
> https://www.ntg.nl/mailman/listinfo/ntg-context 
> <https://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / 
> http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> <https://bitbucket.org/phg/context-mirror/commits/>
> wiki : https://contextgarden.net <https://contextgarden.net/>
> ___
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
> https://www.ntg.nl/mailman/listinfo/ntg-context 
> <https://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / 
> http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> <https://bitbucket.org/phg/context-mirror/commits/>
> wiki : https://contextgarden.net <https://contextgarden.net/>
> ___

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

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


[NTG-context] Math alignment problem

2022-09-22 Thread Jan-Erik Hägglöf via ntg-context
Dear List!I do not know how to solve this issue.I want the formulas appear on same height, as you can se on the attachment the formula containing a fraction displaces on another vertical position compared to the other equations.How do I correct this?Code snippet pasted from garden\starttext\startitemize[a,columns,three]\item $ 56 + 2 \cdot 3 $\item $ 5-(7) $\item $ \frac{21}{7} $\stopitemize\stoptextThanks in advanceJan-Erik

result.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Custom engine settings in AUCTEX

2022-07-02 Thread Jan-Erik Hägglöf via ntg-context
It seems to use the old texexec with your configuration example

Running `ConTeXt Full' on `rutor' with ``texexec  --engine=luametatex 
--interface=en --nonstop rutor.tex''
/bin/sh: texexec: command not found

TeX Output exited abnormally with code 127 at Sat Jul  2 09:50:33

> 1 juli 2022 kl. 15:50 skrev Mauricio Reyna via ntg-context 
> :
> 
> This is my emacs setup for AUCTEX with ConTeXt.
>  
> ;; Install straight.el
> (defvar bootstrap-version)
> (let ((bootstrap-file
>(expand-file-name "straight/repos/straight.el/bootstrap.el" 
> user-emacs-directory))
>   (bootstrap-version 5))
>   (unless (file-exists-p bootstrap-file)
> (with-current-buffer
> (url-retrieve-synchronously
>  
> "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el 
> "
>  'silent 'inhibit-cookies)
>   (goto-char (point-max))
>   (eval-print-last-sexp)))
>   (load bootstrap-file nil 'nomessage))
>  
>  
>  
> ;; Install use-package
> (straight-use-package 'use-package)
>  
>  
> ;; Configure use-package to use straight.el by default
> (use-package straight
>  :custom (straight-use-package-by-default t))
>  
>  
>  
>  
> (use-package yasnippet)
>  
> ;;; Auctex
>  
>  
> (defun my-context-setup ()
>   (custom-set-variables
>'(ConTeXt-Mark-version "LMTX")
>'(ConTeXt-engine "lutametatex")))
>  
> 
>  
> (straight-use-package 'auctex)
>  
>  
> (add-hook 'ConTeXt-mode-hook
>   (lambda ()
> (reftex-mode 1)
> (flyspell-mode 1)
> (auto-fill-mode 1)
> ;(relative-line-numbers-mode 1)
> ;(abbrev-mode 1)
> (my-context-setup)
> (yas-minor-mode)
> (yas-reload-all)))
>  
>  
> I hope this help you
>  
> Mauricio
> ___
> 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] Custom engine settings in AUCTEX

2022-06-14 Thread Jan-Erik Hägglöf via ntg-context
HI!

I’ve been trying out Doom-Emacs and when I open a ConTeXt file i want the 
engine point to my LMTX installation.

/Users/jan-erikhagglof/context/context-osx-64/tex/texmf-osx-64/bin/ is the path 
to my install on my Macos Monterey.

How can this been customized?

Its a bit confusing reading the AUCTEX manual so maybe someone has a working 
config already?

Thanks in advance

Jan-Erik
___
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-05-30 Thread Jan-Erik Hägglöf via ntg-context
Hi!

I have issues to get this to work

With latest LMTX installed on my Monterey intel MacBook Air and Zint version 
2.11

This appears in my log entry

…
optional> using library 
'/Users/janneman/CTX/tex/texmf-osx-64/bin/lib/luametatex/zint/libzint.so'
zint> something went wrong: invalid result vector
zint> something went wrong: invalid result vector
zint> something went wrong: invalid result vector
…




> 13 apr. 2022 kl. 00:47 skrev 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
> ___

___
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 with interactive checkboxes[solved]

2022-05-24 Thread Jan-Erik Hägglöf via ntg-context
I’ve tested on my Mac OS Monterey 12.3.1 and the same phenomena as firefox it 
also is on google chrome.



> 24 maj 2022 kl. 10:18 skrev Jan-Erik Hägglöf :
> 
> HI Again!
> 
> I discovered what went wrong, such a silly syntax error, here comes a working 
> code:
> 
> \setupinteraction[state=start]
> 
> \definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
> \definesymbol[no][]
> 
> \newcount\chk
> \def\checkmark{%
> \global\advance\chk by 1
> \setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, 
> corner=round, framecolor=red]%
> \definefield[checkme\the\chk][check][setup1][yes,no][no]%
> \field[checkme\the\chk]%
> }
> 
> \starttext
> 
> \checkmark\
> 
> \checkmark\
> 
> \checkmark\
> 
> \stoptext
> 
> Sorry to bother the list but maybe it is helpful for someone.
> 
> Regards
> 
> /Jan-Erik
> 
>> 24 maj 2022 kl. 08:08 skrev Jan-Erik Hägglöf > <mailto:skrantajanne...@gmail.com>>:
>> 
>> I’ve tried this
>> 
>> \setupinteraction[state=start]
>> 
>> \definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
>> \definesymbol[no][]
>> 
>> \newcount\chk
>> \def\chk{%
>> \global \advance \chk by 1
>> \setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, 
>> corner=round, framecolor=red]%
>> \definefield[checkme\the\chk][check][setup1][yes,no][no]%
>> \field[checkme\the\chk]%
>> }
>> 
>> \starttext
>> 
>> \chk
>> 
>> \chk
>> 
>> \chk
>> 
>> \stoptext
>> 
>> But it gives the error ” You can’t use \global after \advance”
>> 
>> But this example works fine
>> 
>> \setupinteraction[state=start]
>> 
>> \newcount\clozecount
>> \def\mycloze{%
>>   \global \advance \clozecount by 1
>>   \definefield[uniqcloze\the\clozecount][line]%
>>   \field[uniqcloze\the\clozecount]%
>> }
>> 
>> \starttext
>> 
>> Frogs have four \mycloze\ and two eyes.
>> Frogs have four \mycloze\ and two eyes.
>> Frogs have four \mycloze\ and two eyes.
>> Frogs have four \mycloze\ and two eyes.
>> 
>> \stoptext
>> 
>> From 
>> 
>> https://tex.stackexchange.com/questions/560042/how-to-create-unique-clozes-in-context-in-a-pdf-that-users-can-type-in
>>  
>> <https://tex.stackexchange.com/questions/560042/how-to-create-unique-clozes-in-context-in-a-pdf-that-users-can-type-in>
>> 
>>> 24 maj 2022 kl. 07:44 skrev Jan-Erik Hägglöf >> <mailto:skrantajanne...@gmail.com>>:
>>> 
>>> Thank you, unfortunately it has no effect. Even if I make a macro, still it 
>>> is the same field.
>>> 
>>>> 23 maj 2022 kl. 21:59 skrev Pablo Rodriguez via ntg-context 
>>>> mailto:ntg-context@ntg.nl>>:
>>>> 
>>>> On 5/23/22 13:11, Jan-Erik Hägglöf via ntg-context wrote:
>>>>> HI!
>>>>> 
>>>>> Tried to make a checklist in an interactive document.
>>>>> 
>>>>> The problem seems to be that all checks/uncecks in same click, not each
>>>>> individually.
>>>>> 
>>>>> Is there something wrong with my code?
>>>> 
>>>> Hi Jan-Erik,
>>>> 
>>>> you basically put the same field twice.
>>>> 
>>>> Add something like:
>>>> 
>>>> \definefield [check-you] [check] [setup 3] [yes,no] [no]
>>>> 
>>>> \define\chka{\field[check-you]}
>>>> 
>>>> \chka
>>>> 
>>>> Checks will be different then.
>>>> 
>>>> I hope it helps,
>>>> 
>>>> Pablo
>>>> ___
>>>> If your question is of interest to others as well, please add an entry to 
>>>> the Wiki!
>>>> 
>>>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
>>>> http://www.ntg.nl/mailman/listinfo/ntg-context 
>>>> <http://www.ntg.nl/mailman/listinfo/ntg-context>
>>>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
>>>> http://context.aanhet.net <http://context.aanhet.net/>
>>>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>>>> <https://bitbucket.org/phg/context-mirror/commits/>
>>>> wiki : http://contextgarden.net <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] Issue with interactive checkboxes[solved]

2022-05-24 Thread Jan-Erik Hägglöf via ntg-context
HI Again!

I discovered what went wrong, such a silly syntax error, here comes a working 
code:

\setupinteraction[state=start]

\definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
\definesymbol[no][]

\newcount\chk
\def\checkmark{%
\global\advance\chk by 1
\setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, corner=round, 
framecolor=red]%
\definefield[checkme\the\chk][check][setup1][yes,no][no]%
\field[checkme\the\chk]%
}

\starttext

\checkmark\

\checkmark\

\checkmark\

\stoptext

Sorry to bother the list but maybe it is helpful for someone.

Regards

/Jan-Erik

> 24 maj 2022 kl. 08:08 skrev Jan-Erik Hägglöf :
> 
> I’ve tried this
> 
> \setupinteraction[state=start]
> 
> \definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
> \definesymbol[no][]
> 
> \newcount\chk
> \def\chk{%
> \global \advance \chk by 1
> \setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, 
> corner=round, framecolor=red]%
> \definefield[checkme\the\chk][check][setup1][yes,no][no]%
> \field[checkme\the\chk]%
> }
> 
> \starttext
> 
> \chk
> 
> \chk
> 
> \chk
> 
> \stoptext
> 
> But it gives the error ” You can’t use \global after \advance”
> 
> But this example works fine
> 
> \setupinteraction[state=start]
> 
> \newcount\clozecount
> \def\mycloze{%
>   \global \advance \clozecount by 1
>   \definefield[uniqcloze\the\clozecount][line]%
>   \field[uniqcloze\the\clozecount]%
> }
> 
> \starttext
> 
> Frogs have four \mycloze\ and two eyes.
> Frogs have four \mycloze\ and two eyes.
> Frogs have four \mycloze\ and two eyes.
> Frogs have four \mycloze\ and two eyes.
> 
> \stoptext
> 
> From 
> 
> https://tex.stackexchange.com/questions/560042/how-to-create-unique-clozes-in-context-in-a-pdf-that-users-can-type-in
>  
> <https://tex.stackexchange.com/questions/560042/how-to-create-unique-clozes-in-context-in-a-pdf-that-users-can-type-in>
> 
>> 24 maj 2022 kl. 07:44 skrev Jan-Erik Hägglöf > <mailto:skrantajanne...@gmail.com>>:
>> 
>> Thank you, unfortunately it has no effect. Even if I make a macro, still it 
>> is the same field.
>> 
>>> 23 maj 2022 kl. 21:59 skrev Pablo Rodriguez via ntg-context 
>>> mailto:ntg-context@ntg.nl>>:
>>> 
>>> On 5/23/22 13:11, Jan-Erik Hägglöf via ntg-context wrote:
>>>> HI!
>>>> 
>>>> Tried to make a checklist in an interactive document.
>>>> 
>>>> The problem seems to be that all checks/uncecks in same click, not each
>>>> individually.
>>>> 
>>>> Is there something wrong with my code?
>>> 
>>> Hi Jan-Erik,
>>> 
>>> you basically put the same field twice.
>>> 
>>> Add something like:
>>> 
>>> \definefield [check-you] [check] [setup 3] [yes,no] [no]
>>> 
>>> \define\chka{\field[check-you]}
>>> 
>>> \chka
>>> 
>>> Checks will be different then.
>>> 
>>> I hope it helps,
>>> 
>>> Pablo
>>> ___
>>> If your question is of interest to others as well, please add an entry to 
>>> the Wiki!
>>> 
>>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
>>> http://www.ntg.nl/mailman/listinfo/ntg-context 
>>> <http://www.ntg.nl/mailman/listinfo/ntg-context>
>>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
>>> http://context.aanhet.net <http://context.aanhet.net/>
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>>> <https://bitbucket.org/phg/context-mirror/commits/>
>>> wiki : http://contextgarden.net <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] Issue with interactive checkboxes

2022-05-24 Thread Jan-Erik Hägglöf via ntg-context
I’ve tried this

\setupinteraction[state=start]

\definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
\definesymbol[no][]

\newcount\chk
\def\chk{%
\global \advance \chk by 1
\setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, corner=round, 
framecolor=red]%
\definefield[checkme\the\chk][check][setup1][yes,no][no]%
\field[checkme\the\chk]%
}

\starttext

\chk

\chk

\chk

\stoptext

But it gives the error ” You can’t use \global after \advance”

But this example works fine

\setupinteraction[state=start]

\newcount\clozecount
\def\mycloze{%
  \global \advance \clozecount by 1
  \definefield[uniqcloze\the\clozecount][line]%
  \field[uniqcloze\the\clozecount]%
}

\starttext

Frogs have four \mycloze\ and two eyes.
Frogs have four \mycloze\ and two eyes.
Frogs have four \mycloze\ and two eyes.
Frogs have four \mycloze\ and two eyes.

\stoptext

From 

https://tex.stackexchange.com/questions/560042/how-to-create-unique-clozes-in-context-in-a-pdf-that-users-can-type-in

> 24 maj 2022 kl. 07:44 skrev Jan-Erik Hägglöf :
> 
> Thank you, unfortunately it has no effect. Even if I make a macro, still it 
> is the same field.
> 
>> 23 maj 2022 kl. 21:59 skrev Pablo Rodriguez via ntg-context 
>> :
>> 
>> On 5/23/22 13:11, Jan-Erik Hägglöf via ntg-context wrote:
>>> HI!
>>> 
>>> Tried to make a checklist in an interactive document.
>>> 
>>> The problem seems to be that all checks/uncecks in same click, not each
>>> individually.
>>> 
>>> Is there something wrong with my code?
>> 
>> Hi Jan-Erik,
>> 
>> you basically put the same field twice.
>> 
>> Add something like:
>> 
>> \definefield [check-you] [check] [setup 3] [yes,no] [no]
>> 
>> \define\chka{\field[check-you]}
>> 
>> \chka
>> 
>> Checks will be different then.
>> 
>> I hope it helps,
>> 
>> Pablo
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl / 
>> 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] Issue with interactive checkboxes

2022-05-23 Thread Jan-Erik Hägglöf via ntg-context
Thank you, unfortunately it has no effect. Even if I make a macro, still it is 
the same field.

> 23 maj 2022 kl. 21:59 skrev Pablo Rodriguez via ntg-context 
> :
> 
> On 5/23/22 13:11, Jan-Erik Hägglöf via ntg-context wrote:
>> HI!
>> 
>> Tried to make a checklist in an interactive document.
>> 
>> The problem seems to be that all checks/uncecks in same click, not each
>> individually.
>> 
>> Is there something wrong with my code?
> 
> Hi Jan-Erik,
> 
> you basically put the same field twice.
> 
> Add something like:
> 
>  \definefield [check-you] [check] [setup 3] [yes,no] [no]
> 
>  \define\chka{\field[check-you]}
> 
>  \chka
> 
> Checks will be different then.
> 
> I hope it helps,
> 
> Pablo
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 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] Issue with interactive checkboxes

2022-05-23 Thread Jan-Erik Hägglöf via ntg-context
HI!Tried to make a checklist in an interactive document.The problem seems to be that all checks/uncecks in same click, not each individually.Is there something wrong with my code?See attached below\setupinteraction[state=start]\setupexternalfigures[location=global]\usemodule[fields]\definesymbol [yes] [{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]\definesymbol [no] []\setupfield[setup 3][width=0.5cm, height=0.5cm,rulethickness=1pt, corner=round, framecolor=red]\definefield [check-me] [check] [setup 3] [yes,no] [no]\define\chk{\field[check-me]}\starttext\chk\blank[3cm]\chk\stoptext

exempel1.pdf
Description: Adobe PDF document
___
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] Interactive checkbox in ConTeXt

2022-05-22 Thread Jan-Erik Hägglöf via ntg-context
So far I accomplished this but problem is that when I check it checks all, not 
individually.

\setupinteraction[state=start]
\setupexternalfigures[location=global]

\definesymbol [yes] 
[{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
\definesymbol [no] []


\setupfield
[setup 3]
[width=0.5cm, height=0.5cm,
rulethickness=1pt, corner=round, framecolor=red]


\definefield [check-me] [check] [setup 3] [yes,no] [no]

\define\chk{\field[check-me]}

\starttext

\chkgfgkfgfghjl

\chkdfdffdfff



\stoptext

> 22 maj 2022 kl. 10:47 skrev Jan-Erik Hägglöf :
> 
> Thank you for the useful tip.
> 
> I’ve tested the example given below but ran into missing figure, maybe I need 
> to reconstruct the MetaPost file as mentioned in setup. Se attached example:
> 
> Thanks in advance!
> 
> /Jan-Erik
> 
> \setupinteraction[state=start]
> \setupexternalfigures[location=global]
> 
> \definesymbol [yes] [{\externalfigure[mp-cont.502]}]
> \definesymbol [no] []
> 
> 
> \setupfield
> [setup 3]
> [width=2cm, height=2cm,
> rulethickness=3pt, corner=round, framecolor=red]
> 
> \definefield [check-me] [check] [setup 3] [yes,no] [no]
> 
> \starttext
> \field[check-me]
> \stoptext
> 
>> 20 maj 2022 kl. 12:28 skrev Henning Hraban Ramm via ntg-context 
>> :
>> 
>> Am 20.05.22 um 12:01 schrieb Jan-Erik Hägglöf via ntg-context:
>>> How do I accomplish a similar funktion like this, that is written in latex, 
>>> but in context instead?
>>> LATEXCODE
>>> |\documentclass{article} \usepackage{hyperref} \begin{document} 
>>> \begin{Form} \CheckBox[name=mycheckbox,checkboxsymbol=\ding{53}]{This is a 
>>> check box:} \end{Form} \end{document}|
>> 
>> Have a look at https://wiki.contextgarden.net/Widgets and the "mwidget" 
>> manual.
>> 
>> Custom symbols work unreliably, depending of the viewer.
>> 
>> Hraban
>> ___
>> 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] Interactive checkbox in ConTeXt

2022-05-22 Thread Jan-Erik Hägglöf via ntg-context
Thank you for the useful tip.

I’ve tested the example given below but ran into missing figure, maybe I need 
to reconstruct the MetaPost file as mentioned in setup. Se attached example:

Thanks in advance!

/Jan-Erik

\setupinteraction[state=start]
\setupexternalfigures[location=global]

\definesymbol [yes] [{\externalfigure[mp-cont.502]}]
\definesymbol [no] []


\setupfield
[setup 3]
[width=2cm, height=2cm,
rulethickness=3pt, corner=round, framecolor=red]

\definefield [check-me] [check] [setup 3] [yes,no] [no]

\starttext
\field[check-me]
\stoptext

> 20 maj 2022 kl. 12:28 skrev Henning Hraban Ramm via ntg-context 
> :
> 
> Am 20.05.22 um 12:01 schrieb Jan-Erik Hägglöf via ntg-context:
>> How do I accomplish a similar funktion like this, that is written in latex, 
>> but in context instead?
>> LATEXCODE
>> |\documentclass{article} \usepackage{hyperref} \begin{document} \begin{Form} 
>> \CheckBox[name=mycheckbox,checkboxsymbol=\ding{53}]{This is a check box:} 
>> \end{Form} \end{document}|
> 
> Have a look at https://wiki.contextgarden.net/Widgets and the "mwidget" 
> manual.
> 
> Custom symbols work unreliably, depending of the viewer.
> 
> Hraban
> ___
> 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] Metapost examples seems broken

2022-05-22 Thread Jan-Erik Hägglöf via ntg-context
HI!

I have issues to access the very most useful place to get inspiration to write 
MetaFun code.

Google Chrome reports security issues

Maybe this could be off topic in this forum, if so, My apologize in advance. 
But maybe someone knows the author of this site

https://tex.loria.fr/prod-graph/zoonekynd/metapost/metapost.html 




/Jan-Erik___
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] Interactive checkbox in ConTeXt

2022-05-20 Thread Jan-Erik Hägglöf via ntg-context
HI!

How do I accomplish a similar funktion like this, that is written in latex, but 
in context instead?

LATEXCODE

\documentclass{article}

\usepackage{hyperref}

\begin{document}
  \begin{Form}
\CheckBox[name=mycheckbox,checkboxsymbol=\ding{53}]{This is a check box:}
  \end{Form}
\end{document}

Thanks in advance

Jan-Erik


___
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] mathcal generates error in ConTeXt

2022-03-26 Thread Jan-Erik Hägglöf via ntg-context
HI!

It generates no \starttext \stoptext tag

It works with this though

\starttext

$\mathcal{A}$

\stoptext

But with the -s option you get a standalone version of the document

pandoc -s -f latex -t context -o test_context.tex test.tex

/Janne

> 26 mars 2022 kl. 06:39 skrev A A via ntg-context :
> 
> Dear All,
> 
> I am using pandoc to covert a file called test.tex from LaTeX to ConTeXt.  
> Here are the contents of test.tex:
> 
> \documentclass{article}
> \begin{document}
> \mathcal{A}
> \end{document}
> 
> The file compiles OK with the following command and I see a resulting pdf:
> 
> latexmk -pdflatex test.tex
> 
> Then I try to convert with pandoc:
> 
> pandoc -f latex -t context -o test_context.tex test.tex
> 
> Pandoc appears to successfully generate a file test_context.tex containing 
> the following:
> 
> \mathcal{A}
> 
> Then I try to compile the test_context.tex file:
> 
> context test_context.tex
> 
> Which unfortunately results in an error:
> 
> resolvers   | formats | executing runner 'run luametatex format': 
> C:/context/tex/texmf-win64/bin/luametatex --jobname="./test_context.tex" 
> --fmt=C:/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
>  
> --lua=C:/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
>   --c:currentrun=1 --c:fulljobname="./test_context.tex" 
> --c:input="./test_context.tex" --c:kindofrun=1 --c:maxnofruns=9 
> --c:texmfbinpath="C:/context/tex/texmf-win64/bin"
> 
> system  > callbacks > not registering frozen 'local_box_filter'
> system  >
> system  > ConTeXt  ver: 2021.11.02 10:03 LMTX  fmt: 2021.11.4  int: 
> english/english
> system  >
> system  > 'cont-new.mkxl' loaded
> open source > level 1, order 1, name 
> 'C:/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
> system  > beware: some patches loaded from cont-new.mkiv
> close source> level 1, order 1, name 
> 'C:/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
> system  > files > jobname './test_context', input 
> './test_context.tex', result './test_context'
> fonts   > latin modern fonts are not preloaded
> languages   > language 'en' is active
> open source > level 1, order 2, name './test_context.tex'
> tex error   > tex error on line 1 in file ./test_context.tex: \textfont0 
> is undefined in (text) char, font id 0, character 63)
> 
> 
> $\mathcal{A}$
> 
> 1 >>  $\mathcal{A}$
> 2
> Somewhere in the math formula just ended, you used the stated character from 
> an
> undefined font family. For example, plain TeX doesn't allow \it or \sl in
> subscripts. Proceed, and I'll try to forget that I needed that character.
> mtx-context | fatal error: return code: 1
> 
> Why does ConTeXt not accept mathcal? Why does pandoc not account for this? 
> How can I remedy this with a reasonable amount of effort?
> 
> Regards,
> 
> 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
> ___

___
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] No svg file output

2022-03-05 Thread Jan-Erik Hägglöf via ntg-context
It worked, thank you very much.

/Jan-Erik

> 4 mars 2022 kl. 10:59 skrev Hans Hagen :
> 
> On 3/3/2022 10:54 PM, Jan-Erik Hägglöf via ntg-context wrote:
>> Dear list!
>> This seems strange, what is wrong? No output from svg-file.
>> \starttext
>> \startMPcode
>> picture utf1; utf1:= lmt_svg [ filename = "utfall01b.svg"];
>> numeric l ; l := bbwidth(utf1);
>> numeric h ; h := bbheight(utf1);
>> numeric scale ; scale := 3 ;
>> draw utf1 xsized l*scale ysized h*scale;
>> \stopMPcode
>> \stoptext
> 
> 
> \starttext
> \startMPcode
> picture ValidName; ValidName:= lmt_svg [ filename = "utfall01b.svg"];
> numeric l ; l := bbwidth(ValidName);
> numeric h ; h := bbheight(ValidName);
> numeric scale ; scale := 3 ;
> draw ValidName xysized (l*scale,h*scale);
> \stopMPcode
> \stoptext
> 
> -
>  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
___


[NTG-context] No svg file output

2022-03-03 Thread Jan-Erik Hägglöf via ntg-context
Dear list!This seems strange, what is wrong? No output from svg-file.

test.log
Description: Binary data


test.pdf
Description: Adobe PDF document
\starttext\startMPcodepicture utf1; utf1:= lmt_svg [ filename = "utfall01b.svg"];numeric l ; l := bbwidth(utf1);numeric h ; h := bbheight(utf1);numeric scale ; scale := 3 ;draw utf1 xsized l*scale ysized h*scale;\stopMPcode\stoptextThanks in advanceJan-Erik___
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] Resetcounter in custom enumeration environment

2022-01-04 Thread Jan-Erik Hägglöf via ntg-context
Many thanks, that was very structured and helpful.

/Jan-Erik

> 3 jan. 2022 kl. 12:07 skrev kauśika :
> 
> On Monday, January 3, 2022 4:34:50 PM IST kauśika wrote:
>> If 'Exercises' and 'Answers to exercises' are some head structure (assuming
>> unnumbered since they are so in your example):
>> \definehead[exercises][subject]
>> \definehead[answers][subject]
>> then you can simply do
>> \setupenumeration[uppgift]
>> [alternative=left,
>> width=1cm,
>> text=,
>> after={\blank[2*big]},
>> way=bysubject]
>> and ConTeXt will automatically restart the number at every new subject
>> block.
> 
> In this case you would have something like :
> 
> \startexercise[title={Exercises}]
>\startuppgift
>  first exercise
>\stopuppgift
> 
>\startuppgift
>  second exercise
>\stopuppgift
> \stopexercise
> 
> \startanswers
>\startuppgift
>  answer to first exercise
>\stopuppgift
> 
>\startuppgift
>  answer to second exercise
>\stopuppgift
> \stopanswers
> 
> kauśika
> 
> 

___
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] Resetcounter in custom enumeration environment

2022-01-03 Thread Jan-Erik Hägglöf via ntg-context
Hi!

I’ve been doing this in my exams to define exercises in a structural way.

\defineenumeration[uppgift]
\setupenumerations[uppgift][alternative=left,width=1cm,text= 
,after={\blank[2*big]}]

\starttext

\startuppgift

Here comes the exercise

\stopuppgift

\stoptext

I want a simple solution to reset the counter so it achieves the following 
result:

Exercises

1 First exercise

2 Second exercise

Answers to exercises

1 Answers to first exercise

2 Answers to second exercise

I hope that is clear enough to describe what I want to achieve

Many thanks in advance

Yours Sincerely

Jan-Erik
___
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] how to setup path of ConTeXtLMTX for MacVim?

2021-12-14 Thread Jan-Erik Hägglöf via ntg-context
Check if your *.tex file is recognized as a context file and not a plaintex 
file. 

I’ve struggelled a lot with macvim before I got what I want.

I recommend following places learning everything in vim and many nice plugins 
that helps a lot.

If you want I can provide my .vimrc as an inspiration and starting point. Se 
below.

https://wiki.contextgarden.net/Vim 

https://vim.fandom.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_1) 


https://devhints.io/vim  a cheatsheet


In the MacVim application it took some time to figure out why my *.tex files 
never recognizes as context files and the hardcoded solution was to comment out 
the following in

/Applications/MacVim.app/Contents/Resources/vim/runtime/filetype.vim

" TeX
"au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl  setf tex
"au BufNewFile,BufRead *.texcall dist#ft#FTtex()

and instead adding

" ConTeXt
au BufNewFile,BufRead *.tex,*.ctx,*.mkii,*.mkiv,*.mkvi,*.mkxl,*.mklx   setf 
context

It works for Me who only using context as a typesetting engine.

Normally you do not need to do this but it seems that my own filetype.vim on 
upstart never reads.

Here is my .vimrc if you find it useful, enjoy. 

set lines=68
set columns=140
set guifont=Monaco:h16

" Install vim-plug
if empty(glob('~/.vim/autoload/plug.vim'))
  silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  "autocmd VimEnter * PlugInstall
  "autocmd VimEnter * PlugInstall | source $MYVIMRC
endif

call plug#begin()
" Better Syntax Support
Plug 'sheerun/vim-polyglot'
" File Explorer
Plug 'scrooloose/NERDTree'
" Auto pairs for '(' '[' '{'"call plug#begin('~/.config/nvim/autoload/plugged')
Plug 'jiangmiao/auto-pairs'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug '907th/vim-auto-save'
call plug#end()

" Settings for Ultisnips
let g:UltiSnipsExpandTrigger=""
let g:UltiSnipsJumpForwardTrigger=""
let g:UltiSnipsJumpBackwardTrigger=""

" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"

" set leader key
let g:mapleader = "\"
" enable AutoSave on Vim startup
let g:auto_save = 1
set number  " Line numbers
set cmdheight=2 " More space for displaying messages
set cursorline  " Enable highlighting of the current 
line

set clipboard=unnamed

syntax enable   " Enables syntax highlighing

let g:AutoPairsShortcutFastWrap = ""


" Better nav for omnicomplete
" inoremap   ("\")
" inoremap   ("\")

" Use alt + hjkl to resize windows
nnoremap :resize -2
nnoremap :resize +2
nnoremap :vertical resize -2
nnoremap :vertical resize +2

" I hate escape more than anything else
inoremap jk 
inoremap kj 

" Easy CAPS
inoremap  viwUi
nnoremap  viwU

" TAB in general mode will move to text buffer
nnoremap  :bnext

" SHIFT-TAB will go back
nnoremap  :bprevious

" Alternate way to save
nnoremap  :w

" Alternate way to quit
nnoremap  :wq!

" Use control-c instead of escape
nnoremap  


" Better window navigation
nnoremap  h
nnoremap  j
nnoremap  k
nnoremap  l

nnoremap o o^Da
nnoremap O O^Da

nnoremap  :NERDTreeToggle $HOME

Regards

Jan-Erik


> 14 dec. 2021 kl. 15:37 skrev Jeong Dal via ntg-context :
> 
> Dear Nicola, Jan-Erik, and John,
> 
> Although you have explained about the way out of my problem, 
> I am still in the problem.
> 
> I need to learn more about vim.
> I’ll do more try following your advice and  the explanation in wiki.
> 
> Thank you again for your help.
> 
> Best regards,
> 
> Dalyoung
> 
>> 2021. 12. 14. 오전 8:56, ntg-context-requ...@ntg.nl 작성:
>> 
>> Send ntg-context mailing list submissions to
>>  ntg-context@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-requ...@ntg.nl
>> 
>> You can reach the person managing the list at
>>  ntg-context-ow...@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: how to setup path of ConTeXtLMTX for MacVim?
>> (Jan-Erik Hägglöf)
>>  2. Re: circuitikz module seems broken (Hans Hagen)
>>  3. Re: TeXWorks and synctex SOLVED (Bruce Horrocks)
>> 
>> 
>> --
>> 
>> Message: 1
>> Date: Tue, 14 Dec 2021 00:48:25 +0100
>> From: Jan-Erik Hägglöf 
>> To: mailing list for ConTeXt users 
>> Subject: Re: [NTG-context] how to setup path of ConTeXtLMTX for
>>  MacVim?
>> Message-ID: <32566c08-2359-48df-b24c-2aa2e3d02...@gmail.com>
>> Content-Type: text/plain; 

Re: [NTG-context] tikzplot displacement result [solved]

2021-12-14 Thread Jan-Erik Hägglöf via ntg-context
HI!

Thank you for your help.

The code was generated by Geogebra Classic 5 "export to pgf/tikz" function and 
it seems to have errors that needs to be solved in that application.

Now I have a good template to do this on my own.

Regards 

Jan-Erik

> 12 dec. 2021 kl. 15:53 skrev Gavin :
> 
> Hi Jan-Erik,
> 
> Use the \addplot command when you use pgfplots. The manual, pgfplots.pdf, is 
> quite good.
> 
> \setupbodyfont[10pt]
> \enableregime[utf]
> \usemodule[tikz]
> \usemodule[pgfplots]
> \usetikzlibrary[arrows]
> \setuppagenumbering[location=]
> \starttext
> \definecolor[ffvvqq][r=1.,g=0.,b=0.]
> \startTEXpage
> \starttikzpicture[line cap=round,line join=round,>=triangle 
> 45,x=1.0cm,y=1.0cm]
> \startaxis
> [
> x=1.0cm,y=1.0cm,
> axis lines=middle,
> ymajorgrids=true,
> xmajorgrids=true,
> xmin=-3.2488079448294145,
> xmax=34.87398305791419,
> ymin=-7.496155590728956,
> ymax=11.53265632858922,
> xtick={-3.0,-2.0,...,34.0},
> ytick={-7.0,-6.0,...,11.0},]
> %\clip(-3.2488079448294145,-7.496155590728956) rectangle 
> (34.87398305791419,11.53265632858922);
> \addplot[line 
> width=2.pt,color=ffvvqq,smooth,samples=100,domain=-3.2488079448294145:34.87398305791419]{x+3}
>  node[below right, pos= 0.1]{$h$};
> \stopaxis
> \stoptikzpicture
> \stopTEXpage
> \stoptext
> 
> I removed the clip command because it is causing a problem and is 
> unnecessary. I don’t know what you are trying to do with the node{$h$}, but I 
> made it a label on the plot.
> 
> The metafun graph module would also work for this plot, but it pgfplots is 
> more mature. I recommend using pgfplots unless you are already skilled with 
> metapost.
> 
> Hope that gets you going in the right direction.
> 
> Gavin
> 
> 
> 
>> On Dec 12, 2021, at 3:13 AM, Jan-Erik Hägglöf via ntg-context 
>>  wrote:
>> 
>> HI!
>> 
>> I’m trying to fit the funktion in the right place in this plot but it seems 
>> to get displaced.
>> 
>> What is wrong with the code?
>> 
>> Is there a way to do this in Metafun?
>> 
>> Thanks in advance
>> 
>> Sincerely 
>> 
>> Jan-Erik
>> 
>> 
>> 
>> \setupbodyfont[10pt]
>> \enableregime[utf]
>> \usemodule[tikz]
>> \usemodule[pgfplots]
>> \usetikzlibrary[arrows]
>> \setuppagenumbering[location=]
>> \starttext
>> \definecolor[ffvvqq][r=1.,g=0.,b=0.]
>> \startTEXpage
>> \starttikzpicture[line cap=round,line join=round,>=triangle 
>> 45,x=1.0cm,y=1.0cm]
>> \startaxis
>> [
>> x=1.0cm,y=1.0cm,
>> axis lines=middle,
>> ymajorgrids=true,
>> xmajorgrids=true,
>> xmin=-3.2488079448294145,
>> xmax=34.87398305791419,
>> ymin=-7.496155590728956,
>> ymax=11.53265632858922,
>> xtick={-3.0,-2.0,...,34.0},
>> ytick={-7.0,-6.0,...,11.0},]
>> \clip(-3.2488079448294145,-7.496155590728956) rectangle 
>> (34.87398305791419,11.53265632858922);
>> \draw[line 
>> width=2.pt,color=ffvvqq,smooth,samples=100,domain=-3.2488079448294145:34.87398305791419]
>>  plot(\x,{(\x)+3});
>> \draw[color=ffvvqq] (-3.5583519743388714,-0.7831230981304516) node {$h$};
>> \stopaxis
>> \stoptikzpicture
>> \stopTEXpage
>> \stoptext
>> ___
>> 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] circuitikz module seems broken

2021-12-14 Thread Jan-Erik Hägglöf via ntg-context
HI ALL!

Finally it worked after complete reinstall

Tikz circuitikz pgfplots from ctan, updated LMTX to latest 2021.12.10

And replaced m-tikz.mkxl and m-circuitikz.mkxl with the attached files from 
Hans.

test2.log
Description: Binary data


Fingers crossed and praying and impressive help from Hans and Aditya

Many thanks

Sincerely

Jan-Erik

> 14 dec. 2021 kl. 04:57 skrev Aditya Mahajan via ntg-context 
> :
> 
> I tested with my course assignments (simple tikz block diagrams, lots of 
> pgdplots code) and everything works correctly. I haven't tested circuitikz; 
> the simple example fails and I am trying to understand why that is happening.
> 
>> Aditya: can you check if we load enough? 
> 
> I believe so. This is what my notes say (it is no fun to trace down these 
> files):
> 
> % Order in which files are loaded
> % 1. t-tikz
> % 1.1 t-pgf
> % 1.1.1 t-pgfcor
> % 1.1.1.1 t-pgfsys
> % 1.1.1.1.1 t-pgfrcs
> % 1.1.1.1.1.1 t-pgfmod  % Ignore
> % 1.1.1.1.1.2 pgfutil-common.tex(1)
> % 1.1.1.1.1.3 pgfutil-context.def   (2)
> % 1.1.1.1.1.4 pgfrcs.code.tex   (3)
> % 1.1.1.1.2 pgfsys.code.tex (4)
> % 1.1.1.1.3 pgfsyssoftpath.code.tex (5)
> % 1.1.1.1.4 pgfsysprotocol.code.tex (6)
> % 1.1.1.2 pgfcore.code.tex  (7)
> % 1.1.2 \usepgfmodule[shapes,plot]  (8)
> % 1.2 t-pgffor
> % 1.2.1 t-pgfrcs (already loaded)
> % 1.2.2 t-pgfkey
> % 1.2.2.1 pgfkeys.code.tex  (9)
> % 1.2.3 pgffor.code.tex(10)
> % 1.3 tikz.code.tex(11)
> 
> You also have pgfmoduleplot.code.tex, which I had missed.
> 
>> We really need to get rid of all
>> these (kind of strange) t-* modules that somehow ended up in tikz and it's 
>> way
>> easier and robust to occasionally add something needed to m-tikz than to try
>> to catch hard-to-locate-and-fix stuff in the tikz distribution. If needed we
>> can apply runtime patches too.
> 
> Agreed. I believe that the pgf module provides so many modules as a means to 
> be modular. For example, it possible to use `pgffor` module to get the for 
> loop syntax; or load `pgfkey` to get the key-value arguments, etc. But each 
> of these t-* files has so much boilerplate code, so I like your method 
> better. 
> 
>> (nyw, it looks like tikz creates empty pfg files during a run but that's
>> probbably has a reason)
> 
> tikz's ChangeLog has the following entries:
> 
> 2007-01-18:
>- Fixed .aux problems in plain and ConTeXt mode. Using .pgf as
>  extension now.
> 
> Grepping the source for `.pgf` gives:
> 
> tex/generic/pgf/utilities/pgfutil-context.def:  
> \pgfutil@IfFileExists{\jobname.pgf}{\input \jobname.pgf\relax}{}
> tex/generic/pgf/utilities/pgfutil-context.def:  \immediate\csname 
> openout\endcsname\pgfutil@auxout\jobname.pgf\relax
> tex/generic/pgf/utilities/pgfutil-plain.def:  
> \pgfutil@IfFileExists{\jobname.pgf}{\input \jobname.pgf\relax}{}
> tex/generic/pgf/utilities/pgfutil-plain.def:  \immediate\csname 
> openout\endcsname\pgfutil@auxout\jobname.pgf
> 
> The file handle \pgfutil@auxout is used in the macro \pgfutil@writetoaux 
> which gets used in the driver files to write absolute positioning stuff to 
> file. For example, pgfsys-luatex.def has:
> 
> \def\pgfsys@markposition#1{%
>  \savepos%
>  \edef\pgf@temp{#1}%
>  \expandafter\pgfutil@writetoaux\expandafter{%
>
> \expandafter\noexpand\expandafter\pgfsyspdfmark\expandafter{\pgf@temp}{\the\lastxpos}{\the\lastypos}}%
> }
> 
> This can easily be stored in the tuc file using two-pass data, but I don't 
> use this feature of tikz, so don't have examples to test this. 
> 
> @HenriMenke: Do you know if it is save to not create the `.pgf` file and 
> rewrite the above macro to read store the \pgfsyspdfmark table in the `.tuc` 
> file?
> 
> 
> 
> ___
> 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] how to setup path of ConTeXtLMTX for MacVim?

2021-12-13 Thread Jan-Erik Hägglöf via ntg-context
let g:context_mtxrun = 
'PATH=$HOME/context/context-osx-64/tex/texmf-osx-64/bin:$PATH mtxrun'

nnoremap å :ConTeXt
nnoremap  ö :call tex#preview()
nnoremap  ä
\ :call tex#goto_texshop(expand("%:p"), line('.'), col('.'), 1, 1)

Here is my snippet from my personal context.vim file

I see that you have :! and that means that you instruct vim to execute a shell 
command.

Just write :ConTeXt and it should work fine

> 13 dec. 2021 kl. 14:30 skrev Jeong Dal via ntg-context :
> 
> Dear John, Nicola,
> 
> I created a file context.vim under the folder ~/.vim/after/ftplugin/ which 
> contains
> 
> map > :w:!ConTeXt
> let g:context_mtxrun = 'PATH=$HOME/ConTeXtLM/tex/texmf-osx-64/bin:$PATH 
> mtxrun'
> let g:tex_flavor = "context"
> 
> The result is
> 1. using “:ConTeXt”   issued an error message:  “E492: not an editor command: 
> ConTeXt
> 2. using “make” issued an error message: "No targets specified and no 
> makefile found. …" 
> Pressing C-h, compiling started and succesfully ended. However, it use 
> /usr/local/texlive/… not LMTX tex folder.
> 
> Without context.vim, “:ConTeXt" and “:make" worked fine.
> 
> I’ll do more test. 
> 
> Thank you.
> Best regards,
> 
> Dalyoung
> 
> ___
> 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] circuitikz module seems broken

2021-12-13 Thread Jan-Erik Hägglöf via ntg-context
Seems to not solve my issue but i’m supplying my logs.I did update tikz and circuitikz and the whole LMTX refresh and new.Tested the code belowCheck my logs whats wrong.Giving up on this oneThanks in advanceJan-Erik

test-error.log
Description: Binary data


test.log
Description: Binary data


test.tex
Description: Binary data
13 dec. 2021 kl. 21:14 skrev Jan-Erik Hägglöf :Good work and thank you very much. I dig in to it and try it outSincerelyJan-Erik Den mån 13 dec. 2021 21:09Aditya Mahajan via ntg-context  skrev:On Mon, 6 Dec 2021, Aditya Mahajan via ntg-context wrote:

> On Mon, 6 Dec 2021, Aditya Mahajan via ntg-context wrote:
> > 
> > Something is still not working correctly though. With the simple example that Hans sent, I get error messages:
> > 
> > tex error       > tex error on line 76 in file m-circuitikz.mkxl: Package pgfkeys Error: I do not know the key '/tikz/resistor', to which you passed 'american', and I am going to ignore it. Perhaps you misspelled it
> > 
> > which are weird because tikz is looking at keys tikz/resistor rather than tikz/circuittikz/resistor. But I don't understand why this is the case.
> 
> Here is a minimal example to show the error.

There was an error in circuitikz,  which is now fixed in the latest version:

https://github.com/circuitikz/circuitikz/pull/600

So, the following works (with latest circuittiz from ctan):

\usemodule[t][circuitikz]

\starttext

\startcircuitikz
  \draw (0,2) to[I] (2,2);
\stopcircuitikz

\stoptext

But fails with m-circuitikz (even after I remove \unprotect ... \protect from \starttikzinput as in the other thread). So, I don't know what is going wrong with the catcodes in m-circuitikz.

Aditya
___
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] circuitikz module seems broken

2021-12-13 Thread Jan-Erik Hägglöf via ntg-context
Good work and thank you very much. I dig in to it and try it out

Sincerely

Jan-Erik

Den mån 13 dec. 2021 21:09Aditya Mahajan via ntg-context 
skrev:

> On Mon, 6 Dec 2021, Aditya Mahajan via ntg-context wrote:
>
> > On Mon, 6 Dec 2021, Aditya Mahajan via ntg-context wrote:
> > >
> > > Something is still not working correctly though. With the simple
> example that Hans sent, I get error messages:
> > >
> > > tex error   > tex error on line 76 in file m-circuitikz.mkxl:
> Package pgfkeys Error: I do not know the key '/tikz/resistor', to which you
> passed 'american', and I am going to ignore it. Perhaps you misspelled it
> > >
> > > which are weird because tikz is looking at keys tikz/resistor rather
> than tikz/circuittikz/resistor. But I don't understand why this is the case.
> >
> > Here is a minimal example to show the error.
>
> There was an error in circuitikz,  which is now fixed in the latest
> version:
>
> https://github.com/circuitikz/circuitikz/pull/600
>
> So, the following works (with latest circuittiz from ctan):
>
> \usemodule[t][circuitikz]
>
> \starttext
>
> \startcircuitikz
>   \draw (0,2) to[I] (2,2);
> \stopcircuitikz
>
> \stoptext
>
> But fails with m-circuitikz (even after I remove \unprotect ... \protect
> from \starttikzinput as in the other thread). So, I don't know what is
> going wrong with the catcodes in m-circuitikz.
>
> Aditya
>
> ___
> 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] tikzplot displacement result

2021-12-12 Thread Jan-Erik Hägglöf via ntg-context
HI!

I’m trying to fit the funktion in the right place in this plot but it seems to 
get displaced.

What is wrong with the code?

Is there a way to do this in Metafun?

Thanks in advance

Sincerely 

Jan-Erik



\setupbodyfont[10pt]
\enableregime[utf]
\usemodule[tikz]
\usemodule[pgfplots]
\usetikzlibrary[arrows]
\setuppagenumbering[location=]
\starttext
\definecolor[ffvvqq][r=1.,g=0.,b=0.]
\startTEXpage
\starttikzpicture[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\startaxis
[
x=1.0cm,y=1.0cm,
axis lines=middle,
ymajorgrids=true,
xmajorgrids=true,
xmin=-3.2488079448294145,
xmax=34.87398305791419,
ymin=-7.496155590728956,
ymax=11.53265632858922,
xtick={-3.0,-2.0,...,34.0},
ytick={-7.0,-6.0,...,11.0},]
\clip(-3.2488079448294145,-7.496155590728956) rectangle 
(34.87398305791419,11.53265632858922);
\draw[line 
width=2.pt,color=ffvvqq,smooth,samples=100,domain=-3.2488079448294145:34.87398305791419]
 plot(\x,{(\x)+3});
\draw[color=ffvvqq] (-3.5583519743388714,-0.7831230981304516) node {$h$};
\stopaxis
\stoptikzpicture
\stopTEXpage
\stoptext
___
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] [DKIM] Re: [DKIM] circuitikz module seems broken

2021-12-06 Thread Jan-Erik Hägglöf via ntg-context
Ok, so if I understand this correctly, you recommend install directly from ctan.

The question is, I’m not sure how, but is it the tds arcive?

If I test it under mkiv do I need a separate install?

The wiki seems to indicate that the mkiv version is included in the LMTX 
installation, if so it doesn’t work but I give it a second try.

Your commitment is truly fantastic and I thank you once again.

Jan-Erik 

> 6 dec. 2021 kl. 18:39 skrev Aditya Mahajan via ntg-context 
> :
> 
> On Mon, 6 Dec 2021, Aditya Mahajan via ntg-context wrote:
>> 
>> Something is still not working correctly though. With the simple example 
>> that Hans sent, I get error messages:
>> 
>> tex error   > tex error on line 76 in file m-circuitikz.mkxl: Package 
>> pgfkeys Error: I do not know the key '/tikz/resistor', to which you passed 
>> 'american', and I am going to ignore it. Perhaps you misspelled it
>> 
>> which are weird because tikz is looking at keys tikz/resistor rather than 
>> tikz/circuittikz/resistor. But I don't understand why this is the case.
> 
> Here is a minimal example to show the error.
> 
> \usemodule[m][tikz]
> 
> \tikzinputfile{pgfcirc.defines.tex}
> \tikzinputfile{pgfcircbipoles.tex}
> 
> \starttext
> \bgroup
> \loggingall
> \ctikzset{resistor=american}
> \egroup
> \stoptext
> 
> which gives the error
> 
> tex error   > tex error on line 10 in file ./t2.tex: Package pgfkeys 
> Error: I do not know the key '/tikz/resistor', to which you passed 
> 'american', and I am going to ignore it. Perhaps you misspelled it
> 
> The file pgfcirc.defines.tex has:
> 
> \def\circuitikzbasekey{/tikz/circuitikz}
> \pgfkeys{\circuitikzbasekey/.is family}
> \def\circuitikzset{\expandafter\pgfqkeys\expandafter{\circuitikzbasekey}}
> \let\ctikzset\circuitikzset
> 
> 
> The file pgfcircbipoles.tex has the code:
> 
> \newif\ifpgf@circuit@europeanresistor
> \ctikzset{resistor/.is choice}
> \ctikzset{resistor/american/.code = \pgf@circuit@europeanresistorfalse }
> \ctikzset{resistor/european/.code = \pgf@circuit@europeanresistortrue }
> \tikzset{american resistors/.style = {\circuitikzbasekey/resistor = american}}
> \tikzset{european resistors/.style = {\circuitikzbasekey/resistor = 
> european}}%
> 
> So, the key which is defined is \circuitikzbasekey/resistor. Not sure why 
> pgfkeys is searching for tikz/resistor. 
> 
> @Hans, does the above code work correctly for you? If so, then we can wait 
> until the next upload and test again.
> 
> Aditya
> ___
> 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] [DKIM] [DKIM] Re: [DKIM] circuitikz module seems broken

2021-12-05 Thread Jan-Erik Hägglöf via ntg-context
Ok so I did all the tips, installed from ctan without any success so it is 
interesting to know how it worked out for some and not for me.

Well that is a good question.

Thanks for your help anyway

Regards

Jan-Erik

> 5 dec. 2021 kl. 16:35 skrev Hans Hagen :
> 
> On 12/4/2021 10:37 PM, Jan-Erik Hägglöf via ntg-context wrote:
>> I did replace the attached .mkxl files now in the correct directory tree 
>> together with the rest of all m-xyz.mkxl module files.
>> The same error message appears and i’m back at square one.
> hm, here i did:
> 
> - install tikz from ctan
> - install curcuitikz from ctan
> - copy the m-files to context/base ...
> 
> ran mtxrun --generate
> 
> there is not much more I can do (esp if it also runs ok at Aditya's place)
> 
> 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
___


[NTG-context] m-database module error since update

2021-12-05 Thread Jan-Erik Hägglöf via ntg-context
Since my update to LMTX 2021-12-03 the following error occured:

tex error   > tex error on line 41 in file 
/Users/jan-erikhagglof/context/context-osx-64/tex/texmf-context/tex/context/modules/mkiv/m-database.mkiv:
 Missing \endcsname inserted

 

   \endlocalcontrol 
 
   \c 
   !separator
 \mult_interfaces_get_parameters_item_okay 
   #1=#2,->\ifarguments \or \mult_interfaces_get_parameters_item_error \else 
\defcsname \m_mult_interfaces_namespace #1
   \endcsname {#2}\fi 
 \mult_interfaces_get_parameters_item 
   #*#1,->\ifarguments \else \mult_interfaces_get_parameters_item_okay #1,
   \ignorearguments \expandafter \mult_interfaces_get_parameters_item \fi 
 
   \c !separator={,},
\c !quotechar=, \c !commentchar=, \c !strip=\v !no, \c !before=, \c 
!after=, \c !first=, \c !last=, \c !left=, \c !right=
 \mult_interfaces_get_parameters_indeed 
   #1]->\mult_interfaces_get_parameters_item #1
   \ignorearguments \ignorearguments 
...

 


31   [\c!separator={,},
32\c!quotechar=,
33\c!commentchar=,
34\c!strip=\v!no,
35\c!before=,
36\c!after=,
37\c!first=,
38\c!last=,
39\c!left=,
40\c!right=]
41 >>  
42 % \let\currentdatabase\empty \the\everypresetdatabase % or just:
43 
44 \setupdatabase
45   [\c!separator={,}]
46 
47 \def\module_database_process#1#2#3%
48   {\edef\currentdatabasetype{#1}%
49\edef\currentdatabase{#2}%
50\edef\currentdatabasename{#3}%
51\ifx\currentdatabasename\empty
The control sequence marked  should not appear between \csname
and \endcsname.

I have an older version of LMTX 2021-08-10 on my laptop that works fine on same 
document.

Thanks in advance

Jan-Erik Hägglöf
___
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] [DKIM] Re: [DKIM] circuitikz module seems broken

2021-12-04 Thread Jan-Erik Hägglöf via ntg-context
I did replace the attached .mkxl files now in the correct directory tree 
together with the rest of all m-xyz.mkxl module files.

The same error message appears and i’m back at square one.



asdf-error.log
Description: Binary data


asdf.log
Description: Binary data


asdf.tex
Description: Binary data



> 4 dec. 2021 kl. 10:05 skrev Henning Hraban Ramm via ntg-context 
> :
> 
> Am 04.12.21 um 00:27 schrieb Aditya Mahajan via ntg-context:
>> Not placed at the right place. From your log file:
>> open source > level 2, order 3, name 
>> '/Users/jan-erikhagglof/context/context-osx-64/tex/texmf-local/m-circuitikz.mkxl'
>> (I am surprised it gets found! The should be texmf-local/tex/context/ 
>> sub-dir)
> 
> Well, if the database is made, ConTeXt will find files in *all* the texmf 
> trees.
> 
> BTW OT, I wouldn’t suggest to use texmf-local or texmf-project; while these 
> are never overwritten by an update, you must copy them to a new installation. 
> I prefer ~/texmf for my personal fonts, modules etc., because it’s 
> independent of the ConTeXt installation I’m currently using, while it’s still 
> a valid texmf tree searched by default.
> 
> Hraban
> ___
> 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] [DKIM] Re: [DKIM] circuitikz module seems broken

2021-12-03 Thread Jan-Erik Hägglöf via ntg-context
The result of testing, different error messages in MKIV and LMTX.The attached files belongs to LMTX run with the attached m-circuitikz.mkxl and m-tikz.mkxl in texmf-local

asdf-error.log
Description: Binary data


asdf.log
Description: Binary data
3 dec. 2021 kl. 19:16 skrev Hans Hagen via ntg-context :___
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] circuitikz module seems broken

2021-12-02 Thread Jan-Erik Hägglöf via ntg-context
Dear List!

I’ve been struggeling with the circuitikz module since my upgrade to LMTX.

The following test of installation failed, running file 

circuitikz-context.tex in ../modules/t-tikz/ directory 

% Copyright 2018-2021 by Romano Giannetti
% Copyright 2015-2021 by Stefan Lindner
% Copyright 2013-2021 by Stefan Erhardt
% Copyright 2007-2021 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.


\usemodule[circuitikz]

\starttext

A simple example to test the installation.

\startcircuitikz[scale=1.2]
\draw
  (0,2) to[I=1\milli\ampere] (2,2)
to[R, l_=2\kilo\ohm, *-*] (0,0)
to[R, l_=2\kilo\ohm] (2,0)
to[V, v_=2\volt] (2,2)
to[cspst, l=$t_0$] (4,2) -- (4,1.5)
to [generic, i=$i_1$, v=$v_1$] (4,-.5) -- (4,-1.5)
  (0,2) -- (0,-1.5) to[V, v_=4\volt] (2,-1.5)
to [R, l=1\kilo\ohm] (4,-1.5)
  (5,2) node[dipchip, anchor=pin 1]{}
  (5,-2) node[flipflop JK, anchor=pin 1]{};

\stopcircuitikz

\stoptext

with this error message

pgfcircutils.tex|103 error| Undefined control sequence \undefined 

Below is a snippet from pgfcircutils.tex

%%
%% subcircuits (experimental)
%%
%% introduced by Romano Giannetti around April 2021
%% changes suggested by Jonathan P. Spratte
%%
\newbox\ctikz@scratchbox
\pgfutil@protected\def\ctikzsubcircuitdef#1#2#3{%
\expandafter\gdef\csname #1@Anchor\endcsname{}%
\expandafter\gdef\csname #1@setanchors\endcsname{%
\setbox\ctikz@scratchbox=\hbox{%
\begin{circuitikz}
\draw (0,0) \csname#1\endcsname{T-#1}{};
\foreach [count=\i] \anchor in {#2}
% reference anchor is -center
\draw (0,{2-\i/2}) let \p1 = ($(T-#1-subckt@reference)-(T-#1-\anchor)$) 
in
node[right]{\anchor: \x1,\y1 \expandafter\xdef\csname 
#1@Anchor\anchor\endcsname{++(\x1,\y1)}};
\end{circuitikz}%
}%
}%
\expandafter\gdef\csname#1\endcsname##1##2{%
\csname #1@Anchor##2\endcsname coordinate(##1-subckt@reference)#3%
}%
}
\long\def\ctikzsubcircuitactivate#1{\csname #1@setanchors\endcsname}

My installation info:

context --version
mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file: 
/Users/jan-erikhagglof/context/context-osx-64/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2021.10.28 10:19
mtx-context | main context file: 
/Users/jan-erikhagglof/context/context-osx-64/tex/texmf-context/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2021.10.28 10:19

Because of my lack of knowledge in this matter, I have no idea what is wrong 
here.

Many thanks in advance

Jan-Erik Hägglöf

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