Notes on Prime Numbers
  • Introduction
  • Revision History
  • What Do You Mean Large
  • Enter bc
  • Pi with bc
  • C++
  • Ramanujan's constant
  • The Largest Known Prime
  • The Golden Ratio
  • Random Numbers
Powered by GitBook
On this page
  • Version 0.0
  • Version 0.1
  • Version 0.2
  • Version 0.3
  • Version 0.4
  • To Do:
  • Version 0.5
  • To Do:
  • Version 0.6
  • Version 0.7
  • Version 0.8
  • Version 0.9
  • Version 0.91
  • Version 0.92
  • Version 0.93
  • Version 0.94

Was this helpful?

Revision History

Version 0.0

Experiment with setting up GitBook with GitHub, including setting up a GitHub account

Version 0.1

May 28, 2015

Break up the initial document notes_on_numbers_like_primes_and_pi.md into individual chapters and fixup the folder naming, as I managed to screw up and make two chapters contain the same thing. I think it was renaming a chapter with fat fingers.

Include a C++ chapter

Version 0.2

May 28, 2015

Minor tweaks and edits to the content.

Published it, downloaded the ePub, opened it with iBooks, and learned some lessons about ePub format limitations:

  • The user can change all manner of viewing parameters so ensure that all elements will reflow appropriately.

  • Specifically, the length of long lines with embedded space control reflow look odd when the user increases the font size. For example the output of the bc command includes backslashes and carriage returns. either remove that entirely or reduce the BC_LINE_LENGTH environment variable to 40. Body text will reflow fine.Code blocks will reflow within the confines of the block and are generally OK, but keep the code lines as short as reasonable. Leverage the line continuation character backslash where lines exceed 40 characters.

    *Mathematics looks fine in GitBooks HTML proview pane. But the GitBook website does not work and you get the literal characters you typed in, including the two dollar signs. Trying the work-around of placing three dollar signs around the formula and giving it a while line to itself. For example renders as a centered math formula:

`$$$f(x)=e^x$$$`

Version 0.3

May 28, 2015

Added a Revision History chapter to track my efforts.

Updated the math formulas per the notes above.

This build fails with a stack error displayed by the GitBook Client:

RangeError: Maximum call stack size exceeded

My guess is because of the LaTeX math changes I made. But the ePub and PDF version look fine except the math formulas are not translated:

Build af86555 has errored

The full error message at GitHub is:

Downloading source
Extracting source
Current version is 2.0.2
Tweaking book.json
Installing plugins
warn: you should specify a gitbook version to use in your book.json, for example: 2.x.x
info: 1 plugins to install
info: No version specified, resolve plugin autocover
info: install plugin autocover from npm (gitbook-plugin-autocover) with version 1.2.1
info: >> plugin autocover installed with success

Done, without error
Building Site, will upload
info: loading book configuration....
warn: you should specify a gitbook version to use in your book.json, for example: 2.x.x
info: OK
info: load plugin gitbook-plugin-autocover ....OK
info: >> 1 plugins loaded
info: start generation with website generator
info: clean website generator
info: OK

RangeError: Maximum call stack size exceeded

Version 0.4

To Do:

  • Explore the problem with math typesetting at the GitBook website.

  • Possibly replace the math formulas with ordinary text to work around the mathtype problem.

  • Possibly use alternative math syntax \\[ {e}^{i\pi }+1=0 \\]

  • Consider reviewing the folder structure used in by GitBook and leveraging the include features of XXX Markdown editor. Otherwise a careful concatention operation should be able to combine the indicidual chapters into a single document suitable for any of the other tools in my chain to convert to ePub.

Version 0.5

To Do:

The same error occurs despite addressing many items in the To Do for version 0.4

  • I am loathe to replace the mathtype formulas with ordinary textual version. However let me do this to troubleshoot the problem. Comment out the mathtype for now. Replace it with ASCII formulas, typesetting hat tip to Mathomatic.

  • That fixes it. I had to revise the math formula in the version 0.2 history above

    *

Version 0.6

  • Build for version 0.5 succeeded so we know that the GitBook site has issues with LaTeX.

{ "gitbook":     ">=1.1.0",
  "plugins":     ["mathjax"],
  "title":       "Notes on Large Numbers",
  "description": "Calculating with large numbers",
  "language":    "en"
}

Version 0.7

The book.json update in version 0.6 did not hurt. Let's see if the plugins entry helps our mathjax. Let me add a mathjax formula here and see:

`\\[ f(x)=e^x \\]`

Version 0.8

Every since adding content to book.json we're not seeing the latest build anymore at the GitBook site. We see version 0.5. Let me repair the file thus:

{ "gitbook":     ">=1.1.0",
  "plugins":     ["mathjax"]
}

Version 0.9

This is messed up. I still cannot see anything past version 0.5. Let me create a new book and publish that. "Notes on Large Numbers."

Version 0.91

No Go. The stack error returnes with any mathjax inclusion. Let me clean up the eBook so it looks as good as it can without mathjax. Even that crashes. Let me revise book.json to remove the matjax plugin which is not needed anymore.

{ "gitbook":     ">=1.1.0"
}

Version 0.92

Agressively placed code blocks around anything that might be suspect.

Curious. Seems if you just wait a few minutes you can download the PDF and ePub. Let's try again. OK that went fine. No more stack issues. All mathjax traces are clearned out. An ePub and a PDF are both now created. They look good. The PDF too.

Version 0.93

Added the appropriate language around fenced code blacks for JSON, bash, and cpp. Only the JSON marked code blocks fail to receive syntax highlighting from the GitHub processor. The GitHub Editor shows the syntax coloring. And we get the RangeError: Maximum call stack size exceeded error but the build succeeds and ePub and PDF files are correctly generated.

Version 0.94

Minor edits

PreviousIntroductionNextWhat Do You Mean Large

Last updated 5 years ago

Was this helpful?

The build [af86555] () of your book [johnblommers/notes-on-prime-numbers] () has failed in 8.877 seconds.

Access your build details to fix it and publish a new version. Check out the list of .

Note that this eBook can be . The the most recent successful build can be downloaded as ePub, Mobi, and PDF formats. Emphasize that the last version that built successfully is available.

Explore what [plug-ins]( are available for the GitBook desktop application. There are none as the site reports "Oups. An error has occurred."

Consider building the GitBook editor from the at the repository. I have notes somewhere on how this is done on OS X.

Update the GitBook client to

Note that the is also available to download but I have not done so. It is that backend that does the conversion from Markdown to eBook format. and that is where the real problem appears to be. The backed has seen more recent development. It installs easily using npm.

Added the following information to and validated the JSON syntax at to eliminate the one warning issued by the build process and to include additional metadata. I have high hopes for the plugins entry:

https://www.gitbook.com/book/johnblommers/notes-on-prime-numbers/build/5567880922d0ba030076d638?utm_source=email&utm_campaign=email%3Abuild_failed
http://johnblommers.gitbooks.io/notes-on-prime-numbers/
common errors
read online
http://plugins.gitbook.com/
source code
version 1.1.0
GitBook Web backend
book.json
http://jsonlint.com/