Re: [NTG-context] Macro for a comma separated list of authors

2021-11-24 Thread Jairo A. del Rio via ntg-context
Hola.

Maybe you need \commalistsentence?

\def\Autores{%
  {Luis David Gómez-Méndez, Ph. D.},
  {Adriana del Pilar Pulido-Villamarín, M. Sc.},
  {Rubiela Castañeda-Salazar, M. Sc.},
  {Juan Carlos Ulloa-Rubiano, Ph. D.},
  {Adriana Matiz-Villamil, M. Sc.},
  {Fidson Juarismy Vesga-Pérez, Ph. D}%
}
\starttext
\commalistsentence[\Autores][{;\space},{\space\letterampersand\space}]
\stoptext

Check lang-lab.mkxl for other goodies and examples.

Best regards,

Jairo

El mié, 24 de nov. de 2021 a la(s) 19:10, Andres Conrado Montoya via
ntg-context (ntg-context@ntg.nl) escribió:

> I'm trying to produce a document with several authors, using macros for
> comma separated lists. My MWE is as follows:
>
> %%
> \def\autores{%
>   {Luis David Gómez-Méndez, Ph. D.},
>   {Adriana del Pilar Pulido-Villamarín, M. Sc.},
>   {Rubiela Castañeda-Salazar, M. Sc.},
>   {Juan Carlos Ulloa-Rubiano, Ph. D.},
>   {Adriana Matiz-Villamil, M. Sc.}%
> }
>
> \def\lastAutor{Fidson Juarismy Vesga-Pérez, Ph. D}
>
> \def\autorParaLista#1{#1;\space}
> \def\listaAutores{\processcommacommand[\autores]\autorParaLista &
> \lastAutor: autores.}
>
> \starttext
>
> \listaAutores
>
> \stoptext
> %%%
>
> So far, no luck trying to extract the last item from a comma separated
> list. That's the reason I created a "\lastAutor" macro, so I can treat the
> last one differently.
>
> This produces:
>
> %%
> Luis David Gómez-Méndez, Ph.D.; Adriana del Pilar Pulido-Villamarín, M.
> Sc.; Rubiela Castañeda-Salazar, M. Sc.; Juan Carlos Ulloa-Rubiano, Ph.D.;
> Adriana Matiz-Villamil, M. Sc.; & Fidson Juarismy Vesga-Pérez, Ph.D:
> autores.
> %%
>
> However, what I'm trying to get is:
>
> %%
> Luis David Gómez-Méndez, Ph.D.; Adriana del Pilar Pulido-Villamarín, M.
> Sc.; Rubiela Castañeda-Salazar, M. Sc.; Juan Carlos Ulloa-Rubiano, Ph.D.;
> Adriana Matiz-Villamil, M. Sc. & Fidson Juarismy Vesga-Pérez, Ph.D: autores.
> %%
>
> Which is very close to what I need, except the ";" just before the "&". So
> the question is: is it possible to do this in a more effective or simpler,
> or better way, and write a macro that outputs something like "Author1;
> Author2; Author3 & Author4: authors.", given a comma separated list of
> authors?
>
> --
> Andrés Conrado Montoya
> Andi Kú
> andresconr...@gmail.com
> http://sesentaycuatro.com
> http://messier87.com
> http://chiquitico.org
> 
> Los fines no justifican los medios, porque la medida verdadera de nuestro
> carácter está dada por los medios que estamos dispuestos a utilizar, no por
> los fines que proclamamos.
> 
>
> “You develop an instant global consciousness, a people orientation, an
> intense dissatisfaction with the state of the world, and a compulsion to do
> something about it. From out there on the moon, international politics look
> so petty. You want to grab a politician by the scruff of the neck and drag
> him a quarter of a million miles out and say, ‘Look at that, you son of a
> bitch.’” — Apollo 14 astronaut Edgar Mitchell
>
> ___
> 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] Macro for a comma separated list of authors

2021-11-24 Thread Andres Conrado Montoya via ntg-context
I'm trying to produce a document with several authors, using macros for
comma separated lists. My MWE is as follows:

%%
\def\autores{%
  {Luis David Gómez-Méndez, Ph. D.},
  {Adriana del Pilar Pulido-Villamarín, M. Sc.},
  {Rubiela Castañeda-Salazar, M. Sc.},
  {Juan Carlos Ulloa-Rubiano, Ph. D.},
  {Adriana Matiz-Villamil, M. Sc.}%
}

\def\lastAutor{Fidson Juarismy Vesga-Pérez, Ph. D}

\def\autorParaLista#1{#1;\space}
\def\listaAutores{\processcommacommand[\autores]\autorParaLista &
\lastAutor: autores.}

\starttext

\listaAutores

\stoptext
%%%

So far, no luck trying to extract the last item from a comma separated
list. That's the reason I created a "\lastAutor" macro, so I can treat the
last one differently.

This produces:

%%
Luis David Gómez-Méndez, Ph.D.; Adriana del Pilar Pulido-Villamarín, M.
Sc.; Rubiela Castañeda-Salazar, M. Sc.; Juan Carlos Ulloa-Rubiano, Ph.D.;
Adriana Matiz-Villamil, M. Sc.; & Fidson Juarismy Vesga-Pérez, Ph.D:
autores.
%%

However, what I'm trying to get is:

%%
Luis David Gómez-Méndez, Ph.D.; Adriana del Pilar Pulido-Villamarín, M.
Sc.; Rubiela Castañeda-Salazar, M. Sc.; Juan Carlos Ulloa-Rubiano, Ph.D.;
Adriana Matiz-Villamil, M. Sc. & Fidson Juarismy Vesga-Pérez, Ph.D: autores.
%%

Which is very close to what I need, except the ";" just before the "&". So
the question is: is it possible to do this in a more effective or simpler,
or better way, and write a macro that outputs something like "Author1;
Author2; Author3 & Author4: authors.", given a comma separated list of
authors?

-- 
Andrés Conrado Montoya
Andi Kú
andresconr...@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org

Los fines no justifican los medios, porque la medida verdadera de nuestro
carácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
___
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] adjusting vertical space

2021-11-24 Thread jbf via ntg-context
The following MWE produces a passable result for a half-title page, but 
I need to reduce the vertical space between 'A JOURNEY' and 'from the' 
so that the 'h' of the 'the' is just touching the baseline of the 'R' in 
JOURNEY. At the moment there is some distance between them.


I thought I could do this with \setupinterlinespace[] (not represented 
in the MWE because it did not work) but no matter what dimensions I put 
in there, it makes no difference. Is there another way I can make 
infinitesimal adjustments to distance between the two lines in question?


Julian


\startstandardmakeup[top=]
\startalignment[middle]

\definedfont[name:SemplicitaPro-Medium.ttf*default at 34pt]
\color[gray]{A JOURNEY}

\definedfont[name:baskerville-italic.ttf*default at 26pt]
\color[gray]{from the}

\definedfont[name:SemplicitaPro-Medium.ttf*default at 34pt]
\color[gray]{BEGINNING}
\stopalignment
\stopstandardmakeup
\startstandardmakeup[top= ]

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

2021-11-24 Thread Hans Hagen via ntg-context

Hi,

for those who keep an eye on what is new, the most recent upload 
provides this:


\starttext

$\Umathxscale\textstyle  800 a + b + x + d + e = f $\par
$\Umathxscale\textstyle 1000 a + b + x + d + e = f $\par
$\Umathxscale\textstyle 1200 a + b + x + d + e = f $\blank

$\showboxes\setupmathspacing[narrow] a + b + x + d + e = f $\par
$\showboxes\setupmathspacing[normal] a + b + x + d + e = f $\par
$\showboxes\setupmathspacing[wide]   a + b + x + d + e = f $\blank

$\showboxes\setupmathspacing[tight]  x^2_1$\quad
$\showboxes\setupmathspacing[normal] x^2_1$\quad
$\showboxes\setupmathspacing[loose]  x^2_1$\blank

$\showboxes\setupmathspacing[narrow]\sqrt[2]{x+1}$\quad
$\showboxes\setupmathspacing[normal]\sqrt[2]{x+1}$\quad
$\showboxes\setupmathspacing[wide]  \sqrt[2]{x+1}$\blank

$\showboxes\setupmathspacing[less]  \sqrt[2]{x+1}$\quad
$\showboxes\setupmathspacing[normal]\sqrt[2]{x+1}$\quad
$\showboxes\setupmathspacing[more]  \sqrt[2]{x+1}$\blank

\stoptext

it's still experimental so the predefined values might change

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
___


Re: [NTG-context] Neovim and ConTeXt

2021-11-24 Thread Aditya Mahajan via ntg-context
On Wed, 24 Nov 2021, Clint Grady via ntg-context wrote:

> Are there any known ways to use ConTeXtLMTX with Neovim? 

Not that I am aware of. 

> I read the wiki page for Vim and it describes a hack to get latex-suite to 
> work with ConTeXt. [1] It wouldn't be too much work to submit a pull-request 
> to VimTeX (despite the name, this is for Neovim) [2] to add ConTeXt support, 
> but I don't want to duplicate work if someone else has already done it.

Please do so. There are different levels of what it means for a editor to 
support a language. I guess that you are talking about async compilation 
support, but keep in mind that context has a different error format than latex 
for that needs to be set different as well. It will be nice to have support to 
pass command line flags via the editor. Context also has a (slightly buggy) 
syntax checker (mtxrun --script check ..) which could be integrated.

I don't know what is the current state of context syntax highlighting support 
in vim/neovim (I use a highly modifies syntax file). It will be nice to have 
support of \startMP(code|page) and \startluacode to do syntax highlighting for 
metapost and lua. Metafun has added some new keywords and it will be nice to 
support those. I believe that context ships with a file that outputs all these 
keywords but I don't remember the name. 

It will be cool to have a more integrated support, like showing table of 
contents in the sidebar, (these are stored as a lua table in the tuc file and 
neovim has inbuilt lua interpreter, so...), modifying the jump keys so that so 
that ]] etc work correctly (with the context syntax) and so on. 

I'll be happy to test your pull request if you want. 

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] Automatic counting groupsuffix for subfigures

2021-11-24 Thread Marco Patzer via ntg-context
Hi!

I'd like to use subfigure numbering for floats. This works:

\useMPlibrary [dum]
\starttext

\startplacefigure [location=none]
  \startfloatcombination [nx=2]
\startplacefigure [title=Left, reference=ref:left, group=one, groupsuffix=a]
  \externalfigure
\stopplacefigure
\startplacefigure [title=Right, reference=ref:right, group=one, 
groupsuffix=b]
  \externalfigure
\stopplacefigure
  \stopfloatcombination
\stopplacefigure

See \in{image}[ref:right] (right) and \in{image}[ref:left] (left).
\stoptext

The output is correct, but the usage is verbose. I'd like to replace
the manual groupsuffix numbering with something automatic. ConTeXt
uses automatic numbering in many places so it seems strange to
number the subfigures manually.

I have tried using counters and labels, but something is always
messed up and I couldn't get it to work.

How to achieve automatic subfigure numbering without specifying the
groupsuffix manually?

Marco

LMTX 2021.11.22 22:27
___
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] Neovim and ConTeXt

2021-11-24 Thread Clint Grady via ntg-context
Are there any known ways to use ConTeXtLMTX with Neovim? 

I read the wiki page for Vim and it describes a hack to get latex-suite to work 
with ConTeXt. [1] It wouldn't be too much work to submit a pull-request to 
VimTeX (despite the name, this is for Neovim) [2] to add ConTeXt support, but I 
don't want to duplicate work if someone else has already done it.

Clint

[1]: 
https://wiki.contextgarden.net/index.php?title=Vim=toggle_view_desktop,
 bottom of page
[2]: https://github.com/lervag/vimtex___
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] Creating bibliographies with ox-context

2021-11-24 Thread Denis Maier via ntg-context
Just if anyone is interested: ox is the export framework for orgmode.
ox-context is the new exporter to context: 
https://github.com/Jason-S-Ross/ox-context

Concerning citations: I've not tested this, but if you're already on org 9.5, 
maybe you will want to have a look into the new citation export options. You 
should be able to export citations via citeproc-el. Should be pretty similar to 
what you can do with pandoc.

The citation system in orgmode is much more powerful than pandoc's though as 
the syntax is extensible. Theoretically, it should be possible to use context's 
native bibliography command as well if you're willing to write an org-cite 
module for that. (Similar to oc-biblatex or oc-natbib.) 

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von juh via ntg-
> context
> Gesendet: Mittwoch, 24. November 2021 07:58
> An: mailing list for ConTeXt users 
> Cc: juh 
> Betreff: Re: [NTG-context] Creating bibliographies with ox-context
> 
> I have to apologise,
> 
> I posted this to the wrong mailinglist. Sorry.
> 
> But thank you anyway. I'll have a look at these resources, too.
> 
> juh
> 
> Am Tue, Nov 23, 2021 at 06:58:49PM +0100 schrieb Henning Hraban Ramm via
> ntg-context:
> > Am 23.11.21 um 18:51 schrieb Henning Hraban Ramm via ntg-context:
> > > Am 23.11.21 um 18:02 schrieb juh via ntg-context:
> > > > Hi all,
> > > >
> > > > I am kind of lost with references and ox-context and ox-epub.
> > >
> > > What do you mean with "ox"?
> > >
> > > > Is there a tutorial how to integrate a bibliography in ConTeXt and
> > > > epub-Export?
> > >
> > > Did you read the bibliography manual (mkiv-publications.pdf)?
> >
> > I forgot:
> > If you don’t need / work from a bibliographical database but you just
> > have the sources list for one publication, the “simple & manual”
> > approach might suit you:
> > https://wiki.contextgarden.net/Bibliography#Simple_manual_bibliography
> > (I never needed more, since I mostly typseset other people’s
> > manuscripts.)
> 
> --
> Autoren-Homepage: . http://literatur.hasecke.com Satiren & Essays:
> . http://www.sudelbuch.de Privater Blog: 
> http://www.hasecke.eu
> Netzliteratur-Projekt:  http://www.generationenprojekt.de
> 

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