Re: [NTG-context] String substitution using regular expressions and backreferences

2022-08-25 Thread Thangalin via ntg-context
I've attempted to apply Wolfgang's subtle suggestion of using Lua to parse
the input document using a regular expression via lpeg.replacer. The
replacement itself works fine; however, in doing so the XML document
structure is converted to text, which means that it is no longer possible
to "flush" the XML for further processing as XML. The result is that any
unresolved XML tags are written verbatim to the PDF:

https://i.stack.imgur.com/9ZFND.png

There are two other issues with this approach. First is efficiency. Second
is that the processing function would have to be called for every XML
element to capture the replacement.

My original post asked about applying regex word substitution in a ConTeXt
way, such as:

\definereplacement[SubstMac][ match={Mc([A-Z].*)}, replace={\Mac \\1} ]
\definereplacement[SubstPostmeridian][ match={[Pp]\\.[Mm]\\.},
replace={\cap{pm}} ]

That seems like the cleanest approach because it would work on top of XML
or any other source document. Nevertheless, here is what I tried, which
partially works:

\startbuffer[main]

  “Mr. McAnulty, I presume?”
  Regular text. Irregular text.
\stopbuffer
\startxmlsetups xml:xhtml
  \xmlsetsetup{\xmldocument}{*}{-}
  \xmlsetsetup{\xmldocument}{html|p|em}{xml:*}\stopxmlsetups
\startxmlsetups xml:html
  \startdocument
\xmlflush{#1}
  \stopdocument\stopxmlsetups
% Paragraphs are followed by a paragraph break, but only if not
nested.\startxmlsetups xml:p
  \xmlfunction{#1}{p}
  \par\stopxmlsetups
\startxmlsetups xml:em
  \dontleavehmode{\em\xmlflush{#1}}\stopxmlsetups
\startluacode
function xml.functions.p( t )
  rep = { [1] = { "McAnulty", "\\Mac Anulty" } }
  x = lpeg.replacer( rep ):match( tostring( xml.text( t ) ) )

  buffers.assign( "p", context( x ) )
  context.getbuffer{ "p" }
end\stopluacode
\xmlregistersetup{xml:xhtml}
\def\Mac{%
  % Determine the sizes of 'M' and 'c'.
  \newbox\MacMBox%
  \setbox\MacMBox\hbox{M}%
  \newbox\MacCBox%
  \setbox\MacCBox\hbox{c}%
  %
  % Cheat to dynamically derive the kerning size by putting Mc in a box.
  %
  \newbox\MacKernBox%
  \setbox\MacKernBox\hbox{\inframed[offset=\zeropoint, width=fit]{Mc}}%
  \def\MacDelta{\dimexpr\wd\MacKernBox-\wd\MacMBox-\wd\MacCBox\relax}%
  \def\MacUWidth{\dimexpr\wd\MacCBox-.75\MacDelta\relax}%
  \def\MacRule{\vrule width \MacUWidth height .04em depth \zeropoint \relax}%
  \def\MacKern{\dimexpr\wd\MacKernBox-\wd\MacMBox-\wd\MacCBox\relax}%
  \def\MacHeight{\dimexpr\ht\MacMBox-\ht\MacCBox\relax}%
  %
  % Write Mc, where c has a macron, to the document.
  %
  M{%
\dontleavehmode{\raisebox{\MacHeight}\hbox{c}}%
\kern-1.04\MacUWidth
\MacRule
\kern.08\MacUWidth
  }%
}%
\xmlprocessbuffer{main}{main}{}

As shown in the screen shot, this doesn't correctly handle nested XML
elements.

Any ideas on what approach to take to perform a string replacement in
ConTeXt?

Thanks again!


[Your] input is XML which means a lot more can be done than your simple TeX
> based example demonstrates.
>
> Wolfgang
>
>
___
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] Suggestions for project structures, environment inheritance, local overrides

2022-08-17 Thread Denis Maier via ntg-context
Hi everyone

One of my current main projects where I use ConTeXt is typesetting journal 
articles from xml sources. As the journal appears only online, we've decided to 
publish each article individually. I have a working setup, but I occasionally 
ponder whether I could make things more smootly. Currently, my folder structure 
looks roughly like this :

2022
-- _assets
-- article1
 source
 md
 xml
 pdf
 html
-- article2
etc.

Usually, I receive Word files that get transformed via pandoc to markdown, 
polished, and from there to XML. HTML is produced via XSLT, PDF via ConTeXt. 
Transformations are performed with the help of a makefile.

The _assets folder contains a bunch of helper files, scripts, and two 
environment files used by ConTeXt :
jats.tex -> contains the setup for JATS XML
layout.tex -> contains layout settings

Now, this mostly works, but I sometimes struggle with things like 
overrides/additions for specific articles. Say, I have the global definitions, 
but I need to make small changes for one specific article? Or, I need to add 
something to one specific article, but I don't want to add this to the  
 files. I guess my question is something like this :

- How could a painless solution for such a scenario look like?
- Should you just load multiple environment files and override earlier 
settings? (How would that work with xml setups?)

Best,
Denis
___
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] Keep the right margin in [nothyphenated, flushleft] columns

2022-08-12 Thread Marcin Ciura via ntg-context
Dear list,

I am typesetting [nothyphenated,flushleft] text in two columns. Some words
stick through the right margin of the left column, sometimes even
overlapping the right column. How can I make Context obey the right margin?

The MWE is below.

Here is the output PDF:
https://live.contextgarden.net/cgi-bin/result.cgi?id=UnSfnS


Best regards,

Marcin


\setupalign[nothyphenated,flushleft]

\starttext

\startitemize[n,nowhite,columns,two]

% The word '(boków' sticks through the right

% margin of the left column.

\item {\bf Wielokąt} to figura na płaszczyźnie,

której brzeg składa się z~odcinków

({\bf boków wielokąta}).

Końce boków nazywamy wierzchołkami wielokąta.

Czasem wyróżniamy jeden bok,

nazywając go podstawą wielokąta.

\stopitemize

\stoptext
___
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] Forbid footnotes from splitting across pages

2022-08-03 Thread Hamid,Idris via ntg-context
Dear Pablo,

Many thanks and apologies for top-posting: my normal email client is currently 
down.

I thought of something similar; after some testing, this is what I finally came 
up with:

\setupwhitespace[medium]
\setupnotation[footnote]
 [before={%
  
\startframedtext[none][frame=on,offset=none,width=\textwidth,style={\setupwhitespace[medium]}]},
  after={\stopframedtext\blank[medium]}]

\starttext
\input ward\
\startfootnote
\input knuth
\stopfootnote{}
\dorecurse{3}{\input ward\ }
\startfootnote
\input knuth
\stopfootnote{}
\dorecurse{2}{\input ward\ }
\startfootnote
\input knuth
\stopfootnote{}
\dorecurse{3}{\input ward\ }
\startfootnote
\input knuth
\stopfootnote{}
\stoptext

It works but there must be a cleaner way..

Observation: The first argument of  \startframedtext is important, otherwise 
too much extra space is generated -- not sure why but the 
\startframedtext[none] suppresses it.

Endnotes are evil 

But the reason for this is that I'm converting to WORD using Abobe and 
NitroPDF, and I'm trying to make things as easy for the editor of the book as 
easy as possible. The conversion will look right but the dozens of footnotes 
will, of course, be unlinked. If no footnote crosses the page it will be easier 
to edit in WORD -- which I'm not touching!

Thanks again.

Best wishes
Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80523


From: ntg-context  on behalf of Pablo Rodriguez via 
ntg-context 
Sent: Wednesday, August 3, 2022 7:47 AM
To: Idris Samawi Hamid ادريس سماوي حامد via ntg-context 
Cc: Pablo Rodriguez 
Subject: Re: [NTG-context] Forbid footnotes from splitting across pages

** Caution: EXTERNAL Sender **

On 8/3/22 03:05, Idris Samawi Hamid ادريس سماوي حامد via ntg-context wrote:
> Dear gang,
>
> Objectives:
>
> i)  Prevent footnotes from splitting across a page or pagebreak

Dear Idris,

I wonder whether a \framed[offset=none, frame=off, width=\textwidth]
would make sense here.

At least, it would prevent page breaks.

> ii) Make sure that the footnote reference number in the main text is
> always on the same page as the footnote.

\setupnote[footnote][split=verystrict, scope=text] might help here.

But it cannot achieve what is practically impossible:

  \setupnote[footnote][split=verystrict, scope=text]

  \starttext
  \dorecurse{25}
{ab cd ef\footnote{\input{knuth}}}
  \stoptext

I know that this depends from the publisher, but in these cases endnotes
are a way more viable option.

Just in case it might help,

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

maillist : ntg-context@ntg.nl / 
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ntg.nl%2Fmailman%2Flistinfo%2Fntg-contextdata=05%7C01%7CIdris.Hamid%40ColoState.EDU%7Ca35bc09dc2a64a5a81ed08da7556aca9%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637951312414526695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=53R%2FGoQs03xamwTP1AaSV%2Flz0ANPdXq%2BScb8LWrCKDY%3Dreserved=0
webpage  : 
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pragma-ade.nl%2Fdata=05%7C01%7CIdris.Hamid%40ColoState.EDU%7Ca35bc09dc2a64a5a81ed08da7556aca9%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637951312414526695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=d0in%2BCdHvJmM4%2FLLb4TSe3HLoUTGm3SV9VWckCFge8c%3Dreserved=0
 / 
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcontext.aanhet.net%2Fdata=05%7C01%7CIdris.Hamid%40ColoState.EDU%7Ca35bc09dc2a64a5a81ed08da7556aca9%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637951312414526695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=0ROMr0be%2Fcjjn7%2B84joQS6VN40i%2BkhEKytb%2FOYfT7Tk%3Dreserved=0
archive  : 
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fphg%2Fcontext-mirror%2Fcommits%2Fdata=05%7C01%7CIdris.Hamid%40ColoState.EDU%7Ca35bc09dc2a64a5a81ed08da7556aca9%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637951312414526695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=KvquRtfyCxBeYRNGwgcjIfJJcc2VFzgMrVblnqx5IiU%3Dreserved=0
wiki : 
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcontextgarden.net%2Fdata=05%7C01%7CIdris.Hamid%40ColoState.EDU%7Ca35bc09dc2a64a5a81ed08da7556aca9%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637951312414526695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=2I9Ld7VLXQUlPOAo96PnWx3ITOX%2BS0arKW%2F

Re: [NTG-context] Workshop at FrOSCon

2022-07-09 Thread Hans Hagen via ntg-context

On 7/9/2022 7:49 PM, Henning Hraban Ramm via ntg-context wrote:

Am 09.07.22 um 19:27 schrieb Henning Hraban Ramm via ntg-context:

Am 09.07.22 um 17:48 schrieb juh+ntg-context--- via ntg-context:
My workshop was accepted. What shall I cover? It's a workshop for 
beginners?

- Installation
- Hello word
What would you cover? Project structure? Style creation?


In my experience, most participants will know LaTeX, i.e. you must 
tell them to forget everything they believe to know about TeX ;P


Oh, and don’t tell them that ConTeXt LMTX is much, much faster than any 
LaTeX, because that’s a secret ;)
yes, we need to cherish the persistent myths (because it hides those 
secrets well)


- context is slow
- context needs too much memory
- context is like plain
- context can't do math
- context uses a runner for management
- context has no documentation
- context is not upward compatible
- context can't be used in production

we need two more for a top-ten

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 / 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] Workshop at FrOSCon

2022-07-09 Thread Henning Hraban Ramm via ntg-context

Am 09.07.22 um 19:27 schrieb Henning Hraban Ramm via ntg-context:

Am 09.07.22 um 17:48 schrieb juh+ntg-context--- via ntg-context:
My workshop was accepted. What shall I cover? It's a workshop for 
beginners?

- Installation
- Hello word
What would you cover? Project structure? Style creation?


In my experience, most participants will know LaTeX, i.e. you must tell 
them to forget everything they believe to know about TeX ;P


Oh, and don’t tell them that ConTeXt LMTX is much, much faster than any 
LaTeX, because that’s a secret ;)


(On the German list TeX-D-L some are discussing if LuaTeX is better than 
pdfTeX/XeTeX, and some are complaining that LuaLaTeX is too slow, of 
course...)


HR

___
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] Workshop at FrOSCon

2022-07-09 Thread Henning Hraban Ramm via ntg-context

Am 09.07.22 um 17:48 schrieb juh+ntg-context--- via ntg-context:
My workshop was accepted. What shall I cover? It's a workshop for 
beginners?

- Installation
- Hello word
What would you cover? Project structure? Style creation?


In my experience, most participants will know LaTeX, i.e. you must tell 
them to forget everything they believe to know about TeX ;P


– Layout, i.e. \setuppapersize, \setuplayout and \showlayout
– Structure, i.e. \startchapter, \startitemize
– Images & Floats, i.e. \externalfigure, \startplacefigure

Project structure makes sense if you have more than one hour.


I think one part will be: Where to find documentation?


Yes.

Tell them there will be a German book next year (I hope...); I’ll send 
you a link off-list.


I guess your Markdown workflow might interest some.


And if you want to join me in the workshop you're welcome!


Sorry.

Hraban
___
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] Workshop at FrOSCon

2022-07-09 Thread juh+ntg-context--- via ntg-context


Am 21.06.22 um 09:37 schrieb juh+ntg-context--- via ntg-context:

Thanks a lot for this offer. Due to my hesitation and my holidays I 
submitted the workshop after the deadline of the FrOSCon CFP so I guess 
that there won't be a ConTeXt workshop this time.


But you never know, often deadlines were extended.

I'll keep you updated.


My workshop was accepted. What shall I cover? It's a workshop for beginners?

- Installation
- Hello word

What would you cover? Project structure? Style creation?

I think one part will be: Where to find documentation?

Any hints appreciated.

And if you want to join me in the workshop you're welcome!

juh
___
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] error with sbl bibliography on latest LMTX

2022-07-09 Thread Joey McCollum via ntg-context
Sorry, these are definitely errors on my part. The first one ("invalid
parent sbl:list:title:unpublished for sbl:list:title:thesis,
sbl:list:title:unpublished defined too") was thankfully an easy fix; I just
had to move \definebtx[sbl:\s!list:title:unpublished] before
\definebtx[sbl:\s!list:title:thesis]. I've now pushed this change to the
repo at https://github.com/jjmccollum/context-sbl.

The second error ("Undefined control sequence \currentbtxloctext") is
unfortunately more puzzling. In an effort to preserve backward
compatibility with biblatex usage, I focused on implementing citations in
the SBL style using \autocite, \inlinecite, \parencite, and \footcite
commands, and I neglected to see if the ConTeXt \cite command would work as
expected.

The \currentbtxloctext macro is used for handling more complicated
situations regarding volume, part, page number, etc. citations; for the
purposes of your MWE (and for most citations) a righttext with the page
number citation should also work just fine, so the lack of a loctext
parameter in the \cite command shouldn't be a problem. The
\currentbtxloctext macro is defined in most of the btx:sbl:cite setups in
publ-imp-sbl.mkvi, always via the command

```
\def\currentbtxloctext{\btxparameter{loctext}}
```

The default value of this parameter and similar ones should be \empty, per
the \definebtx[sbl] command in publ-imp-sbl.mkvi:

```
\definebtx
  [sbl]
  [
  ...
  lefttext=\empty, % empty by default
  altloctext=\empty, %empty by default
  loctext=\empty, %empty by default
  righttext=\empty, % empty by default
  punct=\empty, % trailing punctuation (empty by default)
  ...
  ]
```

If I've coded this correctly, then the loctext parameter should default to
\empty when you do not specify it for your \cite command. This seems to be
the case when you first invoke the \cite command (i.e., in the
btx:sbl:cite:footnote setup).

Here is the problem: if you invoke the btx:sbl:cite:inline setup from
inside the btx:sbl:cite:footnote setup, it seems that the loctext parameter
is no longer accessible, and thus, it does not get defined. If I patch the
btx:sbl:cite:footnote setup as follows, then I no longer get the "Undefined
control sequence \currentbtxloctext" error:

```
% Inline footnote citation setup (with intelligent trailing punctuation
replacement)
\startsetups btx:sbl:cite:footnote
  \removeunwantedspaces

\doifinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}}
  \begingroup
  \letbtxparameter{punct}\empty % don't pass the trailing punctuation down
to the inline setup
  \let\doifendswithpunctelse\btx_sbl_doifendswithpunctelse % why is this
necessary? For some reason, \btx_sbl_doifendswithpunctelse is not
recognized within the footnote environment...
  \def\currentbtxcitealternative{footnote}
  \def\currentbtxcategory{\btxfield{category}}
  \def\currentbtxloctext{\btxparameter{loctext}}
  \def\currentbtxaltloctext{\btxparameter{altloctext}}
  \startfootnote
\Word{\fastsetup{btx:sbl:cite:inline}}% capitalize the first word in
the footnote (needed to render "Ibid." and "Idem" correctly)
% Add a closing period if there is no righttext
\doif{\btxparameter{righttext}}{\empty} {
  \btxperiod
}
  \stopfootnote
  \endgroup

\doifnotinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}}
\stopsetups
```

But I still get errors involving other macros that now appear to be
undefined—specifically, the \btxsblshorthandbeforeloctext macro (and,
likely, the \btxsblvolumebeforeloctext macro, as well). These are initially
defined as "no" in the SBL style module outside of the various citation
alternative setups, but they are conditionally redefined as "yes" in these
setups based on specific information in the bibliographic entry.

This pattern suggests a bigger problem. Do these variables and the \cite
parameters fall out of scope when we enter a footnote environment inside a
setup? In my code, I noticed that a macro defined outside of the
btx:sbl:cite:footnote setup was unrecognized within the footnote
environment unless I freshly redefined it:

```
\let\doifendswithpunctelse\btx_sbl_doifendswithpunctelse % why is this
necessary? For some reason, \btx_sbl_doifendswithpunctelse is not
recognized within the footnote environment...
```

Meanwhile, if I change the default citation alternative to "inline" or
"paren", then everything works:

```

\usebtxdataset[default][references.bib]

\setupbtx[dataset=default]

\usebtxdefinitions[sbl]

\setupbtx[sbl:cite][alternative=paren] % or alternative=inline

\setupinteraction[state=start]


\starttext


superior typographic output \cite[lefttext={e.g.}][taraborelli:beauty].


Therefore, the {\TEX}book mentions that the word

\quotation{shel\noligature{ff}ul} should indeed be rendered without the

ff-ligature \cite[righttext={p.~19}][knuth:texbook].


\placelistofpublica

[NTG-context] error with sbl bibliography on latest LMTX

2022-07-08 Thread Henning Hraban Ramm via ntg-context

Hi Joel (et al.),

I tried the SBL bibliography setup with the latest LMTX; the example and 
bib database are from Dennis’ article on ligatures in the upcoming CG 
journal:


"""
\usebtxdataset[default][references.bib]
\setupbtx[dataset=default]
\usebtxdefinitions[sbl]
\setupinteraction[state=start]

\starttext

superior typographic output \cite[lefttext={e.g.}][taraborelli:beauty].

Therefore, the {\TEX}book mentions that the word 
\quotation{shel\noligature{ff}ul} should indeed be rendered without the 
ff-ligature  \cite[righttext={p.~19}][knuth:texbook].


\placelistofpublications%[numbering=yes]

\stoptext
"""

Unfortunately, I get some errors, while it works with APS and APA:

-- invalid parent sbl:list:title:unpublished for sbl:list:title:thesis, 
sbl:list:title:unpublished defined too (best check it)

-- Undefined control sequence \currentbtxloctext

I installed your files in TEXMFHOME, and apparently, ConTeXt can find 
them. Here’s the shortened log:


system  > ConTeXt  ver: 2022.05.11 11:36 LMTX  fmt: 2022.7.4 
int: english/english

...
open source > level 1, order 2, name './bibtest.tex'
publications> adding bib data to set 'default' from source 
'references.bib'
open source > level 2, order 3, name 
'/Users/hraban/texmf/context/context-sbl/tex/publ-imp-sbl.mkvi'
system  > error: invalid parent sbl:list:title:unpublished for 
sbl:list:title:thesis, sbl:list:title:unpublished defined too (best 
check it)
close source> level 2, order 3, name 
'/Users/hraban/texmf/context/context-sbl/tex/publ-imp-sbl.mkvi'

...
publications> analyzing previous publication run for 'default'
tex error   > tex error on line 34 in file ./bibtest.tex: Undefined 
control sequence \currentbtxloctext


 \22>:btx:sbl:cite:inline
#1->\fastsetup {\s!btx :\s!cite :concat}\fastsetup 
{btx:sbl:cite:lefttext}\begingroup \letbtxparameter {punct}\empty \def 
\currentbtxcitealternative {inline}\def \currentbtxcategory {\btxfield 
{category}}\def \currentbtxloctext

{\btxparameter {loctex
 \normalexpanded
\Word {\fastsetup {btx:sbl:cite:inline}
}\doif {\btxparameter {righttext}}{\empty } {\btxperiod }
 \strc_constructions_register_yes
...constructionparameter \c!referencetext }\iflocation \ifempty 
\currentconstructionbookmark \begingroup \simplifycommands \xdef 
\currentconstructionbookmark {\detokenize \expandafter {\normalexpanded 
{\constructionparameter \c!title

}}}\endgroup  ...
 \strc_notations_start_reference_indeed
[#1]#*#2->\strc_constructions_register [][\c!label 
={\descriptionparameter \c!text },\c!reference ={#1},\c!title 
={#2},\c!bookmark =,\c!list =,\c!referencetext =]

\strc_notations_wrapup
 \22>:btx:sbl:cite:footnote
...ct}}\begingroup \letbtxparameter {punct}\empty \let 
\doifendswithpunctelse \btx_sbl_doifendswithpunctelse \startfootnote 
\Word {\fastsetup {btx:sbl:cite:inline}}\doif {\btxparameter 
{righttext}}{\empty } {\btxperiod }\stopfootnote

\endgroup \do ...

 ...


superior typographic output \cite[lefttext={e.g.}][taraborelli:beauty]
.

The control sequence at the end of the top line of your error message 
was never

\def'ed. You can just continue as I'll forget about whatever was undefined.
mtx-context | fatal error: return code: 1


Did I do something wrong, is the database not suitable for SBL, or is it 
a bug?



Hraban


references.bib
Description: application/bibtex
___
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] Malfunctioning of syllabic partitioning of words in Spanish

2022-07-06 Thread Max Chernoff via ntg-context
I am writing a document in Spanish and I notice that the syllable 
partitioning of words does not conform to the rules of the language. And 
so, for example, the word "limitarse" is partitioned as "lim-itarse" 
(the correct one is "li-mi-tar-se"), "colores" as "col-ores" (instead of 
"co-lo-res"), "abstenerse" as "absten-erse" (and it should be 
"abs-te-ner-se"), etc.


Make sure that you set up the language correctly. Using this test file 
(on today's new upload):


\language[es] % Needed for Spanish hyphenation

\starttext
\hsize=0pt % Hack to force hyphenation

limitarse

colores

abstenerse
\stoptext

I get:

li­-mi­-tar­-se // co­-lo­-res // abs­-te­-ner­-se

I don't know any Spanish, but using your test words, I think that these 
are the expected results.


Using the "pattern" script, I get slightly different results, but it 
still seems correct to me:


$ mtxrun --script pattern --hyphenate --language=es limitarse
[...]
mtx-patterns| es 3 3 : limitarse : limi-tarse

$ mtxrun --script pattern --hyphenate --language=es colores
[...]
mtx-patterns| es 3 3 : colores : colo-res

$ mtxrun --script pattern --hyphenate --language=es abstenerse
[...]
mtx-patterns| es 3 3 : abstenerse : abs-te-nerse

If adding "\language[es]" to your document doesn't help, I believe that 
there are a few Spanish speakers on the list who will know much more 
than I do about setting up the hyphenation.


-- Max
___
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] Malfunctioning of syllabic partitioning of words in Spanish

2022-07-06 Thread Joaquín Ataz López via ntg-context


I am writing a document in Spanish and I notice that the syllable 
partitioning of words does not conform to the rules of the language. And 
so, for example, the word "limitarse" is partitioned as "lim-itarse" 
(the correct one is "li-mi-tar-se"), "colores" as "col-ores" (instead of 
"co-lo-res"), "abstenerse" as "absten-erse" (and it should be 
"abs-te-ner-se"), etc.


These are too many errors; moreover, given that the syllabic 
partitioning rules in Spanish are relatively simple. Is it possible that 
something has been changed in the Spanish language module?
I do not know Lua and therefore I am not in a position to correct the 
corresponding module on my own, but I could synthesize the syllable 
partitioning rules for those who can, if they do not speak Spanish and 
need help in that field.




--
Joaquín Ataz López
Universidad de Murcia | j...@um.es

___
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] Two minor questions

2022-06-07 Thread Stefan Nedeljkovic via ntg-context
I just found out that it's a tex shorthand for an endash. Is there a way to
globally turn that shortcut off?

On Tue, Jun 7, 2022 at 5:20 PM Stefan Nedeljkovic 
wrote:

> Yes I may use them. Why is that a problem? Is it some special context
> syntax? How do I escape them or turn them off?
>
> On Tue, Jun 7, 2022 at 5:05 PM Wolfgang Schuster <
> wolfgang.schuster.li...@gmail.com> wrote:
>
>> Stefan Nedeljkovic schrieb am 07.06.2022 um 07:25:
>> > Thank you very much Wolfgang! But, there is still something weird
>> > going on with the font. I updated the files on Drive. Please see line
>> > 19, the last word "and". It is clearly out of alignment with the gid.
>> > I tested the alignment in MP and it should work, ie 2 characters are
>> > indeed one grid cell (semms from the fact that IBM Plex Mono was
>> > designed from a typewriter typeface where 12 characters are exactly 1
>> > inch long).
>>
>> Do you use double hyphens (--) in your document because this is what
>> causes the problem.
>>
>> Wolfgang
>>
>>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Two minor questions

2022-06-07 Thread Stefan Nedeljkovic via ntg-context
Yes I may use them. Why is that a problem? Is it some special context
syntax? How do I escape them or turn them off?

On Tue, Jun 7, 2022 at 5:05 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Stefan Nedeljkovic schrieb am 07.06.2022 um 07:25:
> > Thank you very much Wolfgang! But, there is still something weird
> > going on with the font. I updated the files on Drive. Please see line
> > 19, the last word "and". It is clearly out of alignment with the gid.
> > I tested the alignment in MP and it should work, ie 2 characters are
> > indeed one grid cell (semms from the fact that IBM Plex Mono was
> > designed from a typewriter typeface where 12 characters are exactly 1
> > inch long).
>
> Do you use double hyphens (--) in your document because this is what
> causes the problem.
>
> Wolfgang
>
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Two minor questions

2022-06-07 Thread Wolfgang Schuster via ntg-context

Stefan Nedeljkovic schrieb am 07.06.2022 um 07:25:
Thank you very much Wolfgang! But, there is still something weird 
going on with the font. I updated the files on Drive. Please see line 
19, the last word "and". It is clearly out of alignment with the gid. 
I tested the alignment in MP and it should work, ie 2 characters are 
indeed one grid cell (semms from the fact that IBM Plex Mono was 
designed from a typewriter typeface where 12 characters are exactly 1 
inch long).


Do you use double hyphens (--) in your document because this is what 
causes the problem.


Wolfgang

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

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


Re: [NTG-context] Two minor questions

2022-06-07 Thread Stefan Nedeljkovic via ntg-context
I tried \setupspacing[fixed] but it didn't help. To prove that the font
characters really are half a cell wide I added the line \emdash
\dorecurse{39}{ \emdash}. Files on drive are updated.

On Tue, Jun 7, 2022 at 7:25 AM Stefan Nedeljkovic 
wrote:

> Thank you very much Wolfgang! But, there is still something weird going on
> with the font. I updated the files on Drive. Please see line 19, the last
> word "and". It is clearly out of alignment with the gid. I tested the
> alignment in MP and it should work, ie 2 characters are indeed one grid
> cell (semms from the fact that IBM Plex Mono was designed from a typewriter
> typeface where 12 characters are exactly 1 inch long).
>
> On Mon, Jun 6, 2022 at 10:52 PM Wolfgang Schuster via ntg-context <
> ntg-context@ntg.nl> wrote:
>
>>
>>
>> Stefan Nedeljkovic via ntg-context schrieb am 06.06.2022 um 22:07:
>> > Wolfgang, Aditya, thank you both very much!
>> >
>> > I have 2 more questions:
>> >
>> > Observe the files here:
>> >
>> https://drive.google.com/drive/folders/18ve5_F-BKOa-TxCWmD02mhPqNXQvNyWK?usp=sharing
>> >
>> > 1. I'd like to shift the text area down so that the red lines
>> > align with the blue lines (I think this amount is called depth). How
>> > would I do that?
>>
>> Quick and dirty:
>>
>> \setuplayout
>>[...,
>> topspace=\dimexpr5\measured{base}+2bp+\strutdp\relax,
>> ...]
>>
>> > 2. The font is such that exactly 2 characters fit into the grid cell,
>> > but I see that towards the end of the line it gets out of sync with
>> > the grid. How would I ensure that all text rendered is strictly
>> > monospaced without any stretching/shrinking trickery?
>>
>> Change the text alignment:
>>
>> \setupalign[flushleft,broad]
>>
>> Wolfgang
>>
>>
>> ___
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>>
>> ___
>>
>
___
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] Contractions in ligature suppression word list

2022-06-07 Thread Denis Maier via ntg-context
A somewhat more complete testfile with a couple of options is below. My context 
installation is not current so please double check, but I think it boils down 
to this:  apostrophes seem not to be considered to be part of a word. Once I 
enable wolfin under \startlanguageoptions[en] it will disable the fi-ligature 
everywhere below, but adding the word variants with an apostroph doesn’t do 
anything, neither to the explicit wordlist under startlanguageoptions, nor in 
one of the additional goodies files.

Denis

Von: Thangalin 
Gesendet: Dienstag, 7. Juni 2022 02:14
An: Maier, Denis Christian (UB) 
Cc: mailing list for ConTeXt users ; Bruce Horrocks 

Betreff: Re: [NTG-context] Contractions in ligature suppression word list

Here's a short example (version 2022.05.11 11:36):

\setuplanguage[en][goodies={lang-en.llg}]

\starttext
  % Expected: no ligature; actual: as expected
  wolfish

  % Expected: no ligatures; actual: ligature
  wolfing
  wolfin'
  wolfin’
\stoptext


%%
%%

\startluacode
-- Testfile for fi ligature over suffix boundary

local testoversuffixboundary = {
  name= "test-over-suffix-boundary",
  options = {
{
patterns = {fi  = "f|i",},
words = [[ wolf ]],
suffixes = [[
in'
in’
]],
},
  },
}

-- Testfile for fi ligature in word with apostroph
local testwithsuffix = {
  name= "test-with-suffix",
  options = {
{
patterns = {fi  = "f|i",},
words = [[ wolfin' wolfin’ ]],
},
  },
}

-- which table do we want to test?
-- table.save("test.llg",testoversuffixboundary)
table.save("test",testwithsuffix)
\stopluacode

\setuplanguage[en][goodies={lang-en.llg,test.llg}]

% explicit suppression
\startlanguageoptions[en]
wolf|in' % this here doesn't do anything
wolf|in’ % this here doesn't do anything either
%wolf|in % this here disables the fi ligature across the board for all the 
words below
\stoplanguageoptions


\mainlanguage[en]

\starttext

% defined in lang-en.llg => works
   wolfish
   wolfing

  % Expected: no ligatures; actual: ligature
  wolfin'
  wolfin’

  % shibboleth
  wolfin

\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] Two minor questions

2022-06-06 Thread Stefan Nedeljkovic via ntg-context
Thank you very much Wolfgang! But, there is still something weird going on
with the font. I updated the files on Drive. Please see line 19, the last
word "and". It is clearly out of alignment with the gid. I tested the
alignment in MP and it should work, ie 2 characters are indeed one grid
cell (semms from the fact that IBM Plex Mono was designed from a typewriter
typeface where 12 characters are exactly 1 inch long).

On Mon, Jun 6, 2022 at 10:52 PM Wolfgang Schuster via ntg-context <
ntg-context@ntg.nl> wrote:

>
>
> Stefan Nedeljkovic via ntg-context schrieb am 06.06.2022 um 22:07:
> > Wolfgang, Aditya, thank you both very much!
> >
> > I have 2 more questions:
> >
> > Observe the files here:
> >
> https://drive.google.com/drive/folders/18ve5_F-BKOa-TxCWmD02mhPqNXQvNyWK?usp=sharing
> >
> > 1. I'd like to shift the text area down so that the red lines
> > align with the blue lines (I think this amount is called depth). How
> > would I do that?
>
> Quick and dirty:
>
> \setuplayout
>[...,
> topspace=\dimexpr5\measured{base}+2bp+\strutdp\relax,
> ...]
>
> > 2. The font is such that exactly 2 characters fit into the grid cell,
> > but I see that towards the end of the line it gets out of sync with
> > the grid. How would I ensure that all text rendered is strictly
> > monospaced without any stretching/shrinking trickery?
>
> Change the text alignment:
>
> \setupalign[flushleft,broad]
>
> Wolfgang
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
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] Contractions in ligature suppression word list

2022-06-06 Thread Thangalin via ntg-context
Here's a short example (version 2022.05.11 11:36):

\setuplanguage[en][goodies={lang-en.llg}]

\starttext
  % Expected: no ligature; actual: as expected
  wolfish

  % Expected: no ligatures; actual: ligature
  wolfing
  wolfin'
  wolfin’
\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] Contractions in ligature suppression word list

2022-06-06 Thread Denis Maier via ntg-context
Could you please share a complete MWE. Makes it easier to test if the problem 
occurs here as well.
Best,
Denis

Von: ntg-context  Im Auftrag von Thangalin via 
ntg-context
Gesendet: Montag, 6. Juni 2022 23:56
An: Bruce Horrocks 
Cc: Thangalin ; mailing list for ConTeXt users 

Betreff: Re: [NTG-context] Contractions in ligature suppression word list

Thanks for the response, Bruce.


1) The file you attached doesn't include the word "wolfing", nor "wolfin". I 
assume they need to be

The suffixes section accounts for this. Wolfing and wolfish both suppress the 
ligature correctly.

I removed the comma separators, good catch. No difference, though.

Looks like I edited 
/opt/context/tex/texmf-context/tex/context/patterns/mkxl/lang-en.llg instead of 
the LMTX file. SMH.

I've now tried both files, lmtx and mkxl:

suffixes = [[
in
in'
in’
ing
]],

Wolfish works fine, the ligature is suppressed as expected. Wolfing, wolfin, 
and wolfin' aren't suppressed. I'd have thought that defining the word "wolf" 
with a suffix of "ing" (and variations thereof) would suppress ligatures at the 
suffix boundary?

Maybe that's not the case. If so, then it means having to define all the *f-ing 
words (heh) a few times for the different suffixes (in', in’, and ing), which 
seems to defeat the purpose of separating suffixes?

Help is appreciated.
___
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] Contractions in ligature suppression word list

2022-06-06 Thread Thangalin via ntg-context
Thanks for the response, Bruce.


1) The file you attached doesn't include the word "wolfing", nor "wolfin".
> I assume they need to be


The suffixes section accounts for this. Wolfing and wolfish both suppress
the ligature correctly.

I removed the comma separators, good catch. No difference, though.

Looks like I edited
/opt/context/tex/texmf-context/tex/context/patterns/mkxl/lang-en.llg
instead of the LMTX file. SMH.

I've now tried both files, lmtx and mkxl:

suffixes = [[
in
in'
in’
ing
]],

Wolfish works fine, the ligature is suppressed as expected. Wolfing,
wolfin, and wolfin' aren't suppressed. I'd have thought that defining the
word "wolf" with a suffix of "ing" (and variations thereof) would suppress
ligatures at the suffix boundary?

Maybe that's not the case. If so, then it means having to define all the
*f-ing words (heh) a few times for the different suffixes (in', in’, and
ing), which seems to defeat the purpose of separating suffixes?

Help is appreciated.
___
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] Contractions in ligature suppression word list

2022-06-06 Thread Bruce Horrocks via ntg-context


> On 6 Jun 2022, at 06:37, Thangalin via ntg-context  wrote:
> 
> Attached are tweaked endings for words like "wolf" to include contracted 
> endings, but they are being ignored. This makes for a minor inconsistency:
> 
>   wolfing -- no ligature
>   wolfish -- no ligature
>   wolfin -- no ligature (incorrect spelling, though)
>   wolfin' -- ligature
> 
> Any ideas? I tried adding various -in suffixes without luck:
> 
> suffixes = [[
> in,
> in',
> in’,
> ing
> ]],
> 
> See https://wiki.contextgarden.net/Ligatures#Word_suppression for an example 
> usage.
> 
> Thank you!
> 

I'm probably missing something here but...

1) The file you attached doesn't include the word "wolfing", nor "wolfin". I 
assume they need to be added into the f|i section? Wolfish *is* present so I'm 
not sure why it's being ignored unless there is an error being generated as a 
result of point (2) below, causing the whole file to be ignored.

2) Your suffixes list has comma separators - all the other word lists use 
whitespace as a separator.

3) Lastly, dumb question but... have you checked that you edited the right 
file? In my ConTeXt install there are two "lang-en.llg" files - one under 
/context-osx-64/tex/texmf-context/tex/context/patterns/lmtx and the other 
under .../patterns/mkxl

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


[NTG-context] Contractions in ligature suppression word list

2022-06-05 Thread Thangalin via ntg-context
Attached are tweaked endings for words like "wolf" to include contracted
endings, but they are being ignored. This makes for a minor inconsistency:

  wolfing -- no ligature
  wolfish -- no ligature
  wolfin -- no ligature (incorrect spelling, though)
  wolfin' -- ligature

Any ideas? I tried adding various -in suffixes without luck:

suffixes = [[
in,
in',
in’,
ing
]],

See https://wiki.contextgarden.net/Ligatures#Word_suppression for an
example usage.

Thank you!


lang-en.llg
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 / 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 include a file with table data within a table?

2022-05-29 Thread Wolfgang Schuster via ntg-context

I sent a fix to the dev list.

Wolfgang

Joel via ntg-context schrieb am 29.05.2022 um 18:34:
After a recent update to ConTeXt, the code no longer seems to allow me 
to \input a file within a table:


\starttext
\starttabulate[|p(.3\textwidth)|p(.7\textwidth)|]
 \HL
        \NC {\bf Term} \NC {\bf Definition} \NC\NR
    \HL
        \input test2.tex %<here you see I have input a file inside 
the table

 \HL
\stoptabulate
\stoptext

File test2.tex contains "\NC {\bf Term} \NC {\bf Definition} \NC\NR".

I also tried defining a macro earlier in the document...

\define[2]\tablewordis{%
    \NC \NC \NC\NR
 \NC #1 \NC #2 \NC\NR
}

...then placing that in test2.tex, e.g.:

\tablewordis{my word}{my definition}

I get the error: " The file ended when scanning an argument."

Before the update, this code worked fine.

How can I \input a file while inside a table environment, as above?

I have a document that has 100s of these inputs in my code, and now 
nothing will compile.


Thanks,

--Joel

 *





___
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 include a file with table data within a table?

2022-05-29 Thread Joel via ntg-context
 Adding the brackets + file name also didn't work.
--Joel

On Sunday, May 29, 2022, 11:33:48 AM MDT, Henning Hraban Ramm via 
ntg-context  wrote:  
 
 Did you try \input{file.tex} ?
(Just an idea, didn’t try.)

Hraban

Am 29.05.22 um 18:34 schrieb Joel via ntg-context:
> After a recent update to ConTeXt, the code no longer seems to allow me 
> to \input a file within a table:
> 
> \starttext
> \starttabulate[|p(.3\textwidth)|p(.7\textwidth)|]
>      \HL
>          \NC {\bf Term} \NC {\bf Definition} \NC\NR
>      \HL
>          \input test2.tex %<here you see I have input a file inside 
> the table
>      \HL
> \stoptabulate
> \stoptext
> 
> File test2.tex contains "\NC {\bf Term} \NC {\bf Definition} \NC\NR".
> 
> I also tried defining a macro earlier in the document...
> 
> \define[2]\tablewordis{%
>      \NC \NC \NC\NR
>      \NC #1 \NC #2 \NC\NR
> }
> 
> ...then placing that in test2.tex, e.g.:
> 
> \tablewordis{my word}{my definition}
> 
> I get the error: " The file ended when scanning an argument."
> 
> Before the update, this code worked fine.
> 
> How can I \input a file while inside a table environment, as above?
> 
> I have a document that has 100s of these inputs in my code, and now 
> nothing will compile.
> 
> Thanks,
> 
> --Joel
___
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 include a file with table data within a table?

2022-05-29 Thread Henning Hraban Ramm via ntg-context

Did you try \input{file.tex} ?
(Just an idea, didn’t try.)

Hraban

Am 29.05.22 um 18:34 schrieb Joel via ntg-context:
After a recent update to ConTeXt, the code no longer seems to allow me 
to \input a file within a table:


\starttext
\starttabulate[|p(.3\textwidth)|p(.7\textwidth)|]
     \HL
         \NC {\bf Term} \NC {\bf Definition} \NC\NR
     \HL
         \input test2.tex %<here you see I have input a file inside 
the table

     \HL
\stoptabulate
\stoptext

File test2.tex contains "\NC {\bf Term} \NC {\bf Definition} \NC\NR".

I also tried defining a macro earlier in the document...

\define[2]\tablewordis{%
     \NC \NC \NC\NR
     \NC #1 \NC #2 \NC\NR
}

...then placing that in test2.tex, e.g.:

\tablewordis{my word}{my definition}

I get the error: " The file ended when scanning an argument."

Before the update, this code worked fine.

How can I \input a file while inside a table environment, as above?

I have a document that has 100s of these inputs in my code, and now 
nothing will compile.


Thanks,

--Joel

___
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] How to include a file with table data within a table?

2022-05-29 Thread Joel via ntg-context
After a recent update to ConTeXt, the code no longer seems to allow me to 
\input a file within a table:
\starttext
\starttabulate[|p(.3\textwidth)|p(.7\textwidth)|]
    \HL
        \NC {\bf Term} \NC {\bf Definition} \NC\NR                
    \HL
        \input test2.tex %<here you see I have input a file inside the table
    \HL
\stoptabulate
\stoptext
File test2.tex contains "\NC {\bf Term} \NC {\bf Definition} \NC\NR".
I also tried defining a macro earlier in the document...
\define[2]\tablewordis{%
    \NC \NC \NC\NR
    \NC #1 \NC #2 \NC\NR
}
...then placing that in test2.tex, e.g.:
\tablewordis{my word}{my definition}

I get the error: " The file ended when scanning an argument."
Before the update, this code worked fine.
How can I \input a file while inside a table environment, as above?
I have a document that has 100s of these inputs in my code, and now nothing 
will compile.

Thanks,
--Joel
   
   -


___
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] \placenotes ends up in wrong place when mixing one- and two- column layouts.

2022-05-10 Thread Zhichu Chen via ntg-context

Thanks Hans, works perfectly.


Sorry for the late reply. Still working on the template and got another 
one. Again, sorry.



The journal is in two-column form and the title, authors, and addresses 
are spanned to


the full width. Very common. But the title may acknowledge to some 
fund(s) and the


authors may have email addresses. If I use \note[thanks] and 
\note[email] to do that,


only the markers are shown. That's expected. So I tried to put 
\postponenotes before


the title and insert\placenotes[thanks] and \placenotes[email] after 
\startcolumns. The


notes did show up but in wrong position.


I hope there's another magic switch, or I have to put the marks in the 
title head and


put "real" but invisible notes in the two-column texts.



Thanks again, Hans.


Yours,

Zhichu


MWE (not that minimal):

===

\definenote[address]
\setupnote[address][rule=off,location=text]

\definenote[thanks]
\setupnote[thanks][location=firstcolumn]
\setupnotation[thanks][numberconversion=set 2]
\definenote[email][thanks]


\definenamespace
   [addr]
   [type=module,
    name=address,
    command=yes,
    setup=list,
    parent=addr,
  ]

\define[1]\useaddress
    {\edef\currentaddress{#1}%
 {\setnotetext[address][#1]{\addressparameter{name}}}%
    \endgraf
    }

\starttext


\setupaddress[style=italic]
\defineaddress[fst][name={Name of Institute or Affiliation, City, Country}]
\defineaddress[snd][name={Name of Secondary Institute or Affiliation, 
City, Country}]


\processcommacommand[fst,snd]\useaddress

\postponenotes

The Title\thanks{Work supported by somebody.}

%\startlocalnotes[address]
Me\email{myemail@some.where}\high{,}\note[address][fst]\high{,}\note[address][snd]
%\placelocalnotes[address]
%\stoplocalnotes

\placenotes[address]

\startcolumns

\placenotes[thanks]
\placenotes[email]


\input knuth
\stopcolumns

\stoptext

===


On 5/8/22 17:20, Hans Hagen via ntg-context wrote:

On 5/8/2022 6:55 AM, Zhichu via ntg-context wrote:

Hi,

I am going to convince the Board of a journal to consider ConTeXt as 
an additional option.
I want to make a module before I say anything. Right now I have this 
title problem.


The journal requires the titles to be CAPITALISED, except for the 
acronyms. I'm currently
using backticks`...`to wrap it and replace it with\egroup 
...\WORD\bgroup{} with
lpeg. This kinda works, but that's so ugly. Besides, the actual story 
is that I also want to

add markdown as an option, so the backticks actually have meanings.

I also checked thetypo-cap.luafile to get a clue. But I used to use 
TeX exclusively

and I have to admit that it's so overwhelming for a newbie.

I really like the way wherebibtextreats words enclosed in curly 
braces are ignored.
Or are there something that's less aggressive than\WORDso the LaTeX 
trick works:

\def\NoCaseChange#1{\noexpand\NoCaseChange{\noexpand#1}}

\starttext

\protected\def\casing[#1]{\groupedcommand{\setcharactercasing[#1]}{}}
    \protected\def\nocasing 
{\groupedcommand{\setcharactercasing[reset]}{}}


    \setuphead[chapter][textstyle=\WORD]

    \chapter{some \nocasing{kept} text or \casing[Word]{more} text}

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


___
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] Is there a "smart" capitalisation implementation?

2022-05-08 Thread Hans Hagen via ntg-context

On 5/8/2022 6:55 AM, Zhichu via ntg-context wrote:

Hi,

I am going to convince the Board of a journal to consider ConTeXt as an 
additional option.
I want to make a module before I say anything. Right now I have this 
title problem.


The journal requires the titles to be CAPITALISED, except for the 
acronyms. I'm currently
using backticks`...`to wrap it and replace it with\egroup 
...\WORD\bgroup{} with
lpeg. This kinda works, but that's so ugly. Besides, the actual story is 
that I also want to

add markdown as an option, so the backticks actually have meanings.

I also checked thetypo-cap.luafile to get a clue. But I used to use TeX 
exclusively

and I have to admit that it's so overwhelming for a newbie.

I really like the way wherebibtextreats words enclosed in curly braces 
are ignored.
Or are there something that's less aggressive than\WORDso the LaTeX 
trick works:

\def\NoCaseChange#1{\noexpand\NoCaseChange{\noexpand#1}}

\starttext

\protected\def\casing[#1]{\groupedcommand{\setcharactercasing[#1]}{}}
\protected\def\nocasing 
{\groupedcommand{\setcharactercasing[reset]}{}}


\setuphead[chapter][textstyle=\WORD]

\chapter{some \nocasing{kept} text or \casing[Word]{more} text}

\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] Is there a "smart" capitalisation implementation?

2022-05-07 Thread Zhichu via ntg-context
Hi,

I am going to convince the Board of a journal to consider ConTeXt as an 
additional option.
I want to make a module before I say anything. Right now I have this title 
problem.

The journal requires the titles to be CAPITALISED, except for the acronyms. I'm 
currently
using backticks `...` to wrap it and replace it with \egroup ...\WORD\bgroup{} 
with
lpeg. This kinda works, but that's so ugly. Besides, the actual story is that I 
also want to
add markdown as an option, so the backticks actually have meanings.

I also checked the typo-cap.lua file to get a clue. But I used to use TeX 
exclusively
and I have to admit that it's so overwhelming for a newbie.

I really like the way where bibtex treats words enclosed in curly braces are 
ignored.
Or are there something that's less aggressive than \WORD so the LaTeX trick 
works:
\def\NoCaseChange#1{\noexpand\NoCaseChange{\noexpand#1}}

Best wishes,
ℤhichu ℂhen

___
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 do I define a smallcaps font?

2022-04-25 Thread Joel via ntg-context
 Replacing \smallcaps with \sc fixed it. I had assumed they were synonyms---the 
same as \bf vs \boldface, \it vs \italicface, but it seems they are different 
entirely?
Thanks!
--Joel

On Sunday, April 24, 2022, 11:19:10 AM MDT, Henning Hraban Ramm via 
ntg-context  wrote:  
 
 Am 24.04.22 um 16:21 schrieb Joel via ntg-context:
> I have a font that already comes with a smallcaps variant.
> 
> How do I define it?
> 
> I've tried the following, which I think should work from the 
> documentation I've seen, but doesn't:
> 
> 
> \starttypescript[serif]                            [garamond]
>      \definefontsynonym[Serif]                  
>   [file:/home/joel/.fonts/12/EBGaramond-Regular.otf]
>      \definefontsynonym[SerifBold]              
>   [file:/home/joel/.fonts/12/EBGaramond-Bold.otf]
>      \definefontsynonym[SerifItalic]              
>   [file:/home/joel/.fonts/12/EBGaramond-Italic.otf]
>      \definefontsynonym[SerifBoldItalic]          
>   [file:/home/joel/.fonts/12/EBGaramond-BoldItalic.otf]
>      \definefontsynonym[SerifCaps]              
>   [file:/home/joel/.fonts/13/EBGaramond12-AllSC.otf]
> \stoptypescript
> 
> \starttypescript[sans]                            [garamond]
>      \definefontsynonym[Sans]                  
>   [file:/home/joel/.fonts/12/EBGaramond-Regular.otf]
>      \definefontsynonym[SansBold]              
>   [file:/home/joel/.fonts/12/EBGaramond-Bold.otf]
>      \definefontsynonym[SansItalic]              
>   [file:/home/joel/.fonts/12/EBGaramond-Italic.otf]
>      \definefontsynonym[SansBoldItalic]          
>   [file:/home/joel/.fonts/12/EBGaramond-BoldItalic.otf]
>      \definefontsynonym[SansCaps]              
>   [file:/home/joel/.fonts/13/EBGaramond12-AllSC.otf]
> \stoptypescript
> 
> \starttypescript[garamond]
>      \definetypeface[garamond]                  
>   [rm][serif][garamond][default]
>      \definetypeface[garamond]                  
>   [ss][sans][garamond][default]
>      \definetypeface[garamond]                  
>   [mm][math][modern][default]
> \stoptypescript
> 
> \starttext
> 
>      This is regular text.
> 
>      {\smallcaps This should be in smallcaps.}
> 
>      {\WORD This should be regular text, but capitalized, not really 
> smallcaps.}
> 
> \stoptext

SerifCaps etc. works with the traditional \sc, don’t know about \smallcaps.

Are you sure your fonts are found?

mtxrun --script fonts --list --all --pattern=EBGaramond


If your regular OpenType font contains smallcaps, try:

\definefontfeature[mysmallcaps][default][
  smcp=yes, % smallcaps
  script=latn,
]

\starttypescript [serif] [garamond] [name]
...
\definefontsynonym [SerifCaps][EBGaramond-Regular][features=mysmallcaps]
...


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] How do I define a smallcaps font?

2022-04-24 Thread Henning Hraban Ramm via ntg-context

Am 24.04.22 um 16:21 schrieb Joel via ntg-context:

I have a font that already comes with a smallcaps variant.

How do I define it?

I've tried the following, which I think should work from the 
documentation I've seen, but doesn't:



\starttypescript[serif]                            [garamond]
     \definefontsynonym[Serif]   
  [file:/home/joel/.fonts/12/EBGaramond-Regular.otf]
     \definefontsynonym[SerifBold]   
  [file:/home/joel/.fonts/12/EBGaramond-Bold.otf]
     \definefontsynonym[SerifItalic]   
  [file:/home/joel/.fonts/12/EBGaramond-Italic.otf]
     \definefontsynonym[SerifBoldItalic]   
  [file:/home/joel/.fonts/12/EBGaramond-BoldItalic.otf]
     \definefontsynonym[SerifCaps]   
  [file:/home/joel/.fonts/13/EBGaramond12-AllSC.otf]

\stoptypescript

\starttypescript[sans]                            [garamond]
     \definefontsynonym[Sans]   
  [file:/home/joel/.fonts/12/EBGaramond-Regular.otf]
     \definefontsynonym[SansBold]   
  [file:/home/joel/.fonts/12/EBGaramond-Bold.otf]
     \definefontsynonym[SansItalic]   
  [file:/home/joel/.fonts/12/EBGaramond-Italic.otf]
     \definefontsynonym[SansBoldItalic]   
  [file:/home/joel/.fonts/12/EBGaramond-BoldItalic.otf]
     \definefontsynonym[SansCaps]   
  [file:/home/joel/.fonts/13/EBGaramond12-AllSC.otf]

\stoptypescript

\starttypescript[garamond]
     \definetypeface[garamond]   
  [rm][serif][garamond][default]
     \definetypeface[garamond]   
  [ss][sans][garamond][default]
     \definetypeface[garamond]   
  [mm][math][modern][default]

\stoptypescript

\starttext

     This is regular text.

     {\smallcaps This should be in smallcaps.}

     {\WORD This should be regular text, but capitalized, not really 
smallcaps.}


\stoptext


SerifCaps etc. works with the traditional \sc, don’t know about \smallcaps.

Are you sure your fonts are found?

mtxrun --script fonts --list --all --pattern=EBGaramond


If your regular OpenType font contains smallcaps, try:

\definefontfeature[mysmallcaps][default][
  smcp=yes, % smallcaps
  script=latn,
]

\starttypescript [serif] [garamond] [name]
...
\definefontsynonym [SerifCaps][EBGaramond-Regular][features=mysmallcaps]
...


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
___


[NTG-context] How do I define a smallcaps font?

2022-04-24 Thread Joel via ntg-context
I have a font that already comes with a smallcaps variant.
How do I define it?
I've tried the following, which I think should work from the documentation I've 
seen, but doesn't:

\starttypescript[serif]                            [garamond]
    \definefontsynonym[Serif]                    
[file:/home/joel/.fonts/12/EBGaramond-Regular.otf]
    \definefontsynonym[SerifBold]                
[file:/home/joel/.fonts/12/EBGaramond-Bold.otf]
    \definefontsynonym[SerifItalic]                
[file:/home/joel/.fonts/12/EBGaramond-Italic.otf]
    \definefontsynonym[SerifBoldItalic]            
[file:/home/joel/.fonts/12/EBGaramond-BoldItalic.otf]
    \definefontsynonym[SerifCaps]                
[file:/home/joel/.fonts/13/EBGaramond12-AllSC.otf]
\stoptypescript

\starttypescript[sans]                            [garamond]
    \definefontsynonym[Sans]                    
[file:/home/joel/.fonts/12/EBGaramond-Regular.otf]
    \definefontsynonym[SansBold]                
[file:/home/joel/.fonts/12/EBGaramond-Bold.otf]
    \definefontsynonym[SansItalic]                
[file:/home/joel/.fonts/12/EBGaramond-Italic.otf]
    \definefontsynonym[SansBoldItalic]            
[file:/home/joel/.fonts/12/EBGaramond-BoldItalic.otf]
    \definefontsynonym[SansCaps]                
[file:/home/joel/.fonts/13/EBGaramond12-AllSC.otf]
\stoptypescript

\starttypescript[garamond]
    \definetypeface[garamond]                    [rm][serif][garamond][default]
    \definetypeface[garamond]                    [ss][sans][garamond][default]
    \definetypeface[garamond]                    [mm][math][modern][default]
\stoptypescript

\starttext

    This is regular text.

    {\smallcaps This should be in smallcaps.}

    {\WORD This should be regular text, but capitalized, not really smallcaps.}

\stoptext
--Joel
___
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] Why can I no longer place \input inside table after update?

2022-04-23 Thread Joel via ntg-context
After I ran an update on ConTeXt, my code gets an error:
\starttext
\starttabulate[|p(.3\textwidth)|p(.7\textwidth)|]
    \HL
        \NC {\bf Term} \NC {\bf Definition} \NC\NR                
    \HL
        \input test2.tex
    \HL
\stoptabulate
\stoptext
File test2.tex contains "\NC {\bf Term} \NC {\bf Definition} \NC\NR".
I also tried defining a macro earlier in the document...
\define[2]\tablewordis{%
    \NC \NC \NC\NR
    \NC #1 \NC #2 \NC\NR
}
...then placing that in test2.tex, e.g.:
\tablewordis{my word}{my definition}

I get the error: " The file ended when scanning an argument."
Before the update, this code worked fine.
How can I \input a file while inside a table environment, as above?
Thanks,
--Joel
___
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] Word wrap of 'part' titles

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


> On 18 Apr 2022, at 22:10, Wolfgang Schuster via ntg-context 
>  wrote:
> 
> Bruce Horrocks via ntg-context schrieb am 18.04.2022 um 22:46:
>> In the MWE below the 'part' title is centred but on one line only and, 
>> because it is a long title, the beginning and end are lost off the sides of 
>> the page.
>> 
>> If it were a 'chapter' title then I could insert '\\' to cause a line break 
>> at that point. However this does not seem to work for 'part'.
>> 
>> Is there a way of making 'part' titles wrap the same way that 'chapter' 
>> titles do?
>> 
>> % ---begin---
>> \define[2]\placePartTitle{\midaligned{#2}}
>> 
>> \definehead [Part] [part]
>> \setuphead[Part]
>> [ placehead=yes,
>> style={\tfd},
>> command=\placePartTitle,
>> ]
> 
> \setuphead
> [Part]
> [placehead=yes,
> style=\tfd,
> align=middle,
> number=no]

Thanks very much for the quick and helpful reply.

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


[NTG-context] How to create a more human-readable syntax for displaying workbook activities?

2022-04-18 Thread Joel via ntg-context
I am creating a student workbook. There are ~30 chapters, each containing ~20 
activities, called "Activity A", "Activity B", and so on.

The `workbook.tex` itself uses a recurse function, so it prints chapter 1-30. 
The reason I use this, is if I need to do a fast test of the code, I can 
compile a specific range of chapters, not the whole workbook.

\define\activityA{}
\define\activityB{}

\dostepwiserecurse{1}{30}{1}{

    \chapter{\recurselevel}
        \activityA
        \activityB
}

\activityA prints the workbook activity "Activity A".
\activityB prints the workbook activity "Activity B".

The problem comes in that some activities have varied versions. Just as an 
example, "Activity C might be a crossword puzzle in some chapters, but a word 
search in other chapters. My poor solution has been to use registercyclist:

\define\altCa{print a crossword}
\define[3]\altCb{print a word search}
\registercyclelist{activityClist}{\altCa, \altCb{}{}{}, \altCb{}{}{}}
\define\activityC{%
    \usecyclelist{activityClist}
}

This code works okay, but becomes broken if I try to change the page range in 
`dostepwiserecurse` when testing my code. The other problem is the syntax is 
super messy. Within this single line, tones of data is crammed in:

\registercyclelist{activityClist}{\altCa, \altCb{}{}{}, \altCb{}{}{}}
...not only is it not easy to read which chapter gets which activity, I also 
have to fill in the {}{}{} with data, making it more difficult to read.

How can I create a much cleaner, human-readable syntax for storing this? Is 
there some simpler way to tell ConTeXt Chapter 1 gets one variant, Chapter 2, 
3, and 4 get another, etc.?

___
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] Word wrap of 'part' titles

2022-04-18 Thread Aditya Mahajan via ntg-context
On Mon, 18 Apr 2022, Wolfgang Schuster via ntg-context wrote:

> Bruce Horrocks via ntg-context schrieb am 18.04.2022 um 22:46:
> > In the MWE below the 'part' title is centred but on one line only and,
> because it is a long title, the beginning and end are lost off the sides of
> the page.
> >
> > If it were a 'chapter' title then I could insert '\\' to cause a line break
> at that point. However this does not seem to work for 'part'.
> >
> > Is there a way of making 'part' titles wrap the same way that 'chapter'
> titles do?
> >
> > % ---begin---
> > \define[2]\placePartTitle{\midaligned{#2}}
> >
> > \definehead [Part] [part]
> > \setuphead[Part]
> >[ placehead=yes,
> >  style={\tfd},
> >  command=\placePartTitle,
> >]
> 
> \setuphead
>    [Part]
>    [placehead=yes,
>     style=\tfd,
>     align=middle,
>     number=no]

Or use:

align={middle,broad},

which has slightly better alignment for titles, IMHO. There is also 
`alternative=middle`. 

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
___


Re: [NTG-context] Word wrap of 'part' titles

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

Bruce Horrocks via ntg-context schrieb am 18.04.2022 um 22:46:

In the MWE below the 'part' title is centred but on one line only and, because 
it is a long title, the beginning and end are lost off the sides of the page.

If it were a 'chapter' title then I could insert '\\' to cause a line break at 
that point. However this does not seem to work for 'part'.

Is there a way of making 'part' titles wrap the same way that 'chapter' titles 
do?

% ---begin---
\define[2]\placePartTitle{\midaligned{#2}}

\definehead [Part] [part]
\setuphead[Part]
   [ placehead=yes,
 style={\tfd},
 command=\placePartTitle,
   ]


\setuphead
  [Part]
  [placehead=yes,
   style=\tfd,
   align=middle,
   number=no]

Wolfgang

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

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


[NTG-context] Word wrap of 'part' titles

2022-04-18 Thread Bruce Horrocks via ntg-context
In the MWE below the 'part' title is centred but on one line only and, because 
it is a long title, the beginning and end are lost off the sides of the page.

If it were a 'chapter' title then I could insert '\\' to cause a line break at 
that point. However this does not seem to work for 'part'.

Is there a way of making 'part' titles wrap the same way that 'chapter' titles 
do?

% ---begin---
\define[2]\placePartTitle{\midaligned{#2}}

\definehead [Part] [part]
\setuphead[Part]
  [ placehead=yes,
style={\tfd},
command=\placePartTitle,
  ]
  
\starttext
\startPart[title={A very long part title that needs to be wrapped manually}]
Some body text
\stopPart
\stoptext
%---end---

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


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

2022-04-15 Thread Jeong Dal via ntg-context
/zint to texmf-osx-64/bin .
>> "Yes" to creating the path but "no" to copying. Create a symbolic link 
>> instead.
>> 
>> So, in Terminal:
>> 
>>   $ cd $TEXROOT/tex/texmf-osx-64/bin/lib/luametatex/zint
>> 
>>   # In my case I used the following:
>>   $ ln -s /usr/local/Cellar/zint/2.10.0/lib/libzint.dylib libzint.so
>> 
>>   # For you with Homebrew in a different location, try:
>>   $ ln -s /opt/homebrew/Cellar/zint/2.10.0/lib/libzint.dylib libzint.so
>> 
>> Then steps 4 and 5 as below. I ran the MWE below: the ISBN worked, the ISBNX 
>> didn't, the QR code did. This is on Monterey.
>> 
>>> 4) I ran mtxrun --generate to update the database.
>>> 
>>> 5) I ran the MWE below but no barcode appeared. The console output shows:
>>> 
>>> 
>>> modules > using user prefixed file 'libs-imp-zint'
>>> modules > 'zint' is loaded
>>> 
>>>  however further down the output it gives:
>>> 
>>> 
>>> optional> unable to locate library 'libzint'
>>> 
>>> I have tried renaming libzint2.10.0.0.so to libzint.so, but still no 
>>> barcode. Is their something I am missing? Tips or hints appreciated.
>>> Best Wishes
>>> Keith McKay
>>> 
>>> %% MWE 
>>> \usemodule[zint]
>>> \starttext
>>> \barcode[alternative=isbn,text=9783865419026,width=4cm]
>>> \barcode[alternative=isbnx, text=9783865419026, width=4cm]
>>> \barcode[alternative=qrcode, text={https://wiki.contextgarden.net}, 
>>> width=3cm]
>>> \stoptext
>> —
>> Bruce Horrocks
>> Hampshire, UK
>> 
> -- next part --
> An HTML attachment was scrubbed...
> URL: 
> <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20220412/a5b05969/attachment-0001.htm>
> 
> --
> 
> Message: 2
> Date: Tue, 12 Apr 2022 23:27:43 +0100
> From: Bruce Horrocks 
> To: mailing list for ConTeXt users 
> Cc: Pablo Rodriguez 
> Subject: Re: [NTG-context] fatal error in LMTX
> Message-ID: <5414357e-8929-4a9a-a9fa-f85ef2104...@scorecrow.com>
> Content-Type: text/plain; charset=utf-8
> 
> 
> 
>> On 12 Apr 2022, at 18:14, Pablo Rodriguez via ntg-context 
>>  wrote:
>> 
>> I wonder whether it would be possible that ConTeXt or LuaMeTaTeX could
>> be more verbose about an opened environment that isn’t closed.
> 
> 
> $ mtxrun --script check  filename.tex
> 
> is something I learned from this list.
> 
> —
> Bruce Horrocks
> Hampshire, UK
> 
> 
> 
> --
> 
> Message: 3
> Date: Tue, 12 Apr 2022 23:47:11 +0100
> From: Bruce Horrocks 
> To: Keith McKay 
> Cc: mailing list for ConTeXt users ,
>   monty.l...@gmail.com
> Subject: Re: [NTG-context] Setting up zint on a mac with macOS Montery
>   Version 12.3.1
> Message-ID: <26994114-7e84-4809-986c-70429f4c1...@scorecrow.com>
> Content-Type: text/plain; charset=utf-8
> 
> 
> 
>> 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:
> <https://unix.stackexchange.com/questions/71253/what-should-shouldnt-go-in-zshenv-zshrc-zlogin-zprofile-zlogout>
> 
>> Notes
>> 1) My machine is a mac-mini-M1 with macos Monterey and I'm running the 
>> latest ConTeXt version
>> 2) Bruce noted that my Homebrew was installed in a non-standard location so 
>> I checked on the Hombrew website and it is installed in opt/homebrew for 
>> Apple Silicon i.e the M1 chip. Maybe Bruce's homebrew was installed on an 
>> earlier version.
> 
> Ah, I'm on an Intel Mac which still uses the old approach. Apologies for the 
> red herring.
> 
>> Thanks to Luis and Bruce for their suggestions.
>> Best Wishes
>> Keith McKay
> 
> —
> Bruce Horrocks
> Hampshire, UK
> 
> 
> 
> --
> 
> Messa

Re: [NTG-context] Proper formatting of itemized bullets in ConTeXt

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

cleaned up the example – 

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

  \defineitemgroup
[pitemize]
[command=\Word]

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


  Sreeram


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

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


Re: [NTG-context] Proper formatting of itemized bullets in ConTeXt

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

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

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

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

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

Best,
  Sreeram


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

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


Re: [NTG-context] Proper formatting of itemized bullets in ConTeXt

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

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

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

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

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

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

  Sreeram


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

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


Re: [NTG-context] Spellchecking for ConTeXt user on a Windows platform

2022-04-02 Thread A A via ntg-context
Hi Alain,

Yes that's what I mean, spellchecking any content which is not a control
sequence. That should include things like section titles and footnotes.
Though I'm afraid that might be asking for too much.

I'd rather not make it part of my editor (I use vim) and have it as an
extra step which I can add to something like a Makefile.

Do I need to install all of Libreoffice to gain access to the files you
mention or is there an easier way?

Amine

On Sat, 2 Apr 2022, 13:42 Alain Delmotte via ntg-context, <
ntg-context@ntg.nl> wrote:

> Hi Amine!
>
> Do you mean spellchecking the content of your document (not the ConTeXt
> commands)?
>
> This depends on your editor!
> I use TeXworks and there is spellchecking using the dictionaries of
> LibreOffice. You should copy the .aff and .dicfiles from "C:\Program
> Files\LibreOffice\share\extensions\..." subdirectories to the 
> "C:\Users\\AppData\Roaming\TUG\TeXworks\dictionaries"
> folder (created when installing TeXworks), (I think not in subfolders for
> the different languages).
> You can then ask for spellchecking when you type or not.
>
> I hope this help,
>
> Alain
> Le 2/04/2022 à 09:23, A A via ntg-context a écrit :
>
> Dear All,
>
> I'm currently using ConTeXt on a windows machine. I'd like to incorporate
> some sort of automated spell-checking in my workflow. I've seen that there
> are two options:
>
>1. spell check the .tex source file
>2. spell check the resulting pdf
>
> For the first option many resources online seem to suggest using *aspell.
> aspell* is however not maintained for windows and therefore hopelessly
> out of date. Furthermore many resources online seem to suggest skipping TeX
> and LaTeX control sequences does not always succeed. So I can only imagine
> how poorly it deals with ConTeXt control sequences.
>
> The second option as shown on this StackExchange
> <https://tex.stackexchange.com/questions/42843/is-there-a-spell-check-package-for-latex>
>  post
> suggests using *\loadspellchecklist. *However, on of the arguments to
> this command includes a text file listing - and brace yourself - *all of
> the correctly spelled words*. I find this both an amusing and tragic
> proposition, since I basically need to spellcheck based on *every word in
> a given language.*
>
> What options are out there for someone who would like to do serious
> spellchecking using ConTeXt on Windows platform, using Powershell as my
> command line?
>
> 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
>
> ___
>
___
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] Spellchecking for ConTeXt user on a Windows platform

2022-04-02 Thread Alain Delmotte via ntg-context

  
  
Hi Amine!
Do you mean spellchecking the content
of your document (not the ConTeXt commands)?
This depends on your editor! 
I use TeXworks and there is spellchecking using the dictionaries
of LibreOffice. You should copy the .aff and .dicfiles from
"C:\Program Files\LibreOffice\share\extensions\..."
subdirectories to the "C:\Users\\AppData\Roaming\TUG\TeXworks\dictionaries"
folder (created when installing TeXworks), (I think not in
subfolders for the different languages).
You can then ask for spellchecking when you type or not.
I hope this help,
Alain
  
Le 2/04/2022 à 09:23, A A via
  ntg-context a écrit :


  
  Dear All,


I'm currently using ConTeXt on a windows machine. I'd like
  to incorporate some sort of automated spell-checking in my
  workflow. I've seen that there are two options:

  
spell check the .tex source file
spell check the resulting pdf
  
  For the first option many resources online seem to
suggest using aspell. aspell is however not
maintained for windows and therefore hopelessly out of date.
Furthermore many resources online seem to suggest skipping
TeX and LaTeX control sequences does not always succeed. So
I can only imagine how poorly it deals with ConTeXt control
sequences.
  
  
  The second option as shown on this StackExchange post suggests
using \loadspellchecklist. However, on of the
arguments to this command includes a text file listing - and
brace yourself - all of the correctly spelled words.
I find this both an amusing and tragic proposition, since I
basically need to spellcheck based on every word in a
  given language.


  
What options are out there for someone who would like to do
  serious spellchecking using ConTeXt on Windows platform, using
  Powershell as my command line?


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
___


[NTG-context] Spellchecking for ConTeXt user on a Windows platform

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

I'm currently using ConTeXt on a windows machine. I'd like to incorporate
some sort of automated spell-checking in my workflow. I've seen that there
are two options:

   1. spell check the .tex source file
   2. spell check the resulting pdf

For the first option many resources online seem to suggest using *aspell.
aspell* is however not maintained for windows and therefore hopelessly out
of date. Furthermore many resources online seem to suggest skipping TeX and
LaTeX control sequences does not always succeed. So I can only imagine how
poorly it deals with ConTeXt control sequences.

The second option as shown on this StackExchange
<https://tex.stackexchange.com/questions/42843/is-there-a-spell-check-package-for-latex>
post
suggests using *\loadspellchecklist. *However, on of the arguments to this
command includes a text file listing - and brace yourself - *all of the
correctly spelled words*. I find this both an amusing and tragic
proposition, since I basically need to spellcheck based on *every word in a
given language.*

What options are out there for someone who would like to do serious
spellchecking using ConTeXt on Windows platform, using Powershell as my
command line?

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
___


Re: [NTG-context] new upload / more math

2022-04-01 Thread Willi Egger via ntg-context
Hi Hans,

congrats for this new society! — At this date it is specially hilarious :-)

Happy CMS!

Willi

> On 1 Apr 2022, at 16:30, jdh via ntg-context  wrote:
> 
> 
> 
> Wrong.  The imperial measurement system, may give Europeans a headache, but 
> is NOT obsolete, by any means.  A good chunk of the world use the imperial 
> measurment system and may be required in certain books, depending on a 
> country's standards.
> 
> dh
> 
> -
> 
> 
> Henning Hraban Ramm via ntg-context  wrote:
> 
>> Oh, great work, thank you! (While I keep working with WebCMS and avoid
>> math...)
>> 
>> And I guess you forgot to mention that you discontinued the support
>> for non-metric measures like the obsolete inch, except Potrzebie, of
>> course.
>> 
>> Hraban
>> 
>> Am 01.04.22 um 10:02 schrieb Hans Hagen via ntg-context:
>>> Hi,
>>> As most of you know by now, Mikael and I are working on a math
>>> support upgrade. In order to let users keep up we uploaded a new
>>> version. We have been revisioning some of the more obscure
>>> constructs where we have   no clue of usage, like pmod, bmod,
>>> bordermatrix etc, commands that we   took (and reimplemented)
>>> decades ago from plain TeX or AMS TeX, assuming that these are
>>> standards.
>>> In this release, encouraged by the positive response we received
>>> from users regarding the new simplealignment construction, and in
>>> particular regarding the self-explaining sesac, we have decided to
>>> introduced some new constructs. First out is
>>> \startformula
>>> \startxıɹʇɐɯ
>>> \NC a_1 \NC b_1 \NC c_1 \NR
>>> \NC a_2 \NC b_2 \NC c_2 \NR
>>> \NC a_3 \NC b_3 \NC c_3 \NR
>>> \stopxıɹʇɐɯ
>>> \stopformula
>>> for rotation matrices. This was demanded for some advanced math
>>> courses that Mikael teaches. It might inspire users to come up with
>>> demands that suits their own obscure but nevertheless interesting
>>> math.
>>> At some point we realized that, with (also) scientific publishers
>>> (of math journals) moving to MS Word and Indesign, we operate in a
>>> rather peculiar niche and the fact that we use an upgraded and more
>>> granular math engine, made us wonder how to communicate all these
>>> new features and standards that we set. It is for that reason that
>>> from now on we will operate under the CMS umbrella. That
>>> abbreviation stands for ConTeXt Math Society. It has no funny swirly
>>> TeX logo which itself is a statement: in Unicode math script and
>>> calligraphic alphabets are so messed up that it is impossible to
>>> have a reliable and predictable rendering. We go for Dutch and
>>> Swedish simplicity in the spirit of W.N. Lansburgh: back to the
>>> times before TeX was written (1964). There will be no limits and
>>> boundaries set. (Talking math limits and boundaries: these can
>>> already go everywhere anyway, as can fences.)
>>> So, when we mention CMS, we mean serious math business, but
>>> kindergarten math is also embraced! There are no consequences for
>>> users: ConTeXt users with a proven math track record are
>>> automatically a member, but we are not too picky, everyone is
>>> welcome. We don't have honorary members but Taco (the first ConTeXt
>>> math user) and Aditya (the most experienced   one) might consider
>>> themselves as such. Mikael Sundqvist is the chairman, which is a
>>> livelong appointment. (A nice side effect is that with Arthur living
>>> in Sweden too, that gives us a very strong position in the TeX
>>> landscape there.)
>>> So, today's upload is sort of special: welcome CMS (ConTeXt Math 
>>> Shines), goodbye AMS (American Math Second). Of course we're open
>>> for suggestions and it being an open society all voices will be
>>> heard, but only proper (retro) math cf Lansburgh will be honored. Of
>>> course we only listen to ConTeXt users and, as that package is not
>>> supposed to be used for serious math, we don't bother about the few
>>> publishers left that still do math.
>>> Are we done? Not yet. We're in the middle of (colorful and graphic) 
>>> alignment ornaments and after that we're going to expand and improve
>>> multi-line display formulas and equation numbering.
>>> It will be no coincidence that the cover of Landbur

Re: [NTG-context] new upload / more math

2022-04-01 Thread jdh via ntg-context


Wrong.  The imperial measurement system, may give Europeans a headache, but is 
NOT obsolete, by any means.  A good chunk of the world use the imperial 
measurment system and may be required in certain books, depending on a 
country's standards.

dh

-


Henning Hraban Ramm via ntg-context  wrote:

> Oh, great work, thank you! (While I keep working with WebCMS and avoid
> math...)
> 
> And I guess you forgot to mention that you discontinued the support
> for non-metric measures like the obsolete inch, except Potrzebie, of
> course.
> 
> Hraban
> 
> Am 01.04.22 um 10:02 schrieb Hans Hagen via ntg-context:
> > Hi,
> > As most of you know by now, Mikael and I are working on a math
> > support upgrade. In order to let users keep up we uploaded a new
> > version. We have been revisioning some of the more obscure
> > constructs where we have   no clue of usage, like pmod, bmod,
> > bordermatrix etc, commands that we   took (and reimplemented)
> > decades ago from plain TeX or AMS TeX, assuming that these are
> > standards.
> > In this release, encouraged by the positive response we received
> > from users regarding the new simplealignment construction, and in
> > particular regarding the self-explaining sesac, we have decided to
> > introduced some new constructs. First out is
> > \startformula
> > \startxıɹʇɐɯ
> >    \NC a_1 \NC b_1 \NC c_1 \NR
> >    \NC a_2 \NC b_2 \NC c_2 \NR
> >    \NC a_3 \NC b_3 \NC c_3 \NR
> > \stopxıɹʇɐɯ
> > \stopformula
> > for rotation matrices. This was demanded for some advanced math
> > courses that Mikael teaches. It might inspire users to come up with
> > demands that suits their own obscure but nevertheless interesting
> > math.
> > At some point we realized that, with (also) scientific publishers
> > (of math journals) moving to MS Word and Indesign, we operate in a
> > rather peculiar niche and the fact that we use an upgraded and more
> > granular math engine, made us wonder how to communicate all these
> > new features and standards that we set. It is for that reason that
> > from now on we will operate under the CMS umbrella. That
> > abbreviation stands for ConTeXt Math Society. It has no funny swirly
> > TeX logo which itself is a statement: in Unicode math script and
> > calligraphic alphabets are so messed up that it is impossible to
> > have a reliable and predictable rendering. We go for Dutch and
> > Swedish simplicity in the spirit of W.N. Lansburgh: back to the
> > times before TeX was written (1964). There will be no limits and
> > boundaries set. (Talking math limits and boundaries: these can
> > already go everywhere anyway, as can fences.)
> > So, when we mention CMS, we mean serious math business, but
> > kindergarten math is also embraced! There are no consequences for
> > users: ConTeXt users with a proven math track record are
> > automatically a member, but we are not too picky, everyone is
> > welcome. We don't have honorary members but Taco (the first ConTeXt
> > math user) and Aditya (the most experienced   one) might consider
> > themselves as such. Mikael Sundqvist is the chairman, which is a
> > livelong appointment. (A nice side effect is that with Arthur living
> > in Sweden too, that gives us a very strong position in the TeX
> > landscape there.)
> > So, today's upload is sort of special: welcome CMS (ConTeXt Math 
> > Shines), goodbye AMS (American Math Second). Of course we're open
> > for suggestions and it being an open society all voices will be
> > heard, but only proper (retro) math cf Lansburgh will be honored. Of
> > course we only listen to ConTeXt users and, as that package is not
> > supposed to be used for serious math, we don't bother about the few
> > publishers left that still do math.
> > Are we done? Not yet. We're in the middle of (colorful and graphic) 
> > alignment ornaments and after that we're going to expand and improve
> > multi-line display formulas and equation numbering.
> > It will be no coincidence that the cover of Landburghs book about
> > math typesetting has a prominent 'AWE' embedded in a logo with a
> > lion on top: we hope all users are in awe about what the TeX lion
> > can do.
> > Mikael S & Hans H
> > 
> ___
> 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/contex

Re: [NTG-context] new upload / more math

2022-04-01 Thread Henning Hraban Ramm via ntg-context
Oh, great work, thank you! (While I keep working with WebCMS and avoid 
math...)


And I guess you forgot to mention that you discontinued the support for 
non-metric measures like the obsolete inch, except Potrzebie, of course.


Hraban

Am 01.04.22 um 10:02 schrieb Hans Hagen via ntg-context:

Hi,

As most of you know by now, Mikael and I are working on a math support 
upgrade. In order to let users keep up we uploaded a new version. We 
have been revisioning some of the more obscure constructs where we have 
  no clue of usage, like pmod, bmod, bordermatrix etc, commands that we 
  took (and reimplemented) decades ago from plain TeX or AMS TeX, 
assuming that these are standards.


In this release, encouraged by the positive response we received from 
users regarding the new simplealignment construction, and in particular 
regarding the self-explaining sesac, we have decided to introduced some 
new constructs. First out is


\startformula
\startxıɹʇɐɯ
   \NC a_1 \NC b_1 \NC c_1 \NR
   \NC a_2 \NC b_2 \NC c_2 \NR
   \NC a_3 \NC b_3 \NC c_3 \NR
\stopxıɹʇɐɯ
\stopformula

for rotation matrices. This was demanded for some advanced math courses 
that Mikael teaches. It might inspire users to come up with demands that 
suits their own obscure but nevertheless interesting math.


At some point we realized that, with (also) scientific publishers (of 
math journals) moving to MS Word and Indesign, we operate in a rather 
peculiar niche and the fact that we use an upgraded and more granular 
math engine, made us wonder how to communicate all these new features 
and standards that we set. It is for that reason that from now on we 
will operate under the CMS umbrella. That abbreviation stands for 
ConTeXt Math Society. It has no funny swirly TeX logo which itself is a 
statement: in Unicode math script and calligraphic alphabets are so 
messed up that it is impossible to have a reliable and predictable 
rendering. We go for Dutch and Swedish simplicity in the spirit of W.N. 
Lansburgh: back to the times before TeX was written (1964). There will 
be no limits and boundaries set. (Talking math limits and boundaries: 
these can already go everywhere anyway, as can fences.)


So, when we mention CMS, we mean serious math business, but kindergarten 
math is also embraced! There are no consequences for users: ConTeXt 
users with a proven math track record are automatically a member, but we 
are not too picky, everyone is welcome. We don't have honorary members 
but Taco (the first ConTeXt math user) and Aditya (the most experienced 
  one) might consider themselves as such. Mikael Sundqvist is the 
chairman, which is a livelong appointment. (A nice side effect is that 
with Arthur living in Sweden too, that gives us a very strong position 
in the TeX landscape there.)


So, today's upload is sort of special: welcome CMS (ConTeXt Math 
Shines), goodbye AMS (American Math Second). Of course we're open for 
suggestions and it being an open society all voices will be heard, but 
only proper (retro) math cf Lansburgh will be honored. Of course we only 
listen to ConTeXt users and, as that package is not supposed to be used 
for serious math, we don't bother about the few publishers left that 
still do math.


Are we done? Not yet. We're in the middle of (colorful and graphic) 
alignment ornaments and after that we're going to expand and improve 
multi-line display formulas and equation numbering.


It will be no coincidence that the cover of Landburghs book about math 
typesetting has a prominent 'AWE' embedded in a logo with a lion on top: 
we hope all users are in awe about what the TeX lion can do.


Mikael S & Hans H


___
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] new upload / more math

2022-04-01 Thread Hans Hagen via ntg-context

Hi,

As most of you know by now, Mikael and I are working on a math support 
upgrade. In order to let users keep up we uploaded a new version. We 
have been revisioning some of the more obscure constructs where we have 
 no clue of usage, like pmod, bmod, bordermatrix etc, commands that we 
 took (and reimplemented) decades ago from plain TeX or AMS TeX, 
assuming that these are standards.


In this release, encouraged by the positive response we received from 
users regarding the new simplealignment construction, and in particular 
regarding the self-explaining sesac, we have decided to introduced some 
new constructs. First out is


\startformula
\startxıɹʇɐɯ
  \NC a_1 \NC b_1 \NC c_1 \NR
  \NC a_2 \NC b_2 \NC c_2 \NR
  \NC a_3 \NC b_3 \NC c_3 \NR
\stopxıɹʇɐɯ
\stopformula

for rotation matrices. This was demanded for some advanced math courses 
that Mikael teaches. It might inspire users to come up with demands that 
suits their own obscure but nevertheless interesting math.


At some point we realized that, with (also) scientific publishers (of 
math journals) moving to MS Word and Indesign, we operate in a rather 
peculiar niche and the fact that we use an upgraded and more granular 
math engine, made us wonder how to communicate all these new features 
and standards that we set. It is for that reason that from now on we 
will operate under the CMS umbrella. That abbreviation stands for 
ConTeXt Math Society. It has no funny swirly TeX logo which itself is a 
statement: in Unicode math script and calligraphic alphabets are so 
messed up that it is impossible to have a reliable and predictable 
rendering. We go for Dutch and Swedish simplicity in the spirit of W.N. 
Lansburgh: back to the times before TeX was written (1964). There will 
be no limits and boundaries set. (Talking math limits and boundaries: 
these can already go everywhere anyway, as can fences.)


So, when we mention CMS, we mean serious math business, but kindergarten 
math is also embraced! There are no consequences for users: ConTeXt 
users with a proven math track record are automatically a member, but we 
are not too picky, everyone is welcome. We don't have honorary members 
but Taco (the first ConTeXt math user) and Aditya (the most experienced 
 one) might consider themselves as such. Mikael Sundqvist is the 
chairman, which is a livelong appointment. (A nice side effect is that 
with Arthur living in Sweden too, that gives us a very strong position 
in the TeX landscape there.)


So, today's upload is sort of special: welcome CMS (ConTeXt Math 
Shines), goodbye AMS (American Math Second). Of course we're open for 
suggestions and it being an open society all voices will be heard, but 
only proper (retro) math cf Lansburgh will be honored. Of course we only 
listen to ConTeXt users and, as that package is not supposed to be used 
for serious math, we don't bother about the few publishers left that 
still do math.


Are we done? Not yet. We're in the middle of (colorful and graphic) 
alignment ornaments and after that we're going to expand and improve 
multi-line display formulas and equation numbering.


It will be no coincidence that the cover of Landburghs book about math 
typesetting has a prominent 'AWE' embedded in a logo with a lion on top: 
we hope all users are in awe about what the TeX lion can do.


Mikael S & Hans H

-
  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] Force a hyphenation

2022-03-16 Thread Henning Hraban Ramm via ntg-context

Am 16.03.22 um 16:48 schrieb Willi Egger via ntg-context:

Hi,

at the moment I am dealing with a German text. Although I have 
\mainlanguage[de] in the preamble the word 'des Eiweißes' is hyphenated as 'des 
Eiwei-ßes'. Of course this should be 'des Eiweis-ses'.

How can I make sure that ConTeXt is hyphenating this corerctly?


Sorry, Willi, but that hyphenation is correct, and your suggestion was 
also wrong in the previous iterations of German orthography. Only ck was 
changed to k-k; hyphenation of ß a s-s was only allowed if you replaced 
ß by ss anyway (like in Switzerland).


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
___


Re: [NTG-context] Force a hyphenation

2022-03-16 Thread Thomas A. Schmitz via ntg-context

Hi Willi,

I must admit that after the reform some 20 years ago, I'm no longer 
certain about German rules. But I think that in fact, according to the 
new rules, ß is no longer hyphenated the way you suggest. Duden § 164.3: 
"Ein einzelner Konsonantenbuchstabe im Wortinneren kommt in der Regel 
auf die neue Zeile; von mehreren Konsonantbuchstaben trennt man nur den 
letzten ab.

Zum Beispiel
[…]
Grü-ße, hei-ßen

So Eiwei-ßes may in fact be correct... But I assume that Arthur has some 
authoritative answer to this question.


Best

Thomas


On 3/16/22 16:48, Willi Egger via ntg-context wrote:

Hi,

at the moment I am dealing with a German text. Although I have 
\mainlanguage[de] in the preamble the word 'des Eiweißes' is hyphenated as 'des 
Eiwei-ßes'. Of course this should be 'des Eiweis-ses'.

How can I make sure that ConTeXt is hyphenating this corerctly?

Kind regards
Willi


___
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] Force a hyphenation

2022-03-16 Thread Hans Hagen via ntg-context

On 3/16/2022 4:48 PM, Willi Egger via ntg-context wrote:

Hi,

at the moment I am dealing with a German text. Although I have 
\mainlanguage[de] in the preamble the word 'des Eiweißes' is hyphenated as 'des 
Eiwei-ßes'. Of course this should be 'des Eiweis-ses'.

How can I make sure that ConTeXt is hyphenating this corerctly?


\startexceptions[de]
Eiwei{s-}{s}{ß}es
\stopexceptions

\mainlanguage[de]

\starttext
\hsize 1mm Eiweißes
\stoptext

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] Force a hyphenation

2022-03-16 Thread Willi Egger via ntg-context
Hi,

at the moment I am dealing with a German text. Although I have 
\mainlanguage[de] in the preamble the word 'des Eiweißes' is hyphenated as 'des 
Eiwei-ßes'. Of course this should be 'des Eiweis-ses'.

How can I make sure that ConTeXt is hyphenating this corerctly?

Kind regards
Willi
___
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] help with facing page image

2022-03-07 Thread jbf via ntg-context
Special thanks to Sreeram, Wolfgang, Bruce, Hraban for help with this 
issue, ranging from the simplest 'manual' approach (Bruce) to one that I 
must confess I could never have thought of using: definepageinjection 
(Wolfgang). Needless to say, all contributions work, with a bit of 
adjustment in each case for my particular situation.


The one common factor in all four contributions is the use of setups, so 
a light has begun flashing for me: setups are such an important feature 
of ConTeXt for solving many problems!


Thanks to all,

Julian

On 7/3/22 18:01, śrīrāma wrote:

On Monday, March 7, 2022 11:50 AM jbf wrote:

All ten images are different, though, in my case (Chapter1.jpg,
Chapter2.jpg... Chapter10.jpg all in a pics directory, so I'd point
\setupexternalfigures to that). I wonder if there is a way to list them
so that they get called in order as chapters proceed. A kind of "if such
and such then \setlayer 1,2,3"

I think that should be easy. Suppose you have images
{chap-cover-1.jpg, chap-cover-2.jpg,  ... chap-cover-10.jpg}
each of which appear at the ends of their respective chapters, then the 
following achieves what you want (once you point ConTeXt to the right directory 
for figures of course):

% kate: hl ctx
%%% SOF
   \setuppagenumbering[alternative=doublesided]

   \definelayer
 [chapCover]
 [x=0mm,
  y=0mm,
  width=\paperwidth,
  height=\paperheight,repeat=yes]

   \startsetups chapter:before
   \doifoddpageelse{}
 {\pushbackground[page]
  \resetlayer[chapCover]
  \setlayer
  [chapCover]
  {\determineheadnumber[chapter]
   \externalfigure
 [chap-cover-\currentheadnumber]
 [width=\paperwidth]}
   \setupbackgrounds[page][background=chapCover]
   \page[empty]
   \popbackground}
   \stopsetups

   \startsetups chapter:after
   \doifoddpageelse{}
 {\page[empty]}
   \stopsetups

   \setuphead
 [chapter]
 [page=yes,
  before=\directsetup{chapter:before},
  aftersection=\directsetup{chapter:after}]

   \starttext
   \dorecurse{10}{
 \startchapter[title={Chapter \convertnumber{word}{\recurselevel}}]
   \input knuth
   \ifnum\headnumber[chapter]=5
   {\bfd five}
   \fi
   \blank
   \input tufte
   \blank
   \input ward
   \blank
   \ifnum\recurselevel=5
 \page
 \input zapf
 \input zapf
   \fi
 \stopchapter
   }
   \stoptext
%%% EOF

So we figure out which chapter we are in and then set the layer to the 
corresponding picture. Personally, I much prefer to collect all the images into 
a separate PDF with:

%%% chap-covers.tex
 \starttext
 \dorecurse{10}{\startTEXpage
 \externalfigure[chap-cover-\recurselevel]
 \stopTEXpage}
 \stoptext
%%% EOF

[and get 'chap-covers.pdf' from context]

... and then modify the 'before' setup to read as below

%%%
   \startsetups chapter:before
   \doifoddpageelse{}
 {\pushbackground[page]
  \resetlayer[chapCover]
  \setlayer
  [chapCover]
  {\determineheadnumber[chapter]
   \externalfigure
 [chap-covers]
 [page=\currentheadnumber,width=\paperwidth]}
   \setupbackgrounds[page][background=chapCover]
   \page[empty]
   \popbackground}
   \stopsetups
%%%

Sreeram



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

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


Re: [NTG-context] help with facing page image

2022-03-07 Thread jbf via ntg-context
Appreciate your assistance. I'll do my best with what you offer here. Of 
course, I've always said these images are at the beginning, not "the end 
of their respective chapters" and I've already indicated how the images 
are named, simply as Chapter1.jpg  and so on, so I'll need to work 
around these differences in your example. But with trial and error, 
let's hope I get there!


Thank you,

Julian


On 7/3/22 18:01, śrīrāma wrote:

On Monday, March 7, 2022 11:50 AM jbf wrote:

All ten images are different, though, in my case (Chapter1.jpg,
Chapter2.jpg... Chapter10.jpg all in a pics directory, so I'd point
\setupexternalfigures to that). I wonder if there is a way to list them
so that they get called in order as chapters proceed. A kind of "if such
and such then \setlayer 1,2,3"

I think that should be easy. Suppose you have images
{chap-cover-1.jpg, chap-cover-2.jpg,  ... chap-cover-10.jpg}
each of which appear at the ends of their respective chapters, then the 
following achieves what you want (once you point ConTeXt to the right directory 
for figures of course):

% kate: hl ctx
%%% SOF
   \setuppagenumbering[alternative=doublesided]

   \definelayer
 [chapCover]
 [x=0mm,
  y=0mm,
  width=\paperwidth,
  height=\paperheight,repeat=yes]

   \startsetups chapter:before
   \doifoddpageelse{}
 {\pushbackground[page]
  \resetlayer[chapCover]
  \setlayer
  [chapCover]
  {\determineheadnumber[chapter]
   \externalfigure
 [chap-cover-\currentheadnumber]
 [width=\paperwidth]}
   \setupbackgrounds[page][background=chapCover]
   \page[empty]
   \popbackground}
   \stopsetups

   \startsetups chapter:after
   \doifoddpageelse{}
 {\page[empty]}
   \stopsetups

   \setuphead
 [chapter]
 [page=yes,
  before=\directsetup{chapter:before},
  aftersection=\directsetup{chapter:after}]

   \starttext
   \dorecurse{10}{
 \startchapter[title={Chapter \convertnumber{word}{\recurselevel}}]
   \input knuth
   \ifnum\headnumber[chapter]=5
   {\bfd five}
   \fi
   \blank
   \input tufte
   \blank
   \input ward
   \blank
   \ifnum\recurselevel=5
 \page
 \input zapf
 \input zapf
   \fi
 \stopchapter
   }
   \stoptext
%%% EOF

So we figure out which chapter we are in and then set the layer to the 
corresponding picture. Personally, I much prefer to collect all the images into 
a separate PDF with:

%%% chap-covers.tex
 \starttext
 \dorecurse{10}{\startTEXpage
 \externalfigure[chap-cover-\recurselevel]
 \stopTEXpage}
 \stoptext
%%% EOF

[and get 'chap-covers.pdf' from context]

... and then modify the 'before' setup to read as below

%%%
   \startsetups chapter:before
   \doifoddpageelse{}
 {\pushbackground[page]
  \resetlayer[chapCover]
  \setlayer
  [chapCover]
  {\determineheadnumber[chapter]
   \externalfigure
 [chap-covers]
 [page=\currentheadnumber,width=\paperwidth]}
   \setupbackgrounds[page][background=chapCover]
   \page[empty]
   \popbackground}
   \stopsetups
%%%

Sreeram



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

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


Re: [NTG-context] help with facing page image

2022-03-06 Thread śrīrāma via ntg-context
On Monday, March 7, 2022 11:50 AM jbf wrote:
> All ten images are different, though, in my case (Chapter1.jpg, 
> Chapter2.jpg... Chapter10.jpg all in a pics directory, so I'd point 
> \setupexternalfigures to that). I wonder if there is a way to list them 
> so that they get called in order as chapters proceed. A kind of "if such 
> and such then \setlayer 1,2,3"

I think that should be easy. Suppose you have images 
{chap-cover-1.jpg, chap-cover-2.jpg,  ... chap-cover-10.jpg}
each of which appear at the ends of their respective chapters, then the 
following achieves what you want (once you point ConTeXt to the right directory 
for figures of course):

% kate: hl ctx
%%% SOF
  \setuppagenumbering[alternative=doublesided]

  \definelayer
[chapCover]
[x=0mm,
 y=0mm,
 width=\paperwidth,
 height=\paperheight,repeat=yes]

  \startsetups chapter:before
  \doifoddpageelse{}
{\pushbackground[page]
 \resetlayer[chapCover]
 \setlayer
 [chapCover]
 {\determineheadnumber[chapter]
  \externalfigure
[chap-cover-\currentheadnumber]
[width=\paperwidth]}
  \setupbackgrounds[page][background=chapCover]
  \page[empty]
  \popbackground}
  \stopsetups

  \startsetups chapter:after
  \doifoddpageelse{}
{\page[empty]}
  \stopsetups

  \setuphead
[chapter]
[page=yes,
 before=\directsetup{chapter:before},
 aftersection=\directsetup{chapter:after}]

  \starttext
  \dorecurse{10}{
\startchapter[title={Chapter \convertnumber{word}{\recurselevel}}]
  \input knuth
  \ifnum\headnumber[chapter]=5
  {\bfd five}
  \fi
  \blank
  \input tufte
  \blank
  \input ward
  \blank
  \ifnum\recurselevel=5
\page
\input zapf
\input zapf
  \fi
\stopchapter
  }
  \stoptext
%%% EOF

So we figure out which chapter we are in and then set the layer to the 
corresponding picture. Personally, I much prefer to collect all the images into 
a separate PDF with:

%%% chap-covers.tex
\starttext
\dorecurse{10}{\startTEXpage
\externalfigure[chap-cover-\recurselevel]
\stopTEXpage}
\stoptext
%%% EOF

[and get 'chap-covers.pdf' from context]

... and then modify the 'before' setup to read as below

%%% 
  \startsetups chapter:before
  \doifoddpageelse{}
{\pushbackground[page]
 \resetlayer[chapCover]
 \setlayer
 [chapCover]
 {\determineheadnumber[chapter]
  \externalfigure
[chap-covers]
[page=\currentheadnumber,width=\paperwidth]}
  \setupbackgrounds[page][background=chapCover]
  \page[empty]
  \popbackground}
  \stopsetups
%%%

Sreeram


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

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


Re: [NTG-context] help with facing page image

2022-03-06 Thread jbf via ntg-context
I can see how that works, Sreeram, especially the chapter:after to cope 
with the chapters ending on an even page. Though I will have to try it 
now on a copy of the real document to test it there.


All ten images are different, though, in my case (Chapter1.jpg, 
Chapter2.jpg... Chapter10.jpg all in a pics directory, so I'd point 
\setupexternalfigures to that). I wonder if there is a way to list them 
so that they get called in order as chapters proceed. A kind of "if such 
and such then \setlayer 1,2,3"


Julian

On 7/3/22 16:38, śrīrāma wrote:

On Monday, March 7, 2022 9:19 AM jbf via ntg-context wrote:

Author wants an image on facing page to each of 10 chapters in the
bodypart of the document. Assume that everything else is working
properly for this document (double-sided etc.), but other than before
chapter 1, I can't seem to get my facing page image to appear where it
should!

 From what I understood from your explanation, I have this:

%%% SOF
   % for 'mill'
   \setupexternalfigures[location={default}]

   \setuppagenumbering[alternative=doublesided]

   
\definelayer[mill][x=0mm,y=0mm,width=\paperwidth,height=\paperheight,repeat=yes]
   \setlayer[mill]{\externalfigure[mill][width=\paperwidth]}

   \startsetups chapter:before
   \doifoddpageelse{}
 {\pushbackground[page]
 \setupbackgrounds[page][background=mill]
 \page[empty]
 \popbackground}
   \stopsetups

   \startsetups chapter:after
   \doifoddpageelse{}
 {\page[empty]}
   \stopsetups

   \setuphead
 [chapter]
 [page=yes,
 before=\directsetup{chapter:before},
 aftersection=\directsetup{chapter:after}]

   \starttext
   \dorecurse{10}{
 \startchapter[title={Chapter \convertnumber{word}{\recurselevel}}]
   \input knuth
   \blank
   \input tufte
   \blank
   \input ward
   \blank
   \ifnum\recurselevel=5
 \page
 \input zapf
 \input zapf
   \fi
 \stopchapter
   }
   \stoptext
%%% EOF

[I am just using the mill picture on every facing page of chapter]
If the chapter ends on an even page then we can insert an empty page with 
\page[empty] with [aftersection=...] in \setuphead. The [before=...] is push, 
set background to mill on a new (empty) left page and then pop back (much like 
the example from wiki).

Sreeram



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

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


Re: [NTG-context] help with facing page image

2022-03-06 Thread śrīrāma via ntg-context
On Monday, March 7, 2022 11:08 AM śrīrāma wrote:
> 
> From what I understood from your explanation, I have this:
> 

A formatted version below –

%%% SOF
  % for 'mill'
  \setupexternalfigures[location={default}]

  \setuppagenumbering[alternative=doublesided]

  \definelayer
[mill]
[x=0mm,
 y=0mm,
 width=\paperwidth,
 height=\paperheight,repeat=yes]
  \setlayer
[mill]
{\externalfigure[mill][width=\paperwidth]}

  \startsetups chapter:before
  \doifoddpageelse{}
{\pushbackground[page]
 \setupbackgrounds[page][background=mill]
 \page[empty]
 \popbackground}
  \stopsetups

  \startsetups chapter:after
  \doifoddpageelse{}
{\page[empty]}
  \stopsetups

  \setuphead
[chapter]
[page=yes,
 before=\directsetup{chapter:before},
 aftersection=\directsetup{chapter:after}]

  \starttext
  \dorecurse{10}{
\startchapter[title={Chapter \convertnumber{word}{\recurselevel}}]
  \input knuth
  \blank
  \input tufte
  \blank
  \input ward
  \blank
  \ifnum\recurselevel=5
\page
\input zapf
\input zapf
  \fi
\stopchapter
  }
  \stoptext
%%% EOF

Sreeram


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

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


Re: [NTG-context] help with facing page image

2022-03-06 Thread śrīrāma via ntg-context
On Monday, March 7, 2022 9:19 AM jbf via ntg-context wrote:
> Author wants an image on facing page to each of 10 chapters in the 
> bodypart of the document. Assume that everything else is working 
> properly for this document (double-sided etc.), but other than before 
> chapter 1, I can't seem to get my facing page image to appear where it 
> should!

From what I understood from your explanation, I have this:

%%% SOF
  % for 'mill'
  \setupexternalfigures[location={default}]

  \setuppagenumbering[alternative=doublesided]

  
\definelayer[mill][x=0mm,y=0mm,width=\paperwidth,height=\paperheight,repeat=yes]
  \setlayer[mill]{\externalfigure[mill][width=\paperwidth]}

  \startsetups chapter:before
  \doifoddpageelse{}
{\pushbackground[page]
\setupbackgrounds[page][background=mill]
\page[empty]
\popbackground}
  \stopsetups

  \startsetups chapter:after
  \doifoddpageelse{}
{\page[empty]}
  \stopsetups

  \setuphead
[chapter]
[page=yes,
before=\directsetup{chapter:before},
aftersection=\directsetup{chapter:after}]

  \starttext
  \dorecurse{10}{
\startchapter[title={Chapter \convertnumber{word}{\recurselevel}}]
  \input knuth
  \blank
  \input tufte
  \blank
  \input ward
  \blank
  \ifnum\recurselevel=5
\page
\input zapf
\input zapf
  \fi
\stopchapter
  }
  \stoptext
%%% EOF

[I am just using the mill picture on every facing page of chapter]
If the chapter ends on an even page then we can insert an empty page with 
\page[empty] with [aftersection=...] in \setuphead. The [before=...] is push, 
set background to mill on a new (empty) left page and then pop back (much like 
the example from wiki).

Sreeram


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

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


Re: [NTG-context] Transliteration

2022-02-03 Thread Hans Hagen via ntg-context

On 2/3/2022 8:15 PM, Ivan Pešić via ntg-context wrote:

Hello!
I've been working on a Serbian book and I had to transliterate it from 
cyrillic to latin.
There's been some nice improvement in transliteration, and I would like 
to propose a small change.
One of the peculiarities that current transliteration mechanisms (both 
internal one and the 3rd party module from Philipp Gesang)
don't process is that Љ, Њ and Џ are transliterated to Lj, Nj and Dž in 
normal words that start the sentence, or in names that normally start 
with a capital letter,
but in titles written in all capitals they should be transliterated to 
LJ, NJ and DŽ.
So, the quick solution was to update the current mapping vector and add 
another one (that is attached) that maps cyrillic capitals to LJ, NJ and DŽ

and set the correct 30 letters used in Serbian language.
It requires a bit more manual work to set the correct mapping for all 
capitals text, but it works.
I have also merged the Serbian hyphenation patterns, so there is no need 
to switch the language in order to have hyphenation in transliterated text.
That was possible because cyrillic and latin scripts use different code 
points, and there are no conflicts in patterns.

So I suggest merging the patterns for Serbian cyrillic and latin.


I'd like to hear Arthur / Mojca on that  we can of course load them 
both but if that is an upstream merge i'll wait for that


you can actually map multiple to multiple in the tranmsliteration tables

["foo"] = "oof"

and such and there is in the next version also an exception mechanism 
that permits clone a transliteration and add exceptions


There is another issue if one wants to use a dropcap and the rest of 
that first word, and several following words are to be typeset in small 
caps.
If that first letter is Љ (or other two letters that transliterate as 
digraphs), then the second letter of the digraph is not typeset in small 
caps because

it gets injected before the group that turns on small caps.
For example:

\placeinitial
Љ{\sc уди нису знали}

but this is quite a special case...
you can use \settransliteration{name} locally so as part of a style 
specification (there is also \resettransliteration)


the next upload has some more that Sreeram is currently documenting on 
the wiki


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] Transliteration

2022-02-03 Thread Ivan Pešić via ntg-context

Hello!
I've been working on a Serbian book and I had to transliterate it from 
cyrillic to latin.
There's been some nice improvement in transliteration, and I would like 
to propose a small change.
One of the peculiarities that current transliteration mechanisms (both 
internal one and the 3rd party module from Philipp Gesang)
don't process is that Љ, Њ and Џ are transliterated to Lj, Nj and Dž in 
normal words that start the sentence, or in names that normally start 
with a capital letter,
but in titles written in all capitals they should be transliterated to 
LJ, NJ and DŽ.
So, the quick solution was to update the current mapping vector and add 
another one (that is attached) that maps cyrillic capitals to LJ, NJ and DŽ

and set the correct 30 letters used in Serbian language.
It requires a bit more manual work to set the correct mapping for all 
capitals text, but it works.
I have also merged the Serbian hyphenation patterns, so there is no need 
to switch the language in order to have hyphenation in transliterated text.
That was possible because cyrillic and latin scripts use different code 
points, and there are no conflicts in patterns.

So I suggest merging the patterns for Serbian cyrillic and latin.

There is another issue if one wants to use a dropcap and the rest of 
that first word, and several following words are to be typeset in small 
caps.
If that first letter is Љ (or other two letters that transliterate as 
digraphs), then the second letter of the digraph is not typeset in small 
caps because

it gets injected before the group that turns on small caps.
For example:

   \placeinitial
   Љ{\sc уди нису знали}

but this is quite a special case...

Regards,
Ivan
return {
  transliterations = {
["c2l"] = {
mapping = {
["А"] = "A",  ["а"] = "a",
["Б"] = "B",  ["б"] = "b",
["В"] = "V",  ["в"] = "v",
["Г"] = "G",  ["г"] = "g",
["Д"] = "D",  ["д"] = "d",
["Ђ"] = "Đ",  ["ђ"] = "đ",
["Е"] = "E",  ["е"] = "e",
["Ж"] = "Ž",  ["ж"] = "ž",
["З"] = "Z",  ["з"] = "z",
["И"] = "I",  ["и"] = "i",
["Ј"] = "J",  ["ј"] = "j",
["К"] = "K",  ["к"] = "k",
["Л"] = "L",  ["л"] = "l",
["Љ"] = "Lj",  ["љ"] = "lj",
["М"] = "M",  ["м"] = "m",
["Н"] = "N",  ["н"] = "n",
["Њ"] = "Nj",  ["њ"] = "nj",
["О"] = "O",  ["о"] = "o",
["П"] = "P",  ["п"] = "p",
["Р"] = "R",  ["р"] = "r",
["С"] = "S",  ["с"] = "s",
["Т"] = "T", ["т"] = "t",
["Ћ"] = "Ć",  ["ћ"] = "ć",
["У"] = "U",  ["у"] = "u",
["Ф"] = "F",  ["ф"] = "f",
["Х"] = "H", ["х"] = "h",
["Ц"] = "C",  ["ц"] = "c",
["Ч"] = "Č",  ["ч"] = "č",
["Џ"] = "Dž", ["џ"] = "dž",
["Ш"] = "Š", ["ш"] = "š",
}
},
["C2L"] = {
mapping = {
["А"] = "A",  ["а"] = "a",
["Б"] = "B",  ["б"] = "b",
["В"] = "V",  ["в"] = "v",
["Г"] = "G",  ["г"] = "g",
["Д"] = "D",  ["д"] = "d",
["Ђ"] = "Đ",  ["ђ"] = "đ",
["Е"] = "E",  ["е"] = "e",
["Ж"] = "Ž",  ["ж"] = "ž",
["З"] = "Z",  ["з"] = "z",
["И"] = "I",  ["и"] = "i",
["Ј"] = "J",  ["ј"] = "j",
["К"] = "K",  ["к"] = "k",
["Л"] = "L",  ["л"] = "l",
["Љ"] = "LJ",  ["љ"] = "lj",
["М"] = "M",  ["м"] = "m",
["Н"] = "N",  ["н"] = "n",
["Њ"] = "NJ",  ["њ"] = "nj",
["О"] = "O",  ["о"] = "o",
["П"] = "P",  ["п"] = "p",
["Р"] = "R",  ["р"] = "r",
["С"] = "S",  ["с"] = "s",
["Т"] = "T", ["т"] = "t",
["Ћ"] = "Ć",  ["ћ"] = "ć",
["У"] = "U",  ["у"] = "u",
["Ф"] = "F",  ["ф"] = "f",
["Х"] = "H", ["х"] = "h",
["Ц"] = "C",  ["ц"] = "c",
["Ч"] = "Č",  ["ч"] = "č",
["Џ"] = "DŽ", ["џ"] = "dž",
["Ш"] = "Š", ["ш"] = "š",
}
 }
  }
}
___
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] sorting for particular sub entries to register

2022-02-01 Thread jbf via ntg-context

Thanks Robert,

Initially I thought it would probably be Lua which could come up with a 
simple solution, though Hans had made it clear that 'messing with' the 
key was the way to go, and, as always, he was proven correct. I simply 
had to find out the best way to do the messing! But when time allows I 
will take a closer look at the Lua possibilities.


Julian

On 1/2/22 18:49, Robert via ntg-context wrote:

Hi Julian,

Another solution could be to use Lua.

I have a multilingual document in which some elements to be printed 
bold (Language 1), and collected in an index (trk) arranged according 
their (verbal) stems. Elements from Language 2 are to be printed in 
italics in the text and collected in a separate index.


In the present example the morphemes from Language 2 are separated by 
::, the verbal stem ends in -.


In \\textbf the input is reproduced as is. Then interesting things 
happen in the index (trk).


The first element (until the first ::) is taken as an main entry in 
the index (hence !). Then the complete input is retained as the 
secondary entry. Note that in the index - separates the morphemes.


I use LuaLatex, but I am quite sure this is also possible in Context.

It is quite complex, but it works.

Robert


\newcommand{\TWI}[1]{\directlua{twi_help(\luastring{#1})}}

\begin{luacode}
function twi_help ( s )
   s = unicode.utf8.gsub (s, 
'^([^:]+)::([^:]+)::([^:]+)::([^:]+)::([^:]+)$' , 
'\\textbf{%1::%2::%3%::%4::%5}\\sindex%[trk%]{%#%1!%1%-%2%-%3%-%4-%5}’ )


  s = unicode.utf8.gsub … other action

\end{luacode}

\begin{document}

text text text text \TWI{dī-::dū::kin::dah} text text text text text

\end{document}



Op 1 feb. 2022, om 01:41 heeft jbf via ntg-context 
 het volgende geschreven:


Yes, Adam, that works. Though it can be a laborious solution, since 
it means creating keys for everything in a sub entry list (and I have 
many instances, 40 or more in some cases). However, I did not ask for 
a 'simple' solution, just a solution! Thank you.


Julian

On 1/2/22 11:09, Adam Reviczky wrote:

Hi Julian,

How about using the keys in every instance?

\setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]
\defineprocessor[special][style=italic]

\starttext
P\index[Plenary+periti]{Plenary Council+{\it periti} (experts)}
B\index[Plenary+beriti]{Plenary Council+{\it beriti} (experts)}
A\index[Plenary+aeriti]{Plenary Council+aeriti (experts)}

S\index[animals+special]{animals+‘special kinds’}
B\index[animals+bpecial]{animals+bpecial}
A\index[animals+apecial]{animals+‘apecial’}
U\index[animals+upecial]{animals+‘upecial’}
T\index[animals+tpecial]{animals+tpecial}

\placeindex
\stoptext

See result in: 
https://live.contextgarden.net/cgi-bin/result.cgi?id=j46XhZ


Adam

On Mon, Jan 31, 2022 at 10:38 PM jbf via ntg-context 
 wrote:


Let me come back to the unresolved (for me) question of two
situations in sub entries to a book index (register). Sub
entries that have formatting or sub entries that are surrounded
by quote marks (straight or curly, it makes no difference) do
not appear in the correct alphabetical order.

Two attempts on my part:

text before \index[Plenary+periti]{Plenary Council+{\it periti}
(experts)} text after.

text before \index{animals+‘special kinds’} text after. Or
alternatively, \index[animals+special]{animals+‘special kinds’}

The setup for my register is a pretty standard one. The
processor is not for the 'periti' case above but I use it for
book titles.

\setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]

\defineprocessor[special][style=italic]

In the periti case it is the \it command that clearly interferes
with correct alphabetic positioning in the sub entry list.
Placing +periti in the key does not overcome that problem.

In the ‘special kinds’ case it is the initial single quote mark
(‘) that causes the problem. The item comes last in the sub
entry list. And if i include a key [special], then it comes
first in the sub entry list. Either way, it is out of the
desired sorting order.

I believe I have followed the helpful suggestions of various
ones, but it is always possible that I have not fully understood
those suggestions. The reality is that at the moment the issue
remains unresolved for me. Any further wisdom out there to offer me?

Julian


___
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] sorting for particular sub entries to register

2022-01-31 Thread Robert via ntg-context
Hi Julian,

Another solution could be to use Lua.

I have a multilingual document in which some elements to be printed bold 
(Language 1), and collected in an index (trk) arranged according their (verbal) 
stems. Elements from Language 2 are to be printed in italics in the text and 
collected in a separate index.

In the present example the morphemes from Language 2 are separated by ::, the 
verbal stem ends in -.

In \\textbf the input is reproduced as is. Then interesting things happen in 
the index (trk).

The first element (until the first ::) is taken as an main entry in the index 
(hence !). Then the complete input is retained as the secondary entry. Note 
that in the index - separates the morphemes.

I use LuaLatex, but I am quite sure this is also possible in Context.

It is quite complex, but it works.

Robert


\newcommand{\TWI}[1]{\directlua{twi_help(\luastring{#1})}}

\begin{luacode}
function twi_help ( s )
   s = unicode.utf8.gsub (s, '^([^:]+)::([^:]+)::([^:]+)::([^:]+)::([^:]+)$' , 
'\\textbf{%1::%2::%3%::%4::%5}\\sindex%[trk%]{%#%1!%1%-%2%-%3%-%4-%5}’ )

  s = unicode.utf8.gsub … other action

\end{luacode}

\begin{document}

text text text text \TWI{dī-::dū::kin::dah} text text text text text 

\end{document}



> Op 1 feb. 2022, om 01:41 heeft jbf via ntg-context  het 
> volgende geschreven:
> 
> Yes, Adam, that works. Though it can be a laborious solution, since it means 
> creating keys for everything in a sub entry list (and I have many instances, 
> 40 or more in some cases). However, I did not ask for a 'simple' solution, 
> just a solution! Thank you.
> 
> Julian
> 
> On 1/2/22 11:09, Adam Reviczky wrote:
>> Hi Julian,
>> 
>> How about using the keys in every instance?
>> 
>> \setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]
>> \defineprocessor[special][style=italic]
>> 
>> \starttext
>> P\index[Plenary+periti]{Plenary Council+{\it periti} (experts)}
>> B\index[Plenary+beriti]{Plenary Council+{\it beriti} (experts)}
>> A\index[Plenary+aeriti]{Plenary Council+aeriti (experts)}
>> 
>> S\index[animals+special]{animals+‘special kinds’}
>> B\index[animals+bpecial]{animals+bpecial}
>> A\index[animals+apecial]{animals+‘apecial’}
>> U\index[animals+upecial]{animals+‘upecial’}
>> T\index[animals+tpecial]{animals+tpecial}
>> 
>> \placeindex
>> \stoptext
>> 
>> See result in: https://live.contextgarden.net/cgi-bin/result.cgi?id=j46XhZ 
>> <https://live.contextgarden.net/cgi-bin/result.cgi?id=j46XhZ>
>> 
>> Adam
>> 
>> On Mon, Jan 31, 2022 at 10:38 PM jbf via ntg-context > <mailto:ntg-context@ntg.nl>> wrote:
>> Let me come back to the unresolved (for me) question of two situations in 
>> sub entries to a book index (register). Sub entries that have formatting or 
>> sub entries that are surrounded by quote marks (straight or curly, it makes 
>> no difference) do not appear in the correct alphabetical order.
>> 
>> Two attempts on my part:
>> 
>> text before \index[Plenary+periti]{Plenary Council+{\it periti} (experts)} 
>> text after.
>> 
>> text before \index{animals+‘special kinds’} text after. Or alternatively, 
>> \index[animals+special]{animals+‘special kinds’}
>> 
>> The setup for my register is a pretty standard one. The processor is not for 
>> the 'periti' case above but I use it for book titles.
>> 
>> \setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]
>> \defineprocessor[special][style=italic]
>> In the periti case it is the \it command that clearly interferes with 
>> correct alphabetic positioning in the sub entry list. Placing +periti in the 
>> key does not overcome that problem.
>> 
>> In the ‘special kinds’ case it is the initial single quote mark (‘) that 
>> causes the problem. The item comes last in the sub entry list. And if i 
>> include a key [special], then it comes first in the sub entry list. Either 
>> way, it is out of the desired sorting order.
>> 
>> I believe I have followed the helpful suggestions of various ones, but it is 
>> always possible that I have not fully understood those suggestions. The 
>> reality is that at the moment the issue remains unresolved for me. Any 
>> further wisdom out there to offer me?
>> 
>> Julian
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl

Re: [NTG-context] sorting for particular sub entries to register

2022-01-31 Thread jbf via ntg-context
Yes, Adam, that works. Though it can be a laborious solution, since it 
means creating keys for everything in a sub entry list (and I have many 
instances, 40 or more in some cases). However, I did not ask for a 
'simple' solution, just a solution! Thank you.


Julian

On 1/2/22 11:09, Adam Reviczky wrote:

Hi Julian,

How about using the keys in every instance?

\setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]
\defineprocessor[special][style=italic]

\starttext
P\index[Plenary+periti]{Plenary Council+{\it periti} (experts)}
B\index[Plenary+beriti]{Plenary Council+{\it beriti} (experts)}
A\index[Plenary+aeriti]{Plenary Council+aeriti (experts)}

S\index[animals+special]{animals+‘special kinds’}
B\index[animals+bpecial]{animals+bpecial}
A\index[animals+apecial]{animals+‘apecial’}
U\index[animals+upecial]{animals+‘upecial’}
T\index[animals+tpecial]{animals+tpecial}

\placeindex
\stoptext

See result in: https://live.contextgarden.net/cgi-bin/result.cgi?id=j46XhZ

Adam

On Mon, Jan 31, 2022 at 10:38 PM jbf via ntg-context 
 wrote:


Let me come back to the unresolved (for me) question of two
situations in sub entries to a book index (register). Sub entries
that have formatting or sub entries that are surrounded by quote
marks (straight or curly, it makes no difference) do not appear in
the correct alphabetical order.

Two attempts on my part:

text before \index[Plenary+periti]{Plenary Council+{\it periti}
(experts)} text after.

text before \index{animals+‘special kinds’} text after. Or
alternatively, \index[animals+special]{animals+‘special kinds’}

The setup for my register is a pretty standard one. The processor
is not for the 'periti' case above but I use it for book titles.

\setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]

\defineprocessor[special][style=italic]

In the periti case it is the \it command that clearly interferes
with correct alphabetic positioning in the sub entry list. Placing
+periti in the key does not overcome that problem.

In the ‘special kinds’ case it is the initial single quote mark
(‘) that causes the problem. The item comes last in the sub entry
list. And if i include a key [special], then it comes first in the
sub entry list. Either way, it is out of the desired sorting order.

I believe I have followed the helpful suggestions of various ones,
but it is always possible that I have not fully understood those
suggestions. The reality is that at the moment the issue remains
unresolved for me. Any further wisdom out there to offer me?

Julian


___
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] sorting for particular sub entries to register

2022-01-31 Thread Adam Reviczky via ntg-context
Hi Julian,

How about using the keys in every instance?

\setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]
\defineprocessor[special][style=italic]

\starttext
P\index[Plenary+periti]{Plenary Council+{\it periti} (experts)}
B\index[Plenary+beriti]{Plenary Council+{\it beriti} (experts)}
A\index[Plenary+aeriti]{Plenary Council+aeriti (experts)}

S\index[animals+special]{animals+‘special kinds’}
B\index[animals+bpecial]{animals+bpecial}
A\index[animals+apecial]{animals+‘apecial’}
U\index[animals+upecial]{animals+‘upecial’}
T\index[animals+tpecial]{animals+tpecial}

\placeindex
\stoptext

See result in: https://live.contextgarden.net/cgi-bin/result.cgi?id=j46XhZ

Adam

On Mon, Jan 31, 2022 at 10:38 PM jbf via ntg-context 
wrote:

> Let me come back to the unresolved (for me) question of two situations in
> sub entries to a book index (register). Sub entries that have formatting or
> sub entries that are surrounded by quote marks (straight or curly, it makes
> no difference) do not appear in the correct alphabetical order.
>
> Two attempts on my part:
>
> text before \index[Plenary+periti]{Plenary Council+{\it periti} (experts)}
> text after.
>
> text before \index{animals+‘special kinds’} text after. Or alternatively,
> \index[animals+special]{animals+‘special kinds’}
>
> The setup for my register is a pretty standard one. The processor is not
> for the 'periti' case above but I use it for book titles.
>
> \setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]
>
> \defineprocessor[special][style=italic]
>
> In the periti case it is the \it command that clearly interferes with
> correct alphabetic positioning in the sub entry list. Placing +periti in
> the key does not overcome that problem.
>
> In the ‘special kinds’ case it is the initial single quote mark (‘) that
> causes the problem. The item comes last in the sub entry list. And if i
> include a key [special], then it comes first in the sub entry list. Either
> way, it is out of the desired sorting order.
>
> I believe I have followed the helpful suggestions of various ones, but it
> is always possible that I have not fully understood those suggestions. The
> reality is that at the moment the issue remains unresolved for me. Any
> further wisdom out there to offer me?
>
> Julian
>
>
> ___
> 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] sorting for particular sub entries to register

2022-01-31 Thread jbf via ntg-context
Let me come back to the unresolved (for me) question of two situations 
in sub entries to a book index (register). Sub entries that have 
formatting or sub entries that are surrounded by quote marks (straight 
or curly, it makes no difference) do not appear in the correct 
alphabetical order.


Two attempts on my part:

text before \index[Plenary+periti]{Plenary Council+{\it periti} 
(experts)} text after.


text before \index{animals+‘special kinds’} text after. Or 
alternatively, \index[animals+special]{animals+‘special kinds’}


The setup for my register is a pretty standard one. The processor is not 
for the 'periti' case above but I use it for book titles.


\setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]

\defineprocessor[special][style=italic]

In the periti case it is the \it command that clearly interferes with 
correct alphabetic positioning in the sub entry list. Placing +periti in 
the key does not overcome that problem.


In the ‘special kinds’ case it is the initial single quote mark (‘) that 
causes the problem. The item comes last in the sub entry list. And if i 
include a key [special], then it comes first in the sub entry list. 
Either way, it is out of the desired sorting order.


I believe I have followed the helpful suggestions of various ones, but 
it is always possible that I have not fully understood those 
suggestions. The reality is that at the moment the issue remains 
unresolved for me. Any further wisdom out there to offer me?


Julian
___
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] registers, how to ignore quote marks

2022-01-30 Thread jbf via ntg-context
No, I had already tried that. It places the subentry at the top of the 
list of subentries, not in its correct alphabetical order. Using the 
example below, I assume you meant (I am including text before and after):


The \index[Plenary+periti]{Plenary Council+{\it periti} (experts)} group 
comprises 10 members.


There are nine subentries altogether, and quite a number under 'p', like 
\index{Plenary Council+preparations for}. The italicised /periti /should 
come just before the latter (preparations for) but, using the double key 
above it comes first in the list. The same happens with the subentry 
surrounded by single quotes. It too comes first in the list if I use a 
double key. So clearly it is the fact that there is formatting ({\it 
something}) or quotes ({‘word’}) in a subentry that causes the problem, 
and I am wondering how to overcome this.


Julian

On 30/1/22 20:59, Hans Hagen wrote:
2. \index{Plenary Council+{\it periti} (experts)}: in this case it is 
the italicised /periti/ that appears out of place, after the letter 
'i' rather than after 'p'. Again I tried putting various keys but 
this did not help.


I guess my confusion is this: I assumed that the [key] establishes 
the literal string which determines sort order. That seems to be the 
case for a main entry. How do I get it to work for a subentry?

just provide an extra key: ___
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 stop columns from splitting up items in a list?

2022-01-29 Thread Bruce Horrocks via ntg-context


> On 29 Jan 2022, at 14:45, Joel via ntg-context  wrote:
> 
> I am writing a workbook that contains a materials list in front of some craft 
> activities.
> 
> I found that simply displaying a bulleted list can take up lots of space on 
> the page, so instead put the list in three columns. The problem is, if there 
> is an item with a somewhat long description, it can be split across columns. 
> See the example below:
> 
> \starttext
> \startcolumns[n=3]%
> \startitemize[1]%
>  \item pizza cutter
>  \item a word processor (or notebook paper)
>  \stopitemize%
>  \stopcolumns%
> \stoptext
> 
> In the example, it split the second item across the columns.
> 
> How can I create columns that don't allow the item to split across them?
> 

Have you tried 

\startitemize[columns,three]

instead of \startcolumns?

There are examples in the manual on page 16
<http://www.pragma-ade.com/general/manuals/ma-cb-en.pdf>

The spacing can be adjusted as well if the default is too big.

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


[NTG-context] How to stop columns from splitting up items in a list?

2022-01-29 Thread Joel via ntg-context
I am writing a workbook that contains a materials list in front of some craft 
activities. 
I found that simply displaying a bulleted list can take up lots of space on the 
page, so instead put the list in three columns. The problem is, if there is an 
item with a somewhat long description, it can be split across columns. See the 
example below:
\starttext    \startcolumns[n=3]%    \startitemize[1]% \item 
pizza cutter \item a word processor (or notebook paper) 
\stopitemize% \stopcolumns%\stoptext
In the example, it split the second item across the columns.
How can I create columns that don't allow the item to split across them?
___
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] registers, how to ignore quote marks

2022-01-28 Thread Adam Reviczky via ntg-context
Hi Julian,

Have you tried \index[Innovative]{‘Innovative’}?

See wiki entry: https://wiki.contextgarden.net/Registers
- To sort a word (such as "ConTeXt" under "C"), use: \index
<https://wiki.contextgarden.net/Command/index>[CONTEXT]{\ConTeXt}

You would have to change each index call though.

Adam

On Sat, Jan 29, 2022 at 2:42 AM jbf via ntg-context 
wrote:

> I have an issue that has been raised at least twice in this list but as
> far as I can see it has not received an answer. Perhaps someone can help
> with the following?
>
> I have an index entry that has unicode quote marks either side:
> ‘Innovative Beings’.  I need to retain those quote marks. If I put
> \index{‘Innovative’} then ‘Innovative’ is sorted under ‘ instead of under
> the letter I. How do I get my indexing to ignore the quote marks, at the
> very least the initial one?
>
> My index setup at the moment is as follows:
>
> \defineregister[index][compress=yes]
>
> \setupregister[index][n=1]
>
> \defineprocessor[special][style=italic]
>
> The only hint I could gain from the wiki was that it might depend on using
> a method key in \setupregister, but I could not see which to use. Tried a
> few and got weird results.
>
> Julian
>
>
> ___
> 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] OT world history: other measuring systems?

2022-01-26 Thread BPJ via ntg-context
Den ons 26 jan. 2022 09:44Otared Kavian via ntg-context 
skrev:

>
> > On 26 Jan 2022, at 00:17, Hans Hagen via ntg-context 
> wrote:
> > […]
> > times (clocks) were definitely different per city
>
> Regarding the issue of the absolute necessity of defining a standard time
> the book by Peter Galison « Einstein’s Clocks, Poincaré’s Maps » gives some
> interesting insight. In particular, since after the mid 19th century trains
> were developed while the time was not standardized, many accidents happened
> with hundreds of people killed. This led Henri Poincaré, Lorentz and
> Einstein (among other mathematcians and physicists) to th enotion of
> relativity…
>
> Regarding the measure of the distance, area, volumes and weight indeed
> each region of the world had its own units because the trade and exchange
> of products were essentially local. With the progressive extension of the
> exchanges between regions and countries the need for a standardization
> appeared more and more.
> For example the problem of measuring grains is a quite difficult one: if
> one measures the weight, depending on how much humidity the grains contain,
> one has different amount of the real stuff. If one measures the volume of
> the grains, then according how compressed they are, the amount of the
> grains may be different… (at some point there was a law which stated that
> when a unit vessel of grains was to be sold, the seller should struck the
> bottom of the vessel on a table three times and then refill again sthe
> vessel for it to be full).
>
> The measure of the distances on roads in the Persian empire had one unit
> and one subunit: « parasang » and « mil ». Parasang, which means « big
> stone » in Persian, was the average distance which a fantassin could walk
> in a certain amount of time, and was marked by a large piece of stone on
> the road (this is also reported by Herodotus). Each parasang was divided
> into three « mil », which means « iron bar » in Persian, and was marked by
> planting an iron bar on the road side. A parasang is between 5400 and 6000
> meters, and thus a « mil » is something about 1800 and 2000 meters. These
> units were used in many areas outside the Persian empire, and are still
> used, in particular the parasang, in Iran and Afghanistan (in Iran a
> parasang is 6 kilometers now).


(Personnaly I think the Roman mile has its origin in the Persian « mil »: I
> think the etymology of the word mile based on the word « mille », a
> thousand, cannot be correct since it does not correspond to one thousand of
> any other unit of length used in the Roman empire).
>

The unit of which the Roman mile was a thousand was a pace, which was
otherwise not commonly used as a measurement. The full Latin term is _milia
passum_, literally 'a thousand of steps', i.e. of a military unit on march.

I wonder if _mil_ as a Persian unit of measurement isn't spurious, or in
fact a Greek (or e.g. Phrygian) word since Old Persian did not have any /l/
sound. At least in the OP script PIE _*l_ has merged totally with _*r_. In
Middle Persian OP _rd_ became _l_. Possibly that happened early in the
spoken language.

/Benct



> Best regards: Otared
>
>
>
>
> ___
> 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] OT world history: other measuring systems?

2022-01-26 Thread Hans Hagen via ntg-context

On 1/26/2022 10:07 PM, jbf via ntg-context wrote:
Just be careful, though (writing as a native English speaker), because 
the word 'polymath' for English speaker is not a reference to 
mathematicians at all. (Greek/mathē/ means 'learning' not mathematics). 
Translators are well aware of the danger of homonyms, and if you go for 
a title like Manual for Polymathematicians, then the word is being 
wrongly used. There is a word 'polymath' in English, but not 
'polymathematician', unless of course you make it clear that it is 
merely a play on words. But personally, I'd avoid that.
sure, it was a a play of word, although polymathematician as 
all-knowing-person definitely applies to Don Knuth which brings us back 
to TeX


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] OT world history: other measuring systems?

2022-01-26 Thread jbf via ntg-context
Just be careful, though (writing as a native English speaker), because 
the word 'polymath' for English speaker is not a reference to 
mathematicians at all. (Greek/mathē/ means 'learning' not mathematics). 
Translators are well aware of the danger of homonyms, and if you go for 
a title like Manual for Polymathematicians, then the word is being 
wrongly used. There is a word 'polymath' in English, but not 
'polymathematician', unless of course you make it clear that it is 
merely a play on words. But personally, I'd avoid that.


Julian

On 26/1/22 20:36, Hans Hagen via ntg-context wrote:

On 1/26/2022 10:23 AM, Jean-Pierre Delange via ntg-context wrote:
In line with what Otared writes about the measurement of distances in 
the context of Persia and ancient Rome, I am always very surprised to 
see the precision of the measurements in the evaluation of the 
circumference of the earth by Eratosthenes of Cyrene. What intrigues 
me is not really the geometry calculations involved, but the 
calculation of the distance between Aswan and Alexandria. There is 
little information on the taking of this measurement: is it Egyptian 
surveyors (bematists: https://en.wikipedia.org/wiki/Bematist) or the 
use of an instrument equivalent to a pedometer? see here: 
https://en.wikipedia.org/wiki/Eratosthenes

   Eratosthenes of Cyrene was a Greek polymath ...

Ah ... that makes a great subtitle for Mikaels upcoming math manual: 
"A manual for polymathematicians"


   A polymath (Greek: πολυμαθής, polymathēs, "having learned much";

and then we can talk 'polymathematical typesetting' and such (I'm sure 
that Arthur can come up with a reflective historical tex-talk.)


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
___ 
___
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] OT world history: other measuring systems?

2022-01-26 Thread Jean-Pierre Delange via ntg-context
In line with what Otared writes about the measurement of distances in 
the context of Persia and ancient Rome, I am always very surprised to 
see the precision of the measurements in the evaluation of the 
circumference of the earth by Eratosthenes of Cyrene. What intrigues me 
is not really the geometry calculations involved, but the calculation of 
the distance between Aswan and Alexandria. There is little information 
on the taking of this measurement: is it Egyptian surveyors (bematists: 
https://en.wikipedia.org/wiki/Bematist) or the use of an instrument 
equivalent to a pedometer? see here: 
https://en.wikipedia.org/wiki/Eratosthenes



Le 26/01/2022 à 09:41, Otared Kavian via ntg-context a écrit :

On 26 Jan 2022, at 00:17, Hans Hagen via ntg-context  wrote:
[…]
times (clocks) were definitely different per city

Regarding the issue of the absolute necessity of defining a standard time the 
book by Peter Galison « Einstein’s Clocks, Poincaré’s Maps » gives some 
interesting insight. In particular, since after the mid 19th century trains 
were developed while the time was not standardized, many accidents happened 
with hundreds of people killed. This led Henri Poincaré, Lorentz and Einstein 
(among other mathematcians and physicists) to th enotion of relativity…

Regarding the measure of the distance, area, volumes and weight indeed each 
region of the world had its own units because the trade and exchange of 
products were essentially local. With the progressive extension of the 
exchanges between regions and countries the need for a standardization appeared 
more and more.
For example the problem of measuring grains is a quite difficult one: if one 
measures the weight, depending on how much humidity the grains contain, one has 
different amount of the real stuff. If one measures the volume of the grains, 
then according how compressed they are, the amount of the grains may be 
different… (at some point there was a law which stated that when a unit vessel 
of grains was to be sold, the seller should struck the bottom of the vessel on 
a table three times and then refill again sthe vessel for it to be full).

The measure of the distances on roads in the Persian empire had one unit and 
one subunit: « parasang » and « mil ». Parasang, which means « big stone » in 
Persian, was the average distance which a fantassin could walk in a certain 
amount of time, and was marked by a large piece of stone on the road (this is 
also reported by Herodotus). Each parasang was divided into three « mil », 
which means « iron bar » in Persian, and was marked by planting an iron bar on 
the road side. A parasang is between 5400 and 6000 meters, and thus a « mil » 
is something about 1800 and 2000 meters. These units were used in many areas 
outside the Persian empire, and are still used, in particular the parasang, in 
Iran and Afghanistan (in Iran a parasang is 6 kilometers now). (Personnaly I 
think the Roman mile has its origin in the Persian « mil »: I think the 
etymology of the word mile based on the word « mille », a thousand, cannot be 
correct since it does not correspond to one thousand of any other unit of 
length used in the Roman empire).

Best regards: Otared



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


--
Jean-Pierre Delange
Ancients
Professeur Agrégé de Philosophie (HC)

___
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] OT world history: other measuring systems?

2022-01-26 Thread Otared Kavian via ntg-context

> On 26 Jan 2022, at 00:17, Hans Hagen via ntg-context  
> wrote:
> […]
> times (clocks) were definitely different per city

Regarding the issue of the absolute necessity of defining a standard time the 
book by Peter Galison « Einstein’s Clocks, Poincaré’s Maps » gives some 
interesting insight. In particular, since after the mid 19th century trains 
were developed while the time was not standardized, many accidents happened 
with hundreds of people killed. This led Henri Poincaré, Lorentz and Einstein 
(among other mathematcians and physicists) to th enotion of relativity…

Regarding the measure of the distance, area, volumes and weight indeed each 
region of the world had its own units because the trade and exchange of 
products were essentially local. With the progressive extension of the 
exchanges between regions and countries the need for a standardization appeared 
more and more.
For example the problem of measuring grains is a quite difficult one: if one 
measures the weight, depending on how much humidity the grains contain, one has 
different amount of the real stuff. If one measures the volume of the grains, 
then according how compressed they are, the amount of the grains may be 
different… (at some point there was a law which stated that when a unit vessel 
of grains was to be sold, the seller should struck the bottom of the vessel on 
a table three times and then refill again sthe vessel for it to be full).

The measure of the distances on roads in the Persian empire had one unit and 
one subunit: « parasang » and « mil ». Parasang, which means « big stone » in 
Persian, was the average distance which a fantassin could walk in a certain 
amount of time, and was marked by a large piece of stone on the road (this is 
also reported by Herodotus). Each parasang was divided into three « mil », 
which means « iron bar » in Persian, and was marked by planting an iron bar on 
the road side. A parasang is between 5400 and 6000 meters, and thus a « mil » 
is something about 1800 and 2000 meters. These units were used in many areas 
outside the Persian empire, and are still used, in particular the parasang, in 
Iran and Afghanistan (in Iran a parasang is 6 kilometers now). (Personnaly I 
think the Roman mile has its origin in the Persian « mil »: I think the 
etymology of the word mile based on the word « mille », a thousand, cannot be 
correct since it does not correspond to one thousand of any other unit of 
length used in the Roman empire).

Best regards: Otared



___
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] What is the proper way to define many different list types in a document?

2022-01-24 Thread Joel via ntg-context
I have about several different types of list that reoccur multiple times in my 
documents. Though I tried to keep things simple, by just defining the type when 
it appears, strange glitches appear. For instance, I have one that uses the ☞ 
(pointing hand) logo, and sometimes that randomly appears in the wrong lists, 
for reasons I cannot understand.

Below is how I'm defining my lists. I have about a dozen more, this is a 
sample. Is there some more robust and consistent manner in which I should be 
defining them, so the settings from one type don't spill over into the other 
types?
--Joel

%prompt

\definesymbol[bighand][{{☞}}]

\define[1]\prompt{%
    \setupitemize[symbol=bighand]
    \startitemize
        {\it #1}
    \stopitemize
}%

\prompt{What did you learn about today?}

%vocabulary

\startcolumns[n=3]\startitemize[n]
\item word1
\item word2
\item word3
\stopitemize\stopcolumns

%nested outline

\startitemize[1]
    \item some text
    \startitemize[2]
    \item some text
    \startitemize[3]
  \item some text
    \stopitemize
    \stopitemize
\stopitemize

%written answer (produces some lines after the question for writing an answer)

\define[1]\writingbox{%
    \dorecurse{#1}{%
        \hairline%
    }
}

\startitemize[n]
\item Which planet is closest to Earth? \writingbox{4}
\item What is the moon made of? \writingbox{4}
\stopitemize

%materials list

\startcolumns[n=3]\startitemize
\item crayons
\item scissors
\item glue
\stopitemize\stopcolumns

%word search clues (should be simple, but strangely this keeps getting the ☞ 
logo added instead of showing numbers)
\startitemize[n]
\item a type of hat worn
\item a cold season
\stopitemize
___
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] How to get \placenotes to place footnote-style citations at the end of my content?

2022-01-24 Thread Joel via ntg-context
I'm spinning this question off another post, as my previous  question was very 
specific, but it was possibly discovered a more general bug exists?
I'm creating some lecture slides that have footnote citations throughout. The 
problem is, the slides themselves already don't have much screen space, and 
adding all of the footnotes on the same slide steals limited screen space. It 
ends up showing one bullet point per slide and filling the page with the 
citation information.
I still need to provide citations though. The solution is perhaps to place 
`\placenotes[footnote]` after several slides. Then, at the very end of the 
document list the full bibliography with ` \placelistofpublications`.

In this way, I still present the citations, but they don't bury the content of 
the slides.

But something seems wrong with ConTeXt, not allowing this to function. Try to 
compile this code which Joey sent me and it won't populate 
`\placenotes[footnote]` with any content:
\startbuffer [bib]

@Book{clark1989,
author = {Clark, William},
title = {Railroads \word{and} railroad towns \word{in} New Mexico},
publisher = {New Mexico Magazine},
year = {1989},
address = {Albuquerque, New Mexico},
isbn = {9780937206126}
}

\stopbuffer

\usebtxdataset[bib.buffer]

\setupbtx[dataset=default]

\setupnote[footnote][location=none] % commenting out this line will produce
footnotes that expand the citation correctly

\starttext

   \input knuth
    \cite[alternative=footnote][clark1989]
    \page
    \placenotes[footnote]

    \startchapter[title=Bibliography]
    \placelistofpublications
    \stopchapter

\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] How to add entire chapter's page ranger for index entry?

2022-01-23 Thread Bruce Horrocks via ntg-context


> On 23 Jan 2022, at 21:40, Joel via ntg-context  wrote:
> 
> I am adding items to an index simply using `\index{word}`.
> 
> There are a few cases where instead of printing just the page number where 
> `\index{word}` is placed, I need the entire page range for that chapter to be 
> displayed. For instance, if Chapter 3 spans page 22-50, and I place 
> `\index{word}` in Chapter 3, I need the index to display "word 22-50", but 
> only for that entry...not for all index entries.
> 
> How to add entire chapter's page ranger for index entry?


\startchapter[title={My chapter title}]
\startregister[index][anIdentifier]{word}

The text...

\stopregister[index][anIdentifier]
\stopchapter

—
Bruce Horrocks
Hampshire, UK

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

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


Re: [NTG-context] How to add entire chapter's page ranger for index entry?

2022-01-23 Thread Henning Hraban Ramm via ntg-context

Am 23.01.22 um 22:40 schrieb Joel via ntg-context:

I am adding items to an index simply using `\index{word}`.

There are a few cases where instead of printing just the page number 
where `\index{word}` is placed, I need the entire page range for that 
chapter to be displayed. For instance, if Chapter 3 spans page 22-50, 
and I place `\index{word}` in Chapter 3, I need the index to display 
"word 22-50", but only for that entry...not for all index entries.


How to add entire chapter's page ranger for index entry?


You need to use

\startregister[index][some code]{Entry}
... chapter content ...
\stopregister[index][some code]

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
___


[NTG-context] How to add entire chapter's page ranger for index entry?

2022-01-23 Thread Joel via ntg-context
I am adding items to an index simply using `\index{word}`.

There are a few cases where instead of printing just the page number where 
`\index{word}` is placed, I need the entire page range for that chapter to be 
displayed. For instance, if Chapter 3 spans page 22-50, and I place 
`\index{word}` in Chapter 3, I need the index to display "word 22-50", but only 
for that entry...not for all index entries.

How to add entire chapter's page ranger for index entry?

--Joel
___
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 override ConTeXt-SBL titles, to make all titles everywhere capitalized?

2022-01-17 Thread Joey McCollum via ntg-context
I've avoided forcing capitalization in too many places in the SBL rendering
because there are often language-specific (or, within English, even
dialect-specific) differences regarding what should be capitalized. I think
I already enforce capitalization of the first word, though:

```
\starttexdefinition titleemph #1
  \emph{\Word{#1}}
\stoptexdefinition

\starttexdefinition titlequote #1
  \quotation{\Word{#1}}
\stoptexdefinition
```

If you want the behavior you've described, you can change \Word to \Words
in the lines above (in publ-imp-sbl.mkvi). I probably will leave the code
as-is, however, as it seems safer to expect the user to provide the desired
capitalization in the BibTeX file.

Joey

On Mon, Jan 17, 2022 at 11:03 AM Joel via ntg-context 
wrote:

> I am a few days from sending a document to a publisher, and using the
> Society of Biblical Literature style (via the macro ConTeXt-SBL) as it is
> very close to what I need, Chicago (numbers style) citations. One glaring
> difference I notice between the two styles is ConTeXt-SBL presents the
> titles of articles and books in lower case, but Chicago gives them in upper
> case (I think SBL should too, but maybe as my entire BibTeX file is
> lowercase, it is not). How can I tell ConTeXt to override the titles,
> everywhere they appear, so they are printed in uppercase? I've manually
> marked all of the words that should not be capitalized in my BiBTeX file as
> with \word{of} so they will ignore any instructions to become capitalized.
>
> --Joel
>
>
>
> ___
> 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] How to override ConTeXt-SBL titles, to make all titles everywhere capitalized?

2022-01-17 Thread Joel via ntg-context
I am a few days from sending a document to a publisher, and using the Society 
of Biblical Literature style (via the macro ConTeXt-SBL) as it is very close to 
what I need, Chicago (numbers style) citations. One glaring difference I notice 
between the two styles is ConTeXt-SBL presents the titles of articles and books 
in lower case, but Chicago gives them in upper case (I think SBL should too, 
but maybe as my entire BibTeX file is lowercase, it is not). How can I tell 
ConTeXt to override the titles, everywhere they appear, so they are printed in 
uppercase? I've manually marked all of the words that should not be capitalized 
in my BiBTeX file as with \word{of} so they will ignore any instructions to 
become capitalized.

--Joel


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

2022-01-15 Thread Alexandre Christe via ntg-context
Just came across a weird behavior with the latest upload.

The following doesn't print as it should
\startformula 4^{2x} - 4^x - 25 = 0 \stopformula

I don't think it's normal (I see the spacing to make room for anything that
comes after the first character in the exposant, but it is not printed).

Le sam. 15 janv. 2022 à 13:31, Hans Hagen via ntg-context <
ntg-context@ntg.nl> a écrit :

> On 1/15/2022 12:33 PM, hanneder--- via ntg-context wrote:
> >> - We added indic language patterns ad well as defined the languages
> >> but labels are on the todo as are conversions; kauśika is working on
> >
> > Perhaps the following notes are useful.
> >
> > 1. The simplest way, and what I was talking about, is to write and print
> > Sanskrit in
> > transliteration.
> >
> > ānandaḥ -> ānandaḥ
> >
> > 2. Then we can of course write and print the same word in the usual
> > Indian Script (Devanāgarī)
> >
> > आनन्दः  ->  आनन्दः
> >
> > 3. But for academic use, one wants an input in roman (e-text are usually
> > in roman), and the option
> > to have an output in Devanāgarī)
> >
> > ānandaḥ ->  आनन्दः
> >
> > For this an option with the transliterator would be required, I guess(?)
> >
> > Theoretically one could write Sanskrit in many scripts -- it has been
> > written
> > with many Indian scripts in history --, but I am wondering about the
> > practical value of this.
> > For imitating historic prints it would no doubt be nice, but not urgent.
> >
> > I was not aware of the hyphenation patterns by Yves Codet, if they work,
> > they would cover case 1
> > and 2. And I just heard from a colleague that the latest babel version
> > is incorporating a Sanskrit option
> > that might cover the same ground (I am not sure whether this is useful).
> >
> > Thanks a lot! I just have to learn more about ConTeXt to able to use it:)
>
> does the attached sort of what you want
>
> 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
>
> ___
>
___
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] new upload

2022-01-15 Thread Hans Hagen via ntg-context

On 1/15/2022 12:33 PM, hanneder--- via ntg-context wrote:
- We added indic language patterns ad well as defined the languages 
but labels are on the todo as are conversions; kauśika is working on


Perhaps the following notes are useful.

1. The simplest way, and what I was talking about, is to write and print 
Sanskrit in

    transliteration.

ānandaḥ -> ānandaḥ

2. Then we can of course write and print the same word in the usual 
Indian Script (Devanāgarī)


आनन्दः  ->  आनन्दः

3. But for academic use, one wants an input in roman (e-text are usually 
in roman), and the option

    to have an output in Devanāgarī)

ānandaḥ ->  आनन्दः

For this an option with the transliterator would be required, I guess(?)

Theoretically one could write Sanskrit in many scripts -- it has been 
written
with many Indian scripts in history --, but I am wondering about the 
practical value of this.

For imitating historic prints it would no doubt be nice, but not urgent.

I was not aware of the hyphenation patterns by Yves Codet, if they work, 
they would cover case 1
and 2. And I just heard from a colleague that the latest babel version 
is incorporating a Sanskrit option

that might cover the same ground (I am not sure whether this is useful).

Thanks a lot! I just have to learn more about ConTeXt to able to use it:)


does the attached sort of what you want

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
-\startluacode
fonts.handlers.otf.addfeature {
name = "iast",
type = "ligature",
data = {
["ऐ"]  = { "a", "i" },
["औ"] = { "a", "u" },
["ख"] = { "k", "h" },
["छ"] = { "c", "h" },
["ठ"] = { "ṭ", "h" },
["थ"] = { "t", "h" },
["फ"] = { "p", "h" },
["घ"] = { "g", "h" },
["झ"] = { "j", "h" },
["ढ"] = { "ḍ", "h" },
["ध"] = { "d", "h" },
["भ"] = { "b", "h" },
}
}
fonts.handlers.otf.addfeature {
name = "iast",
type = "substitution",
data = {
["a"] = "अ",
["ā"] = "आ" ,
["i"] = "इ",
["ī"] = "ई",
["u"] = "उ",
["ū"] = "ऊ",
["ṛ"] = "ऋ",
["ṝ"] = "ॠ",
["ḷ"] = "ऌ",
["ḹ"] = "ॡ",
["e"] = "ए",
["o"] = "ओ",
["ṃ"] = "ं",
["ḥ"] = "ः",
["˜"] = "ँ",
["'"] = "ऽ",
["k"] = "क",
["c"] = "च",
["ṭ"] = "ट",
["t"] = "त",
["p"] = "प",
["g"] = "ग",
["j"] = "ज",
["ḍ"] = "ड",
["d"] = "द",
["b"] = "ब",
["ṅ"] = "ङ",
["ñ"] = "ञ",
["ṇ"] = "ण",
["n"] = "न",
["m"] = "म",
["h"] = "ह",
["y"] = "य",
["r"] = "र",
["l"] = "ल",
["v"] = "व",
["ś"] = "श",
["ṣ"] = "ष",
["s"] = "स",
}
}
\stopluacode

\starttext

\definefontfeature[iast][devanagari-two][iast=yes]
\definedfont[file:shobhika-regular.otf*iast at 18pt]

vid dhātorghañā vedaśabdo niṣpadyate.
vid jñāne vid vicāraṇe vidlṛ lābhe vid
sattāyām ityādidhātubhyo jñānaṃ sattā lābhaśceti trayo'pyarthāḥ siddhyanti. lāb­
haśabdena jīvanarūpā sthitirapi prahītuṃ śakyate sattāpadena cotpattiḥ. tena ut­
pattiḥ sthitiścetyubhayamapi vid dhātorarthe'ntarbhavati. ghañpratyayaścāpi 
bhāve
akartari ca kārake vidhīyate iti jñānam jñānasādhanam jñānakarma jñānādhikara­
ṇam sattā sattāsādhanam sattākarma sattādhikaraṇam sthiti sthitisādhanam sthi­
tikarma sthityadhikaraṇaścetyādi sarvaṃ vedaśabdārthatayā vyākhyātuṃ śakyate.
tatra granthātmakeṣu vedeṣu śābdajñānasādhanatvameva samanvāyayanti prāyeṇa
vidvāṃsaḥ.
anveṣaṇaprakriyayā pariśīlyamāne tu sarvavidhajñānasādhanam jñā­
narūpatvam sattāsādhanatvam sattārūpatvam sthitisādhanatvam sthitirūpatvam ce­
tyādyapi vedaśabdārthe samanvitaṃ bhavati.

\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] new upload

2022-01-15 Thread hanneder--- via ntg-context
- We added indic language patterns ad well as defined the languages  
but labels are on the todo as are conversions; kauśika is working on


Perhaps the following notes are useful.

1. The simplest way, and what I was talking about, is to write and  
print Sanskrit in

   transliteration.

ānandaḥ -> ānandaḥ

2. Then we can of course write and print the same word in the usual  
Indian Script (Devanāgarī)


आनन्दः  ->  आनन्दः

3. But for academic use, one wants an input in roman (e-text are  
usually in roman), and the option

   to have an output in Devanāgarī)

ānandaḥ ->  आनन्दः

For this an option with the transliterator would be required, I guess(?)

Theoretically one could write Sanskrit in many scripts -- it has been written
with many Indian scripts in history --, but I am wondering about the  
practical value of this.

For imitating historic prints it would no doubt be nice, but not urgent.

I was not aware of the hyphenation patterns by Yves Codet, if they  
work, they would cover case 1
and 2. And I just heard from a colleague that the latest babel version  
is incorporating a Sanskrit option

that might cover the same ground (I am not sure whether this is useful).

Thanks a lot! I just have to learn more about ConTeXt to able to use it:)




---

Prof. Dr. Juergen Hanneder
Philipps-Universitaet Marburg
FG Indologie u. Tibetologie
Deutschhausstr.12
35032 Marburg
Germany
Tel. 0049-6421-28-24930
hanne...@staff.uni-marburg.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
___


Re: [NTG-context] Critical Editions?

2022-01-10 Thread Hans Hagen via ntg-context

On 1/9/2022 11:23 AM, hanneder--- via ntg-context wrote:

1. In Sanskrit prose it is possible to produce compounds that span a few 
lines. The concept of

    "word" or "word division" fails here, as are the TeX mechanisms.

    What we need in practice would be a "hyphenation" for the language 
Sanskrit that hyphenates
    after all Sanskrit vowels (in transcription this would be a, ā, i, 
ī, u, ū, ṛ, ḷ, e, o, ai, au. The
    last two cannot be split, "au" is one vowel with one vowel sign in 
the original script). Of
    course, we want to improve this automatic spelling occasionally, so 
we need to be able to insert

    a \- without thereby disabling the hyphenation for this compound.

    I think in critical editions the problem of the disabled hyphenation 
also arises when a variant
    is added inside a word. In any case hyphenation is a real nuisance 
in critical editions.
I can add sanskit patterns to the distribution but I wonder: how does 
this interact with reordering in fonts? Do we need to postpone 
hyphenation till after reordering?


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] Critical Editions?

2022-01-10 Thread Jean-Pierre Delange via ntg-context

Thank you very much Arthur !

Yves Codet (Assistant Professor at Toulouse University, member of CRAPA 
an institutional public research in Humanities in South of France) is 
involved in TeX patterns for Greek and Indic languages. He is a 
translator of Indian theater pieces (among other things).


See there : https://ctan.org/tex-archive/macros/xetex/hyphenation/sanhyph

And his involvement in the discussion about Devanagari romanisation for 
translitteration and/or specific UTF8 specification in order to respect 
Devanagari and Brahmi hyphenation with XeTeX.


https://tug.org/pipermail/xetex/2008-October/010904.html

Le 10/01/2022 à 12:26, Arthur Rosendahl via ntg-context a écrit :

On Sun, Jan 09, 2022 at 11:46:44PM +0100, Hans Hagen via ntg-context wrote:

On 1/9/2022 11:23 AM, hanneder--- via ntg-context wrote:

1. In Sanskrit prose it is possible to produce compounds that span a few
lines. The concept of
     "word" or "word division" fails here, as are the TeX mechanisms.

     What we need in practice would be a "hyphenation" for the language
Sanskrit that hyphenates
     after all Sanskrit vowels (in transcription this would be a, ā, i,
ī, u, ū, ṛ, ḷ, e, o, ai, au. The
     last two cannot be split, "au" is one vowel with one vowel sign in
the original script). Of
     course, we want to improve this automatic spelling occasionally, so
we need to be able to insert
     a \- without thereby disabling the hyphenation for this compound.

     I think in critical editions the problem of the disabled hyphenation
also arises when a variant
     is added inside a word. In any case hyphenation is a real nuisance
in critical editions.

hypenation ... so no patterns, just injecting discretionaries after specific
vowels ... doable but it has to happen a some specific moment because when
language bound it's too soon, and the font handler does some reshuffling; it
can probabloy best be done after fonts have been done ... given specs a
typical rainy weekend activity

   There are patterns, that implement almost exactly the kind of
automatic hyphenation Jürgen describes (see
https://github.com/hyphenation/tex-hyphen/blob/master/hyph-utf8/tex/generic/hyph-utf8/patterns/tex/hyph-sa.tex#L50L134).
They’re just not in the ConTeXt distribution ...

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


--
Jean-Pierre Delange
Ancients
Professeur Agrégé de Philosophie (HC)

___
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] Fonts for transliteration (was: Critical Editions?)

2022-01-10 Thread Denis Maier via ntg-context
Oh, thank’s for adding this. I’ll probably need to check whether these issues 
still exist.

Denis

Von: BPJ 
Gesendet: Montag, 10. Januar 2022 13:29
An: Maier, Denis Christian (UB) 
Cc: bpj ; mailing list for ConTeXt users 
Betreff: Re: [NTG-context] Fonts for transliteration (was: Critical Editions?)


Den mån 10 jan. 2022 10:34 mailto:denis.ma...@unibe.ch>> 
skrev:
Cardo is another nice font: https://www.scholarsfonts.net/

Denis

Not entirely free last time I looked, and had issues with the rendering of its 
lowercase ‹o› (which I suspected was deliberately introduced in the free 
version, although that may be unwarranted geek paranoia! :-)

BTW Doulos SIL is their Times clone, although it at least used to lack italics, 
which makes it a no-starter for most comparatists who use italics for object 
language.



Von: ntg-context 
mailto:ntg-context-boun...@ntg.nl>> Im Auftrag von 
BPJ via ntg-context
Gesendet: Sonntag, 9. Januar 2022 17:18
An: mailing list for ConTeXt users 
mailto:ntg-context@ntg.nl>>
Cc: BPJ mailto:b...@melroch.se>>
Betreff: [NTG-context] Fonts for transliteration (was: Critical Editions?)


Den sön 9 jan. 2022 13:22Robert via ntg-context 
mailto:ntg-context@ntg.nl>> skrev:
Dear list,

I am currently working on a critical edition as well, and follow the discussion 
with interest. For the time being, I prefer Latex over Context for this project.

In addition to Jürgen's remarks on transcription fonts, a small contribution:

Arabists and turcologists working with transcriptions used to have similar 
problems. In the nineties I adapted existing postscript fonts with 
Fontographer. I also made sure to copy kerning information from extant letters 
(e.g. a) to new ones (e.g. ā) with the required diacritic (usually dots, dashes 
and haceks). This was in the pre-unicode era.

Today there is the Brill font which is quite extended, yet I am not sure if it 
can be used freely in other publications.

Adapations to extant fonts can still be made with the open source app 
FontForge. Do not hesitate to contact me offline if you need help on this.

The technically excellent free Google Noto Serif/Sans/Sans Mono fonts have 
quite extensive coverage of Latin/Greek/Cyrillic scripts. As an 
Indo-Europeanist turned programmer/editor/translator doing frequent forays into 
Uralic and Afroasiatic when wearing a more general historical linguistics hat I 
have found nothing missing.
(If you need a Mono Font make sure to use Noto Sans Mono which has better 
coverage than Noto Mono!)

https://fonts.google.com/noto

Much the same can be said of the Charis SIL font from SIL International, 
although the current release lags behind Noto when it comes to coverage.

https://software.sil.org/charis/

(Make sure to look at the downloads page for info on downloadable customized 
fonts!)

There is also the Gentium SIL font with Greek and Cyrillic coverage as well as 
Latin, although its design may be a bit too swashy for academic work.

If something *is* missing these are all licensed under the quite permissive 
Open Font License

https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi=OFL-FAQ_web

Publishers may have their own (ideas about) fonts but for course materials, 
handouts, manuscripts, databases and the like these are excellent. I do all my 
work in the Vim text editor (with Noto Sans Mono) and *TeX/Pandoc.

Regards,

/Benct



Regards,

Robert

i...@mo-perspectief.nl<mailto:i...@mo-perspectief.nl>


> Op 9 jan. 2022, om 11:23 heeft hanneder--- via ntg-context 
> mailto:ntg-context@ntg.nl>> het volgende geschreven:
>
> I was just writing a mail (below) and saw:
>
>> They do indic scripts and Kai made the first version of the devanagari code 
>> for the context fontloader code that I then optimized.
>
> Fascinating. Where can I learn more about that or is that
> user-unfriendly (my technical knowledge is rather limited).
>
>
> Dear Hans,
>
> two recurring problems are rather specifically Indological and they concern 
> hyphenation and
> font.
>
> 1. In Sanskrit prose it is possible to produce compounds that span a few 
> lines. The concept of
>   "word" or "word division" fails here, as are the TeX mechanisms.
>
>   What we need in practice would be a "hyphenation" for the language Sanskrit 
> that hyphenates
>   after all Sanskrit vowels (in transcription this would be a, ā, i, ī, u, ū, 
> ṛ, ḷ, e, o, ai, au. The
>   last two cannot be split, "au" is one vowel with one vowel sign in the 
> original script). Of
>   course, we want to improve this automatic spelling occasionally, so we need 
> to be able to insert
>   a \- without thereby disabling the hyphenation for this compound.
>
>   I think in critical editions the problem of the disabled hyphenation also 
> arises when a variant
>   is added inside a word. In any 

Re: [NTG-context] Fonts for transliteration (was: Critical Editions?)

2022-01-10 Thread BPJ via ntg-context
Den mån 10 jan. 2022 10:34  skrev:

> Cardo is another nice font: https://www.scholarsfonts.net/
>
>
>
> Denis
>

Not entirely free last time I looked, and had issues with the rendering of
its lowercase ‹o› (which I suspected was deliberately introduced in the
free version, although that may be unwarranted geek paranoia! :-)

BTW Doulos SIL is their Times clone, although it at least used to lack
italics, which makes it a no-starter for most comparatists who use italics
for object language.



>
> *Von:* ntg-context  *Im Auftrag von *BPJ via
> ntg-context
> *Gesendet:* Sonntag, 9. Januar 2022 17:18
> *An:* mailing list for ConTeXt users 
> *Cc:* BPJ 
> *Betreff:* [NTG-context] Fonts for transliteration (was: Critical
> Editions?)
>
>
>
>
>
> Den sön 9 jan. 2022 13:22Robert via ntg-context 
> skrev:
>
> Dear list,
>
> I am currently working on a critical edition as well, and follow the
> discussion with interest. For the time being, I prefer Latex over Context
> for this project.
>
> In addition to Jürgen's remarks on transcription fonts, a small
> contribution:
>
> Arabists and turcologists working with transcriptions used to have similar
> problems. In the nineties I adapted existing postscript fonts with
> Fontographer. I also made sure to copy kerning information from extant
> letters (e.g. a) to new ones (e.g. ā) with the required diacritic (usually
> dots, dashes and haceks). This was in the pre-unicode era.
>
> Today there is the Brill font which is quite extended, yet I am not sure
> if it can be used freely in other publications.
>
> Adapations to extant fonts can still be made with the open source app
> FontForge. Do not hesitate to contact me offline if you need help on this.
>
>
>
> The technically excellent free Google Noto Serif/Sans/Sans Mono fonts have
> quite extensive coverage of Latin/Greek/Cyrillic scripts. As an
> Indo-Europeanist turned programmer/editor/translator doing frequent forays
> into Uralic and Afroasiatic when wearing a more general historical
> linguistics hat I have found nothing missing.
>
> (If you need a Mono Font make sure to use Noto Sans Mono which has better
> coverage than Noto Mono!)
>
>
>
> https://fonts.google.com/noto
>
>
>
> Much the same can be said of the Charis SIL font from SIL International,
> although the current release lags behind Noto when it comes to coverage.
>
>
>
> https://software.sil.org/charis/
>
>
>
> (Make sure to look at the downloads page for info on downloadable
> customized fonts!)
>
>
>
> There is also the Gentium SIL font with Greek and Cyrillic coverage as
> well as Latin, although its design may be a bit too swashy for academic
> work.
>
>
>
> If something *is* missing these are all licensed under the quite
> permissive Open Font License
>
>
>
> https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi=OFL-FAQ_web
>
>
>
> Publishers may have their own (ideas about) fonts but for course
> materials, handouts, manuscripts, databases and the like these are
> excellent. I do all my work in the Vim text editor (with Noto Sans Mono)
> and *TeX/Pandoc.
>
>
>
> Regards,
>
>
>
> /Benct
>
>
>
>
>
>
> Regards,
>
> Robert
>
> i...@mo-perspectief.nl
>
>
> > Op 9 jan. 2022, om 11:23 heeft hanneder--- via ntg-context <
> ntg-context@ntg.nl> het volgende geschreven:
> >
> > I was just writing a mail (below) and saw:
> >
> >> They do indic scripts and Kai made the first version of the devanagari
> code for the context fontloader code that I then optimized.
> >
> > Fascinating. Where can I learn more about that or is that
> > user-unfriendly (my technical knowledge is rather limited).
> >
> >
> > Dear Hans,
> >
> > two recurring problems are rather specifically Indological and they
> concern hyphenation and
> > font.
> >
> > 1. In Sanskrit prose it is possible to produce compounds that span a few
> lines. The concept of
> >   "word" or "word division" fails here, as are the TeX mechanisms.
> >
> >   What we need in practice would be a "hyphenation" for the language
> Sanskrit that hyphenates
> >   after all Sanskrit vowels (in transcription this would be a, ā, i, ī,
> u, ū, ṛ, ḷ, e, o, ai, au. The
> >   last two cannot be split, "au" is one vowel with one vowel sign in the
> original script). Of
> >   course, we want to improve this automatic spelling occasionally, so we
> need to be able to insert
> >   a \- without thereby disabling the hyphenation for this compound.
> >
> >   I think in c

Re: [NTG-context] Critical Editions?

2022-01-10 Thread Arthur Rosendahl via ntg-context
On Sun, Jan 09, 2022 at 11:46:44PM +0100, Hans Hagen via ntg-context wrote:
> On 1/9/2022 11:23 AM, hanneder--- via ntg-context wrote:
>> 1. In Sanskrit prose it is possible to produce compounds that span a few
>> lines. The concept of
>>     "word" or "word division" fails here, as are the TeX mechanisms.
>> 
>>     What we need in practice would be a "hyphenation" for the language
>> Sanskrit that hyphenates
>>     after all Sanskrit vowels (in transcription this would be a, ā, i,
>> ī, u, ū, ṛ, ḷ, e, o, ai, au. The
>>     last two cannot be split, "au" is one vowel with one vowel sign in
>> the original script). Of
>>     course, we want to improve this automatic spelling occasionally, so
>> we need to be able to insert
>>     a \- without thereby disabling the hyphenation for this compound.
>> 
>>     I think in critical editions the problem of the disabled hyphenation
>> also arises when a variant
>>     is added inside a word. In any case hyphenation is a real nuisance
>> in critical editions.
>
> hypenation ... so no patterns, just injecting discretionaries after specific
> vowels ... doable but it has to happen a some specific moment because when
> language bound it's too soon, and the font handler does some reshuffling; it
> can probabloy best be done after fonts have been done ... given specs a
> typical rainy weekend activity

  There are patterns, that implement almost exactly the kind of
automatic hyphenation Jürgen describes (see
https://github.com/hyphenation/tex-hyphen/blob/master/hyph-utf8/tex/generic/hyph-utf8/patterns/tex/hyph-sa.tex#L50L134).
They’re just not in the ConTeXt distribution ...

Arthur
___
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] Fonts for transliteration (was: Critical Editions?)

2022-01-10 Thread Denis Maier via ntg-context
Cardo is another nice font: https://www.scholarsfonts.net/

Denis

Von: ntg-context  Im Auftrag von BPJ via ntg-context
Gesendet: Sonntag, 9. Januar 2022 17:18
An: mailing list for ConTeXt users 
Cc: BPJ 
Betreff: [NTG-context] Fonts for transliteration (was: Critical Editions?)


Den sön 9 jan. 2022 13:22Robert via ntg-context 
mailto:ntg-context@ntg.nl>> skrev:
Dear list,

I am currently working on a critical edition as well, and follow the discussion 
with interest. For the time being, I prefer Latex over Context for this project.

In addition to Jürgen's remarks on transcription fonts, a small contribution:

Arabists and turcologists working with transcriptions used to have similar 
problems. In the nineties I adapted existing postscript fonts with 
Fontographer. I also made sure to copy kerning information from extant letters 
(e.g. a) to new ones (e.g. ā) with the required diacritic (usually dots, dashes 
and haceks). This was in the pre-unicode era.

Today there is the Brill font which is quite extended, yet I am not sure if it 
can be used freely in other publications.

Adapations to extant fonts can still be made with the open source app 
FontForge. Do not hesitate to contact me offline if you need help on this.

The technically excellent free Google Noto Serif/Sans/Sans Mono fonts have 
quite extensive coverage of Latin/Greek/Cyrillic scripts. As an 
Indo-Europeanist turned programmer/editor/translator doing frequent forays into 
Uralic and Afroasiatic when wearing a more general historical linguistics hat I 
have found nothing missing.
(If you need a Mono Font make sure to use Noto Sans Mono which has better 
coverage than Noto Mono!)

https://fonts.google.com/noto

Much the same can be said of the Charis SIL font from SIL International, 
although the current release lags behind Noto when it comes to coverage.

https://software.sil.org/charis/

(Make sure to look at the downloads page for info on downloadable customized 
fonts!)

There is also the Gentium SIL font with Greek and Cyrillic coverage as well as 
Latin, although its design may be a bit too swashy for academic work.

If something *is* missing these are all licensed under the quite permissive 
Open Font License

https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi=OFL-FAQ_web

Publishers may have their own (ideas about) fonts but for course materials, 
handouts, manuscripts, databases and the like these are excellent. I do all my 
work in the Vim text editor (with Noto Sans Mono) and *TeX/Pandoc.

Regards,

/Benct



Regards,

Robert

i...@mo-perspectief.nl<mailto:i...@mo-perspectief.nl>


> Op 9 jan. 2022, om 11:23 heeft hanneder--- via ntg-context 
> mailto:ntg-context@ntg.nl>> het volgende geschreven:
>
> I was just writing a mail (below) and saw:
>
>> They do indic scripts and Kai made the first version of the devanagari code 
>> for the context fontloader code that I then optimized.
>
> Fascinating. Where can I learn more about that or is that
> user-unfriendly (my technical knowledge is rather limited).
>
>
> Dear Hans,
>
> two recurring problems are rather specifically Indological and they concern 
> hyphenation and
> font.
>
> 1. In Sanskrit prose it is possible to produce compounds that span a few 
> lines. The concept of
>   "word" or "word division" fails here, as are the TeX mechanisms.
>
>   What we need in practice would be a "hyphenation" for the language Sanskrit 
> that hyphenates
>   after all Sanskrit vowels (in transcription this would be a, ā, i, ī, u, ū, 
> ṛ, ḷ, e, o, ai, au. The
>   last two cannot be split, "au" is one vowel with one vowel sign in the 
> original script). Of
>   course, we want to improve this automatic spelling occasionally, so we need 
> to be able to insert
>   a \- without thereby disabling the hyphenation for this compound.
>
>   I think in critical editions the problem of the disabled hyphenation also 
> arises when a variant
>   is added inside a word. In any case hyphenation is a real nuisance in 
> critical editions.
>
> 2. Fonts that contain all necessary diacritics have become sparse. (This is 
> more a lamentation, not
>   much one can do about it, I guess).
>
>   When I started TeXing people were used to writing aṭavī as a\d{t}av{\=\i}. 
> Not user friendly,
>   but it worked with many fonts. With each new font regime Sanskritists had 
> to search for new
>   fonts, invent work-arounds etc. Even the most promising attempts (I spent a 
> lot of time with
>   OmegaTeX) eventually disappeared. Now we are dependent on whether an otf 
> font has the underdot
>   characters (ṭḍṃḥ) and the vowels (āīūṛ). Within the commercial fonts, I 
> found only one
>   "Brotschrift" that worked, which is Adobe Text Pro. I really like Minion, 
> for instance, but the

Re: [NTG-context] Critical Editions?

2022-01-09 Thread Hans Hagen via ntg-context

On 1/9/2022 11:23 AM, hanneder--- via ntg-context wrote:

1. In Sanskrit prose it is possible to produce compounds that span a few 
lines. The concept of

    "word" or "word division" fails here, as are the TeX mechanisms.

    What we need in practice would be a "hyphenation" for the language 
Sanskrit that hyphenates
    after all Sanskrit vowels (in transcription this would be a, ā, i, 
ī, u, ū, ṛ, ḷ, e, o, ai, au. The
    last two cannot be split, "au" is one vowel with one vowel sign in 
the original script). Of
    course, we want to improve this automatic spelling occasionally, so 
we need to be able to insert

    a \- without thereby disabling the hyphenation for this compound.

    I think in critical editions the problem of the disabled hyphenation 
also arises when a variant
    is added inside a word. In any case hyphenation is a real nuisance 
in critical editions.

two things here:

transliterations ... do we need a mechanism for that ? latin in -> 
something else out (if so i need specs)


hypenation ... so no patterns, just injecting discretionaries after 
specific vowels ... doable but it has to happen a some specific moment 
because when language bound it's too soon, and the font handler does 
some reshuffling; it can probabloy best be done after fonts have been 
done ... given specs a typical rainy weekend activity


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] Get Current Section Number

2022-01-09 Thread Wolfgang Schuster via ntg-context

Michael Urban via ntg-context schrieb am 09.01.2022 um 17:25:

I want to put a book title above the Chapter title for the first chapter of a 
book.  I suppose that this can be accomplished with a 'before=' clause that 
checks to see if it is the first chapter... but how do I look at the chapter 
number in order to set up the conditional?


Can you show a example of your document, maybe there is a better way to 
produce the desired result.


\startsetups [document:start]
    \startalignment[middle]
    {\ssd\documentparameter{title}}
    \stopalignment
\stopsetups

\setuphead [chapter] [page=no]

\startdocument [title={Dummy title}]

\dorecurse{5}
  {\startchapter[title={Chapter \convertnumber{word}{#1}}]
   \samplefile{lorem}
   \stopchapter}

\stopdocument

Wolfgang

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

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


[NTG-context] Fonts for transliteration (was: Critical Editions?)

2022-01-09 Thread BPJ via ntg-context
Den sön 9 jan. 2022 13:22Robert via ntg-context  skrev:

> Dear list,
>
> I am currently working on a critical edition as well, and follow the
> discussion with interest. For the time being, I prefer Latex over Context
> for this project.
>
> In addition to Jürgen's remarks on transcription fonts, a small
> contribution:
>
> Arabists and turcologists working with transcriptions used to have similar
> problems. In the nineties I adapted existing postscript fonts with
> Fontographer. I also made sure to copy kerning information from extant
> letters (e.g. a) to new ones (e.g. ā) with the required diacritic (usually
> dots, dashes and haceks). This was in the pre-unicode era.
>
> Today there is the Brill font which is quite extended, yet I am not sure
> if it can be used freely in other publications.
>
> Adapations to extant fonts can still be made with the open source app
> FontForge. Do not hesitate to contact me offline if you need help on this.
>

The technically excellent free Google Noto Serif/Sans/Sans Mono fonts have
quite extensive coverage of Latin/Greek/Cyrillic scripts. As an
Indo-Europeanist turned programmer/editor/translator doing frequent forays
into Uralic and Afroasiatic when wearing a more general historical
linguistics hat I have found nothing missing.
(If you need a Mono Font make sure to use Noto Sans Mono which has better
coverage than Noto Mono!)

https://fonts.google.com/noto

Much the same can be said of the Charis SIL font from SIL International,
although the current release lags behind Noto when it comes to coverage.

https://software.sil.org/charis/

(Make sure to look at the downloads page for info on downloadable
customized fonts!)

There is also the Gentium SIL font with Greek and Cyrillic coverage as well
as Latin, although its design may be a bit too swashy for academic work.

If something *is* missing these are all licensed under the quite permissive
Open Font License

https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi=OFL-FAQ_web

Publishers may have their own (ideas about) fonts but for course materials,
handouts, manuscripts, databases and the like these are excellent. I do all
my work in the Vim text editor (with Noto Sans Mono) and *TeX/Pandoc.

Regards,

/Benct



> Regards,
>
> Robert
>
> i...@mo-perspectief.nl
>
>
> > Op 9 jan. 2022, om 11:23 heeft hanneder--- via ntg-context <
> ntg-context@ntg.nl> het volgende geschreven:
> >
> > I was just writing a mail (below) and saw:
> >
> >> They do indic scripts and Kai made the first version of the devanagari
> code for the context fontloader code that I then optimized.
> >
> > Fascinating. Where can I learn more about that or is that
> > user-unfriendly (my technical knowledge is rather limited).
> >
> >
> > Dear Hans,
> >
> > two recurring problems are rather specifically Indological and they
> concern hyphenation and
> > font.
> >
> > 1. In Sanskrit prose it is possible to produce compounds that span a few
> lines. The concept of
> >   "word" or "word division" fails here, as are the TeX mechanisms.
> >
> >   What we need in practice would be a "hyphenation" for the language
> Sanskrit that hyphenates
> >   after all Sanskrit vowels (in transcription this would be a, ā, i, ī,
> u, ū, ṛ, ḷ, e, o, ai, au. The
> >   last two cannot be split, "au" is one vowel with one vowel sign in the
> original script). Of
> >   course, we want to improve this automatic spelling occasionally, so we
> need to be able to insert
> >   a \- without thereby disabling the hyphenation for this compound.
> >
> >   I think in critical editions the problem of the disabled hyphenation
> also arises when a variant
> >   is added inside a word. In any case hyphenation is a real nuisance in
> critical editions.
> >
> > 2. Fonts that contain all necessary diacritics have become sparse. (This
> is more a lamentation, not
> >   much one can do about it, I guess).
> >
> >   When I started TeXing people were used to writing aṭavī as
> a\d{t}av{\=\i}. Not user friendly,
> >   but it worked with many fonts. With each new font regime Sanskritists
> had to search for new
> >   fonts, invent work-arounds etc. Even the most promising attempts (I
> spent a lot of time with
> >   OmegaTeX) eventually disappeared. Now we are dependent on whether an
> otf font has the underdot
> >   characters (ṭḍṃḥ) and the vowels (āīūṛ). Within the commercial fonts,
> I found only one
> >   "Brotschrift" that worked, which is Adobe Text Pro. I really like
> Minion, for instance, but the
> >   latest otf Version

Re: [NTG-context] Critical Editions?

2022-01-09 Thread Robert via ntg-context
Dear list,

I am currently working on a critical edition as well, and follow the discussion 
with interest. For the time being, I prefer Latex over Context for this project.

In addition to Jürgen's remarks on transcription fonts, a small contribution:

Arabists and turcologists working with transcriptions used to have similar 
problems. In the nineties I adapted existing postscript fonts with 
Fontographer. I also made sure to copy kerning information from extant letters 
(e.g. a) to new ones (e.g. ā) with the required diacritic (usually dots, dashes 
and haceks). This was in the pre-unicode era.

Today there is the Brill font which is quite extended, yet I am not sure if it 
can be used freely in other publications.

Adapations to extant fonts can still be made with the open source app 
FontForge. Do not hesitate to contact me offline if you need help on this.

Regards,

Robert

i...@mo-perspectief.nl


> Op 9 jan. 2022, om 11:23 heeft hanneder--- via ntg-context 
>  het volgende geschreven:
> 
> I was just writing a mail (below) and saw:
> 
>> They do indic scripts and Kai made the first version of the devanagari code 
>> for the context fontloader code that I then optimized.
> 
> Fascinating. Where can I learn more about that or is that
> user-unfriendly (my technical knowledge is rather limited).
> 
> 
> Dear Hans,
> 
> two recurring problems are rather specifically Indological and they concern 
> hyphenation and
> font.
> 
> 1. In Sanskrit prose it is possible to produce compounds that span a few 
> lines. The concept of
>   "word" or "word division" fails here, as are the TeX mechanisms.
> 
>   What we need in practice would be a "hyphenation" for the language Sanskrit 
> that hyphenates
>   after all Sanskrit vowels (in transcription this would be a, ā, i, ī, u, ū, 
> ṛ, ḷ, e, o, ai, au. The
>   last two cannot be split, "au" is one vowel with one vowel sign in the 
> original script). Of
>   course, we want to improve this automatic spelling occasionally, so we need 
> to be able to insert
>   a \- without thereby disabling the hyphenation for this compound.
> 
>   I think in critical editions the problem of the disabled hyphenation also 
> arises when a variant
>   is added inside a word. In any case hyphenation is a real nuisance in 
> critical editions.
> 
> 2. Fonts that contain all necessary diacritics have become sparse. (This is 
> more a lamentation, not
>   much one can do about it, I guess).
> 
>   When I started TeXing people were used to writing aṭavī as a\d{t}av{\=\i}. 
> Not user friendly,
>   but it worked with many fonts. With each new font regime Sanskritists had 
> to search for new
>   fonts, invent work-arounds etc. Even the most promising attempts (I spent a 
> lot of time with
>   OmegaTeX) eventually disappeared. Now we are dependent on whether an otf 
> font has the underdot
>   characters (ṭḍṃḥ) and the vowels (āīūṛ). Within the commercial fonts, I 
> found only one
>   "Brotschrift" that worked, which is Adobe Text Pro. I really like Minion, 
> for instance, but the
>   latest otf Version has no ṭ etc.
> 
>   Thank god, we have many TeX fonts derived from older ones that still work, 
> but many entries in
>   the TeX Font Catalogue do not!
> 
> 
> Jürgen
> 
> 
> 
> 
> ---
> 
> Prof. Dr. Juergen Hanneder
> Philipps-Universitaet Marburg
> FG Indologie u. Tibetologie
> Deutschhausstr.12
> 35032 Marburg
> Germany
> Tel. 0049-6421-28-24930
> hanne...@staff.uni-marburg.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
> ___

___
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] Critical Editions?

2022-01-09 Thread hanneder--- via ntg-context

I was just writing a mail (below) and saw:

They do indic scripts and Kai made the first version of the  
devanagari code for the context fontloader code that I then optimized.


Fascinating. Where can I learn more about that or is that
user-unfriendly (my technical knowledge is rather limited).


Dear Hans,

two recurring problems are rather specifically Indological and they  
concern hyphenation and

font.

1. In Sanskrit prose it is possible to produce compounds that span a  
few lines. The concept of

   "word" or "word division" fails here, as are the TeX mechanisms.

   What we need in practice would be a "hyphenation" for the language  
Sanskrit that hyphenates
   after all Sanskrit vowels (in transcription this would be a, ā, i,  
ī, u, ū, ṛ, ḷ, e, o, ai, au. The
   last two cannot be split, "au" is one vowel with one vowel sign in  
the original script). Of
   course, we want to improve this automatic spelling occasionally,  
so we need to be able to insert

   a \- without thereby disabling the hyphenation for this compound.

   I think in critical editions the problem of the disabled  
hyphenation also arises when a variant
   is added inside a word. In any case hyphenation is a real nuisance  
in critical editions.


2. Fonts that contain all necessary diacritics have become sparse.  
(This is more a lamentation, not

   much one can do about it, I guess).

   When I started TeXing people were used to writing aṭavī as  
a\d{t}av{\=\i}. Not user friendly,
   but it worked with many fonts. With each new font regime  
Sanskritists had to search for new
   fonts, invent work-arounds etc. Even the most promising attempts  
(I spent a lot of time with
   OmegaTeX) eventually disappeared. Now we are dependent on whether  
an otf font has the underdot
   characters (ṭḍṃḥ) and the vowels (āīūṛ). Within the commercial  
fonts, I found only one
   "Brotschrift" that worked, which is Adobe Text Pro. I really like  
Minion, for instance, but the

   latest otf Version has no ṭ etc.

   Thank god, we have many TeX fonts derived from older ones that  
still work, but many entries in

   the TeX Font Catalogue do not!


Jürgen




---

Prof. Dr. Juergen Hanneder
Philipps-Universitaet Marburg
FG Indologie u. Tibetologie
Deutschhausstr.12
35032 Marburg
Germany
Tel. 0049-6421-28-24930
hanne...@staff.uni-marburg.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
___


Re: [NTG-context] Critical Editions?

2022-01-08 Thread BPJ via ntg-context
Den lör 8 jan. 2022 12:44Jean-Pierre Delange via ntg-context <
ntg-context@ntg.nl> skrev:

> Luigi,
>
> Thank you for the link.
>
> Unfortunately this site mentions some typesetting work for research on
> Stoicism (and other stuff) and on uploading the manuscripts of the English
> philosopher John Locke, but apparently some links are dead and the
> maintenance of the site seems to have stopped since ... 2011 .
>
Maybe that is why they talk about "special TeX fonts"? Surely today they
would use an engine which can use conventional Unicode fonts directly?


But maybe Hans knows these people?
>
> see here : https://www.tatzetwerk.nl/projects.php?lang=en#h3
>
> These fellows seem to work for Brepols and Oxford >University Press
> asswell as Utrecht University.
>
> Read this curious assertion (curious because the text mention an invisible
> project) :
> "Stoa Project
>
> The Stoa Project, which is carried out by the history working group of the 
> Department
> of philosophy <http://www.phil.uu.nl/> of Utrecht University, will lead
> to a renewed publication of text fragments of the early Stoa, represented
> by philosophers such as Zeno, Chrysippus and Cleanthes. Very little of our
> knowledge about the Stoa comes from primary sources; most of what we know
> about it has been derived from secondary sources. Our most important
> sources are other philosophers and doxographers, who have cited and
> paraphrased the learnings of the early Stoa. Through modern research on
> doxographic traditions and republications of many of the sources, the
> current publication of this material, J. von Arnim’s Stoicorum Veterum
> Fragmenta (1903-1924) has become outdated.
>
> TAT Zetwerk’s role in this project is managing the FileMaker database that
> contains Stoic text fragments (mainly in ancient Greek) accompanied by text
> critical and historic-philosophical notes, an English translation, and meta
> data. As soon as the text parts in the database have reached their final
> form, we convert them into a TeX-format, so that we can generate a mirrored
> critical edition. We can then create indices and concordances by using the
> meta data from the database. Currently, the Stoa Project does not have its
> own website."
> If I understand, TAT Zetwerk manage Apple FileMaker database of pieces of
> Stoicorum Fragmenta texts (von Arnim edition) in order to convert them in
> TeX form (with critical apparatus...). But they give no sample.
>
>
> Le 07/01/2022 à 18:35, luigi scarso via ntg-context a écrit :
>
>
>
> On Fri, Jan 7, 2022 at 6:25 PM hanneder--- via ntg-context <
> ntg-context@ntg.nl> wrote:
>
>>
>> Probably the situation in South Asian Studies (Indology) is peculiar.
>> As I indicated, there are mostly no  budgets for book typesetting in
>> Indology and
>> I know of no real expert for typesetting in this field. In other
>> words, the authors
>> have do it themselves, usually in Word etc., but some do use TeX etc.
>> Our publications
>> series (Indologica Marpurgensia) is, for instance, all done with
>> LaTeX, as are my publications
>> with Harrassowitz, which is the largest publisher in our field in
>> Germany. There is no institution
>> offering typesetting of Sanskrit editions, because there is no
>> commercial interest in it and I
>> think there is no expertise for this (especially when Indian scripts
>> are used instead of transliteration).
>>
>> Journals are different. Indological journals published by Brill use
>> TeX internally, which is convenient,
>> but most others know only Word (->InDesign). That is the situation,
>> frustrating in a way, but it also
>> gives some freedom for using TeX (and, sadly, creating one's own
>> dilettantic designs).
>>
>> Jürgen
>>
>
> perhaps this can be interesting
> https://www.tatzetwerk.nl/
> (seen them at a context meeting years ago)
>
>
> --
> luigi
>
> ___
> 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
> ___
>
> --
> Jean-Pierre Delange
> Agrégé de philosophie
> Ancients
> "Few discoveries are more irritating than those which expose the pedigree of 
> ideas" -

Re: [NTG-context] Critical Editions?

2022-01-08 Thread Jean-Pierre Delange via ntg-context

Luigi,

Thank you for the link.

Unfortunately this site mentions some typesetting work for research on 
Stoicism (and other stuff) and on uploading the manuscripts of the 
English philosopher John Locke, but apparently some links are dead and 
the maintenance of the site seems to have stopped since ... 2011 . But 
maybe Hans knows these people?


see here : https://www.tatzetwerk.nl/projects.php?lang=en#h3

These fellows seem to work for Brepols and Oxford >University Press 
asswell as Utrecht University.


Read this curious assertion (curious because the text mention an 
invisible project) :


"Stoa Project

The Stoa Project, which is carried out by the history working group of 
the Department of philosophy <http://www.phil.uu.nl/> of Utrecht 
University, will lead to a renewed publication of text fragments of the 
early Stoa, represented by philosophers such as Zeno, Chrysippus and 
Cleanthes. Very little of our knowledge about the Stoa comes from 
primary sources; most of what we know about it has been derived from 
secondary sources. Our most important sources are other philosophers and 
doxographers, who have cited and paraphrased the learnings of the early 
Stoa. Through modern research on doxographic traditions and 
republications of many of the sources, the current publication of this 
material, J. von Arnim’s Stoicorum Veterum Fragmenta (1903-1924) has 
become outdated.


TAT Zetwerk’s role in this project is managing the FileMaker database 
that contains Stoic text fragments (mainly in ancient Greek) accompanied 
by text critical and historic-philosophical notes, an English 
translation, and meta data. As soon as the text parts in the database 
have reached their final form, we convert them into a TeX-format, so 
that we can generate a mirrored critical edition. We can then create 
indices and concordances by using the meta data from the database. 
Currently, the Stoa Project does not have its own website."


If I understand, TAT Zetwerk manage Apple FileMaker database of pieces 
of Stoicorum Fragmenta texts (von Arnim edition) in order to convert 
them in TeX form (with critical apparatus...). But they give no sample.



Le 07/01/2022 à 18:35, luigi scarso via ntg-context a écrit :



On Fri, Jan 7, 2022 at 6:25 PM hanneder--- via ntg-context 
 wrote:



Probably the situation in South Asian Studies (Indology) is peculiar.
As I indicated, there are mostly no  budgets for book typesetting in
Indology and
I know of no real expert for typesetting in this field. In other
words, the authors
have do it themselves, usually in Word etc., but some do use TeX etc.
Our publications
series (Indologica Marpurgensia) is, for instance, all done with
LaTeX, as are my publications
with Harrassowitz, which is the largest publisher in our field in
Germany. There is no institution
offering typesetting of Sanskrit editions, because there is no
commercial interest in it and I
think there is no expertise for this (especially when Indian scripts
are used instead of transliteration).

Journals are different. Indological journals published by Brill use
TeX internally, which is convenient,
but most others know only Word (->InDesign). That is the situation,
frustrating in a way, but it also
gives some freedom for using TeX (and, sadly, creating one's own
dilettantic designs).

Jürgen


perhaps this can be interesting
https://www.tatzetwerk.nl/
(seen them at a context meeting years ago)

--
luigi

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


--
Jean-Pierre Delange
Agrégé de philosophie
Ancients
"Few discoveries are more irritating than those which expose the pedigree of 
ideas" - Lord Acton
___
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] Critical Editions?

2022-01-07 Thread Hans Hagen via ntg-context

On 1/7/2022 6:25 PM, hanneder--- via ntg-context wrote:


Probably the situation in South Asian Studies (Indology) is peculiar.
As I indicated, there are mostly no  budgets for book typesetting in 
Indology and
I know of no real expert for typesetting in this field. In other words, 
the authors
have do it themselves, usually in Word etc., but some do use TeX etc. 
Our publications
series (Indologica Marpurgensia) is, for instance, all done with LaTeX, 
as are my publications
with Harrassowitz, which is the largest publisher in our field in 
Germany. There is no institution
offering typesetting of Sanskrit editions, because there is no 
commercial interest in it and I
think there is no expertise for this (especially when Indian scripts are 
used instead of transliteration).


there was a time that publishers had some pride in offering low volume 
publications and paid for that by large volume succes stories ... but 
those were real publishers (persons, not companies)


Journals are different. Indological journals published by Brill use TeX 
internally, which is convenient,
but most others know only Word (->InDesign). That is the situation, 
frustrating in a way, but it also
gives some freedom for using TeX (and, sadly, creating one's own 
dilettantic designs).

that brings me to the question:

  what do those who are independent from publishers really
  want in a typeseting system .. not bound by what a specific
  publisher with no real interest but profit demands

i'm often puzzled by the fact that in spite of what technology (and 
thereby tex) makes possible is not used to its full extend .. (my 
favourite exmaple: why go along the troublesome accessibility path 
instead of providing plenty variants that suit specific users and 
publish the sources so that those interested in it can do it ... 
interestingly easy audio inclusion was dropped from pdf instead of 
adding means to attach that to a stretch of text) .. i think publishers 
were never really interested in those things (no reserch lab anyway)


so ... what features would make *you* happy if you didn't have to take 
publishing (which doesn't happen) and tradition (imposed by those who 
don't publish your work anyway) into account but could produce the best 
for your reader


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
___


<    1   2   3   4   5   6   7   8   9   10   >