oceanborn

converting solidity language HTML manual to PDF

Nov 12th, 2017 (edited)
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.33 KB | None | 0 0
  1. # git clone solidity
  2. # see http://solidity.readthedocs.io/en/develop/installing-solidity.html#clone-the-repository
  3.  
  4. git clone --recursive https://github.com/ethereum/solidity.git
  5. cd solidity
  6.  
  7. # install packages z3 (theorem prover) and c++ boost lib to compile solidity  as these are needed in archlinux
  8. # and probably other distros
  9. sudo pacman -S z3 boost
  10.  
  11. # install haskell packages, cabal must have been installed beforehand
  12. cabal install haddock
  13. cabal install pandoc
  14.  
  15. in file: scripts/docs.sh add line:
  16. set -e
  17. cd docs
  18. sphinx-build -nW -b html -d _build/doctrees . _build/html
  19. sphinx-build -nW -b latex -d _build/doctrees . _build/pdf
  20. cd ..
  21.  
  22. # run docs.sh script
  23. ./scripts/docs.sh
  24.  
  25. # does not work as latex does not preprocess svg. latex speaks of inputenc. Don't know how to configure
  26. # workaround: run inkspace and convert to png inside the _build/doctrees/pdf folder
  27. # edit solidity.latex and change the text from logo.svg to logo.png
  28. # do the same for solidity.fts (generated file?)
  29. # todo: find a better workaround
  30.  
  31. # run pandoc from the sphinx generated _build/html folder. index.html is the starter page.
  32. pandoc -f html -t latex -o solidity.pdf index.html
  33. # there is one error, keep going by pushing enter until the dblatex command completes
  34.  
  35. # display the PDF document, looks good
  36. evince solidity.pdf
  37.  
  38. # hosted at
Add Comment
Please, Sign In to add comment