ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* New module: pararef
@ 2012-10-12 23:44 Zenlima
  2012-10-13  9:57 ` Wolfgang Schuster
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Zenlima @ 2012-10-12 23:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hallo,

after so many of you helped me, I want to give back. I just made my
t-pararef module public for everyone:

	http://modules.contextgarden.net/pararef
	
	http://wiki.contextgarden.net/Paragraph_Referencing

Please feel free to send me comments about the coding style and what I
could have done in a better way. E.g. the interface file is missing,
but I don't know how it should look like. 

But I hope mainly that it will prove beneficial for some of you.

H.
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New module: pararef
  2012-10-12 23:44 New module: pararef Zenlima
@ 2012-10-13  9:57 ` Wolfgang Schuster
  2012-10-13 10:55 ` Sietse Brouwer
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Wolfgang Schuster @ 2012-10-13  9:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 13.10.2012 um 01:44 schrieb Zenlima <post@zenlima.eu>:

> Hallo,
> 
> after so many of you helped me, I want to give back. I just made my
> t-pararef module public for everyone:
> 
> 	http://modules.contextgarden.net/pararef
> 	
> 	http://wiki.contextgarden.net/Paragraph_Referencing
> 
> Please feel free to send me comments about the coding style and what I
> could have done in a better way. E.g. the interface file is missing,
> but I don't know how it should look like. 
> 
> But I hope mainly that it will prove beneficial for some of you.

You can replace these two lines

\definecounter[ParagraphNumber][way=bytext,prefix=no]
\setuphead[chapter,section,subsection,subsubsection][insidesection={\resetcounter[ParagraphNumber]}]

with

\definecounter[ParagraphNumber][way=byhead,prefix=no]

The “way=byhead” settings resets the counter with each heading.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New module: pararef
  2012-10-12 23:44 New module: pararef Zenlima
  2012-10-13  9:57 ` Wolfgang Schuster
@ 2012-10-13 10:55 ` Sietse Brouwer
  2012-10-13 11:13   ` Wolfgang Schuster
  2012-10-13 15:25 ` Philipp Gesang
  2012-10-16 14:04 ` Procházka Lukáš Ing. - Pontex s. r. o.
  3 siblings, 1 reply; 10+ messages in thread
From: Sietse Brouwer @ 2012-10-13 10:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello Zenlima,

Nice work. I very much approve of the 'a paragraph is one coherent
thought/argument' school, and this is definitely more useful than the
\setupparagraphnumbering mechanism which numbers every TeX paragraph.
I've added some wikilinks to your [[Paragraph Referencing]] page from
related pages ([[Paragraph Enumeration]], [[Modules]],
[[Command/setupparagraphnumbering]] to make it easier to find.

About the crossref command: 'brakets' is spelled 'brackets' in
English... Perhaps you can change it while the module is still young.

Congratulations on shipping a module!
All the best,
Sietse


On Sat, Oct 13, 2012 at 1:44 AM, Zenlima <post@zenlima.eu> wrote:
> Hallo,
>
> after so many of you helped me, I want to give back. I just made my
> t-pararef module public for everyone:
>
>         http://modules.contextgarden.net/pararef
>
>         http://wiki.contextgarden.net/Paragraph_Referencing
>
> Please feel free to send me comments about the coding style and what I
> could have done in a better way. E.g. the interface file is missing,
> but I don't know how it should look like.
>
> But I hope mainly that it will prove beneficial for some of you.
>
> H.
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New module: pararef
  2012-10-13 10:55 ` Sietse Brouwer
@ 2012-10-13 11:13   ` Wolfgang Schuster
  2012-10-13 16:53     ` Zenlima
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2012-10-13 11:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 13.10.2012 um 12:55 schrieb Sietse Brouwer <sbbrouwer@gmail.com>:

> About the crossref command: 'brakets' is spelled 'brackets' in
> English... Perhaps you can change it while the module is still young.

Instead of a key to enable/disable the bracket I would use left/right keys to set the symbols and add a label key to disable/enable the label text.

> Congratulations on shipping a module!

To include the module in the minimals he should send a mail to Mojca.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New module: pararef
  2012-10-12 23:44 New module: pararef Zenlima
  2012-10-13  9:57 ` Wolfgang Schuster
  2012-10-13 10:55 ` Sietse Brouwer
@ 2012-10-13 15:25 ` Philipp Gesang
  2012-10-14  8:19   ` Wolfgang Schuster
  2012-10-16 14:04 ` Procházka Lukáš Ing. - Pontex s. r. o.
  3 siblings, 1 reply; 10+ messages in thread
From: Philipp Gesang @ 2012-10-13 15:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1812 bytes --]

Hi!

···<date: 2012-10-13, Saturday>···<from: Zenlima>···

> after so many of you helped me, I want to give back. I just made my
> t-pararef module public for everyone:
> 
> 	http://modules.contextgarden.net/pararef
> 	
> 	http://wiki.contextgarden.net/Paragraph_Referencing

Nice, looks good. Do you plan on having a development repository
hosted somewhere (github, bitbucket etc.)? Would make it more
accessible to some of us.

> Please feel free to send me comments about the coding style and what I
> could have done in a better way. E.g. the interface file is missing,
> but I don't know how it should look like. 

Dunno, you’d need an interface if you plan on documenting it with
s-mod[1].  But s-mod was broken last time I checked because of
some macro naming conflict that prevents you from using the
module inside its documentation. As you have the documentation on
the wiki (good idea in any case) I don’t really see the point in
bothering with an interface.

Best
Philipp

[1] http://archive.contextgarden.net/message/20110805.122456.64a92200.en.html

> But I hope mainly that it will prove beneficial for some of you.
> 
> H.
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New module: pararef
  2012-10-13 11:13   ` Wolfgang Schuster
@ 2012-10-13 16:53     ` Zenlima
  2012-10-13 17:27       ` Wolfgang Schuster
  2012-10-13 22:46       ` Mojca Miklavec
  0 siblings, 2 replies; 10+ messages in thread
From: Zenlima @ 2012-10-13 16:53 UTC (permalink / raw)
  To: ntg-context

Hi Sietse, hi Wolfgang,

thanks for your first feedback. Right now I am working on your
suggestions.

@Wolfgang: I don't understand your suggestion: "add a label key to
disable/enable the label text". Can you describe it more detaily or in
other words? I am not sure how to implement it with the refs to a
paragraph.

> To include the module in the minimals he should send a mail to Mojca.

That will come, but I wanted to get some feedback first.. and it was
necessary as we saw :-)

H.
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New module: pararef
  2012-10-13 16:53     ` Zenlima
@ 2012-10-13 17:27       ` Wolfgang Schuster
  2012-10-13 22:46       ` Mojca Miklavec
  1 sibling, 0 replies; 10+ messages in thread
From: Wolfgang Schuster @ 2012-10-13 17:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 13.10.2012 um 18:53 schrieb Zenlima <post@zenlima.eu>:

> Hi Sietse, hi Wolfgang,
> 
> thanks for your first feedback. Right now I am working on your
> suggestions.
> 
> @Wolfgang: I don't understand your suggestion: "add a label key to
> disable/enable the label text". Can you describe it more detaily or in
> other words? I am not sure how to implement it with the refs to a
> paragraph.


Here is a example where I used a few helpers, e.g. \installdirectcommandhandler creates \setupreferencecommand and \referencecommandparameter.

\unprotect

\installnamespace                                  {referencecommand}
\installdirectcommandhandler \????referencecommand {referencecommand}

\def\referencecommand
  {\dodoubleempty\referencecommand_direct}

\def\referencecommand_direct[#1][#2]%
  {\begingroup
   \ifsecondargument
     \setupreferencecommand[#1]%
     \edef\m_reference{#2}%
   \else
     \edef\m_reference{#1}%
   \fi
   \usereferencecommandstyleandcolor\c!style\c!color
   \getreference[title][\m_reference]%
   \doif{\referencecommandparameter\c!label}\v!yes{\referencetext\v!page}%
   \referencecommandparameter\c!left
   \getreference [page][\m_reference]%
   \referencecommandparameter\c!right
   \endgroup}

\definelabelclass[reference]

\setupreferencetext[\s!en][page={ on page }]
\setupreferencetext[\s!de][page={ auf Seite }]

\setupreferencecommand
  [\c!label=\v!yes,
    \c!left=(,
   \c!right=)]

\protect

\starttext

\dontleavehmode\reference[knuth]{Donald E. Knuth}%
\input knuth

\blank

\referencecommand[knuth]

\blank

\referencecommand[left={[},right={]}][knuth]

\blank

\referencecommand[style=italic,color=red][knuth]

\stoptext

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

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New module: pararef
  2012-10-13 16:53     ` Zenlima
  2012-10-13 17:27       ` Wolfgang Schuster
@ 2012-10-13 22:46       ` Mojca Miklavec
  1 sibling, 0 replies; 10+ messages in thread
From: Mojca Miklavec @ 2012-10-13 22:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, Oct 13, 2012 at 6:53 PM, Zenlima wrote:
>
>> To include the module in the minimals he should send a mail to Mojca.
>
> That will come, but I wanted to get some feedback first.. and it was
> necessary as we saw :-)

I didn't inspect the module closely, but it seems short and general
enough that the functionality could in principle also end up in the
core.

Mojca
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New module: pararef
  2012-10-13 15:25 ` Philipp Gesang
@ 2012-10-14  8:19   ` Wolfgang Schuster
  0 siblings, 0 replies; 10+ messages in thread
From: Wolfgang Schuster @ 2012-10-14  8:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 13.10.2012 um 17:25 schrieb Philipp Gesang <Philipp.Gesang@alumni.uni-heidelberg.de>:

>> Please feel free to send me comments about the coding style and what I
>> could have done in a better way. E.g. the interface file is missing,
>> but I don't know how it should look like. 
> 
> Dunno, you’d need an interface if you plan on documenting it with
> s-mod[1].  But s-mod was broken last time I checked because of
> some macro naming conflict that prevents you from using the
> module inside its documentation.

The name conflict with module documentation was solved a while ago.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New module: pararef
  2012-10-12 23:44 New module: pararef Zenlima
                   ` (2 preceding siblings ...)
  2012-10-13 15:25 ` Philipp Gesang
@ 2012-10-16 14:04 ` Procházka Lukáš Ing. - Pontex s. r. o.
  3 siblings, 0 replies; 10+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-10-16 14:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

thanks for the job.

Would you kindly add a Czech alternative:

----
\setupparareftext[cz][braketOpen={(}] % Should be "bracketOpen"
\setupparareftext[cz][braketClose={)}] % Should be "bracketClose"
\setupparareftext[cz][atpageLeft={ na stran\ecaron\ }]
\setupparareftext[cz][atpageRight={}]
----

Best regards,

Lukas


On Sat, 13 Oct 2012 01:44:36 +0200, Zenlima <post@zenlima.eu> wrote:

> Hallo,
>
> after so many of you helped me, I want to give back. I just made my
> t-pararef module public for everyone:
>
> 	http://modules.contextgarden.net/pararef
> 	
> 	http://wiki.contextgarden.net/Paragraph_Referencing


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-10-16 14:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-12 23:44 New module: pararef Zenlima
2012-10-13  9:57 ` Wolfgang Schuster
2012-10-13 10:55 ` Sietse Brouwer
2012-10-13 11:13   ` Wolfgang Schuster
2012-10-13 16:53     ` Zenlima
2012-10-13 17:27       ` Wolfgang Schuster
2012-10-13 22:46       ` Mojca Miklavec
2012-10-13 15:25 ` Philipp Gesang
2012-10-14  8:19   ` Wolfgang Schuster
2012-10-16 14:04 ` Procházka Lukáš Ing. - Pontex s. r. o.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).