Re: [NTG-context] Addition of authortitle sorttype for bibliographies

2021-09-19 Thread Joey McCollum via ntg-context
Actually, since some categories (such as @review and @suppbook from
biblatex) do not necessarily have titles of their own, it may be best to
include a few other fields in the sort sequence to accommodate them. The
following sequence may be better:

```
publications.sortmethods.authortitle = {
sequence = {
{ field = "author",default = "",   unknown = "" },
{ field = "title", default = "",   unknown = "" },
{ field = "booktitle", default = "",   unknown = "" }, --
if this is an untitled section (e.g., introduction, foreword, preface) of a
book or a review of a book
{ field = "maintitle", default = "",   unknown = "" }, --
if this is an untitled section or volume in a multivolume collection
{ field = "volume",default = "",   unknown = "" },
{ field = "part",  default = "",   unknown = "" },
{ field = "date",  default = "9998-13-32", unknown =
"-14-33" }, -- some specifications allow date instead of year, month,
day
{ field = "year",  default = "9998",   unknown = "" },
{ field = "month", default = "13", unknown = "14" },
{ field = "day",   default = "32", unknown = "33" },
{ field = "index", default = "",   unknown = "" },
},
}
```

It is also worth noting that in order for the volume field to sort
properly, its values will have to be padded with leading zeroes; otherwise,
an entry with volume = {2} will be sorted after one with volume = {10}. To
accommodate this, specifications would need to remove the leading zeroes
when they typeset volume and part numbers.

Joey

On Sun, Sep 19, 2021 at 2:02 PM Joey McCollum 
wrote:

> Hi,
>
> I've had to make another update to the general publications support code
> in order to implement a feature of the SBL rendering. Denis Maier has
> opened some issues on the context-sbl GitHub repo (
> https://github.com/jjmccollum/context-sbl) to offer some helpful
> suggestions about needed features and bug fixes. One issue was that SBL
> should order list entries by author and title. Thankfully, there is already
> an authordate sortmethod defined in publ-aut.lua (probably to support the
> Chicago rendering), so I was able to use it as a template for the
> following authortitle sort sequence:
>
> ```
> publications.sortmethods.authortitle = {
> sequence = {
> { field = "author",  default = "", unknown = "" },
> { field = "title",   default = "", unknown = "" },
> { field = "date",  default = "9998-13-32", unknown =
> "-14-33" }, -- some specifications allow date instead of year, month,
> day
> { field = "year",default = "9998", unknown = "" },
> { field = "month",   default = "13",   unknown = "14" },
> { field = "day", default = "32",   unknown = "33" },
> { field = "index",   default = "", unknown = "" },
> },
> }
> ```
>
> I added this to publ-aut.lua because publications.sortmethods.authoryear
> is defined in that file, but if another location is more appropriate, then
> feel free to let me know, and I can move it! Otherwise, if this looks okay
> to include in a future update, then feel free to incorporate it!
>
> Joey
>
___
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] Addition of authortitle sorttype for bibliographies

2021-09-19 Thread Joey McCollum via ntg-context
Hi,

I've had to make another update to the general publications support code in
order to implement a feature of the SBL rendering. Denis Maier has opened
some issues on the context-sbl GitHub repo (
https://github.com/jjmccollum/context-sbl) to offer some helpful
suggestions about needed features and bug fixes. One issue was that SBL
should order list entries by author and title. Thankfully, there is already
an authordate sortmethod defined in publ-aut.lua (probably to support the
Chicago rendering), so I was able to use it as a template for the
following authortitle sort sequence:

```
publications.sortmethods.authortitle = {
sequence = {
{ field = "author",  default = "", unknown = "" },
{ field = "title",   default = "", unknown = "" },
{ field = "date",  default = "9998-13-32", unknown =
"-14-33" }, -- some specifications allow date instead of year, month,
day
{ field = "year",default = "9998", unknown = "" },
{ field = "month",   default = "13",   unknown = "14" },
{ field = "day", default = "32",   unknown = "33" },
{ field = "index",   default = "", unknown = "" },
},
}
```

I added this to publ-aut.lua because publications.sortmethods.authoryear is
defined in that file, but if another location is more appropriate, then
feel free to let me know, and I can move it! Otherwise, if this looks okay
to include in a future update, then feel free to incorporate it!

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

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


Re: [NTG-context] no lua configuration files found

2021-09-19 Thread Rik Kabel via ntg-context


On 9/19/2021 07:46, Henning Hraban Ramm via ntg-context wrote:

I hope it’s again only me being stupid, but when I try to update my LMTX 
installation or make a new one, the install script always fails with the above 
warning.


~/lmtx_2021-09-19 $ . install.sh
mtxrun  | forcing cache reload
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf-local/web2c' from specification 
'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf-context/web2c' from specification 
'selfautoparent:/texmf-context/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf-dist/web2c' from specification 
'selfautoparent:/texmf-dist/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf/web2c' from specification 'selfautoparent:/texmf/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf-local/web2c' from specification 
'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf-context/web2c' from specification 
'selfautoparent:/texmf-context/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf-dist/web2c' from specification 
'selfautoparent:/texmf-dist/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf/web2c' from specification 
'selfautoparent:/texmf/web2c'
resolvers   | resolving |
resolvers   | resolving | warning: no lua configuration files found
resolvers   | resolving | no texmf paths are defined (using TEXMF)
resolvers   | resolving |
mtxrun  | the resolver databases are not present or outdated
mtx-install | provide valid server and instance

cp: /Users/hraban/lmtx_2021-09-19/tex/texmf-osx-64/bin/mtxrun: No such file or 
directory
cp: 
/Users/hraban/lmtx_2021-09-19/tex/texmf-context/scripts/context/lua/mtxrun.lua: 
No such file or directory
cp: 
/Users/hraban/lmtx_2021-09-19/tex/texmf-context/scripts/context/lua/mtx-install.lua:
 No such file or directory

If you want to run ConTeXt everywhere, you need to adapt the path, like:

   export PATH=/Users/hraban/lmtx_2021-09-19/tex/texmf-osx-64/bin:$PATH

If you run from an editor you can specify the full path to mtxrun:

   /Users/hraban/lmtx_2021-09-19/tex/texmf-osx-64/bin/mtxrun --autogenerate 
--script context --autopdf ...

The following settings were used:

   server   : lmtx.contextgarden.net,lmtx.pragma-ade.com,lmtx.pragma-ade.nl
   instance : install-lmtx
   extras   :
   ownpath  : /Users/hraban/lmtx_2021-09-19
   platform : osx-64


It looks like the root path is wrongly assumed, since I run the script from 
~/lmtx_2021-09-19, not just ~

TEXROOT is set to /Users/hraban/lmtx/tex (my previous installation), but get 
the same messages if I run the script there.

Same behavior with osx-64 and linux-64.


Hraban


Same here on Windows 10 x64:

   resolvers   | resolving |
   resolvers   | resolving | warning: no lua configuration files found
   resolvers   | resolving | no texmf paths are defined (using TEXMF)
   resolvers   | resolving |
   mtxrun  | the resolver databases are not present or outdated
   mtx-install | provide valid server and instance

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

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


[NTG-context] no lua configuration files found

2021-09-19 Thread Henning Hraban Ramm via ntg-context
I hope it’s again only me being stupid, but when I try to update my LMTX 
installation or make a new one, the install script always fails with the above 
warning.


~/lmtx_2021-09-19 $ . install.sh
mtxrun  | forcing cache reload
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf-local/web2c' from specification 
'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf-context/web2c' from specification 
'selfautoparent:/texmf-context/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf-dist/web2c' from specification 
'selfautoparent:/texmf-dist/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf/web2c' from specification 'selfautoparent:/texmf/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf-local/web2c' from specification 
'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf-context/web2c' from specification 
'selfautoparent:/texmf-context/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf-dist/web2c' from specification 
'selfautoparent:/texmf-dist/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf/web2c' from specification 
'selfautoparent:/texmf/web2c'
resolvers   | resolving |
resolvers   | resolving | warning: no lua configuration files found
resolvers   | resolving | no texmf paths are defined (using TEXMF)
resolvers   | resolving |
mtxrun  | the resolver databases are not present or outdated
mtx-install | provide valid server and instance

cp: /Users/hraban/lmtx_2021-09-19/tex/texmf-osx-64/bin/mtxrun: No such file or 
directory
cp: 
/Users/hraban/lmtx_2021-09-19/tex/texmf-context/scripts/context/lua/mtxrun.lua: 
No such file or directory
cp: 
/Users/hraban/lmtx_2021-09-19/tex/texmf-context/scripts/context/lua/mtx-install.lua:
 No such file or directory

If you want to run ConTeXt everywhere, you need to adapt the path, like:

  export PATH=/Users/hraban/lmtx_2021-09-19/tex/texmf-osx-64/bin:$PATH

If you run from an editor you can specify the full path to mtxrun:

  /Users/hraban/lmtx_2021-09-19/tex/texmf-osx-64/bin/mtxrun --autogenerate 
--script context --autopdf ...

The following settings were used:

  server   : lmtx.contextgarden.net,lmtx.pragma-ade.com,lmtx.pragma-ade.nl
  instance : install-lmtx
  extras   : 
  ownpath  : /Users/hraban/lmtx_2021-09-19
  platform : osx-64


It looks like the root path is wrongly assumed, since I run the script from 
~/lmtx_2021-09-19, not just ~

TEXROOT is set to /Users/hraban/lmtx/tex (my previous installation), but get 
the same messages if I run the script there.

Same behavior with osx-64 and linux-64.


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] tabulate with lp columns

2021-09-19 Thread Henning Hraban Ramm via ntg-context


> Am 19.09.2021 um 13:27 schrieb Wolfgang Schuster via ntg-context 
> :
> 
> Henning Hraban Ramm via ntg-context schrieb am 19.09.2021 um 13:14:
>>> Am 19.09.2021 um 13:01 schrieb Wolfgang Schuster via ntg-context 
>>> :
>>> 
>>> Henning Hraban Ramm via ntg-context schrieb am 19.09.2021 um 12:44:
 There are some problems in the following MWEs.
 
 First example looks the same with MkIV and LMTX, second uses \NS that is 
 only in LMTX.
 
 The first column is justified even if it’s defined as left aligned; this 
 happens also with a simple "l" column. With "p" the width is ignored.
>>> You're missing a \NC at the start of each row.
>> You’re right; in testing I got an empty column when I started with \NC (and 
>> wasn’t sure any more if something changed that I forgot), but I probably 
>> missed one line or something.
>> 
>> The problem with \NS remains:
>> 
>> \starttabulate[|lp(.2\textwidth)|lp(.2\textwidth)|lp(.2\textwidth)|lp(.2\textwidth)|]
>> \NC Default \NC Linux \NC MacOS \NC Windows \NC\NR
>> \HL
>> \NC Text processor \NS[3][l] LibreOffice or else \NC\NR
>> \NC Drawing\NS[2][lp(.4\textwidth)] Inkscape \NC Corel Draw \NC\NR
>> \NC Simple Editor  \NC Nano \NC TextEdit \NC Notepad \NC\NR
>> \stoptabulate
> 
> You have to pass the number of additional columns are argument.

Ah, i.e. one less than I was expecting from any other column span syntax...

Thank you!

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] tabulate with lp columns

2021-09-19 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 19.09.2021 um 13:14:

Am 19.09.2021 um 13:01 schrieb Wolfgang Schuster via ntg-context 
:

Henning Hraban Ramm via ntg-context schrieb am 19.09.2021 um 12:44:

There are some problems in the following MWEs.

First example looks the same with MkIV and LMTX, second uses \NS that is only 
in LMTX.

The first column is justified even if it’s defined as left aligned; this happens also with a simple 
"l" column. With "p" the width is ignored.

You're missing a \NC at the start of each row.

You’re right; in testing I got an empty column when I started with \NC (and 
wasn’t sure any more if something changed that I forgot), but I probably missed 
one line or something.

The problem with \NS remains:

\starttabulate[|lp(.2\textwidth)|lp(.2\textwidth)|lp(.2\textwidth)|lp(.2\textwidth)|]
\NC Default \NC Linux \NC MacOS \NC Windows \NC\NR
\HL
\NC Text processor \NS[3][l] LibreOffice or else \NC\NR
\NC Drawing\NS[2][lp(.4\textwidth)] Inkscape \NC Corel Draw \NC\NR
\NC Simple Editor  \NC Nano \NC TextEdit \NC Notepad \NC\NR
\stoptabulate


You have to pass the number of additional columns are argument.

\starttext

\starttabulate[|*{4}{lp|}]
\NC Default    \NC Linux \NC MacOS    \NC Windows    \NC\NR
\HL
\NC Text processor \NS[2][p] LibreOffice or else \NC\NR
\NC Drawing    \NS[1][p]Inkscape  \NC Corel Draw \NC\NR
\NC Simple Editor  \NC Nano  \NC TextEdit \NC Notepad    \NC\NR
\stoptabulate

\stoptext

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] tabulate with lp columns

2021-09-19 Thread Henning Hraban Ramm via ntg-context

> Am 19.09.2021 um 13:01 schrieb Wolfgang Schuster via ntg-context 
> :
> 
> Henning Hraban Ramm via ntg-context schrieb am 19.09.2021 um 12:44:
>> There are some problems in the following MWEs.
>> 
>> First example looks the same with MkIV and LMTX, second uses \NS that is 
>> only in LMTX.
>> 
>> The first column is justified even if it’s defined as left aligned; this 
>> happens also with a simple "l" column. With "p" the width is ignored.
> 
> You're missing a \NC at the start of each row.

You’re right; in testing I got an empty column when I started with \NC (and 
wasn’t sure any more if something changed that I forgot), but I probably missed 
one line or something.

The problem with \NS remains:

\starttabulate[|lp(.2\textwidth)|lp(.2\textwidth)|lp(.2\textwidth)|lp(.2\textwidth)|]
\NC Default \NC Linux \NC MacOS \NC Windows \NC\NR
\HL
\NC Text processor \NS[3][l] LibreOffice or else \NC\NR
\NC Drawing\NS[2][lp(.4\textwidth)] Inkscape \NC Corel Draw \NC\NR
\NC Simple Editor  \NC Nano \NC TextEdit \NC Notepad \NC\NR
\stoptabulate


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] tabulate with lp columns

2021-09-19 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 19.09.2021 um 12:44:

There are some problems in the following MWEs.

First example looks the same with MkIV and LMTX, second uses \NS that is only 
in LMTX.

The first column is justified even if it’s defined as left aligned; this happens also with a simple 
"l" column. With "p" the width is ignored.


You're missing a \NC at the start of each row.

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] tabulate with lp columns

2021-09-19 Thread Henning Hraban Ramm via ntg-context
There are some problems in the following MWEs.

First example looks the same with MkIV and LMTX, second uses \NS that is only 
in LMTX.


The first column is justified even if it’s defined as left aligned; this 
happens also with a simple "l" column. With "p" the width is ignored.

With \NS the alignment is also wrong in the same way.


\starttext

\starttabulate[|lp(.2\textwidth)|lp(.2\textwidth)|lp(.2\textwidth)|lp(.2\textwidth)|]
Default \NC Linux \NC MacOS \NC Windows \NC\NR
\HL
Text Proc \NC LibreOffice \NC Apple Pages   \NC MS Office (Word) \NC\NR
PDF Viewer\NC Evince  \NC Preview   \NC Edge \NC\NR
\stoptabulate


\starttabulate[|lp(.2\textwidth)|lp(.2\textwidth)|lp(.2\textwidth)|lp(.2\textwidth)|]
Default \NC Linux \NC MacOS \NC Windows \NC\NR
\HL
Text processor \NS[3][l] LibreOffice or else \NC\NR
Drawing\NS[2][lp(.4\textwidth)] Inkscape \NC Corel Draw \NC\NR
Simple Editor  \NC Nano \NC TextEdit \NC Notepad \NC\NR
\stoptabulate


\stoptext


Additional question: How would I define those columns to use the whole 
\textwidth ?


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] Acrobat doesn’t display some imported metadata

2021-09-19 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample to import metadata (title, author, subject,
keywords and dates).

  \starttext
  \startluacode
  function document.transfer_metadata(name)
local main_doc = lpdf.epdf.load(name)
lpdf.addtocatalog("Lang", lpdf.unicode(main_doc.Catalog.Lang),
  main_doc.Catalog.Lang)
lpdf.addtoinfo("Title", lpdf.unicode(main_doc.Info.Title),
  lpdf.string(main_doc.Info.Title))
lpdf.addtoinfo("Subject", lpdf.unicode(main_doc.Info.Subject),
  lpdf.string(main_doc.Info.Subject))
lpdf.addtoinfo("Keywords", lpdf.unicode(main_doc.Info.Keywords),
  lpdf.string(main_doc.Info.Keywords))
lpdf.addtoinfo("Author", lpdf.unicode(main_doc.Info.Author),
  lpdf.string(main_doc.Info.Author))
lpdf.addtoinfo("CreationDate",
  lpdf.string(main_doc.Info.CreationDate))
lpdf.addtoinfo("ModDate", lpdf.string(main_doc.Info.ModDate),
  main_doc.Info.ModDate)
lpdf.epdf.unload(name)
  end
  \stopluacode
  \unexpanded\def\TransferMetadata#1%
{\ctxlua{document.transfer_metadata("#1")}}
  \startTEXpage[offset=1em, align=center]
  \ssbf metadatos\\importados
  \TransferMetadata{metadata.pdf}
  \stopTEXpage
  \stoptext

Importing from https://pdf.ousia.tk/metadata.pdf gives
https://pdf.ousia.tk/imported-metadata.pdf.

Imported metadata from title, creation and modification dates are not
displayed right in Acrobat. Other PDF viewers display these metadata fine.

How can I get that Acrobat displays the metadata from the imported document?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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
___