updated latex section of the book

master
Kenton Hamaluik 4 years ago
parent 48c4fc9629
commit 7f8f36183d

@ -34,6 +34,7 @@ The current LaTeX template requires the following packages to be installed:
* [graphicx](https://ctan.org/pkg/graphicx)
* [float](https://ctan.org/pkg/float)
* [svg](https://ctan.org/pkg/svg)
* [menukeys](https://ctan.org/pkg/svg)
The template also requires [XeTeX](https://www.tug.org/xetex/) and the following fonts to be available on your system:
@ -43,12 +44,11 @@ The template also requires [XeTeX](https://www.tug.org/xetex/) and the following
Finally, in order to color the source code, you must have [Pygments](https://pygments.org/) installed and the `pygmentize` executable must be available on your path.
If you meet all these requirements, you can build the book using `xelatex`. Assuming you built the `book.tex` file in the `print` directory as above:
If you meet all these requirements, you can build the book using `xelatex` (better yet, use `latexmk`). Assuming you built the `book.tex` file in the `print` directory as above:
```sh
cd print
xelatex -shell-escape book.tex
xelatex -shell-escape book.tex
latexmk -xelatex -shell-escape book.tex
```
Note that the `-shell-escape` argument is required in order to get _Pygments_ to colour your source code, and the `xelatex` command is run twice in order to properly build the table of contents.

Binary file not shown.

Binary file not shown.

@ -12,7 +12,7 @@
<meta property="og:url" content="https://hamaluik.github.io/mkbook//01-command-line.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
</head>
<body>

@ -12,7 +12,7 @@
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown/01-commonmark.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
</head>
<body>

@ -12,7 +12,7 @@
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown/02-syntax-highlighting.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
</head>
<body>

@ -12,7 +12,7 @@
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown/03-plantuml-diagrams.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
</head>
<body>

@ -12,7 +12,7 @@
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown/04-katex-formulas.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
</head>
<body>

@ -12,7 +12,7 @@
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown/05-images.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
</head>
<body>

@ -12,7 +12,7 @@
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown/06-tables.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
</head>
<body>

@ -12,7 +12,7 @@
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown/07-task-lists.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
</head>
<body>

@ -12,7 +12,7 @@
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown/08-links.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
</head>
<body>

@ -12,7 +12,7 @@
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown/index.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
</head>
<body>

@ -12,7 +12,7 @@
<meta property="og:url" content="https://hamaluik.github.io/mkbook//03-frontmatter.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
</head>
<body>

@ -12,7 +12,7 @@
<meta property="og:url" content="https://hamaluik.github.io/mkbook//04-structure.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
</head>
<body>

@ -12,7 +12,7 @@
<meta property="og:url" content="https://hamaluik.github.io/mkbook//05-customization.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
</head>
<body>

@ -12,7 +12,7 @@
<meta property="og:url" content="https://hamaluik.github.io/mkbook//06-how-it-works.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
</head>
<body>

@ -12,7 +12,7 @@
<meta property="og:url" content="https://hamaluik.github.io/mkbook//07-latex-output.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
</head>
<body>
@ -137,6 +137,7 @@
<li><a href="https://ctan.org/pkg/graphicx">graphicx</a></li>
<li><a href="https://ctan.org/pkg/float">float</a></li>
<li><a href="https://ctan.org/pkg/svg">svg</a></li>
<li><a href="https://ctan.org/pkg/svg">menukeys</a></li>
</ul>
<p>The template also requires <a href="https://www.tug.org/xetex/">XeTeX</a> and the following fonts to be available on your system:</p>
<ul>
@ -145,11 +146,10 @@
<li><a href="https://github.com/adobe-fonts/source-code-pro">Source Code Pro</a></li>
</ul>
<p>Finally, in order to color the source code, you must have <a href="https://pygments.org/">Pygments</a> installed and the <code>pygmentize</code> executable must be available on your path.</p>
<p>If you meet all these requirements, you can build the book using <code>xelatex</code>. Assuming you built the <code>book.tex</code> file in the <code>print</code> directory as above:</p>
<p>If you meet all these requirements, you can build the book using <code>xelatex</code> (better yet, use <code>latexmk</code>). Assuming you built the <code>book.tex</code> file in the <code>print</code> directory as above:</p>
<pre style="background-color:#2d2d2d;">
<span style="color:#66cccc;">cd</span><span style="color:#d3d0c8;"> print
</span><span style="color:#6699cc;">xelatex</span><span style="color:#f2777a;"> -shell-escape</span><span style="color:#d3d0c8;"> book.tex
</span><span style="color:#6699cc;">xelatex</span><span style="color:#f2777a;"> -shell-escape</span><span style="color:#d3d0c8;"> book.tex
</span><span style="color:#6699cc;">latexmk</span><span style="color:#f2777a;"> -xelatex -shell-escape</span><span style="color:#d3d0c8;"> book.tex
</span></pre>
<p>Note that the <code>-shell-escape</code> argument is required in order to get <em>Pygments</em> to colour your source code, and the <code>xelatex</code> command is run twice in order to properly build the table of contents.</p>
<p>Note also that in the current template, the pages that are created are 5.5 inches by 8 inches. This is to facilitate booklet printing on North American letter paper. Feel free to change this in the generated <code>book.tex</code> file before compiling if you need to.</p>

Binary file not shown.

@ -15,14 +15,14 @@
&lt;p&gt;If youre not familiar with &lt;em&gt;mdbook&lt;&#x2f;em&gt;, &lt;em&gt;mkbook&lt;&#x2f;em&gt; is a tool to convert a collection of &lt;a href=&quot;https:&#x2f;&#x2f;commonmark.org&#x2f;&quot;&gt;Markdown&lt;&#x2f;a&gt; files into a static website &#x2f; book which can be published online. It was created to help me write documentation with minimum fuss while presenting it in an easy-to-consume manner.&lt;&#x2f;p&gt;
" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-12T22:19:33.053441804+00:00" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
</head>
<body class="toc">
<header>
<h1>The mkbook Book</h1>
<h2>by Kenton Hamaluik</h2>
<time datetime="2019-12-12T22:19:33.053441804+00:00">Dec 12, 2019</time>
<time datetime="2019-12-20T03:39:13.420786946+00:00">Dec 20, 2019</time>
</header>
<article>
<p><em>mkbook</em> is my simpler alternative to <a href="https://crates.io/crates/mdbook"><em>mdbook</em></a> which is a great tool, however I really dislike some of the decisions they took—such as relying on javascript for highlighting and navigation and including a lot of bells and whistles such as javascript-based search.</p>

Binary file not shown.
Loading…
Cancel
Save