[NTG-context] three suggestions for the statistical-charts module

2022-01-17 Thread Pablo Rodriguez via ntg-context
Hi Tamara, Adriana and Tomáš,

this is my first sample using statistical-charts (I attach the CSV file):

\setupbodyfont[helvetica]
\usemodule[statistical-charts]
\starttext
\setupframed[dotslabels][loffset=1.1cc,
boffset=0.4cc]
\linechart[basic][yscale=.25, xscale=1,
distance=1,
xgridlinesdensity=1,
fillcolor=aquamarine,
line=yes, linecolor=shamrock,
dotscolor=shamrock,
dotswidth=5, dotslabels=yes,
axesunits=yes, xunit={Measurements},
yunit={Temperature}]%
[method=dataset, dsname=main, filename=\jobname.csv,
sep=;, cx={A2:A14},
cy=B2:B14]
\stoptext

I wonder whether this has been already proposed:

1. If the CSV file contains fields with quotes that the module reads,
compilation breaks. Would it be possible that quotes could be ignored by
the module?

2. Could you add an option to ignore the header (the first row), so that
then "cx=A" cwould work without problems?

3. I haven’t found your module in https://modules.contextgarden.net. I
think it would be great to have it there. Otherwise, users may not know
of its existence.

I have other questions, but this will be addressed in a next message.

Many thanks for your excellent work,

Pablo
Main;Secondary
15.6;16
14.8;14.8
16.4;15.7
14.8;14.8
13.9;13.8
15.1;14.7
13.5;13.7
13.3;13.6
14.9;13.9
13.6;13.9
13.6;12.8
15.6;14.4
13.8;13.7___
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 paragraph footnotes when located in text

2022-01-16 Thread Pablo Rodriguez via ntg-context
Dear list,

using current latest (2022.01.15 17:32), I still experience an already
reported issue
(https://mailman.ntg.nl/pipermail/ntg-context/2022/104770.html):

  \setuppapersize[A6]
  \showframe\showgrid
  %~ \setupnote[footnote][paragraph=yes]
  \setupnote[footnote][location=text, paragraph=yes]
  \setupnotation[footnote][alternative=serried, width=broad]
  \starttext
  \startlinenumbering[step=3]
  \dorecurse{25}
   {a\footnote{b} }
  \stoplinenumbering
   \placenotes[footnote]
  \stoptext

I don’t get paragraph notes with "location=text".

Could anyone confirm the issue or tell me what I’m missing?

Many thanks for your help,

Pablo


___
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] (again) diferent prefixsegments for different references

2022-01-16 Thread Pablo Rodriguez via ntg-context
Dear list,

I asked this some time ago
(https://mailman.ntg.nl/pipermail/ntg-context/2021/102394.html).

Using the following sample:

  \starttext
  \definereferenceformat[itsc][in]
  \setupreferencestructureprefix[itsc][default]
[prefixsegments=section]
  \chapter{Chapter}
  \section[b]{Section}
  \itsc[b] and \in[b]
  \stoptext

Is there a way that the prefixsegments for \itsc is only section,
without modifying it for \in?

Many thanks for your help,

Pablo
___
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 Pablo Rodriguez via ntg-context
On 1/9/22 5:25 PM, Michael Urban via ntg-context wrote:
> 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?

Hi MIchael,

this might do the trick:

  \starttext
  \dorecurse{5}
   {\chapter{Chapter \structurenumber}
\dorecurse{5}
 {\section{Section \structurenumber}
  \doifelse{\somenamedheadnumber{chapter}{current}}{1}
   {This is the first chapter.}
   {This is not the first chapter.}
  }}
  \stoptext

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 / 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-06 Thread Pablo Rodriguez via ntg-context
On 1/5/22 12:52 PM, hanneder--- via ntg-context wrote:
>
> Dear critical edition experts,
>
> the examples given in ConTeXt_Test_Footnote-ComplexMedieval.pdf and
>  the other posts are really answering my questions. Everything seems
> to be already there and if there were a Wiki on critical editions I
> would perhaps have not even asked.

The wiki is a cooperative effort. Nothing prevents you from starting a
new article on critical editions at the ConTeXt Garden
(https://wiki.contextgarden.net).

If you put some samples, other users may extend you article (again, this
is a cooperative effort).

> As far as I see, no ConTeXt input format for critical editions is
> needed, but since the topic is being discussed -

This should be no big surprise: Knuth developed TeX as a typesetting
programming language, not mainly as an input format.

Once you get used to it, TeX (or ConTeXt) may be easier for you as input
format. But it makes sense that as input format, ConTeXt cannot be
future–proof in that way, if it is in development.

>> I don’t see any future in developing a ConTeXt input format for
>> critical editions, for the following reasons:
>> 1. Producing a print-only version (i.e. printed book) makes no sense
>> in 2022. This is not sustainable because
>> no-one will be able to take your edition and continue to work on it.
>> You have to provide a digital edition as research data.
>> 2. This digital edition has to be in a standard format that is
>> sustainable at least for some time so it can be processed with
>> various types of software. TEI xml has become the de facto standard.
>
> I must disagree. There is no print only version any more, so the
> first question is: Is a pdf more sustainable, or an online edition
> (based on html etc.)? Time will tell, I guess. The same applies to
> TEI based online editions by the way. No larger texts have been
> edited by that method yet (in my field), many projects are being
> worked on, but they tend not to be finished, when the project ends.
> Some of the people actually working with both TeX and XML-based say
> that the latter significantly slows down the collation process.

Research (Maryanne Wolf) shows that people read way better on paper. We
tend to forget way faster what we read on e–ink screens. Just in case
anyone is interested

PDF is way easier to maintain. Once you generate it, this is all to it.
XML sources need more work to get and display data (oversimplifying the
issue).

In my experience, having XML sources requires learning how to generate
PDF output from them (and how to display them online). I use Markdown
and if I had to share my document, this would be way easier than to
share ConTeXt source files containing text. That way, I could focus on
the typesetting and the team could focus on the pure content (text or
images).

TEI may be a pain to learn and to write, but it makes sense to use it as
input format. Or the alternative would be a light–weight markup
language, not TeX.

> At least in Indology books and scans are still being used. Everyone
> is talking about online editions, data repositories etc., but the
> reality as I experience it is not up to these expectations. One of
> our great paleographical online tools was almost lost, since there is
> no institutional funding for updating those systems. Even finding a
> host for an online edition can be (and is in our case) a nightmare.

Don’t universites host online archives for research projects?

> In short, my solution is: printed version as in the last centuries,
> possibly additional online edition with a shorter life span and
> online publication of research data. This sounds great, but actually
> we are talking mainly about the collation file, that is, the
> TeX-input file. Not a big deal, since now this can be turned into xml
> by ekdosis, and that's it. The mss scans are prohibited from online
> publication by German copyright (no Indian institution will grant
> any rights).

I’m interested in the copyright issue.

All I knew about German copyright law is that it protects critical
editions (I mean, not the apparatus, but the text itself.)

What is actually protected by German copyright in manuscript scans? The
photograph itself? In that case, for manuscripts and works that are in
the public domain, who is supposed to be the copyright holder?

> Let me emphasize that I am not at all against these new
> possibilities. I was part of an online dictionary project
> (nws.uzi.uni-halle.de) that worked with TEI and everything else, but
> after the threat to close down Indology in Halle (the location of the
> dictionary), I have to finance occasional updates from our normal
> budget (the DFG had decreed that no further funding for this project
> was possible) and after my retirement - I have no great hopes for a
> continuation of my post - it might become quickly useless. As long
> as we have enough nerds who can and will do the necessary work
> privately, we are safe.

Maybe the wrong approach is 

Re: [NTG-context] TEST criticus apparatus

2022-01-06 Thread Pablo Rodriguez via ntg-context
On 1/6/22 2:09 PM, Jean-Pierre Delange via ntg-context wrote:
> I’ve tested the attached file on MacOS (High Sierra) . See the
> result in PDF : the numbering of notes appears as « ? ».

Jean-Pierre,

your code contains "\start\fr" with no matching "\stop".

I wonder whether "\startlanguage[fr] ... \stoplanguage" would be more
readable.

> The same file works fine under Linux.
Line numbering couldn’t be solved by ConTeXt (I’m on Linux 64bit).

I hope it helps,

Pablo
 % Le script suivant nécessite différents tests avec une manipulation des paramètres, afin de préciser ce qui convient le mieux à votre travail d'édition. Ce script offre le schéma de plusieurs possibilités d'affichage des notes en bas de page avec diverses possibilités simultanées. On peut affiner encore,en ajoutant d'autres commandes stipulant les marges, les en-têtes, le numéro des pages, etc.
 \mainlanguage[la] % Définition du latin comme langue principale du document.
 \setupbodyfontenvironment[default][em=italic]
 \setuplayout[header=2cm, footer=2cm] % Paramétrage de la page;
 \setuplinenumbering[step=2] % La sortie PDF comportera une numérotation de 5 en 5; on peut régler sur 1 (ou 10).
 \setupnotations[alternative=serried] % On définit le caractère séquentiel des notes.
 \definelinenote[aNote] % Plusieurs manières d'afficher les notes ici, notamment en une ou en plusieurs colonnes (n=2, ou n=3).
 \definelinenote[bNote][n=2]
 \definelinenote[cNote][n=3]
 \definelinenote[dNote][paragraph=yes] % Les notes se suivent sur la même ligne.
 \def\ANote#1#2{#1\aNote{#1] #2}}
 \def\BNote#1#2{#1\bNote{#1] #2}}
 \def\CNote#1#2{#1\cNote{#1] #2}}
 \def\DNote#1#2{#1\dNote{#1] #2}}
 \setupbodyfont[palatino, 7.8pt]
 \starttext
 \startlanguage[fr]
  % On indique à ConTeXt que l'on veut ici du texte en français (ou 'en' pour l'anglais).
{\em Définir un apparat critique et le mettre en page avec un traitement de texte courant est un véritable casse-tête. \type{LaTeX} et \type{ConTeXt} offrent des outils d'automatisation encore assez mal connus dans la communauté des éditeurs, notamment dans l'édition savante, pour la collation et la comparaison de textes médiévaux}.
\stoplanguage

 \startlinenumbering
 \dorecurse{6}% À utiliser seulement pour répéter le paragraphe suivant, ici 8 fois.
{Cum defensionum \CNote{laboribus}{première note} senatoriisque
muneribus aut omnino aut magna ex parte essem aliquando liberatus,
rettuli me, Brute, te hortante maxime ad ea studia, quae retenta
animo, remissa temporibus, longo intervallo intermissa revocavi, et
cum omnium artium, quae ad rectam vivendi viam pertinerent,
\ANote{ratio}{seconde note} et disciplina studio sapientiae, quae
philosophia dicitur, contineretur, hoc mihi Latinis litteris
\DNote{inlustrandum}{troisième note} putavi, non quia
\BNote{philosophia}{quatrième note} Graecis et litteris et doctoribus
percipi non posset, sed meum semper iudicium fuit omnia nostros aut
invenisse per se sapientius quam Graecos aut accepta ab illis
fecisse meliora, quae quidem digna statuissent, in quibus
elaborarent.\par}
 \stoplinenumbering
 \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] Critical Editions?

2022-01-06 Thread Pablo Rodriguez via ntg-context
On 1/5/22 1:34 PM, Jean-Pierre Delange via ntg-context wrote:
> Pablo and Luigi,
>
> Or simply add this paper to the bibliographical survey at the end of the
> wiki page made by Thomas ?
>
> https://wiki.contextgarden.net/TEI_xml

Jean-Pierre,

excellent idea!

Pablo
___
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-06 Thread Pablo Rodriguez via ntg-context
On 1/5/22 6:39 PM, hanneder--- via ntg-context wrote:
> Dear Jean-Pierre,
>
> I started preparing some examples, but first a quick question: Where
> can I find out the exact behaviour of a command option like aNote.
>
> If you define a \cNote with \definelinenote[cNote][n=3] as in your
> example, then the input line
>
> Cum defensionum \CNote{laboribus}{première note} senatoriisque
>
> prints laboribus in the text and as the lemma! I cannot see where this is
> defined (and explained).

Hi Jürgen,

it is a simple command definition:

  \def\CNote#1#2{#1\cNote{#1] #2}}

Just in case it might not be clear, "\CNote{laboribus}{première note}"
would be the same as typing "laboribus\cNote{laboribus] première note}".

BTW, for humans "a" = "A". For a computer, "a" ≠ "A". So "\CNote" is a
different command from "\cNote". For a basic sample is fine, but for
real documents creating commands that are too similar for humans is the
best way to make mistakes.

My apologies if the explanations are obvious to you.

I hope this 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 / 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] paragraph notes when located in text

2022-01-06 Thread Pablo Rodriguez via ntg-context
On 1/5/22 7:46 PM, Jean-Pierre Delange via ntg-context wrote:
> AMHO, there is no text with dorecurse …

Jean-Pierre,

many thanks for your reply.

The second line is the content of \dorecurse:

\dorecurse{25}
 {a\footnote{b} }

> Then the buffer is empty !

No on my computer. Have you pasted the code and did you get an empty file?

> And if I remember the buffer setup should be placed before the
> starttext command. Am I wrong ?

As far as I know, buffer contents can be defined before or after \starttext.

If I comment out the only commented line (in the original sample), I
cannot get paragraph notes. I thought this could be a bug.

Could anyone confirm whether this is the intended behaviour?

Many thanks for your help,

Pablo
___
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-05 Thread Pablo Rodriguez via ntg-context
On 1/5/22 9:43 AM, luigi scarso via ntg-context wrote:
> [...]
> quite old (2014),  but perhaps still interesting:
> embedding of a tei-xml into a tagged pdf
> https://www.guitex.org/home/images/ArsTeXnica/AT018/teitagged.pdf

Luigi,

if you allow me a comment (or even a suggestion), an English version of
that article updated to LMTX wouuld be of huge help to the rest of us.

I don’t even know whether it could be released on the “ConTeXt Group
Journal” (https://articles.contextgarden.net/journal/).

Pablo
___
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] paragraph notes when located in text

2022-01-05 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

\setuppapersize[A6]
\showframe\showgrid
\setupnote[footnote][paragraph=yes]
%~ \setupnote[footnote][location=text, paragraph=yes]
\setupnotation[footnote][alternative=serried, width=broad]
\starttext
\startbuffer
\startlinenumbering[step=3]
\dorecurse{25}
 {a\footnote{b} }
\stoplinenumbering
\stopbuffer

\getbuffer
 \placenotes[footnote]
\stoptext

I get no paragraph notes with \setupnote[footnote][location=text,
paragraph=yes].

What am I missing here?

Many thanks for your help,

Pablo
___
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] issue with \placenotes[linenote]

2022-01-05 Thread Pablo Rodriguez via ntg-context
On 1/4/22 5:09 PM, Hans Hagen via ntg-context wrote:
> On 1/4/2022 2:23 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> I cannot compile it. ConTeXt complains about "\placenotes[linenote]"
>> being undefined.
>>
> can you check with

I’m afraid I get the following error message:

  tex error   > tex error on line 11 in file a.tex: Undefined
   control sequence \p_linenotes_compressmethod

Pablo
___
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] issue with \placenotes[linenote]

2022-01-04 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

\setuplinenote[location=text, paragraph=yes]
\starttext
\startbuffer
\startlinenumbering[step=3]
\dorecurse{25}
 {a\linenote{b} }
\stoplinenumbering
\stopbuffer

\getbuffer
\placenotes[linenote]
\stoptext

I cannot compile it. ConTeXt complains about "\placenotes[linenote]"
being undefined.

Is there something I’m missing or have I hit a bug?

Many thanks for your help,

Pablo
___
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-04 Thread Pablo Rodriguez via ntg-context
On 1/3/22 10:43 AM, hanneder--- via ntg-context wrote:
> For the last two decades edmac and its further developments (now
> reledmac) have become the standard for critical editions. In my
> experience the basic requirements for typesetting critical editions
> were and are:
>
> - footnotes have to be formatted in paragraphs
> - multiple footnotes layers stacked below the critical text must be possible
> - automatic reference to linenumbers
> - or: manual references to verse numbers
> - language specific requirements (more complicated, see below)

Hi Jürgen,

not knowing which are the specific requirements for the language you
use, I think all of these may be achieved in ConTeXt LMTX.

> In the last years new requirements have been added:
>
> - some funding institutions in the academic world practically enforce
> online editions
> - data have to be made available in TEI xml format

Sorry for asking the basic question: what are online editions?

I mean, does uploading a PDF document count as an online edition?

As you may already know, ConTeXt can deal with XML sources (see
»Kritische Editionen mit TEI xml und ConTEXt« by Thomas Schmitz (2011)
[https://bugs.freedesktop.org/attachment.cgi?id=72857]).

ConTeXt might also output XML. But this is much harder in practice. All
I know about it is what Hans wrote bout this.

> This is why I was curious to see about the status of critical
> edition in ConTeXt. I was hoping for something that can be kept
> simple.

Sorry, Jürgen, but from your statements it isn’t clear to me how ConTeXt
can fit in you projects: simpler and more readable input code?

> Absolutely. It would be great to see a Context solution for this.

https://www.djdekker.net/ledmac/sample-edition3.pdf contains line
numbers and margin notes. It can be done with ConTeXt.

https://www.djdekker.net/ledmac/sample-edition2.pdf contains multiple
apparatus below critical texts. It might require \setupnote[location=text].

https://www.djdekker.net/ledmac/sample-edition.pdf contains multiple
apparatus at the bottom of the page.

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 / 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-04 Thread Pablo Rodriguez via ntg-context
On 12/21/21 10:50 AM, hanneder--- via ntg-context wrote:
>
> Details:
> I was able to find the article "Ediciones críticas con ConTeXt" (is
> this in use?)

Hi Jürgen,

if you mean http://www.ediciones-criticas.tk/pdf/criticas-context.pdf,
this is outdated. I hope to update it in a not so distant future...  .

> I also found out that for simple editions context already works. For
> critical editions in my field we need both footnote references based
> on linenumbers (for prose), but also references to verse number,
> which can be entered manually.
As far as I can remember linenotes are footnotes with references to line
numbers.

I don’t think it makes a difference if the line number is set
automatically by ConTeXt or the user specifies a given value.

> So far, so good. Any hints to a more sophisticated solution are highly
> welcome. (I am a simple TeX user)

I’m only a ConTeXt newbie (who has been using it for about a decade ).

There might be other solutions, but I’m afraid I don’t know which is
exactly the problem you are facing.

Sorry, but the text structure isn’t clear to me (this is independent
from the fact that I don’t understand a word from the language you may
be using).

BTW, I could only make your sample work in the following form:

\starttext
\setupnotation[linenote]
[alternative=serried,width=broad,distance=.5em,display=no]
\setupnote[linenote][way=bypage,paragraph=yes,rule=off]

\definenote [variant]
\setupnotation[variant][number=no]
\setupnote[variant][way=bypage,paragraph=yes,rule=off]

\definelines[slokaed][][indenting={yes, small, even},
before={\startnarrower\startlinenumbering},
after={\stoplinenumbering\stopnarrower}]

\definelines[slokaedplain][][indenting={yes, small, even},
before=\startnarrower, after=\stopnarrower]

\startslokaed
mano buddhir ahaṃ prāṇās tanmātrendriyajīvanam yaṃ
dṛṣṭvā\linenote{dṛṣṭvā ] dṛṣṭva G\lohi{pc}{1}} vinivartante tam
\linenote{tam ] tat} upāsyam upāsmahe
\stopslokaed

\startslokaedplain
mano buddhir ahaṃ prāṇās tanmātrendriyajīvanam
yaṃ dṛṣṭvā\variant{2c dṛṣṭvā ] dṛṣṭva} vinivartante tam \variant{2d
tam ] tat} upāsyam upāsmahe (2)
\stopslokaedplain
\stoptext

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 / 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] tweaked font options in \definedfontfeature?

2022-01-01 Thread Pablo Rodriguez via ntg-context
Hans,

I wonder whether it would be possible to add the options for tweaked
fonts (or at least, xscale and yscale) to \definefontfeature.

I think this might ease the use of scaled fonts (at least, in some
documents).

Many thanks for your awesome work and best wishes for 2022 to you and to
all users,

Pablo
___
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] LTR footnotes from RTL paragraph

2021-12-16 Thread Pablo Rodriguez via ntg-context
On 12/16/21 12:34 PM, Denis Maier via ntg-context wrote:
> Ok, this works:
>
> \setupnote[footnote][align=l2r]
>
> Does that have any drawbacks?

Hi Denis,

I don’t think it may have (other than forgetting other options, such as
hz or hanging).

> Is it possible to change the text direction for single notes?

It doesn’t seem an option for \startfootnote. How about defining a new
command?

  \definedelimitedtext[rtlblockquote][before={\righttoleft}]
  \definenote[otnote][footnote]
  \setupnote[otnote][align=l2r]
  \starttext
  \input zapf
  \startblockquote
  \input zapf\footnote{this starts on the left.}
  \stopblockquote
  \startrtlblockquote
  \input zapf\footnote{this should start on the left.}
  \input zapf\otnote{this should start on the left.}
  \stoprtlblockquote
  \input zapf
  \stoptext

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 / 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] upload ... new feature

2021-12-10 Thread Pablo Rodriguez via ntg-context
On 12/10/21 6:37 PM, Hans Hagen via ntg-context wrote:
> On 12/10/2021 6:04 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> I’m afraid I’m not getting anything different.
>> [...]
>> I wonder whether there has been an LMTX update or something else that
>> I’m missing (Linux64).
>
> ownerpassword is mandate.

Everything is clear now and it works as expected.

Many thanks for your help,

Pablo


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

2021-12-10 Thread Pablo Rodriguez via ntg-context
On 12/10/21 11:46 AM, Hans Hagen via ntg-context wrote:
> Hi,
>
> This time the lmtx upload has a (for some maybe) interesting new
> features: runtime pdf encryption.
>
> context
> --ownerpassword=foo
>[--userpassword=bar]
>[--permissions="see context --help --expert"]

Many thanks for the new feature, Hans.

I’m afraid I’m not getting anything different.

Here is the source:

  \nopdfcompression
  \starttext
  \null
  \stoptext

"context --purgeall --userpassword=foo a" outputs
https://pdf.ousia.tk/enc.pdf.

"context --purgeall a" outputs https://pdf.ousia.tk/non-enc.pdf.

MuPDF-GL version 1.19 shows no encryption at all.

I wonder whether there has been an LMTX update or something else that
I’m missing (Linux64).

Many thanks for your help,

Pablo
___
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] xml processing errors after latest upgrade

2021-12-01 Thread Pablo Rodriguez via ntg-context
On 12/1/21 2:03 PM, Denis Maier via ntg-context wrote:
> Sorry for spamming the list, but I was able to narrow it further down:
> [...]
> \setupinteraction
>   [state=start,
>openaction=FitWidth] % comment this out to make it work
> [...]
> Can anyone confirm this?

Hi Denis,

I can confirm the issue. I get the following error message:

registered function call [929]:
...ext/tex/texmf-context/tex/context/base/mkiv/scrn-ref.lua:31: attempt
to call a nil value (upvalue 'expandcurrent')
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/scrn-ref.lua:31: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/scrn-ref.lua:27>
(...tail calls...)

I hope it helps,

Pablo
___
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] getting sha512 from text in buffer

2021-12-01 Thread Pablo Rodriguez via ntg-context
Dear list,

I have this minimal sample:

  \ctxlua{require("util-sha")}

  \def\sha#1{%
  \ctxlua{context(utilities.sha2.hash512("#1"))}}

  \startbuffer[text]
  hola
  \stopbuffer

  \starttext
  \sha{hola}

  \sha{\typebuffer[text]}
  \stoptext

How can I get that both commands get the same sha512sum?

Many thanks for your help,

Pablo
___
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] figure not added in current latest

2021-11-17 Thread Pablo Rodriguez via ntg-context
Hi Hans,

I have the following sample:

  \setuppapersize[S6]
  \startbuffer[flag]
  \setuppapersize[S6]
  \starttext
  \startmakeup[page][align=center]
  \dontleavehmode
  \externalfigure[uk-flag.pdf][width=.8\textwidth]
  \stopmakeup
  \stoptext
  \stopbuffer
  \starttext
  \startmakeup[page][align=center]
  \dontleavehmode
  \typesetbuffer[flag]
  \stopmakeup
  \stoptext

The image can be found at https://pdf.ousia.tk/uk-flag.pdf.

Compiling it with latest from 2021.11.11 19:24, the final PDF contains
the flag.

I’m not sure whether there was another version (before the current
latest) that I haven’t copied.

If I compile it with latest from 2021.11.16 22:36, the final PDF has no
flag. This happens even if I remove the patch for lpdf-pde.lmt you sent me.

The case above also happens when using \externalfigure with some images.

Just in case it might help, I downloaded the SVG file and ConTeXt
invoked Inkscape to convert it to PDF:

I’m afraid this might be a bug.

Many thanks for your help,

Pablo
___
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] Emojis showing up in black instead of colours

2021-11-12 Thread Pablo Rodriguez via ntg-context
On 11/12/21 7:08 PM, Vincent Hennebert via ntg-context wrote:
> Hi there,
>
> freshly upgraded LMTX installation. TwemojiMozilla.ttf downloaded from
> GitHub [1].
> [...]
> gives me pages of emojis, all black. According to what is described on
> Stackexchange, I should be getting colours. Am I doing something wrong?

Hi Vincent,

if you are using Evince, try Okular to check color display.

I experienced something similar in the past.

Just in case it helps,

Pablo
___
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] issue importing metadata from PDF

2021-11-12 Thread Pablo Rodriguez via ntg-context
On 11/12/21 8:04 PM, Hans Hagen via ntg-context wrote:
> On 11/12/2021 7:24 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> I’m afraid I don’t know how to extract the real information, I only
>> get:>>
>>table: 0x324279a3400
>
> then you're doing something wrong
> [...]
>  context(tostring(main.Info.ModDate))
>  context(tostring(main.Info.Title))
> [...]
> works quite okay

I think there is an issue with the PDF document, because it’s an issue
only with that PDF file I have. I can read the info from other files
pretty well.

I’m going to ask the author whether I may share the PDF document here,
so you can check it.

>> BTW, how can I use "\enabledirectives[backend.date=2021.02.01]" in Lua?
>
> grep is your friend ... (probably also in the cld manual)
>
> directives.enable('backend.date=2021.02.01')
>
> which of course doesn't mean that each one will work out as expected
> because timing matters

Sorry, I found in some document (or I found out it worked):

  directives.enable(directives.enable("backend.date", "no")

But I never thought that an equal sign could be the way.

Many thanks for your help,

Pablo
___
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] issue importing metadata from PDF

2021-11-12 Thread Pablo Rodriguez via ntg-context
On 11/12/21 7:14 PM, Hans Hagen via ntg-context wrote:
> They are tables because in lua objects are like tables. Doesn't
>
> context(tostring(main_doc.Info.ModDate))
>
> work?

Many thanks for your reply, Hans.

I’m afraid I don’t know how to extract the real information, I only get:

  table: 0x324279a3400

BTW, how can I use "\enabledirectives[backend.date=2021.02.01]" in Lua?

Many thanks for your help,

Pablo
___
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] Problem with Google Font 'Vollkorn'

2021-11-12 Thread Pablo Rodriguez via ntg-context
On 11/12/21 6:23 PM, Michael Urban via ntg-context wrote:
> I downloaded the Google free font ‘Vollkorn’ 
> (https://fonts.google.com/specimen/Vollkorn) into an appropriate directory 
> and ran
>  mtxrun --script font --reload

Hi Michael,

I would rather wipe out the cache and start again:

 mtxrun --script cache --erase && mtxrun --generate

I had problems reloading fonts on Linux, so I always run that after
updating ConTeXt or adding a new font.

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 / 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] issue importing metadata from PDF

2021-11-12 Thread Pablo Rodriguez via ntg-context
Hans,

I have a PDF document (which I didn’t generate) and it contains the
following objects:

  1 0 obj
  <<
/Title 272 0 R
/Producer 273 0 R
/Creator 274 0 R
/CreationDate 275 0 R
/ModDate 275 0 R
  >>
  endobj

  272 0 obj
  (This is an important title)
  endobj

  273 0 obj
  (Mac OS X 10.12.1 Quartz PDFContext)
  endobj

  274 0 obj
  (Keynote)
  endobj

  275 0 obj
  (D:20161108071428Z00'00')
  endobj

I cannot import these objects, since they are tables instead of strings,
after checking that with:

  \startluacode
  function document.transfer_metadata(name)
local main_doc = lpdf.epdf.load(name)
context(type(main_doc.Info.ModDate))
context(type(main_doc.Info.Title))
  end
  \stopluacode

Would it be possible that LMTX can deal with these objects and import
them as strings?

Many thanks for your help,

Pablo
___
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] repeat layer recto pages

2021-11-10 Thread Pablo Rodriguez via ntg-context
On 11/9/21 11:12 PM, jbf via ntg-context wrote:
> Muchas gracias Pablo, that was most helpful, and of course it works.
>
> The particular part that I was missing (there was already
> alternative=doublesided in the preamble) of course was the
> \startsectionblockenvironment[bodypart], so thanks for highlighting that.
>
> I was also a bit confused about the difference between state=repeat and
> repeat=yes, and I can see that both do work in the snippet you gave me,
> so perhaps there is no difference between these?

Hi Julian,

I’m glad to read that it worked for you.

I didn’t realize that there was a "repeat" option in \definelayer.

I use "state", since it contains more values to be chosen from.

I guess "state=repeat" and "repeat=yes" get the same result.

Pablo
___
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] repeat layer recto pages

2021-11-09 Thread Pablo Rodriguez via ntg-context
On 11/9/21 4:18 AM, jbf via ntg-context wrote:
> I want a particular layer to repeat on recto pages only, but I don't
> want this to happen in frontmatter, only in bodymatter.
>
> This is what I have done, just before the first chapter after
> \startbodymatter (but unsuccessfully; the layer repeats for every page
> at the moment. I must have omitted something).

Hi Julian,

this is what you want:

  \startsectionblockenvironment[bodypart]
\setupbackgrounds
  [rightpage]
  [background=butterfly]
  \stopsectionblockenvironment

> \startbodymatter
>
> \setupbackgrounds
>   [rightpage]
>   [background=butterfly]
>
> \startchapter[title={Chapter title}]
> \definelayer[butterfly]
>      [x=0mm, y=0mm,repeat=yes,width=\paperwidth, height=\paperheight]
> \setlayer[butterfly]
>      [hoffset=.99\textwidth, voffset=1cm]
>      {\externalfigure[bfly.jpg][width=1.5cm]}
> \setupbackgrounds[page][background=butterfly]

The last line adds backgrounds to every page. And without doublesided,
there are not right and left pages.

And you don’t need the \define and \setlayer after \startchapter.

A complete sample would read:

  \setuppagenumbering[alternative=doublesided]
  \definelayer[butterfly][state=repeat]
  \setlayer[butterfly]
[hoffset=.99\textwidth, voffset=1cm]
{butterfly}
  \startsectionblockenvironment[bodypart]
\setupbackgrounds
  [rightpage]
  [background=butterfly]
  \stopsectionblockenvironment

  \def\rubbish%
{\dorecurse{2}
  {\chapter{Chapter}
\dorecurse{25}{\input knuth}}}
  \starttext
  \startfrontmatter
  \rubbish
  \stopfrontmatter
  \startbodymatter
  \rubbish
  \stopbodymatter
  \startappendices
  \rubbish
  \stopappendices
  \startbackmatter
  \rubbish
  \stopbackmatter
  \stoptext

I hope it helps,

Pablo
___
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] on luatex.wrapup

2021-11-08 Thread Pablo Rodriguez via ntg-context
On 11/8/21 8:28 AM, Hans Hagen via ntg-context wrote:
> On 11/7/2021 11:18 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Is there no way to have a luatex.final_wrapup, when no other run will
>> take place?
>
> a run doesn't know it's the last one, only the context runner knows and
> then it doesn't call tex (which is why --purge and --result work)

Many thanks for your reply, Hans.

I realize that what I wanted to achieve it is impossible inside ConTeXt.

Pablo
___
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] on luatex.wrapup

2021-11-07 Thread Pablo Rodriguez via ntg-context
Hi Hans,

I would like to use luatex.wrapup to remove media files that I don’t
need anymore once the PDF document is generated.

I have realized that luatex.wrapup works at the very end of the PDF
generation, but in each run.

Is there no way to have a luatex.final_wrapup, when no other run will
take place?

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
___


Re: [NTG-context] escape io.fileseparator in Windows

2021-11-04 Thread Pablo Rodriguez via ntg-context
On 11/3/21 9:55 PM, Hans Hagen via ntg-context wrote:
> On 11/3/2021 7:49 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> How can I get the io.fileseparator or escape the backslash in
>> main_filename_win above?
> (there are helpers for splitting names and combining paths)
>
> - use locals
> - wrap names in "" and use / : dir "c:/data"

Many thanks for your reply, Hans.

I didn’t know that this was valid in Windows command prompt:

  command "d:/data/file.txt"

> - just use file.copy (with forward slashes), is faster too

copy was just a command sample, not the one I intend to use.

> so in the end there is no need to test for windows

I’m really suprised that Windows accepts slashes in paths.

Many thanks for your help again,

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] escape io.fileseparator in Windows

2021-11-03 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \starttext
  \startluacode
  main_file = document.files[1]

  if file.pathpart(main_file) == "" then
main_filename = file.nameonly(main_file)
main_filename_win = main_filename
  else
main_filename = file.pathpart(main_file):gsub(io.fileseparator, "/")
   .. "/" .. file.nameonly(main_file)
docx_file = main_filename .. "-file.docx"
epub_file = main_filename .. "-file.epub"
if os.name == "windows" then
  main_filename_win = file.pathpart(main_file) .. io.fileseparator
.. file.nameonly(main_file)
  docx_file_win = main_filename_win .. "-file.docx"
  epub_file_win = main_filename_win .. "-file.epub"
end
  end

  if os.name=="windows" then
context(docx_file_win)
os.execute("copy " .. docx_file_win .. " aeae")
  else
context(docx_file)
  end
  \stopluacode
  \stoptext

If I run it on Windows, context(docx_file_win) cannot deal with the
backslash, so I get:

  .document-file.docx

So it is impossible that os.execute may work with copy.

Running it with Linux, I get "./document-file.docx".

How can I get the io.fileseparator or escape the backslash in
main_filename_win above?

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
___


Re: [NTG-context] check installed program using Lua

2021-11-02 Thread Pablo Rodriguez via ntg-context
On 11/1/21 5:13 PM, Hans Hagen via ntg-context wrote:
> On 11/1/2021 2:26 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Is there a way to wrap os.exec() in the sample so that it only runs if
>> "dir" is available?
>>
>> I know that os.name would be an option here, but not in my real world
>> document.
>
> \starttext
>\startluacode
>  if lfs.isfile(tex.jobname .. ".pdf") then
>  context("YES")
>  end
>  if lfs.isfile(file.addsuffix(environment.outputfilename,"pdf")) then
>  context("YES")
>  end
>  if #dir.glob(file.addsuffix(environment.outputfilename,"pdf")) > 0 then
>  context("YES")
>  end
>\stopluacode
> \stoptext

Many thanks for your reply, Hans.

I can see that I explained my question poorly, but your code fits me in
other case.

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
___


Re: [NTG-context] check installed program using Lua

2021-11-02 Thread Pablo Rodriguez via ntg-context
On 11/1/21 3:10 PM, Taco Hoekwater via ntg-context wrote:
>> [...]
>> Is there a way to wrap os.exec() in the sample so that it only runs if
>> "dir" is available?
>
> if os.which(‘dir’) then
>   ...
> end
>
> But note that os.which() may be unreliable in various cases (like it
> will fail for shell/command interpreter builtins, in cron jobs, in
> special scripted environments, and may incorrectly succeed for
> disabled/forbidden commands), as it just runs through the PATH
> environment variable to check for executable file existence.
Many thanks for your reply, Taco.

This is exactly what I needed.

> Often times, it is better to just try to run the command to see if
> that produces satisfactory results.
It makes sense, but I cannot do that on foreign computers.

Many thanks for your help again,

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] check installed program using Lua

2021-11-01 Thread Pablo Rodriguez via ntg-context
Dear list,

is there a way if a program is installed on the computer using Lua.

I have the following sample:

  \starttext
  \startluacode
  filename = tex.jobname .. ".pdf"
  os.exec("dir " .. filename)
  \stopluacode
  \stoptext

Is there a way to wrap os.exec() in the sample so that it only runs if
"dir" is available?

I know that os.name would be an option here, but not in my real world
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
___


Re: [NTG-context] getting number from context.figurewidth

2021-10-28 Thread Pablo Rodriguez via ntg-context
On 10/27/21 10:06 PM, Hans Hagen via ntg-context wrote:
> On 10/27/2021 9:20 PM, Pablo Rodriguez via ntg-context wrote:
>> On 10/26/21 6:31 PM, Pablo Rodriguez via ntg-context wrote:
>>> [...]
>>loader_times:write('.box placeholder width=' .. context.figurewidth
>>   .. ' height=' .. context.figureheight)
>>
>> I cannot concatenate string and function (and I need the number, not the
>> unit).
>>
>> Is there no way of doing it?
> i'm pretty sure this has been asked before
>
> \ctxlua{local f = figures.getinfo("cow.pdf") print(f and f.used and
> f.used.width)}
>
> so .. time to wikify it

Many thanks for your reply, Hans.

Already wikified at
https://wiki.contextgarden.net/Image_Placement#Measures_in_Lua.

Many thanks again 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
___


Re: [NTG-context] getting number from context.figurewidth

2021-10-27 Thread Pablo Rodriguez via ntg-context
On 10/26/21 6:31 PM, Pablo Rodriguez via ntg-context wrote:
> [...]
> Is there a way that I can get a number from context.figureheight, such
> as I get it from tex.dimen.paperheight?

Sorry for insisting, I need it for a Lua script that in the relevant
line reads:

  loader_times:write('.box placeholder width=' .. context.figurewidth
 .. ' height=' .. context.figureheight)

I cannot concatenate string and function (and I need the number, not the
unit).

Is there no way of doing it?

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
___


Re: [NTG-context] XML-processing: Error with hyphenatedurl

2021-10-27 Thread Pablo Rodriguez via ntg-context
On 10/27/21 5:37 PM, Denis Maier via ntg-context wrote:
> [...]
> Oh, actually that leads to a similar problem as in my original
> question where Wolfgang suggested using \expandUx: if the URL is
> broken across lines, the link content is also broken. Interestingly,
> the plain>
> \startxmlsetups xml:ext-link-var-var
>   \goto{\hyphenatedurl{\xmlflush{#1}}}[url(\xmlflush{#1})]
> \stopxmlsetups
>
> seems to work now correctly.

Sorry, it was the wrong order:

\expanded{\goto{\hyphenatedurl{\xmlflush{#1}}}[url(\xmlflush{#1})]}

\xmlpure is for \hyphenatedurl, not for url.

But your plain \goto is what I use and I have been using it without
problems for long.

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
___


Re: [NTG-context] XML-processing: Error with hyphenatedurl

2021-10-27 Thread Pablo Rodriguez via ntg-context
On 10/27/21 3:03 PM, Denis Maier via ntg-context wrote:
> [...]
> I’ve receiving errors that seem to be related to hyphenatedurl. The
> problem is I cannot really reproduce it in a MWE. The example below
> works, but if I include the link in my real document, I’am getting this
> error message (copied from -error.log):
> [...]
> Two things seemed to make it work:
> 1. Remove the link.
> 2. Comment out \expandUx in this setup:

Hi Denis,

in my environments to typeset XML sources, I never need \expandUx, why
do you needit?

Another approach (I don’t know whether this will work in your real-world
document) might be using \xmlpure instead of \xmlflush as in:

  \goto{\hyphenatedurl{\xmlflush{#1}}}[url(\xmlpure{#1})]

The background for both commands can be found on
https://www.pragma-ade.com/general/manuals/xml-mkiv.pdf#page=103.

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] getting number from context.figurewidth

2021-10-26 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \starttext
  \startluacode
document.sample = "xml-mkiv.pdf"
context.getfiguredimensions({ document.sample })
context(context.figureheight)
context.par()
context(tex.dimen.paperheight)
  \stopluacode
  \stoptext

Is there a way that I can get a number from context.figureheight, such
as I get it from tex.dimen.paperheight?

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
___


Re: [NTG-context] Failure to compile with new date code

2021-10-25 Thread Pablo Rodriguez via ntg-context
On 10/25/21 4:45 PM, Rik Kabel via ntg-context wrote:
> Hello all,
>
> The example below continues to work with MkIV, but now fails with the
> most recent (ConTeXt  ver: 2021.10.24 21:45) LMTX:
>
> \define\DraftOf   {Draft of \date}
> \setupinteraction [date={\DraftOf}]

Hi Rik,

\setupinteraction[date=***] only accepts a date as input.

Would it be possible that it was subtitle or title any of the options
you used?

Just in case 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
___


Re: [NTG-context] My setup almost works

2021-10-23 Thread Pablo Rodriguez via ntg-context
On 10/23/21 6:09 PM, Gerben Wierda wrote:
> [...]

Replying a private to the list, since it could be useful for (future?)
reference.

> This works, except:
> - Parts are not mentioned in the table of contents. If I use
> \completecontent, I do not get the abstracts

Well, don’t use \completecontent and replace

  \placelist[chapter,chaptertext]

with something similar to

  \placelist[part, chapter,chaptertext]

> - In the backmatter, the chapters should be numbered with letters
> (appendix A, B, etc.) and chapters start again from 1 (A)

Add to the numbering command

  \definestructureconversionset[sectionnumbers][R,n][n]

the following definition

  \definestructureconversionset[appendix:sectionnumbers][R,Character][n]

> I haven’t looked at getting the part title somewhere at 1/3 of the page
> and horizontally centered yet. And the part title page should have no
> page number.

align is a fairly common option and you can add a \vskip with the
.3\textheight (or even \paperheight)

  \setuphead[part]
[placehead=yes, align=center, before={\null\vskip.3\textheight}]

\blank would be another option, but I cannot make it work here with
\textheight.

No page number is done by surpressing headers with:

  \setuphead[part][placehead=yes, header=empty]% or none

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
___


Re: [NTG-context] A book with sections

2021-10-23 Thread Pablo Rodriguez via ntg-context
On 10/23/21 3:51 PM, Gerben Wierda via ntg-context wrote:
>> On 23 Oct 2021, at 15:34, Wolfgang Schuster wrote:
>> [...]
>> You can use \part.
>
> Yes. Thanks. But that leads to additional questions:
> - how do I get the parts to show up in the table of contents? Because
> I tried \part but it did not show up
> - how do I let chapters number on (not restart in each part, and not
> a x.y number but simply ‘2. Chapter’
> - what is a good way to create actual RHS ‘title’ pages for each
> chapter?
> - how do I get parts to number with Roman numerals?
Hi Gerben,

I don’t know what actual RHS title pages are:

  \definestructureresetset[default][0,1,1][1]
  \definestructureconversionset[sectionnumbers][R,n][n]
  \setupheads[sectionconversionset=sectionnumbers,
sectionresetset=default]
  \setuphead[part][placehead=yes]
  \setuphead[chapter][sectionsegments=chapter]
  \setuphead[section][sectionsegments=chapter:section]
  \starttext
  \completecontent
  \dorecurse{25}{\part{Part}
  \chapter{Chapter}
  \section{Section}
  \section{Section}}
  \stoptext

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
___


Re: [NTG-context] How to enable the use of the blackboard font in modern ConTeXt

2021-10-23 Thread Pablo Rodriguez via ntg-context
On 10/23/21 3:00 PM, Gerben Wierda via ntg-context wrote:
> By the way, neither does \blackboard{Q} work. But \rationals works in
> the case of the letter Q.

Hi Gerben,

it only seems to work inside math:

  \starttext
  \dorecurse{26}{$\blackboard\characters{\recurselevel}
  \Characters{\recurselevel}$}
  \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
___


Re: [NTG-context] logo from wiki

2021-10-23 Thread Pablo Rodriguez via ntg-context
On 10/23/21 12:35 PM, Adam Reviczky via ntg-context wrote:
> Hi Pablo,
>
> https://gitlab.com/schickele/new-context-logo
> (See: https://mailman.ntg.nl/pipermail/ntg-context/2019/093859.html)

Many thanks for your fast reply and your help, Adam.

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] logo from wiki

2021-10-23 Thread Pablo Rodriguez via ntg-context
Dear list,

where could I get the vector version from
https://wiki.contextgarden.net/skins/common/images/context/context_logo_inv.png?

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
___


Re: [NTG-context] upload

2021-10-22 Thread Pablo Rodriguez via ntg-context
On 10/22/21 5:50 PM, Michal Vlasák via ntg-context wrote:
> [...]
> I checked the backend code and some of the related os functions. I put
> together a patch that hopefully fixes some stuff and doesn't break
> anything.
> [...]
>   \enabledirectives[backend.date=1234-12-30T23:45:16+01:00] % 
> 1234-12-31T00:45:16+02:00
>   \enabledirectives[backend.date=1234-12-30 23:45:16-02:00] % 
> 1234-12-31T03:45:16+02:00
>   \enabledirectives[backend.date=1234-12-30 23:45:16+05:00] % 
> 1234-12-31T20:45:16+02:00
> [...]
> Is the timezone stuff what you wanted, Pablo?

Hi Michal,

I haven’t found the time to check this, but this is pretty much what I
wanted: being able to set other timezones than the local one.

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
___


Re: [NTG-context] vertical align in combination

2021-10-22 Thread Pablo Rodriguez via ntg-context
On 10/22/21 5:46 PM, Hans Hagen via ntg-context wrote:
> On 10/22/2021 5:20 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> How could I get all lines with images vertically centered?
>
> maybe by using the command the right way ...
>
>\setupexternalfigure[location=default]
>\startcombination[nx=3, ny=2, location={middle}]
>{\externalfigure[mill.png][width=.25\textwidth]}  {}

Many thanks for your fast reply and your help, Hans.


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] vertical align in combination

2021-10-22 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \starttext
  \setupexternalfigure[location=default]
  \startcombination[nx=3, ny=2, location={middle}]
  {\externalfigure[mill.png][width=.25\textwidth]}
  {\externalfigure[cow.pdf][width=.25\textwidth]}
  {\externalfigure[cow.pdf][width=.25\textwidth]}
  {\externalfigure[spider.eps][width=.25\textwidth]}
  {\externalfigure[hacker.png][width=.25\textwidth]}
  {\externalfigure[mill.png][width=.25\textwidth]}
  \stopcombination
  \stoptext

The first line has the images vertically centered, but the second line
has them aligned to the top. Using "align=middle" made no difference.

How could I get all lines with images vertically centered?

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
___


Re: [NTG-context] \rotate[rotation=270] adds extra vertical space

2021-10-22 Thread Pablo Rodriguez via ntg-context
On 10/22/21 10:07 AM, Hans Hagen via ntg-context wrote:
> nicer demo:
> [...]
Hans,

many thanks for your reply and your sample.

A more visual version for me would be:

  \setupbodyfont[sans, 30pt]
  \setuppagenumbering[location=,]
  \showframe

  \starttext
   \topskip4cm
  \dostepwiserecurse{0}{360}{10}{
  \doloopoverlist{normal,default,depth,fit,broad,high,middle}{
  \ruledhbox{\rotate[rotation=\recurselevel, location=\recursestring]{%
  \framed
 [width=\textheight, height=\textwidth, rulethickness=5pt,
  depth=0cm, foregroundstyle=\bfd]
{\recursestring, \recurselevel°}
  }
  }
  }
  }
  \stoptext

I have just added it to
https://wiki.contextgarden.net/Scaling_Rotating_Mirroring_Clipping#Rotating_Figures.

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
___


Re: [NTG-context] upload

2021-10-21 Thread Pablo Rodriguez via ntg-context
On 10/21/21 8:04 PM, Hans Hagen via ntg-context wrote:
> Hi,
>
> I cleaned up some more backend code.  There were some mails about dates
> and such and although the date field in setupinteraction works ok a more
> drastic overload is doen with directives. The reason is that the fact
> that we can set the date (and traler) is only because it permits
> generating pdf files that can be compared. No date as a bad idea anyway.
>
> \setupinteraction[title=My Title]
> % \enabledirectives[backend.date=2034-06-07]

Many thanks for the new version, Hans.

Is there a way to add time and timezone in backend.date?

> Pablo : transparencies should work again (wrong alias fixed).

Many thanks for this fix too.

Sorry for insisting, but could you check what is wrong with an extra
blank space in rotated imposition
(https://mailman.ntg.nl/pipermail/ntg-context/2021/103909.html)?

Many thanks for your help again,

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
___


Re: [NTG-context] setting date in \setupinteraction

2021-10-21 Thread Pablo Rodriguez via ntg-context
On 10/20/21 4:02 PM, Hans Hagen via ntg-context wrote:
> On 10/19/2021 10:38 PM, Michal Vlasák via ntg-context wrote:
>> [...]
>> The pattern doesn't catch all the PDF spec cases, but should match what
>> ConTeXt emits. The timezone info gets overwritten by current timezone
>> though.
>>
>> Requires the below patch.
>[...]
> i'll fix it but also clean up the existing code a bit
>
> (much has to do with omitting date and is for comparison reasons)

Many thanks for the fix. It would be great that current timezone doesn’t
overwrite the specified one.

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] \rotate[rotation=270] adds extra vertical space

2021-10-21 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following imposition sample:

  \startbuffer[newbuff]
  \showframe\showgrid
  \setuppapersize[A3, landscape]
  \setuplayout[width=middle]
  \starttext
  \dorecurse{4}{\null\page}
  \stoptext
  \stopbuffer
  \startmode[*first]
  \savebuffer[newbuff][A3page.tex, prefix=no]
  \executesystemcommand{context --purgeall A3page.tex}
  \stopmode
  \showframe
  \setuplayout[page]
  \setuppapersize[A5][A4, landscape]
  \setuparranging [2UP]
  \setupinteractionscreen[option={landscape, paper}]
  \starttext
  \doiffile{A3page.pdf}
  {\def\Doc{A3page.pdf}
  \getfiguredimensions[\Doc]
  \dorecurse{\noffigurepages}
{\ifodd\recurselevel
  \rotate[rotation=90]
{\externalfigure[\Doc][page=\recurselevel, width=\textheight]}
\else\rotate[rotation=270]
{\externalfigure[\Doc][page=\recurselevel, width=\textheight]}
\fi}}
  \stoptext

I’m afraid that if rotation values are 270 or 180, the imposed page has
an extra vertical space before.

I think this might be a bug. Or I don’t know what I might be missing.

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
___


[NTG-context] transparency not working in current latest?

2021-10-21 Thread Pablo Rodriguez via ntg-context
Dear list,

since current latest (2021.10.18 23:14), I don’t get transparency working:

  \definecolor[transparent][b=1, a=1, t=0]

  \starttext
  \startTEXpage[offset=1em, align=middle]
  \color[transparent]{\ssbf totally\\transparent?}
  \stopTEXpage
  \stoptext

Am I missing something or is it a bug?

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
___


Re: [NTG-context] setting date in \setupinteraction

2021-10-19 Thread Pablo Rodriguez via ntg-context
On 10/19/21 6:23 PM, Michal Vlasák via ntg-context wrote:
> On Tue Oct 19, 2021 at 5:47 PM CEST, Pablo Rodriguez via ntg-context wrote:
> [...]
> So this works:
>
>
> \setupinteraction[state=start,
>   date={2022-02-02T12:00:21+02:00}]
> \starttext
> This document is from 02.02.2020 at 12:00:21.
> \stoptext
>
> This parameter sets the "ModDate" is that what you are after?

Hi Michal,

many thanks for your fast reply.

I would like to import both metadata values (CreationDate and ModDate)
from another file (such as https://pdf.ousia.tk/metadata.pdf).

Besides from the fact that LMTX doesn’t work with this (only MkIV does
[already reported]), isn’t no simpler way to get ISO 8601 formatting
from doc.Info.ModDate than the following one?

  \starttext
  \startluacode
  function document.transfer_metadata(name)
local main_doc = lpdf.epdf.load(name)
context.setupinteraction{ title = main_doc.Info.Title }
context.setupinteraction{ date =  main_doc.Info.ModDate:sub(3,6) ..
"-" .. main_doc.Info.ModDate:sub(7,8) .. "-" ..
main_doc.Info.ModDate:sub(9,10) .. "T" ..
main_doc.Info.ModDate:sub(11,12) .. ":" ..
main_doc.Info.ModDate:sub(13,14) .. ":" ..
main_doc.Info.ModDate:sub(15,22):gsub("'", ":") }
context(main_doc.Info.Title .. "\\par")
lpdf.epdf.unload(name)
  end
  \stopluacode
  \unexpanded\def\TransferMetadata#1%
{\ctxlua{document.transfer_metadata("#1")}}
  \startTEXpage[offset=1em, align=center]
  \TransferMetadata{metadata.pdf}
  \stopTEXpage
  \stoptext

> Seems that "CreationDate" could be set by the SOURCE_DATE_EPOCH
> environment variable, but I am not succesfull with it right now.

It would be fine to ble able to set CreationDate. Otherwise, having a
ModDate prior to CreationDate gives a weird impression.

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
___


Re: [NTG-context] upload

2021-10-19 Thread Pablo Rodriguez via ntg-context
On 10/18/21 11:17 PM, Hans Hagen via ntg-context wrote:
> Hi,
>
> I uploaded a new lmtx. This one is a little experimental because I
> removed so redundant / intermediate code still present from teh
> transition from mkiv to lmtx (mostly backend related). I might have
> missed something (not all is in the test suite) but nothing that can't
> be fixed easy, most has to do with the timing of definitions.
>
> But I assume users save their stable trees anyway ...

Hi Hans,

I’m afraid that viewerlayers have issues now.

I hope I’ll find some time soon to write a minimal sample.

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] setting date in \setupinteraction

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

I have the following sample:

  \setupinteraction[state=start,
date={02.02.2022}]
  \starttext
  This document is from 02.02.2020 at 12:00:21.
  \stoptext

Which is the right way to get PDF dates working with \setupinteraction?

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
___


Re: [NTG-context] Acrobat doesn’t read imported metadata

2021-10-11 Thread Pablo Rodriguez via ntg-context
On 10/10/21 6:51 PM, Hans Hagen via ntg-context wrote:
> On 10/10/2021 5:46 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Being the sample file https://pdf.ousia.tk/metadata.pdf, Acrobat cannot
>> display the imported title or either the creation or modification dates.
>>
>> What am I missing to make Acrobat display the imported metadata?
> timing, so best use the official methods:
> [...]
> acrobat looks at the metadata blob

Many thanks for your reply, Hans.

This works in MkIV, but not in LMTX:

 context.setupinteraction { title = main_doc.Info.Title }

BTW, is there a way to add CreationDate and ModDate?

Many thanks for your help again,

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] undefined command in current latest

2021-10-10 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \setupheadertexts[{\getmarking[chapter]}]
  \starttext
  \chapter{Chapter}
  \stoptext

It compiles perfectly fine with MkIV from 2021.10.08 20:18, but its LMTX
version triggers the following error message:

  Undefined control sequence \??markingfilter

Previous LMTX version compiled just fine.

I think it might be a bug.

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
___


[NTG-context] Acrobat doesn’t read imported metadata

2021-10-10 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \starttext
  \startluacode
  function document.transfer_metadata(name)
local main_doc = lpdf.epdf.load(name)
lpdf.addtoinfo("Title", lpdf.unicode(main_doc.Info.Title),
  lpdf.string(main_doc.Info.Title))
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

Being the sample file https://pdf.ousia.tk/metadata.pdf, Acrobat cannot
display the imported title or either the creation or modification dates.

What am I missing to make Acrobat display the imported metadata?

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
___


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


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
___


Re: [NTG-context] read PDF metadata from other file

2021-09-11 Thread Pablo Rodriguez via ntg-context
On 9/11/21 6:16 PM, Hans Hagen via ntg-context wrote:
> On 9/11/2021 2:35 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> How can I get the pure text value, so I can transfer metadata from one
>> PDF document into another PDF document?
> just use the better interface
> [...]
> after which you enter wiki mode

Mamy thanks for your reply, Hans.

I think this might be simpler for me:

  \starttext
  \startluacode
  function document.transfer_metadata(name)
  local main_doc = lpdf.epdf.load(name)
  lpdf.addtocatalog("Lang", lpdf.string(main_doc.Catalog.Lang))
  lpdf.addtoinfo("Title", lpdf.unicode(main_doc.Info.Title))
  lpdf.addtoinfo("Subject", lpdf.unicode(main_doc.Info.Subject))
  lpdf.addtoinfo("Author", lpdf.unicode(main_doc.Info.Author))
  lpdf.epdf.unload(name)
  end
  \stopluacode
  \unexpanded\def\TransferMetadata#1%
{\ctxlua{document.transfer_metadata("#1")}}
  \null
  \TransferMetadata{name.pdf}
  \stoptext

Added to
https://wiki.contextgarden.net/Interaction#Import_PDF_metadata_fields_from_other_PDF_documents.

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
___


[NTG-context] read PDF metadata from other file

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

I have the following sample:

  \starttext
  \setupinteraction
[state=start,
 title={\cldcontext{pdfe.open("b.pdf").Info.Title}}]
  \null
  \stoptext

From a document composed with \insertpages, I need to transfer medatada.

But I get the raw value "feff0061" (which I guess it may be introduced
by lpdf.pdfunicode).

How can I get the pure text value, so I can transfer metadata from one
PDF document into another PDF 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
___


Re: [NTG-context] Setting up the double pages of part beginnings

2021-09-11 Thread Pablo Rodriguez via ntg-context
On 9/10/21 7:25 PM, Christian Dekant via ntg-context wrote:
> [...]
> % startTEXpage does not increase page number => incrementpagenumber

Sorry, Christian, I’m afraid I don’t understand what you want to achieve

\startTEXpage[pagestate=start] uses page numbers as any other page.

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] JavaScript controlled button appearance

2021-08-30 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \setupinteraction[state=start]
  \setupbodyfont[heros]
  \startJSpreamble varia used now
function SwitchFS() {
  app.fs.isFullScreen = !app.fs.isFullScreen;
}
  \stopJSpreamble

  \starttext
\startTEXpage[offset=10pt]
  \goto{fs}[JS(SwitchFS{})]
\stopTEXpage
  \stoptext

How can I get that the "fs" in the text is replaced with "x" when
JavaScript detects that the screen is in full screen mode?

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
___


Re: [NTG-context] new upload

2021-08-30 Thread Pablo Rodriguez via ntg-context
On 8/30/21 6:15 PM, mf via ntg-context wrote:
> There's a problem downloading lowlevel-alignments.pdf.
> Here's a slice of the log of install.sh:
> [...]
> mtx-install | added:   7 % :  199 :
> tex/texmf-context/doc/context/documents/general/manuals/lowlevel-alignments.pdf
> mtx-install |
> tex/texmf-context/doc/context/documents/general/manuals/lowlevel-alignments.pdf,
> try again later:
>
> After 5 unsuccessful trials to download the file, the updating process
> does not complete. The script ends without errors, but it's clear the
> update has failed.

I’m afraid I‘m experiencing exactly the same problem that Massi reported.

Just in case it may 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
___


Re: [NTG-context] getting path and filename from url

2021-08-28 Thread Pablo Rodriguez via ntg-context
On 8/28/21 1:17 AM, Hans Hagen via ntg-context wrote:
> On 8/27/2021 8:53 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> How can I get that match for #1 ends in the last slash (including it
>> "../a/b/cb/ce.b/ca.b/c/") and match for #2 ends in the last period
>> (excluding it, "dabc")?
> it really helps to read the cld manual (or look into l-* files) as there
> are plenty of efficient helpers for these things

Many thanks for your reply, Hans.

It really works like charm and reading cld-mkiv.pdf is one of the things
I want to do in the near future.

Many thanks for your help again,

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
___


Re: [NTG-context] getting path and filename from url

2021-08-28 Thread Pablo Rodriguez via ntg-context
On 8/27/21 10:56 PM, Tomas Hala via ntg-context wrote:
> Hi Pablo,
>
> is the following what you need?
>
> context("2a. " .. url:match "[^/]+/.+[.]") -- path and name with period
> context("2c. " .. (url:match "[^/]+[^.]+$") :match ".+[.]")  -- name with 
> period

Hi Tomáš,

well, I wnanted to remove the ending period in both cases (and to
understand how that patterns might work.

I got the first one with:

  context("2a ok. " .. url:match "[^/]+.+/") -- path and name

But I’m stuck at the second one (sorry, I don’t know how to remove the
final period):

  context("2c. " .. url:match "[^/]+.$":match("^.+%l+[.$]"))

https://pragma-ade.com/general/manuals/cld-mkiv.pdf#search=nameonly is
the way to go, but it won’t hurt me to understand how patterns might
work here.

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
___


[NTG-context] getting path and filename from url

2021-08-27 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \starttext
  \startluacode
  url = "../a/b/cb/ce.b/ca.b/c/dabc.pdf"

  context(url)

  context("0 ok. " .. url:match "^(.*).pdf$") -- name and path

  context("1. " .. url:match "^(.*).+$") -- path

  context("2. " .. url:match"[^/]+[.$]") -- name

  context("3 ok. " .. url:match "[^.]+$") -- extension
  \stopluacode
  \stoptext

How can I get that match for #1 ends in the last slash (including it
"../a/b/cb/ce.b/ca.b/c/") and match for #2 ends in the last period
(excluding it, "dabc")?

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
___


[NTG-context] different preffixsegments for different reference formats

2021-08-21 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \starttext
  \definereferenceformat[itsc][in]
  \setupreferencestructureprefix[itsc][default]
[prefixsegments=section]
  \chapter{Chapter}
  \section[b]{Section}
  \itsc[b] and \in[b]
  \stoptext

How can I get that \itsc gets "prefixsegments=section" without affecting
to \in?

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
___


Re: [NTG-context] paper dimensions for TEXpage

2021-08-19 Thread Pablo Rodriguez via ntg-context
On 8/18/21 4:25 PM, Hans Hagen via ntg-context wrote:
> On 8/17/2021 4:01 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> In this case, \getfiguredimensions would work, but I don’t know how to
>> deal with a pure text box.
>>
>> BTW, is there a way to have TEXpages numbered? "pagestate=start" seems
>> not to work here.

Many thanks for your reply, Hans.

"pagestate=start" works fine with TEXpages, but I don’t know why I
didn’t noticed that when I checked it.

> for the wiki ...

Wikified at https://wiki.contextgarden.net/Layers#Layers_in_fitting_pages.

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
___


Re: [NTG-context] compression for multimedia objects

2021-08-17 Thread Pablo Rodriguez via ntg-context
On 8/17/21 12:46 PM, Hans Hagen via ntg-context wrote:
> On 8/17/2021 6:06 AM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> I don’t know whether this is intended. In that case, could we have an
>> option to compress embedded multimedia objects?
>
> indeed intended because zipping already compressed files makes no sense
>
>> (I know that those mp4 files are crappy, but I can’t control the crap
>> others generate.)
> i'll add 'compress' to the options

Many thanks for the new option, Hans.

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
___


Re: [NTG-context] paper dimensions for TEXpage

2021-08-17 Thread Pablo Rodriguez via ntg-context
On 8/17/21 9:30 AM, Hans Hagen via ntg-context wrote:
> On 8/17/2021 5:56 AM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> I don’t get the layer in the TEXpage.
>>
>> How could I get it with the TEXpage dimensions?
> only by first boxing (using framed or so) and then taking those dimensions

Many thanks for your reply, Hans.

I’m afraid I don’t know how to make the commands work:

  \setupexternalfigures[location=default]
  \definelayer[hi]
   [x=.5\dimexpr\framedwidth\relax, y=.5\dimexpr\framedheight\relax]
  \setupbackgrounds[page][background={foreground, hi}]
  \starttext
  \startTEXpage
  \framed[frame=off, offset=none]
  {\setlayer[hi]{\color[red]{hi}}
  \externalfigure[cow-brown]\framedheight}
  \stopTEXpage
  \stoptext

In this case, \getfiguredimensions would work, but I don’t know how to
deal with a pure text box.

BTW, is there a way to have TEXpages numbered? "pagestate=start" seems
not to work here.

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
___


[NTG-context] compression for multimedia objects

2021-08-16 Thread Pablo Rodriguez via ntg-context
Hi Hans,

some days ago (after the patch from
https://mailman.ntg.nl/pipermail/ntg-context/2021/103011.html), I
included two mp4 files in a PDF document.

They where so generated, that they could be compressed in a zip file
from 254MB into less than 25MB. The resulting PDF file was less than 25MB.

With the current latest, compression for multimedia objects is disabled.
The same PDF document takes about 254MB.

I don’t know whether this is intended. In that case, could we have an
option to compress embedded multimedia objects?

(I know that those mp4 files are crappy, but I can’t control the crap
others generate.)

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
___


[NTG-context] paper dimensions for TEXpage

2021-08-16 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \definelayer[hi][x=.5\paperwidth, y=.5\paperheight]
  \setupbackgrounds[page][background=hi]
  \starttext
  \setlayer[hi]{hi}
  \startTEXpage[offset=10em]
  \null
  \stopTEXpage
  \stoptext

I don’t get the layer in the TEXpage.

How could I get it with the TEXpage dimensions?

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
___


Re: [NTG-context] How not to display the header of the chapter page on the page with the table of contents ?

2021-08-15 Thread Pablo Rodriguez via ntg-context
On 8/15/21 6:02 PM, Fabrice Couvreur via ntg-context wrote:
> A small note : this method works if I compile the project but if I
> compile only one chapter, the header no longer appears.

Hi Fabrice,

I have never used projects and chapters (or whatever the right name is).

I’m not sure I get what you’re experiencing: with a single chapter, do
you have the fancy layout or not?

It would make sense that the fancy chapter doesn’t appear only compiling
a chapter. I guess there is no \startbodymatter...\stopbodymatter
wrapping it.

Another approach would be:

\setuphead
   [chapter]
   [align=flushright,
textcommand=\groupedcommand{\blank[medium]}{},
numbercolor=darkgray,
textstyle=ChapterTextStyle,
numberstyle=ChapterNumberStyle,
before=\startChapterFrame,
after=\stopChapterFrame,
header=high]

\setuphead
  [title]
  [header=empty,
   align=,
   textcommand=,
   textstyle=,
   style=\tfc,
   before={\blank[2*big]},
   after={\blank[2*big]}]

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
___


Re: [NTG-context] How not to display the header of the chapter page on the page with the table of contents ?

2021-08-15 Thread Pablo Rodriguez via ntg-context
On 8/15/21 12:49 PM, Fabrice Couvreur via ntg-context wrote:
> Hello,
> Wolfgang created a
> heading https://mailman.ntg.nl/pipermail/ntg-context/2021/102870.html
> for the chapters of my book.
> How can I prevent this header from appearing on the page with the table
> of contents ?

Hi Fabrice,

a simple way would be:

  \startsectionblockenvironment[bodypart]
\setuphead
   [chapter]
   [align=flushright,
textcommand=\groupedcommand{\blank[medium]}{},
numbercolor=darkgray,
textstyle=ChapterTextStyle,
numberstyle=ChapterNumberStyle,
before=\startChapterFrame,
after=\stopChapterFrame,
header=high]
  \stopsectionblockenvironment

Then use frontmatter and bodymatter.

Just in case it might 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
___


Re: [NTG-context] Conditional formatting with *frontpart, *bodypart, *backpart modes

2021-08-12 Thread Pablo Rodriguez via ntg-context
On 8/13/21 5:34 AM, Joey McCollum via ntg-context wrote:
> Hi,
>
> I was curious about the possibility of handling general formatting
> settings (e.g., page layout, headers and footers, page numbering,
> alignment, default body font assignment, etc.) conditionally for front,
> body, and back matter using modes.
> [...]

Hi Joey,

the command is just different:

  \startsectionblockenvironment[frontpart]
\setupbodyfont[modern]
  \stopsectionblockenvironment
  \startsectionblockenvironment[bodypart]
\setupbodyfont[pagella]
  \stopsectionblockenvironment
  \startsectionblockenvironment[backpart]
\setupbodyfont[termes]
  \stopsectionblockenvironment
  \startsectionblockenvironment[appendix]
\setupbodyfont[helvetica]
  \stopsectionblockenvironment
  \starttext
\startfrontmatter
\input knuth\par
\stopfrontmatter
\startbodymatter
\input knuth\par
\stopbodymatter
\startbackmatter
\input knuth\par
\stopbackmatter
\startappendices
\input knuth\par
\stopappendices
  \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
___


Re: [NTG-context] JavaScript in multimedia PDF

2021-08-12 Thread Pablo Rodriguez via ntg-context
On 8/12/21 3:02 AM, Michal Vlasák via ntg-context wrote:
> On Thu Aug 12, 2021 at 12:55 AM CEST, Hans Hagen via ntg-context wrote:
>> Hi
>>
>>>  -Type = pdfconstant(MediaPermissions),
>>>  +Type = pdfconstant("MediaPermissions"),
>> That's an interesting one ... easilly goes unnoticed ... thanks
>
> To put credit where its due, this was Pablo's find.

Well, I only noticed that in the generated PDF code read:

  /Type /none

It was Michal who found the bug in the Lua code.

Many thanks for the work improving multimedia in ConTeXt,

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
___


Re: [NTG-context] JavaScript in multimedia PDF

2021-08-11 Thread Pablo Rodriguez via ntg-context
On 8/10/21 11:52 PM, Michal Vlasák via ntg-context wrote:
> On Mon Aug 9, 2021 at 8:32 AM CEST, Pablo Rodriguez via ntg-context wrote:
> [...]
>> I get exactly the same results: screen object, but null rendition.
>>
>> I have no idea what it is needed here.
>
> Sorry, in the last mail I forgot to mention one idea I had. But now I
> had time to try it, and in the end came up with three different ways to
> get it working (at least the multimedia part, didn't test the rest).

Many thanks for your in-depth reply and explanation, Michal.

Since there are some related issues, I think it is better to discuss it
in private.

Many thanks for your help again,

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
___


Re: [NTG-context] JavaScript in multimedia PDF

2021-08-09 Thread Pablo Rodriguez via ntg-context
On 8/8/21 11:00 PM, Michal Vlasák via ntg-context wrote:
> On Sun Aug 8, 2021 at 8:22 PM CEST, Pablo Rodriguez via ntg-context wrote:
>> I don’t know why I get the following message:
>>
>> TypeError: a.doc is undefined
>>
>> It seems to be caused by "app.media.openPlayer", but the code is copied
>> from the documentation Adobe released early this year.
>
> Is there a newer document than "JavaScript for Acrobat API Reference"
> (May 2015)?

Well, the link you provided
(https://mailman.ntg.nl/pipermail/ntg-context/2021/103023.html) is from
February 2021:

https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/pdfs/acrobatsdk_jsapiref.pdf

Here is the guide to developers (from the same date):

https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/pdfs/acrobatsdk_jsdevguide.pdf

> Anyways, I thought that the culprit is that you only specify the
> rendition (what to play) and not screen (where to play):
>
>
>  function GoToFirstSlide(label) {
>  this.pageNum = 0 ;
>  var rendition = this.media.getRendition(label) ;
> +var screen = this.media.getAnnots({ nPage: 0})[0];
>  var player = app.media.openPlayer({
>  rendition: rendition,
> +annot: screen,
>});
>  }
>
> But as it turns out, while the screen query succesfully returns an
> object, the rendition query returns null.
>
> The PDF 1.7 standard specifies that the name (/N) of Rendition PDF
> object should be Unicode, but that doesn't seem to make it work either,
> as does deleting the name of the media clip (which was the same).
>
> (But I now get "Invalid arguments" error for the "app.media.openPlayer"
> call, which is kind of expected.)
>
> Can you confirm, that "rendition" is null on your side as well?
>
> console.println(rendition);
> console.println(screen);
> console.show();

I get exactly the same results: screen object, but null rendition.

I have no idea what it is needed here.

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
___


[NTG-context] JavaScript in multimedia PDF

2021-08-08 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \setupinteraction
  [state=start]

  \startJSpreamble varia used now
  this.pageNum = 0 ; // start at 0

  function GoToFirstSlide(label) {
  this.pageNum = 0 ;
  var rendition = this.media.getRendition(label) ;
  var player = app.media.openPlayer({
  rendition: rendition,
});
  }

  function GoToLastSlide(label) {
this.pageNum = this.numPages ;
  }

  function GoToNextSlide(label) {
  ++this.pageNum ;
  }

  function GoToPreviousSlide(label) {
  --this.pageNum ;
  }

  function SwitchFS() {
if (app.fs.isFullScreen == true)
  app.fs.isFullScreen = false ;
else
  app.fs.isFullScreen = true ;
  }
  \stopJSpreamble


  \setuppapersize[A9, landscape]

  \definefontfamily
  [mainface]
  [rm]
  [Latin Modern Sans]

  \definefontfamily
  [mainface]
  [ss]
  [Hans]

  \setupbodyfont
  [mainface, 25pt]

  \setupalign[middle]

  \setupfooter
  [style={\ss}]

  \def\SlideNavigationButtons{%
  \goto{A}[JS(GoToFirstSlide{mainsound})]%
  \goto{K}[JS(GoToPreviousSlide{mainsound})]%
  \goto{L}[JS(GoToNextSlide{mainsound})]%
  \goto{B}[JS(GoToLastSlide{mainsound})]
  \goto{{\ssb Q}}[JS(SwitchFS{})]%
  }

  \setupfootertexts[\SlideNavigationButtons]

  \starttext

\definerenderingwindow[soundplace]
  [width=0pt, height=0pt]

\useexternalrendering[mainsound][audio/mp3][sound.mp3][embed=yes]

\placerenderingwindow[soundplace][mainsound]
  \dorecurse{25}{\null\page}
  \stoptext

I don’t know why I get the following message:

TypeError: a.doc is undefined

It seems to be caused by "app.media.openPlayer", but the code is copied
from the documentation Adobe released early this year.

Does anyone know what is wrong here or what am I missing?

Many thanks for your help in advance,

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
___


Re: [NTG-context] Setting a heading text on its own page with \setuphead

2021-08-06 Thread Pablo Rodriguez via ntg-context
On 8/6/21 7:12 PM, Joey McCollum via ntg-context wrote:
> Hi,
>
> I'd like to define my own class of heading derived from the "part"
> heading; in the MWE below, it's called "MyPart".

Hi Joey,

these are options for \setuphead[part] (MyPart in your case):

> I'd like this heading to have the following features:
>
>   * Its title should appear in the ToC, but its number should never be
> printed in the ToC or in the text.

number=no.

>   * It should always start on an odd page.

This is the default for \setuphead[part] (only noticeable in doublesided
documents).

>   * Its text should be in a larger size than the text of the body, set
> in all caps, and set with extra letterspacing.

style is the right option there.

>   * Most importantly, the title of the heading should appear on its own
> page without a header or footer. The text of the body should begin
> on the next odd page.

placehead=yes is required for \setuphead[part]. And also for MyPart.

header=empty and footer=emtpy. For the page break before the body text,
you need after=\page.

> I was hoping to accomplish all of this within the \setuphead command,
> and it seems like this should be possible, but in the following example,
> I'm not getting the text of the header at all.

See above. 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
___


Re: [NTG-context] copies from \setupinteractionscreen not working?

2021-08-05 Thread Pablo Rodriguez via ntg-context
On 8/4/21 8:52 PM, Wolfgang Schuster via ntg-context wrote:
> Pablo Rodriguez via ntg-context schrieb am 04.08.2021 um 15:53:
>> [...]
>> I’m afraid that "copies" isn’t generating the proper /NumCopies entry in
>> the /ViewerPreferences dictionary.
>>
>> Could anyone be so kind to confirm this?
>
> A fix is needed in layo-ini.lmt, maybe not in the same way as below but
> the value has to be stored in canvas.copies.
> [...]

Many thanks for your help, Wolfgang.

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
___


Re: [NTG-context] issue with footnote in TOC

2021-08-05 Thread Pablo Rodriguez via ntg-context
On 8/5/21 11:58 PM, Hans Hagen via ntg-context wrote:
> On 8/5/2021 4:34 PM, Pablo Rodriguez via ntg-context wrote:
>> \starttext
>>\completecontent
>>\chapter{Chapter Title\footnote{With footnote}}
>>\stoptext
>
> fixed in next beta (different escaping)

Many thanks for the fast fix and the new latest.

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] issue with footnote in TOC

2021-08-05 Thread Pablo Rodriguez via ntg-context
Dear list,

compiling the following sample with current latest (2021.08.04 17:51):

  \starttext
  \completecontent
  \chapter{Chapter Title\footnote{With footnote}}
  \stoptext

The entry in the TOC for the chapter seems to have problems with the
footnote command (backslash seems to be unrecognized).

Would anyone be so kind to confirm the issue? I’m afraid it might be a
bug in current latest.

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
___


[NTG-context] copies from \setupinteractionscreen not working?

2021-08-04 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \setupinteractionscreen[copies=5]
  \starttext
  \dorecurse{5}{\input zapf\par}
  \stoptext

The resulting file from current latest (2021.07.30 00:57) contains the
following /ViewerPreferences dictionary:

  /ViewerPreferences <<
/Duplex /Simplex
/PickTrayByPDFSize true
/PrintScaling /None
  >>

I’m afraid that "copies" isn’t generating the proper /NumCopies entry in
the /ViewerPreferences dictionary.

Could anyone be so kind to confirm this?

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
___


[NTG-context] issue with signature fields in Acrobat

2021-08-03 Thread Pablo Rodriguez via ntg-context
Hi Hans,

I have the following sample:

  \setupinteraction[state=start]
  \starttext
  \startTEXpage[offset=2em]
  \setupfield[ShortLine][horizontal][width=5cm,height=5em]
  \definefield [Email] [signature] [ShortLine]
  \field [Email] [your email]
  \stopTEXpage
  \stoptext

If I sign it with Acrobat Reader, Times New Roman is used instead of
MyriadPro (which is the default font used by Acrobat for signing).

Line 945 from lpdf-fld.lmt contains:

  if #collected > 0 then
  local acroform = pdfdictionary {
  NeedAppearances = pdfmajorversion() == 1 or nil,
  Fields  = pdfreference(pdfflushobject(collected)),
  CO  = fieldsetlist(calculationset),
  }
  if sometext or somefont then
  checkpdfdocencoding()
  if sometext then
  usedfonts.tttf = fontnames.tt.tf
  acroform.DA = "/tttf 12 Tf 0 g"
  end
  acroform.DR = pdfdictionary {
  Font = registerfonts(),
  Encoding = pdfdocencodingcapsule,
  }
  end
  lpdf.addtocatalog("AcroForm",pdfreference(pdfflushobject(acroform)))
  end

Would it be possible that the second conditional ("if sometext or
somefont") could be only applied if Fields doesn’t refer to signatures?

Otherwise, Acrobat will use the font specified in the dictionary. Among
other things, this breaks PDF/A documents, since the font for the
signature isn’t embedded.

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
___


Re: [NTG-context] Code document and simpleslides and create in one go the document with simpleslides added

2021-08-01 Thread Pablo Rodriguez via ntg-context
On 7/31/21 10:23 PM, Jeroen via ntg-context wrote:
> [...]
>   \savebuffer[list=slides, file=\jobname_slides.tex, prefix=no]

Sorry, Jeroen, this was my fault.

A simpler approach to the command above reads:

  \savebuffer[list=slides, file=slides.tex]

But then you have to invoke the file as

  \typesetfile[\jobname-slides.tex][--purgeall][object=no, width=0pt]

and the output file would read:

  \getfiguredimensions[\jobname-slides.pdf]
  \dorecurse{\noffigurepages}
  {\startTEXpage
\externalfigure[\jobname-slides.pdf][page=\recurselevel]
   \stopTEXpage}

I mean, you get hyphen instead of underscore.

I hope it may 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
___


Re: [NTG-context] Strange new behaviour of the mailing list

2021-08-01 Thread Pablo Rodriguez via ntg-context
On 7/31/21 11:02 PM, Henning Hraban Ramm via ntg-context wrote:
> [...]
> My Apple Mail 12.4 on Mojave shows the same message like attached (dark
> mode).

Thunderbird’s display is in the attached image.

The message list can only include a sender, since it has registered the
email address in the address book.

I think this behaviour makes most sense.

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
___


Re: [NTG-context] Code document and simpleslides and create in one go the document with simpleslides added

2021-07-31 Thread Pablo Rodriguez via ntg-context
On 7/31/21 3:27 PM, Jeroen via ntg-context wrote:
> Is there an easy way to write a Context document and also code
> simpleslides in the same document so that the simpleslides are
> automatically added to the document as for example an appendix? Ie
> one tex document with Context code, perhaps with some \input and
> something like a two-pass job.
Hi Jeroen,

not sure this might help you (I’m not sure you intend a single source
file, in addition to a single PDF document), but here you have:

  \startbuffer[slides]
  \setuppapersize[CD]
  \setupbodyfont[60pt]
  \starttext
  \dorecurse{25}
  {\startmakeup[standard][pagestate=start, style={\ss\bf}, align=center]
  Slide \pagenumber
  \stopmakeup}
  \stoptext
  \stopbuffer

  \savebuffer[list=slides, file=\jobname_slides.tex, prefix=no]

  \starttext
  \startbodymatter
  \dorecurse{25}{\input zapf\par}
  \typesetfile[\jobname_slides.tex][--purgeall][object=no, width=0pt]
  \stopbodymatter
  \startappendices
  \getfiguredimensions[\jobname_slides.pdf]
  \dorecurse{\noffigurepages}
  {\startTEXpage
\externalfigure[\jobname_slides.pdf][page=\recurselevel]
   \stopTEXpage}
  \stopappendices
  \stoptext

BTW, I cannot get simpleslides working with LMTX.

> I was thinking if the simpleslides could be saved as a number of png
> images and then with the recurse add them to the document with
> placefigure.
\externalfigure is your friend here and there is no need to convert the
slides to PNG (see above).

Just in case it may 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
___


Re: [NTG-context] Strange new behaviour of the mailing list

2021-07-31 Thread Pablo Rodriguez via ntg-context
On 7/30/21 11:24 PM, Otared Kavian via ntg-context wrote:
> Hi all,
>
> I noticed that beginning July 27th, the messages distributed by the
> ConTeXt mailing list appear to be from
>
>   Mailing list for ConTeXt users
>
> without the actual name of the sender appearing. It may be dependent
> on the mail client I am using (Mail.app on MacOS 11.4), but I wonder
> whether something has changed on mailing list server, and whether if
> there is something I can do to have the old behaviour (which was
> convenient when one wanted to follow up mails from some specific
> contributors).
>
> Also has anybody else noticed this change?

Hi Otared,

message headers read now:

  From: Otared Kavian via ntg-context 
  To: mailing list for ConTeXt users 
  Reply-To: mailing list for ConTeXt users 
  Cc: Otared Kavian 
  Errors-To: ntg-context-boun...@ntg.nl
  Sender: "ntg-context" 

Before they read:

  From: Otared Kavian 
  To: mailing list for ConTeXt users 
  Reply-To: mailing list for ConTeXt users 
  Errors-To: ntg-context-boun...@ntg.nl
  Sender: "ntg-context" 

I experience the same problem as yours.

Before, replying in Thunderbird (Ctrl+r) generated a private reply. I
needed to generate a reply to the list (Ctrl+Shif+l).

Right now, Ctrl+r generates a reply to the list.

It seems that there is no perfect solution to this. I mean, having both
messages sent from original sender and replied by default to the list.

I guess that this might be achieved finetuning Mailman (but I don’t know
how).

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
___


Re: [NTG-context] multimedia PDF in ConTeXt

2021-07-31 Thread Pablo Rodriguez via ntg-context
On 7/31/21 1:08 AM, Michal Vlasák via ntg-context wrote:
> [...]
> By the way, Pablo, your issue
> https://www.mail-archive.com/ntg-context@ntg.nl/msg88204.html was also
> solved in the last upload. Unfortunately it will probably not help you,
> because Acrobat no longer supports this.
> [...]
> But, you can use renderings instead:
>
> \useexternalrendering[myaudiorendering]
>   [audio/mp3][audio.mp3][embed=yes]
>
> \definerenderingwindow[audiowindow]
>   [width=0sp, height=0sp]
>
> \definelayer[resources]
> \setupbackgrounds[page][background=resources]
> \setlayer[resources]{\placerenderingwindow[audiowindow][myaudiorendering]}
>
> \goto{PLAY SOUND}[StartRendering{myaudiorendering}]
>
> This is basically the example from "/back-swf.mkiv". Works in Acrobat.
> And one can use either of the three possible file methods (embedded,
> external, URL), not just external files. The layer is so that the empty
> frame doesn't interfere with normal page content. No frame is drawn when
> both dimensions are 0, not sure if that is a behaviour one can take as
> granted. But currenntly the dimensions can't be zero.

Many thanks for your code update, Michal.

I’m extremely interested in investigating the possibilities this opens.

But I’m afraid that I will have other things to do first. It will take
me months to come back to this again.

> Hans, I would omit the check for 0 dimensions of rendering window (as
> already noted in the source, it is useful for sound). See patch below.

Many thanks for the patch and 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
___


Re: [NTG-context] multimedia PDF in ConTeXt

2021-07-31 Thread Pablo Rodriguez via ntg-context
On 7/30/21 11:57 PM, Michal Vlasák via ntg-context wrote:
> On Fri Jul 30, 2021 at 8:53 PM CEST, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Although I don’t read Czech, just out of curiosity, is your bachelor
>> thesis available on the net, Michal? Thanks to theses.cz, I found
>> https://is.muni.cz/th/t8qpp/DP_Vlasak_Michal_2015.pdf (only a name
>> coincidence, I guess).
>
> Sorry, should have shared the link at the first place.
>
> https://dspace.cvut.cz/handle/10467/95065

Many thanks for your fast reply and the link to your thesis, Michal.

>> [...]
>> Is there no way to have the video as an embedded file in the PDF
>> document? (I mean, that the file is listed when the attachment panel is
>> displayed.)
>
> Currently, only attachments are added as "embedded files" (either as
> "hidden", ending up in /EmbeddedFiles, or as "annotation" ending up as
> /FileAttachment annotation).
>
> Maybe "codeinjections.embedfile" can have the option to force the
> reference, so that the file also ends up in /EmbeddedFiles? Should it be
> default for all \externalrenderings?
> [...]
> --- a/tex/context/base/mkxl/lpdf-wid.lmt
> +++ b/tex/context/base/mkxl/lpdf-wid.lmt
> [...]

Many thanks for the patch.

It would be also great to have an option not to list some files as
embedded (adding a option "list" to "\useexternalrendering" such as in
"\useexternalrendering[myvideo][video/mp4][video.mp4][embed=yes, list=no]").

Being the default to yes, I’m thinking of cases where there is a risk
distributing the multimedia file without the embedding document, because
of the lack of context (no pun indented)

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
___


[NTG-context] multimedia PDF in ConTeXt

2021-07-30 Thread Pablo Rodriguez via ntg-context
Hi Michal and Hans,

many thanks for your patch to fix multimedia objects in PDF and your
extremely interesting and in-depth explanation about multimedia in PDF.
Many thanks to Hans for the release of an updated latest with also
updated documentation.

Although I don’t read Czech, just out of curiosity, is your bachelor
thesis available on the net, Michal? Thanks to theses.cz, I found
https://is.muni.cz/th/t8qpp/DP_Vlasak_Michal_2015.pdf (only a name
coincidence, I guess).

Using your sample, I have two questions:

  \starttext
  \setupinteraction[state=start]

  \useexternalrendering[myvideo][video/mp4][video.mp4][embed=yes]

  \definerenderingwindow[myrenderingwindow]
[width=\textwidth, height=\textwidth]

  \placerenderingwindow[myrenderingwindow][myvideo]
  \stoptext

Is there no way to have the video as an embedded file in the PDF
document? (I mean, that the file is listed when the attachment panel is
displayed.)

The second question is addressed to Hans: would it be possible that
\placerenderingwindow could have another option and text as in \framed?
A workaround would be to add a layer, but too complex only for adding
usage instructions for the media usage.

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
___


Re: [NTG-context] question about followingup.pdf

2021-07-24 Thread Pablo Rodriguez
On 7/22/21 3:53 PM, Hans Hagen wrote:
> On 7/22/2021 2:57 PM, Pablo Rodriguez wrote:
>> [...]
>> In latest, the PDF document for LMTX is from yesterday, but the PDF for
>> the Following Up manual is almost two years old.
>>
>> Is this intended or am I missing something?
> i just didn't regenerate the whole thing (when i add a chapter i
> generate just that) .. it's not that critical, nostly a wrapup for
> myself when working on something and users can generate it anyway

Many thanks for having updated the manual in current latest, Hans.

BTW, there is a minor issue. After the experiments scaling fonts, titles
for chapters 19
(https://www.pragma-ade.com/general/manuals/followingup.pdf#page=513)
and 20
(https://www.pragma-ade.com/general/manuals/followingup.pdf#page=517)
are displayed wrong.

Just in case it might 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
___


[NTG-context] question about followingup.pdf

2021-07-22 Thread Pablo Rodriguez
Hi Hans,

current latest has content added to the Following Up manual and also to
the LMTX manual.

In latest, the PDF document for LMTX is from yesterday, but the PDF for
the Following Up manual is almost two years old.

Is this intended or am I missing something?

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
___


[NTG-context] \xmlrefatt as node?

2021-07-19 Thread Pablo Rodriguez
Dear list,

I have the following sample:

  \startbuffer[test]
  

 1


 2


 3

  
  \stopbuffer

  \startxmlsetups xml:testsetups
   \xmlsetsetup{#1}{*}{-}
  \xmlsetsetup{#1}{document|div|p|a}{xml:flushing}
  \xmlsetsetup{#1}{a}{xml:*}
  \stopxmlsetups

  \xmlregistersetup{xml:testsetups}

  \startxmlsetups xml:flushing
  \xmlflush{#1}
  \stopxmlsetups

  \startxmlsetups xml:a
  \xmlattribute{#1}{ancestor::div[@class='section level1 hidden']}{id}\\
  \xmlrefatt{#1}{href}:\
  \doifelse
{\xmlrefatt{#1}{href}}
{\xmlattribute{#1}{ancestor::div[@class='section level1 hidden']}{id}}
  {yes}{no}\blank
  \stopxmlsetups

  \starttext
  \xmlprocessbuffer{main}{test}{}
  \stoptext

I need to check whether the link is inside the same div or not.

I know how to obtain the destination identifier (\xmlreffatt{#1}{href}
and I know how to obtain the identifier of the contaning div
(\xmlattribute{#1}{ancestor::div[@class='section level1 hidden']}{id}}).

But I don’t know how to ge the identifier of the div which contains the
destination idetifier.

How could I get that?

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
___


  1   2   3   4   5   6   7   8   9   10   >