Re: [NTG-context] Implementing a custom authorconversion for bibliographies

2021-09-14 Thread Joey McCollum via ntg-context
All right, I figured out where I needed to make this change for it to take
effect. The relevant script is publ-aut.lua. The code I needed to change
was for the "oneauthor" function definition, which itself is located in the
"btxauthor" function definition. My changes are detailed below:

```
local function oneauthor(i,last,justone)
local author = split[i]
if index then
ctx_btxstartauthor(i,1,0)
elseif last then
ctx_btxstartauthor(i,1,0)
ctx_btxsetconcat(0)
if combiner == "invertedfirst" then
if i == 1 then
ctx_btxsetauthorvariant("inverted")
else
ctx_btxsetauthorvariant("normal")
end
else
ctx_btxsetauthorvariant(combiner)
end
else
local state = author.state or 0
ctx_btxstartauthor(i,max,state)
ctx_btxsetconcat(concatstate(i,max))
if combiner == "invertedfirst" then
if i == 1 then
ctx_btxsetauthorvariant("inverted")
else
ctx_btxsetauthorvariant("normal")
end
else
ctx_btxsetauthorvariant(combiner)
end
end
local initials = author.initials
if initials and #initials > 0 then
ctx_btxsetinitials() --
(concat(the_initials(initials,symbol)," "))
end
local firstnames = author.firstnames
if firstnames and #firstnames > 0 then
ctx_btxsetfirstnames() -- (concat(firstnames," "))
end
local vons = author.vons
if vons and #vons > 0 then
ctx_btxsetvons() -- (concat(vons," "))
end
local surnames = author.surnames
if surnames and #surnames > 0 then
ctx_btxsetsurnames() -- (concat(surnames," "))
end
local juniors = author.juniors
if juniors and #juniors > 0 then
ctx_btxsetjuniors() -- (concat(juniors," "))
end
if not index and i == max then
if split.others then
ctx_btxsetoverflow(1)
else
local overflow = #split - max
if overflow > 0 then
ctx_btxsetoverflow(overflow)
end
end
end
if combiner == "invertedfirst" then
if i == 1 then
ctx_btxsetup("inverted")
else
ctx_btxsetup("normal")
end
else
ctx_btxsetup(combiner)
end
ctx_btxstopauthor()
end
```

I'll admit that the addition of entire if-else blocks around whether or not
the combiner is a specific value may not be the best practice in terms of
future maintenance (especially if similar index-dependent
authorconversions are needed in the future). Alternatively, the
"btxauthor" function could populate a "combiners" array of length "max"
with a specific authorconversion for each author in the split; for most
authorconversions, all entries in this array would be the same, but for
authorconversions like "invertedfirst", the first entry would be different
from the rest. Then, the "oneauthor" function could just reference
combiners[i] instead of combiner.

Joey

On Fri, Sep 3, 2021 at 10:48 PM Joey McCollum 
wrote:

> Hi,
>
> I mentioned this in an earlier e-mail but thought that now might be a good
> time to describe this issue in detail. I'd like to define a new
> authorconversion that renders the first author in a list differently than
> the remaining authors in the list. Specifically, I'd like to use the
> "inverted" authorconversion for the first author and the "normal"
> authorconversion for the rest.
>
> In the newer bibl-bib.lua file, I can see what I might have to modify to
> accomplish this (I added the  if combiner == "invertedfirst"  block):
>
> ```
> function authors.concat(author,combiner,what,settings)
> if type(combiner) == "string" then
> combiner = authors[combiner or "normal"] or authors.normal
> end
> local split = splitauthors(author)
> local setting = settings[what]
> local etallimit, etaldisplay, etaltext = 1000, 1000, ""
> if setting then
> etallimit   = settings.etallimit   or 1000
> etaldisplay = settings.etaldisplay or etallimit
> etalltext   = settings.etaltextor ""
> end
> local max = #split
> if max > etallimit and etaldisplay < max then
> max = etaldisplay
> end
> if combiner == "invertedfirst" then
> for i=1,max do
> if i == 1 then
> split[i] 

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


[NTG-context] An Org Mode export backend for ConTeXt

2021-09-14 Thread Garulfo via ntg-context

Hi,


From https://blog.tecosaur.com/tmio/2021-08-38-roaming.html

" We’ve long been able to export to LaTeX files with ox-latex, but now
  you can export to ConTeXt too with ox-context! While only just
  released, a lot of work has already gone into this — with development
  starting almost a year ago by the commit history."

Link : https://github.com/Jason-S-Ross/ox-context

Great!

Garulfo
___
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] Roman PDF labels

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



Pablo Rodriguez via ntg-context schrieb am 14.09.2021 um 14:38:

On 9/14/21 1:58 PM, Sylvain Hubert via ntg-context wrote:

Dear List,

Do we have something like "\pagenumbering{roman}" in latex, which sets
the pdf labels (page numbers for pdf viewers, not the ones rendered in
the footer) to roman numbers?

Hi Sylvain,

copied from
https://wiki.contextgarden.net/Table_of_Contents#Page_numbering_in_ToC:

   \definestructureconversionset[frontpart:pagenumber][][romannumerals]
   \definestructureconversionset[bodypart:pagenumber] [][numbers]

   \setuplist[chapter][pageconversionset=pagenumber]


There is no need to set the number conversion for list.


   \startsectionblockenvironment[frontpart]
   \setupuserpagenumber[numberconversion=romannumerals]
   \setuppagenumber[number=1]
   \stopsectionblockenvironment


No need for these settings because you already changed the number conversion
for the frontmatter and the counter starts at 1 by default.

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] Roman PDF labels

2021-09-14 Thread Pablo Rodriguez via ntg-context
On 9/14/21 1:58 PM, Sylvain Hubert via ntg-context wrote:
> Dear List,
>
> Do we have something like "\pagenumbering{roman}" in latex, which sets
> the pdf labels (page numbers for pdf viewers, not the ones rendered in
> the footer) to roman numbers?

Hi Sylvain,

copied from
https://wiki.contextgarden.net/Table_of_Contents#Page_numbering_in_ToC:

  \definestructureconversionset[frontpart:pagenumber][][romannumerals]
  \definestructureconversionset[bodypart:pagenumber] [][numbers]

  \setuplist[chapter][pageconversionset=pagenumber]

  \startsectionblockenvironment[frontpart]
  \setupuserpagenumber[numberconversion=romannumerals]
  \setuppagenumber[number=1]
  \stopsectionblockenvironment

  \startsectionblockenvironment[bodypart]
  \setuppagenumber[number=1]
  \stopsectionblockenvironment
  \starttext
  \startfrontmatter
  \dorecurse{25}{\null\page}
  \stopfrontmatter
  \startbodymatter
  \dorecurse{25}{\null\page}
  \stopbodymatter
  \stoptext

I hope it helps,

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
___


[NTG-context] Roman PDF labels

2021-09-14 Thread Sylvain Hubert via ntg-context
Dear List,

Do we have something like "\pagenumbering{roman}" in latex, which sets the
pdf labels (page numbers for pdf viewers, not the ones rendered in the
footer) to roman numbers?

Here's a MWE for latex:

\documentclass{report}
\usepackage{hyperref}
\begin{document}
\pagenumbering{roman}
\tableofcontents
\listoffigures
\listoftables
\pagenumbering{arabic}
\chapter{Abc}
\end{document}

Thanks!

Best,
Sylvain
___
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 days 2021 online

2021-09-14 Thread Henning Hraban Ramm via ntg-context
You might be interested in these online talks on PDF subjects:

https://www.pdfa.org/pdf-days-online-2021/


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] Headline with numbers in margin doubleside layout

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

> Am 14.09.2021 um 11:25 schrieb juh via ntg-context :
> 
> 
> The text area stops at "dolor". So the long headline on page 2 should run into
> the outermargin. 
> 
> Is it possible to put headline in an area combined from margin+textarea?

I’d use \framed[width=..., frame=off, offset=overlay]{Your Headline}

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] Headline with numbers in margin doubleside layout

2021-09-14 Thread juh via ntg-context
Thanks a lot Wolfgang for your help,


Am Mon, Sep 13, 2021 at 01:33:36PM +0200 schrieb Wolfgang Schuster via 
ntg-context:
> Like this?
> 
> \setuphead
>   [chapter]
>   [page=yes,
>    alternative=inmargin,
>    location=outer,
>    align=outer]
> 
> \setuppagenumbering
>   [alternative=doublesided]
> 
> \showframe
> 
> \starttext
> \dorecurse{10}{\expanded{\chapter{Chapter
> \convertnumber{word}{\recurselevel
> \stoptext

this looks interesting, but it's not quite what I want.

I think I would like to have a different solution on left and right
pages.


| 1. Headline on left  | 2. Headline on the right page  |
|page
|  |lorem ipsum, dolor  |
|lorem ipsum, dolor|sit amet|
|sit amet. ||


The text area stops at "dolor". So the long headline on page 2 should run into
the outermargin. 

Sorry, I must confess that I am still experimenting with my layout. The
outer margin is quite big so that the headline on right pages should run
into the margin to balance the look.

Is it possible to put headline in an area combined from margin+textarea?

juh

-- 
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog:  http://www.hasecke.eu
Netzliteratur-Projekt:  http://www.generationenprojekt.de




signature.asc
Description: PGP signature
___
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
___