Add pdf version

This commit is contained in:
Michael Hohn
2023-11-20 12:22:24 -08:00
committed by =Michael Hohn
parent e52393de06
commit 1f08e3401e
4 changed files with 49 additions and 25 deletions

View File

@@ -1,2 +0,0 @@
# codeql-info
Informal collection of codeql material

7
README.org Normal file
View File

@@ -0,0 +1,7 @@
* codeql-info
Informal collection of codeql material.
The generated html does not render when browsing this repository. To browse the
html, clone this repository and start browsing locally from
=ql/docs/language/learn-ql/build.html-5f4acb8/codeql-overview/index.html=

Binary file not shown.

View File

@@ -96,38 +96,54 @@
# and re-build # and re-build
sphinx-build -b html . build.html sphinx-build -b html . build.html
# keep a copy # Keep a copy
cd ~/local/codeql-info/ql/docs/language/learn-ql/ cd ~/local/codeql-info/ql/docs/language/learn-ql/
cp -r ~/local/0ec126bc/ql/docs/codeql/build.html build.html-$(git rev-parse --short HEAD) cp -r ~/local/0ec126bc/ql/docs/codeql/build.html build.html-$(git rev-parse --short HEAD)
# View main index page # View main index page
open ~/local/codeql-info/ql/docs/language/learn-ql/build.html-$(git rev-parse --short HEAD)/codeql-overview/index.html open ~/local/codeql-info/ql/docs/language/learn-ql/build.html-$(git rev-parse --short HEAD)/codeql-overview/index.html
#* Build the PDF version #* Build the PDF version
cd ~/local/vmsync/ql/docs/language/learn-ql/ cd ~/local/0ec126bc/ql/docs/codeql/
sphinx-build -b latex . build.latex sphinx-build -b latex . build.latex
cd build.latex/ cd build.latex/
# Customize the latex source # fails:
# More depth for table of contents # make all
perl -i -p -e 's/\\setcounter\{tocdepth\}\{0\}/\\setcounter{tocdepth}{3}/g;' LearningCodeQL.tex
# Change the font:
# comment
# % \usepackage{times}
# and use
# \usepackage[bitstream-charter]{mathdesign}
# \renewcommand{\baselinestretch}{1.1}
# instead.
# For the 14pt version, add: pdflatex codeqldocumentation.tex
# \usepackage[fontsize=14]{scrextend}
# Run xelatex twice open codeqldocumentation.pdf
xelatex -shell-escape -interaction=nonstopmode LearningCodeQL.tex
xelatex -shell-escape -interaction=nonstopmode LearningCodeQL.tex
open LearningCodeQL.pdf # Keep a copy
cd ~/local/codeql-info/ql/docs/language/learn-ql/
dest=$HOME/local/codeql-info/ql/docs/language/learn-ql/build.latex-$(git rev-parse --short HEAD)
mkdir $dest
cd $dest
cp ~/local/0ec126bc/ql/docs/codeql/build.latex/codeqldocumentation.pdf .
# # Optional:
# # Customize the latex source
# # More depth for table of contents
# perl -i -p -e 's/\\setcounter\{tocdepth\}\{0\}/\\setcounter{tocdepth}{3}/g;' LearningCodeQL.tex
# # Change the font:
# # comment
# # % \usepackage{times}
# # and use
# # \usepackage[bitstream-charter]{mathdesign}
# # \renewcommand{\baselinestretch}{1.1}
# # instead.
# # For the 14pt version, add:
# # \usepackage[fontsize=14]{scrextend}
# # Run xelatex twice
# xelatex -shell-escape -interaction=nonstopmode LearningCodeQL.tex
# xelatex -shell-escape -interaction=nonstopmode LearningCodeQL.tex
# open LearningCodeQL.pdf
#+END_SRC #+END_SRC
For the QL language reference: For the QL language reference: