Re: [NTG-context] Cannot access Lua function

2021-10-31 Thread kauśika cittūr via ntg-context
On Sunday, October 31, 2021 2:43:48 PM IST Hans Hagen wrote:
> I bet that clever students can trace that down -)

Just to clarify, I am a student at university. Have to make some documents as 
a teaching assistant in courses so many students use the same abbreviations.

> 
> in that case you probably need to hide more .. (when you process with
> \nopdfcompression at the top you can look in the pdf, i.e. compression
> is not encryption
> 
> one thing you can do is make a copy of lpdf-xmp.lmt and wipe all tricky
> values and then use that to make a format
> 
> but if security is important, maybe better is to use "qpdf" to encrypt
> the file (you can then also prevent editing for instance)

I will try this out. Many thanks for your detailed response Hans!

Best
kauśika


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

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


Re: [NTG-context] Cannot access Lua function

2021-10-30 Thread kauśika cittūr via ntg-context
On Saturday, October 30, 2021 9:16:15 PM IST Hans Hagen wrote:
> cf the pdf speca:
> 
> Creator: If the document was converted to PDF from another format,
> the name of the PDF processor that created the original document from
> which it was converted.
> 
> Producer: If the document was converted to PDF from another format,
> the name of the PDF processor that converted it to PDF.
> 
> so changing that is kind of cheating.
> 
> Hans

Dear Hans,

Thanks for the reference. Just to clarify, I only do this for VERY FEW 
documents I make, not all.

In some cases, I need to keep the author of the document unidentifiable for 
purposes of security, since otherwise, people who know how to look for 
metadata can easily identify that I am the author given the small # of people 
using ConTeXt. In my department at university I am the only one using it as 
far as I know. The 'IKTS-VTR' values above are just an abbreviation for my 
lab/course.

Anyway, since it is not good practice, I will try to make do without this.

Thanks,
kauśika


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

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


Re: [NTG-context] Cannot access Lua function

2021-10-30 Thread kauśika cittūr via ntg-context
On Saturday, October 30, 2021 4:57:07 PM IST Hans Hagen wrote:
> that function was only meant for internal (inter-lua-module
> communication) usage (also because there are some expectations abotu
> what is in there)
> 
> what do you want change?

Dear Hans,

I want to (/used to) set the creator and producer in the following manner 

\startluacode
local metadata = lpdf.getmetadata();
metadata['producer']='IKTS-VTR';
metadata['creator']='IKTS-VTR';
\stopluacode

I was not able to do this using \setupinteraction, which I use to setup the 
title, subtitle and author.

Thanks, 
kauśika


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

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


[NTG-context] Cannot access Lua function

2021-10-30 Thread kauśika cittūr via ntg-context
Dear list,

In one of my documents I have this lua block –
\startluacode
local metadata = lpdf.getmetadata();
⋮
\stopluacode
to modify some metadata fields.

The file compiles with the latest LMTX (2021.10.28) without any errors but no 
PDF is produced. In the log, the following line is present :

backend > blocked > function 'getmetadata' is not accessible

I recall that this was working just fine some days back.

Please advise.

Thanks,
kauśika


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

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


Re: [NTG-context] [Solved] Line breaks, \wordright and hyphenation

2021-10-26 Thread kauśika cittūr via ntg-context
On Monday, October 25, 2021 7:34:06 AM IST kauśika cittūr wrote:
> On Sunday, October 24, 2021 7:42:59 AM IST kauśika cittūr wrote:
> > Dear list,
> > 
> > In short, my question is: why does \wordright cause a line-break when the
> > line preceding it breaks with hyphenation and does not otherwise? How to
> > avoid it (if at all possible)?
> > 
> > I have this delimitedtext instance called 'amnata' defined as below:
> > 
> > \definemeasure[amnatamargin][3cm]
> > \definedelimitedtext
> > 
> >   [amnata]
> > 
> > \setupdelimitedtext
> > 
> >   [amnata]
> >   [
> > 
> > left=,
> > right=,
> > leftmargin={\measure{amnatamargin}},
> > rightmargin={\measure{amnatamargin}},
> > 
> >   ]
> > 
> > I am using this to quote paragraph(s) of other authors.
> > Since, I also want to indicate where the quote is from, I use this as
> > follows:
> > 
> > \startamnata
> > 
> >   ⋮
> > 
> > \wordright{author}
> > \stopamnata
> > 
> > so that the author's name appears at the right-edge of the block.
> > 
> > When the penultimate line inside the block breaks without hyphenation,
> > then
> > argument of \wordright is typeset as expected (i.e. in the same line).
> > 
> > On the other hand, when the penultimate line inside this block breaks with
> > hyphenation, the argument of \wordright is pushed to the next line even
> > when there is enough space for it on the same line.
> > 
> > Here is a sample illustrating this:
> > 
> > \startamnata
> > A quote from another author : Suppose that thereisalongwordhere.
> > \wordright{– author}
> > \stopamnata
> > 
> > \startamnata
> > A quote from another author : Here, the text does not cause
> > hyphenation in the first line.
> > \wordright{– author}
> > \stopamnata
> > 
> > [I have attached the output here as an image]
> > 
> > How do I ensure that this does not happen, if that is possible at all? I
> > suppose this is expected behaviour but I am not able to understand why.
> > 
> > Thanks,
> > kauśika
> 
> Dear list,
> 
> Although, not a fix for the issue, here is a workaround that allowed me to
> achieve what I wanted:
> 
> \definedescription[amnata]
> \setupdescription[amnata]
>   [closesymbol={​},
>closecommand=\wordright,
>before=\startamnatanarrower,
>after=\stopamnatanarrower]
> 
> \startamnata
> A quote from another author : Suppose that thereisalongwordhere.
> \wordright{– author}
> \stopamnata
> 
> With this the argument of \wordright appears correctly at the right-edge of
> the block. Note that this does not work (as expected) when closesymbol is
> not set (or, is empty). Therefore, here I have set closesymbol={​​U+200B},
> which is the zero width space.
> 
> Thanks,
> kauśika

Dear list,

As it turns out, my workaround here is subpar since it inserts an undesired 
line after the description block.

Hans was very kind to send me a fix to place in cont-new.mkxl that fixes the 
issue. However, due to my errors in properly pasting the fix correctly, it did 
not work. I updated LMTX today and the fix is already merged.

I am pasting below Hans' fix for reference (for anyone who might come across 
this later) –

\protect
\protected\def\spac_word_right_indeed#1#2%
  {\registerparwrapper
 {\v!word:\v!right}
 {\begingroup
  \frozen\parfillskip\zeropoint
  \frozen\finalhyphendemerits\zerocount
  \endgroup}
 {\doifelseparwrapper{\v!word:\v!right}{\unregisterparwrapper{\v!word:\v!
right}}\donothing
  \removeunwantedspaces
  \doifelse{#1}\v!right{\kern-\rightskip}{\doifsomething{#1}{\kern-#1}}%
  \hfilll
  \discretionary{\strut}{\strut}{\strut}% \allowbreak % changed back from 
\hskip\zeropoint
  \hfilll
  \quad % decent spacing
  #2}}
\unprotect

kauśika


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

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


Re: [NTG-context] Line breaks, \wordright and hyphenation

2021-10-24 Thread kauśika cittūr via ntg-context
On Sunday, October 24, 2021 7:42:59 AM IST kauśika cittūr wrote:
> Dear list,
> 
> In short, my question is: why does \wordright cause a line-break when the
> line preceding it breaks with hyphenation and does not otherwise? How to
> avoid it (if at all possible)?
> 
> I have this delimitedtext instance called 'amnata' defined as below:
> 
> \definemeasure[amnatamargin][3cm]
> \definedelimitedtext
>   [amnata]
> \setupdelimitedtext
>   [amnata]
>   [
>   left=,
>   right=,
>   leftmargin={\measure{amnatamargin}},
>   rightmargin={\measure{amnatamargin}},
>   ]
> 
> I am using this to quote paragraph(s) of other authors.
> Since, I also want to indicate where the quote is from, I use this as
> follows:
> 
> \startamnata
>   ⋮
> \wordright{author}
> \stopamnata
> 
> so that the author's name appears at the right-edge of the block.
> 
> When the penultimate line inside the block breaks without hyphenation, then
> argument of \wordright is typeset as expected (i.e. in the same line).
> 
> On the other hand, when the penultimate line inside this block breaks with
> hyphenation, the argument of \wordright is pushed to the next line even when
> there is enough space for it on the same line.
> 
> Here is a sample illustrating this:
> 
> \startamnata
> A quote from another author : Suppose that thereisalongwordhere.
> \wordright{– author}
> \stopamnata
> 
> \startamnata
> A quote from another author : Here, the text does not cause
> hyphenation in the first line.
> \wordright{– author}
> \stopamnata
> 
> [I have attached the output here as an image]
> 
> How do I ensure that this does not happen, if that is possible at all? I
> suppose this is expected behaviour but I am not able to understand why.
> 
> Thanks,
> kauśika

Dear list,

Although, not a fix for the issue, here is a workaround that allowed me to 
achieve what I wanted:

\definedescription[amnata]
\setupdescription[amnata]
  [closesymbol={​},
   closecommand=\wordright,
   before=\startamnatanarrower,
   after=\stopamnatanarrower]

\startamnata
A quote from another author : Suppose that thereisalongwordhere.
\wordright{– author}
\stopamnata

With this the argument of \wordright appears correctly at the right-edge of 
the block. Note that this does not work (as expected) when closesymbol is not 
set (or, is empty). Therefore, here I have set closesymbol={​​U+200B}, which 
is the zero width space.

Thanks,
kauśika


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

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


Re: [NTG-context] Line breaks, \wordright and hyphenation

2021-10-24 Thread kauśika cittūr via ntg-context
On Sunday, October 24, 2021 5:31:32 PM IST Hans Hagen wrote:
> On 10/24/2021 1:08 PM, Benjamin Buchmuller via ntg-context wrote:
> > Maybe
> > 
> > \hfill author
> 
> It's anyway nicer to use
> 
> % \definenarrower
> %   [amnata]
> %   [left=\measure{amnatamargin},
> %right=\measure{amnatamargin},
> %default={left,right}]
> 
> \definenarrower
>[amnata]
>[middle=\measure{amnatamargin}]
> 
> but then them, the fact that we get something hyphenated interferes ..
> tricky

Dear Benjamin and Hans,

Thanks for your responses.

I did not mention this in my initial question but I am not exactly doing 
'author' in the last line. Instead I usually do
\cite[alternative=authoryears,righttext={Ch. 12}][author1992].
That is, almost always, I need to refer to a specific chapter/page number in 
the work. The issue with this and \hfill is that the 'righttext' part gets 
nudged into the next line.

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] Line breaks, \wordright and hyphenation

2021-10-24 Thread kauśika cittūr via ntg-context
On Sunday, October 24, 2021 7:42:59 AM IST kauśika cittūr wrote:
> Dear list,
> 
> In short, my question is: why does \wordright cause a line-break when the
> line preceding it breaks with hyphenation and does not otherwise? How to
> avoid it (if at all possible)?
> 
> I have this delimitedtext instance called 'amnata' defined as below:
> 
> \definemeasure[amnatamargin][3cm]
> \definedelimitedtext
>   [amnata]
> \setupdelimitedtext
>   [amnata]
>   [
>   left=,
>   right=,
>   leftmargin={\measure{amnatamargin}},
>   rightmargin={\measure{amnatamargin}},
>   ]
> 
> I am using this to quote paragraph(s) of other authors.
> Since, I also want to indicate where the quote is from, I use this as
> follows:
> 
> \startamnata
>   ⋮
> \wordright{author}
> \stopamnata
> 
> so that the author's name appears at the right-edge of the block.
> 
> When the penultimate line inside the block breaks without hyphenation, then
> argument of \wordright is typeset as expected (i.e. in the same line).
> 
> On the other hand, when the penultimate line inside this block breaks with
> hyphenation, the argument of \wordright is pushed to the next line even when
> there is enough space for it on the same line.
> 
> Here is a sample illustrating this:
> 
> \startamnata
> A quote from another author : Suppose that thereisalongwordhere.
> \wordright{– author}
> \stopamnata
> 
> \startamnata
> A quote from another author : Here, the text does not cause
> hyphenation in the first line.
> \wordright{– author}
> \stopamnata
> 
> [I have attached the output here as an image]
> 
> How do I ensure that this does not happen, if that is possible at all? I
> suppose this is expected behaviour but I am not able to understand why.
> 
> Thanks,
> kauśika

Just noticed that the attachment image does not seem to have been sent.
Resending …

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

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


[NTG-context] Line breaks, \wordright and hyphenation

2021-10-23 Thread kauśika cittūr via ntg-context
Dear list,

In short, my question is: why does \wordright cause a line-break when the line 
preceding it breaks with hyphenation and does not otherwise? How to avoid it 
(if at all possible)?

I have this delimitedtext instance called 'amnata' defined as below:

\definemeasure[amnatamargin][3cm]
\definedelimitedtext
  [amnata]
\setupdelimitedtext
  [amnata]
  [
left=,
right=,
leftmargin={\measure{amnatamargin}},
rightmargin={\measure{amnatamargin}},
  ]

I am using this to quote paragraph(s) of other authors. 
Since, I also want to indicate where the quote is from, I use this as follows:

\startamnata
  ⋮
\wordright{author}
\stopamnata

so that the author's name appears at the right-edge of the block.

When the penultimate line inside the block breaks without hyphenation, then 
argument of \wordright is typeset as expected (i.e. in the same line).

On the other hand, when the penultimate line inside this block breaks with 
hyphenation, the argument of \wordright is pushed to the next line even when 
there is enough space for it on the same line.

Here is a sample illustrating this:

\startamnata
A quote from another author : Suppose that thereisalongwordhere.
\wordright{– author}
\stopamnata

\startamnata
A quote from another author : Here, the text does not cause 
hyphenation in the first line.
\wordright{– author}
\stopamnata

[I have attached the output here as an image] 

How do I ensure that this does not happen, if that is possible at all? I 
suppose this is expected behaviour but I am not able to understand why.

Thanks,
kauśika___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Number conversion in btxlist and citations

2021-09-16 Thread kauśika cittūr via ntg-context
On Wednesday, September 15, 2021 8:08:59 PM IST kauśika cittūr wrote:
> Dear all,
> 
> I have a simple btx definition 'mylist' for which I have written a simple
> publ-imp-mylist.lua and publ-imp-mylist-mkvi. In that latter I have
> 
> ⋮
> \definebtx
>   [mylist]
>   [default=default,specification=mylist]
> \definebtxrendering
>[mylist]
>[specification=mylist]
> \setupbtxlist
>   [mylist]
>   [numberconversion=myconv]
> ⋮
> 
> I have define the required setups for every category entry as well. I have
> verified that this btxrendering works. I have also verified that my
> conversion set 'myconv' is functional (I am using it for page numbers and
> section headings).
> 
> However, the numbers used in the citation are not converted. That is,
> 'numberconversion=myconv' seems to have no effect. What am I doing wrong?
> 
> Please advise.
> 
> Thanks,
> kauśika

Dear all,

After looking through publ-imp-cite.mkvi I was able to piece together the 
following setup for my cite command

\definecounter
  [mycitecntr]
  [counter=mycitecntr]

\startsetups btx:mylist:cite:num
  \goto{\getnumber[mycitecntr]}[\s!internal(\currentbtxinternal)]
  \incrementnumber[mycitecntr]
\stopsetups

along with

\setupbtxlist
  [mylist]
  [counter=mycitecounter]

With this the citations numbers are converted properly, they do not start at 1 
but instead are offset from 1 by the total number of citations. Moreover, the 
list placed by \placelistofpublications still uses the regular numbers (i.e 
conversion does not occur).

Clearly I am doing something wrong. I am very grateful for any guidance.

Thanks,
kauśika


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

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


Re: [NTG-context] Number conversion in btxlist and citations

2021-09-16 Thread kauśika cittūr via ntg-context
On Wednesday, September 15, 2021 8:08:59 PM IST kauśika cittūr wrote:
> Dear all,
> 
> I have a simple btx definition 'mylist' for which I have written a simple
> publ-imp-mylist.lua and publ-imp-mylist-mkvi. In that latter I have
> 
> ⋮
> \definebtx
>   [mylist]
>   [default=default,specification=mylist]
> \definebtxrendering
>[mylist]
>[specification=mylist]
> \setupbtxlist
>   [mylist]
>   [numberconversion=myconv]
> ⋮
> 
> I have define the required setups for every category entry as well. I have
> verified that this btxrendering works. I have also verified that my
> conversion set 'myconv' is functional (I am using it for page numbers and
> section headings).
> 
> However, the numbers used in the citation are not converted. That is,
> 'numberconversion=myconv' seems to have no effect. What am I doing wrong?
> 
> Please advise.
> 
> Thanks,
> kauśika

Dear all,

I have also tried this with the available 'words' conversion set. Even in that 
case, the conversion is not performed.

Please help. I would gladly share more information if required. I am using the 
latest LMTX.

Thank you,
kauśika



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

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


[NTG-context] Number conversion in btxlist and citations

2021-09-15 Thread kauśika cittūr via ntg-context
Dear all,

I have a simple btx definition 'mylist' for which I have written a simple 
publ-imp-mylist.lua and publ-imp-mylist-mkvi. In that latter I have

⋮
\definebtx
  [mylist]
  [default=default,specification=mylist]
\definebtxrendering
   [mylist]
   [specification=mylist]
\setupbtxlist
  [mylist]
  [numberconversion=myconv]
⋮

I have define the required setups for every category entry as well. I have 
verified that this btxrendering works. I have also verified that my conversion 
set 'myconv' is functional (I am using it for page numbers and section 
headings). 

However, the numbers used in the citation are not converted. That is, 
'numberconversion=myconv' seems to have no effect. What am I doing wrong?

Please advise.

Thanks,
kauśika


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

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


Re: [NTG-context] PDF metadata and pdfx keys

2021-09-15 Thread kauśika cittūr via ntg-context
On Wednesday, September 15, 2021 6:07:09 PM IST Hans Hagen wrote:
> On 9/15/2021 1:27 PM, kauśika cittūr via ntg-context wrote:
> > On Wednesday, September 15, 2021 8:08:34 AM IST kauśika cittūr wrote:
> >> Dear all,
> >> 
> >> In my documents I use
> >> \setupinteraction
> >> 
> >>  [
> >>  
> >>  author={AuthorName},
> >>  title={MyTitle},
> >>  subtitle={MySubtitle},
> >>  
> >>  ]
> >> 
> >> to set the document metadata. I also use
> >> \startluacode
> >> 
> >>  local metadata = lpdf.getmetadata();
> >>  metadata['producer']='author';
> >>  metadata['creator']='author';
> >> 
> >> \stopluacode
> >> to set the creator and producer. However, the document produced by
> >> ConTeXt
> >> still has the user defined keys (pdfx:) written in the metadata. I have
> >> gone through lpdf-xmp.lua, lpdf-ini.lua and back-ini.lua. Yet, I am not
> >> able to figure out how to prevent the pdfx: tags from being written.
> >> 
> >> Is it possible to prevent them from being written? I prefer not to tamper
> >> with any of the ConTeXt distribution files. In this case, is there
> >> something I can do per-document to prevent these tags from being written?
> >> 
> >> Please advise.
> >> 
> >> Thanks,
> >> kauśika
> > 
> > Dear all,
> > 
> > I hope my query is clear. For example when I run the command
> > pdfinfo -meta
> > on the generated PDF output, there are several 'pdfx:' tags in the XML
> > output.
> > 
> > I am grateful for any help in this regard.
> 
> these run specific entries are 'hard coded' (as are those in fonts
> metadata)
> 
> (you can of course run the file through a script that replaces what you
> don't want (for some reason) by spaces, as long as the bytes stay at the
> same place)
> 
> Hans
> 
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -

Dear Hans,

I understand now. Thanks for clarifying.

Best,
kauśika



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

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


Re: [NTG-context] PDF metadata and pdfx keys

2021-09-15 Thread kauśika cittūr via ntg-context
On Wednesday, September 15, 2021 8:08:34 AM IST kauśika cittūr wrote:
> Dear all,
> 
> In my documents I use
> \setupinteraction
> [
> author={AuthorName},
> title={MyTitle},
> subtitle={MySubtitle},
> ]
> to set the document metadata. I also use
> \startluacode
> local metadata = lpdf.getmetadata();
> metadata['producer']='author';
> metadata['creator']='author';
> \stopluacode
> to set the creator and producer. However, the document produced by ConTeXt
> still has the user defined keys (pdfx:) written in the metadata. I have gone
> through lpdf-xmp.lua, lpdf-ini.lua and back-ini.lua. Yet, I am not able to
> figure out how to prevent the pdfx: tags from being written.
> 
> Is it possible to prevent them from being written? I prefer not to tamper
> with any of the ConTeXt distribution files. In this case, is there
> something I can do per-document to prevent these tags from being written?
> 
> Please advise.
> 
> Thanks,
> kauśika

Dear all,

I hope my query is clear. For example when I run the command
pdfinfo -meta 
on the generated PDF output, there are several 'pdfx:' tags in the XML output. 

I am grateful for any help in this regard.

Thanks,
kauśika


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

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


[NTG-context] PDF metadata and pdfx keys

2021-09-14 Thread kauśika cittūr via ntg-context
Dear all,

In my documents I use 
\setupinteraction
[
author={AuthorName},
title={MyTitle},
subtitle={MySubtitle},
]
to set the document metadata. I also use 
\startluacode
local metadata = lpdf.getmetadata();
metadata['producer']='author';
metadata['creator']='author';
\stopluacode
to set the creator and producer. However, the document produced by ConTeXt 
still has the user defined keys (pdfx:) written in the metadata. I have gone 
through lpdf-xmp.lua, lpdf-ini.lua and back-ini.lua. Yet, I am not able to 
figure out how to prevent the pdfx: tags from being written. 

Is it possible to prevent them from being written? I prefer not to tamper with 
any of the ConTeXt distribution files. In this case, is there something I can 
do per-document to prevent these tags from being written?

Please advise.

Thanks,
kauśika




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

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


Re: [NTG-context] Axis macro in MetaFun

2021-09-11 Thread kauśika cittūr via ntg-context
On Saturday, September 11, 2021 10:30:25 PM IST Hans Hagen wrote:
> On 9/11/2021 4:27 PM, kauśika cittūr via ntg-context wrote:
> > Dear All,
> > 
> > I am truly grateful for the new additions to MetaFun. It has greatly
> > helped me in producing neat drawings for my academic work. In this
> > connection, I have a few queries.
> > 
> > Currently I am using PGFPlots (with ConTeXt) to draw simple plots from CSV
> > data. I was wondering if there is any way to do the same in MetaFuns. That
> > is, is it possible to do something like the following in order to obtain
> > a line plot of the values in the 'data.csv' file? Also is it possible to
> > have the 'labels' be the identical for all points in a given list?
> > 
> > \startMPcode
> > 
> >draw lmt_axis [
> >
> >sx = 2mm, sy = 2mm,
> >nx = 80, ny = 40,
> >tx = 15, ty = 15,
> >
> >list = {
> >
> >  [
> >  
> >connect = true,
> >color = "darkblue",
> >close = true,
> >points = {data.csv},
> >labels = {"•"},
> >  
> >  ]
> >
> >},
> >
> >] withpen pencircle scaled 0.5mm;
> > 
> > \stopMPcode
> 
> It depends on how one has data in the csv, You can patch mlib-scn.lmt
> (line 659)
> 
>  if type(v) == "table" then
>  return injectpath(v,connector,close)
>  elseif type(v) == "string" then
>  local code = load("return " .. v)
>  if code then
>  return code()
>  end
>  else
>  return injectpair(0,0)
>  end
> 
> then a string represents a function:
> 
> \starttext
> 
> \startluacode
>  io.savedata("temp.csv", "x,y\n10,10\n20,40\n30,30\n")
> 
>  local mycsvsplitter = utilities.parsers.rfc4180splitter()
> 
>  function MP.MyPoints(name)
>  local data = io.loaddata(name)
>  local list = mycsvsplitter(data)
>  table.remove(list,1)
>  for i=1,#list do
>  list[i][1] = tonumber(list[i][1])
>  list[i][2] = tonumber(list[i][2])
>  end
>  mp.inject.path(list)
>  end
> 
> \stopluacode
> 
> \startMPcode
>draw lmt_axis [
>sx = 2mm, sy = 2mm,
>nx = 80, ny = 40,
>tx = 15, ty = 15,
> 
>list = {
>  [
>connect = true,
>color = "darkblue",
>close = true,
>points = "MP.MyPoints('temp.csv')",
>labels = {"•"},
>  ]
>},
>] withpen pencircle scaled 0.5mm;
> \stopMPcode
> 
> \stoptext
> 
> we can of course have some predefined and when we can agree on how these
> files loo, adding a "csv" is no big deal ... it's all about consistent
> interfacing
> 
> 
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -

Dear Hans,

Many thanks for your detailed guidance. I think for now this patch should 
suffice for my simple needs.

Best,
kauśika


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

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


[NTG-context] Axis macro in MetaFun

2021-09-11 Thread kauśika cittūr via ntg-context
Dear All,

I am truly grateful for the new additions to MetaFun. It has greatly helped me 
in producing neat drawings for my academic work. In this connection, I have a 
few queries.

Currently I am using PGFPlots (with ConTeXt) to draw simple plots from CSV 
data. I was wondering if there is any way to do the same in MetaFuns. That is, 
is it possible to do something like the following in order to obtain a line 
plot of the values in the 'data.csv' file? Also is it possible to have the 
'labels' be the identical for all points in a given list? 

\startMPcode
  draw lmt_axis [
  sx = 2mm, sy = 2mm,
  nx = 80, ny = 40,
  tx = 15, ty = 15, 
  
  list = {
[
  connect = true,
  color = "darkblue",
  close = true,
  points = {data.csv},
  labels = {"•"},
]
  },
  ] withpen pencircle scaled 0.5mm;
\stopMPcode

My final query: is it possible to specify a co-ordinate transform for any/all 
of the axes? For instance in my work, I would like to plot the y-axis in the 
log-scale.

Thanks,
kauśika


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

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


Re: [NTG-context] Default page layout

2021-09-11 Thread kauśika cittūr via ntg-context
On Friday, September 10, 2021 2:09:29 PM IST Hans Hagen wrote:
> On 9/10/2021 7:26 AM, kauśika cittūr via ntg-context wrote:
> > Dear List,
> > 
> > I am using LMTX 2021.08.30 19:56.
> > 
> > I have the following example –
> > \starttext
> > \showlayout
> > 
> > \input knuth
> > \stoptext
> > 
> > which yields an output (attached here) with a "asymmetric" layout.
> > 
> > Am I doing something wrong? Or have I missed something? Please advise.
> 
> this is indeed the default, originating in initial usage decades ago:
> singlesided stapled prints and a wide outer margin for making notes
> 
> you can do
> 
>\setuplayout[width=middle,height=middle]
> 
> as well as
> 
>\setuppagenumbering[alternative=doublesided]
> 
> and more like that
> 
> 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
> -

Dear Hans,

Thanks for the explanation.

Best,
kauśika


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

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


Re: [NTG-context] Default page layout

2021-09-09 Thread kauśika cittūr via ntg-context
On Friday, September 10, 2021 10:56:09 AM IST kauśika cittūr wrote:
> Dear List,
> 
> I am using LMTX 2021.08.30 19:56.
> 
> I have the following example –
> \starttext
> \showlayout
> 
> \input knuth
> \stoptext
> 
> which yields an output (attached here) with a "asymmetric" layout.
> 
> Am I doing something wrong? Or have I missed something? Please advise.
> 
> Thanks,
> kauśika

I have since upgraded to LMTX 2021.09.06 11:47 and the issue persists.

kauśika



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

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


[NTG-context] Default page layout

2021-09-09 Thread kauśika cittūr via ntg-context
Dear List,

I am using LMTX 2021.08.30 19:56.

I have the following example –
\starttext
\showlayout

\input knuth
\stoptext 

which yields an output (attached here) with a "asymmetric" layout.

Am I doing something wrong? Or have I missed something? Please advise.

Thanks,
kauśika

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

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


Re: [NTG-context] Incorrect rendering in Devanagari forms in some fonts

2021-09-01 Thread kauśika cittūr via ntg-context
On Wednesday, September 1, 2021 1:43:56 PM IST kauśika cittūr wrote:
> Dear All,
> 
> I have encountered a strange problem using certain Devanagari fonts for the
> Sanskrit languagein ConTeXt, wherein the rakaar ligatures are not rendered
> properly in some glyphs/conjuncts. The problem is not too easy to describe
> so please pardon this long email.
> 
> The fonts I am using are as follows:
>   • Shobhika – https://github.com/Sandhi-IITBombay/Shobhika
>   • Murty Sanskrit – https://murtylibrary.com/mcli-fonts.php
> 
> I had previously posted about this issue on TeX SE and Ulrike Fischer was
> kind enough to suggest that the problem might have something to do with the
> font rendering (since I have no issues in XeLaTeX (using Harfbuzz)):
> 
> https://tex.stackexchange.com/questions/612634/devanagari-forms-in-context-u
> sing-shobhika-font
> 
> My ConTeXt (LMTX) version is: 2021.08.30 19:56
> 
> I am using the following typescript for Murty:
> 
> \starttypescript [serif] [murty]
>   \definefontsynonym
> [Serif]
> [name:murtysanskritregular]
> [features=devanagari-two]
> \stoptypescript
> 
> \starttypescript [murty]
>   \definetypeface [murty] [rm] [serif] [murty] [default]
> \stoptypescript
> 
> and the following for Shobhika:
> 
> \starttypescript [serif] [shobhika]
>   \definefontsynonym
> [Serif]
> [name:shobhikaregular]
> [features=devanagari-two]
>   \definefontsynonym
> [SerifBold]
> [name:shobhikabold]
> [features=devanagari-two]
> \stoptypescript
> 
> \starttypescript [shobhika]
>   \definetypeface [shobhika] [rm] [serif] [shobhika]
> \stoptypescript
> 
> Below is the test file I am using to demonstrate the problem:
> 
> \setupbodyfont[shobhika]
> \starttext
> \startcolumns
> ट्रा ट्रि ट्री ट्रु द्रू ट्रे ट्रै ट्रो ट्रौ
> 
> ठ्रा ठ्रि ठ्री ठ्रु ठ्रू ठ्रे ठ्रै ठ्रो ठ्रौ
> 
> ड्रा ड्रि ड्री ड्रु ड्रू ड्रे ड्रै ड्रो ड्रौ
> 
> ढ्रा ढ्रि ढ्री ढ्रु ढ्रू ढ्रे ढ्रै ढ्रो ढ्रौ
> 
> छ्रा छ्रि छ्री छ्रु छ्रू छ्रे छ्रै छ्रो छ्रौ
> 
> \column
> क्र ख्र ग्र घ्र ण्र
> 
> च्र छ्र ज्र झ्र ञ्र
> 
> च्रे छ्रे ज्रे झ्रे ञ्रे
> 
> त्रे थ्रे द्रे ध्रे न्रे
> 
> प्र फ्र ब्र भ्र म्र
> 
> य्र ल्र व्र स्र श्र ष्र ह्र
> \stopcolumns
> \stoptext
> 
> When I use the 'devanagari-two' feature set, which sets the script tag to
> 'dev2', the rakaar forms (provided by the features 'rkrf=yes' and
> 'blwf=yes') do not render properly for some glyphs, namely the glyphs in
> the right column, enclosed in a red rectangle in the file
> 'devanagari-two-forms-shobhika.png' attached in the Drive folder here.
> 
> When I switch to using the 'devanagari-one'
> feature set (in the foregoing typescript definitions), which sets the script
> tag to 'deva', the rakaar forms in the left column are rendered incorrectly
> in
> the file 'devanagari-one-forms-shobhika.png' attached in the Drive folder
> here.
> 
> Analogous problems occur with the Murty font. Further, in the Murty font,
> one other conjunct, namely
> त् +‌ त
> does not render properly. I have highlighted this in the file
> 'murty-conjuct.png'.
> 
> The sample images demonstrating the issues are available in the following
> public Google Drive folder:
> 
> https://drive.google.com/drive/folders/1aOmPKqBzB5usVvT9g-Bxk87exyiQn7ax
> 
> I must mention once again that I have no such problems using either of these
> fonts in XeLaTeX.
> 
> What I am noticing is that this problem only occurs with consonant forms
> that have a 'circular base', i.e., have no danda (the vertical line) next
> to the character. For what it is worth, I have noticed also that I am able
> to 'circumvent' this issue if I write
> 
> छ्र‌ +‌ ​ZWS + Devanagari vowel sign
> 
> where ZWS is the zero-width space U+200B. Unfortunately, this quickly
> becomes very untenable in large documents. Since I was new to ConTeXt I did
> not venture
> to ask earlier on since I had not read much of the documentaion. Now, after
> having read quite a bit, I have mustered up the courage to ask here. As a
> stop-gap solution, I defined another font alternative with
> \definefontalternative[rk]
> and used that with a font synonym using 'devanagari-two' where necessary.
> 
> I have completely migrated (away from (Xe)LaTeX )to ConTeXt for all my
> university work which is in English with lots of mathematics. I am by no
> means an expert but I have learned very much about ConTeXt by reading the
> excellent wiki, documentation and mailing list. I have no issues using
> ConTeXt on an everyday basis for my English-language based work. It is only
> when I tried to use it for my work in Indian-languages that I ran into this
> issue.
> 
> I request your kind help in this matter. I really want to be able to use
> ConTeXt for these Indic works. I will be grateful for any help and/or
> guidance.
> 
> Many thanks,
> kauśika

Dear List,

I request your kind help in this matter. I have consulted almost all resources 
on ConTeXt in this regard, despite which I am unable to resolve it. I 

[NTG-context] Incorrect rendering in Devanagari forms in some fonts

2021-09-01 Thread kauśika cittūr via ntg-context
Dear All,

I have encountered a strange problem using certain Devanagari fonts for the 
Sanskrit languagein ConTeXt, wherein the rakaar ligatures are not rendered 
properly in some glyphs/conjuncts. The problem is not too easy to describe so 
please pardon this long email.

The fonts I am using are as follows: 
  • Shobhika – https://github.com/Sandhi-IITBombay/Shobhika
  • Murty Sanskrit – https://murtylibrary.com/mcli-fonts.php

I had previously posted about this issue on TeX SE and Ulrike Fischer was 
kind enough to suggest that the problem might have something to do with the 
font rendering (since I have no issues in XeLaTeX (using Harfbuzz)): 

https://tex.stackexchange.com/questions/612634/devanagari-forms-in-context-using-shobhika-font

My ConTeXt (LMTX) version is: 2021.08.30 19:56

I am using the following typescript for Murty:

\starttypescript [serif] [murty]
  \definefontsynonym 
[Serif] 
[name:murtysanskritregular] 
[features=devanagari-two]
\stoptypescript

\starttypescript [murty]
  \definetypeface [murty] [rm] [serif] [murty] [default]
\stoptypescript 

and the following for Shobhika:

\starttypescript [serif] [shobhika]
  \definefontsynonym 
[Serif] 
[name:shobhikaregular] 
[features=devanagari-two]
  \definefontsynonym 
[SerifBold] 
[name:shobhikabold]
[features=devanagari-two]
\stoptypescript

\starttypescript [shobhika]
  \definetypeface [shobhika] [rm] [serif] [shobhika]
\stoptypescript

Below is the test file I am using to demonstrate the problem:

\setupbodyfont[shobhika]
\starttext
\startcolumns
ट्रा ट्रि ट्री ट्रु द्रू ट्रे ट्रै ट्रो ट्रौ

ठ्रा ठ्रि ठ्री ठ्रु ठ्रू ठ्रे ठ्रै ठ्रो ठ्रौ

ड्रा ड्रि ड्री ड्रु ड्रू ड्रे ड्रै ड्रो ड्रौ

ढ्रा ढ्रि ढ्री ढ्रु ढ्रू ढ्रे ढ्रै ढ्रो ढ्रौ

छ्रा छ्रि छ्री छ्रु छ्रू छ्रे छ्रै छ्रो छ्रौ

\column
क्र ख्र ग्र घ्र ण्र 

च्र छ्र ज्र झ्र ञ्र

च्रे छ्रे ज्रे झ्रे ञ्रे

त्रे थ्रे द्रे ध्रे न्रे 

प्र फ्र ब्र भ्र म्र

य्र ल्र व्र स्र श्र ष्र ह्र 
\stopcolumns
\stoptext

When I use the 'devanagari-two' feature set, which sets the script tag to 
'dev2', the rakaar forms (provided by the features 'rkrf=yes' and 'blwf=yes') 
do not render properly for some glyphs, namely the glyphs in the right column, 
enclosed in a red rectangle in the file 'devanagari-two-forms-shobhika.png' 
attached in the Drive folder here.

When I switch to using the 'devanagari-one' 
feature set (in the foregoing typescript definitions), which sets the script 
tag to 'deva', the rakaar forms in the left column are rendered incorrectly  
in 
the file 'devanagari-one-forms-shobhika.png' attached in the Drive folder here.

Analogous problems occur with the Murty font. Further, in the Murty font, one 
other conjunct, namely
त् +‌ त 
does not render properly. I have highlighted this in the file 
'murty-conjuct.png'.

The sample images demonstrating the issues are available in the following 
public Google Drive folder: 

https://drive.google.com/drive/folders/1aOmPKqBzB5usVvT9g-Bxk87exyiQn7ax

I must mention once again that I have no such problems using either of these 
fonts in XeLaTeX. 

What I am noticing is that this problem only occurs with consonant forms that 
have a 'circular base', i.e., have no danda (the vertical line) next to the 
character. For what it is worth, I have noticed also that I am able to 
'circumvent' this issue if I write 

छ्र‌ +‌ ​ZWS + Devanagari vowel sign

where ZWS is the zero-width space U+200B. Unfortunately, this quickly becomes 
very untenable in large documents. Since I was new to ConTeXt I did not 
venture 
to ask earlier on since I had not read much of the documentaion. Now, after 
having read quite a bit, I have mustered up the courage to ask here. As a 
stop-gap solution, I defined another font alternative with
\definefontalternative[rk]
and used that with a font synonym using 'devanagari-two' where necessary. 

I have completely migrated (away from (Xe)LaTeX )to ConTeXt for all my 
university work which is in English with lots of mathematics. I am by no means 
an expert but I have learned very much about ConTeXt by reading the excellent 
wiki, documentation and mailing list. I have no issues using ConTeXt on an 
everyday basis for my English-language based work. It is only when I tried to 
use it for my work in Indian-languages that I ran into this issue.

I request your kind help in this matter. I really want to be able to use 
ConTeXt for these Indic works. I will be grateful for any help and/or 
guidance.

Many thanks,
kauśika
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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