how_we_wrote_a_textbook ===== Textbook ===== * http://tim.hibal.org/blog/how-we-wrote-a-textbook/ Algorithms for Optimization is filled with easy-to-understand **Julia** implementations of all algorithms. This is real code that actually runs. We run real code - these algorithms - to generate the many illustrations. All figures are either defined in the **LaTeX** document directly using **TikZ**, or come from TikZ code that is generated during compile time from Julia code blocks defined in the LaTeX document. More on this later. We made liberal use of the side margins to elaborate on concepts via side notes without interrupting flow. Figures can be placed in the margins, and all of our citations show up in the margins as well. This was inspired by **Edward Tufte**, the father of data visualization. * **tufte-latex** * https://edwardtufte.github.io/tufte-css/ css * https://ctan.org/pkg/tufte-latex?lang=en * https://tufte-latex.github.io/tufte-latex/ * https://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0000hB * **julia** * https://github.com/sisl/juliaplots.sty * **ptyhtontex** * https://github.com/gpoore/pythontex * **pygment** * https://pygments.org/ * https://github.com/sisl/pygments-julia We have a server that uses **git hooks** to listen for commits. Any time we push a change to master, the server updates its git repo and **compiles the full book** as well as each individual chapter into a PDF. We have our own **password-protected website** with URLs to these PDFs that we release to potential reviewers. Thus they always have access to the latest version of the book. We used the vc package and a bash script to automatically generate a footer on every page of the PDF containing the version number, so you always know what version you are looking at.