Re: [NTG-context] Ordered list of references (figures)

2015-09-30 Thread Henning Hraban Ramm
Hi Taco,
sorry, I should have provided a minimal example.
Thanks in advance!

Am 2015-09-29 um 12:30 schrieb Taco Hoekwater :

> Hi Hraban,
> 
> I would be happy to help with this (i've done some registers in the past 
> myself), but I will need a test file to play with...
> 
> Best wishes,
> Taco
> 
>> On 28 Sep 2015, at 06:28, Henning Hraban Ramm  wrote:
>> 
>> PING! I would really appreciate an answer.
>> 
>>> Am 2015-09-22 um 17:39 schrieb Henning Hraban Ramm :
>>> 
 Am 2015-09-22 um 10:49 schrieb Henning Hraban Ramm :
 
 Hi wizards,
 
 in my current book projects I need a list of figure references, ordered by 
 author and page number.
 Like this:
 
 Photos: Hans Hagen (p.1,4,6,7), Taco Hoekwater (p.2,12–20), Hraban Ramm 
 (p.3ff.)
 
 How can I do that? I.e.
 - How can I assign an author name/reference to a figure?
 – How can I output that list?
 
 About like this?:
 
 \placefigure[top][someref]{\externalfigure[somepic]}\reference[someref]{Hraban
  Ramm}
 
 \ref[t][someref] (\at{p.}[someref]) % put this in some command that is 
 called by \listoffigures ?
 
 
 Extension: I need to integrate some unnumbered pages into the list, like 
 the cover.
>>> 
>>> Ok, I can use registers for that:
>>> 
>>> \defineregister[fidx]
>>> \setupregister[fidx][%
>>>   n=1,
>>>   compress=yes,
>>>   indicator=no,
>>>   distance=0.5em,
>>>   before={},
>>>   after={,},
>>>   prefix=none,
>>> ]
>>> \setupheadtext[fidx=Figures]
>>> 
>>> I can influence the order like \fidx[spinoza]{Baruch Spinoza}, great.
>>> 
>>> That gets me as far as:
>>> 
>>> Hraban 2–3, 5, 7, 9–10, 12, 14, 16–17, 19, 21, 23–24, 26, 28, 30–31, 33, 35
>>> Picasso 1–2, 4–5, 8–9, 11–12, 15–16, 18–19, 22–23, 25–26, 29–30, 32–33
>>> 
>>> But I’d like to have
>>> 
>>> Hraban (p.2–3, 5, 7, 9–10, 12, 14, 16–17, 19, 21, 23–24, 26, 28, 30–31, 33, 
>>> 35), Picasso (p.1–2, 4–5, 8–9, 11–12, 15–16, 18–19, 22–23, 25–26, 29–30, 
>>> 32–33)
>>> 
>>> 
>>> For inserting a page name like "Cover" I tried
>>> \writetoregister[fidx][Picasso]{Cover}
>>> 
>>> But \writetoregister is undefined!? (As well as \writetofidx)
>>> 
>>> What else can I use?
>>> 
>>> 
>>> Greetlings, Hraban
>>> ---
>>> http://www.fiee.net
>>> http://wiki.contextgarden.net
>>> https://www.cacert.org (I'm an assurer)



Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)


indextest.tex
Description: Binary data
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Ordered list of references (figures)

2015-09-30 Thread Taco Hoekwater
Hi Hraban,

Here is what I can do at short notice. After this, I would probably just 
cut
the final result back in after some tweaking. In any case, I am out of time 
right now.

Good luck,
Taco


\newif\iffirstFIDXpage

\def\textcommand#1{#1\global\firstFIDXpagetrue}
\def\pagecommand#1{\iffirstFIDXpage (p.~\fi \global\firstFIDXpagefalse #1}
\def\stopregisterpages{)\dostoptagged\endgroup}

\defineregister[fidx]
\setupregister[fidx][%
n=1, align=no,
%alternative=B,
compress=yes,
indicator=no,
textcommand=\textcommand,
pagecommand=\pagecommand,
distance=0.5em,
before={},
after={},
prefix=none]



> On 30 Sep 2015, at 09:51, Henning Hraban Ramm  wrote:
> 
> Hi Taco,
> sorry, I should have provided a minimal example.
> Thanks in advance!
> 
> Am 2015-09-29 um 12:30 schrieb Taco Hoekwater :
> 
>> Hi Hraban,
>> 
>> I would be happy to help with this (i've done some registers in the past 
>> myself), but I will need a test file to play with...
>> 
>> Best wishes,
>> Taco
>> 
>>> On 28 Sep 2015, at 06:28, Henning Hraban Ramm  wrote:
>>> 
>>> PING! I would really appreciate an answer.
>>> 
 Am 2015-09-22 um 17:39 schrieb Henning Hraban Ramm :
 
> Am 2015-09-22 um 10:49 schrieb Henning Hraban Ramm :
> 
> Hi wizards,
> 
> in my current book projects I need a list of figure references, ordered 
> by author and page number.
> Like this:
> 
> Photos: Hans Hagen (p.1,4,6,7), Taco Hoekwater (p.2,12–20), Hraban Ramm 
> (p.3ff.)
> 
> How can I do that? I.e.
> - How can I assign an author name/reference to a figure?
> – How can I output that list?
> 
> About like this?:
> 
> \placefigure[top][someref]{\externalfigure[somepic]}\reference[someref]{Hraban
>  Ramm}
> 
> \ref[t][someref] (\at{p.}[someref]) % put this in some command that is 
> called by \listoffigures ?
> 
> 
> Extension: I need to integrate some unnumbered pages into the list, like 
> the cover.
 
 Ok, I can use registers for that:
 
 \defineregister[fidx]
 \setupregister[fidx][%
  n=1,
  compress=yes,
  indicator=no,
  distance=0.5em,
  before={},
  after={,},
  prefix=none,
 ]
 \setupheadtext[fidx=Figures]
 
 I can influence the order like \fidx[spinoza]{Baruch Spinoza}, great.
 
 That gets me as far as:
 
 Hraban 2–3, 5, 7, 9–10, 12, 14, 16–17, 19, 21, 23–24, 26, 28, 30–31, 33, 35
 Picasso 1–2, 4–5, 8–9, 11–12, 15–16, 18–19, 22–23, 25–26, 29–30, 32–33
 
 But I’d like to have
 
 Hraban (p.2–3, 5, 7, 9–10, 12, 14, 16–17, 19, 21, 23–24, 26, 28, 30–31, 
 33, 35), Picasso (p.1–2, 4–5, 8–9, 11–12, 15–16, 18–19, 22–23, 25–26, 
 29–30, 32–33)
 
 
 For inserting a page name like "Cover" I tried
 \writetoregister[fidx][Picasso]{Cover}
 
 But \writetoregister is undefined!? (As well as \writetofidx)
 
 What else can I use?
 
 
 Greetlings, Hraban
 ---
 http://www.fiee.net
 http://wiki.contextgarden.net
 https://www.cacert.org (I'm an assurer)
> 
> 
> 
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> https://www.cacert.org (I'm an assurer)
> 

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] escaping quotes in \ctxlua

2015-09-30 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\starttext
\startluacode
tex.print(os.getenv("USER")
\stopluacode

\ctxlua{tex.print(os.getenv("USER")}
\stoptext

How can I escape the quotes in the \ctxlua command?

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] escaping quotes in \ctxlua

2015-09-30 Thread Wolfgang Schuster

Pablo Rodriguez 
30. September 2015 um 17:07
Dear list,

I have the following sample:

\starttext
\startluacode
tex.print(os.getenv("USER")
\stopluacode

\ctxlua{tex.print(os.getenv("USER")}
\stoptext

How can I escape the quotes in the \ctxlua command?
You have to add a  closing ) for tex.print in both Lua calls but you can 
replace the second version with \cldcontext{os.getenv("USER")}.


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] escaping quotes in \ctxlua

2015-09-30 Thread Tomas Hala
Hello Pablo,
print commands are not balanced, second right parenthesis is missing.
Then it will work.

Tomas

Wed, Sep 30, 2015 ve 05:07:49PM +0200 Pablo Rodriguez napsal(a):
# Dear list,
# 
# I have the following sample:
# 
# \starttext
# \startluacode
# tex.print(os.getenv("USER")
# \stopluacode
# 
# \ctxlua{tex.print(os.getenv("USER")}
# \stoptext
# 
# How can I escape the quotes in the \ctxlua command?
# 
# 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://tex.aanhet.net
# archive  : http://foundry.supelec.fr/projects/contextrev/
# wiki : http://contextgarden.net
# 
___

 Tomáš Hála

Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28

http://akela.mendelu.cz/~thala
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] escaping quotes in \ctxlua

2015-09-30 Thread Pablo Rodriguez
On 09/30/2015 05:20 PM, Wolfgang Schuster wrote:
>> Pablo Rodriguez 30. September 2015 um 17:07
>> Dear list,
>>
>> I have the following sample:
>>
>> \starttext
>> \startluacode
>> tex.print(os.getenv("USER")
>> \stopluacode
>>
>> \ctxlua{tex.print(os.getenv("USER")}
>> \stoptext
>>
>> How can I escape the quotes in the \ctxlua command?
> You have to add a  closing ) for tex.print in both Lua calls but you can
> replace the second version with \cldcontext{os.getenv("USER")}.

Many thanks for your replies, Wolfgang and Thomas.

I knew that parentheses need to be closed, but I totally overlooked it
in both tex.print commands.

Many thanks for your help and sorry for the noise,


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___