Fixes for pdf generation on macos
* Fixes first shader not automatically closing by adding `u_time` (see patriciogonzalezvivo/glslViewer#142). * Use glslviewer's headless mode for generating images. * Update to latest Pandoc CLI arguments to fix Pandoc CLI errors. * Re-encode `12/accretion.jpg` and `13/holdsworth.jpg` to fix Pandoc jpg errors. * Update appendix 2 README for generating the book as a pdf.
This commit is contained in:
parent
9a71d42062
commit
0415ba1e9f
|
|
@ -2,6 +2,8 @@
|
|||
precision mediump float;
|
||||
#endif
|
||||
|
||||
uniform float u_time;
|
||||
|
||||
void main() {
|
||||
gl_FragColor = vec4(1.0,0.0,1.0,1.0);
|
||||
}
|
||||
|
|
|
|||
BIN
12/accretion.jpg
BIN
12/accretion.jpg
Binary file not shown.
|
Before Width: | Height: | Size: 265 KiB After Width: | Height: | Size: 265 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 144 KiB |
|
|
@ -35,10 +35,16 @@ For parsing the Markdown chapters into Latex and then into a PDF file we will us
|
|||
|
||||
In **MacOSX**:
|
||||
|
||||
Download and Install [basictex & MacTeX-Additions](http://www.tug.org/mactex/morepackages.html) and then install [Pandoc](http://johnmacfarlane.net/pandoc/) and Python by:
|
||||
Download and Install [basictex & MacTeX-Additions] by:
|
||||
|
||||
```bash
|
||||
brew install pandoc python2.7
|
||||
brew cask install mactex-no-gui
|
||||
```
|
||||
|
||||
and then install [Pandoc](http://johnmacfarlane.net/pandoc/), Python 2 & glslViewer by:
|
||||
|
||||
```bash
|
||||
brew install pandoc python@2 glslviewer
|
||||
```
|
||||
|
||||
On **Raspberry Pi** (Raspbian):
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ def injectShaderBlocks(_folder, _text):
|
|||
shaderImage = folder + "/tmp-" + shaderName + ".png"
|
||||
shaderCommand = "glslViewer " + shaderPath + " " + \
|
||||
" ".join(shaderTexturePaths) + \
|
||||
" -s 0.5 -o " + shaderImage
|
||||
" -s 0.5 --headless -o " + shaderImage
|
||||
print shaderCommand
|
||||
returnCode = subprocess.call(shaderCommand, shell=True)
|
||||
rta += "\n"
|
||||
|
|
@ -83,9 +83,9 @@ for folder in folders:
|
|||
|
||||
# Set up the appropriate options for the pandoc command
|
||||
inputOptions = chapters
|
||||
generalOptions = ["-N", "--smart", "--no-tex-ligatures", "--toc", "--standalone",
|
||||
"--preserve-tabs", "-V documentclass=scrbook", "-V papersize=a4", "-V links-as-note", "-S"]
|
||||
latexOptions = ["--latex-engine=" + latexEngine]
|
||||
generalOptions = ["-N", "--toc", "--standalone",
|
||||
"--preserve-tabs", "-V documentclass=scrbook", "-V papersize=a4", "-V links-as-note"]
|
||||
latexOptions = ["--pdf-engine=" + latexEngine]
|
||||
outputOptions = ["--output={0}".format(pdfBookPath)]
|
||||
pandocCommand = ["pandoc"] + outputOptions + \
|
||||
inputOptions + generalOptions + latexOptions
|
||||
|
|
|
|||
Loading…
Reference in New Issue