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?

  • 1
    $\begingroup$ You could try and email the authors and ask for the package; if that fails you could make use of text recognition. $\endgroup$
    – user21
    Commented Nov 5, 2016 at 8:37
  • $\begingroup$ @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. $\endgroup$
    – dearN
    Commented Nov 5, 2016 at 12:45
  • 1
    $\begingroup$ You might find similar work, in the form of Mathematica packages, based on papers from Willy Heremann and his (then) grad students here. $\endgroup$ Commented Nov 6, 2016 at 19:19
  • $\begingroup$ @DanielLichtblau thank you!!!! His paper on tanh method is what I am using currently for my work. $\endgroup$
    – dearN
    Commented Nov 7, 2016 at 0:39

1 Answer 1


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.


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
    $\begingroup$ +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. $\endgroup$ Commented Nov 5, 2016 at 16:51
  • 1
    $\begingroup$ 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. $\endgroup$
    – Jason B.
    Commented Nov 8, 2016 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.