citation()

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

citation()

Júlio Hoffimann
Dear all,

Is anyone working on something similar? http://www.walkingrandomly.com/?p=4759

Juan?

If not, i would like to add this function.

Best,
Júlio.
Reply | Threaded
Open this post in threaded view
|

Re: citation()

Juan Pablo Carbajal-2
On Sat, Jan 19, 2013 at 11:04 PM, Júlio Hoffimann
<[hidden email]> wrote:

> Dear all,
>
> Is anyone working on something similar?
> http://www.walkingrandomly.com/?p=4759
>
> Juan?
>
> If not, i would like to add this function.
>
> Best,
> Júlio.

Hi, No, I mentioned it in G+ octave site, but I do not have resources
now to do it. Though, it sounds quite simple. Let me know if you need
some testing or whatever.

JPi
Reply | Threaded
Open this post in threaded view
|

Re: citation()

Júlio Hoffimann
Ok, i'll code it at the end of the day.

John et al.,


The following BibTeX entry is ok? Could you please fill in the question marks?

@Manual{,
    title = {GNU Octave Manual: A high-level interactive language for numerical computations},
    author = {John W. Eaton and David Bateman and Søren Hauberg},
    organization = {???????},
    address = {????????},
    year = {2009},
    note = {{ISBN} 1441413006},
    url = {http://www.gnu.org/software/octave/},
  }
Reply | Threaded
Open this post in threaded view
|

Re: citation()

Carnë Draug
On 21 January 2013 19:41, Júlio Hoffimann <[hidden email]> wrote:
> Ok, i'll code it at the end of the day.

When you write this, can you add a register and unregister option for
packages and functions? Similar to what colormap() does. This would
allow users to type "citation optim" to get a citation for the optim
package if it exists, or "citation nonlin_residmin" to get a citation
for that function.

citation # get citation for octave
citation octave # get citation for octave (default)
citation optim # gets nothing, optim package not registered
citation ("register", "optim") # registers optim
citation optim # get citation for optim
citation ("unregister", "optim") # unregisters optim
citation optim # gets nothing again

This is very easy to maintain by using PKG_ADD lines to functions and
packages, can even be used in core functions.

Carnë
Reply | Threaded
Open this post in threaded view
|

Re: citation()

Carnë Draug
On 21 January 2013 23:22, Carnë Draug <[hidden email]> wrote:

> On 21 January 2013 19:41, Júlio Hoffimann <[hidden email]> wrote:
>> Ok, i'll code it at the end of the day.
>
> When you write this, can you add a register and unregister option for
> packages and functions? Similar to what colormap() does. This would
> allow users to type "citation optim" to get a citation for the optim
> package if it exists, or "citation nonlin_residmin" to get a citation
> for that function.
>
> citation # get citation for octave
> citation octave # get citation for octave (default)
> citation optim # gets nothing, optim package not registered
> citation ("register", "optim") # registers optim
> citation optim # get citation for optim
> citation ("unregister", "optim") # unregisters optim
> citation optim # gets nothing again
>
> This is very easy to maintain by using PKG_ADD lines to functions and
> packages, can even be used in core functions.

I forgot, the registration would also require a 3rd argument with the
actual citation entry.
Reply | Threaded
Open this post in threaded view
|

Re: citation()

Júlio Hoffimann

> When you write this, can you add a register and unregister option for
> packages and functions? Similar to what colormap() does. This would
> allow users to type "citation optim" to get a citation for the optim
> package if it exists, or "citation nonlin_residmin" to get a citation
> for that function.
>
> citation # get citation for octave
> citation octave # get citation for octave (default)
> citation optim # gets nothing, optim package not registered
> citation ("register", "optim") # registers optim
> citation optim # get citation for optim
> citation ("unregister", "optim") # unregisters optim
> citation optim # gets nothing again

Hi Carnë,

Maybe citing functions is too much of granularity? IMHO, being able to cite Octave itself or a specific package covers all use cases in a technical document.

Anyways, the implementation will be open and quite easy to extend. ;)

Best,
Júlio.
Reply | Threaded
Open this post in threaded view
|

Re: citation()

Carnë Draug
On 22 January 2013 00:58, Júlio Hoffimann <[hidden email]> wrote:
>> > When you write this, can you add a register and unregister option for
>> > packages and functions? Similar to what colormap() does. This would
>> > allow users to type "citation optim" to get a citation for the optim
>> > package if it exists, or "citation nonlin_residmin" to get a citation
>> > for that function.
>
> Maybe citing functions is too much of granularity?

You're probably right, but given the possibility to register a random
package, then we can't stop people from registering function names as
well (we can avoid it in OF but nothing stops users from making it on
their own package and distribute elsewhere as is intended for Agora).
I guess at registering time one could check if there's a package
installed with that name but why should we actually stop it instead of
leaving it to the maintainer?

Carnë
Reply | Threaded
Open this post in threaded view
|

Re: citation()

Søren Hauberg
In reply to this post by Júlio Hoffimann

On Jan 21, 2013, at 8:41 PM, Júlio Hoffimann wrote:

> Ok, i'll code it at the end of the day.
>
> John et al.,
>
> Are you planning a new edition of the manual? http://www.amazon.com/Gnu-Octave-Version-3-0-1-Manual/dp/1441413006/ref=sr_1_2?s=books&ie=UTF8&qid=1358796048&sr=1-2
>
> The following BibTeX entry is ok? Could you please fill in the question marks?
>
> @Manual{,
>     title = {GNU Octave Manual: A high-level interactive language for numerical computations},
>     author = {John W. Eaton and David Bateman and Søren Hauberg},
>     organization = {???????},
>     address = {????????},
>     year = {2009},
>     note = {{ISBN} 1441413006},
>     url = {
> http://www.gnu.org/software/octave/
> },
>   }

Could you spell my first name "S{\o}ren" instead? That seems to cause substantially less problems in practice.

Thanks
Søren
Reply | Threaded
Open this post in threaded view
|

Re: citation()

Júlio Hoffimann

Could you spell my first name "S{\o}ren" instead? That seems to cause substantially less problems in practice.

Thanks
Søren

hahaha, sorry S{\o}ren, i'll do it right. The BibTeX i showed is not supposed to compile, i'll check the output before submit anything.

What about organization and address?

Júlio.
Reply | Threaded
Open this post in threaded view
|

Re: citation()

Júlio Hoffimann
The patch follows: https://savannah.gnu.org/patch/index.php?7960

Carnë, could you guide me on how packages should be integrated? Feel free to do it yourself if you want. ;)

Best,
Júlio.


2013/1/22 Júlio Hoffimann <[hidden email]>

Could you spell my first name "S{\o}ren" instead? That seems to cause substantially less problems in practice.

Thanks
Søren

hahaha, sorry S{\o}ren, i'll do it right. The BibTeX i showed is not supposed to compile, i'll check the output before submit anything.

What about organization and address?

Júlio.

Reply | Threaded
Open this post in threaded view
|

Re: citation()

Juan Pablo Carbajal-2
On Tue, Feb 26, 2013 at 1:28 AM, Júlio Hoffimann
<[hidden email]> wrote:

> The patch follows: https://savannah.gnu.org/patch/index.php?7960
>
> Carnë, could you guide me on how packages should be integrated? Feel free to
> do it yourself if you want. ;)
>
> Best,
> Júlio.
>
>
> 2013/1/22 Júlio Hoffimann <[hidden email]>
>>
>>
>>> Could you spell my first name "S{\o}ren" instead? That seems to cause
>>> substantially less problems in practice.
>>>
>>> Thanks
>>> Søren
>>
>>
>> hahaha, sorry S{\o}ren, i'll do it right. The BibTeX i showed is not
>> supposed to compile, i'll check the output before submit anything.
>>
>> What about organization and address?
>>
>> Júlio.
>
>

After Carnë's addition it looks great.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: citation()

Carnë Draug
On 28 February 2013 12:03, Juan Pablo Carbajal <[hidden email]> wrote:
> On Tue, Feb 26, 2013 at 1:28 AM, Júlio Hoffimann
> <[hidden email]> wrote:
>> The patch follows: https://savannah.gnu.org/patch/index.php?7960
>>
>> Carnë, could you guide me on how packages should be integrated? Feel free to
>> do it yourself if you want. ;)
>>
>
> After Carnë's addition it looks great.

I disagree. I'm not very happy with my submission at all. Specially,
using an empty string to remove the entry from the citation list seems
like very poor design (there's only me to blame here). And using it as
command rather than function allows for people to very easily
overwrite citation instructions by accident without chance to recover
them.

So I just did what I should have done before and checked what R does
and I found their solution much more elegant. Basically R and its
package comes with a CITATION file and citation() simple display the
contents of the file. In this case, citation() becomes very much like
what we already have for news().

I find this a much better approach. If someone adds the citation file
to the build system, I'll submit a patch for citation() and make pkg()
deal with the CITATION file.

Carnë
Reply | Threaded
Open this post in threaded view
|

Re: citation()

Juan Pablo Carbajal-2
On Thu, Feb 28, 2013 at 1:28 PM, Carnë Draug <[hidden email]> wrote:

> On 28 February 2013 12:03, Juan Pablo Carbajal <[hidden email]> wrote:
>> On Tue, Feb 26, 2013 at 1:28 AM, Júlio Hoffimann
>> <[hidden email]> wrote:
>>> The patch follows: https://savannah.gnu.org/patch/index.php?7960
>>>
>>> Carnë, could you guide me on how packages should be integrated? Feel free to
>>> do it yourself if you want. ;)
>>>
>>
>> After Carnë's addition it looks great.
>
> I disagree. I'm not very happy with my submission at all. Specially,
> using an empty string to remove the entry from the citation list seems
> like very poor design (there's only me to blame here). And using it as
> command rather than function allows for people to very easily
> overwrite citation instructions by accident without chance to recover
> them.
>
> So I just did what I should have done before and checked what R does
> and I found their solution much more elegant. Basically R and its
> package comes with a CITATION file and citation() simple display the
> contents of the file. In this case, citation() becomes very much like
> what we already have for news().
>
> I find this a much better approach. If someone adds the citation file
> to the build system, I'll submit a patch for citation() and make pkg()
> deal with the CITATION file.
>
> Carnë

Even greater!