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


Re: [NTG-context] Bad linebreak in figure caption

2021-12-02 Thread Marco Patzer via ntg-context
On Mon, 29 Nov 2021 16:44:07 +0100
Marco Patzer via ntg-context  wrote:

> Why does ConTeXt not break the line between "unnecessary" and "FOO"?

Any ideas how to fix this?

Marco
___
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] Status of moderncv with ConTeXt ?

2021-12-02 Thread kaddour kardio via ntg-context
It worked nicely in my 3 machines until one month ago 2 of my 3 machines
don't compile my documents , the third machine runs an older update of
LuaMetaTeX.

Le jeu. 2 déc. 2021 à 09:27, Laurent Steffan via ntg-context <
ntg-context@ntg.nl> a écrit :

> Hello,
>
> In the deprecated document about "Correspondence" dated 2010, the chapter
> on résumés describes a ConTeXt reimplementation of the moderncv package. Is
> this still usable, and if so, where can I get the relevant files ?
>
> Thanks in advance
> Laurent Steffan
>
>
>
> ___
> 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] Syntax highlighting using LMTX

2021-12-02 Thread Henri Menke via ntg-context
On Thu, 2021-12-02 at 12:07 -0500, Aditya Mahajan via ntg-context
wrote:
> On Thu, 2 Dec 2021, Thangalin via ntg-context wrote:
> 
> > Hi all,
> > 
> > There are a few technical hurdles with using the t-vim module in
> > LMTX.
> > First, users need to install the module using externally defined
> > shell
> > scripts. Second, it's awkward to communicate to users how to install
> > it,
> > especially for Windows users. Third, it likely requires installing
> > vim, as
> > a separate step. Fourth, making general-purpose XML setups that
> > optionally
> > rely on syntax highlighting when it is an optional install is a
> > little
> > laborious.
> > 
> > If installing a module was as easy as "install.sh --module=t-vim"
> > then that
> > would leap over most hurdles. 
> 
> You can always install manually as follows:
> 
> cd $TEXMFHOME
> wget
> https://mirrors.ctan.org/macros/context/contrib/context-{filter,vim}.zip
> unzip context-{filter,vim}.zip
> 
> > Although there'd still be a dependency on installing vim. 
> 
> Yes, that's a trade-off that the vim module makes. But, last time I
> used Windows (some 10 years ago), installing vim was relatively easy.
> Download the install from vim's website, and click next a couple of
> times. 
> 
> > How would you go about creating a syntax highlighter for Java that
> > can work
> > with LMTX? 
> 
> I'll let others answer that. Had I known that, I wouldn't have written
> a module to do syntax highlighting :-) In the end, it also depends on
> how refined a syntax highlighter you want. Writing a simple keyword
> based highlighter is relatively easy. See, for example, scite-context-
> lexer-cpp.lua in the distribution, which is based on the CPP lexer in
> scite.

I wrote an answer here some time ago.
https://tex.stackexchange.com/questions/333508/custom-pretty-printer-in-context

Cheers, Henri

> 
> 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] Syntax highlighting using LMTX

2021-12-02 Thread Aditya Mahajan via ntg-context
On Thu, 2 Dec 2021, Thangalin via ntg-context wrote:

> Hi all,
> 
> There are a few technical hurdles with using the t-vim module in LMTX.
> First, users need to install the module using externally defined shell
> scripts. Second, it's awkward to communicate to users how to install it,
> especially for Windows users. Third, it likely requires installing vim, as
> a separate step. Fourth, making general-purpose XML setups that optionally
> rely on syntax highlighting when it is an optional install is a little
> laborious.
> 
> If installing a module was as easy as "install.sh --module=t-vim" then that
> would leap over most hurdles. 

You can always install manually as follows:

cd $TEXMFHOME
wget https://mirrors.ctan.org/macros/context/contrib/context-{filter,vim}.zip
unzip context-{filter,vim}.zip

> Although there'd still be a dependency on installing vim. 

Yes, that's a trade-off that the vim module makes. But, last time I used 
Windows (some 10 years ago), installing vim was relatively easy. Download the 
install from vim's website, and click next a couple of times. 

> How would you go about creating a syntax highlighter for Java that can work
> with LMTX? 

I'll let others answer that. Had I known that, I wouldn't have written a module 
to do syntax highlighting :-) In the end, it also depends on how refined a 
syntax highlighter you want. Writing a simple keyword based highlighter is 
relatively easy. See, for example, scite-context-lexer-cpp.lua in the 
distribution, which is based on the CPP lexer in scite.

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
___


[NTG-context] Syntax highlighting using LMTX

2021-12-02 Thread Thangalin via ntg-context
Hi all,

There are a few technical hurdles with using the t-vim module in LMTX.
First, users need to install the module using externally defined shell
scripts. Second, it's awkward to communicate to users how to install it,
especially for Windows users. Third, it likely requires installing vim, as
a separate step. Fourth, making general-purpose XML setups that optionally
rely on syntax highlighting when it is an optional install is a little
laborious.

If installing a module was as easy as "install.sh --module=t-vim" then that
would leap over most hurdles. Although there'd still be a dependency on
installing vim. Of course, it'd be pretty sweet if ConTeXt itself could
automatically install the necessary module when encountered (or provide a
command-line option to grant permissions to do so), but I understand that
that would be a hefty undertaking.

The following pages discuss creating syntax highlighters:

   - https://wiki.contextgarden.net/Verbatim_text
   - https://wiki.contextgarden.net/Custom_pretty_printer
   - https://tex.stackexchange.com/a/333620/2148

How would you go about creating a syntax highlighter for Java that can work
with LMTX? Specifically, I'd like to know:

   - Where do the files need to be saved? (e.g.,
   tex/texmf-context/tex/context/base/mkiv/)
   - What file name is required? (e.g., buff-imp-java.lua and
   buff-imp-java.mkiv)
   - How is the parser loaded? (e.g., \loadmarkfile{buff-imp-java} or
   \installprettytype[java][java])

Ultimately, this is going to be used with XML snippets along the lines of:

public final class Example {
  public static void main( String args[] ) {
  }
}

Having the ability to dynamically define the requisite start/stop
environments based on the class attribute would be rather convenient.

Thank you!
___
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] Status of moderncv with ConTeXt ?

2021-12-02 Thread Laurent Steffan via ntg-context
Hello,

In the deprecated document about "Correspondence" dated 2010, the chapter
on résumés describes a ConTeXt reimplementation of the moderncv package. Is
this still usable, and if so, where can I get the relevant files ?

Thanks in advance
Laurent Steffan
___
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
___