# Extracting a mathematica package from a highly cited scientific work

I found a mathematica package that is particularly useful to me, published in (a highly cited work) a scientific journal. This package supposedly performs the Tanh method for nonlinear partial differential equation and helps circumvent all the tedious algebra that follows if done by hand.

Alas, it would seem that the authors (quite mean of them) have not shared this package online and I cannot find it. I have checked general google searches with the package name and also checked packagedata.net.

I do have the original paper (shared here) in which the last couple of pages have the package.

Is there any way I can extract this package from the pdf or should I copy and paste into a text file (highly error prone since fonts are messy in this pdf) and then deal with it?

Am I missing something?

• You could try and email the authors and ask for the package; if that fails you could make use of text recognition. – user21 Nov 5 '16 at 8:37
• @user21 It would seem that typing the text is the best way of going about it (of course, I have already done it instead of waiting for more goading ;)). I suppose it would be considered not correct to share this with others now? The journal that the authors published in actually allows for code upload and many authors have. These authors have not and perhaps they want to maintain that status quo? I am not sure at the moment if sharing this code that I typed out with peers is a good thing. – dearN Nov 5 '16 at 12:45
• You might find similar work, in the form of Mathematica packages, based on papers from Willy Heremann and his (then) grad students here. – Daniel Lichtblau Nov 6 '16 at 19:19
• @DanielLichtblau thank you!!!! His paper on tanh method is what I am using currently for my work. – dearN Nov 7 '16 at 0:39

By providing the source code in the paper, they are meeting their obligation to the community. And I don't mean that they're doing the bare minimum, that's all they need to do.

If they choose to share the package on some file hosting site, or their faculty page, great, but if not then it hardly seems like a hardship to have to type it in yourself.

Another route would be emailing the authors and requesting the code.

edit

I just noticed that the paper is 20 years old, which makes more sense that the code isn't available in digital format. So in this case there is an added benefit with transcribing the code yourself since version 3.0 packages aren't guaranteed to work in newer versions of the Wolfram Language. But I think in this case only simple, base-level functions are used and those aren't changed often.

Martin John Hadley pointed out this piece of policy from the EPSRC making the sharing of research data mandatory. I like this line,

As a “rule of thumb”, if your journal paper does not include sufficient detail for others to unambiguously replicate your work, you should share your code as part of your research data.

So I would still say that when your research result is a new algorithm, and you present it clearly, others should be able to reproduce it in the language of their choice. Isn't it not uncommon to just give psuedocode?

• +1 ... though I'd like to note in the UK this situation is changing somewhat, EPSRC were the quickest to act research council but all seven will eventually have policies like the one discussed here: software.ac.uk/resources/guides/…. The data/code should be made available with a separate DOI so that it may be cited explicitly. – Martin John Hadley Nov 5 '16 at 16:51
• Oh man, I pity anyone who would need to use my code from graduate school lol. But I was in theoretical chemistry, not comp sci, so the idea was that if the theory was laid out well enough in the paper, you should be able to code it in any language and get the same results. – Jason B. Nov 8 '16 at 15:27