├── .github
├── texlive.packages
├── texlive.profile
└── workflows
│ └── publish.yml
├── .gitignore
├── .nojekyll
├── Gemfile
├── Gemfile.lock
├── README.md
├── _config.yml
├── _includes
├── custom-head.html
└── head.html
├── index.md
└── krater.png
/.github/texlive.packages:
--------------------------------------------------------------------------------
1 | latexmk
2 | dvisvgm
3 | commutative-diagrams
4 | standalone
5 | xypic
6 |
--------------------------------------------------------------------------------
/.github/texlive.profile:
--------------------------------------------------------------------------------
1 | # Reference: https://www.tug.org/texlive/doc/install-tl.html#PROFILES
2 |
3 | #=[ Scheme ]====================================================================
4 | # selected_scheme scheme-infraonly
5 | selected_scheme scheme-small
6 |
7 | #=[ Collections ]===============================================================
8 | # No collections.
9 |
10 | #=[ Paths ]=====================================================================
11 | # These are the expected defaults in portable mode
12 | # TEXDIR $TEXLIVE_INSTALL_PREFIX
13 | # TEXMFLOCAL $TEXLIVE_INSTALL_PREFIX/texmf-local
14 | # TEXMFSYSVAR $TEXLIVE_INSTALL_PREFIX/texmf-var
15 | # TEXMFSYSCONFIG $TEXLIVE_INSTALL_PREFIX/texmf-config
16 | # TEXMFVAR $TEXMFSYSVAR
17 | # TEXMFCONFIG $TEXMFSYSCONFIG
18 | # TEXMFHOME $TEXMFLOCAL
19 |
20 | #=[ Installer options ]=========================================================
21 | # NOTE: this has no effect, so we pass it from CLI as a flag
22 | # instopt_portable 1
23 |
24 | #=[ TLPDB options ]=============================================================
25 | tlpdbopt_install_docfiles 0
26 | tlpdbopt_install_srcfiles 0
27 | tlpdbopt_autobackup 0
28 | # tlpdbopt_sys_bin /usr/local/bin
29 |
30 | #=[ Platform options ]==========================================================
31 | # No platform options.
32 |
--------------------------------------------------------------------------------
/.github/workflows/publish.yml:
--------------------------------------------------------------------------------
1 | name: Publish
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | jobs:
9 | publish:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - name: Checkout repo
13 | uses: actions/checkout@v2
14 |
15 | - name: Install system dependencies
16 | run: sudo apt-get install -y ghostscript
17 | # jekyll-antex -> antex -> dvisvgm -> ghostscript
18 |
19 | - name: Setup Ruby
20 | uses: actions/setup-ruby@v1
21 | with:
22 | ruby-version: 2.7
23 |
24 | - name: Cache Ruby gems
25 | uses: actions/cache@v2
26 | with:
27 | path: vendor/bundle
28 | key: gems-${{ hashFiles('Gemfile.lock') }}
29 | restore-keys: gems-
30 |
31 | - name: Install Ruby gems
32 | run: |
33 | bundle config path vendor/bundle
34 | bundle install --jobs 4 --retry 3
35 |
36 | - name: Setup TeX Live
37 | uses: paolobrasolin/setup-texlive-action@v1.0.2
38 | with:
39 | packages-path: ${{ github.workspace }}/.github/texlive.packages
40 | profile-path: ${{ github.workspace }}/.github/texlive.profile
41 |
42 | - name: Debug
43 | run: dvisvgm -V1
44 |
45 | - name: Cache anTeX artifacts
46 | uses: actions/cache@v2
47 | with:
48 | path: .antex-cache
49 | key: antex-cache-${{ hashFiles('.github/texlive.packages', '.github/texlive.profile') }}
50 | restore-keys: antex-cache-
51 |
52 | - name: Build
53 | run: bundle exec jekyll build
54 |
55 | - name: Deploy to GitHub Pages
56 | uses: crazy-max/ghaction-github-pages@v2
57 | if: success()
58 | with:
59 | build_dir: _site
60 | jekyll: false
61 | env:
62 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | _site
2 | .antex-cache
3 |
--------------------------------------------------------------------------------
/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paolobrasolin/krater/41a775f9d1bca4099d494eadf411735d0602be3f/.nojekyll
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | ruby '2.7.5'
4 |
5 | group :jekyll_plugins do
6 | gem 'github-pages'
7 | gem 'jekyll-antex', '~> 0.6.0'
8 | end
9 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | activesupport (6.0.4.4)
5 | concurrent-ruby (~> 1.0, >= 1.0.2)
6 | i18n (>= 0.7, < 2)
7 | minitest (~> 5.1)
8 | tzinfo (~> 1.1)
9 | zeitwerk (~> 2.2, >= 2.2.2)
10 | addressable (2.8.0)
11 | public_suffix (>= 2.0.2, < 5.0)
12 | antex (0.1.3)
13 | liquid (>= 3, < 6)
14 | nokogiri (~> 1)
15 | coffee-script (2.4.1)
16 | coffee-script-source
17 | execjs
18 | coffee-script-source (1.11.1)
19 | colorator (1.1.0)
20 | commonmarker (0.17.13)
21 | ruby-enum (~> 0.5)
22 | concurrent-ruby (1.1.9)
23 | dnsruby (1.61.7)
24 | simpleidn (~> 0.1)
25 | em-websocket (0.5.3)
26 | eventmachine (>= 0.12.9)
27 | http_parser.rb (~> 0)
28 | ethon (0.15.0)
29 | ffi (>= 1.15.0)
30 | eventmachine (1.2.7)
31 | execjs (2.8.1)
32 | faraday (1.8.0)
33 | faraday-em_http (~> 1.0)
34 | faraday-em_synchrony (~> 1.0)
35 | faraday-excon (~> 1.1)
36 | faraday-httpclient (~> 1.0.1)
37 | faraday-net_http (~> 1.0)
38 | faraday-net_http_persistent (~> 1.1)
39 | faraday-patron (~> 1.0)
40 | faraday-rack (~> 1.0)
41 | multipart-post (>= 1.2, < 3)
42 | ruby2_keywords (>= 0.0.4)
43 | faraday-em_http (1.0.0)
44 | faraday-em_synchrony (1.0.0)
45 | faraday-excon (1.1.0)
46 | faraday-httpclient (1.0.1)
47 | faraday-net_http (1.0.1)
48 | faraday-net_http_persistent (1.2.0)
49 | faraday-patron (1.0.0)
50 | faraday-rack (1.0.0)
51 | ffi (1.15.4)
52 | forwardable-extended (2.6.0)
53 | gemoji (3.0.1)
54 | github-pages (223)
55 | github-pages-health-check (= 1.17.9)
56 | jekyll (= 3.9.0)
57 | jekyll-avatar (= 0.7.0)
58 | jekyll-coffeescript (= 1.1.1)
59 | jekyll-commonmark-ghpages (= 0.1.6)
60 | jekyll-default-layout (= 0.1.4)
61 | jekyll-feed (= 0.15.1)
62 | jekyll-gist (= 1.5.0)
63 | jekyll-github-metadata (= 2.13.0)
64 | jekyll-include-cache (= 0.2.1)
65 | jekyll-mentions (= 1.6.0)
66 | jekyll-optional-front-matter (= 0.3.2)
67 | jekyll-paginate (= 1.1.0)
68 | jekyll-readme-index (= 0.3.0)
69 | jekyll-redirect-from (= 0.16.0)
70 | jekyll-relative-links (= 0.6.1)
71 | jekyll-remote-theme (= 0.4.3)
72 | jekyll-sass-converter (= 1.5.2)
73 | jekyll-seo-tag (= 2.7.1)
74 | jekyll-sitemap (= 1.4.0)
75 | jekyll-swiss (= 1.0.0)
76 | jekyll-theme-architect (= 0.2.0)
77 | jekyll-theme-cayman (= 0.2.0)
78 | jekyll-theme-dinky (= 0.2.0)
79 | jekyll-theme-hacker (= 0.2.0)
80 | jekyll-theme-leap-day (= 0.2.0)
81 | jekyll-theme-merlot (= 0.2.0)
82 | jekyll-theme-midnight (= 0.2.0)
83 | jekyll-theme-minimal (= 0.2.0)
84 | jekyll-theme-modernist (= 0.2.0)
85 | jekyll-theme-primer (= 0.6.0)
86 | jekyll-theme-slate (= 0.2.0)
87 | jekyll-theme-tactile (= 0.2.0)
88 | jekyll-theme-time-machine (= 0.2.0)
89 | jekyll-titles-from-headings (= 0.5.3)
90 | jemoji (= 0.12.0)
91 | kramdown (= 2.3.1)
92 | kramdown-parser-gfm (= 1.1.0)
93 | liquid (= 4.0.3)
94 | mercenary (~> 0.3)
95 | minima (= 2.5.1)
96 | nokogiri (>= 1.12.5, < 2.0)
97 | rouge (= 3.26.0)
98 | terminal-table (~> 1.4)
99 | github-pages-health-check (1.17.9)
100 | addressable (~> 2.3)
101 | dnsruby (~> 1.60)
102 | octokit (~> 4.0)
103 | public_suffix (>= 3.0, < 5.0)
104 | typhoeus (~> 1.3)
105 | html-pipeline (2.14.0)
106 | activesupport (>= 2)
107 | nokogiri (>= 1.4)
108 | http_parser.rb (0.8.0)
109 | i18n (0.9.5)
110 | concurrent-ruby (~> 1.0)
111 | jekyll (3.9.0)
112 | addressable (~> 2.4)
113 | colorator (~> 1.0)
114 | em-websocket (~> 0.5)
115 | i18n (~> 0.7)
116 | jekyll-sass-converter (~> 1.0)
117 | jekyll-watch (~> 2.0)
118 | kramdown (>= 1.17, < 3)
119 | liquid (~> 4.0)
120 | mercenary (~> 0.3.3)
121 | pathutil (~> 0.9)
122 | rouge (>= 1.7, < 4)
123 | safe_yaml (~> 1.0)
124 | jekyll-antex (0.6.0)
125 | antex (~> 0.1)
126 | jekyll (~> 3.8)
127 | jekyll-avatar (0.7.0)
128 | jekyll (>= 3.0, < 5.0)
129 | jekyll-coffeescript (1.1.1)
130 | coffee-script (~> 2.2)
131 | coffee-script-source (~> 1.11.1)
132 | jekyll-commonmark (1.3.1)
133 | commonmarker (~> 0.14)
134 | jekyll (>= 3.7, < 5.0)
135 | jekyll-commonmark-ghpages (0.1.6)
136 | commonmarker (~> 0.17.6)
137 | jekyll-commonmark (~> 1.2)
138 | rouge (>= 2.0, < 4.0)
139 | jekyll-default-layout (0.1.4)
140 | jekyll (~> 3.0)
141 | jekyll-feed (0.15.1)
142 | jekyll (>= 3.7, < 5.0)
143 | jekyll-gist (1.5.0)
144 | octokit (~> 4.2)
145 | jekyll-github-metadata (2.13.0)
146 | jekyll (>= 3.4, < 5.0)
147 | octokit (~> 4.0, != 4.4.0)
148 | jekyll-include-cache (0.2.1)
149 | jekyll (>= 3.7, < 5.0)
150 | jekyll-mentions (1.6.0)
151 | html-pipeline (~> 2.3)
152 | jekyll (>= 3.7, < 5.0)
153 | jekyll-optional-front-matter (0.3.2)
154 | jekyll (>= 3.0, < 5.0)
155 | jekyll-paginate (1.1.0)
156 | jekyll-readme-index (0.3.0)
157 | jekyll (>= 3.0, < 5.0)
158 | jekyll-redirect-from (0.16.0)
159 | jekyll (>= 3.3, < 5.0)
160 | jekyll-relative-links (0.6.1)
161 | jekyll (>= 3.3, < 5.0)
162 | jekyll-remote-theme (0.4.3)
163 | addressable (~> 2.0)
164 | jekyll (>= 3.5, < 5.0)
165 | jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
166 | rubyzip (>= 1.3.0, < 3.0)
167 | jekyll-sass-converter (1.5.2)
168 | sass (~> 3.4)
169 | jekyll-seo-tag (2.7.1)
170 | jekyll (>= 3.8, < 5.0)
171 | jekyll-sitemap (1.4.0)
172 | jekyll (>= 3.7, < 5.0)
173 | jekyll-swiss (1.0.0)
174 | jekyll-theme-architect (0.2.0)
175 | jekyll (> 3.5, < 5.0)
176 | jekyll-seo-tag (~> 2.0)
177 | jekyll-theme-cayman (0.2.0)
178 | jekyll (> 3.5, < 5.0)
179 | jekyll-seo-tag (~> 2.0)
180 | jekyll-theme-dinky (0.2.0)
181 | jekyll (> 3.5, < 5.0)
182 | jekyll-seo-tag (~> 2.0)
183 | jekyll-theme-hacker (0.2.0)
184 | jekyll (> 3.5, < 5.0)
185 | jekyll-seo-tag (~> 2.0)
186 | jekyll-theme-leap-day (0.2.0)
187 | jekyll (> 3.5, < 5.0)
188 | jekyll-seo-tag (~> 2.0)
189 | jekyll-theme-merlot (0.2.0)
190 | jekyll (> 3.5, < 5.0)
191 | jekyll-seo-tag (~> 2.0)
192 | jekyll-theme-midnight (0.2.0)
193 | jekyll (> 3.5, < 5.0)
194 | jekyll-seo-tag (~> 2.0)
195 | jekyll-theme-minimal (0.2.0)
196 | jekyll (> 3.5, < 5.0)
197 | jekyll-seo-tag (~> 2.0)
198 | jekyll-theme-modernist (0.2.0)
199 | jekyll (> 3.5, < 5.0)
200 | jekyll-seo-tag (~> 2.0)
201 | jekyll-theme-primer (0.6.0)
202 | jekyll (> 3.5, < 5.0)
203 | jekyll-github-metadata (~> 2.9)
204 | jekyll-seo-tag (~> 2.0)
205 | jekyll-theme-slate (0.2.0)
206 | jekyll (> 3.5, < 5.0)
207 | jekyll-seo-tag (~> 2.0)
208 | jekyll-theme-tactile (0.2.0)
209 | jekyll (> 3.5, < 5.0)
210 | jekyll-seo-tag (~> 2.0)
211 | jekyll-theme-time-machine (0.2.0)
212 | jekyll (> 3.5, < 5.0)
213 | jekyll-seo-tag (~> 2.0)
214 | jekyll-titles-from-headings (0.5.3)
215 | jekyll (>= 3.3, < 5.0)
216 | jekyll-watch (2.2.1)
217 | listen (~> 3.0)
218 | jemoji (0.12.0)
219 | gemoji (~> 3.0)
220 | html-pipeline (~> 2.2)
221 | jekyll (>= 3.0, < 5.0)
222 | kramdown (2.3.1)
223 | rexml
224 | kramdown-parser-gfm (1.1.0)
225 | kramdown (~> 2.0)
226 | liquid (4.0.3)
227 | listen (3.7.0)
228 | rb-fsevent (~> 0.10, >= 0.10.3)
229 | rb-inotify (~> 0.9, >= 0.9.10)
230 | mercenary (0.3.6)
231 | mini_portile2 (2.6.1)
232 | minima (2.5.1)
233 | jekyll (>= 3.5, < 5.0)
234 | jekyll-feed (~> 0.9)
235 | jekyll-seo-tag (~> 2.1)
236 | minitest (5.15.0)
237 | multipart-post (2.1.1)
238 | nokogiri (1.12.5)
239 | mini_portile2 (~> 2.6.1)
240 | racc (~> 1.4)
241 | octokit (4.21.0)
242 | faraday (>= 0.9)
243 | sawyer (~> 0.8.0, >= 0.5.3)
244 | pathutil (0.16.2)
245 | forwardable-extended (~> 2.6)
246 | public_suffix (4.0.6)
247 | racc (1.6.0)
248 | rb-fsevent (0.11.0)
249 | rb-inotify (0.10.1)
250 | ffi (~> 1.0)
251 | rexml (3.2.5)
252 | rouge (3.26.0)
253 | ruby-enum (0.9.0)
254 | i18n
255 | ruby2_keywords (0.0.5)
256 | rubyzip (2.3.2)
257 | safe_yaml (1.0.5)
258 | sass (3.7.4)
259 | sass-listen (~> 4.0.0)
260 | sass-listen (4.0.0)
261 | rb-fsevent (~> 0.9, >= 0.9.4)
262 | rb-inotify (~> 0.9, >= 0.9.7)
263 | sawyer (0.8.2)
264 | addressable (>= 2.3.5)
265 | faraday (> 0.8, < 2.0)
266 | simpleidn (0.2.1)
267 | unf (~> 0.1.4)
268 | terminal-table (1.8.0)
269 | unicode-display_width (~> 1.1, >= 1.1.1)
270 | thread_safe (0.3.6)
271 | typhoeus (1.4.0)
272 | ethon (>= 0.9.0)
273 | tzinfo (1.2.9)
274 | thread_safe (~> 0.1)
275 | unf (0.1.4)
276 | unf_ext
277 | unf_ext (0.0.8)
278 | unicode-display_width (1.8.0)
279 | zeitwerk (2.5.3)
280 |
281 | PLATFORMS
282 | ruby
283 |
284 | DEPENDENCIES
285 | github-pages
286 | jekyll-antex (~> 0.6.0)
287 |
288 | RUBY VERSION
289 | ruby 2.7.5p203
290 |
291 | BUNDLED WITH
292 | 2.1.4
293 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # krater
2 |
3 |
4 |
5 | This is a template to start building math-rich websites effortlessly.
6 |
7 | Ancient Greeks placed large vessels named _kraters_ at the center of the room during a symposium.
8 | An elected _symposiarch_ would oversee the event by deciding the dilution of the wine in the krater and timing refills.
9 | Meanwhile, other _symposyasts_ drank, talked, and enjoyed any pleasure the evening offered.
10 |
11 | I hope this affords you to reproduce that, with ideas instead of wine.
12 |
13 | ## Getting started
14 |
15 | 1. Click [`Use this template`][krater-generate-url] here or at the top of this page.
16 | 2. Pick a name for your new repo and create it.
17 | 3. Edit `_config.yml` replacing `krater` with your repo name in `baseurl` and `paolobrasolin` with your user name in `url`.
18 | 4. Wait for the first build to become green; you can observe its status at `> Actions > Publish`.
19 | 5. Enable GitHub Pages on branch `gh-pages` and folder `/`; you can reach the configuration panel at `> Settings > Pages`.
20 |
21 | That's it! Your website is now visible at `https://.github.io//`
22 |
23 | [krater-generate-url]: https://github.com/paolobrasolin/krater/generate
24 |
25 | ## Usage
26 |
27 | This is a [Jekyll][jekyll-url] setup, so its excellent documentation fully applies.
28 |
29 | Schematically, this is what `krater` gives you:
30 |
31 | - A [KaTeX][katex-url] setup composed of:
32 | - a custom page header in `custom-head.html`
33 | - a default configuration at `katex` in `_config.yml`
34 | - An [AnTeX][antex-url] setup composed of:
35 | - the [`jekyll-antex`][jekyll-antex-url] gem in `Gemfile`
36 | - a default configuration at `antex` in `_config.yml`
37 | - A tweak to the `kramdown` configuration in `_config.yml` to let the previous components do their job.
38 | - A [GitHub Action][gha-url] workflow which compiles and publishes your website on [GitHub Pages][ghp-url] everytime something is pushed to the `main` branch.
39 |
40 | As long as you keep these pieces in place the math rendering machinery will work.
41 |
42 | Let's review some common tasks now.
43 |
44 | [jekyll-url]: https://jekyllrb.com/
45 | [katex-url]: https://katex.org/
46 | [antex-url]: https://github.com/paolobrasolin/antex/
47 | [jekyll-antex-url]: https://github.com/paolobrasolin/jekyll-antex/
48 | [gha-url]: https://github.com/features/actions
49 | [ghp-url]: https://pages.github.com/
50 |
51 | ### Running on your machine
52 |
53 | You will need a running LaTeX installation, including `latexmk`, `dvisvgm` and whatever engine and packages you plan on using.
54 | Chances are that if you're reading this you already have everything you need.
55 |
56 | You will need to [install Ruby][ruby-install-url].
57 |
58 | After that, you can simply
59 |
60 | ```bash
61 | # install dependencies
62 | bundle
63 | # run Jekyll
64 | bundle exec jekyll serve
65 | ```
66 |
67 | and your website will be available at `http://127.0.0.1:4000//`.
68 |
69 | [ruby-install-url]: https://www.ruby-lang.org/it/documentation/installation/
70 |
71 | ### Local deployment
72 |
73 | You might have reasons to build and deploy your website on your machine instead of using CI.
74 |
75 | That's ok, and also pretty simple.
76 |
77 | 1. Disable the CI by deleting the `.github` folder and its contents.
78 | 2. Checkout a worktree based on the `gh-pages` branch inside the `_site` folder:
79 | ```bash
80 | git worktree add -B gh-pages _site origin/gh-pages
81 | ```
82 |
83 | This makes it so that that the `gh-pages` branch (where the site must be deployed) will be directly accessible from the `_site` folder (where the site is built locally).
84 |
85 | To deploy you can now just `cd` into `_site`, add your files, commit and push!
86 |
87 | In case you want to undo this setup, this is the elegant way:
88 |
89 | ```bash
90 | git worktree remove -f _site
91 | ```
92 |
93 | ### Configuring CI
94 |
95 | The CI workflow uses [this action][setup-texlive-action-url] to setup TeX Live.
96 | If you require some less than common packages, just add them to the list in `.github/texlive.packages` and push to the repo.
97 | You can also change the scheme in `.github/texlive.profile` but I strongly advice against that if you're not sure what you're doing.
98 |
99 | [setup-texlive-action-url]: https://github.com/paolobrasolin/setup-texlive-action
100 |
101 | ### Kickstarting a blog/course/book
102 |
103 | If you're familiar with Jekyll, you can proceed as usual.
104 | If you're not, all common tutorials apply.
105 |
106 | If there's interest in some examples or a more specific template, HMU!
107 |
108 | ### Plugins customization
109 |
110 | `krater` installs [all Jekyll plugins available in GitHub Pages][ghp-jekyll-plugins-url] via the `github-pages` gem in the `Gemfile`.
111 | This will help you if you're used to the standard features of GitHub Pages.
112 |
113 | If you wish, you can be more selective and cherry pick only the plugins you need.
114 |
115 | You can also any other [Jekyll plugins][jekyll-plugins-url] you need: the build process runs in custom CI action and the usual limitations of GitHub Pages do not apply.
116 |
117 | [ghp-jekyll-plugins-url]: https://pages.github.com/versions/
118 | [jekyll-plugins-url]: https://jekyllrb.com/docs/plugins/
119 |
120 | ### Theme customization
121 |
122 | The default theme is [`minima`][minima-url] but you can easily change that as long as you ensure `custom-head.html` still gets included.
123 |
124 | [minima-url]: https://github.com/jekyll/minima
125 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | title: Krater
2 | email: paolo.brasolin+krater@gmail.com
3 | description: >-
4 | Krater is a template for math-intensive Jekyll websites.
5 | baseurl: &baseurl "/krater"
6 | url: "https://paolobrasolin.github.io/"
7 | twitter_username: paolobrasolin
8 | github_username: paolobrasolin
9 |
10 | theme: minima
11 |
12 | markdown: kramdown
13 | kramdown:
14 | input: GFM
15 | syntax_highlighter: rouge
16 | math_engine: null # disable math engine and let the client side use KaTeX for simple LaTeX
17 |
18 | katex:
19 | macros:
20 | "\\MyGlobalMacro": "\\LaTeX"
21 | delimiters:
22 | - { left: "$", right: "$", display: false }
23 | - { left: "$$", right: "$$", display: true }
24 | - { left: "\\(", right: "\\)", display: false }
25 | - { left: "\\[", right: "\\]", display: true }
26 |
27 | antex:
28 | url_path_prefix: *baseurl
29 | aliases: # disable most aliases and use server side AnTeX only for complex LaTeX
30 | display_math: false
31 | inline_math: false
32 | inline_macro: false
33 |
34 | plugins:
35 | - jekyll-feed
36 |
37 | exclude:
38 | # non default values:
39 | - README.md
40 | - krater.png
41 | # default values:
42 | - .sass-cache/
43 | - .jekyll-cache/
44 | - gemfiles/
45 | - Gemfile
46 | - Gemfile.lock
47 | - node_modules/
48 | - vendor/bundle/
49 | - vendor/cache/
50 | - vendor/gems/
51 | - vendor/ruby/
52 |
53 | include:
54 | - .nojekyll # tells GHP not to run Jekyll again on the build
55 |
--------------------------------------------------------------------------------
/_includes/custom-head.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
15 |
--------------------------------------------------------------------------------
/_includes/head.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | This is just a copy of Mimima's template including the change in https://github.com/jekyll/minima/blob/ee65e4c699671eae66021283b0a965e991d55dc5/_includes/head.html#L12
3 | {% endcomment %}
4 |
5 |
6 |
7 |
8 | {%- seo -%}
9 |
10 | {%- feed_meta -%}
11 | {%- if jekyll.environment == 'production' and site.google_analytics -%}
12 | {%- include google-analytics.html -%}
13 | {%- endif -%}
14 | {%- include custom-head.html -%}
15 |
16 |
--------------------------------------------------------------------------------
/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: home
3 | katex:
4 | macros:
5 | "\\MyLocalMacro": "\\LaTeX"
6 | antex:
7 | preamble: >-
8 | \usepackage{amsmath,amsfonts}
9 | \usepackage[all]{xy}
10 | ---
11 |
12 | **Welcome to `krater`!**
13 |
14 | This is a template for the static website generator [Jekyll][jekyll-url].
15 |
16 | Its purpose is setting up all the plumbing needed by a modern math-intensive website:
17 |
18 | - client side rendering of ordinary LaTeX with [KaTeX][katex-url]
19 | - server side rendering of **arbitrarily complex** LaTeX with [AnTeX][antex-url] via [`jekyll-antex`][jekyll-antex-url]
20 | - a nice automatic deploy running on [GitHub Actions][gha-url] to host the website on [GitHub Pages][ghp-url].
21 |
22 | You can get going in no time!
23 | All details are in the [readme][readme-url].
24 |
25 | [jekyll-url]: https://jekyllrb.com/
26 | [katex-url]: https://katex.org/
27 | [antex-url]: https://github.com/paolobrasolin/antex/
28 | [jekyll-antex-url]: https://github.com/paolobrasolin/jekyll-antex/
29 | [gha-url]: https://github.com/features/actions
30 | [ghp-url]: https://pages.github.com/
31 | [readme-url]: https://github.com/paolobrasolin/krater#readme
32 |
33 | The remainder of this page is a demo.
34 |
35 | A pretty formula:
36 |
37 | $$ F([n]) = \coprod*{i=1}^n F([1]) = \coprod*{i=1}^n X = [n] \otimes X $$
38 |
39 | A pretty diagram:
40 |
41 | {% tex classes: [antex, display] %}
42 | $
43 | \xymatrix{ A\ar[r]^f \ar[d]_f & B \ar[dl]|{\hole\mathrm{id}_B\hole} \ar[d]^g \\ C \ar[r]_g & D}
44 | \qquad
45 | \xymatrix{ A\ar[r]^f \ar[d]_{g\circ f} & B \ar[dl]|{\hole g\hole} \ar[d]^{h\circ g} \\ B \ar[r]_h & C}
46 | $
47 | {% endtex %}
48 |
--------------------------------------------------------------------------------
/krater.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paolobrasolin/krater/41a775f9d1bca4099d494eadf411735d0602be3f/krater.png
--------------------------------------------------------------------------------