diff --git a/.all-contributorsrc b/.all-contributorsrc
deleted file mode 100644
index bc6a9103f7ea..000000000000
--- a/.all-contributorsrc
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "files": [
- "README.md"
- ],
- "imageSize": 100,
- "commit": false,
- "contributorsPerLine": 7,
- "projectName": "al-folio",
- "projectOwner": "alshedivat",
- "repoType": "github",
- "repoHost": "https://github.com",
- "badgeTemplate": "[core_contributors]: https://img.shields.io/badge/core_contributors-<%= contributors.length %>-orange.svg 'Number of core contributors'",
- "contributorTemplate": "\">\" width=\"<%= options.imageSize %>px;\" alt=\"\"/> <%= contributor.name %>",
- "skipCi": true,
- "contributors": [
- {
- "login": "alshedivat",
- "name": "Maruan",
- "avatar_url": "https://github.com/avatars/u/2126561?v=4",
- "profile": "http://maruan.alshedivat.com",
- "contributions": [
- "design",
- "code"
- ]
- },
- {
- "login": "rohandebsarkar",
- "name": "Rohan Deb Sarkar",
- "avatar_url": "https://github.com/avatars/u/50144004?v=4",
- "profile": "http://rohandebsarkar.github.io",
- "contributions": [
- "code"
- ]
- },
- {
- "login": "pourmand1376",
- "name": "Amir Pourmand",
- "avatar_url": "https://github.com/avatars/u/32064808?v=4",
- "profile": "https://amirpourmand.ir",
- "contributions": [
- "code"
- ]
- }
- ]
-}
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index c78502f480c8..000000000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-# These are supported funding model platforms
-
-github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
-patreon: # Replace with a single Patreon username
-open_collective: # Replace with a single Open Collective username
-ko_fi: alshedivat
-tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
-community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
-liberapay: # Replace with a single Liberapay username
-issuehunt: # Replace with a single IssueHunt username
-otechie: # Replace with a single Otechie username
-custom: # ['https://www.buymeacoffee.com/TkFxuKo']
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index 511f585150ba..000000000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,38 +0,0 @@
----
-name: Bug report
-about: Create a report to help us improve
-title: ''
-labels: bug
-assignees: ''
-
----
-
-**Acknowledge the following**
-- [ ] I carefully read and followed the [Getting Started](https://github.com/alshedivat/al-folio#getting-started) guide.
-- [ ] I read through [FAQ](https://github.com/alshedivat/al-folio#faq) and searched through the [past issues](https://github.com/alshedivat/al-folio/issues), none of which addressed my issue.
-- [ ] The issue I am raising is a potential bug in al-folio and not just a usage question. [For usage questions, please post in the [Discussions](https://github.com/alshedivat/al-folio/discussions) instead of raising an issue.]
-
-**Describe the bug**
-A clear and concise description of what the bug is.
-
-**To Reproduce**
-Steps to reproduce the behavior:
-1. Go to '...'
-2. Click on '....'
-3. Scroll down to '....'
-4. See error
-
-**Expected behavior**
-A clear and concise description of what you expected to happen.
-
-**Screenshots**
-If applicable, add screenshots to help explain your problem.
-
-**System (please complete the following information):**
- - OS: [e.g. iOS]
- - Browser (and its version) [e.g. chrome, safari]
- - Jekyll version [e.g. 3.8.7]
-- Ruby version [e.g. 2.6.5]
-
-**Additional context**
-Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
deleted file mode 100644
index 11fc491ef1da..000000000000
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: Feature request
-about: Suggest an idea for this project
-title: ''
-labels: enhancement
-assignees: ''
-
----
-
-**Is your feature request related to a problem? Please describe.**
-A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
-
-**Describe the solution you'd like**
-A clear and concise description of what you want to happen.
-
-**Describe alternatives you've considered**
-A clear and concise description of any alternative solutions or features you've considered.
-
-**Additional context**
-Add any other context or screenshots about the feature request here.
diff --git a/.github/stale.yml b/.github/stale.yml
deleted file mode 100644
index 8ec2004d8caa..000000000000
--- a/.github/stale.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-# Number of days of inactivity before an issue becomes stale
-daysUntilStale: 60
-# Number of days of inactivity before a stale issue is closed
-daysUntilClose: 7
-# Issues with these labels will never be considered stale
-exemptLabels:
- - pinned
- - security
- - enhancement
-# Label to use when marking an issue as stale
-staleLabel: wontfix
-# Comment to post when marking an issue as stale. Set to `false` to disable
-markComment: >
- This issue has been automatically marked as stale because it has not had
- recent activity. It will be closed if no further activity occurs. Thank you
- for your contributions.
-# Comment to post when closing a stale issue. Set to `false` to disable
-closeComment: false
diff --git a/.github/workflows/deploy-docker-tag.yml b/.github/workflows/deploy-docker-tag.yml
deleted file mode 100644
index 3e6b6a3a169f..000000000000
--- a/.github/workflows/deploy-docker-tag.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-name: Docker Image CI (Upload Tag)
-
-on:
- push:
- tags:
- - 'v*'
-
-jobs:
-
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout
- uses: actions/checkout@v2
- - name: Buildx
- uses: docker/setup-buildx-action@v1
-
- -
- name: Docker meta
- id: meta
- uses: docker/metadata-action@v4
- with:
- images: amirpourmand/al-folio
-
- - name: Login
- uses: docker/login-action@v1
- with:
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_PASSWORD }}
-
- - name: Build and push
- uses: docker/build-push-action@v3
- with:
- context: .
- push: ${{ github.event_name != 'pull_request' }}
- tags: ${{ steps.meta.outputs.tags }}
- labels: ${{ steps.meta.outputs.labels }}
-
diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml
deleted file mode 100644
index b747dfc1d15c..000000000000
--- a/.github/workflows/deploy-image.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-name: Docker Image CI
-
-on:
- push:
- branches: [ master ]
-
-jobs:
-
- build:
-
- runs-on: ubuntu-latest
- if: github.repository_owner == 'alshedivat'
-
- steps:
- - name: Checkout
- uses: actions/checkout@v2
- - name: Buildx
- uses: docker/setup-buildx-action@v1
-
- - name: Login
- uses: docker/login-action@v1
- with:
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_PASSWORD }}
-
- - name: Build and push
- uses: docker/build-push-action@v2
- with:
- context: .
- push: true
- tags: amirpourmand/al-folio
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
deleted file mode 100644
index 0301f08040fc..000000000000
--- a/.github/workflows/deploy.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-name: deploy
-
-on:
- push:
- branches:
- - master
- - main
- pull_request:
- branches:
- - master
- - main
-
-jobs:
- deploy:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout code
- uses: actions/checkout@v3
- - name: Setup Ruby
- uses: ruby/setup-ruby@v1
- with:
- ruby-version: '3.0.2'
- bundler-cache: true
- - name: Install deps
- run: |
- npm install -g mermaid.cli
- - name: Setup deploy options
- id: setup
- run: |
- git config --global user.name "GitHub Action"
- git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- if [[ ${GITHUB_REF} = refs/pull/*/merge ]]; then # pull request
- echo "SRC_BRANCH=${GITHUB_HEAD_REF}" >> $GITHUB_OUTPUT
- echo "NO_PUSH=--no-push" >> $GITHUB_OUTPUT
- elif [[ ${GITHUB_REF} = refs/heads/* ]]; then # branch, e.g. master, source etc
- echo "SRC_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
- fi
- echo "DEPLOY_BRANCH=gh-pages" >> $GITHUB_OUTPUT
- - name: Deploy website
- run: yes | bash bin/deploy --verbose ${{ steps.setup.outputs.NO_PUSH }}
- --src ${{ steps.setup.outputs.SRC_BRANCH }}
- --deploy ${{ steps.setup.outputs.DEPLOY_BRANCH }}
diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 26d33521af10..000000000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index 8b5ae8e65ea3..000000000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-_config.yml
\ No newline at end of file
diff --git a/.idea/chwag.github.io.iml b/.idea/chwag.github.io.iml
deleted file mode 100644
index 74d515a027de..000000000000
--- a/.idea/chwag.github.io.iml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
deleted file mode 100644
index 105ce2da2d64..000000000000
--- a/.idea/inspectionProfiles/profiles_settings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index a183043a3164..000000000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 18739a540cc2..000000000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 35eb1ddfbbc0..000000000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/workspace-DESKTOP-IN3SK6R.xml b/.idea/workspace-DESKTOP-IN3SK6R.xml
deleted file mode 100644
index 958f54575a9d..000000000000
--- a/.idea/workspace-DESKTOP-IN3SK6R.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {
- "keyToString": {
- "RunOnceActivity.OpenProjectViewOnStart": "true",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "git-widget-placeholder": "master",
- "last_opened_file_path": "C:/Users/s2116812/OneDrive - University of Edinburgh/Documents/chwag.github.io",
- "settings.editor.selected.configurable": "com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable"
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1676201448074
-
-
- 1676201448074
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.nojekyll b/.nojekyll
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
deleted file mode 100644
index ca7e46543084..000000000000
--- a/.pre-commit-config.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-# See https://pre-commit.com for more information
-# See https://pre-commit.com/hooks.html for more hooks
-repos:
-- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.3.0
- hooks:
- - id: trailing-whitespace
- - id: end-of-file-fixer
- - id: check-yaml
- - id: check-added-large-files
diff --git a/404.html b/404.html
index 0da4ee0bb54a..e1c65f35128d 100644
--- a/404.html
+++ b/404.html
@@ -1,9 +1 @@
----
-layout: page
-permalink: /404.html
-title: "Page not found"
-description: "Looks like there has been a mistake. Nothing exists here."
-redirect: true
----
-
-
You will be redirected to the main page within 3 seconds. If not redirected, please click here.
+ Page not found | Biomedical Computation Group
Page not found
Looks like there has been a mistake. Nothing exists here.
You will be redirected to the main page within 3 seconds. If not redirected, please click here.
\ No newline at end of file
diff --git a/Gemfile b/Gemfile
deleted file mode 100644
index 0cb2a8af6fc5..000000000000
--- a/Gemfile
+++ /dev/null
@@ -1,23 +0,0 @@
-source 'https://rubygems.org'
-group :jekyll_plugins do
- gem 'jekyll'
- gem 'jekyll-archives'
- gem 'jekyll-diagrams'
- gem 'jekyll-email-protect'
- gem 'jekyll-feed'
- gem 'jekyll-imagemagick'
- gem 'jekyll-minifier'
- gem 'jekyll-paginate-v2'
- gem 'jekyll-scholar'
- gem 'jekyll-sitemap'
- gem 'jekyll-link-attributes'
- gem 'jekyll-twitter-plugin'
- gem 'jemoji'
- gem 'mini_racer'
- gem 'unicode_utils'
- gem 'webrick'
-end
-group :other_plugins do
- gem 'httparty'
- gem 'feedjira'
-end
diff --git a/_bibliography/WeisseGroup.bib b/_bibliography/WeisseGroup.bib
deleted file mode 100644
index fa96783e26eb..000000000000
--- a/_bibliography/WeisseGroup.bib
+++ /dev/null
@@ -1,487 +0,0 @@
-
-@inproceedings{weisse2006,
- title = {Adaptive approach for modelling variability in pharmacokinetics},
- isbn = {3-540-45767-4},
- abstract = {We present an improved adaptive approach for studying systems of ODEs affected by parameter variability and state space uncertainty. Our approach is based on a reformulation of the ODE problem as a transport problem of a probability density describing the evolution of the ensemble of systems in time. The resulting multidimensional problem is solved by representing the probability density w.r.t. an adaptively chosen Galerkin ansatz space of Gaussian densities. Due to our improvements in adaptivity control, we substantially improved the overall performance of the original algorithm and moreover inherited to the numerical scheme the theoretical property that the number of Gaussian distributions remains constant for linear ODEs. We illustrate the approach in application to dynamical systems describing the pharmacokinetics of drugs and xenobiotics, where variability in physiological parameters is important to be considered.},
- booktitle = {{CompLife}},
- author = {Weiße, Andrea Y and Horenko, Illia and Huisinga, Wilhelm},
- year = {2006},
- keywords = {weisse2006.png},
- pages = {194--204},
-}
-
-@incollection{perkins2012,
- title = {3. {Chance} and memory},
- isbn = {978-1-4398-2722-2},
- booktitle = {Quantitative {Biology}: {From} {Molecular} to {Cellular} {Systems}},
- publisher = {CRC Press},
- author = {Perkins, Theodore J and Weiße, Andrea Y and Swain, Peter S},
- year = {2012},
- keywords = {perkins2012.png},
- pages = {1--22},
-}
-
-@inproceedings{weisse2010b,
- title = {Global sensitivity analysis of {ODEs} via the solution of the associated {Fokker}-{Planck} equation},
- booktitle = {Proceedings of the 6th {Workshop} on {Computation} of {Biochemical} {Pathways} and {Genetic} {Networks}},
- publisher = {Logos Verlag Berlin},
- author = {Weiße, Andrea Y and Huisinga, Wilhelm},
- year = {2010},
- pages = {43--52},
-}
-
-@inproceedings{weisse2015b,
- title = {Quantifying host-circuit interactions with a mechanistic chassis model},
- booktitle = {Synthetic {Biology}: {Engineering}, {Evolution}, and {Design} {Conference} 2015, {SEED} 2015},
- publisher = {AIChE},
- author = {Weiße, Andrea},
- year = {2015},
- pages = {40--49},
-}
-
-@article{weisse2015a,
- title = {Mechanistic links between cellular trade-offs, gene expression, and growth},
- volume = {112},
- issn = {0027-8424, 1091-6490},
- url = {https://pnas.org/doi/full/10.1073/pnas.1416533112},
- doi = {10.1073/pnas.1416533112},
- abstract = {Significance
- Cells have finite resources. Committing resources to one task therefore reduces the amount of resources available to others. These trade-offs are often overlooked but potentially modify all cellular processes. Building a mathematical cell model that respects such trade-offs and describes the mechanisms of protein synthesis and how cells extract resources from their environment, we quantitatively recover the typical behavior of an individual growing cell and of a population of cells. As trade-offs are experienced by all cells and because growth largely determines cellular fitness, a predictive understanding of how biochemical processes affect others and affect growth is important for diverse applications, such as the use of microbes for biotechnology, the inhibition of antibiotic resistance, and the growth of cancers.
- ,
- Intracellular processes rarely work in isolation but continually interact with the rest of the cell. In microbes, for example, we now know that gene expression across the whole genome typically changes with growth rate. The mechanisms driving such global regulation, however, are not well understood. Here we consider three trade-offs that, because of limitations in levels of cellular energy, free ribosomes, and proteins, are faced by all living cells and we construct a mechanistic model that comprises these trade-offs. Our model couples gene expression with growth rate and growth rate with a growing population of cells. We show that the model recovers Monod’s law for the growth of microbes and two other empirical relationships connecting growth rate to the mass fraction of ribosomes. Further, we can explain growth-related effects in dosage compensation by paralogs and predict host–circuit interactions in synthetic biology. Simulating competitions between strains, we find that the regulation of metabolic pathways may have evolved not to match expression of enzymes to levels of extracellular substrates in changing environments but rather to balance a trade-off between exploiting one type of nutrient over another. Although coarse-grained, the trade-offs that the model embodies are fundamental, and, as such, our modeling framework has potentially wide application, including in both biotechnology and medicine.},
- language = {en},
- number = {9},
- urldate = {2023-05-25},
- journal = {Proceedings of the National Academy of Sciences},
- author = {Weiße, Andrea Y. and Oyarzún, Diego A. and Danos, Vincent and Swain, Peter S.},
- month = mar,
- year = {2015},
- keywords = {weisse2015a.png},
-}
-
-@inproceedings{hunt2023,
- address = {Baltimore, MD, USA},
- title = {Investigating the relationship between cue immersion and the strength of motor imagery during hand and wrist movements},
- isbn = {978-1-66546-292-1},
- url = {https://ieeexplore.ieee.org/document/10123823/},
- doi = {10.1109/NER52421.2023.10123823},
- abstract = {Virtual reality (VR) has gained popularity as a modality for motor imagery (MI) cue presentation for brain-computer interfaces due to the increased cortical activity caused by the immersiveness of the medium. In this work, we show that increased immersion alone is not sufficient to generate a greater cortical response during MI. We demonstrate this relationship through a MI protocol performed using three modalities of cue presentation, Image, Video, and VR, wherein intact limb participants were instructed to imagine the prompted hand and wrist movements as their own. Cue presentation using static images outperformed cue presentation using both traditional videos and immersive VR simulations (p {\textless} 0.05) in terms of percent change in relative alpha power. These results imply that providing more immersive cues may sometimes reduce the effectiveness of MI, possibly by inducing action observation rather than mental simulation.},
- urldate = {2023-05-25},
- booktitle = {2023 11th {International} {IEEE}/{EMBS} {Conference} on {Neural} {Engineering} ({NER})},
- publisher = {IEEE},
- author = {Hunt, Christopher L. and Ding, Keqin and Wagner, Christoph S. and Berberich, Nicolas and Yilmazer, Karahan and Gonzalez-Fernandez, Marlis and Cheng, Gordon and Thakor, Nitish V.},
- month = apr,
- year = {2023},
- keywords = {hunt2023.png},
- pages = {1--4},
-}
-
-@techreport{myall2021a,
- type = {preprint},
- title = {Characterising contact in disease outbreaks via a network model of spatial-temporal proximity},
- url = {http://medrxiv.org/lookup/doi/10.1101/2021.04.07.21254497},
- abstract = {ABSTRACT
- Contact tracing is a key tool in epidemiology to identify and control outbreaks of infectious diseases. Existing contact tracing methodologies produce contact maps of individuals based on a binary definition of contact which can be hampered by missing data and indirect contacts. Here, we present a Spatial-temporal Epidemiological Proximity (StEP) model to recover contact maps in disease outbreaks based on movement data. The StEP model accounts for imperfect data by considering probabilistic contacts between individuals based on spatial-temporal proximity of their movement trajectories, creating a robust movement network despite possible missing data and unseen transmission routes. Using real-world data we showcase the potential of StEP for contact tracing with outbreaks of multidrug-resistant bacteria and COVID-19 in a large hospital group in London, UK. In addition to the core structure of contacts that can be recovered using traditional methods of contact tracing, the StEP model reveals missing contacts that connect seemingly separate outbreaks. Comparison with genomic data further confirmed that these recovered contacts indeed improve characterisation of disease transmission and so highlights how the StEP framework can inform effective strategies of infection control and prevention.},
- language = {en},
- urldate = {2023-05-25},
- institution = {Epidemiology},
- author = {Myall, Ashleigh and Peach, Robert L. and Wan, Yu and Mookerjee, Siddharth and Jauneikaite, Elita and Bolt, Frankie and Price, James and Davies, Frances and Weiße, Andrea Y. and Holmes, Alison and Barahona, Mauricio},
- month = apr,
- year = {2021},
- keywords = {myall2021a.jpg},
-}
-
-@article{oyarzun2013,
- title = {Cumulative {Signal} {Transmission} in {Nonlinear} {Reaction}-{Diffusion} {Networks}},
- volume = {8},
- issn = {1932-6203},
- url = {https://dx.plos.org/10.1371/journal.pone.0062834},
- doi = {10.1371/journal.pone.0062834},
- language = {en},
- number = {5},
- urldate = {2023-05-25},
- journal = {PLoS ONE},
- author = {Oyarzún, Diego A. and López-Caamal, Fernando and García, Míriam R. and Middleton, Richard H. and Weiße, Andrea Y.},
- editor = {Kurths, Jürgen},
- month = may,
- year = {2013},
- keywords = {oyarzun2013.png},
- pages = {e62834},
-}
-
-@article{otter2020,
- title = {Detecting carbapenemase-producing {Enterobacterales} ({CPE}): an evaluation of an enhanced {CPE} infection control and screening programme in acute care},
- volume = {75},
- issn = {0305-7453, 1460-2091},
- shorttitle = {Detecting carbapenemase-producing {Enterobacterales} ({CPE})},
- url = {https://academic.oup.com/jac/article/75/9/2670/5849541},
- doi = {10.1093/jac/dkaa192},
- abstract = {Abstract
-
- Objectives
- The transmission of carbapenemase-producing Enterobacterales (CPE) poses an increasing healthcare challenge. A range of infection prevention activities, including screening and contact precautions, are recommended by international and national guidelines. We evaluated the introduction of an enhanced screening programme in a multisite London hospital group.
-
-
- Methods
- In June 2015, an enhanced CPE policy was launched in response to a local rise in CPE detection. This increased infection prevention measures beyond the national recommendations, with enhanced admission screening, contact tracing and environmental disinfection, improved laboratory protocols and staff/patient education. We report the CPE incidence and trends of CPE in screening and clinical cultures and the adoption of enhanced CPE screening. All non-duplicate CPE isolates identified between April 2014 and March 2018 were included.
-
-
- Results
- The number of CPE screens increased progressively, from 4530 in July 2015 to 10 589 in March 2018. CPE detection increased from 18 patients in July 2015 (1.0 per 1000 admissions) to 50 patients in March 2018 (2.7 per 1000 admissions). The proportion of CPE-positive screening cultures remained at approximately 0.4\% throughout, suggesting that whilst the CPE carriage rate was unchanged, carrier identification increased. Also, 123 patients were identified through positive CPE clinical cultures over the study period; there was no significant change in the rate of CPE from clinical cultures per 1000 admissions (P = 0.07).
-
-
- Conclusions
- Our findings suggest that whilst the enhanced screening programme identified a previously undetected reservoir of CPE colonization in our patient population, the rate of detection of CPE in clinical cultures did not increase.},
- language = {en},
- number = {9},
- urldate = {2023-05-25},
- journal = {Journal of Antimicrobial Chemotherapy},
- author = {Otter, Jonathan A and Mookerjee, Siddharth and Davies, Frances and Bolt, Frances and Dyakova, Eleonora and Shersing, Yeeshika and Boonyasiri, Adhiratha and Weiße, Andrea Y and Gilchrist, Mark and Galletly, Tracey J and Brannigan, Eimear T and Holmes, Alison H},
- month = sep,
- year = {2020},
- keywords = {otter2020.jpg},
- pages = {2670--2676},
-}
-
-@article{price2021,
- title = {Development and {Delivery} of a {Real}-time {Hospital}-onset {COVID}-19 {Surveillance} {System} {Using} {Network} {Analysis}},
- issn = {1058-4838, 1537-6591},
- url = {https://academic.oup.com/cid/advance-article/doi/10.1093/cid/ciaa892/5868508},
- doi = {10.1093/cid/ciaa892},
- abstract = {Abstract
-
- Background
- Understanding nosocomial acquisition, outbreaks, and transmission chains in real time will be fundamental to ensuring infection-prevention measures are effective in controlling coronavirus disease 2019 (COVID-19) in healthcare. We report the design and implementation of a hospital-onset COVID-19 infection (HOCI) surveillance system for an acute healthcare setting to target prevention interventions.
-
-
- Methods
- The study took place in a large teaching hospital group in London, United Kingdom. All patients tested for SARS-CoV-2 between 4 March and 14 April 2020 were included. Utilizing data routinely collected through electronic healthcare systems we developed a novel surveillance system for determining and reporting HOCI incidence and providing real-time network analysis. We provided daily reports on incidence and trends over time to support HOCI investigation and generated geotemporal reports using network analysis to interrogate admission pathways for common epidemiological links to infer transmission chains. By working with stakeholders the reports were co-designed for end users.
-
-
- Results
- Real-time surveillance reports revealed changing rates of HOCI throughout the course of the COVID-19 epidemic, key wards fueling probable transmission events, HOCIs overrepresented in particular specialties managing high-risk patients, the importance of integrating analysis of individual prior pathways, and the value of co-design in producing data visualization. Our surveillance system can effectively support national surveillance.
-
-
- Conclusions
- Through early analysis of the novel surveillance system we have provided a description of HOCI rates and trends over time using real-time shifting denominator data. We demonstrate the importance of including the analysis of patient pathways and networks in characterizing risk of transmission and targeting infection-control interventions.},
- language = {en},
- urldate = {2023-05-25},
- journal = {Clinical Infectious Diseases},
- author = {Price, James Richard and Mookerjee, Siddharth and Dyakova, Eleonora and Myall, Ashleigh and Leung, Wendy and Weiße, Andrea Yeong and Shersing, Yeeshika and Brannigan, Eimear Therese and Galletly, Tracey and Muir, David and Randell, Paul and Davies, Frances and Bolt, Frances and Barahona, Mauricio and Otter, Jonathan Ashley and Holmes, Alison H},
- month = jul,
- year = {2020},
- keywords = {price2021.jpg},
- pages = {ciaa892},
-}
-
-@article{weisse2011,
- title = {Error-controlled global sensitivity analysis of ordinary differential equations},
- volume = {230},
- issn = {00219991},
- url = {https://linkinghub.elsevier.com/retrieve/pii/S0021999111003159},
- doi = {10.1016/j.jcp.2011.05.011},
- language = {en},
- number = {17},
- urldate = {2023-05-25},
- journal = {Journal of Computational Physics},
- author = {Weiße, Andrea Y. and Huisinga, Wilhelm},
- month = jul,
- year = {2011},
- pages = {6824--6842},
-}
-
-@phdthesis{weisse2009,
- title = {Adaptive {Dichtepropagation} mit {Approximate} {ApproximationsGlobal} sensitivity analysis of ordinary differential equations: adaptive density propagation using approximate approximations},
- shorttitle = {Adaptive {Dichtepropagation} mit {Approximate} {ApproximationsGlobal} sensitivity analysis of ordinary differential equations},
- url = {https://refubium.fu-berlin.de/handle/fub188/9586},
- abstract = {Gewöhnliche Differentialgleichungen nehmen eine essentielle Stellung in der mathematischen Modellierung ein. Als Voraussetzung für zuverlässige Resultate muss sowohl in der Modellbildung als auch in der Analyse des Modells der Einfluss von Unsicherheit und/oder Variabilität in den Eingabedaten berücksichtigt werden. Mit Hilfe von Sensitivitätsanalyse wird untersucht, wie sich Unsicherheit und Variabilität durch die Modelldynamik ausbreiten und sich somit auf die Ausgabedaten auswirken. Globale Sensitivitätsanalyse untersucht die Auswirkungen von Abweichungen in den Eingabedaten, die sich möglicherweise über den gesamten Zustandsraum erstrecken. Zwei Probleme, die die globale Analyse erschweren, sind hohe Dimensionen und eine Kontrolle der Genauigkeit, mit der die Ausgabeunsicherheit geschätzt wird. Die meisten numerischen Ansätze konzentrieren sich derzeitig darauf, die Analyse von hoch- dimensionalen Problemen effizienter zu gestalten. Inwiefern die geschätzte Ausgabeunsicherheit dabei der tatsächlichen Ausgabeunsicherheit entspricht, bleibt jedoch meist unklar. In dieser Arbeit wird ein neuer Ansatz zur globalen Sensitivitätsanalyse von gewöhnlichen Differentialgleichungen vorgestellt. Hauptmerkmal dieses Ansatzes ist eine adaptive Schätzung der Ausgabeunsicherheit, bei der der Approximationsfehler automatisch kontrolliert wird. Dafür bedienen wir uns einer äquivalenten Formulierung des Problems, in der die zeitliche Entwicklung der Wahrscheinlichkeitsdichte der unsicheren Zustandsvariablen durch eine partielle Differentialgleichung beschrieben wird. Zur Lösung dieser Differentialgleichung kombinieren wir neue Ansätze aus Numerik und Approximationstheorie. Die hier vorgestellte Methode kontrolliert den Approximationsfehler, indem sowohl die Zeit- als auch die Ortsdiskretisierung angepasst wird. Wir verwenden ein Rothe-Verfahren, das einen angemessenen Kontext für die separate Schätzung von Zeit- und Ortsfehlern schafft, so dass die Diskretisierung entsprechend adaptiert werden kann. Für die Ortsdiskretisierung verwenden wir Approximate Approximations, eine neu eingeführte Approximationsmethode, die hier zum ersten Mal im Rahmen eines adaptiven Rothe-Verfahrens eingesetzt wird. Wir analysieren die Konvergenz des Verfahrens und untersuchen, wie sich Approximate Approximations für die adaptive Lösung der Ortsprobleme eignen. Wir zeigen, dass das Verfahren konvergiert. Darüber hinaus geben die theoretischen Resultate direkt Aufschluss darüber, wie eine effiziente Implementierung realisiert werden kann. Die Ergebnisse werden anhand von numerischen Beispielen illustriert, die auch zeigen, dass das Verfahren eine hohe Genauigkeit bei der Schätzung der Ausgabeunsicherheiten erzielt. Desweiteren erweisen sich Approximate Approximations als vorteilhaft innerhalb des adaptiven Verfahrens, da sowohl Fehlerschätzer als auch Approximationen hoher Ordnung zu vertretbaren Rechenzeiten verfügbar sind. Aktuelle Fortschritte in der Theorie von Approximate Approximations, beruhend auf einer gitterfreien Diskretisierung, lassen außerdem darauf hoffen, dass sich das in dieser Arbeit vorgestellte Konzept auch auf höher-dimensionale Probleme übertragen lässt.},
- urldate = {2023-05-25},
- school = {Freie Universität Berlin},
- author = {Weiße, Andrea Yeong},
- collaborator = {Universitätsbibliothek Der FU Berlin and Universitätsbibliothek Der FU Berlin},
- year = {2009},
- keywords = {weisse2009.png},
-}
-
-@article{nikolados2019,
- title = {Growth {Defects} and {Loss}-of-{Function} in {Synthetic} {Gene} {Circuits}},
- volume = {8},
- issn = {2161-5063, 2161-5063},
- url = {https://pubs.acs.org/doi/10.1021/acssynbio.8b00531},
- doi = {10.1021/acssynbio.8b00531},
- language = {en},
- number = {6},
- urldate = {2023-05-25},
- journal = {ACS Synthetic Biology},
- author = {Nikolados, Evangelos-Marios and Weiße, Andrea Y. and Ceroni, Francesca and Oyarzún, Diego A.},
- month = jun,
- year = {2019},
- keywords = {nikolados2019.jpg},
- pages = {1231--1240},
-}
-
-@article{myall2022b,
- title = {Improved contact tracing using network analysis and spatial-temporal proximity},
- volume = {116},
- issn = {12019712},
- url = {https://linkinghub.elsevier.com/retrieve/pii/S1201971221009395},
- doi = {10.1016/j.ijid.2021.12.047},
- language = {en},
- urldate = {2023-05-25},
- journal = {International Journal of Infectious Diseases},
- author = {Myall, A. and Peach, R. and Wan, Y. and Mookerjee, S. and Jauneikaite, E. and Bolt, F. and Price, J. and Davies, F. and Weisse, A. and Holmes, A.H. and Barahona, M.},
- month = mar,
- year = {2022},
- pages = {S20},
-}
-
-@article{ming2021,
- title = {Informing antimicrobial management in the context of {COVID}-19: understanding the longitudinal dynamics of {C}-reactive protein and procalcitonin},
- volume = {21},
- issn = {1471-2334},
- shorttitle = {Informing antimicrobial management in the context of {COVID}-19},
- url = {https://bmcinfectdis.biomedcentral.com/articles/10.1186/s12879-021-06621-7},
- doi = {10.1186/s12879-021-06621-7},
- abstract = {Abstract
-
- Background
- To characterise the longitudinal dynamics of C-reactive protein (CRP) and Procalcitonin (PCT) in a cohort of hospitalised patients with COVID-19 and support antimicrobial decision-making.
-
-
- Methods
- Longitudinal CRP and PCT concentrations and trajectories of 237 hospitalised patients with COVID-19 were modelled. The dataset comprised of 2,021 data points for CRP and 284 points for PCT. Pairwise comparisons were performed between: (i) those with or without significant bacterial growth from cultures, and (ii) those who survived or died in hospital.
-
-
- Results
- CRP concentrations were higher over time in COVID-19 patients with positive microbiology (day 9: 236 vs 123 mg/L, p {\textless} 0.0001) and in those who died (day 8: 226 vs 152 mg/L, p {\textless} 0.0001) but only after day 7 of COVID-related symptom onset. Failure for CRP to reduce in the first week of hospital admission was associated with significantly higher odds of death. PCT concentrations were higher in patients with COVID-19 and positive microbiology or in those who died, although these differences were not statistically significant.
-
-
- Conclusions
- Both the absolute CRP concentration and the trajectory during the first week of hospital admission are important factors predicting microbiology culture positivity and outcome in patients hospitalised with COVID-19. Further work is needed to describe the role of PCT for co-infection. Understanding relationships of these biomarkers can support development of risk models and inform optimal antimicrobial strategies.},
- language = {en},
- number = {1},
- urldate = {2023-05-25},
- journal = {BMC Infectious Diseases},
- author = {Ming, Damien K. and Myall, Ashleigh C. and Hernandez, Bernard and Weiße, Andrea Y. and Peach, Robert L. and Barahona, Mauricio and Rawson, Timothy M. and Holmes, Alison H.},
- month = dec,
- year = {2021},
- keywords = {ming2021.jpg},
- pages = {932},
-}
-
-@techreport{boonyasiri2021,
- type = {preprint},
- title = {Integrated patient network and genomic plasmid analysis reveal a regional, multi-species outbreak of carbapenemase-producing {Enterobacterales} carrying both \textit{bla} $_{\textrm{{IMP}}}$ and \textit{mcr-9} genes},
- url = {http://medrxiv.org/lookup/doi/10.1101/2021.10.28.21265436},
- abstract = {Abstract
- The incidence of carbapenemase-producing Enterobacterales (CPE) is rising globally, yet Imipenemase (IMP) carbapenemases remain relatively rare. This study describes an investigation of the emergence of IMP-encoding CPE amongst diverse Enterobacterales species between 2016 and 2019 in patients across a London regional hospital network.
-
- A network analysis approach to patient pathways, using routinely collected electronic health records, identified previously unrecognised contacts between patients who were IMP CPE positive on screening, implying potential bacterial transmission events. Whole genome sequencing of 85 Enterobacterales isolates from these patients revealed that 86\% (73/85) were diverse species (predominantly
- Klebsiella
- spp,
- Enterobacter
- spp,
- E. coli
- ) and harboured an IncHI2 plasmid, which carried both
- bla
- IMP
- and the putative mobile colistin resistance gene
- mcr-9
- . Detailed phylogenetic analysis identified two distinct IncHI2 plasmid lineages, A and B, both of which showed significant association with patient movements between four hospital sites and across medical specialities.
-
-
- Combined, our patient network and plasmid analyses demonstrate an interspecies, plasmid-mediated outbreak of
- bla
- IMP
- CPE, which remained unidentified during standard microbiology and infection control investigations. With whole genome sequencing (WGS) technologies and large-data incorporation, the outbreak investigation approach proposed here provides a framework for real-time identification of key factors causing pathogen spread. Analysing outbreaks at the plasmid level reveals that resistance may be wider spread than suspected, allowing more targetted interventions to stop the transmission of resistance within hospital networks.},
- language = {en},
- urldate = {2023-05-25},
- institution = {Infectious Diseases (except HIV/AIDS)},
- author = {Boonyasiri, Adhiratha and Myall, Ashleigh C. and Wan, Yu and Bolt, Frances and Ledda, Alice and Mookerjee, Siddharth and Weiße, Andrea Y. and Turton, Jane F. and Abbas, Hala and Prakapaite, Ruta and Sabnis, Akshay and Abdolrasouli, Alireza and Malpartida-Cardenas, Kenny and Miglietta, Luca and Donaldson, Hugo and Gilchrist, Mark and Hopkins, Katie L. and Ellington, Matthew J and Otter, Jonathan A. and Larrouy-Maumus, Gerald and Edwards, Andrew M. and Rodriguez-Manzano, Jesus and Didelot, Xavier and Barahona, Mauricio and Holmes, Alison H. and Jauneikaite, Elita and Davies, Frances},
- month = oct,
- year = {2021},
- keywords = {boonyasiri2021.jpg},
-}
-
-@article{myall2021b,
- title = {Network memory in the movement of hospital patients carrying antimicrobial-resistant bacteria},
- volume = {6},
- issn = {2364-8228},
- url = {https://appliednetsci.springeropen.com/articles/10.1007/s41109-021-00376-5},
- doi = {10.1007/s41109-021-00376-5},
- abstract = {Abstract
- Hospitals constitute highly interconnected systems that bring into contact an abundance of infectious pathogens and susceptible individuals, thus making infection outbreaks both common and challenging. In recent years, there has been a sharp incidence of antimicrobial-resistance amongst healthcare-associated infections, a situation now considered endemic in many countries. Here we present network-based analyses of a data set capturing the movement of patients harbouring antibiotic-resistant bacteria across three large London hospitals. We show that there are substantial memory effects in the movement of hospital patients colonised with antibiotic-resistant bacteria. Such memory effects break first-order Markovian transitive assumptions and substantially alter the conclusions from the analysis, specifically on node rankings and the evolution of diffusive processes. We capture variable length memory effects by constructing a lumped-state memory network, which we then use to identify individually import wards and overlapping communities of wards. We find these wards align closely to known hotspots of transmission and commonly followed pathways patients. Our framework provides a means to focus infection control efforts and cohort outbreaks of healthcare-associated infections.},
- language = {en},
- number = {1},
- urldate = {2023-05-25},
- journal = {Applied Network Science},
- author = {Myall, Ashleigh C. and Peach, Robert L. and Weiße, Andrea Y. and Mookerjee, Siddharth and Davies, Frances and Holmes, Alison and Barahona, Mauricio},
- month = dec,
- year = {2021},
- keywords = {myall2021b.jpg},
- pages = {34},
-}
-
-@incollection{nikolados2021,
- address = {New York, NY},
- title = {Prediction of {Cellular} {Burden} with {Host}–{Circuit} {Models}},
- volume = {2229},
- isbn = {978-1-07-161031-2 978-1-07-161032-9},
- url = {https://link.springer.com/10.1007/978-1-0716-1032-9_13},
- language = {en},
- urldate = {2023-05-25},
- booktitle = {Synthetic {Gene} {Circuits}},
- publisher = {Springer US},
- author = {Nikolados, Evangelos-Marios and Weiße, Andrea Y. and Oyarzún, Diego A.},
- editor = {Menolascina, Filippo},
- year = {2021},
- keywords = {nikolados2021.jpg},
- pages = {267--291},
-}
-
-@article{myall2022a,
- title = {Prediction of hospital-onset {COVID}-19 using networks of patient contact: an observational study},
- volume = {116},
- issn = {12019712},
- shorttitle = {Prediction of hospital-onset {COVID}-19 using networks of patient contact},
- url = {https://linkinghub.elsevier.com/retrieve/pii/S1201971221011504},
- doi = {10.1016/j.ijid.2021.12.258},
- language = {en},
- urldate = {2023-05-25},
- journal = {International Journal of Infectious Diseases},
- author = {Myall, A. and Price, J. and Peach, R. and Abbas, M. and Mookerjee, S. and Ahmad, I. and Ming, D. and Zhu, N.J. and Ramzan, F. and Weisse, A. and Holmes, A.H. and Barahona, M.},
- month = mar,
- year = {2022},
- pages = {S109--S110},
-}
-
-@article{weisse2010a,
- title = {Quantifying uncertainty, variability and likelihood for ordinary differential equation models},
- volume = {4},
- issn = {1752-0509},
- url = {https://bmcsystbiol.biomedcentral.com/articles/10.1186/1752-0509-4-144},
- doi = {10.1186/1752-0509-4-144},
- language = {en},
- number = {1},
- urldate = {2023-05-25},
- journal = {BMC Systems Biology},
- author = {Weiße, Andrea Y and Middleton, Richard H and Huisinga, Wilhelm},
- month = dec,
- year = {2010},
- keywords = {weisse2010a.png},
- pages = {144},
-}
-
-@article{karwacki-neisius2013,
- title = {Reduced {Oct4} {Expression} {Directs} a {Robust} {Pluripotent} {State} with {Distinct} {Signaling} {Activity} and {Increased} {Enhancer} {Occupancy} by {Oct4} and {Nanog}},
- volume = {12},
- issn = {19345909},
- url = {https://linkinghub.elsevier.com/retrieve/pii/S1934590913001598},
- doi = {10.1016/j.stem.2013.04.023},
- language = {en},
- number = {5},
- urldate = {2023-05-25},
- journal = {Cell Stem Cell},
- author = {Karwacki-Neisius, Violetta and Göke, Jonathan and Osorno, Rodrigo and Halbritter, Florian and Ng, Jia Hui and Weiße, Andrea Y. and Wong, Frederick C.K. and Gagliardi, Alessia and Mullin, Nicholas P. and Festuccia, Nicola and Colby, Douglas and Tomlinson, Simon R. and Ng, Huck-Hui and Chambers, Ian},
- month = may,
- year = {2013},
- keywords = {karwacki-neisius2013.jpg},
- pages = {531--545},
-}
-
-@article{veron2009,
- title = {Retention of gene products in syncytial spermatids promotes non-{Mendelian} inheritance as revealed by the \textit{t complex responder}},
- volume = {23},
- issn = {0890-9369, 1549-5477},
- url = {http://genesdev.cshlp.org/lookup/doi/10.1101/gad.553009},
- doi = {10.1101/gad.553009},
- abstract = {The
- t complex responder
- (
- Tcr
- ) encoded by the mouse
- t
- haplotype is able to cause phenotypic differences between
- t
- and + sperm derived from
- t
- /+ males, leading to non-Mendelian inheritance. This capability of
- Tcr
- contradicts the concept of phenotypic equivalence proposed for sperm cells, which develop in a syncytium and actively share gene products. By analyzing a
- Tcr
- minigene in hemizygous transgenic mice, we show that
- Tcr
- gene products are post-meiotically expressed and are retained in the haploid sperm cells. The wild-type allele of
- Tcr
- ,
- sperm motility kinase-1
- (
- Smok1
- ), behaves in the same manner, suggesting that
- Tcr
- /
- Smok
- reveal a common mechanism prone to evolve non-Mendelian inheritance in mammals.},
- language = {en},
- number = {23},
- urldate = {2023-05-25},
- journal = {Genes \& Development},
- author = {Véron, Nathalie and Bauer, Hermann and Weiße, Andrea Y. and Lüder, Gerhild and Werber, Martin and Herrmann, Bernhard G.},
- month = dec,
- year = {2009},
- keywords = {veron2009.jpg},
- pages = {2705--2710},
-}
-
-@article{weisse2016,
- title = {Signaling {Tug}-of-{War} {Delivers} the {Whole} {Message}},
- volume = {3},
- issn = {24054712},
- url = {https://linkinghub.elsevier.com/retrieve/pii/S2405471216303672},
- doi = {10.1016/j.cels.2016.11.003},
- language = {en},
- number = {5},
- urldate = {2023-05-25},
- journal = {Cell Systems},
- author = {Weiße, Andrea Y. and Mannan, Ahmad A. and Oyarzún, Diego A.},
- month = nov,
- year = {2016},
- keywords = {weisse2016.jpg},
- pages = {414--416},
-}
-
-@article{thomas2018,
- title = {Sources, propagation and consequences of stochasticity in cellular growth},
- volume = {9},
- issn = {2041-1723},
- url = {https://www.nature.com/articles/s41467-018-06912-9},
- doi = {10.1038/s41467-018-06912-9},
- abstract = {Abstract
- Growth impacts a range of phenotypic responses. Identifying the sources of growth variation and their propagation across the cellular machinery can thus unravel mechanisms that underpin cell decisions. We present a stochastic cell model linking gene expression, metabolism and replication to predict growth dynamics in single bacterial cells. Alongside we provide a theory to analyse stochastic chemical reactions coupled with cell divisions, enabling efficient parameter estimation, sensitivity analysis and hypothesis testing. The cell model recovers population-averaged data on growth-dependence of bacterial physiology and how growth variations in single cells change across conditions. We identify processes responsible for this variation and reconstruct the propagation of initial fluctuations to growth and other processes. Finally, we study drug-nutrient interactions and find that antibiotics can both enhance and suppress growth heterogeneity. Our results provide a predictive framework to integrate heterogeneous data and draw testable predictions with implications for antibiotic tolerance, evolutionary and synthetic biology.},
- language = {en},
- number = {1},
- urldate = {2023-05-25},
- journal = {Nature Communications},
- author = {Thomas, Philipp and Terradot, Guillaume and Danos, Vincent and Weiße, Andrea Y.},
- month = oct,
- year = {2018},
- keywords = {thomas2018.png},
- pages = {4528},
-}
-
-@article{terradot2018,
- title = {Survival of the {Fattest}: {Evolutionary} {Trade}-offs in {Cellular} {Resource} {Storage}},
- volume = {335},
- issn = {15710661},
- shorttitle = {Survival of the {Fattest}},
- url = {https://linkinghub.elsevier.com/retrieve/pii/S1571066118300136},
- doi = {10.1016/j.entcs.2018.03.010},
- language = {en},
- urldate = {2023-05-25},
- journal = {Electronic Notes in Theoretical Computer Science},
- author = {Terradot, Guillaume and Beica, Andreea and Weiße, Andrea and Danos, Vincent},
- month = apr,
- year = {2018},
- keywords = {terradot2018.png},
- pages = {91--112},
-}
diff --git a/_bibliography/addPreview.py b/_bibliography/addPreview.py
deleted file mode 100644
index b5e38da9d002..000000000000
--- a/_bibliography/addPreview.py
+++ /dev/null
@@ -1,20 +0,0 @@
-from pybtex.database import parse_file, BibliographyData, Entry
-from pybtex.database.input.bibtex import Parser
-
-nuParser = Parser()
-bib_data = parse_file('WeisseGroup.bib')
-
-for pprKey in bib_data.entries:
- print(pprKey)
- ppr = bib_data.entries[pprKey]
-
- fieldsDict = dict(ppr.fields)
- if "abstract" in fieldsDict.keys():
- fieldsDict.pop('abstract')
- if "keywords" in fieldsDict.keys():
- fieldsDict['preview'] = fieldsDict['keywords']
- fieldsDict.pop('keywords')
- nuEntry = Entry(ppr.type, fields=fieldsDict, persons=ppr.persons)
- nuParser.data.add_entry(pprKey, nuEntry)
-
-nuParser.data.to_file('papers.bib', bib_format='bibtex')
diff --git a/_bibliography/papers.bib b/_bibliography/papers.bib
deleted file mode 100644
index 30edfb007098..000000000000
--- a/_bibliography/papers.bib
+++ /dev/null
@@ -1,377 +0,0 @@
-@inproceedings{weisse2006,
- author = "Weiße, Andrea Y and Horenko, Illia and Huisinga, Wilhelm",
- title = "Adaptive approach for modelling variability in pharmacokinetics",
- isbn = "3-540-45767-4",
- booktitle = "{CompLife}",
- year = "2006",
- pages = "194--204",
- preview = "weisse2006.png"
-}
-
-@incollection{perkins2012,
- author = "Perkins, Theodore J and Weiße, Andrea Y and Swain, Peter S",
- title = "3. {Chance} and memory",
- isbn = "978-1-4398-2722-2",
- booktitle = "Quantitative {Biology}: {From} {Molecular} to {Cellular} {Systems}",
- publisher = "CRC Press",
- year = "2012",
- pages = "1--22",
- preview = "perkins2012.png"
-}
-
-@inproceedings{weisse2010b,
- author = "Weiße, Andrea Y and Huisinga, Wilhelm",
- title = "Global sensitivity analysis of {ODEs} via the solution of the associated {Fokker}-{Planck} equation",
- booktitle = "Proceedings of the 6th {Workshop} on {Computation} of {Biochemical} {Pathways} and {Genetic} {Networks}",
- publisher = "Logos Verlag Berlin",
- year = "2010",
- pages = "43--52"
-}
-
-@inproceedings{weisse2015b,
- author = "Weiße, Andrea",
- title = "Quantifying host-circuit interactions with a mechanistic chassis model",
- booktitle = "Synthetic {Biology}: {Engineering}, {Evolution}, and {Design} {Conference} 2015, {SEED} 2015",
- publisher = "AIChE",
- year = "2015",
- pages = "40--49"
-}
-
-@article{weisse2015a,
- author = "Weiße, Andrea Y. and Oyarzún, Diego A. and Danos, Vincent and Swain, Peter S.",
- title = "Mechanistic links between cellular trade-offs, gene expression, and growth",
- volume = "112",
- issn = "0027-8424, 1091-6490",
- url = "https://pnas.org/doi/full/10.1073/pnas.1416533112",
- doi = "10.1073/pnas.1416533112",
- language = "en",
- number = "9",
- urldate = "2023-05-25",
- journal = "Proceedings of the National Academy of Sciences",
- month = "March",
- year = "2015",
- preview = "weisse2015a.png"
-}
-
-@inproceedings{hunt2023,
- author = "Hunt, Christopher L. and Ding, Keqin and Wagner, Christoph S. and Berberich, Nicolas and Yilmazer, Karahan and Gonzalez-Fernandez, Marlis and Cheng, Gordon and Thakor, Nitish V.",
- address = "Baltimore, MD, USA",
- title = "Investigating the relationship between cue immersion and the strength of motor imagery during hand and wrist movements",
- isbn = "978-1-66546-292-1",
- url = "https://ieeexplore.ieee.org/document/10123823/",
- doi = "10.1109/NER52421.2023.10123823",
- urldate = "2023-05-25",
- booktitle = "2023 11th {International} {IEEE}/{EMBS} {Conference} on {Neural} {Engineering} ({NER})",
- publisher = "IEEE",
- month = "April",
- year = "2023",
- pages = "1--4",
- preview = "hunt2023.png"
-}
-
-@techreport{myall2021a,
- author = "Myall, Ashleigh and Peach, Robert L. and Wan, Yu and Mookerjee, Siddharth and Jauneikaite, Elita and Bolt, Frankie and Price, James and Davies, Frances and Weiße, Andrea Y. and Holmes, Alison and Barahona, Mauricio",
- type = "preprint",
- title = "Characterising contact in disease outbreaks via a network model of spatial-temporal proximity",
- url = "http://medrxiv.org/lookup/doi/10.1101/2021.04.07.21254497",
- language = "en",
- urldate = "2023-05-25",
- institution = "Epidemiology",
- month = "April",
- year = "2021",
- preview = "myall2021a.jpg"
-}
-
-@article{oyarzun2013,
- author = "Oyarzún, Diego A. and López-Caamal, Fernando and García, Míriam R. and Middleton, Richard H. and Weiße, Andrea Y.",
- editor = "Kurths, Jürgen",
- title = "Cumulative {Signal} {Transmission} in {Nonlinear} {Reaction}-{Diffusion} {Networks}",
- volume = "8",
- issn = "1932-6203",
- url = "https://dx.plos.org/10.1371/journal.pone.0062834",
- doi = "10.1371/journal.pone.0062834",
- language = "en",
- number = "5",
- urldate = "2023-05-25",
- journal = "PLoS ONE",
- month = "May",
- year = "2013",
- pages = "e62834",
- preview = "oyarzun2013.png"
-}
-
-@article{otter2020,
- author = "Otter, Jonathan A and Mookerjee, Siddharth and Davies, Frances and Bolt, Frances and Dyakova, Eleonora and Shersing, Yeeshika and Boonyasiri, Adhiratha and Weiße, Andrea Y and Gilchrist, Mark and Galletly, Tracey J and Brannigan, Eimear T and Holmes, Alison H",
- title = "Detecting carbapenemase-producing {Enterobacterales} ({CPE}): an evaluation of an enhanced {CPE} infection control and screening programme in acute care",
- volume = "75",
- issn = "0305-7453, 1460-2091",
- shorttitle = "Detecting carbapenemase-producing {Enterobacterales} ({CPE})",
- url = "https://academic.oup.com/jac/article/75/9/2670/5849541",
- doi = "10.1093/jac/dkaa192",
- language = "en",
- number = "9",
- urldate = "2023-05-25",
- journal = "Journal of Antimicrobial Chemotherapy",
- month = "September",
- year = "2020",
- pages = "2670--2676",
- preview = "otter2020.jpg"
-}
-
-@article{price2021,
- author = "Price, James Richard and Mookerjee, Siddharth and Dyakova, Eleonora and Myall, Ashleigh and Leung, Wendy and Weiße, Andrea Yeong and Shersing, Yeeshika and Brannigan, Eimear Therese and Galletly, Tracey and Muir, David and Randell, Paul and Davies, Frances and Bolt, Frances and Barahona, Mauricio and Otter, Jonathan Ashley and Holmes, Alison H",
- title = "Development and {Delivery} of a {Real}-time {Hospital}-onset {COVID}-19 {Surveillance} {System} {Using} {Network} {Analysis}",
- issn = "1058-4838, 1537-6591",
- url = "https://academic.oup.com/cid/advance-article/doi/10.1093/cid/ciaa892/5868508",
- doi = "10.1093/cid/ciaa892",
- language = "en",
- urldate = "2023-05-25",
- journal = "Clinical Infectious Diseases",
- month = "July",
- year = "2020",
- pages = "ciaa892",
- preview = "price2021.jpg"
-}
-
-@article{weisse2011,
- author = "Weiße, Andrea Y. and Huisinga, Wilhelm",
- title = "Error-controlled global sensitivity analysis of ordinary differential equations",
- volume = "230",
- issn = "00219991",
- url = "https://linkinghub.elsevier.com/retrieve/pii/S0021999111003159",
- doi = "10.1016/j.jcp.2011.05.011",
- language = "en",
- number = "17",
- urldate = "2023-05-25",
- journal = "Journal of Computational Physics",
- month = "July",
- year = "2011",
- pages = "6824--6842"
-}
-
-@phdthesis{weisse2009,
- author = "Weiße, Andrea Yeong",
- title = "Adaptive {Dichtepropagation} mit {Approximate} {ApproximationsGlobal} sensitivity analysis of ordinary differential equations: adaptive density propagation using approximate approximations",
- shorttitle = "Adaptive {Dichtepropagation} mit {Approximate} {ApproximationsGlobal} sensitivity analysis of ordinary differential equations",
- url = "https://refubium.fu-berlin.de/handle/fub188/9586",
- urldate = "2023-05-25",
- school = "Freie Universität Berlin",
- collaborator = "Universitätsbibliothek Der FU Berlin and Universitätsbibliothek Der FU Berlin",
- year = "2009",
- preview = "weisse2009.png"
-}
-
-@article{nikolados2019,
- author = "Nikolados, Evangelos-Marios and Weiße, Andrea Y. and Ceroni, Francesca and Oyarzún, Diego A.",
- title = "Growth {Defects} and {Loss}-of-{Function} in {Synthetic} {Gene} {Circuits}",
- volume = "8",
- issn = "2161-5063, 2161-5063",
- url = "https://pubs.acs.org/doi/10.1021/acssynbio.8b00531",
- doi = "10.1021/acssynbio.8b00531",
- language = "en",
- number = "6",
- urldate = "2023-05-25",
- journal = "ACS Synthetic Biology",
- month = "June",
- year = "2019",
- pages = "1231--1240",
- preview = "nikolados2019.jpg"
-}
-
-@article{myall2022b,
- author = "Myall, A. and Peach, R. and Wan, Y. and Mookerjee, S. and Jauneikaite, E. and Bolt, F. and Price, J. and Davies, F. and Weisse, A. and Holmes, A.H. and Barahona, M.",
- title = "Improved contact tracing using network analysis and spatial-temporal proximity",
- volume = "116",
- issn = "12019712",
- url = "https://linkinghub.elsevier.com/retrieve/pii/S1201971221009395",
- doi = "10.1016/j.ijid.2021.12.047",
- language = "en",
- urldate = "2023-05-25",
- journal = "International Journal of Infectious Diseases",
- month = "March",
- year = "2022",
- pages = "S20"
-}
-
-@article{ming2021,
- author = "Ming, Damien K. and Myall, Ashleigh C. and Hernandez, Bernard and Weiße, Andrea Y. and Peach, Robert L. and Barahona, Mauricio and Rawson, Timothy M. and Holmes, Alison H.",
- title = "Informing antimicrobial management in the context of {COVID}-19: understanding the longitudinal dynamics of {C}-reactive protein and procalcitonin",
- volume = "21",
- issn = "1471-2334",
- shorttitle = "Informing antimicrobial management in the context of {COVID}-19",
- url = "https://bmcinfectdis.biomedcentral.com/articles/10.1186/s12879-021-06621-7",
- doi = "10.1186/s12879-021-06621-7",
- language = "en",
- number = "1",
- urldate = "2023-05-25",
- journal = "BMC Infectious Diseases",
- month = "December",
- year = "2021",
- pages = "932",
- preview = "ming2021.jpg"
-}
-
-@techreport{boonyasiri2021,
- author = "Boonyasiri, Adhiratha and Myall, Ashleigh C. and Wan, Yu and Bolt, Frances and Ledda, Alice and Mookerjee, Siddharth and Weiße, Andrea Y. and Turton, Jane F. and Abbas, Hala and Prakapaite, Ruta and Sabnis, Akshay and Abdolrasouli, Alireza and Malpartida-Cardenas, Kenny and Miglietta, Luca and Donaldson, Hugo and Gilchrist, Mark and Hopkins, Katie L. and Ellington, Matthew J and Otter, Jonathan A. and Larrouy-Maumus, Gerald and Edwards, Andrew M. and Rodriguez-Manzano, Jesus and Didelot, Xavier and Barahona, Mauricio and Holmes, Alison H. and Jauneikaite, Elita and Davies, Frances",
- type = "preprint",
- title = "Integrated patient network and genomic plasmid analysis reveal a regional, multi-species outbreak of carbapenemase-producing {Enterobacterales} carrying both \textit{bla} $\_{\textrm{{IMP}}}$ and \textit{mcr-9} genes",
- url = "http://medrxiv.org/lookup/doi/10.1101/2021.10.28.21265436",
- language = "en",
- urldate = "2023-05-25",
- institution = "Infectious Diseases (except HIV/AIDS)",
- month = "October",
- year = "2021",
- preview = "boonyasiri2021.jpg"
-}
-
-@article{myall2021b,
- author = "Myall, Ashleigh C. and Peach, Robert L. and Weiße, Andrea Y. and Mookerjee, Siddharth and Davies, Frances and Holmes, Alison and Barahona, Mauricio",
- title = "Network memory in the movement of hospital patients carrying antimicrobial-resistant bacteria",
- volume = "6",
- issn = "2364-8228",
- url = "https://appliednetsci.springeropen.com/articles/10.1007/s41109-021-00376-5",
- doi = "10.1007/s41109-021-00376-5",
- language = "en",
- number = "1",
- urldate = "2023-05-25",
- journal = "Applied Network Science",
- month = "December",
- year = "2021",
- pages = "34",
- preview = "myall2021b.jpg"
-}
-
-@incollection{nikolados2021,
- author = "Nikolados, Evangelos-Marios and Weiße, Andrea Y. and Oyarzún, Diego A.",
- editor = "Menolascina, Filippo",
- address = "New York, NY",
- title = "Prediction of {Cellular} {Burden} with {Host}–{Circuit} {Models}",
- volume = "2229",
- isbn = "978-1-07-161031-2 978-1-07-161032-9",
- url = "https://link.springer.com/10.1007/978-1-0716-1032-9\_13",
- language = "en",
- urldate = "2023-05-25",
- booktitle = "Synthetic {Gene} {Circuits}",
- publisher = "Springer US",
- year = "2021",
- pages = "267--291",
- preview = "nikolados2021.jpg"
-}
-
-@article{myall2022a,
- author = "Myall, A. and Price, J. and Peach, R. and Abbas, M. and Mookerjee, S. and Ahmad, I. and Ming, D. and Zhu, N.J. and Ramzan, F. and Weisse, A. and Holmes, A.H. and Barahona, M.",
- title = "Prediction of hospital-onset {COVID}-19 using networks of patient contact: an observational study",
- volume = "116",
- issn = "12019712",
- shorttitle = "Prediction of hospital-onset {COVID}-19 using networks of patient contact",
- url = "https://linkinghub.elsevier.com/retrieve/pii/S1201971221011504",
- doi = "10.1016/j.ijid.2021.12.258",
- language = "en",
- urldate = "2023-05-25",
- journal = "International Journal of Infectious Diseases",
- month = "March",
- year = "2022",
- pages = "S109--S110"
-}
-
-@article{weisse2010a,
- author = "Weiße, Andrea Y and Middleton, Richard H and Huisinga, Wilhelm",
- title = "Quantifying uncertainty, variability and likelihood for ordinary differential equation models",
- volume = "4",
- issn = "1752-0509",
- url = "https://bmcsystbiol.biomedcentral.com/articles/10.1186/1752-0509-4-144",
- doi = "10.1186/1752-0509-4-144",
- language = "en",
- number = "1",
- urldate = "2023-05-25",
- journal = "BMC Systems Biology",
- month = "December",
- year = "2010",
- pages = "144",
- preview = "weisse2010a.png"
-}
-
-@article{karwacki-neisius2013,
- author = "Karwacki-Neisius, Violetta and Göke, Jonathan and Osorno, Rodrigo and Halbritter, Florian and Ng, Jia Hui and Weiße, Andrea Y. and Wong, Frederick C.K. and Gagliardi, Alessia and Mullin, Nicholas P. and Festuccia, Nicola and Colby, Douglas and Tomlinson, Simon R. and Ng, Huck-Hui and Chambers, Ian",
- title = "Reduced {Oct4} {Expression} {Directs} a {Robust} {Pluripotent} {State} with {Distinct} {Signaling} {Activity} and {Increased} {Enhancer} {Occupancy} by {Oct4} and {Nanog}",
- volume = "12",
- issn = "19345909",
- url = "https://linkinghub.elsevier.com/retrieve/pii/S1934590913001598",
- doi = "10.1016/j.stem.2013.04.023",
- language = "en",
- number = "5",
- urldate = "2023-05-25",
- journal = "Cell Stem Cell",
- month = "May",
- year = "2013",
- pages = "531--545",
- preview = "karwacki-neisius2013.jpg"
-}
-
-@article{veron2009,
- author = "Véron, Nathalie and Bauer, Hermann and Weiße, Andrea Y. and Lüder, Gerhild and Werber, Martin and Herrmann, Bernhard G.",
- title = "Retention of gene products in syncytial spermatids promotes non-{Mendelian} inheritance as revealed by the \textit{t complex responder}",
- volume = "23",
- issn = "0890-9369, 1549-5477",
- url = "http://genesdev.cshlp.org/lookup/doi/10.1101/gad.553009",
- doi = "10.1101/gad.553009",
- language = "en",
- number = "23",
- urldate = "2023-05-25",
- journal = "Genes \\& Development",
- month = "December",
- year = "2009",
- pages = "2705--2710",
- preview = "veron2009.jpg"
-}
-
-@article{weisse2016,
- author = "Weiße, Andrea Y. and Mannan, Ahmad A. and Oyarzún, Diego A.",
- title = "Signaling {Tug}-of-{War} {Delivers} the {Whole} {Message}",
- volume = "3",
- issn = "24054712",
- url = "https://linkinghub.elsevier.com/retrieve/pii/S2405471216303672",
- doi = "10.1016/j.cels.2016.11.003",
- language = "en",
- number = "5",
- urldate = "2023-05-25",
- journal = "Cell Systems",
- month = "November",
- year = "2016",
- pages = "414--416",
- preview = "weisse2016.jpg"
-}
-
-@article{thomas2018,
- author = "Thomas, Philipp and Terradot, Guillaume and Danos, Vincent and Weiße, Andrea Y.",
- title = "Sources, propagation and consequences of stochasticity in cellular growth",
- volume = "9",
- issn = "2041-1723",
- url = "https://www.nature.com/articles/s41467-018-06912-9",
- doi = "10.1038/s41467-018-06912-9",
- language = "en",
- number = "1",
- urldate = "2023-05-25",
- journal = "Nature Communications",
- month = "October",
- year = "2018",
- pages = "4528",
- preview = "thomas2018.png"
-}
-
-@article{terradot2018,
- author = "Terradot, Guillaume and Beica, Andreea and Weiße, Andrea and Danos, Vincent",
- title = "Survival of the {Fattest}: {Evolutionary} {Trade}-offs in {Cellular} {Resource} {Storage}",
- volume = "335",
- issn = "15710661",
- shorttitle = "Survival of the {Fattest}",
- url = "https://linkinghub.elsevier.com/retrieve/pii/S1571066118300136",
- doi = "10.1016/j.entcs.2018.03.010",
- language = "en",
- urldate = "2023-05-25",
- journal = "Electronic Notes in Theoretical Computer Science",
- month = "April",
- year = "2018",
- pages = "91--112",
- preview = "terradot2018.png"
-}
diff --git a/_config.yml b/_config.yml
deleted file mode 100644
index 766f320c0568..000000000000
--- a/_config.yml
+++ /dev/null
@@ -1,382 +0,0 @@
-# -----------------------------------------------------------------------------
-# Site settings
-# -----------------------------------------------------------------------------
-
-title: Biomedical Computation Group # the website title (if blank, full name will be used instead)
-first_name: Andrea
-middle_name: Yeong
-last_name: Weisse
-email:
-description: > # the ">" symbol means to ignore newlines until "footer_text:"
- Virtual domain of our splendid computation team in the beautiful Edinburgh
-footer_text: >
- Powered by Jekyll with al-folio theme.
- Hosted by GitHub Pages.
-keywords: jekyll, jekyll-theme, academic-website, portfolio-website # add your own keywords or leave empty
-
-lang: en # the language of your site (for example: en, fr, cn, ru, etc.)
-icon: ⚛️ # the emoji used as the favicon (alternatively, provide image name in /assets/img/)
-
-url: https://chwag.github.io # the base hostname & protocol for your site
-baseurl: # the subpath of your site, e.g. /blog/
-last_updated: true # set to true if you want to display last updated in the footer
-impressum_path: # set to path to include impressum link in the footer, use the same path as permalink in a page, helps to conform with EU GDPR
-
-# -----------------------------------------------------------------------------
-# Theme
-# -----------------------------------------------------------------------------
-
-# code highlighter theme
-highlight_theme_light: github # https://github.com/jwarby/jekyll-pygments-themes
-highlight_theme_dark: native # https://github.com/jwarby/jekyll-pygments-themes
-
-# repo color theme
-repo_theme_light: default # https://github.com/anuraghazra/github-readme-stats/blob/master/themes/README.md
-repo_theme_dark: dark # https://github.com/anuraghazra/github-readme-stats/blob/master/themes/README.md
-
-# -----------------------------------------------------------------------------
-# RSS Feed
-# -----------------------------------------------------------------------------
-# will use title and url fields
-# Take a look to https://github.com/jekyll/jekyll-feed for more customization
-
-rss_icon: false
-
-# -----------------------------------------------------------------------------
-# Layout
-# -----------------------------------------------------------------------------
-
-navbar_fixed: true
-footer_fixed: false
-
-# Dimensions
-max_width: 800px
-
-# TODO: add layout settings (single page vs. multi-page)
-
-# -----------------------------------------------------------------------------
-# Open Graph & Schema.org
-# -----------------------------------------------------------------------------
-# Display links to the page with a preview object on social media.
-serve_og_meta: false # Include Open Graph meta tags in the HTML head
-serve_schema_org: false # Include Schema.org in the HTML head
-og_image: # The site-wide (default for all links) Open Graph preview image
-
-# -----------------------------------------------------------------------------
-# Social integration
-# -----------------------------------------------------------------------------
-
-github_username: # your GitHub user name
-gitlab_username: # your GitLab user name
-twitter_username: # your Twitter handle
-mastodon_username: # your mastodon instance+username in the format instance.tld/@username
-linkedin_username: # your LinkedIn user name
-telegram_username: # your Telegram user name
-scholar_userid: # your Google Scholar ID
-semanticscholar_id: # your Semantic Scholar ID
-whatsapp_number: # your WhatsApp number (full phone number in international format. Omit any zeroes, brackets, or dashes when adding the phone number in international format.)
-orcid_id: # your ORCID ID
-medium_username: # your Medium username
-quora_username: # your Quora username
-publons_id: # your ID on Publons
-research_gate_profile: # your profile on ResearchGate
-blogger_url: # your blogger URL
-work_url: # work page URL
-keybase_username: # your keybase user name
-wikidata_id: # your wikidata id
-dblp_url: # your DBLP profile url
-stackoverflow_id: # your stackoverflow id
-kaggle_id: # your kaggle id
-lastfm_id: # your lastfm id
-spotify_id: # your spotify id
-pinterest_id: # your pinterest id
-unsplash_id: # your unsplash id
-instagram_id: # your instagram id
-facebook_id: # your facebook id
-youtube_id: # your youtube channel id (youtube.com/@)
-discord_id: # your discord id (18-digit unique numerical identifier)
-
-contact_note: >
- For any enquiries, please reach out by mail at andrea[dot]weisse[at]ed.ac.uk
-
-# -----------------------------------------------------------------------------
-# Analytics and search engine verification
-# -----------------------------------------------------------------------------
-
-google_analytics: # your Goole Analytics measurement ID (format: G-XXXXXXXXXX)
-panelbear_analytics: # panelbear analytics site ID (format: XXXXXXXXX)
-
-google_site_verification: # your google-site-verification ID (Google Search Console)
-bing_site_verification: # out your bing-site-verification ID (Bing Webmaster)
-
-# -----------------------------------------------------------------------------
-# Blog
-# -----------------------------------------------------------------------------
-
-blog_name: # blog_name will be displayed in your blog page
-blog_nav_title: # your blog must have a title for it to be displayed in the nav bar
-blog_description: a simple whitespace theme for academics
-permalink: /blog/:year/:title/
-
-# Pagination
-pagination:
- enabled: true
-
-# Giscus comments (RECOMMENDED)
-# Follow instructions on https://giscus.app/ to setup for your repo to fill out
-# the information below.
-giscus:
- repo: alshedivat/al-folio # /
- repo_id: MDEwOlJlcG9zaXRvcnk2MDAyNDM2NQ==
- category: Comments # name of the category under which discussions will be created
- category_id: DIC_kwDOA5PmLc4CTBt6
- mapping: title # identify discussions by post title
- strict: 1 # use strict identification mode
- reactions_enabled: 1 # enable (1) or disable (0) emoji reactions
- input_position: bottom # whether to display input form below (bottom) or above (top) the comments
- theme: preferred_color_scheme # name of the color scheme (preferred works well with al-folio light/dark mode)
- emit_metadata: 0
- lang: en
-
-# Disqus comments (DEPRECATED)
-disqus_shortname: al-folio # put your disqus shortname
-# https://help.disqus.com/en/articles/1717111-what-s-a-shortname
-
-# External sources.
-# If you have blog posts published on medium.com or other exteranl sources,
-# you can display them in your blog by adding a link to the RSS feed.
-external_sources:
- - name: medium.com
- rss_url: https://medium.com/@al-folio/feed
-
-# -----------------------------------------------------------------------------
-# Collections
-# -----------------------------------------------------------------------------
-
-collections:
- news:
- defaults:
- layout: post
- output: true
- permalink: /news/:path/
- projects:
- output: true
- permalink: /projects/:path/
- people:
- output: true
- permalink: /people/:path/
-
-news_scrollable: true # adds a vertical scroll bar if there are more than 3 news items
-news_limit: 5 # leave blank to include all the news in the `_news` folder
-
-# -----------------------------------------------------------------------------
-# Jekyll settings
-# -----------------------------------------------------------------------------
-
-# Markdown and syntax highlight
-markdown: kramdown
-highlighter: rouge
-kramdown:
- input: GFM
- syntax_highlighter_opts:
- css_class: 'highlight'
- span:
- line_numbers: false
- block:
- line_numbers: false
- start_line: 1
-
-# Includes & excludes
-include: ['_pages']
-exclude:
- - bin
- - Gemfile
- - Gemfile.lock
- - vendor
-keep_files:
- - CNAME
- - .nojekyll
- - .git
-
-# Plug-ins
-plugins:
- - jekyll-archives
- - jekyll-diagrams
- - jekyll-email-protect
- - jekyll-feed
- - jekyll-imagemagick
- - jekyll-minifier
- - jekyll-paginate-v2
- - jekyll/scholar
- - jekyll-sitemap
- - jekyll-link-attributes
- - jekyll-twitter-plugin
- - jemoji
-
-# Sitemap settings
-defaults:
- - scope:
- path: "assets/**/*.*"
- values:
- sitemap: false
-
-# -----------------------------------------------------------------------------
-# Jekyll Minifier
-# -----------------------------------------------------------------------------
-
-jekyll-minifier:
- exclude: ['robots.txt']
- uglifier_args:
- harmony: true
-
-# -----------------------------------------------------------------------------
-# Jekyll Archives
-# -----------------------------------------------------------------------------
-
-jekyll-archives:
- enabled: [year, tags, categories] # enables year, tag and category archives (remove if you need to disable one of them).
- layouts:
- year: archive-year
- tag: archive-tag
- category: archive-category
- permalinks:
- year: '/blog/:year/'
- tag: '/blog/tag/:name/'
- category: '/blog/category/:name/'
-
-display_tags: ['formatting', 'images', 'links', 'math', 'code'] # this tags will be dispalyed on the front page of your blog
-
-# -----------------------------------------------------------------------------
-# Jekyll Scholar
-# -----------------------------------------------------------------------------
-
-scholar:
-
- last_name:
- first_name:
-
- style: apa
- locale: en
-
- source: /_bibliography/
- bibliography: papers.bib
- bibliography_template: bib
- # Note: if you have latex math in your bibtex, the latex filter
- # preprocessing may conflict with MathJAX if the latter is enabled.
- # See https://github.com/alshedivat/al-folio/issues/357.
- bibtex_filters: [latex, smallcaps, superscript]
-
- replace_strings: true
- join_strings: true
-
- details_dir: bibliography
- details_layout: bibtex.html
- details_link: Details
-
- query: "@*"
-
-badges: # Display different badges for your pulications
- altmetric_badge: false # Altmetric badge (https://www.altmetric.com/products/altmetric-badges/)
- dimensions_badge: false # Dimensions badge (https://badge.dimensions.ai/)
-
-# Filter out certain bibtex entry keywords used internally from the bib output
-filtered_bibtex_keywords: [abbr, abstract, arxiv, bibtex_show, html, pdf, selected, supp, blog, code, poster, slides, website, preview, altmetric]
-
-# Maximum number of authors to be shown for each publication (more authors are visible on click)
-max_author_limit: 5 # leave blank to always show all authors
-more_authors_animation_delay: 10 # more authors are revealed on click using animation; smaller delay means faster animation
-
-
-# -----------------------------------------------------------------------------
-# Jekyll Link Attributes
-# -----------------------------------------------------------------------------
-
-# These are the defaults
-external_links:
- enabled: true
- rel: external nofollow noopener
- target: _blank
- exclude:
-
-
-# -----------------------------------------------------------------------------
-# Responsive WebP Images
-# -----------------------------------------------------------------------------
-
-imagemagick:
- enabled: true # enables responsive images for your site (recomended, see https://github.com/alshedivat/al-folio/issues/537)
- widths:
- - 480
- - 800
- - 1400
- input_directories:
- - assets/img/
- input_formats:
- - ".jpg"
- - ".jpeg"
- - ".png"
- - ".tiff"
- output_formats:
- webp: "-resize 800x"
-
-# -----------------------------------------------------------------------------
-# Jekyll Diagrams
-# -----------------------------------------------------------------------------
-
-jekyll-diagrams:
- # configuration, see https://github.com/zhustec/jekyll-diagrams.
- # feel free to comment out this section if not using jekyll diagrams.
-
-
-# -----------------------------------------------------------------------------
-# Optional Features
-# -----------------------------------------------------------------------------
-
-enable_google_analytics: false # enables google analytics
-enable_panelbear_analytics: false # enables panelbear analytics
-enable_google_verification: false # enables google site verification
-enable_bing_verification: false # enables bing site verification
-enable_masonry: true # enables automatic project cards arangement
-enable_math: true # enables math typesetting (uses MathJax)
-enable_tooltips: false # enables automatic tooltip links generated
- # for each section titles on pages and posts
-enable_darkmode: true # enables switching between light/dark modes
-enable_navbar_social: false # enables displaying social links in the
- # navbar on the about page
-enable_project_categories: false # enables categorization of projects into
- # multiple categories
-enable_people_categories: false # enables categorization of people into multiple categories
-enable_medium_zoom: true # enables image zoom feature (as on medium.com)
-enable_progressbar: true # enables a horizontal progress bar linked to the vertical scroll position
-
-# -----------------------------------------------------------------------------
-# Library versions
-# -----------------------------------------------------------------------------
-
-academicons:
- version: "1.9.1"
- integrity: "sha256-i1+4qU2G2860dGGIOJscdC30s9beBXjFfzjWLjBRsBg="
-bootstrap:
- version: "4.6.1"
- integrity:
- css: "sha256-DF7Zhf293AJxJNTmh5zhoYYIMs2oXitRfBjY+9L//AY="
- js: "sha256-fgLAgv7fyCGopR/gBNq2iW3ZKIdqIcyshnUULC4vex8="
-fontawesome:
- version: "5.15.4"
- integrity: "sha256-mUZM63G8m73Mcidfrv5E+Y61y7a12O5mW4ezU3bxqW4="
-jquery:
- version: "3.6.0"
- integrity: "sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
-mathjax:
- version: "3.2.0"
-masonry:
- version: "4.2.2"
- integrity: "sha256-Nn1q/fx0H7SNLZMQ5Hw5JLaTRZp0yILA/FRexe19VdI="
-mdb:
- version: "4.20.0"
- integrity:
- css: "sha256-jpjYvU3G3N6nrrBwXJoVEYI/0zw8htfFnhT9ljN3JJw="
- js: "sha256-NdbiivsvWt7VYCt6hYNT3h/th9vSTL4EDWeGs5SN3DA="
-medium_zoom:
- version: "1.0.8"
- integrity: "sha256-7PhEpEWEW0XXQ0k6kQrPKwuoIomz8R8IYyuU1Qew4P8="
diff --git a/_data/coauthors.yml b/_data/coauthors.yml
deleted file mode 100644
index 8ed521248d81..000000000000
--- a/_data/coauthors.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-"Adams":
- - firstname: ["Edwin", "E.", "E. P.", "Edwin Plimpton"]
- url: https://en.wikipedia.org/wiki/Edwin_Plimpton_Adams
-
-"Podolsky":
- - firstname: ["Boris", "B.", "B. Y.", "Boris Yakovlevich"]
- url: https://en.wikipedia.org/wiki/Boris_Podolsky
-
-"Rosen":
- - firstname: ["Nathan", "N."]
- url: https://en.wikipedia.org/wiki/Nathan_Rosen
-
-"Bach":
- - firstname: ["Johann Sebastian", "J. S."]
- url: https://en.wikipedia.org/wiki/Johann_Sebastian_Bach
-
- - firstname: ["Carl Philipp Emanuel", "C. P. E."]
- url: https://en.wikipedia.org/wiki/Carl_Philipp_Emanuel_Bach
-
-"Przibram":
- - firstname: ["Karl"]
- url: https://link.springer.com/article/10.1007/s00016-019-00242-z
-
-"Schrödinger":
- - firstname: ["Erwin"]
- url: https://en.wikipedia.org/wiki/Erwin_Schr%C3%B6dinger
-
-"Lorentz":
- - firstname: ["Hendrik Antoon"]
- url: https://en.wikipedia.org/wiki/Hendrik_Lorentz
-
-"Planck":
- - firstname: ["Max"]
- url: https://en.wikipedia.org/wiki/Max_Planck
diff --git a/_data/cv.yml b/_data/cv.yml
deleted file mode 100644
index 5b1157240e07..000000000000
--- a/_data/cv.yml
+++ /dev/null
@@ -1,97 +0,0 @@
-- title: General Information
- type: map
- contents:
- - name: Full Name
- value: Albert Einstein
- - name: Date of Birth
- value: 14th March 1879
- - name: Languages
- value: English, German
-
-- title: Education
- type: time_table
- contents:
- - title: PhD
- institution: University of Zurich, Zurich, Switzerland
- year: 1905
- description:
- - Description 1.
- - Description 2.
- - title: Description 3.
- contents:
- - Sub-description 1.
- - Sub-description 2.
- - title: Federal teaching diploma
- institution: Eidgenössische Technische Hochschule, Zurich, Switzerland
- year: 1900
- description:
- - Description 1.
- - Description 2.
-
-- title: Experience
- type: time_table
- contents:
- - title: Professor of Theoretical Physics
- institution: Institute for Advanced Study, Princeton University
- year: 1933 - 1955
- description:
- - Description 1.
- - Description 2.
- - title: Description 3.
- contents:
- - Sub-description 1.
- - Sub-description 2.
- - title: Visiting Professor
- institution: California Institute of Technology, Pasadena, California, US
- year: 1933
- description:
- - Description 1.
- - Description 2.
-
- - title: Director
- institution: Kaiser Wilhelm Institute for Physics, Berlin, Germany.
- year: 1917-1933
-
- - title: Professor of Theoretical Physics
- institution: Karl-Ferdinand University, Prague, Czechoslovakia
- year: 1911 - 1917
- description:
-
- - title: Associate Professor of Theoretical Physics
- institution: University of Zurich, Zurich, Switzerland
- year: 1909 - 1911
-
-- title: Open Source Projects
- type: time_table
- contents:
- - title: al-folio
- year: 2015-now
- description: A beautiful, simple, clean, and responsive Jekyll theme for academics.
-
-- title: Honors and Awards
- type: time_table
- contents:
- - year: 1921
- items:
- - Nobel Prize in Physics
- - Matteucci Medal
- - year: 2029
- items:
- - Max Planck Medal
-
-- title: Academic Interests
- type: nested_list
- contents:
- - title: Topic 1.
- items:
- - Description 1.
- - Description 2.
- - title: Topic 2.
- items:
- - Description 1.
- - Description 2.
-
-- title: Other Interests
- type: list
- contents:
- - Hobbies: Hobby 1, Hobby 2, etc.
diff --git a/_data/repositories.yml b/_data/repositories.yml
deleted file mode 100644
index 5205c9f6f7e9..000000000000
--- a/_data/repositories.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-github_users:
- - torvalds
- - alshedivat
-
-github_repos:
- - alshedivat/al-folio
- - twbs/bootstrap
- - jekyll/jekyll
- - jquery/jquery
- - FortAwesome/Font-Awesome
- - jpswalsh/academicons
- - mathjax/MathJax
diff --git a/_data/venues.yml b/_data/venues.yml
deleted file mode 100644
index 6c16ad5dcbdf..000000000000
--- a/_data/venues.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-"AJP":
- url: https://aapt.scitation.org/journal/ajp
- color: "#00369f"
-
-"PhysRev":
- url: https://journals.aps.org/
diff --git a/_includes/cv/list.html b/_includes/cv/list.html
deleted file mode 100644
index 7562585916d3..000000000000
--- a/_includes/cv/list.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
- {% for content in entry.contents %}
-
{{ content }}
- {% endfor %}
-
\ No newline at end of file
diff --git a/_includes/cv/map.html b/_includes/cv/map.html
deleted file mode 100644
index e0d1983ef0ee..000000000000
--- a/_includes/cv/map.html
+++ /dev/null
@@ -1,8 +0,0 @@
-
- {% for content in entry.contents %}
-
-
{{ content.name }}
-
{{ content.value }}
-
- {% endfor %}
-
\ No newline at end of file
diff --git a/_includes/cv/nested_list.html b/_includes/cv/nested_list.html
deleted file mode 100644
index 4778aca07ff1..000000000000
--- a/_includes/cv/nested_list.html
+++ /dev/null
@@ -1,14 +0,0 @@
-
- {% for content in entry.contents %}
-
-
{{ content.title }}
- {% if content.items %}
-
- {% for subitem in content.items %}
-
{{ subitem }}
- {% endfor %}
-
- {% endif %}
-
- {% endfor %}
-
\ No newline at end of file
diff --git a/_includes/cv/time_table.html b/_includes/cv/time_table.html
deleted file mode 100644
index 123b9d099fde..000000000000
--- a/_includes/cv/time_table.html
+++ /dev/null
@@ -1,59 +0,0 @@
-
- {% for content in entry.contents %}
-
-
- {% if content.year %}
-
-
- {{ content.year }}
-
-
- {% endif %}
-
- {% if content.title %}
-
{{content.title}}
- {% endif %}
- {% if content.institution %}
-
{{content.institution}}
- {% endif %}
- {% if content.description %}
-
- {% for item in content.description %}
-
- {% if item.contents %}
- {{ item.title }}
-
- {% for subitem in item.contents %}
-
{{ subitem }}
- {% endfor %}
-
- {% else %}
- {{ item }}
- {% endif %}
-
- {% endfor %}
-
- {% endif %}
- {% if content.items %}
-
- {% for item in content.items %}
-
- {% if item.contents %}
- {{ item.title }}
-
- {% for subitem in item.contents %}
-
{{ subitem }}
- {% endfor %}
-
- {% else %}
- {{ item }}
- {% endif %}
-
- {% endfor %}
-
- {% endif %}
-
-
-
- {% endfor %}
-
\ No newline at end of file
diff --git a/_includes/disqus.html b/_includes/disqus.html
deleted file mode 100644
index 73fe9538d0dc..000000000000
--- a/_includes/disqus.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
- {{ year }}
- {%- if tags != "" %}
- ·
- {% for tag in page.tags -%}
-
- {{ tag }}
- {% endfor -%}
- {% endif %}
-
- {%- if categories != "" %}
- ·
- {% for category in page.categories -%}
-
- {{ category }}
- {% endfor -%}
- {% endif %}
-
-
-
-
-
- {{ content }}
-
-
- {%- if site.disqus_shortname and page.disqus_comments -%}
- {% include disqus.html %}
- {%- endif %}
- {%- if site.giscus.repo and page.giscus_comments -%}
- {% include giscus.html %}
- {%- endif -%}
-
-
diff --git a/_news/announcement_0.md b/_news/announcement_0.md
deleted file mode 100644
index f506751fc1fa..000000000000
--- a/_news/announcement_0.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-layout: post
-date: 2023-03-30 15:59:00-0400
-inline: true
----
-
-First test news. Update this, when the website goes live!
\ No newline at end of file
diff --git a/_news/announcement_1.md b/_news/announcement_1.md
deleted file mode 100644
index b0a1db0f82c8..000000000000
--- a/_news/announcement_1.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-layout: post
-date: 2023-05-24 15:59:00-0400
-inline: true
----
-
-Christoph's recent work on the effect of immersive motor prompts on motor imagery was published in the proceedings of the 11th International IEEE/EMBS Conference on Neural Engineering - congratulations, Christoph!
\ No newline at end of file
diff --git a/_pages/about.md b/_pages/about.md
deleted file mode 100644
index 3a8795400ee2..000000000000
--- a/_pages/about.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-layout: about
-title: about
-permalink: /
-subtitle: @University of Edinburgh
-
-news: true # includes a list of news items
-selected_papers: false # includes a list of papers marked as "selected={true}"
-social: false # includes social icons at the bottom of the page
----
-
-Our group focuses on computational systems analyses of biological processes. We use mechanistic computational models to integrate heterogenous data into predictive models. We have a particular interest in mechanisms that promote the emergence and spread of antimicrobial resistance, which we study at the cellular and population level as well as across patients.
- I held postdoctoral positions at the University of Edinburgh (with Peter Swain and Vincent Danos) and Imperial College London (with Alison Holmes, OBE).
\ No newline at end of file
diff --git a/_people/ashleighMyall.md b/_people/ashleighMyall.md
deleted file mode 100644
index 874143aee649..000000000000
--- a/_people/ashleighMyall.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-layout: page
-title: Ashleigh Myall
-description: PhD student
-img:
-importance: 1
-category: PhD students
----
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_people/christophWagner.md b/_people/christophWagner.md
deleted file mode 100644
index a811c72ab589..000000000000
--- a/_people/christophWagner.md
+++ /dev/null
@@ -1,22 +0,0 @@
----
-layout: page
-title: Christoph Wagner
-description: PhD student
-img: assets/img/profiles/christophWagner_cropped.png
-importance: 1
-category: PhD students
----
-
-
-
-
-
- I joined the university in 2022, to do my PhD with Andrea, co-supervised with Nadanai Laohakunakorn. We are interested in the ability of cells to self-regenerate. To study this, we run cell-free transcription-translation (TXTL) experiments in a microfluidics chip, wherein a gene expression machinery produces its own proteins. The gathered data is then used to generate a model of TXTL self-regeneration.
- Understanding and controlling the ability of a TXTL system to self-regenerate would mark a milestone on the path towards synthetic cells, which to me is the holy grail of synthetic biology. Everything from basic science to industry would benefit greatly from achieving to build fully synthetic cells. It's just a bummer, how very complicated that is...
- Aside my PhD, I like to spend my time dancing traditional Scottish dances, writing science communication articles on my blog and sometimes running around in circles.
-
\ No newline at end of file
diff --git a/_people/elenaGarcia.md b/_people/elenaGarcia.md
deleted file mode 100644
index 482abec46e3b..000000000000
--- a/_people/elenaGarcia.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-layout: page
-title: Elena Pascual Garcia
-description: PhD student
-img:
-importance: 1
-category: PhD students
----
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_people/hollieHindley.md b/_people/hollieHindley.md
deleted file mode 100644
index 595ca94d1a5e..000000000000
--- a/_people/hollieHindley.md
+++ /dev/null
@@ -1,21 +0,0 @@
----
-layout: page
-title: Hollie Hindley
-description: PhD student
-img: assets/img/profiles/hollieHindley_cropped.png
-importance: 1
-category: PhD students
----
-
-
-
-
-
- I joined the group in 2021 when I started my PhD in mathematical modelling of RNA repair. I’ve always had an interest in antimicrobial resistance and have completed projects in my BSc and MSc on antibiotic resistance at the University of Bristol where I studied biochemistry. My PhD also has an AMR focus through modelling of a gene system in bacteria, which is implicated in antibiotic tolerance. This system is highly conserved across all domains of life, highlighting its importance and our interest in discovering more about why it causes tolerance and how we can potentiate antibiotic treatments in the future.
- Outside of my PhD I am a competitive triathlete and I love exploring the amazing outdoors we have on our doorstep in Edinburgh!
-
\ No newline at end of file
diff --git a/_people/rohanGorantla.md b/_people/rohanGorantla.md
deleted file mode 100644
index 29b148931e25..000000000000
--- a/_people/rohanGorantla.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-layout: page
-title: Rohan Gorantla
-description: PhD student
-img:
-importance: 1
-category: PhD students
----
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_people/sandyNelson.md b/_people/sandyNelson.md
deleted file mode 100644
index 13f26165150e..000000000000
--- a/_people/sandyNelson.md
+++ /dev/null
@@ -1,21 +0,0 @@
----
-layout: page
-title: Sandy Nelson
-description: PhD student
-img: assets/img/profiles/sandyNelson_cropped.png
-importance: 1
-category: PhD students
----
-
-
-
-
-
- Sandy Nelson is a PhD student funded by the CDT in Biomedical AI. He is researching robust biodesign for cell-free systems using probabilistic approaches, working jointly with the Gutmann group (Informatics), the Laohakunakorn group and the Weiße group (IQB3). He studied physics and experimental psychology at Durham University then a PhD in cognitive science at Edinburgh University. While there, he was involved in research projects at the School of Informatics on computational models of memory and text processing.
- In 2017 Sandy joined DeepMind as founding product manager for its Science Team. He program managed the application of machine learning to protein folding and problems in physics including glassy dynamics and Density Functional Theory. Before DeepMind, Sandy spent 10 years at Amazon as a Senior Software Development Manager, where he was responsible for worldwide dynamic personalised merchandising and led teams mining the product catalogue for relationships that drove features like AutoRip, movie discovery on Fire TV and music discovery on Echo.
-
\ No newline at end of file
diff --git a/_plugins/external-posts.rb b/_plugins/external-posts.rb
deleted file mode 100644
index e4fd5eb69517..000000000000
--- a/_plugins/external-posts.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-require 'feedjira'
-require 'httparty'
-require 'jekyll'
-
-module ExternalPosts
- class ExternalPostsGenerator < Jekyll::Generator
- safe true
- priority :high
-
- def generate(site)
- if site.config['external_sources'] != nil
- site.config['external_sources'].each do |src|
- p "Fetching external posts from #{src['name']}:"
- xml = HTTParty.get(src['rss_url']).body
- feed = Feedjira.parse(xml)
- feed.entries.each do |e|
- p "...fetching #{e.url}"
- slug = e.title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
- path = site.in_source_dir("_posts/#{slug}.md")
- doc = Jekyll::Document.new(
- path, { :site => site, :collection => site.collections['posts'] }
- )
- doc.data['external_source'] = src['name'];
- doc.data['feed_content'] = e.content;
- doc.data['title'] = "#{e.title}";
- doc.data['description'] = e.summary;
- doc.data['date'] = e.published;
- doc.data['redirect'] = e.url;
- site.collections['posts'].docs << doc
- end
- end
- end
- end
- end
-
-end
diff --git a/_plugins/hideCustomBibtex.rb b/_plugins/hideCustomBibtex.rb
deleted file mode 100644
index 4a852fde6a6e..000000000000
--- a/_plugins/hideCustomBibtex.rb
+++ /dev/null
@@ -1,15 +0,0 @@
- module Jekyll
- module HideCustomBibtex
- def hideCustomBibtex(input)
- keywords = @context.registers[:site].config['filtered_bibtex_keywords']
-
- keywords.each do |keyword|
- input = input.gsub(/^.*#{keyword}.*$\n/, '')
- end
-
- return input
- end
- end
-end
-
-Liquid::Template.register_filter(Jekyll::HideCustomBibtex)
diff --git a/_projects/1_bacterialGrowth.md b/_projects/1_bacterialGrowth.md
deleted file mode 100644
index 688baa76dfa5..000000000000
--- a/_projects/1_bacterialGrowth.md
+++ /dev/null
@@ -1,24 +0,0 @@
----
-layout: page
-title: Bacterial growth
-description: Investigating bacterial growth and how it is controlled
-img: assets/img/12.jpg
-importance: 1
-category: work
----
-
-Bacterial growth offers vital insights into life, evolution, and disease. The way bacteria grow is intricately linked
-to factors like nutrient availability, competitive interactions, and environmental challenges such as antibiotics. Our
-group focuses on two key areas:
-
-### Multi-scale models of bacterial cells
-Given the pressing rise of antibiotic resistance, we investigate mechanisms and environmental factors affecting drug
-efficacy. Our goal is to derive insights that can enhance existing antibiotic therapies by addressing the misuse and
-overuse of antibiotics.
-
---------
-
-### Emergence of antibiotic resistance
-We develop computational models to investigate bacterial growth adaptation in complex environments. Our models are
-rooted in core cellular mechanisms, which allows us to predict growth as it emerges from the dynamic interplay of
-environmental stimuli with the cell mechanisms.
\ No newline at end of file
diff --git a/_projects/2_syntheticBiology.md b/_projects/2_syntheticBiology.md
deleted file mode 100644
index 2bf3e7549aba..000000000000
--- a/_projects/2_syntheticBiology.md
+++ /dev/null
@@ -1,25 +0,0 @@
----
-layout: page
-title: Synthetic biology
-description: Understanding and optimising synthetic biological systems
-img: assets/img/7.jpg
-importance: 3
-category: work
----
-
-Synthetic biology explores the design and construction of biological components, both for understanding life's
-fundamental principles and applying them in biotechnology. Within this domain, our group is currently engaged in two
-areas:
-
-### Cell-free protein expression
-
-We develop and analyse computational models to probe conditions that drive self-regeneration within cell-free
-expression systems. We aim to both improve the efficiency and sustainability of protein production and gain deeper
-insights into hallmarks of self-regeneration underpinning living systems.
-
---------
-
-### Model inference and optimal experimental design
-
-We develop robust methods for parameter inference and optimal experimental design. These tools allow us to propose
-experiments designed to maximise the insights derived and expedite the design-build-test-learn cycle.
\ No newline at end of file
diff --git a/_projects/3_HAI.md b/_projects/3_HAI.md
deleted file mode 100644
index ce13f88047c9..000000000000
--- a/_projects/3_HAI.md
+++ /dev/null
@@ -1,18 +0,0 @@
----
-layout: page
-title: Health data science
-description: Leveraging data to improve healthcare
-img: assets/img/1.jpg
-importance: 3
-category: work
----
-
-Health data science leverages data-driven approaches for critical healthcare challenges. Our primary focus is centred
-on:
-
-### Healthcare-associated infections (HAIs)
-
-Using network analysis, we investigate transmission dynamics of HAIs among hospital patients. Our goal is to pinpoint
-outbreak clusters, elucidate transmission routes, and derive insights to guide effective infection control strategies.
-We focus on the transmission of multi-drug resistant bacteria, which complements our foundational research into factors
-driving the emergence and spread of antibiotic resistance.
\ No newline at end of file
diff --git a/_projects/6_project.md b/_projects/6_project.md
deleted file mode 100644
index 9a95d6e89d96..000000000000
--- a/_projects/6_project.md
+++ /dev/null
@@ -1,80 +0,0 @@
----
-layout: page
-title: project 6
-description: a project with no image
-img:
-importance: 4
-category: fun
----
-
-Every project has a beautiful feature showcase page.
-It's easy to include images in a flexible 3-column grid format.
-Make your photos 1/3, 2/3, or full width.
-
-To give your project a background in the portfolio page, just add the img tag to the front matter like so:
-
- ---
- layout: page
- title: project
- description: a project with a background image
- img: /assets/img/12.jpg
- ---
-
-
- Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles.
-
- This image can also have a caption. It's like magic.
-
-
-You can also put regular text between your rows of images.
-Say you wanted to write a little bit about your project before you posted the rest of the images.
-You describe how you toiled, sweated, *bled* for your project, and then... you reveal its glory in the next row of images.
-
-
-
- You can also have artistically styled 2/3 + 1/3 images, like these.
-
-
-
-The code is simple.
-Just wrap your images with `
` and place them inside `
` (read more about the Bootstrap Grid system).
-To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes.
-Here's the code for the last row of images above:
-
-{% raw %}
-```html
-
\ No newline at end of file
diff --git a/assets/alumni/allanBeveridge/index.html b/assets/alumni/allanBeveridge/index.html
new file mode 100644
index 000000000000..0e12fa8002e6
--- /dev/null
+++ b/assets/alumni/allanBeveridge/index.html
@@ -0,0 +1 @@
+ Allan Beveridge | Biomedical Computation Group
Allan Beveridge
Research Software Engineer
\ No newline at end of file
diff --git a/assets/alumni/emilyGaughan.md b/assets/alumni/emilyGaughan.md
deleted file mode 100644
index 5d157a521677..000000000000
--- a/assets/alumni/emilyGaughan.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-layout: page
-title: Emily Gaughan
-description: Honours student
-img:
-importance: 1
-category: Honours students
----
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/assets/alumni/emilyGaughan/index.html b/assets/alumni/emilyGaughan/index.html
new file mode 100644
index 000000000000..ea30dbe037f0
--- /dev/null
+++ b/assets/alumni/emilyGaughan/index.html
@@ -0,0 +1 @@
+ Emily Gaughan | Biomedical Computation Group
Emily Gaughan
Honours student
\ No newline at end of file
diff --git a/assets/alumni/evangelosNikolados.md b/assets/alumni/evangelosNikolados.md
deleted file mode 100644
index 72c0e95642a8..000000000000
--- a/assets/alumni/evangelosNikolados.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-layout: page
-title: Evangelos Nikolados
-description: Research Assistant
-img:
-importance: 1
-category: Staff
----
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/assets/alumni/evangelosNikolados/index.html b/assets/alumni/evangelosNikolados/index.html
new file mode 100644
index 000000000000..eb751e09fbf5
--- /dev/null
+++ b/assets/alumni/evangelosNikolados/index.html
@@ -0,0 +1 @@
+ Evangelos Nikolados | Biomedical Computation Group
Evangelos Nikolados
Research Assistant
\ No newline at end of file
diff --git a/assets/alumni/ruiboZhang.md b/assets/alumni/ruiboZhang.md
deleted file mode 100644
index 85e593208f08..000000000000
--- a/assets/alumni/ruiboZhang.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-layout: page
-title: Ruibo Zhang
-description: Honours student
-img:
-importance: 1
-category: Honours students
----
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/assets/alumni/ruiboZhang/index.html b/assets/alumni/ruiboZhang/index.html
new file mode 100644
index 000000000000..1cb07fdc5e2b
--- /dev/null
+++ b/assets/alumni/ruiboZhang/index.html
@@ -0,0 +1 @@
+ Ruibo Zhang | Biomedical Computation Group
Ruibo Zhang
Honours student
\ No newline at end of file
diff --git a/assets/alumni/seungwonKo.md b/assets/alumni/seungwonKo.md
deleted file mode 100644
index aeeffca31fe2..000000000000
--- a/assets/alumni/seungwonKo.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-layout: page
-title: Seungwon Ko
-description: Honours student
-img:
-importance: 1
-category: Honours students
----
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/assets/alumni/seungwonKo/index.html b/assets/alumni/seungwonKo/index.html
new file mode 100644
index 000000000000..150e9118bb98
--- /dev/null
+++ b/assets/alumni/seungwonKo/index.html
@@ -0,0 +1 @@
+ Seungwon Ko | Biomedical Computation Group
Seungwon Ko
Honours student
\ No newline at end of file
diff --git a/assets/css/main.css b/assets/css/main.css
new file mode 100644
index 000000000000..e5ec036b2fa5
--- /dev/null
+++ b/assets/css/main.css
@@ -0,0 +1,4 @@
+:root{--global-bg-color:#fff;--global-code-bg-color:rgba(181,9,172,0.05);--global-text-color:#484848;--global-text-color-light:#828282;--global-theme-color:#b509ac;--global-hover-color:#b509ac;--global-footer-bg-color:#1c1c1d;--global-footer-text-color:#cfcfcf;--global-footer-link-color:#fff;--global-distill-app-color:#828282;--global-divider-color:rgba(0,0,0,.3);--global-card-bg-color:#fff}:root .fa-sun{display:none}:root .fa-moon{padding-left:10px;padding-top:12px;display:block}:root .repo-img-light{display:block}:root .repo-img-dark{display:none}html[data-theme=dark]{--global-bg-color:#1c1c1d;--global-code-bg-color:#2c3237;--global-text-color:#cfcfcf;--global-text-color-light:#cfcfcf;--global-theme-color:#2698ba;--global-hover-color:#2698ba;--global-footer-bg-color:#cfcfcf;--global-footer-text-color:#1c1c1d;--global-footer-link-color:#000;--global-distill-app-color:#cfcfcf;--global-divider-color:#424246;--global-card-bg-color:#212529}html[data-theme=dark] .fa-sun{padding-left:10px;padding-top:12px;display:block}html[data-theme=dark] .fa-moon{display:none}html[data-theme=dark] .repo-img-light{display:none}html[data-theme=dark] .repo-img-dark{display:block}body{padding-bottom:70px;color:var(--global-text-color);background-color:var(--global-bg-color)}body h1,body h2,body h3,body h4,body h5,body h6{scroll-margin-top:66px}body.fixed-top-nav{padding-top:56px}body.sticky-bottom-footer{padding-bottom:0}.container{max-width:800px}.profile img{width:100%}p,h1,h2,h3,h4,h5,h6,em,div,li,span,strong{color:var(--global-text-color)}hr{border-top:1px solid var(--global-divider-color)}table td,table th{color:var(--global-text-color)}table td{font-size:1rem}a,table.table a{color:var(--global-theme-color)}a:hover,table.table a:hover{color:var(--global-theme-color);text-decoration:underline}a:hover:after :not(.nav-item.dropdown),table.table a:hover:after :not(.nav-item.dropdown){width:100%}figure,img{max-width:90vw}blockquote{background:var(--global-bg-color);border-left:2px solid var(--global-theme-color);margin:1.5em 10px;padding:.5em 10px;font-size:1.2rem}.equation{margin-bottom:1rem;text-align:center}.caption{font-size:.875rem;margin-top:.75rem;margin-bottom:1.5rem;text-align:center}.card{background-color:var(--global-card-bg-color)}.card img{width:100%}.card .card-title{color:var(--global-text-color)}.card .card-item{width:auto;margin-bottom:10px}.card .card-item .row{display:flex;align-items:center}.citation,.citation-number{color:var(--global-theme-color)}.profile{width:100%}.profile .address{margin-bottom:5px;margin-top:5px;font-family:monospace}.profile .address p{display:inline-block;margin:0}.profile.float-right{margin-left:1rem}.profile.float-left{margin-right:1rem}@media(min-width:576px){.profile{width:30%}.profile .address p{display:block}}.post-description{margin-bottom:2rem;font-size:.875rem}.post-description a{color:inherit}.post-description a:hover{color:var(--global-theme-color);text-decoration:none}.navbar{box-shadow:none;border-bottom:1px solid var(--global-divider-color);background-color:var(--global-bg-color);opacity:.95}.navbar .dropdown-menu{background-color:var(--global-bg-color);border:1px solid var(--global-divider-color)}.navbar .dropdown-menu a:not(.active){color:var(--global-text-color)}.navbar .dropdown-menu a:hover{color:var(--global-hover-color)}.navbar .dropdown-menu .dropdown-divider{border-top:1px solid var(--global-divider-color)!important}.dropdown-item{color:var(--global-text-color)}.dropdown-item:hover{color:var(--global-hover-color);background-color:var(--global-bg-color)}.navbar.navbar-light a:hover{text-decoration:none}.navbar.navbar-light .navbar-brand{color:var(--global-text-color)}.navbar.navbar-light .navbar-nav .nav-item .nav-link{color:var(--global-text-color)}.navbar.navbar-light .navbar-nav .nav-item .nav-link:hover{color:var(--global-hover-color)}.navbar.navbar-light .navbar-nav .nav-item.active>.nav-link{background-color:inherit;font-weight:bolder;color:var(--global-theme-color)}.navbar.navbar-light .navbar-nav .nav-item.active>.nav-link:hover{color:var(--global-hover-color)}.navbar.navbar-light .navbar-brand.social{padding-bottom:0;padding-top:0;font-size:1.7rem}.navbar.navbar-light .navbar-brand.social a i::before{color:var(--global-text-color);transition-property:all .2s ease-in-out}.navbar.navbar-light .navbar-brand.social a:hover i::before{color:var(--global-theme-color)}.navbar-toggler .icon-bar{display:block;width:22px;height:2px;background-color:var(--global-text-color);border-radius:1px;margin-bottom:4px;transition:all .2s}.navbar-toggler .top-bar{transform:rotate(45deg);transform-origin:10% 10%}.navbar-toggler .middle-bar{opacity:0}.navbar-toggler .bottom-bar{transform:rotate(-45deg);transform-origin:10% 90%}.navbar-toggler.collapsed .top-bar{transform:rotate(0)}.navbar-toggler.collapsed .middle-bar{opacity:1}.navbar-toggler.collapsed .bottom-bar{transform:rotate(0)}#light-toggle{padding:0;border:0;background-color:inherit;color:var(--global-text-color)}#light-toggle:hover{color:var(--global-hover-color)}
+.social{text-align:center}.social .contact-icons{font-size:4rem}.social .contact-icons a i::before{color:var(--global-text-color);transition-property:all .2s ease-in-out}.social .contact-icons a:hover i::before{color:var(--global-theme-color)}.social .contact-note{font-size:.8rem}footer.fixed-bottom{background-color:var(--global-footer-bg-color);font-size:.75rem}footer.fixed-bottom .container{color:var(--global-footer-text-color);padding-top:9px;padding-bottom:8px}footer.fixed-bottom a{color:var(--global-footer-link-color)}footer.fixed-bottom a:hover{color:var(--global-theme-color);text-decoration:none}footer.sticky-bottom{border-top:1px solid var(--global-divider-color);padding-top:40px;padding-bottom:40px;font-size:.9rem}.cv{margin-bottom:40px}.cv .card{background-color:var(--global-card-bg-color);border:1px solid var(--global-divider-color)}.cv .card .list-group-item{background-color:inherit;border-color:var(--global-divider-color)}.cv .card .list-group-item .badge{color:var(--global-card-bg-color)!important;background-color:var(--global-theme-color)!important}@media(min-width:768px){.repo{max-width:50%}}.header-bar{border-bottom:1px solid var(--global-divider-color);text-align:center;padding-top:2rem;padding-bottom:3rem}.header-bar h1{color:var(--global-theme-color);font-size:5rem}.tag-list{border-bottom:1px solid var(--global-divider-color);text-align:center;padding-top:1rem}.tag-list ul{justify-content:center;display:flow-root}.tag-list ul p,.tag-list ul li{list-style:none;display:inline-block;padding:1rem .5rem;color:var(--global-text-color-light)}.post-list{margin:0;margin-bottom:40px;padding:0}.post-list li{border-bottom:1px solid var(--global-divider-color);list-style:none;padding-top:2rem;padding-bottom:2rem}.post-list li .post-meta{color:var(--global-text-color-light);font-size:.875rem;margin-bottom:0}.post-list li .post-tags{color:var(--global-text-color-light);font-size:.875rem;padding-top:.25rem;padding-bottom:0}.post-list li a{color:var(--global-text-color);text-decoration:none}.post-list li a:hover{color:var(--global-theme-color)}.pagination .page-item .page-link{color:var(--global-text-color)}.pagination .page-item .page-link:hover{color:#000}.pagination .page-item.active .page-link{color:#fff;background-color:var(--global-theme-color)}.pagination .page-item.active .page-link:hover{background-color:var(--global-theme-color)}.distill a:hover{border-bottom-color:var(--global-theme-color);text-decoration:none}.projects a{text-decoration:none}.projects a:hover .card-title{color:var(--global-theme-color)}.projects .card img{width:100%}.projects .card-item{width:auto;margin-bottom:10px}.projects .card-item .row{display:flex;align-items:center}.projects .grid-sizer,.projects .grid-item{width:250px;margin-bottom:10px}.projects h2.category{color:var(--global-divider-color);border-bottom:1px solid var(--global-divider-color);padding-top:.5rem;margin-top:2rem;margin-bottom:1rem;text-align:right}.people a{text-decoration:none}.people a:hover .card-title{color:var(--global-theme-color)}.people .card img{width:100%}.people .card-item{width:auto;margin-bottom:10px}.people .card-item .row{display:flex;align-items:center}.people .grid-sizer,.people .grid-item{width:250px;margin-bottom:10px}.people h2.category{color:var(--global-divider-color);border-bottom:1px solid var(--global-divider-color);padding-top:.5rem;margin-top:2rem;margin-bottom:1rem;text-align:right}.projects a{text-decoration:none}.projects a:hover .card-title{color:var(--global-theme-color)}.projects .card img{width:100%}.projects .card-item{width:auto;margin-bottom:10px}.projects .card-item .row{display:flex;align-items:center}.projects .grid-sizer,.projects .grid-item{width:250px;margin-bottom:10px}.projects h2.category{color:var(--global-divider-color);border-bottom:1px solid var(--global-divider-color);padding-top:.5rem;margin-top:2rem;margin-bottom:1rem;text-align:right}.publications{margin-top:2rem}.publications h1{color:var(--global-theme-color);font-size:2rem;text-align:center;margin-top:1em;margin-bottom:1em}.publications h2{margin-bottom:1rem}.publications h2 span{font-size:1.5rem}.publications h2.year{color:var(--global-divider-color);border-top:1px solid var(--global-divider-color);padding-top:1rem;margin-top:2rem;margin-bottom:-2rem;text-align:right}.publications ol.bibliography{list-style:none;padding:0;margin-top:0}.publications ol.bibliography li{margin-bottom:1rem}.publications ol.bibliography li .preview{width:100%;min-width:80px;max-width:200px}.publications ol.bibliography li .abbr{height:2rem;margin-bottom:.5rem}.publications ol.bibliography li .abbr abbr{display:inline-block;background-color:var(--global-theme-color);padding-left:1rem;padding-right:1rem}.publications ol.bibliography li .abbr abbr a{color:white}.publications ol.bibliography li .abbr abbr a:hover{text-decoration:none}.publications ol.bibliography li .abbr .award{color:var(--global-theme-color)!important;border:1px solid var(--global-theme-color)}.publications ol.bibliography li .title{font-weight:bolder}
+.publications ol.bibliography li .author a{border-bottom:1px dashed var(--global-theme-color)}.publications ol.bibliography li .author a:hover{border-bottom-style:solid;text-decoration:none}.publications ol.bibliography li .author>em{border-bottom:1px solid;font-style:normal}.publications ol.bibliography li .author>span.more-authors{color:var(--global-text-color-light);border-bottom:1px dashed var(--global-text-color-light);cursor:pointer}.publications ol.bibliography li .author>span.more-authors:hover{color:var(--global-text-color);border-bottom:1px dashed var(--global-text-color)}.publications ol.bibliography li .links a.btn{color:var(--global-text-color);border:1px solid var(--global-text-color);padding-left:1rem;padding-right:1rem;padding-top:.25rem;padding-bottom:.25rem}.publications ol.bibliography li .links a.btn:hover{color:var(--global-theme-color);border-color:var(--global-theme-color)}.publications ol.bibliography li .badges span{display:inline-block;color:#000;height:100%;padding-left:.5rem;vertical-align:middle}.publications ol.bibliography li .badges span:hover{text-decoration:underline}.publications ol.bibliography li .hidden{font-size:.875rem;max-height:0;overflow:hidden;text-align:justify;transition-property:.15s ease;-moz-transition:.15s ease;-ms-transition:.15s ease;-o-transition:.15s ease;transition:all .15s ease}.publications ol.bibliography li .hidden p{line-height:1.4em;margin:10px}.publications ol.bibliography li .hidden pre{font-size:1em;line-height:1.4em;padding:10px}.publications ol.bibliography li .hidden.open{max-height:100em;transition-property:.15s ease;-moz-transition:.15s ease;-ms-transition:.15s ease;-o-transition:.15s ease;transition:all .15s ease}.publications ol.bibliography li div.abstract.hidden{border:dashed 1px var(--global-bg-color)}.publications ol.bibliography li div.abstract.hidden.open{border-color:var(--global-text-color)}figure.highlight{margin:0 0 1rem}pre{color:var(--global-theme-color);background-color:var(--global-code-bg-color);border-radius:6px;padding:6px 12px}pre pre,pre code{background-color:transparent;border-radius:0;padding:0}code{color:var(--global-theme-color);background-color:var(--global-code-bg-color);border-radius:3px;padding:3px 3px}html.transition,html.transition *,html.transition *:before,html.transition *:after{transition:all 750ms!important;transition-delay:0!important}.post .post-meta{color:var(--global-text-color-light);font-size:.875rem;margin-bottom:0}.post .post-tags{color:var(--global-text-color-light);font-size:.875rem;padding-top:.25rem;padding-bottom:1rem}.post .post-tags a{color:var(--global-text-color-light);text-decoration:none}.post .post-tags a:hover{color:var(--global-theme-color)}.post .post-content blockquote{border-left:5px solid var(--global-theme-color);padding:8px}progress{position:fixed;left:0;top:56px;z-index:10;width:100%;height:1px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background-color:transparent;color:var(--global-theme-color)}progress::-webkit-progress-bar{background-color:transparent}progress::-webkit-progress-value{background-color:var(--global-theme-color)}progress::-moz-progress-bar{background-color:var(--global-theme-color)}.progress-container{width:100%;background-color:transparent;position:fixed;top:56px;left:0;height:5px;display:block}.progress-bar{background-color:var(--global-theme-color);width:0;display:block;height:inherit}d-byline{border-top-color:var(--global-divider-color)!important}d-byline h3{color:var(--global-text-color)!important}d-byline a,d-article d-byline a{color:var(--global-text-color)!important}d-byline a:hover,d-article d-byline a:hover{color:var(--global-hover-color)!important}d-article{border-top-color:var(--global-divider-color)!important}d-article p,d-article h1,d-article h2,d-article h3,d-article h4,d-article h5,d-article h6,d-article li,d-article table{color:var(--global-text-color)!important}d-article h1,d-article h2,d-article hr,d-article table,d-article table th,d-article table td{border-bottom-color:var(--global-divider-color)!important}d-article a{color:var(--global-theme-color)!important}d-article a:hover{color:var(--global-theme-color)!important}d-article b i{display:inline}d-article d-contents{align-self:start;grid-column:1/4;grid-row:auto/span 4;justify-self:end;margin-top:0;padding-left:2em;padding-right:3em;border-right:1px solid var(--global-divider-color);width:max(70%,300px);margin-right:0;margin-top:0;display:grid;grid-template-columns:minmax(8px,1fr) [toc] auto minmax(8px,1fr) [toc-line] 1px minmax(32px,2fr)}d-article d-contents nav{grid-column:toc}d-article d-contents nav a{border-bottom:none!important}d-article d-contents nav a:hover{border-bottom:1px solid var(--global-text-color)!important}d-article d-contents nav h3{margin-top:0;margin-bottom:1em}d-article d-contents nav div{display:block;outline:0;margin-bottom:.8em;color:rgba(0,0,0,0.8);font-weight:bold}d-article d-contents nav ul{padding-left:1em;margin-top:0;margin-bottom:6px;list-style-type:none}
+d-article d-contents nav ul li{margin-bottom:.25em}d-article d-contents .figcaption{line-height:1.4em}d-article d-contents toc-line{border-right:1px solid var(--global-divider-color);grid-column:toc-line}d-article d-footnote{scroll-margin-top:66px}d-appendix{border-top-color:var(--global-divider-color)!important;color:var(--global-distill-app-color)!important}d-appendix h3,d-appendix li,d-appendix span{color:var(--global-distill-app-color)!important}d-appendix a,d-appendix a.footnote-backlink{color:var(--global-distill-app-color)!important}d-appendix a:hover,d-appendix a.footnote-backlink:hover{color:var(--global-hover-color)!important}@media(max-width:1024px){d-article d-contents{display:block;grid-column-start:2;grid-column-end:-2;padding-bottom:.5em;margin-bottom:1em;padding-top:.5em;width:100%;border:1px solid var(--global-divider-color)}d-article d-contents nav{grid-column:none}}
\ No newline at end of file
diff --git a/assets/css/main.css.map b/assets/css/main.css.map
new file mode 100644
index 000000000000..6e6249292538
--- /dev/null
+++ b/assets/css/main.css.map
@@ -0,0 +1 @@
+{"version":3,"sourceRoot":"","sources":["../../_sass/_variables.scss","../../_sass/_themes.scss","../../_sass/_layout.scss","main.scss","../../_sass/_base.scss","../../_sass/_distill.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAAA;ACAA;AAAA;AAAA;AAIA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAEF;EACE;EACA;EACA;;AAGF;EACE;;AAEF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAEF;EACE;;AAGF;EACE;;AAEF;EACE;;;AC9DJ;AAAA;AAAA;AAIA;EACE;EACA;EACA;;AAEA;EACE;;;AAIJ;EAEE;;;AAGF;EAEE;;;AAGF;EACE,WCtBkB;;;AD2BlB;EACE;;;AAOJ;AAAA;AAAA;AAOA;AAAA;AAAA;AE7CA;AAAA;AAAA;AAMA;EACE;;;AAGF;EACE;;;AAIA;EACE;;AAEF;EACE;;;AAIJ;EACE;;AACA;EACE;EACA;;AAEF;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAKF;EACE;EACA;;;AAKF;EACE;EACA;EACA;EACA;;;AAKF;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAEA;EACE;EACA;;;AAON;EACE;;;AAKF;EACE;;AAEA;EACE;EACA;EACA;;AACA;EACE;EACA;;;AAIN;EACE;;;AAEF;EACE;;;AAGF;EACE;IACE;;EAEE;IAAI;;;AAKV;EACE;EACA;;AACA;EACE;;AACA;EACE;EACA;;;AAQN;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;;AACA;EACE;;AAEF;EACE;;AAEF;EACE;;;AAGJ;EACE;;AACE;EACE;EACA;;;AAKF;EACE;;AAGJ;EACE;;AAEF;EACE;;AACA;EACE;;AAGJ;EACI;EACA;EACA;;AACA;EACE;;AAGN;EACE;EACA;EACA;;AAEE;EACE;EACA;;AAGA;EACE;;;AAQR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;;AAEF;EACE;;AAEF;EACE;EACA;;;AAKF;EACE;;AAEF;EACE;;AAEF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;AACA;EACE;;;AAMJ;EACE;;AACA;EACE;;AAEE;EACE;EACA;;AAGA;EACE;;AAKR;EACE;;;AAMJ;EACE;EACA;;AACA;EACE;EACA;EACA;;AAEF;EACE;;AACA;EACE;EACA;;;AAKN;EACE;EACA;EACA;EACA;;;AAKF;EACE;;AAEA;EACE;EACA;;AAEA;EACE;EACA;;AAEA;EACE;EACA;;;AAQR;EACE;IACE;;;AAMJ;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;;;AAIJ;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;;;AAKN;EACE;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;;AACA;EACE;;;AAQJ;EACE;;AACA;EACE,OJ1WM;;AI6WV;EACE,OJ/WQ;EIgXR;;AACA;EACE;;;AAUN;EACE;EACA;;;AAQF;EACE;;AAGE;EACE;;AAMJ;EACE;;AAIJ;EACE;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAQF;EACE;;AAGE;EACE;;AAMJ;EACE;;AAIJ;EACE;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAQF;EACE;;AAGE;EACE;;AAMJ;EACE;;AAIJ;EACE;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAOJ;EACE;;AACA;EACE;EACA;EACA;EACA;EACA;;AAEF;EACE;;AACA;EACE;;AAGJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAEA;EACE;;AACA;EACE;EACA;EACA;;AAEF;EACE;EACA;;AACA;EACE;EACA;EACA;EACA;;AACA;EACE;;AACA;EACE;;AAIN;EACE;EACA;;AAGJ;EACE;;AAGA;EACE;;AACA;EACI;EACA;;AAGN;EACE;EACA;;AAEF;EACE;EACA;EACA;;AACA;EACI;EACA;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AAKJ;EACE;EACA,OJ5mBI;EI6mBJ;EACA;EACA;;AACA;EACE;;AAIN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEF;EACE;EACA;EACA;;AAGJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAEF;EACE;;AAEF;EACE;;;AAOR;EACE;;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;;;AAIJ;EACE;EACA;EACA;EACA;;;AAKF;AAAA;AAAA;AAAA;EAIE;EACA;;;AAKA;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;;AACA;EACE;;AAKJ;EACE;EACA;;;AAKN;AACK;EACA;EACA;EACA;EACA;AAEA;EACA;EACA;AAEA;EACA;EACG;EACK;AAER;EACA;AAEA;EACA;AAEA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AC9yBL;AAAA;AAAA;AAIA;EACE;;;AAGF;EACE;;;AAGF;EACE;;AACA;EACE;;;AAIJ;EACE;;AACA;EACE;;AAEF;EACE;;AAEF;EACE;;AACA;EACE;;AAGJ;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,uBACE;;AAIF;EACE;;AACA;EACE;;AACA;EACE;;AAGJ;EACE;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;AACA;EACE;;AAIN;EACE;;AAEF;EACE;EACA;;AAIJ;EACE;;;AAIJ;EACE;EACA;;AACA;EACE;;AAEF;EACE;;AACA;EACE;;;AAKN;EAEI;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EACA;IACE","sourcesContent":["/*******************************************************************************\n * Variables used throughout the theme.\n * To adjust anything, simply edit the variables below and rebuild the theme.\n ******************************************************************************/\n\n\n// Colors\n$red-color: #FF3636 !default;\n$red-color-dark: #B71C1C !default;\n$orange-color: #F29105 !default;\n$blue-color: #0076df !default;\n$blue-color-dark: #00369f !default;\n$cyan-color: #2698BA !default;\n$light-cyan-color: lighten($cyan-color, 25%);\n$green-color: #00ab37 !default;\n$green-color-lime: #B7D12A !default;\n$green-color-dark: #009f06 !default;\n$green-color-light: #ddffdd !default;\n$green-color-bright: #11D68B !default;\n$purple-color: #B509AC !default;\n$light-purple-color: lighten($purple-color, 25%);\n$pink-color: #f92080 !default;\n$pink-color-light: #ffdddd !default;\n$yellow-color: #efcc00 !default;\n\n$grey-color: #828282 !default;\n$grey-color-light: lighten($grey-color, 30%);\n$grey-color-dark: #1C1C1D;\n$grey-900: #212529;\n$grey-light-text: #484848;\n\n$white-color: #ffffff !default;\n$black-color: #000000 !default;\n\n\n// Theme colors\n\n$code-bg-color-light: rgba($purple-color, 0.05);\n$code-bg-color-dark: #2c3237 !default;\n","/*******************************************************************************\r\n * Themes\r\n ******************************************************************************/\r\n \r\n:root {\r\n --global-bg-color: #{$white-color};\r\n --global-code-bg-color: #{$code-bg-color-light};\r\n --global-text-color: #{$grey-light-text};\r\n --global-text-color-light: #{$grey-color};\r\n --global-theme-color: #{$purple-color};\r\n --global-hover-color: #{$purple-color};\r\n --global-footer-bg-color: #{$grey-color-dark};\r\n --global-footer-text-color: #{$grey-color-light};\r\n --global-footer-link-color: #{$white-color};\r\n --global-distill-app-color: #{$grey-color};\r\n --global-divider-color: rgba(0,0,0,.3);\r\n --global-card-bg-color: #{$white-color};\r\n\r\n .fa-sun {\r\n display : none;\r\n }\r\n .fa-moon {\r\n padding-left: 10px;\r\n padding-top: 12px;\r\n display : block;\r\n }\r\n\r\n .repo-img-light {\r\n display: block;\r\n }\r\n .repo-img-dark {\r\n display: none;\r\n }\r\n}\r\n\r\nhtml[data-theme='dark'] {\r\n --global-bg-color: #{$grey-color-dark};\r\n --global-code-bg-color: #{$code-bg-color-dark};\r\n --global-text-color: #{$grey-color-light};\r\n --global-text-color-light: #{$grey-color-light};\r\n --global-theme-color: #{$cyan-color};\r\n --global-hover-color: #{$cyan-color};\r\n --global-footer-bg-color: #{$grey-color-light};\r\n --global-footer-text-color: #{$grey-color-dark};\r\n --global-footer-link-color: #{$black-color};\r\n --global-distill-app-color: #{$grey-color-light};\r\n --global-divider-color: #424246;\r\n --global-card-bg-color: #{$grey-900};\r\n\r\n .fa-sun {\r\n padding-left: 10px;\r\n padding-top: 12px;\r\n display : block;\r\n }\r\n .fa-moon {\r\n display : none;\r\n }\r\n\r\n .repo-img-light {\r\n display: none;\r\n }\r\n .repo-img-dark {\r\n display: block;\r\n }\r\n}\r\n","/******************************************************************************\n * Content\n ******************************************************************************/\n\nbody {\n padding-bottom: 70px;\n color: var(--global-text-color);\n background-color: var(--global-bg-color);\n\n h1, h2, h3, h4, h5, h6 {\n scroll-margin-top: 66px;\n }\n}\n\nbody.fixed-top-nav {\n // Add some padding for the nav-bar.\n padding-top: 56px;\n}\n\nbody.sticky-bottom-footer {\n // Remove padding below footer.\n padding-bottom: 0;\n}\n\n.container {\n max-width: $max-content-width;\n}\n\n// Profile\n.profile {\n img {\n width: 100%;\n }\n}\n\n// TODO: redefine content layout.\n\n\n/******************************************************************************\n * Publications\n ******************************************************************************/\n\n// TODO: redefine publications layout.\n\n\n/*****************************************************************************\n* Projects\n*****************************************************************************/\n\n// TODO: redefine projects layout.\n","@charset \"utf-8\";\n\n// Dimensions\n$max-content-width: 800px;\n\n@import\n \"variables\",\n \"themes\",\n \"layout\",\n \"base\",\n \"distill\"\n;\n","/*******************************************************************************\n * Styles for the base elements of the theme.\n ******************************************************************************/\n\n// Typography\n\np, h1, h2, h3, h4, h5, h6, em, div, li, span, strong {\n color: var(--global-text-color);\n}\n\nhr {\n border-top: 1px solid var(--global-divider-color);\n}\n\ntable {\n td, th {\n color: var(--global-text-color);\n }\n td {\n font-size: 1rem;\n }\n}\n\na, table.table a {\n color: var(--global-theme-color);\n &:hover {\n color: var(--global-theme-color);\n text-decoration: underline;\n }\n &:hover:after :not(.nav-item.dropdown) {\n width: 100%;\n }\n}\n\nfigure, img {\n max-width: 90vw;\n}\n\nblockquote {\n background: var(--global-bg-color);\n border-left: 2px solid var(--global-theme-color);\n margin: 1.5em 10px;\n padding: 0.5em 10px;\n font-size: 1.2rem;\n}\n\n// Math\n\n.equation {\n margin-bottom: 1rem;\n text-align: center;\n}\n\n// Caption\n\n.caption {\n font-size: 0.875rem;\n margin-top: 0.75rem;\n margin-bottom: 1.5rem;\n text-align: center;\n}\n\n// Card\n\n.card {\n background-color: var(--global-card-bg-color);\n\n img {\n width: 100%;\n }\n\n .card-title {\n color: var(--global-text-color);\n }\n\n .card-item {\n width: auto;\n margin-bottom: 10px;\n\n .row {\n display: flex;\n align-items: center;\n }\n }\n}\n\n// Citation\n\n.citation, .citation-number {\n color: var(--global-theme-color);\n}\n\n// Profile\n\n.profile {\n width: 100%;\n\n .address {\n margin-bottom: 5px;\n margin-top: 5px;\n font-family: monospace;\n p {\n display: inline-block;\n margin: 0;\n }\n }\n}\n.profile.float-right{\n margin-left: 1rem;\n}\n.profile.float-left{\n margin-right: 1rem;\n}\n\n@media (min-width: 576px) {\n .profile {\n width: 30%;\n .address {\n p { display: block; }\n }\n }\n}\n\n.post-description {\n margin-bottom: 2rem;\n font-size: 0.875rem;\n a {\n color: inherit;\n &:hover {\n color: var(--global-theme-color);\n text-decoration: none;\n }\n }\n}\n\n\n// Navbar customization\n\n.navbar {\n box-shadow: none;\n border-bottom: 1px solid var(--global-divider-color);\n background-color: var(--global-bg-color);\n opacity: 0.95;\n}\n.navbar .dropdown-menu {\n background-color: var(--global-bg-color);\n border: 1px solid var(--global-divider-color);\n a:not(.active) {\n color: var(--global-text-color);\n }\n a:hover {\n color: var(--global-hover-color);\n }\n .dropdown-divider {\n border-top: 1px solid var(--global-divider-color) !important;\n }\n}\n.dropdown-item {\n color: var(--global-text-color);\n &:hover {\n color: var(--global-hover-color);\n background-color: var(--global-bg-color);\n }\n}\n.navbar.navbar-light {\n a {\n &:hover {\n text-decoration: none;\n }\n }\n .navbar-brand {\n color: var(--global-text-color);\n }\n .navbar-nav .nav-item .nav-link {\n color: var(--global-text-color);\n &:hover {\n color: var(--global-hover-color);\n }\n }\n .navbar-nav .nav-item.active>.nav-link {\n background-color: inherit;\n font-weight: bolder;\n color: var(--global-theme-color);\n &:hover {\n color: var(--global-hover-color);\n }\n }\n .navbar-brand.social {\n padding-bottom: 0;\n padding-top: 0;\n font-size: 1.7rem;\n a {\n i::before {\n color: var(--global-text-color);\n transition-property: all 0.2s ease-in-out;\n }\n &:hover {\n i::before {\n color: var(--global-theme-color);\n }\n }\n }\n }\n}\n\n.navbar-toggler {\n .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n background-color: var(--global-text-color);\n border-radius: 1px;\n margin-bottom: 4px;\n transition: all 0.2s;\n }\n .top-bar {\n transform: rotate(45deg);\n transform-origin: 10% 10%;\n }\n .middle-bar {\n opacity: 0;\n }\n .bottom-bar {\n transform: rotate(-45deg);\n transform-origin: 10% 90%;\n }\n}\n\n.navbar-toggler.collapsed {\n .top-bar {\n transform: rotate(0);\n }\n .middle-bar {\n opacity: 1;\n }\n .bottom-bar {\n transform: rotate(0);\n }\n}\n\n#light-toggle {\n padding: 0;\n border: 0;\n background-color: inherit;\n color: var(--global-text-color);\n &:hover {\n color: var(--global-hover-color);\n }\n}\n\n// Social (bottom)\n\n.social {\n text-align: center;\n .contact-icons {\n font-size: 4rem;\n a {\n i::before {\n color: var(--global-text-color);\n transition-property: all 0.2s ease-in-out;\n }\n &:hover {\n i::before {\n color: var(--global-theme-color);\n }\n }\n }\n }\n .contact-note {\n font-size: 0.8rem;\n }\n}\n\n\n// Footer\nfooter.fixed-bottom {\n background-color: var(--global-footer-bg-color);\n font-size: 0.75rem;\n .container {\n color: var(--global-footer-text-color);\n padding-top: 9px;\n padding-bottom: 8px;\n }\n a {\n color: var(--global-footer-link-color);\n &:hover {\n color: var(--global-theme-color);\n text-decoration: none;\n }\n }\n}\n\nfooter.sticky-bottom {\n border-top: 1px solid var(--global-divider-color);\n padding-top: 40px;\n padding-bottom: 40px;\n font-size: 0.9rem;\n}\n\n// CV\n\n.cv {\n margin-bottom: 40px;\n \n .card {\n background-color: var(--global-card-bg-color);\n border: 1px solid var(--global-divider-color);\n \n .list-group-item {\n background-color: inherit;\n border-color: var(--global-divider-color);\n\n .badge {\n color: var(--global-card-bg-color) !important;\n background-color: var(--global-theme-color) !important;\n }\n }\n }\n}\n\n// Repositories\n\n@media (min-width: 768px) {\n .repo {\n max-width: 50%;\n }\n}\n\n// Blog\n\n.header-bar {\n border-bottom: 1px solid var(--global-divider-color);\n text-align: center;\n padding-top: 2rem;\n padding-bottom: 3rem;\n h1 {\n color: var(--global-theme-color);\n font-size: 5rem;\n }\n}\n\n.tag-list {\n border-bottom: 1px solid var(--global-divider-color);\n text-align: center;\n padding-top: 1rem;\n\n ul {\n justify-content: center;\n display: flow-root;\n\n p, li {\n list-style: none;\n display: inline-block;\n padding: 1rem 0.5rem;\n color: var(--global-text-color-light);\n }\n }\n}\n\n.post-list {\n margin: 0;\n margin-bottom: 40px;\n padding: 0;\n li {\n border-bottom: 1px solid var(--global-divider-color);\n list-style: none;\n padding-top: 2rem;\n padding-bottom: 2rem;\n .post-meta {\n color: var(--global-text-color-light);\n font-size: 0.875rem;\n margin-bottom: 0;\n }\n .post-tags {\n color: var(--global-text-color-light);\n font-size: 0.875rem;\n padding-top: 0.25rem;\n padding-bottom: 0;\n }\n a {\n color: var(--global-text-color);\n text-decoration: none;\n &:hover {\n color: var(--global-theme-color);\n }\n }\n }\n}\n\n.pagination {\n .page-item {\n .page-link {\n color: var(--global-text-color);\n &:hover {\n color: $black-color;\n }\n }\n &.active .page-link {\n color: $white-color;\n background-color: var(--global-theme-color);\n &:hover {\n background-color: var(--global-theme-color);\n }\n }\n }\n}\n\n\n// Distill\n\n.distill {\n a:hover {\n border-bottom-color: var(--global-theme-color);\n text-decoration: none;\n }\n}\n\n\n// Projects\n\n.projects {\n a {\n text-decoration: none;\n\n &:hover {\n .card-title {\n color: var(--global-theme-color);\n }\n }\n }\n\n .card {\n img {\n width: 100%;\n }\n }\n\n .card-item {\n width: auto;\n margin-bottom: 10px;\n\n .row {\n display: flex;\n align-items: center;\n }\n }\n\n .grid-sizer, .grid-item {\n width: 250px;\n margin-bottom: 10px;\n }\n\n h2.category {\n color: var(--global-divider-color);\n border-bottom: 1px solid var(--global-divider-color);\n padding-top: 0.5rem;\n margin-top: 2rem;\n margin-bottom: 1rem;\n text-align: right;\n }\n}\n\n\n// People\n\n.people {\n a {\n text-decoration: none;\n\n &:hover {\n .card-title {\n color: var(--global-theme-color);\n }\n }\n }\n\n .card {\n img {\n width: 100%;\n }\n }\n\n .card-item {\n width: auto;\n margin-bottom: 10px;\n\n .row {\n display: flex;\n align-items: center;\n }\n }\n\n .grid-sizer, .grid-item {\n width: 250px;\n margin-bottom: 10px;\n }\n\n h2.category {\n color: var(--global-divider-color);\n border-bottom: 1px solid var(--global-divider-color);\n padding-top: 0.5rem;\n margin-top: 2rem;\n margin-bottom: 1rem;\n text-align: right;\n }\n}\n\n\n// Projects\n\n.projects {\n a {\n text-decoration: none;\n\n &:hover {\n .card-title {\n color: var(--global-theme-color);\n }\n }\n }\n\n .card {\n img {\n width: 100%;\n }\n }\n\n .card-item {\n width: auto;\n margin-bottom: 10px;\n\n .row {\n display: flex;\n align-items: center;\n }\n }\n\n .grid-sizer, .grid-item {\n width: 250px;\n margin-bottom: 10px;\n }\n\n h2.category {\n color: var(--global-divider-color);\n border-bottom: 1px solid var(--global-divider-color);\n padding-top: 0.5rem;\n margin-top: 2rem;\n margin-bottom: 1rem;\n text-align: right;\n }\n}\n\n\n// Publications\n\n.publications {\n margin-top: 2rem;\n h1 {\n color: var(--global-theme-color);\n font-size: 2rem;\n text-align: center;\n margin-top: 1em;\n margin-bottom: 1em;\n }\n h2 {\n margin-bottom: 1rem;\n span {\n font-size: 1.5rem;\n }\n }\n h2.year {\n color: var(--global-divider-color);\n border-top: 1px solid var(--global-divider-color);\n padding-top: 1rem;\n margin-top: 2rem;\n margin-bottom: -2rem;\n text-align: right;\n }\n ol.bibliography {\n list-style: none;\n padding: 0;\n margin-top: 0;\n\n li {\n margin-bottom: 1rem;\n .preview {\n width: 100%;\n min-width: 80px;\n max-width: 200px;\n }\n .abbr {\n height: 2rem;\n margin-bottom: 0.5rem;\n abbr {\n display: inline-block;\n background-color: var(--global-theme-color);\n padding-left: 1rem;\n padding-right: 1rem;\n a {\n color: white;\n &:hover {\n text-decoration: none;\n }\n }\n }\n .award {\n color: var(--global-theme-color) !important;\n border: 1px solid var(--global-theme-color);\n }\n }\n .title {\n font-weight: bolder;\n }\n .author {\n a {\n border-bottom: 1px dashed var(--global-theme-color);\n &:hover {\n border-bottom-style: solid;\n text-decoration: none;\n }\n }\n > em {\n border-bottom: 1px solid;\n font-style: normal;\n }\n > span.more-authors {\n color: var(--global-text-color-light);\n border-bottom: 1px dashed var(--global-text-color-light);\n cursor: pointer;\n &:hover {\n color: var(--global-text-color);\n border-bottom: 1px dashed var(--global-text-color);\n }\n }\n }\n .links {\n a.btn {\n color: var(--global-text-color);\n border: 1px solid var(--global-text-color);\n padding-left: 1rem;\n padding-right: 1rem;\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n &:hover {\n color: var(--global-theme-color);\n border-color: var(--global-theme-color);\n }\n }\n }\n .badges {\n span {\n display: inline-block;\n color: $black-color;\n height: 100%;\n padding-left: 0.5rem;\n vertical-align: middle;\n &:hover {\n text-decoration: underline;\n }\n }\n }\n .hidden {\n font-size: 0.875rem;\n max-height: 0px;\n overflow: hidden;\n text-align: justify;\n transition-property: 0.15s ease;\n -moz-transition: 0.15s ease;\n -ms-transition: 0.15s ease;\n -o-transition: 0.15s ease;\n transition: all 0.15s ease;\n\n p {\n line-height: 1.4em;\n margin: 10px;\n }\n pre {\n font-size: 1em;\n line-height: 1.4em;\n padding: 10px;\n }\n }\n .hidden.open {\n max-height: 100em;\n transition-property: 0.15s ease;\n -moz-transition: 0.15s ease;\n -ms-transition: 0.15s ease;\n -o-transition: 0.15s ease;\n transition: all 0.15s ease;\n }\n div.abstract.hidden {\n border: dashed 1px var(--global-bg-color);\n }\n div.abstract.hidden.open {\n border-color: var(--global-text-color);\n }\n }\n }\n}\n\n// Rouge Color Customization\nfigure.highlight {\n margin: 0 0 1rem;\n}\n\npre {\n color: var(--global-theme-color);\n background-color: var(--global-code-bg-color);\n border-radius: 6px;\n padding: 6px 12px;\n pre, code {\n background-color: transparent;\n border-radius: 0;\n padding: 0;\n }\n}\n\ncode {\n color: var(--global-theme-color);\n background-color: var(--global-code-bg-color);\n border-radius: 3px;\n padding: 3px 3px;\n}\n\n\n// Transitioning Themes\nhtml.transition,\nhtml.transition *,\nhtml.transition *:before,\nhtml.transition *:after {\n transition: all 750ms !important;\n transition-delay: 0 !important;\n}\n\n// Extra Markdown style (post Customization)\n.post{\n .post-meta{\n color: var(--global-text-color-light);\n font-size: 0.875rem;\n margin-bottom: 0;\n }\n .post-tags{\n color: var(--global-text-color-light);\n font-size: 0.875rem;\n padding-top: 0.25rem;\n padding-bottom: 1rem;\n a {\n color: var(--global-text-color-light);\n text-decoration: none;\n &:hover {\n color: var(--global-theme-color);\n }\n }\n }\n .post-content{\n blockquote {\n border-left: 5px solid var(--global-theme-color);\n padding: 8px;\n }\n }\n}\n\nprogress {\n /* Positioning */\n position: fixed;\n left: 0;\n top: 56px;\n z-index: 10;\n \n /* Dimensions */\n width: 100%;\n height: 1px;\n \n /* Reset the appearance */\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n \n /* Get rid of the default border in Firefox/Opera. */\n border: none;\n \n /* Progress bar container for Firefox/IE10 */\n background-color: transparent;\n \n /* Progress bar value for IE10 */\n color: var(--global-theme-color);\n }\n \n progress::-webkit-progress-bar {\n background-color: transparent;\n }\n \n progress::-webkit-progress-value {\n background-color: var(--global-theme-color);\n }\n \n progress::-moz-progress-bar {\n background-color: var(--global-theme-color);\n }\n \n .progress-container {\n width: 100%;\n background-color: transparent;\n position: fixed;\n top: 56px;\n left: 0;\n height: 5px;\n display: block;\n }\n \n .progress-bar {\n background-color: var(--global-theme-color);\n width: 0%;\n display: block;\n height: inherit;\n }\n","/*******************************************************************************\n * Style overrides for distill blog posts.\n ******************************************************************************/\n\nd-byline {\n border-top-color: var(--global-divider-color) !important;\n}\n\nd-byline h3 {\n color: var(--global-text-color) !important;\n}\n\nd-byline a, d-article d-byline a {\n color: var(--global-text-color) !important;\n &:hover {\n color: var(--global-hover-color) !important;\n }\n}\n\nd-article {\n border-top-color: var(--global-divider-color) !important;\n p, h1, h2, h3, h4, h5, h6, li, table {\n color: var(--global-text-color) !important;\n }\n h1, h2, hr, table, table th, table td {\n border-bottom-color: var(--global-divider-color) !important;\n }\n a {\n color: var(--global-theme-color) !important;\n &:hover {\n color: var(--global-theme-color) !important;\n }\n }\n b i {\n display: inline;\n }\n\n d-contents {\n align-self: start;\n grid-column: 1 / 4;\n grid-row: auto / span 4;\n justify-self: end;\n margin-top: 0em;\n padding-left: 2em;\n padding-right: 3em;\n border-right: 1px solid var(--global-divider-color);\n width: calc(max(70%, 300px));\n margin-right: 0px;\n margin-top: 0em;\n display: grid;\n grid-template-columns:\n minmax(8px, 1fr) [toc] auto\n minmax(8px, 1fr) [toc-line] 1px\n minmax(32px, 2fr);\n\n nav {\n grid-column: toc;\n a {\n border-bottom: none !important;\n &:hover {\n border-bottom: 1px solid var(--global-text-color) !important;\n }\n }\n h3 {\n margin-top: 0;\n margin-bottom: 1em;\n }\n div {\n display: block;\n outline: none;\n margin-bottom: 0.8em;\n color: rgba(0, 0, 0, 0.8);\n font-weight: bold;\n }\n ul {\n padding-left: 1em;\n margin-top: 0;\n margin-bottom: 6px;\n list-style-type: none;\n li {\n margin-bottom: 0.25em;\n }\n }\n }\n .figcaption {\n line-height: 1.4em;\n }\n toc-line {\n border-right: 1px solid var(--global-divider-color);\n grid-column: toc-line;\n }\n }\n\n d-footnote {\n scroll-margin-top: 66px;\n }\n}\n\nd-appendix {\n border-top-color: var(--global-divider-color) !important;\n color: var(--global-distill-app-color) !important;\n h3, li, span {\n color: var(--global-distill-app-color) !important;\n }\n a, a.footnote-backlink {\n color: var(--global-distill-app-color) !important;\n &:hover {\n color: var(--global-hover-color) !important;\n }\n }\n}\n\n@media (max-width: 1024px) {\n d-article {\n d-contents {\n display: block;\n grid-column-start: 2;\n grid-column-end: -2;\n padding-bottom: 0.5em;\n margin-bottom: 1em;\n padding-top: 0.5em;\n width: 100%;\n border: 1px solid var(--global-divider-color);\n nav {\n grid-column: none;\n }\n }\n }\n}\n"],"file":"main.css"}
\ No newline at end of file
diff --git a/assets/css/main.scss b/assets/css/main.scss
deleted file mode 100644
index fd8c311c32cb..000000000000
--- a/assets/css/main.scss
+++ /dev/null
@@ -1,15 +0,0 @@
----
-# Only the main Sass file needs front matter (the dashes are enough)
----
-@charset "utf-8";
-
-// Dimensions
-$max-content-width: {{ site.max_width }};
-
-@import
- "variables",
- "themes",
- "layout",
- "base",
- "distill"
-;
diff --git a/assets/img/1-1400.webp b/assets/img/1-1400.webp
new file mode 100644
index 000000000000..3a5a4d603021
Binary files /dev/null and b/assets/img/1-1400.webp differ
diff --git a/assets/img/1-480.webp b/assets/img/1-480.webp
new file mode 100644
index 000000000000..2bda0cb12a3d
Binary files /dev/null and b/assets/img/1-480.webp differ
diff --git a/assets/img/1-800.webp b/assets/img/1-800.webp
new file mode 100644
index 000000000000..3a5a4d603021
Binary files /dev/null and b/assets/img/1-800.webp differ
diff --git a/assets/img/10-1400.webp b/assets/img/10-1400.webp
new file mode 100644
index 000000000000..ce8225b541c4
Binary files /dev/null and b/assets/img/10-1400.webp differ
diff --git a/assets/img/10-480.webp b/assets/img/10-480.webp
new file mode 100644
index 000000000000..e890a18385ee
Binary files /dev/null and b/assets/img/10-480.webp differ
diff --git a/assets/img/10-800.webp b/assets/img/10-800.webp
new file mode 100644
index 000000000000..ce8225b541c4
Binary files /dev/null and b/assets/img/10-800.webp differ
diff --git a/assets/img/11-1400.webp b/assets/img/11-1400.webp
new file mode 100644
index 000000000000..b9410833e4e7
Binary files /dev/null and b/assets/img/11-1400.webp differ
diff --git a/assets/img/11-480.webp b/assets/img/11-480.webp
new file mode 100644
index 000000000000..2a916f5207b7
Binary files /dev/null and b/assets/img/11-480.webp differ
diff --git a/assets/img/11-800.webp b/assets/img/11-800.webp
new file mode 100644
index 000000000000..b9410833e4e7
Binary files /dev/null and b/assets/img/11-800.webp differ
diff --git a/assets/img/12-1400.webp b/assets/img/12-1400.webp
new file mode 100644
index 000000000000..06b75e0f1a27
Binary files /dev/null and b/assets/img/12-1400.webp differ
diff --git a/assets/img/12-480.webp b/assets/img/12-480.webp
new file mode 100644
index 000000000000..4fb64669ceca
Binary files /dev/null and b/assets/img/12-480.webp differ
diff --git a/assets/img/12-800.webp b/assets/img/12-800.webp
new file mode 100644
index 000000000000..06b75e0f1a27
Binary files /dev/null and b/assets/img/12-800.webp differ
diff --git a/assets/img/2-1400.webp b/assets/img/2-1400.webp
new file mode 100644
index 000000000000..e86631605748
Binary files /dev/null and b/assets/img/2-1400.webp differ
diff --git a/assets/img/2-480.webp b/assets/img/2-480.webp
new file mode 100644
index 000000000000..7bf72256f4a8
Binary files /dev/null and b/assets/img/2-480.webp differ
diff --git a/assets/img/2-800.webp b/assets/img/2-800.webp
new file mode 100644
index 000000000000..e86631605748
Binary files /dev/null and b/assets/img/2-800.webp differ
diff --git a/assets/img/3-1400.webp b/assets/img/3-1400.webp
new file mode 100644
index 000000000000..14d10f617ee4
Binary files /dev/null and b/assets/img/3-1400.webp differ
diff --git a/assets/img/3-480.webp b/assets/img/3-480.webp
new file mode 100644
index 000000000000..363382c6ec6a
Binary files /dev/null and b/assets/img/3-480.webp differ
diff --git a/assets/img/3-800.webp b/assets/img/3-800.webp
new file mode 100644
index 000000000000..14d10f617ee4
Binary files /dev/null and b/assets/img/3-800.webp differ
diff --git a/assets/img/4-1400.webp b/assets/img/4-1400.webp
new file mode 100644
index 000000000000..be40a6df50d1
Binary files /dev/null and b/assets/img/4-1400.webp differ
diff --git a/assets/img/4-480.webp b/assets/img/4-480.webp
new file mode 100644
index 000000000000..11fbebdfe409
Binary files /dev/null and b/assets/img/4-480.webp differ
diff --git a/assets/img/4-800.webp b/assets/img/4-800.webp
new file mode 100644
index 000000000000..be40a6df50d1
Binary files /dev/null and b/assets/img/4-800.webp differ
diff --git a/assets/img/5-1400.webp b/assets/img/5-1400.webp
new file mode 100644
index 000000000000..ed03f87f84c8
Binary files /dev/null and b/assets/img/5-1400.webp differ
diff --git a/assets/img/5-480.webp b/assets/img/5-480.webp
new file mode 100644
index 000000000000..ad0bc1fb40f1
Binary files /dev/null and b/assets/img/5-480.webp differ
diff --git a/assets/img/5-800.webp b/assets/img/5-800.webp
new file mode 100644
index 000000000000..ed03f87f84c8
Binary files /dev/null and b/assets/img/5-800.webp differ
diff --git a/assets/img/6-1400.webp b/assets/img/6-1400.webp
new file mode 100644
index 000000000000..8db021cde52c
Binary files /dev/null and b/assets/img/6-1400.webp differ
diff --git a/assets/img/6-480.webp b/assets/img/6-480.webp
new file mode 100644
index 000000000000..42c3506b8d82
Binary files /dev/null and b/assets/img/6-480.webp differ
diff --git a/assets/img/6-800.webp b/assets/img/6-800.webp
new file mode 100644
index 000000000000..8db021cde52c
Binary files /dev/null and b/assets/img/6-800.webp differ
diff --git a/assets/img/7-1400.webp b/assets/img/7-1400.webp
new file mode 100644
index 000000000000..37aa7e8d965f
Binary files /dev/null and b/assets/img/7-1400.webp differ
diff --git a/assets/img/7-480.webp b/assets/img/7-480.webp
new file mode 100644
index 000000000000..77fdb68d780e
Binary files /dev/null and b/assets/img/7-480.webp differ
diff --git a/assets/img/7-800.webp b/assets/img/7-800.webp
new file mode 100644
index 000000000000..37aa7e8d965f
Binary files /dev/null and b/assets/img/7-800.webp differ
diff --git a/assets/img/8-1400.webp b/assets/img/8-1400.webp
new file mode 100644
index 000000000000..a2b1e89e5504
Binary files /dev/null and b/assets/img/8-1400.webp differ
diff --git a/assets/img/8-480.webp b/assets/img/8-480.webp
new file mode 100644
index 000000000000..c09934e68135
Binary files /dev/null and b/assets/img/8-480.webp differ
diff --git a/assets/img/8-800.webp b/assets/img/8-800.webp
new file mode 100644
index 000000000000..a2b1e89e5504
Binary files /dev/null and b/assets/img/8-800.webp differ
diff --git a/assets/img/9-1400.webp b/assets/img/9-1400.webp
new file mode 100644
index 000000000000..dfac01c4b20a
Binary files /dev/null and b/assets/img/9-1400.webp differ
diff --git a/assets/img/9-480.webp b/assets/img/9-480.webp
new file mode 100644
index 000000000000..c4f728878de6
Binary files /dev/null and b/assets/img/9-480.webp differ
diff --git a/assets/img/9-800.webp b/assets/img/9-800.webp
new file mode 100644
index 000000000000..dfac01c4b20a
Binary files /dev/null and b/assets/img/9-800.webp differ
diff --git a/assets/img/Group1-1400.webp b/assets/img/Group1-1400.webp
new file mode 100644
index 000000000000..bfda080cde68
Binary files /dev/null and b/assets/img/Group1-1400.webp differ
diff --git a/assets/img/Group1-480.webp b/assets/img/Group1-480.webp
new file mode 100644
index 000000000000..bcf716cf1f35
Binary files /dev/null and b/assets/img/Group1-480.webp differ
diff --git a/assets/img/Group1-800.webp b/assets/img/Group1-800.webp
new file mode 100644
index 000000000000..bfda080cde68
Binary files /dev/null and b/assets/img/Group1-800.webp differ
diff --git a/assets/img/Group2-1400.webp b/assets/img/Group2-1400.webp
new file mode 100644
index 000000000000..76c4a6f4f133
Binary files /dev/null and b/assets/img/Group2-1400.webp differ
diff --git a/assets/img/Group2-480.webp b/assets/img/Group2-480.webp
new file mode 100644
index 000000000000..d865e93c2b95
Binary files /dev/null and b/assets/img/Group2-480.webp differ
diff --git a/assets/img/Group2-800.webp b/assets/img/Group2-800.webp
new file mode 100644
index 000000000000..76c4a6f4f133
Binary files /dev/null and b/assets/img/Group2-800.webp differ
diff --git a/assets/img/al-folio-preview-1400.webp b/assets/img/al-folio-preview-1400.webp
new file mode 100644
index 000000000000..6b85f97cf064
Binary files /dev/null and b/assets/img/al-folio-preview-1400.webp differ
diff --git a/assets/img/al-folio-preview-480.webp b/assets/img/al-folio-preview-480.webp
new file mode 100644
index 000000000000..8f3a7de659ad
Binary files /dev/null and b/assets/img/al-folio-preview-480.webp differ
diff --git a/assets/img/al-folio-preview-800.webp b/assets/img/al-folio-preview-800.webp
new file mode 100644
index 000000000000..6b85f97cf064
Binary files /dev/null and b/assets/img/al-folio-preview-800.webp differ
diff --git a/assets/img/code-screenshot-1400.webp b/assets/img/code-screenshot-1400.webp
new file mode 100644
index 000000000000..fea23c75b580
Binary files /dev/null and b/assets/img/code-screenshot-1400.webp differ
diff --git a/assets/img/code-screenshot-480.webp b/assets/img/code-screenshot-480.webp
new file mode 100644
index 000000000000..23892f2a67b1
Binary files /dev/null and b/assets/img/code-screenshot-480.webp differ
diff --git a/assets/img/code-screenshot-800.webp b/assets/img/code-screenshot-800.webp
new file mode 100644
index 000000000000..fea23c75b580
Binary files /dev/null and b/assets/img/code-screenshot-800.webp differ
diff --git a/assets/img/distill-screenshot-1400.webp b/assets/img/distill-screenshot-1400.webp
new file mode 100644
index 000000000000..10cc5d71d470
Binary files /dev/null and b/assets/img/distill-screenshot-1400.webp differ
diff --git a/assets/img/distill-screenshot-480.webp b/assets/img/distill-screenshot-480.webp
new file mode 100644
index 000000000000..9a4a452b2e1d
Binary files /dev/null and b/assets/img/distill-screenshot-480.webp differ
diff --git a/assets/img/distill-screenshot-800.webp b/assets/img/distill-screenshot-800.webp
new file mode 100644
index 000000000000..10cc5d71d470
Binary files /dev/null and b/assets/img/distill-screenshot-800.webp differ
diff --git a/assets/img/logo-1400.webp b/assets/img/logo-1400.webp
new file mode 100644
index 000000000000..43bcc596ebb1
Binary files /dev/null and b/assets/img/logo-1400.webp differ
diff --git a/assets/img/logo-480.webp b/assets/img/logo-480.webp
new file mode 100644
index 000000000000..4222b3b9417c
Binary files /dev/null and b/assets/img/logo-480.webp differ
diff --git a/assets/img/logo-800.webp b/assets/img/logo-800.webp
new file mode 100644
index 000000000000..43bcc596ebb1
Binary files /dev/null and b/assets/img/logo-800.webp differ
diff --git a/assets/img/math-screenshot-1400.webp b/assets/img/math-screenshot-1400.webp
new file mode 100644
index 000000000000..f8d08c0e0107
Binary files /dev/null and b/assets/img/math-screenshot-1400.webp differ
diff --git a/assets/img/math-screenshot-480.webp b/assets/img/math-screenshot-480.webp
new file mode 100644
index 000000000000..f70b64c5ebb1
Binary files /dev/null and b/assets/img/math-screenshot-480.webp differ
diff --git a/assets/img/math-screenshot-800.webp b/assets/img/math-screenshot-800.webp
new file mode 100644
index 000000000000..f8d08c0e0107
Binary files /dev/null and b/assets/img/math-screenshot-800.webp differ
diff --git a/assets/img/photos-screenshot-1400.webp b/assets/img/photos-screenshot-1400.webp
new file mode 100644
index 000000000000..dd09596d4b64
Binary files /dev/null and b/assets/img/photos-screenshot-1400.webp differ
diff --git a/assets/img/photos-screenshot-480.webp b/assets/img/photos-screenshot-480.webp
new file mode 100644
index 000000000000..57bbed3dfa9e
Binary files /dev/null and b/assets/img/photos-screenshot-480.webp differ
diff --git a/assets/img/photos-screenshot-800.webp b/assets/img/photos-screenshot-800.webp
new file mode 100644
index 000000000000..dd09596d4b64
Binary files /dev/null and b/assets/img/photos-screenshot-800.webp differ
diff --git a/assets/img/profiles/andreaWeisse-1400.webp b/assets/img/profiles/andreaWeisse-1400.webp
new file mode 100644
index 000000000000..36947d7e39ba
Binary files /dev/null and b/assets/img/profiles/andreaWeisse-1400.webp differ
diff --git a/assets/img/profiles/andreaWeisse-480.webp b/assets/img/profiles/andreaWeisse-480.webp
new file mode 100644
index 000000000000..f6d06332957f
Binary files /dev/null and b/assets/img/profiles/andreaWeisse-480.webp differ
diff --git a/assets/img/profiles/andreaWeisse-800.webp b/assets/img/profiles/andreaWeisse-800.webp
new file mode 100644
index 000000000000..36947d7e39ba
Binary files /dev/null and b/assets/img/profiles/andreaWeisse-800.webp differ
diff --git a/assets/img/profiles/andreaWeisse_cropped-1400.webp b/assets/img/profiles/andreaWeisse_cropped-1400.webp
new file mode 100644
index 000000000000..e40892891507
Binary files /dev/null and b/assets/img/profiles/andreaWeisse_cropped-1400.webp differ
diff --git a/assets/img/profiles/andreaWeisse_cropped-480.webp b/assets/img/profiles/andreaWeisse_cropped-480.webp
new file mode 100644
index 000000000000..f91a86953a49
Binary files /dev/null and b/assets/img/profiles/andreaWeisse_cropped-480.webp differ
diff --git a/assets/img/profiles/andreaWeisse_cropped-800.webp b/assets/img/profiles/andreaWeisse_cropped-800.webp
new file mode 100644
index 000000000000..e40892891507
Binary files /dev/null and b/assets/img/profiles/andreaWeisse_cropped-800.webp differ
diff --git a/assets/img/profiles/christophWagner-1400.webp b/assets/img/profiles/christophWagner-1400.webp
new file mode 100644
index 000000000000..dab7cd1275c8
Binary files /dev/null and b/assets/img/profiles/christophWagner-1400.webp differ
diff --git a/assets/img/profiles/christophWagner-480.webp b/assets/img/profiles/christophWagner-480.webp
new file mode 100644
index 000000000000..5cb1f1c8a4dc
Binary files /dev/null and b/assets/img/profiles/christophWagner-480.webp differ
diff --git a/assets/img/profiles/christophWagner-800.webp b/assets/img/profiles/christophWagner-800.webp
new file mode 100644
index 000000000000..dab7cd1275c8
Binary files /dev/null and b/assets/img/profiles/christophWagner-800.webp differ
diff --git a/assets/img/profiles/christophWagner_cropped-1400.webp b/assets/img/profiles/christophWagner_cropped-1400.webp
new file mode 100644
index 000000000000..1601448437a5
Binary files /dev/null and b/assets/img/profiles/christophWagner_cropped-1400.webp differ
diff --git a/assets/img/profiles/christophWagner_cropped-480.webp b/assets/img/profiles/christophWagner_cropped-480.webp
new file mode 100644
index 000000000000..3f61e9fda38d
Binary files /dev/null and b/assets/img/profiles/christophWagner_cropped-480.webp differ
diff --git a/assets/img/profiles/christophWagner_cropped-800.webp b/assets/img/profiles/christophWagner_cropped-800.webp
new file mode 100644
index 000000000000..1601448437a5
Binary files /dev/null and b/assets/img/profiles/christophWagner_cropped-800.webp differ
diff --git a/assets/img/profiles/hollieHindley-1400.webp b/assets/img/profiles/hollieHindley-1400.webp
new file mode 100644
index 000000000000..6482e0a05f7e
Binary files /dev/null and b/assets/img/profiles/hollieHindley-1400.webp differ
diff --git a/assets/img/profiles/hollieHindley-480.webp b/assets/img/profiles/hollieHindley-480.webp
new file mode 100644
index 000000000000..3a344306d9e7
Binary files /dev/null and b/assets/img/profiles/hollieHindley-480.webp differ
diff --git a/assets/img/profiles/hollieHindley-800.webp b/assets/img/profiles/hollieHindley-800.webp
new file mode 100644
index 000000000000..6482e0a05f7e
Binary files /dev/null and b/assets/img/profiles/hollieHindley-800.webp differ
diff --git a/assets/img/profiles/hollieHindley_cropped-1400.webp b/assets/img/profiles/hollieHindley_cropped-1400.webp
new file mode 100644
index 000000000000..33c819682064
Binary files /dev/null and b/assets/img/profiles/hollieHindley_cropped-1400.webp differ
diff --git a/assets/img/profiles/hollieHindley_cropped-480.webp b/assets/img/profiles/hollieHindley_cropped-480.webp
new file mode 100644
index 000000000000..aca324152cad
Binary files /dev/null and b/assets/img/profiles/hollieHindley_cropped-480.webp differ
diff --git a/assets/img/profiles/hollieHindley_cropped-800.webp b/assets/img/profiles/hollieHindley_cropped-800.webp
new file mode 100644
index 000000000000..33c819682064
Binary files /dev/null and b/assets/img/profiles/hollieHindley_cropped-800.webp differ
diff --git a/assets/img/profiles/meriemElKaroui-1400.webp b/assets/img/profiles/meriemElKaroui-1400.webp
new file mode 100644
index 000000000000..41703946e4bc
Binary files /dev/null and b/assets/img/profiles/meriemElKaroui-1400.webp differ
diff --git a/assets/img/profiles/meriemElKaroui-480.webp b/assets/img/profiles/meriemElKaroui-480.webp
new file mode 100644
index 000000000000..8510be2a70d3
Binary files /dev/null and b/assets/img/profiles/meriemElKaroui-480.webp differ
diff --git a/assets/img/profiles/meriemElKaroui-800.webp b/assets/img/profiles/meriemElKaroui-800.webp
new file mode 100644
index 000000000000..41703946e4bc
Binary files /dev/null and b/assets/img/profiles/meriemElKaroui-800.webp differ
diff --git a/assets/img/profiles/sandyNelson-1400.webp b/assets/img/profiles/sandyNelson-1400.webp
new file mode 100644
index 000000000000..a760fe55050a
Binary files /dev/null and b/assets/img/profiles/sandyNelson-1400.webp differ
diff --git a/assets/img/profiles/sandyNelson-480.webp b/assets/img/profiles/sandyNelson-480.webp
new file mode 100644
index 000000000000..ca7008956507
Binary files /dev/null and b/assets/img/profiles/sandyNelson-480.webp differ
diff --git a/assets/img/profiles/sandyNelson-800.webp b/assets/img/profiles/sandyNelson-800.webp
new file mode 100644
index 000000000000..a760fe55050a
Binary files /dev/null and b/assets/img/profiles/sandyNelson-800.webp differ
diff --git a/assets/img/profiles/sandyNelson_cropped-1400.webp b/assets/img/profiles/sandyNelson_cropped-1400.webp
new file mode 100644
index 000000000000..392823cc459f
Binary files /dev/null and b/assets/img/profiles/sandyNelson_cropped-1400.webp differ
diff --git a/assets/img/profiles/sandyNelson_cropped-480.webp b/assets/img/profiles/sandyNelson_cropped-480.webp
new file mode 100644
index 000000000000..0ca6a74b09c2
Binary files /dev/null and b/assets/img/profiles/sandyNelson_cropped-480.webp differ
diff --git a/assets/img/profiles/sandyNelson_cropped-800.webp b/assets/img/profiles/sandyNelson_cropped-800.webp
new file mode 100644
index 000000000000..392823cc459f
Binary files /dev/null and b/assets/img/profiles/sandyNelson_cropped-800.webp differ
diff --git a/assets/img/projects-screenshot-1400.webp b/assets/img/projects-screenshot-1400.webp
new file mode 100644
index 000000000000..cbf75e7aa13d
Binary files /dev/null and b/assets/img/projects-screenshot-1400.webp differ
diff --git a/assets/img/projects-screenshot-480.webp b/assets/img/projects-screenshot-480.webp
new file mode 100644
index 000000000000..77f32be23d21
Binary files /dev/null and b/assets/img/projects-screenshot-480.webp differ
diff --git a/assets/img/projects-screenshot-800.webp b/assets/img/projects-screenshot-800.webp
new file mode 100644
index 000000000000..cbf75e7aa13d
Binary files /dev/null and b/assets/img/projects-screenshot-800.webp differ
diff --git a/assets/img/publication_preview/boonyasiri2021-1400.webp b/assets/img/publication_preview/boonyasiri2021-1400.webp
new file mode 100644
index 000000000000..807176ec0fee
Binary files /dev/null and b/assets/img/publication_preview/boonyasiri2021-1400.webp differ
diff --git a/assets/img/publication_preview/boonyasiri2021-480.webp b/assets/img/publication_preview/boonyasiri2021-480.webp
new file mode 100644
index 000000000000..1835b13453fd
Binary files /dev/null and b/assets/img/publication_preview/boonyasiri2021-480.webp differ
diff --git a/assets/img/publication_preview/boonyasiri2021-800.webp b/assets/img/publication_preview/boonyasiri2021-800.webp
new file mode 100644
index 000000000000..807176ec0fee
Binary files /dev/null and b/assets/img/publication_preview/boonyasiri2021-800.webp differ
diff --git a/assets/img/publication_preview/hunt2023-1400.webp b/assets/img/publication_preview/hunt2023-1400.webp
new file mode 100644
index 000000000000..da078e3ebd5f
Binary files /dev/null and b/assets/img/publication_preview/hunt2023-1400.webp differ
diff --git a/assets/img/publication_preview/hunt2023-480.webp b/assets/img/publication_preview/hunt2023-480.webp
new file mode 100644
index 000000000000..c6c313f99cb3
Binary files /dev/null and b/assets/img/publication_preview/hunt2023-480.webp differ
diff --git a/assets/img/publication_preview/hunt2023-800.webp b/assets/img/publication_preview/hunt2023-800.webp
new file mode 100644
index 000000000000..da078e3ebd5f
Binary files /dev/null and b/assets/img/publication_preview/hunt2023-800.webp differ
diff --git a/assets/img/publication_preview/karwacki-neisius2013-1400.webp b/assets/img/publication_preview/karwacki-neisius2013-1400.webp
new file mode 100644
index 000000000000..e4d7af82dd1b
Binary files /dev/null and b/assets/img/publication_preview/karwacki-neisius2013-1400.webp differ
diff --git a/assets/img/publication_preview/karwacki-neisius2013-480.webp b/assets/img/publication_preview/karwacki-neisius2013-480.webp
new file mode 100644
index 000000000000..103b579c4894
Binary files /dev/null and b/assets/img/publication_preview/karwacki-neisius2013-480.webp differ
diff --git a/assets/img/publication_preview/karwacki-neisius2013-800.webp b/assets/img/publication_preview/karwacki-neisius2013-800.webp
new file mode 100644
index 000000000000..e4d7af82dd1b
Binary files /dev/null and b/assets/img/publication_preview/karwacki-neisius2013-800.webp differ
diff --git a/assets/img/publication_preview/ming2021-1400.webp b/assets/img/publication_preview/ming2021-1400.webp
new file mode 100644
index 000000000000..87097e540ccf
Binary files /dev/null and b/assets/img/publication_preview/ming2021-1400.webp differ
diff --git a/assets/img/publication_preview/ming2021-480.webp b/assets/img/publication_preview/ming2021-480.webp
new file mode 100644
index 000000000000..2169786ed986
Binary files /dev/null and b/assets/img/publication_preview/ming2021-480.webp differ
diff --git a/assets/img/publication_preview/ming2021-800.webp b/assets/img/publication_preview/ming2021-800.webp
new file mode 100644
index 000000000000..87097e540ccf
Binary files /dev/null and b/assets/img/publication_preview/ming2021-800.webp differ
diff --git a/assets/img/publication_preview/myall2021a-1400.webp b/assets/img/publication_preview/myall2021a-1400.webp
new file mode 100644
index 000000000000..355f723b1a2e
Binary files /dev/null and b/assets/img/publication_preview/myall2021a-1400.webp differ
diff --git a/assets/img/publication_preview/myall2021a-480.webp b/assets/img/publication_preview/myall2021a-480.webp
new file mode 100644
index 000000000000..cc100aff18cf
Binary files /dev/null and b/assets/img/publication_preview/myall2021a-480.webp differ
diff --git a/assets/img/publication_preview/myall2021a-800.webp b/assets/img/publication_preview/myall2021a-800.webp
new file mode 100644
index 000000000000..355f723b1a2e
Binary files /dev/null and b/assets/img/publication_preview/myall2021a-800.webp differ
diff --git a/assets/img/publication_preview/myall2021b-1400.webp b/assets/img/publication_preview/myall2021b-1400.webp
new file mode 100644
index 000000000000..8aaf15c26580
Binary files /dev/null and b/assets/img/publication_preview/myall2021b-1400.webp differ
diff --git a/assets/img/publication_preview/myall2021b-480.webp b/assets/img/publication_preview/myall2021b-480.webp
new file mode 100644
index 000000000000..7315e3479660
Binary files /dev/null and b/assets/img/publication_preview/myall2021b-480.webp differ
diff --git a/assets/img/publication_preview/myall2021b-800.webp b/assets/img/publication_preview/myall2021b-800.webp
new file mode 100644
index 000000000000..8aaf15c26580
Binary files /dev/null and b/assets/img/publication_preview/myall2021b-800.webp differ
diff --git a/assets/img/publication_preview/nikolados2019-1400.webp b/assets/img/publication_preview/nikolados2019-1400.webp
new file mode 100644
index 000000000000..d8835877ab81
Binary files /dev/null and b/assets/img/publication_preview/nikolados2019-1400.webp differ
diff --git a/assets/img/publication_preview/nikolados2019-480.webp b/assets/img/publication_preview/nikolados2019-480.webp
new file mode 100644
index 000000000000..c8d4e25118d6
Binary files /dev/null and b/assets/img/publication_preview/nikolados2019-480.webp differ
diff --git a/assets/img/publication_preview/nikolados2019-800.webp b/assets/img/publication_preview/nikolados2019-800.webp
new file mode 100644
index 000000000000..d8835877ab81
Binary files /dev/null and b/assets/img/publication_preview/nikolados2019-800.webp differ
diff --git a/assets/img/publication_preview/nikolados2021-1400.webp b/assets/img/publication_preview/nikolados2021-1400.webp
new file mode 100644
index 000000000000..9110c1aec3bc
Binary files /dev/null and b/assets/img/publication_preview/nikolados2021-1400.webp differ
diff --git a/assets/img/publication_preview/nikolados2021-480.webp b/assets/img/publication_preview/nikolados2021-480.webp
new file mode 100644
index 000000000000..904e6cb5a4dc
Binary files /dev/null and b/assets/img/publication_preview/nikolados2021-480.webp differ
diff --git a/assets/img/publication_preview/nikolados2021-800.webp b/assets/img/publication_preview/nikolados2021-800.webp
new file mode 100644
index 000000000000..9110c1aec3bc
Binary files /dev/null and b/assets/img/publication_preview/nikolados2021-800.webp differ
diff --git a/assets/img/publication_preview/otter2020-1400.webp b/assets/img/publication_preview/otter2020-1400.webp
new file mode 100644
index 000000000000..f6654217eea6
Binary files /dev/null and b/assets/img/publication_preview/otter2020-1400.webp differ
diff --git a/assets/img/publication_preview/otter2020-480.webp b/assets/img/publication_preview/otter2020-480.webp
new file mode 100644
index 000000000000..5d0e7f1de6eb
Binary files /dev/null and b/assets/img/publication_preview/otter2020-480.webp differ
diff --git a/assets/img/publication_preview/otter2020-800.webp b/assets/img/publication_preview/otter2020-800.webp
new file mode 100644
index 000000000000..f6654217eea6
Binary files /dev/null and b/assets/img/publication_preview/otter2020-800.webp differ
diff --git a/assets/img/publication_preview/oyarzun2013-1400.webp b/assets/img/publication_preview/oyarzun2013-1400.webp
new file mode 100644
index 000000000000..eb2633b08bf0
Binary files /dev/null and b/assets/img/publication_preview/oyarzun2013-1400.webp differ
diff --git a/assets/img/publication_preview/oyarzun2013-480.webp b/assets/img/publication_preview/oyarzun2013-480.webp
new file mode 100644
index 000000000000..9fbc2e093c34
Binary files /dev/null and b/assets/img/publication_preview/oyarzun2013-480.webp differ
diff --git a/assets/img/publication_preview/oyarzun2013-800.webp b/assets/img/publication_preview/oyarzun2013-800.webp
new file mode 100644
index 000000000000..eb2633b08bf0
Binary files /dev/null and b/assets/img/publication_preview/oyarzun2013-800.webp differ
diff --git a/assets/img/publication_preview/perkins2012-1400.webp b/assets/img/publication_preview/perkins2012-1400.webp
new file mode 100644
index 000000000000..f0da363c6ef4
Binary files /dev/null and b/assets/img/publication_preview/perkins2012-1400.webp differ
diff --git a/assets/img/publication_preview/perkins2012-480.webp b/assets/img/publication_preview/perkins2012-480.webp
new file mode 100644
index 000000000000..458f5e1581f4
Binary files /dev/null and b/assets/img/publication_preview/perkins2012-480.webp differ
diff --git a/assets/img/publication_preview/perkins2012-800.webp b/assets/img/publication_preview/perkins2012-800.webp
new file mode 100644
index 000000000000..f0da363c6ef4
Binary files /dev/null and b/assets/img/publication_preview/perkins2012-800.webp differ
diff --git a/assets/img/publication_preview/price2021-1400.webp b/assets/img/publication_preview/price2021-1400.webp
new file mode 100644
index 000000000000..d4188a4690fd
Binary files /dev/null and b/assets/img/publication_preview/price2021-1400.webp differ
diff --git a/assets/img/publication_preview/price2021-480.webp b/assets/img/publication_preview/price2021-480.webp
new file mode 100644
index 000000000000..d47b94e687f7
Binary files /dev/null and b/assets/img/publication_preview/price2021-480.webp differ
diff --git a/assets/img/publication_preview/price2021-800.webp b/assets/img/publication_preview/price2021-800.webp
new file mode 100644
index 000000000000..d4188a4690fd
Binary files /dev/null and b/assets/img/publication_preview/price2021-800.webp differ
diff --git a/assets/img/publication_preview/terradot2018-1400.webp b/assets/img/publication_preview/terradot2018-1400.webp
new file mode 100644
index 000000000000..14eef77d071a
Binary files /dev/null and b/assets/img/publication_preview/terradot2018-1400.webp differ
diff --git a/assets/img/publication_preview/terradot2018-480.webp b/assets/img/publication_preview/terradot2018-480.webp
new file mode 100644
index 000000000000..c1932d8660ac
Binary files /dev/null and b/assets/img/publication_preview/terradot2018-480.webp differ
diff --git a/assets/img/publication_preview/terradot2018-800.webp b/assets/img/publication_preview/terradot2018-800.webp
new file mode 100644
index 000000000000..14eef77d071a
Binary files /dev/null and b/assets/img/publication_preview/terradot2018-800.webp differ
diff --git a/assets/img/publication_preview/thomas2018-1400.webp b/assets/img/publication_preview/thomas2018-1400.webp
new file mode 100644
index 000000000000..5bf67337665b
Binary files /dev/null and b/assets/img/publication_preview/thomas2018-1400.webp differ
diff --git a/assets/img/publication_preview/thomas2018-480.webp b/assets/img/publication_preview/thomas2018-480.webp
new file mode 100644
index 000000000000..72f9a1733b92
Binary files /dev/null and b/assets/img/publication_preview/thomas2018-480.webp differ
diff --git a/assets/img/publication_preview/thomas2018-800.webp b/assets/img/publication_preview/thomas2018-800.webp
new file mode 100644
index 000000000000..5bf67337665b
Binary files /dev/null and b/assets/img/publication_preview/thomas2018-800.webp differ
diff --git a/assets/img/publication_preview/veron2009-1400.webp b/assets/img/publication_preview/veron2009-1400.webp
new file mode 100644
index 000000000000..33c1c26a901e
Binary files /dev/null and b/assets/img/publication_preview/veron2009-1400.webp differ
diff --git a/assets/img/publication_preview/veron2009-480.webp b/assets/img/publication_preview/veron2009-480.webp
new file mode 100644
index 000000000000..c512590da064
Binary files /dev/null and b/assets/img/publication_preview/veron2009-480.webp differ
diff --git a/assets/img/publication_preview/veron2009-800.webp b/assets/img/publication_preview/veron2009-800.webp
new file mode 100644
index 000000000000..33c1c26a901e
Binary files /dev/null and b/assets/img/publication_preview/veron2009-800.webp differ
diff --git a/assets/img/publication_preview/weisse2006-1400.webp b/assets/img/publication_preview/weisse2006-1400.webp
new file mode 100644
index 000000000000..d7de7b6cbc83
Binary files /dev/null and b/assets/img/publication_preview/weisse2006-1400.webp differ
diff --git a/assets/img/publication_preview/weisse2006-480.webp b/assets/img/publication_preview/weisse2006-480.webp
new file mode 100644
index 000000000000..19f2cced107c
Binary files /dev/null and b/assets/img/publication_preview/weisse2006-480.webp differ
diff --git a/assets/img/publication_preview/weisse2006-800.webp b/assets/img/publication_preview/weisse2006-800.webp
new file mode 100644
index 000000000000..d7de7b6cbc83
Binary files /dev/null and b/assets/img/publication_preview/weisse2006-800.webp differ
diff --git a/assets/img/publication_preview/weisse2009-1400.webp b/assets/img/publication_preview/weisse2009-1400.webp
new file mode 100644
index 000000000000..6f0fab9dae7e
Binary files /dev/null and b/assets/img/publication_preview/weisse2009-1400.webp differ
diff --git a/assets/img/publication_preview/weisse2009-480.webp b/assets/img/publication_preview/weisse2009-480.webp
new file mode 100644
index 000000000000..4791e5f2b73e
Binary files /dev/null and b/assets/img/publication_preview/weisse2009-480.webp differ
diff --git a/assets/img/publication_preview/weisse2009-800.webp b/assets/img/publication_preview/weisse2009-800.webp
new file mode 100644
index 000000000000..6f0fab9dae7e
Binary files /dev/null and b/assets/img/publication_preview/weisse2009-800.webp differ
diff --git a/assets/img/publication_preview/weisse2010a-1400.webp b/assets/img/publication_preview/weisse2010a-1400.webp
new file mode 100644
index 000000000000..6816aff26f26
Binary files /dev/null and b/assets/img/publication_preview/weisse2010a-1400.webp differ
diff --git a/assets/img/publication_preview/weisse2010a-480.webp b/assets/img/publication_preview/weisse2010a-480.webp
new file mode 100644
index 000000000000..2fb0e22eeb8e
Binary files /dev/null and b/assets/img/publication_preview/weisse2010a-480.webp differ
diff --git a/assets/img/publication_preview/weisse2010a-800.webp b/assets/img/publication_preview/weisse2010a-800.webp
new file mode 100644
index 000000000000..6816aff26f26
Binary files /dev/null and b/assets/img/publication_preview/weisse2010a-800.webp differ
diff --git a/assets/img/publication_preview/weisse2015a-1400.webp b/assets/img/publication_preview/weisse2015a-1400.webp
new file mode 100644
index 000000000000..e4d6b0575308
Binary files /dev/null and b/assets/img/publication_preview/weisse2015a-1400.webp differ
diff --git a/assets/img/publication_preview/weisse2015a-480.webp b/assets/img/publication_preview/weisse2015a-480.webp
new file mode 100644
index 000000000000..d8d6d1f535b8
Binary files /dev/null and b/assets/img/publication_preview/weisse2015a-480.webp differ
diff --git a/assets/img/publication_preview/weisse2015a-800.webp b/assets/img/publication_preview/weisse2015a-800.webp
new file mode 100644
index 000000000000..e4d6b0575308
Binary files /dev/null and b/assets/img/publication_preview/weisse2015a-800.webp differ
diff --git a/assets/img/publication_preview/weisse2016-1400.webp b/assets/img/publication_preview/weisse2016-1400.webp
new file mode 100644
index 000000000000..6da58cac244b
Binary files /dev/null and b/assets/img/publication_preview/weisse2016-1400.webp differ
diff --git a/assets/img/publication_preview/weisse2016-480.webp b/assets/img/publication_preview/weisse2016-480.webp
new file mode 100644
index 000000000000..9f15413670fa
Binary files /dev/null and b/assets/img/publication_preview/weisse2016-480.webp differ
diff --git a/assets/img/publication_preview/weisse2016-800.webp b/assets/img/publication_preview/weisse2016-800.webp
new file mode 100644
index 000000000000..6da58cac244b
Binary files /dev/null and b/assets/img/publication_preview/weisse2016-800.webp differ
diff --git a/assets/img/publications-screenshot-1400.webp b/assets/img/publications-screenshot-1400.webp
new file mode 100644
index 000000000000..73fa3621258a
Binary files /dev/null and b/assets/img/publications-screenshot-1400.webp differ
diff --git a/assets/img/publications-screenshot-480.webp b/assets/img/publications-screenshot-480.webp
new file mode 100644
index 000000000000..5fd4e0b619bd
Binary files /dev/null and b/assets/img/publications-screenshot-480.webp differ
diff --git a/assets/img/publications-screenshot-800.webp b/assets/img/publications-screenshot-800.webp
new file mode 100644
index 000000000000..73fa3621258a
Binary files /dev/null and b/assets/img/publications-screenshot-800.webp differ
diff --git a/assets/js/common.js b/assets/js/common.js
index 5ffcb5010904..72d77e8d6fc2 100644
--- a/assets/js/common.js
+++ b/assets/js/common.js
@@ -1,11 +1 @@
-$(document).ready(function() {
- $('a.abstract').click(function() {
- $(this).parent().parent().find(".abstract.hidden").toggleClass('open');
- $(this).parent().parent().find(".bibtex.hidden.open").toggleClass('open');
- });
- $('a.bibtex').click(function() {
- $(this).parent().parent().find(".bibtex.hidden").toggleClass('open');
- $(this).parent().parent().find(".abstract.hidden.open").toggleClass('open');
- });
- $('a').removeClass('waves-effect waves-light');
-});
+$(document).ready(function(){$("a.abstract").click(function(){$(this).parent().parent().find(".abstract.hidden").toggleClass("open"),$(this).parent().parent().find(".bibtex.hidden.open").toggleClass("open")}),$("a.bibtex").click(function(){$(this).parent().parent().find(".bibtex.hidden").toggleClass("open"),$(this).parent().parent().find(".abstract.hidden.open").toggleClass("open")}),$("a").removeClass("waves-effect waves-light")});
\ No newline at end of file
diff --git a/assets/js/dark_mode.js b/assets/js/dark_mode.js
index 863b273fe725..26312e44b528 100644
--- a/assets/js/dark_mode.js
+++ b/assets/js/dark_mode.js
@@ -1,8 +1 @@
-document.addEventListener('DOMContentLoaded', function() {
- const mode_toggle = document.getElementById("light-toggle");
-
- mode_toggle.addEventListener("click", function() {
- toggleTheme(localStorage.getItem("theme"));
- });
-});
-
+document.addEventListener("DOMContentLoaded",function(){document.getElementById("light-toggle").addEventListener("click",function(){toggleTheme(localStorage.getItem("theme"))})});
\ No newline at end of file
diff --git a/assets/js/distillpub/overrides.js b/assets/js/distillpub/overrides.js
index 2d839626522e..066b8efa2ae8 100644
--- a/assets/js/distillpub/overrides.js
+++ b/assets/js/distillpub/overrides.js
@@ -1,24 +1 @@
-$(document).ready(function() {
- // Override styles of the footnotes.
- document.querySelectorAll("d-footnote").forEach(function(footnote) {
- footnote.shadowRoot.querySelector("sup > span")
- .setAttribute("style", "color: var(--global-theme-color);");
- footnote.shadowRoot.querySelector("d-hover-box").shadowRoot.querySelector("style").sheet
- .insertRule(".panel {background-color: var(--global-bg-color) !important;}");
- footnote.shadowRoot.querySelector("d-hover-box").shadowRoot.querySelector("style").sheet
- .insertRule(".panel {border-color: var(--global-divider-color) !important;}");
- });
- // Override styles of the citations.
- document.querySelectorAll("d-cite").forEach(function(cite) {
- cite.shadowRoot.querySelector("div > span")
- .setAttribute("style", "color: var(--global-theme-color);");
- cite.shadowRoot.querySelector("style").sheet
- .insertRule("ul li a {color: var(--global-text-color) !important; text-decoration: none;}");
- cite.shadowRoot.querySelector("style").sheet
- .insertRule("ul li a:hover {color: var(--global-theme-color) !important;}");
- cite.shadowRoot.querySelector("d-hover-box").shadowRoot.querySelector("style").sheet
- .insertRule(".panel {background-color: var(--global-bg-color) !important;}");
- cite.shadowRoot.querySelector("d-hover-box").shadowRoot.querySelector("style").sheet
- .insertRule(".panel {border-color: var(--global-divider-color) !important;}");
- });
-})
\ No newline at end of file
+$(document).ready(function(){document.querySelectorAll("d-footnote").forEach(function(o){o.shadowRoot.querySelector("sup > span").setAttribute("style","color: var(--global-theme-color);"),o.shadowRoot.querySelector("d-hover-box").shadowRoot.querySelector("style").sheet.insertRule(".panel {background-color: var(--global-bg-color) !important;}"),o.shadowRoot.querySelector("d-hover-box").shadowRoot.querySelector("style").sheet.insertRule(".panel {border-color: var(--global-divider-color) !important;}")}),document.querySelectorAll("d-cite").forEach(function(o){o.shadowRoot.querySelector("div > span").setAttribute("style","color: var(--global-theme-color);"),o.shadowRoot.querySelector("style").sheet.insertRule("ul li a {color: var(--global-text-color) !important; text-decoration: none;}"),o.shadowRoot.querySelector("style").sheet.insertRule("ul li a:hover {color: var(--global-theme-color) !important;}"),o.shadowRoot.querySelector("d-hover-box").shadowRoot.querySelector("style").sheet.insertRule(".panel {background-color: var(--global-bg-color) !important;}"),o.shadowRoot.querySelector("d-hover-box").shadowRoot.querySelector("style").sheet.insertRule(".panel {border-color: var(--global-divider-color) !important;}")})});
\ No newline at end of file
diff --git a/assets/js/distillpub/template.v2.js b/assets/js/distillpub/template.v2.js
index 4ddc61fcff64..a05e82bb621d 100644
--- a/assets/js/distillpub/template.v2.js
+++ b/assets/js/distillpub/template.v2.js
@@ -1,9247 +1,67 @@
-(function (factory) {
- typeof define === 'function' && define.amd ? define(factory) :
- factory();
-}((function () { 'use strict';
-
- // Copyright 2018 The Distill Template Authors
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
- const months = ['Jan.', 'Feb.', 'March', 'April', 'May', 'June', 'July', 'Aug.', 'Sept.', 'Oct.', 'Nov.', 'Dec.'];
- const zeroPad = n => n < 10 ? '0' + n : n;
-
- const RFC = function(date) {
- const day = days[date.getDay()].substring(0, 3);
- const paddedDate = zeroPad(date.getDate());
- const month = months[date.getMonth()].substring(0,3);
- const year = date.getFullYear().toString();
- const hours = date.getUTCHours().toString();
- const minutes = date.getUTCMinutes().toString();
- const seconds = date.getUTCSeconds().toString();
- return `${day}, ${paddedDate} ${month} ${year} ${hours}:${minutes}:${seconds} Z`;
- };
-
- const objectFromMap = function(map) {
- const object = Array.from(map).reduce((object, [key, value]) => (
- Object.assign(object, { [key]: value }) // Be careful! Maps can have non-String keys; object literals can't.
- ), {});
- return object;
- };
-
- const mapFromObject = function(object) {
- const map = new Map();
- for (var property in object) {
- if (object.hasOwnProperty(property)) {
- map.set(property, object[property]);
- }
- }
- return map;
- };
-
- class Author {
-
- // constructor(name='', personalURL='', affiliation='', affiliationURL='') {
- // this.name = name; // 'Chris Olah'
- // this.personalURL = personalURL; // 'https://colah.github.io'
- // this.affiliation = affiliation; // 'Google Brain'
- // this.affiliationURL = affiliationURL; // 'https://g.co/brain'
- // }
-
- constructor(object) {
- this.name = object.author; // 'Chris Olah'
- this.personalURL = object.authorURL; // 'https://colah.github.io'
- this.affiliation = object.affiliation; // 'Google Brain'
- this.affiliationURL = object.affiliationURL; // 'https://g.co/brain'
- this.affiliations = object.affiliations || []; // new-style affiliations
- }
-
- // 'Chris'
- get firstName() {
- const names = this.name.split(' ');
- return names.slice(0, names.length - 1).join(' ');
- }
-
- // 'Olah'
- get lastName() {
- const names = this.name.split(' ');
- return names[names.length -1];
- }
- }
-
- function mergeFromYMLFrontmatter(target, source) {
- target.title = source.title;
- if (source.published) {
- if (source.published instanceof Date) {
- target.publishedDate = source.published;
- } else if (source.published.constructor === String) {
- target.publishedDate = new Date(source.published);
- }
- }
- if (source.publishedDate) {
- if (source.publishedDate instanceof Date) {
- target.publishedDate = source.publishedDate;
- } else if (source.publishedDate.constructor === String) {
- target.publishedDate = new Date(source.publishedDate);
- } else {
- console.error('Don\'t know what to do with published date: ' + source.publishedDate);
- }
- }
- target.description = source.description;
- target.authors = source.authors.map( (authorObject) => new Author(authorObject));
- target.katex = source.katex;
- target.password = source.password;
- if (source.doi) {
- target.doi = source.doi;
- }
- }
-
- class FrontMatter {
- constructor() {
- this.title = 'unnamed article'; // 'Attention and Augmented Recurrent Neural Networks'
- this.description = ''; // 'A visual overview of neural attention...'
- this.authors = []; // Array of Author(s)
-
- this.bibliography = new Map();
- this.bibliographyParsed = false;
- // {
- // 'gregor2015draw': {
- // 'title': 'DRAW: A recurrent neural network for image generation',
- // 'author': 'Gregor, Karol and Danihelka, Ivo and Graves, Alex and Rezende, Danilo Jimenez and Wierstra, Daan',
- // 'journal': 'arXiv preprint arXiv:1502.04623',
- // 'year': '2015',
- // 'url': 'https://arxiv.org/pdf/1502.04623.pdf',
- // 'type': 'article'
- // },
- // }
-
- // Citation keys should be listed in the order that they are appear in the document.
- // Each key refers to a key in the bibliography dictionary.
- this.citations = []; // [ 'gregor2015draw', 'mercier2011humans' ]
- this.citationsCollected = false;
-
- //
- // Assigned from posts.csv
- //
-
- // publishedDate: 2016-09-08T07:00:00.000Z,
- // tags: [ 'rnn' ],
- // distillPath: '2016/augmented-rnns',
- // githubPath: 'distillpub/post--augmented-rnns',
- // doiSuffix: 1,
-
- //
- // Assigned from journal
- //
- this.journal = {};
- // journal: {
- // 'title': 'Distill',
- // 'full_title': 'Distill',
- // 'abbrev_title': 'Distill',
- // 'url': 'http://distill.pub',
- // 'doi': '10.23915/distill',
- // 'publisherName': 'Distill Working Group',
- // 'publisherEmail': 'admin@distill.pub',
- // 'issn': '2476-0757',
- // 'editors': [...],
- // 'committee': [...]
- // }
- // volume: 1,
- // issue: 9,
-
- this.katex = {};
-
- //
- // Assigned from publishing process
- //
-
- // githubCompareUpdatesUrl: 'https://github.com/distillpub/post--augmented-rnns/compare/1596e094d8943d2dc0ea445d92071129c6419c59...3bd9209e0c24d020f87cf6152dcecc6017cbc193',
- // updatedDate: 2017-03-21T07:13:16.000Z,
- // doi: '10.23915/distill.00001',
- this.doi = undefined;
- this.publishedDate = undefined;
- }
-
- // Example:
- // title: Demo Title Attention and Augmented Recurrent Neural Networks
- // published: Jan 10, 2017
- // authors:
- // - Chris Olah:
- // - Shan Carter: http://shancarter.com
- // affiliations:
- // - Google Brain:
- // - Google Brain: http://g.co/brain
-
- //
- // Computed Properties
- //
-
- // 'http://distill.pub/2016/augmented-rnns',
- set url(value) {
- this._url = value;
- }
- get url() {
- if (this._url) {
- return this._url;
- } else if (this.distillPath && this.journal.url) {
- return this.journal.url + '/' + this.distillPath;
- } else if (this.journal.url) {
- return this.journal.url;
- }
- }
-
- // 'https://github.com/distillpub/post--augmented-rnns',
- get githubUrl() {
- if (this.githubPath) {
- return 'https://github.com/' + this.githubPath;
- } else {
- return undefined;
- }
- }
-
- // TODO resolve differences in naming of URL/Url/url.
- // 'http://distill.pub/2016/augmented-rnns/thumbnail.jpg',
- set previewURL(value) {
- this._previewURL = value;
- }
- get previewURL() {
- return this._previewURL ? this._previewURL : this.url + '/thumbnail.jpg';
- }
-
- // 'Thu, 08 Sep 2016 00:00:00 -0700',
- get publishedDateRFC() {
- return RFC(this.publishedDate);
- }
-
- // 'Thu, 08 Sep 2016 00:00:00 -0700',
- get updatedDateRFC() {
- return RFC(this.updatedDate);
- }
-
- // 2016,
- get publishedYear() {
- return this.publishedDate.getFullYear();
- }
-
- // 'Sept',
- get publishedMonth() {
- return months[this.publishedDate.getMonth()];
- }
-
- // 8,
- get publishedDay() {
- return this.publishedDate.getDate();
- }
-
- // '09',
- get publishedMonthPadded() {
- return zeroPad(this.publishedDate.getMonth() + 1);
- }
-
- // '08',
- get publishedDayPadded() {
- return zeroPad(this.publishedDate.getDate());
- }
-
- get publishedISODateOnly() {
- return this.publishedDate.toISOString().split('T')[0];
- }
-
- get volume() {
- const volume = this.publishedYear - 2015;
- if (volume < 1) {
- throw new Error('Invalid publish date detected during computing volume');
- }
- return volume;
- }
-
- get issue() {
- return this.publishedDate.getMonth() + 1;
- }
-
- // 'Olah & Carter',
- get concatenatedAuthors() {
- if (this.authors.length > 2) {
- return this.authors[0].lastName + ', et al.';
- } else if (this.authors.length === 2) {
- return this.authors[0].lastName + ' & ' + this.authors[1].lastName;
- } else if (this.authors.length === 1) {
- return this.authors[0].lastName;
- }
- }
-
- // 'Olah, Chris and Carter, Shan',
- get bibtexAuthors() {
- return this.authors.map(author => {
- return author.lastName + ', ' + author.firstName;
- }).join(' and ');
- }
-
- // 'olah2016attention'
- get slug() {
- let slug = '';
- if (this.authors.length) {
- slug += this.authors[0].lastName.toLowerCase();
- slug += this.publishedYear;
- slug += this.title.split(' ')[0].toLowerCase();
- }
- return slug || 'Untitled';
- }
-
- get bibliographyEntries() {
- return new Map(this.citations.map( citationKey => {
- const entry = this.bibliography.get(citationKey);
- return [citationKey, entry];
- }));
- }
-
- set bibliography(bibliography) {
- if (bibliography instanceof Map) {
- this._bibliography = bibliography;
- } else if (typeof bibliography === 'object') {
- this._bibliography = mapFromObject(bibliography);
- }
- }
-
- get bibliography() {
- return this._bibliography;
- }
-
- static fromObject(source) {
- const frontMatter = new FrontMatter();
- Object.assign(frontMatter, source);
- return frontMatter;
- }
-
- assignToObject(target) {
- Object.assign(target, this);
- target.bibliography = objectFromMap(this.bibliographyEntries);
- target.url = this.url;
- target.doi = this.doi;
- target.githubUrl = this.githubUrl;
- target.previewURL = this.previewURL;
- if (this.publishedDate) {
- target.volume = this.volume;
- target.issue = this.issue;
- target.publishedDateRFC = this.publishedDateRFC;
- target.publishedYear = this.publishedYear;
- target.publishedMonth = this.publishedMonth;
- target.publishedDay = this.publishedDay;
- target.publishedMonthPadded = this.publishedMonthPadded;
- target.publishedDayPadded = this.publishedDayPadded;
- }
- if (this.updatedDate) {
- target.updatedDateRFC = this.updatedDateRFC;
- }
- target.concatenatedAuthors = this.concatenatedAuthors;
- target.bibtexAuthors = this.bibtexAuthors;
- target.slug = this.slug;
- }
-
- }
-
- // Copyright 2018 The Distill Template Authors
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- const Mutating = (superclass) => {
- return class extends superclass {
-
- constructor() {
- super();
-
- // set up mutation observer
- const options = {childList: true, characterData: true, subtree: true};
- const observer = new MutationObserver( () => {
- observer.disconnect();
- this.renderIfPossible();
- observer.observe(this, options);
- });
-
- // ...and listen for changes
- observer.observe(this, options);
- }
-
- connectedCallback() {
- super.connectedCallback();
-
- this.renderIfPossible();
- }
-
- // potential TODO: check if this is enough for all our usecases
- // maybe provide a custom function to tell if we have enough information to render
- renderIfPossible() {
- if (this.textContent && this.root) {
- this.renderContent();
- }
- }
-
- renderContent() {
- console.error(`Your class ${this.constructor.name} must provide a custom renderContent() method!` );
- }
-
- }; // end class
- }; // end mixin function
-
- // Copyright 2018 The Distill Template Authors
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- /*global ShadyCSS*/
-
- const Template = (name, templateString, useShadow = true) => {
-
- return (superclass) => {
-
- const template = document.createElement('template');
- template.innerHTML = templateString;
-
- if (useShadow && 'ShadyCSS' in window) {
- ShadyCSS.prepareTemplate(template, name);
- }
-
- return class extends superclass {
-
- static get is() { return name; }
-
- constructor() {
- super();
-
- this.clone = document.importNode(template.content, true);
- if (useShadow) {
- this.attachShadow({mode: 'open'});
- this.shadowRoot.appendChild(this.clone);
- }
- }
-
- connectedCallback() {
- if (this.hasAttribute('distill-prerendered')) {
- return;
- }
- if (useShadow) {
- if ('ShadyCSS' in window) {
- ShadyCSS.styleElement(this);
- }
- } else {
- this.insertBefore(this.clone, this.firstChild);
- }
- }
-
- get root() {
- if (useShadow) {
- return this.shadowRoot;
- } else {
- return this;
- }
- }
-
- /* TODO: Are we using these? Should we even? */
- $(query) {
- return this.root.querySelector(query);
- }
-
- $$(query) {
- return this.root.querySelectorAll(query);
- }
- };
- };
- };
-
- var math = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nspan.katex-display {\n text-align: left;\n padding: 8px 0 8px 0;\n margin: 0.5em 0 0.5em 1em;\n}\n\nspan.katex {\n -webkit-font-smoothing: antialiased;\n color: rgba(0, 0, 0, 0.8);\n font-size: 1.18em;\n}\n";
-
- // Copyright 2018 The Distill Template Authors
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- // This is a straight concatenation of code from KaTeX's contrib folder,
- // but we aren't using some of their helpers that don't work well outside a browser environment.
-
- /*global katex */
-
- const findEndOfMath = function(delimiter, text, startIndex) {
- // Adapted from
- // https://github.com/Khan/perseus/blob/master/src/perseus-markdown.jsx
- let index = startIndex;
- let braceLevel = 0;
-
- const delimLength = delimiter.length;
-
- while (index < text.length) {
- const character = text[index];
-
- if (
- braceLevel <= 0 &&
- text.slice(index, index + delimLength) === delimiter
- ) {
- return index;
- } else if (character === "\\") {
- index++;
- } else if (character === "{") {
- braceLevel++;
- } else if (character === "}") {
- braceLevel--;
- }
-
- index++;
- }
-
- return -1;
- };
-
- const splitAtDelimiters = function(startData, leftDelim, rightDelim, display) {
- const finalData = [];
-
- for (let i = 0; i < startData.length; i++) {
- if (startData[i].type === "text") {
- const text = startData[i].data;
-
- let lookingForLeft = true;
- let currIndex = 0;
- let nextIndex;
-
- nextIndex = text.indexOf(leftDelim);
- if (nextIndex !== -1) {
- currIndex = nextIndex;
- finalData.push({
- type: "text",
- data: text.slice(0, currIndex)
- });
- lookingForLeft = false;
- }
-
- while (true) {
- // eslint-disable-line no-constant-condition
- if (lookingForLeft) {
- nextIndex = text.indexOf(leftDelim, currIndex);
- if (nextIndex === -1) {
- break;
- }
-
- finalData.push({
- type: "text",
- data: text.slice(currIndex, nextIndex)
- });
-
- currIndex = nextIndex;
- } else {
- nextIndex = findEndOfMath(
- rightDelim,
- text,
- currIndex + leftDelim.length
- );
- if (nextIndex === -1) {
- break;
- }
-
- finalData.push({
- type: "math",
- data: text.slice(currIndex + leftDelim.length, nextIndex),
- rawData: text.slice(currIndex, nextIndex + rightDelim.length),
- display: display
- });
-
- currIndex = nextIndex + rightDelim.length;
- }
-
- lookingForLeft = !lookingForLeft;
- }
-
- finalData.push({
- type: "text",
- data: text.slice(currIndex)
- });
- } else {
- finalData.push(startData[i]);
- }
- }
-
- return finalData;
- };
-
- const splitWithDelimiters = function(text, delimiters) {
- let data = [{ type: "text", data: text }];
- for (let i = 0; i < delimiters.length; i++) {
- const delimiter = delimiters[i];
- data = splitAtDelimiters(
- data,
- delimiter.left,
- delimiter.right,
- delimiter.display || false
- );
- }
- return data;
- };
-
- /* Note: optionsCopy is mutated by this method. If it is ever exposed in the
- * API, we should copy it before mutating.
- */
- const renderMathInText = function(text, optionsCopy) {
- const data = splitWithDelimiters(text, optionsCopy.delimiters);
- const fragment = document.createDocumentFragment();
-
- for (let i = 0; i < data.length; i++) {
- if (data[i].type === "text") {
- fragment.appendChild(document.createTextNode(data[i].data));
- } else {
- const tag = document.createElement("d-math");
- const math = data[i].data;
- // Override any display mode defined in the settings with that
- // defined by the text itself
- optionsCopy.displayMode = data[i].display;
- try {
- tag.textContent = math;
- if (optionsCopy.displayMode) {
- tag.setAttribute("block", "");
- }
- } catch (e) {
- if (!(e instanceof katex.ParseError)) {
- throw e;
- }
- optionsCopy.errorCallback(
- "KaTeX auto-render: Failed to parse `" + data[i].data + "` with ",
- e
- );
- fragment.appendChild(document.createTextNode(data[i].rawData));
- continue;
- }
- fragment.appendChild(tag);
- }
- }
-
- return fragment;
- };
-
- const renderElem = function(elem, optionsCopy) {
- for (let i = 0; i < elem.childNodes.length; i++) {
- const childNode = elem.childNodes[i];
- if (childNode.nodeType === 3) {
- // Text node
- const text = childNode.textContent;
- if (optionsCopy.mightHaveMath(text)) {
- const frag = renderMathInText(text, optionsCopy);
- i += frag.childNodes.length - 1;
- elem.replaceChild(frag, childNode);
- }
- } else if (childNode.nodeType === 1) {
- // Element node
- const shouldRender =
- optionsCopy.ignoredTags.indexOf(childNode.nodeName.toLowerCase()) ===
- -1;
-
- if (shouldRender) {
- renderElem(childNode, optionsCopy);
- }
- }
- // Otherwise, it's something else, and ignore it.
- }
- };
-
- const defaultAutoRenderOptions = {
- delimiters: [
- { left: "$$", right: "$$", display: true },
- { left: "\\[", right: "\\]", display: true },
- { left: "\\(", right: "\\)", display: false }
- // LaTeX uses this, but it ruins the display of normal `$` in text:
- // {left: '$', right: '$', display: false},
- ],
-
- ignoredTags: [
- "script",
- "noscript",
- "style",
- "textarea",
- "pre",
- "code",
- "svg"
- ],
-
- errorCallback: function(msg, err) {
- console.error(msg, err);
- }
- };
-
- const renderMathInElement = function(elem, options) {
- if (!elem) {
- throw new Error("No element provided to render");
- }
-
- const optionsCopy = Object.assign({}, defaultAutoRenderOptions, options);
- const delimiterStrings = optionsCopy.delimiters.flatMap(d => [
- d.left,
- d.right
- ]);
- const mightHaveMath = text =>
- delimiterStrings.some(d => text.indexOf(d) !== -1);
- optionsCopy.mightHaveMath = mightHaveMath;
- renderElem(elem, optionsCopy);
- };
-
- // Copyright 2018 The Distill Template Authors
-
- const katexJSURL = 'https://distill.pub/third-party/katex/katex.min.js';
- const katexCSSTag = '';
-
- const T = Template('d-math', `
-${katexCSSTag}
-
-
-`);
-
- // DMath, not Math, because that would conflict with the JS built-in
- class DMath extends Mutating(T(HTMLElement)) {
-
- static set katexOptions(options) {
- DMath._katexOptions = options;
- if (DMath.katexOptions.delimiters) {
- if (!DMath.katexAdded) {
- DMath.addKatex();
- } else {
- DMath.katexLoadedCallback();
- }
- }
- }
-
- static get katexOptions() {
- if (!DMath._katexOptions) {
- DMath._katexOptions = {
- delimiters: [ { 'left':'$$', 'right':'$$', 'display': false } ]
- };
- }
- return DMath._katexOptions;
- }
-
- static katexLoadedCallback() {
- // render all d-math tags
- const mathTags = document.querySelectorAll('d-math');
- for (const mathTag of mathTags) {
- mathTag.renderContent();
- }
- // transform inline delimited math to d-math tags
- if (DMath.katexOptions.delimiters) {
- renderMathInElement(document.body, DMath.katexOptions);
- }
- }
-
- static addKatex() {
- // css tag can use this convenience function
- document.head.insertAdjacentHTML('beforeend', katexCSSTag);
- // script tag has to be created to work properly
- const scriptTag = document.createElement('script');
- scriptTag.src = katexJSURL;
- scriptTag.async = true;
- scriptTag.onload = DMath.katexLoadedCallback;
- scriptTag.crossorigin = 'anonymous';
- document.head.appendChild(scriptTag);
-
- DMath.katexAdded = true;
- }
-
- get options() {
- const localOptions = { displayMode: this.hasAttribute('block') };
- return Object.assign(localOptions, DMath.katexOptions);
- }
-
- connectedCallback() {
- super.connectedCallback();
- if (!DMath.katexAdded) {
- DMath.addKatex();
- }
- }
-
- renderContent() {
- if (typeof katex !== 'undefined') {
- const container = this.root.querySelector('#katex-container');
- katex.render(this.textContent, container, this.options);
- }
- }
-
- }
-
- DMath.katexAdded = false;
- DMath.inlineMathRendered = false;
- window.DMath = DMath; // TODO: check if this can be removed, or if we should expose a distill global
-
- // Copyright 2018 The Distill Template Authors
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- function collect_citations(dom = document) {
- const citations = new Set();
- const citeTags = dom.querySelectorAll("d-cite");
- for (const tag of citeTags) {
- const keyString = tag.getAttribute("key") || tag.getAttribute("bibtex-key");
- const keys = keyString.split(",").map(k => k.trim());
- for (const key of keys) {
- citations.add(key);
- }
- }
- return [...citations];
- }
-
- function author_string(ent, template, sep, finalSep) {
- if (ent.author == null) {
- return "";
- }
- var names = ent.author.split(" and ");
- let name_strings = names.map(name => {
- name = name.trim();
- if (name.indexOf(",") != -1) {
- var last = name.split(",")[0].trim();
- var firsts = name.split(",")[1];
- } else if (name.indexOf(" ") != -1) {
- var last = name
- .split(" ")
- .slice(-1)[0]
- .trim();
- var firsts = name
- .split(" ")
- .slice(0, -1)
- .join(" ");
- } else {
- var last = name.trim();
- }
- var initials = "";
- if (firsts != undefined) {
- initials = firsts
- .trim()
- .split(" ")
- .map(s => s.trim()[0]);
- initials = initials.join(".") + ".";
- }
- return template
- .replace("${F}", firsts)
- .replace("${L}", last)
- .replace("${I}", initials)
- .trim(); // in case one of first or last was empty
- });
- if (names.length > 1) {
- var str = name_strings.slice(0, names.length - 1).join(sep);
- str += (finalSep || sep) + name_strings[names.length - 1];
- return str;
- } else {
- return name_strings[0];
- }
- }
-
- function venue_string(ent) {
- var cite = ent.journal || ent.booktitle || "";
- if ("volume" in ent) {
- var issue = ent.issue || ent.number;
- issue = issue != undefined ? "(" + issue + ")" : "";
- cite += ", Vol " + ent.volume + issue;
- }
- if ("pages" in ent) {
- cite += ", pp. " + ent.pages;
- }
- if (cite != "") cite += ". ";
- if ("publisher" in ent) {
- cite += ent.publisher;
- if (cite[cite.length - 1] != ".") cite += ".";
- }
- return cite;
- }
-
- function link_string(ent) {
- if ("url" in ent) {
- var url = ent.url;
- var arxiv_match = /arxiv\.org\/abs\/([0-9\.]*)/.exec(url);
- if (arxiv_match != null) {
- url = `http://arxiv.org/pdf/${arxiv_match[1]}.pdf`;
- }
-
- if (url.slice(-4) == ".pdf") {
- var label = "PDF";
- } else if (url.slice(-5) == ".html") {
- var label = "HTML";
- }
- return ` [${label || "link"}]`;
- } /* else if ("doi" in ent){
- return ` [DOI]`;
- }*/ else {
- return "";
- }
- }
- function doi_string(ent, new_line) {
- if ("doi" in ent) {
- return `${new_line ? " " : ""} DOI: ${ent.doi}`;
- } else {
- return "";
- }
- }
-
- function title_string(ent) {
- return '' + ent.title + " ";
- }
-
- function bibliography_cite(ent, fancy) {
- if (ent) {
- var cite = title_string(ent);
- cite += link_string(ent) + " ";
- if (ent.author) {
- cite += author_string(ent, "${L}, ${I}", ", ", " and ");
- if (ent.year || ent.date) {
- cite += ", ";
- }
- }
- if (ent.year || ent.date) {
- cite += (ent.year || ent.date) + ". ";
- } else {
- cite += ". ";
- }
- cite += venue_string(ent);
- cite += doi_string(ent);
- return cite;
- /*var cite = author_string(ent, "${L}, ${I}", ", ", " and ");
- if (ent.year || ent.date){
- cite += ", " + (ent.year || ent.date) + ". "
- } else {
- cite += ". "
- }
- cite += "" + ent.title + ". ";
- cite += venue_string(ent);
- cite += doi_string(ent);
- cite += link_string(ent);
- return cite*/
- } else {
- return "?";
- }
- }
-
- function hover_cite(ent) {
- if (ent) {
- var cite = "";
- cite += "" + ent.title + "";
- cite += link_string(ent);
- cite += " ";
-
- var a_str = author_string(ent, "${I} ${L}", ", ") + ".";
- var v_str =
- venue_string(ent).trim() + " " + ent.year + ". " + doi_string(ent, true);
-
- if ((a_str + v_str).length < Math.min(40, ent.title.length)) {
- cite += a_str + " " + v_str;
- } else {
- cite += a_str + " " + v_str;
- }
- return cite;
- } else {
- return "?";
- }
- }
-
- function domContentLoaded() {
- return ['interactive', 'complete'].indexOf(document.readyState) !== -1;
- }
-
- // Copyright 2018 The Distill Template Authors
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- function _moveLegacyAffiliationFormatIntoArray(frontMatter) {
- // authors used to have propoerties "affiliation" and "affiliationURL".
- // We now encourage using an array for affiliations containing objects with
- // properties "name" and "url".
- for (let author of frontMatter.authors) {
- const hasOldStyle = Boolean(author.affiliation);
- const hasNewStyle = Boolean(author.affiliations);
- if (!hasOldStyle) continue;
- if (hasNewStyle) {
- console.warn(`Author ${author.author} has both old-style ("affiliation" & "affiliationURL") and new style ("affiliations") affiliation information!`);
- } else {
- let newAffiliation = {
- "name": author.affiliation
- };
- if (author.affiliationURL) newAffiliation.url = author.affiliationURL;
- author.affiliations = [newAffiliation];
- }
- }
- return frontMatter
- }
-
- function parseFrontmatter(element) {
- const scriptTag = element.firstElementChild;
- if (scriptTag) {
- const type = scriptTag.getAttribute('type');
- if (type.split('/')[1] == 'json') {
- const content = scriptTag.textContent;
- const parsed = JSON.parse(content);
- return _moveLegacyAffiliationFormatIntoArray(parsed);
- } else {
- console.error('Distill only supports JSON frontmatter tags anymore; no more YAML.');
- }
- } else {
- console.error('You added a frontmatter tag but did not provide a script tag with front matter data in it. Please take a look at our templates.');
- }
- return {};
- }
-
- class FrontMatter$1 extends HTMLElement {
-
- static get is() { return 'd-front-matter'; }
-
- constructor() {
- super();
-
- const options = {childList: true, characterData: true, subtree: true};
- const observer = new MutationObserver( (entries) => {
- for (const entry of entries) {
- if (entry.target.nodeName === 'SCRIPT' || entry.type === 'characterData') {
- const data = parseFrontmatter(this);
- this.notify(data);
- }
- }
- });
- observer.observe(this, options);
- }
-
- notify(data) {
- const options = { detail: data, bubbles: true };
- const event = new CustomEvent('onFrontMatterChanged', options);
- document.dispatchEvent(event);
- }
-
- }
-
- // Copyright 2018 The Distill Template Authors
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- // no appendix -> add appendix
- // title in front, no h1 -> add it
- // no title in front, h1 -> read and put into frontMatter
- // footnote -> footnote list
- // break up bib
- // if citation, no bib-list -> add citation-list
-
- // if authors, no byline -> add byline
-
- function optionalComponents(dom, data) {
- const body = dom.body;
- const article = body.querySelector('d-article');
-
- // If we don't have an article tag, something weird is going on—giving up.
- if (!article) {
- console.warn('No d-article tag found; skipping adding optional components!');
- return;
- }
-
- let byline = dom.querySelector('d-byline');
- if (!byline) {
- if (data.authors) {
- byline = dom.createElement('d-byline');
- body.insertBefore(byline, article);
- } else {
- console.warn('No authors found in front matter; please add them before submission!');
- }
- }
-
- let title = dom.querySelector('d-title');
- if (!title) {
- title = dom.createElement('d-title');
- body.insertBefore(title, byline);
- }
-
- let h1 = title.querySelector('h1');
- if (!h1) {
- h1 = dom.createElement('h1');
- h1.textContent = data.title;
- title.insertBefore(h1, title.firstChild);
- }
-
- const hasPassword = typeof data.password !== 'undefined';
- let interstitial = body.querySelector('d-interstitial');
- if (hasPassword && !interstitial) {
- const inBrowser = typeof window !== 'undefined';
- const onLocalhost = inBrowser && window.location.hostname.includes('localhost');
- if (!inBrowser || !onLocalhost) {
- interstitial = dom.createElement('d-interstitial');
- interstitial.password = data.password;
- body.insertBefore(interstitial, body.firstChild);
- }
- } else if (!hasPassword && interstitial) {
- interstitial.parentElement.removeChild(this);
- }
-
- let appendix = dom.querySelector('d-appendix');
- if (!appendix) {
- appendix = dom.createElement('d-appendix');
- dom.body.appendChild(appendix);
- }
-
- let footnoteList = dom.querySelector('d-footnote-list');
- if (!footnoteList) {
- footnoteList = dom.createElement('d-footnote-list');
- appendix.appendChild(footnoteList);
- }
-
- let citationList = dom.querySelector('d-citation-list');
- if (!citationList) {
- citationList = dom.createElement('d-citation-list');
- appendix.appendChild(citationList);
- }
-
- }
-
- // Copyright 2018 The Distill Template Authors
-
- const frontMatter = new FrontMatter();
-
- const Controller = {
- frontMatter: frontMatter,
- waitingOn: {
- bibliography: [],
- citations: []
- },
- listeners: {
- onCiteKeyCreated(event) {
- const [citeTag, keys] = event.detail;
-
- // ensure we have citations
- if (!frontMatter.citationsCollected) {
- // console.debug('onCiteKeyCreated, but unresolved dependency ("citations"). Enqueing.');
- Controller.waitingOn.citations.push(() =>
- Controller.listeners.onCiteKeyCreated(event)
- );
- return;
- }
-
- // ensure we have a loaded bibliography
- if (!frontMatter.bibliographyParsed) {
- // console.debug('onCiteKeyCreated, but unresolved dependency ("bibliography"). Enqueing.');
- Controller.waitingOn.bibliography.push(() =>
- Controller.listeners.onCiteKeyCreated(event)
- );
- return;
- }
-
- const numbers = keys.map(key => frontMatter.citations.indexOf(key));
- citeTag.numbers = numbers;
- const entries = keys.map(key => frontMatter.bibliography.get(key));
- citeTag.entries = entries;
- },
-
- onCiteKeyChanged() {
- // const [citeTag, keys] = event.detail;
-
- // update citations
- frontMatter.citations = collect_citations();
- frontMatter.citationsCollected = true;
- for (const waitingCallback of Controller.waitingOn.citations.slice()) {
- waitingCallback();
- }
-
- // update bibliography
- const citationListTag = document.querySelector("d-citation-list");
- const bibliographyEntries = new Map(
- frontMatter.citations.map(citationKey => {
- return [citationKey, frontMatter.bibliography.get(citationKey)];
- })
- );
- citationListTag.citations = bibliographyEntries;
-
- const citeTags = document.querySelectorAll("d-cite");
- for (const citeTag of citeTags) {
- console.log(citeTag);
- const keys = citeTag.keys;
- const numbers = keys.map(key => frontMatter.citations.indexOf(key));
- citeTag.numbers = numbers;
- const entries = keys.map(key => frontMatter.bibliography.get(key));
- citeTag.entries = entries;
- }
- },
-
- onCiteKeyRemoved(event) {
- Controller.listeners.onCiteKeyChanged(event);
- },
-
- onBibliographyChanged(event) {
- const citationListTag = document.querySelector("d-citation-list");
-
- const bibliography = event.detail;
-
- frontMatter.bibliography = bibliography;
- frontMatter.bibliographyParsed = true;
- for (const waitingCallback of Controller.waitingOn.bibliography.slice()) {
- waitingCallback();
- }
-
- // ensure we have citations
- if (!frontMatter.citationsCollected) {
- Controller.waitingOn.citations.push(function() {
- Controller.listeners.onBibliographyChanged({
- target: event.target,
- detail: event.detail
- });
- });
- return;
- }
-
- if (citationListTag.hasAttribute("distill-prerendered")) {
- console.debug("Citation list was prerendered; not updating it.");
- } else {
- const entries = new Map(
- frontMatter.citations.map(citationKey => {
- return [citationKey, frontMatter.bibliography.get(citationKey)];
- })
- );
- citationListTag.citations = entries;
- }
- },
-
- onFootnoteChanged() {
- // const footnote = event.detail;
- //TODO: optimize to only update current footnote
- const footnotesList = document.querySelector("d-footnote-list");
- if (footnotesList) {
- const footnotes = document.querySelectorAll("d-footnote");
- footnotesList.footnotes = footnotes;
- }
- },
-
- onFrontMatterChanged(event) {
- const data = event.detail;
- mergeFromYMLFrontmatter(frontMatter, data);
-
- const interstitial = document.querySelector("d-interstitial");
- if (interstitial) {
- if (typeof frontMatter.password !== "undefined") {
- interstitial.password = frontMatter.password;
- } else {
- interstitial.parentElement.removeChild(interstitial);
- }
- }
-
- const prerendered = document.body.hasAttribute("distill-prerendered");
- if (!prerendered && domContentLoaded()) {
- optionalComponents(document, frontMatter);
-
- const appendix = document.querySelector("distill-appendix");
- if (appendix) {
- appendix.frontMatter = frontMatter;
- }
-
- const byline = document.querySelector("d-byline");
- if (byline) {
- byline.frontMatter = frontMatter;
- }
-
- if (data.katex) {
- DMath.katexOptions = data.katex;
- }
- }
- },
-
- DOMContentLoaded() {
- if (Controller.loaded) {
- console.warn(
- "Controller received DOMContentLoaded but was already loaded!"
- );
- return;
- } else if (!domContentLoaded()) {
- console.warn(
- "Controller received DOMContentLoaded at document.readyState: " +
- document.readyState +
- "!"
- );
- return;
- } else {
- Controller.loaded = true;
- console.debug("Runlevel 4: Controller running DOMContentLoaded");
- }
-
- const frontMatterTag = document.querySelector("d-front-matter");
- if (frontMatterTag) {
- const data = parseFrontmatter(frontMatterTag);
- Controller.listeners.onFrontMatterChanged({ detail: data });
- }
-
- // Resolving "citations" dependency due to initial DOM load
- frontMatter.citations = collect_citations();
- frontMatter.citationsCollected = true;
- for (const waitingCallback of Controller.waitingOn.citations.slice()) {
- waitingCallback();
- }
-
- if (frontMatter.bibliographyParsed) {
- for (const waitingCallback of Controller.waitingOn.bibliography.slice()) {
- waitingCallback();
- }
- }
-
- const footnotesList = document.querySelector("d-footnote-list");
- if (footnotesList) {
- const footnotes = document.querySelectorAll("d-footnote");
- footnotesList.footnotes = footnotes;
- }
- }
- } // listeners
- }; // Controller
-
- var base = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nhtml {\n font-size: 14px;\n\tline-height: 1.6em;\n /* font-family: \"Libre Franklin\", \"Helvetica Neue\", sans-serif; */\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen, Ubuntu, Cantarell, \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", Arial, sans-serif;\n /*, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";*/\n text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n}\n\n@media(min-width: 768px) {\n html {\n font-size: 16px;\n }\n}\n\nbody {\n margin: 0;\n}\n\na {\n color: #004276;\n}\n\nfigure {\n margin: 0;\n}\n\ntable {\n\tborder-collapse: collapse;\n\tborder-spacing: 0;\n}\n\ntable th {\n\ttext-align: left;\n}\n\ntable thead {\n border-bottom: 1px solid rgba(0, 0, 0, 0.05);\n}\n\ntable thead th {\n padding-bottom: 0.5em;\n}\n\ntable tbody :first-child td {\n padding-top: 0.5em;\n}\n\npre {\n overflow: auto;\n max-width: 100%;\n}\n\np {\n margin-top: 0;\n margin-bottom: 1em;\n}\n\nsup, sub {\n vertical-align: baseline;\n position: relative;\n top: -0.4em;\n line-height: 1em;\n}\n\nsub {\n top: 0.4em;\n}\n\n.kicker,\n.marker {\n font-size: 15px;\n font-weight: 600;\n color: rgba(0, 0, 0, 0.5);\n}\n\n\n/* Headline */\n\n@media(min-width: 1024px) {\n d-title h1 span {\n display: block;\n }\n}\n\n/* Figure */\n\nfigure {\n position: relative;\n margin-bottom: 2.5em;\n margin-top: 1.5em;\n}\n\nfigcaption+figure {\n\n}\n\nfigure img {\n width: 100%;\n}\n\nfigure svg text,\nfigure svg tspan {\n}\n\nfigcaption,\n.figcaption {\n color: rgba(0, 0, 0, 0.6);\n font-size: 12px;\n line-height: 1.5em;\n}\n\n@media(min-width: 1024px) {\nfigcaption,\n.figcaption {\n font-size: 13px;\n }\n}\n\nfigure.external img {\n background: white;\n border: 1px solid rgba(0, 0, 0, 0.1);\n box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);\n padding: 18px;\n box-sizing: border-box;\n}\n\nfigcaption a {\n color: rgba(0, 0, 0, 0.6);\n}\n\nfigcaption b,\nfigcaption strong, {\n font-weight: 600;\n color: rgba(0, 0, 0, 1.0);\n}\n";
-
- var layout = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@supports not (display: grid) {\n .base-grid,\n distill-header,\n d-title,\n d-abstract,\n d-article,\n d-appendix,\n distill-appendix,\n d-byline,\n d-footnote-list,\n d-citation-list,\n distill-footer {\n display: block;\n padding: 8px;\n }\n}\n\n.base-grid,\ndistill-header,\nd-title,\nd-abstract,\nd-article,\nd-appendix,\ndistill-appendix,\nd-byline,\nd-footnote-list,\nd-citation-list,\ndistill-footer {\n display: grid;\n justify-items: stretch;\n grid-template-columns: [screen-start] 8px [page-start kicker-start text-start gutter-start middle-start] 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr [text-end page-end gutter-end kicker-end middle-end] 8px [screen-end];\n grid-column-gap: 8px;\n}\n\n.grid {\n display: grid;\n grid-column-gap: 8px;\n}\n\n@media(min-width: 768px) {\n .base-grid,\n distill-header,\n d-title,\n d-abstract,\n d-article,\n d-appendix,\n distill-appendix,\n d-byline,\n d-footnote-list,\n d-citation-list,\n distill-footer {\n grid-template-columns: [screen-start] 1fr [page-start kicker-start middle-start text-start] 45px 45px 45px 45px 45px 45px 45px 45px [ kicker-end text-end gutter-start] 45px [middle-end] 45px [page-end gutter-end] 1fr [screen-end];\n grid-column-gap: 16px;\n }\n\n .grid {\n grid-column-gap: 16px;\n }\n}\n\n@media(min-width: 1000px) {\n .base-grid,\n distill-header,\n d-title,\n d-abstract,\n d-article,\n d-appendix,\n distill-appendix,\n d-byline,\n d-footnote-list,\n d-citation-list,\n distill-footer {\n grid-template-columns: [screen-start] 1fr [page-start kicker-start] 50px [middle-start] 50px [text-start kicker-end] 50px 50px 50px 50px 50px 50px 50px 50px [text-end gutter-start] 50px [middle-end] 50px [page-end gutter-end] 1fr [screen-end];\n grid-column-gap: 16px;\n }\n\n .grid {\n grid-column-gap: 16px;\n }\n}\n\n@media(min-width: 1180px) {\n .base-grid,\n distill-header,\n d-title,\n d-abstract,\n d-article,\n d-appendix,\n distill-appendix,\n d-byline,\n d-footnote-list,\n d-citation-list,\n distill-footer {\n grid-template-columns: [screen-start] 1fr [page-start kicker-start] 60px [middle-start] 60px [text-start kicker-end] 60px 60px 60px 60px 60px 60px 60px 60px [text-end gutter-start] 60px [middle-end] 60px [page-end gutter-end] 1fr [screen-end];\n grid-column-gap: 32px;\n }\n\n .grid {\n grid-column-gap: 32px;\n }\n}\n\n\n\n\n.base-grid {\n grid-column: screen;\n}\n\n/* .l-body,\nd-article > * {\n grid-column: text;\n}\n\n.l-page,\nd-title > *,\nd-figure {\n grid-column: page;\n} */\n\n.l-gutter {\n grid-column: gutter;\n}\n\n.l-text,\n.l-body {\n grid-column: text;\n}\n\n.l-page {\n grid-column: page;\n}\n\n.l-body-outset {\n grid-column: middle;\n}\n\n.l-page-outset {\n grid-column: page;\n}\n\n.l-screen {\n grid-column: screen;\n}\n\n.l-screen-inset {\n grid-column: screen;\n padding-left: 16px;\n padding-left: 16px;\n}\n\n\n/* Aside */\n\nd-article aside {\n grid-column: gutter;\n font-size: 12px;\n line-height: 1.6em;\n color: rgba(0, 0, 0, 0.6)\n}\n\n@media(min-width: 768px) {\n aside {\n grid-column: gutter;\n }\n\n .side {\n grid-column: gutter;\n }\n}\n";
-
- var print = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@media print {\n\n @page {\n size: 8in 11in;\n @bottom-right {\n content: counter(page) \" of \" counter(pages);\n }\n }\n\n html {\n /* no general margins -- CSS Grid takes care of those */\n }\n\n p, code {\n page-break-inside: avoid;\n }\n\n h2, h3 {\n page-break-after: avoid;\n }\n\n d-header {\n visibility: hidden;\n }\n\n d-footer {\n display: none!important;\n }\n\n}\n";
-
- var byline = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nd-byline {\n contain: style;\n overflow: hidden;\n border-top: 1px solid rgba(0, 0, 0, 0.1);\n font-size: 0.8rem;\n line-height: 1.8em;\n padding: 1.5rem 0;\n min-height: 1.8em;\n}\n\n\nd-byline .byline {\n grid-template-columns: 1fr 1fr;\n grid-column: text;\n}\n\n@media(min-width: 768px) {\n d-byline .byline {\n grid-template-columns: 1fr 1fr 1fr 1fr;\n }\n}\n\nd-byline .authors-affiliations {\n grid-column-end: span 2;\n grid-template-columns: 1fr 1fr;\n margin-bottom: 1em;\n}\n\n@media(min-width: 768px) {\n d-byline .authors-affiliations {\n margin-bottom: 0;\n }\n}\n\nd-byline h3 {\n font-size: 0.6rem;\n font-weight: 400;\n color: rgba(0, 0, 0, 0.5);\n margin: 0;\n text-transform: uppercase;\n}\n\nd-byline p {\n margin: 0;\n}\n\nd-byline a,\nd-article d-byline a {\n color: rgba(0, 0, 0, 0.8);\n text-decoration: none;\n border-bottom: none;\n}\n\nd-article d-byline a:hover {\n text-decoration: underline;\n border-bottom: none;\n}\n\nd-byline p.author {\n font-weight: 500;\n}\n\nd-byline .affiliations {\n\n}\n";
-
- var article = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nd-article {\n contain: layout style;\n overflow-x: hidden;\n border-top: 1px solid rgba(0, 0, 0, 0.1);\n padding-top: 2rem;\n color: rgba(0, 0, 0, 0.8);\n}\n\nd-article > * {\n grid-column: text;\n}\n\n@media(min-width: 768px) {\n d-article {\n font-size: 16px;\n }\n}\n\n@media(min-width: 1024px) {\n d-article {\n font-size: 1.06rem;\n line-height: 1.7em;\n }\n}\n\n\n/* H2 */\n\n\nd-article .marker {\n text-decoration: none;\n border: none;\n counter-reset: section;\n grid-column: kicker;\n line-height: 1.7em;\n}\n\nd-article .marker:hover {\n border: none;\n}\n\nd-article .marker span {\n padding: 0 3px 4px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n position: relative;\n top: 4px;\n}\n\nd-article .marker:hover span {\n color: rgba(0, 0, 0, 0.7);\n border-bottom: 1px solid rgba(0, 0, 0, 0.7);\n}\n\nd-article h2 {\n font-weight: 600;\n font-size: 24px;\n line-height: 1.25em;\n margin: 2rem 0 1.5rem 0;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n padding-bottom: 1rem;\n}\n\n@media(min-width: 1024px) {\n d-article h2 {\n font-size: 36px;\n }\n}\n\n/* H3 */\n\nd-article h3 {\n font-weight: 700;\n font-size: 18px;\n line-height: 1.4em;\n margin-bottom: 1em;\n margin-top: 2em;\n}\n\n@media(min-width: 1024px) {\n d-article h3 {\n font-size: 20px;\n }\n}\n\n/* H4 */\n\nd-article h4 {\n font-weight: 600;\n text-transform: uppercase;\n font-size: 14px;\n line-height: 1.4em;\n}\n\nd-article a {\n color: inherit;\n}\n\nd-article p,\nd-article ul,\nd-article ol,\nd-article blockquote {\n margin-top: 0;\n margin-bottom: 1em;\n margin-left: 0;\n margin-right: 0;\n}\n\nd-article blockquote {\n border-left: 2px solid rgba(0, 0, 0, 0.2);\n padding-left: 2em;\n font-style: italic;\n color: rgba(0, 0, 0, 0.6);\n}\n\nd-article a {\n border-bottom: 1px solid rgba(0, 0, 0, 0.4);\n text-decoration: none;\n}\n\nd-article a:hover {\n border-bottom: 1px solid rgba(0, 0, 0, 0.8);\n}\n\nd-article .link {\n text-decoration: underline;\n cursor: pointer;\n}\n\nd-article ul,\nd-article ol {\n padding-left: 24px;\n}\n\nd-article li {\n margin-bottom: 1em;\n margin-left: 0;\n padding-left: 0;\n}\n\nd-article li:last-child {\n margin-bottom: 0;\n}\n\nd-article pre {\n font-size: 14px;\n margin-bottom: 20px;\n}\n\nd-article hr {\n grid-column: screen;\n width: 100%;\n border: none;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n margin-top: 60px;\n margin-bottom: 60px;\n}\n\nd-article section {\n margin-top: 60px;\n margin-bottom: 60px;\n}\n\nd-article span.equation-mimic {\n font-family: georgia;\n font-size: 115%;\n font-style: italic;\n}\n\nd-article > d-code,\nd-article section > d-code {\n display: block;\n}\n\nd-article > d-math[block],\nd-article section > d-math[block] {\n display: block;\n}\n\n@media (max-width: 768px) {\n d-article > d-code,\n d-article section > d-code,\n d-article > d-math[block],\n d-article section > d-math[block] {\n overflow-x: scroll;\n -ms-overflow-style: none; // IE 10+\n overflow: -moz-scrollbars-none; // Firefox\n }\n\n d-article > d-code::-webkit-scrollbar,\n d-article section > d-code::-webkit-scrollbar,\n d-article > d-math[block]::-webkit-scrollbar,\n d-article section > d-math[block]::-webkit-scrollbar {\n display: none; // Safari and Chrome\n }\n}\n\nd-article .citation {\n color: #668;\n cursor: pointer;\n}\n\nd-include {\n width: auto;\n display: block;\n}\n\nd-figure {\n contain: layout style;\n}\n\n/* KaTeX */\n\n.katex, .katex-prerendered {\n contain: style;\n display: inline-block;\n}\n\n/* Tables */\n\nd-article table {\n border-collapse: collapse;\n margin-bottom: 1.5rem;\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n}\n\nd-article table th {\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n}\n\nd-article table td {\n border-bottom: 1px solid rgba(0, 0, 0, 0.05);\n}\n\nd-article table tr:last-of-type td {\n border-bottom: none;\n}\n\nd-article table th,\nd-article table td {\n font-size: 15px;\n padding: 2px 8px;\n}\n\nd-article table tbody :first-child td {\n padding-top: 2px;\n}\n";
-
- var title = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nd-title {\n padding: 2rem 0 1.5rem;\n contain: layout style;\n overflow-x: hidden;\n}\n\n@media(min-width: 768px) {\n d-title {\n padding: 4rem 0 1.5rem;\n }\n}\n\nd-title h1 {\n grid-column: text;\n font-size: 40px;\n font-weight: 700;\n line-height: 1.1em;\n margin: 0 0 0.5rem;\n}\n\n@media(min-width: 768px) {\n d-title h1 {\n font-size: 50px;\n }\n}\n\nd-title p {\n font-weight: 300;\n font-size: 1.2rem;\n line-height: 1.55em;\n grid-column: text;\n}\n\nd-title .status {\n margin-top: 0px;\n font-size: 12px;\n color: #009688;\n opacity: 0.8;\n grid-column: kicker;\n}\n\nd-title .status span {\n line-height: 1;\n display: inline-block;\n padding: 6px 0;\n border-bottom: 1px solid #80cbc4;\n font-size: 11px;\n text-transform: uppercase;\n}\n";
-
- // Copyright 2018 The Distill Template Authors
-
- const styles = base + layout + title + byline + article + math + print;
-
- function makeStyleTag(dom) {
-
- const styleTagId = 'distill-prerendered-styles';
- const prerenderedTag = dom.getElementById(styleTagId);
- if (!prerenderedTag) {
- const styleTag = dom.createElement('style');
- styleTag.id = styleTagId;
- styleTag.type = 'text/css';
- const cssTextTag = dom.createTextNode(styles);
- styleTag.appendChild(cssTextTag);
- const firstScriptTag = dom.head.querySelector('script');
- dom.head.insertBefore(styleTag, firstScriptTag);
- }
-
- }
-
- // Copyright 2018 The Distill Template Authors
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- function addPolyfill(polyfill, polyfillLoadedCallback) {
- console.debug('Runlevel 0: Polyfill required: ' + polyfill.name);
- const script = document.createElement('script');
- script.src = polyfill.url;
- script.async = false;
- if (polyfillLoadedCallback) {
- script.onload = function() { polyfillLoadedCallback(polyfill); };
- }
- script.onerror = function() {
- new Error('Runlevel 0: Polyfills failed to load script ' + polyfill.name);
- };
- document.head.appendChild(script);
- }
-
- const polyfills = [
- {
- name: 'WebComponents',
- support: function() {
- return 'customElements' in window &&
- 'attachShadow' in Element.prototype &&
- 'getRootNode' in Element.prototype &&
- 'content' in document.createElement('template') &&
- 'Promise' in window &&
- 'from' in Array;
- },
- url: 'https://distill.pub/third-party/polyfills/webcomponents-lite.js'
- }, {
- name: 'IntersectionObserver',
- support: function() {
- return 'IntersectionObserver' in window &&
- 'IntersectionObserverEntry' in window;
- },
- url: 'https://distill.pub/third-party/polyfills/intersection-observer.js'
- },
- ];
-
- class Polyfills {
-
- static browserSupportsAllFeatures() {
- return polyfills.every((poly) => poly.support());
- }
-
- static load(callback) {
- // Define an intermediate callback that checks if all is loaded.
- const polyfillLoaded = function(polyfill) {
- polyfill.loaded = true;
- console.debug('Runlevel 0: Polyfill has finished loading: ' + polyfill.name);
- // console.debug(window[polyfill.name]);
- if (Polyfills.neededPolyfills.every((poly) => poly.loaded)) {
- console.debug('Runlevel 0: All required polyfills have finished loading.');
- console.debug('Runlevel 0->1.');
- window.distillRunlevel = 1;
- callback();
- }
- };
- // Add polyfill script tags
- for (const polyfill of Polyfills.neededPolyfills) {
- addPolyfill(polyfill, polyfillLoaded);
- }
- }
-
- static get neededPolyfills() {
- if (!Polyfills._neededPolyfills) {
- Polyfills._neededPolyfills = polyfills.filter((poly) => !poly.support());
- }
- return Polyfills._neededPolyfills;
- }
- }
-
- // Copyright 2018 The Distill Template Authors
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- // const marginSmall = 16;
- // const marginLarge = 3 * marginSmall;
- // const margin = marginSmall + marginLarge;
- // const gutter = marginSmall;
- // const outsetAmount = margin / 2;
- // const numCols = 4;
- // const numGutters = numCols - 1;
- // const columnWidth = (768 - 2 * marginLarge - numGutters * gutter) / numCols;
- //
- // const screenwidth = 768;
- // const pageWidth = screenwidth - 2 * marginLarge;
- // const bodyWidth = pageWidth - columnWidth - gutter;
-
- function body(selector) {
- return `${selector} {
- grid-column: left / text;
- }
- `;
- }
-
- // Copyright 2018 The Distill Template Authors
-
- const T$1 = Template('d-abstract', `
-
-
-
-`);
-
- class Abstract extends T$1(HTMLElement) {
-
- }
-
- // Copyright 2018 The Distill Template Authors
-
- const T$2 = Template('d-appendix', `
-
-
-`, false);
-
- class Appendix extends T$2(HTMLElement) {
-
- }
-
- // Copyright 2018 The Distill Template Authors
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- // import { Template } from '../mixins/template';
- // import { Controller } from '../controller';
-
- const isOnlyWhitespace = /^\s*$/;
-
- class Article extends HTMLElement {
- static get is() { return 'd-article'; }
-
- constructor() {
- super();
-
- new MutationObserver( (mutations) => {
- for (const mutation of mutations) {
- for (const addedNode of mutation.addedNodes) {
- switch (addedNode.nodeName) {
- case '#text': { // usually text nodes are only linebreaks.
- const text = addedNode.nodeValue;
- if (!isOnlyWhitespace.test(text)) {
- console.warn('Use of unwrapped text in distill articles is discouraged as it breaks layout! Please wrap any text in a or
tag. We found the following text: ' + text);
- const wrapper = document.createElement('span');
- wrapper.innerHTML = addedNode.nodeValue;
- addedNode.parentNode.insertBefore(wrapper, addedNode);
- addedNode.parentNode.removeChild(addedNode);
- }
- } break;
- }
- }
- }
- }).observe(this, {childList: true});
- }
-
- }
-
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
-
- function createCommonjsModule(fn, module) {
- return module = { exports: {} }, fn(module, module.exports), module.exports;
- }
-
- var bibtexParse = createCommonjsModule(function (module, exports) {
- /* start bibtexParse 0.0.22 */
-
- //Original work by Henrik Muehe (c) 2010
- //
- //CommonJS port by Mikola Lysenko 2013
- //
- //Port to Browser lib by ORCID / RCPETERS
- //
- //Issues:
- //no comment handling within strings
- //no string concatenation
- //no variable values yet
- //Grammar implemented here:
- //bibtex -> (string | preamble | comment | entry)*;
- //string -> '@STRING' '{' key_equals_value '}';
- //preamble -> '@PREAMBLE' '{' value '}';
- //comment -> '@COMMENT' '{' value '}';
- //entry -> '@' key '{' key ',' key_value_list '}';
- //key_value_list -> key_equals_value (',' key_equals_value)*;
- //key_equals_value -> key '=' value;
- //value -> value_quotes | value_braces | key;
- //value_quotes -> '"' .*? '"'; // not quite
- //value_braces -> '{' .*? '"'; // not quite
- (function(exports) {
-
- function BibtexParser() {
-
- this.months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
- this.notKey = [',','{','}',' ','='];
- this.pos = 0;
- this.input = "";
- this.entries = new Array();
-
- this.currentEntry = "";
-
- this.setInput = function(t) {
- this.input = t;
- };
-
- this.getEntries = function() {
- return this.entries;
- };
-
- this.isWhitespace = function(s) {
- return (s == ' ' || s == '\r' || s == '\t' || s == '\n');
- };
-
- this.match = function(s, canCommentOut) {
- if (canCommentOut == undefined || canCommentOut == null)
- canCommentOut = true;
- this.skipWhitespace(canCommentOut);
- if (this.input.substring(this.pos, this.pos + s.length) == s) {
- this.pos += s.length;
- } else {
- throw "Token mismatch, expected " + s + ", found "
- + this.input.substring(this.pos);
- } this.skipWhitespace(canCommentOut);
- };
-
- this.tryMatch = function(s, canCommentOut) {
- if (canCommentOut == undefined || canCommentOut == null)
- canCommentOut = true;
- this.skipWhitespace(canCommentOut);
- if (this.input.substring(this.pos, this.pos + s.length) == s) {
- return true;
- } else {
- return false;
- } };
-
- /* when search for a match all text can be ignored, not just white space */
- this.matchAt = function() {
- while (this.input.length > this.pos && this.input[this.pos] != '@') {
- this.pos++;
- }
- if (this.input[this.pos] == '@') {
- return true;
- } return false;
- };
-
- this.skipWhitespace = function(canCommentOut) {
- while (this.isWhitespace(this.input[this.pos])) {
- this.pos++;
- } if (this.input[this.pos] == "%" && canCommentOut == true) {
- while (this.input[this.pos] != "\n") {
- this.pos++;
- } this.skipWhitespace(canCommentOut);
- } };
-
- this.value_braces = function() {
- var bracecount = 0;
- this.match("{", false);
- var start = this.pos;
- var escaped = false;
- while (true) {
- if (!escaped) {
- if (this.input[this.pos] == '}') {
- if (bracecount > 0) {
- bracecount--;
- } else {
- var end = this.pos;
- this.match("}", false);
- return this.input.substring(start, end);
- } } else if (this.input[this.pos] == '{') {
- bracecount++;
- } else if (this.pos >= this.input.length - 1) {
- throw "Unterminated value";
- } } if (this.input[this.pos] == '\\' && escaped == false)
- escaped = true;
- else
- escaped = false;
- this.pos++;
- } };
-
- this.value_comment = function() {
- var str = '';
- var brcktCnt = 0;
- while (!(this.tryMatch("}", false) && brcktCnt == 0)) {
- str = str + this.input[this.pos];
- if (this.input[this.pos] == '{')
- brcktCnt++;
- if (this.input[this.pos] == '}')
- brcktCnt--;
- if (this.pos >= this.input.length - 1) {
- throw "Unterminated value:" + this.input.substring(start);
- } this.pos++;
- } return str;
- };
-
- this.value_quotes = function() {
- this.match('"', false);
- var start = this.pos;
- var escaped = false;
- while (true) {
- if (!escaped) {
- if (this.input[this.pos] == '"') {
- var end = this.pos;
- this.match('"', false);
- return this.input.substring(start, end);
- } else if (this.pos >= this.input.length - 1) {
- throw "Unterminated value:" + this.input.substring(start);
- } }
- if (this.input[this.pos] == '\\' && escaped == false)
- escaped = true;
- else
- escaped = false;
- this.pos++;
- } };
-
- this.single_value = function() {
- var start = this.pos;
- if (this.tryMatch("{")) {
- return this.value_braces();
- } else if (this.tryMatch('"')) {
- return this.value_quotes();
- } else {
- var k = this.key();
- if (k.match("^[0-9]+$"))
- return k;
- else if (this.months.indexOf(k.toLowerCase()) >= 0)
- return k.toLowerCase();
- else
- throw "Value expected:" + this.input.substring(start) + ' for key: ' + k;
-
- } };
-
- this.value = function() {
- var values = [];
- values.push(this.single_value());
- while (this.tryMatch("#")) {
- this.match("#");
- values.push(this.single_value());
- } return values.join("");
- };
-
- this.key = function() {
- var start = this.pos;
- while (true) {
- if (this.pos >= this.input.length) {
- throw "Runaway key";
- } // а-яА-Я is Cyrillic
- //console.log(this.input[this.pos]);
- if (this.notKey.indexOf(this.input[this.pos]) >= 0) {
- return this.input.substring(start, this.pos);
- } else {
- this.pos++;
-
- } } };
-
- this.key_equals_value = function() {
- var key = this.key();
- if (this.tryMatch("=")) {
- this.match("=");
- var val = this.value();
- return [ key, val ];
- } else {
- throw "... = value expected, equals sign missing:"
- + this.input.substring(this.pos);
- } };
-
- this.key_value_list = function() {
- var kv = this.key_equals_value();
- this.currentEntry['entryTags'] = {};
- this.currentEntry['entryTags'][kv[0]] = kv[1];
- while (this.tryMatch(",")) {
- this.match(",");
- // fixes problems with commas at the end of a list
- if (this.tryMatch("}")) {
- break;
- }
- kv = this.key_equals_value();
- this.currentEntry['entryTags'][kv[0]] = kv[1];
- } };
-
- this.entry_body = function(d) {
- this.currentEntry = {};
- this.currentEntry['citationKey'] = this.key();
- this.currentEntry['entryType'] = d.substring(1);
- this.match(",");
- this.key_value_list();
- this.entries.push(this.currentEntry);
- };
-
- this.directive = function() {
- this.match("@");
- return "@" + this.key();
- };
-
- this.preamble = function() {
- this.currentEntry = {};
- this.currentEntry['entryType'] = 'PREAMBLE';
- this.currentEntry['entry'] = this.value_comment();
- this.entries.push(this.currentEntry);
- };
-
- this.comment = function() {
- this.currentEntry = {};
- this.currentEntry['entryType'] = 'COMMENT';
- this.currentEntry['entry'] = this.value_comment();
- this.entries.push(this.currentEntry);
- };
-
- this.entry = function(d) {
- this.entry_body(d);
- };
-
- this.bibtex = function() {
- while (this.matchAt()) {
- var d = this.directive();
- this.match("{");
- if (d == "@STRING") {
- this.string();
- } else if (d == "@PREAMBLE") {
- this.preamble();
- } else if (d == "@COMMENT") {
- this.comment();
- } else {
- this.entry(d);
- }
- this.match("}");
- } };
- }
- exports.toJSON = function(bibtex) {
- var b = new BibtexParser();
- b.setInput(bibtex);
- b.bibtex();
- return b.entries;
- };
-
- /* added during hackathon don't hate on me */
- exports.toBibtex = function(json) {
- var out = '';
- for ( var i in json) {
- out += "@" + json[i].entryType;
- out += '{';
- if (json[i].citationKey)
- out += json[i].citationKey + ', ';
- if (json[i].entry)
- out += json[i].entry ;
- if (json[i].entryTags) {
- var tags = '';
- for (var jdx in json[i].entryTags) {
- if (tags.length != 0)
- tags += ', ';
- tags += jdx + '= {' + json[i].entryTags[jdx] + '}';
- }
- out += tags;
- }
- out += '}\n\n';
- }
- return out;
-
- };
-
- })( exports);
-
- /* end bibtexParse */
- });
-
- // Copyright 2018 The Distill Template Authors
-
- function normalizeTag(string) {
- return string
- .replace(/[\t\n ]+/g, ' ')
- .replace(/{\\["^`.'acu~Hvs]( )?([a-zA-Z])}/g, (full, x, char) => char)
- .replace(/{\\([a-zA-Z])}/g, (full, char) => char);
- }
-
- function parseBibtex(bibtex) {
- const bibliography = new Map();
- const parsedEntries = bibtexParse.toJSON(bibtex);
- for (const entry of parsedEntries) {
- // normalize tags; note entryTags is an object, not Map
- for (const [key, value] of Object.entries(entry.entryTags)) {
- entry.entryTags[key.toLowerCase()] = normalizeTag(value);
- }
- entry.entryTags.type = entry.entryType;
- // add to bibliography
- bibliography.set(entry.citationKey, entry.entryTags);
- }
- return bibliography;
- }
-
- function serializeFrontmatterToBibtex(frontMatter) {
- return `@article{${frontMatter.slug},
- author = {${frontMatter.bibtexAuthors}},
- title = {${frontMatter.title}},
- journal = {${frontMatter.journal.title}},
- year = {${frontMatter.publishedYear}},
- note = {${frontMatter.url}},
- doi = {${frontMatter.doi}}
-}`;
- }
-
- // Copyright 2018 The Distill Template Authors
-
- class Bibliography extends HTMLElement {
-
- static get is() { return 'd-bibliography'; }
-
- constructor() {
- super();
-
- // set up mutation observer
- const options = {childList: true, characterData: true, subtree: true};
- const observer = new MutationObserver( (entries) => {
- for (const entry of entries) {
- if (entry.target.nodeName === 'SCRIPT' || entry.type === 'characterData') {
- this.parseIfPossible();
- }
- }
- });
- observer.observe(this, options);
- }
-
- connectedCallback() {
- requestAnimationFrame(() => {
- this.parseIfPossible();
- });
- }
-
- parseIfPossible() {
- const scriptTag = this.querySelector('script');
- if (!scriptTag) return;
- if (scriptTag.type == 'text/bibtex') {
- const newBibtex = scriptTag.textContent;
- if (this.bibtex !== newBibtex) {
- this.bibtex = newBibtex;
- const bibliography = parseBibtex(this.bibtex);
- this.notify(bibliography);
- }
- } else if (scriptTag.type == 'text/json') {
- const bibliography = new Map(JSON.parse(scriptTag.textContent));
- this.notify(bibliography);
- } else {
- console.warn('Unsupported bibliography script tag type: ' + scriptTag.type);
- }
- }
-
- notify(bibliography) {
- const options = { detail: bibliography, bubbles: true };
- const event = new CustomEvent('onBibliographyChanged', options);
- this.dispatchEvent(event);
- }
-
- /* observe 'src' attribute */
-
- static get observedAttributes() {
- return ['src'];
- }
-
- receivedBibtex(event) {
- const bibliography = parseBibtex(event.target.response);
- this.notify(bibliography);
- }
-
- attributeChangedCallback(name, oldValue, newValue) {
- var oReq = new XMLHttpRequest();
- oReq.onload = (e) => this.receivedBibtex(e);
- oReq.onerror = () => console.warn(`Could not load Bibtex! (tried ${newValue})`);
- oReq.responseType = 'text';
- oReq.open('GET', newValue, true);
- oReq.send();
- }
-
-
- }
-
- // Copyright 2018 The Distill Template Authors
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- // import style from '../styles/d-byline.css';
-
- function bylineTemplate(frontMatter) {
- return `
-
-
-`, false);
-
- class FootnoteList extends T$6(HTMLElement) {
-
- connectedCallback() {
- super.connectedCallback();
-
- this.list = this.root.querySelector('ol');
- // footnotes list is initially hidden
- this.root.style.display = 'none';
- // look through document and register existing footnotes
- // Store.subscribeTo('footnotes', (footnote) => {
- // this.renderFootnote(footnote);
- // });
- }
-
- // TODO: could optimize this to accept individual footnotes?
- set footnotes(footnotes) {
- this.list.innerHTML = '';
- if (footnotes.length) {
- // ensure footnote list is visible
- this.root.style.display = '';
-
- for (const footnote of footnotes) {
- // construct and append list item to show footnote
- const listItem = document.createElement('li');
- listItem.id = footnote.id + '-listing';
- listItem.innerHTML = footnote.innerHTML;
-
- const backlink = document.createElement('a');
- backlink.setAttribute('class', 'footnote-backlink');
- backlink.textContent = '[↩]';
- backlink.href = '#' + footnote.id;
-
- listItem.appendChild(backlink);
- this.list.appendChild(listItem);
- }
- } else {
- // ensure footnote list is invisible
- this.root.style.display = 'none';
- }
- }
-
- }
-
- // Copyright 2018 The Distill Template Authors
-
- const T$7 = Template('d-hover-box', `
-
-
-
-
-
-
-
-`);
-
- class HoverBox extends T$7(HTMLElement) {
-
- constructor() {
- super();
- }
-
- connectedCallback() {
-
- }
-
- listen(element) {
- // console.log(element)
- this.bindDivEvents(this);
- this.bindTriggerEvents(element);
- // this.style.display = "block";
- }
-
- bindDivEvents(element) {
- // For mice, same behavior as hovering on links
- element.addEventListener('mouseover', () => {
- if (!this.visible) this.showAtNode(element);
- this.stopTimeout();
- });
- element.addEventListener('mouseout', () => {
- this.extendTimeout(500);
- });
- // Don't trigger body touchstart event when touching within box
- element.addEventListener('touchstart', (event) => {
- event.stopPropagation();
- }, {passive: true});
- // Close box when touching outside box
- document.body.addEventListener('touchstart', () => {
- this.hide();
- }, {passive: true});
- }
-
- bindTriggerEvents(node) {
- node.addEventListener('mouseover', () => {
- if (!this.visible) {
- this.showAtNode(node);
- }
- this.stopTimeout();
- });
-
- node.addEventListener('mouseout', () => {
- this.extendTimeout(300);
- });
-
- node.addEventListener('touchstart', (event) => {
- if (this.visible) {
- this.hide();
- } else {
- this.showAtNode(node);
- }
- // Don't trigger body touchstart event when touching link
- event.stopPropagation();
- }, {passive: true});
- }
-
- show(position) {
- this.visible = true;
- this.style.display = 'block';
- // 10px extra offset from element
- this.style.top = Math.round(position[1] + 10) + 'px';
- }
-
- showAtNode(node) {
- // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop
- const bbox = node.getBoundingClientRect();
- this.show([node.offsetLeft + bbox.width, node.offsetTop + bbox.height]);
- }
-
- hide() {
- this.visible = false;
- this.style.display = 'none';
- this.stopTimeout();
- }
-
- stopTimeout() {
- if (this.timeout) {
- clearTimeout(this.timeout);
- }
- }
-
- extendTimeout(time) {
- this.stopTimeout();
- this.timeout = setTimeout(() => {
- this.hide();
- }, time);
- }
-
- }
-
- // Copyright 2018 The Distill Template Authors
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- class Title extends HTMLElement {
- static get is() { return 'd-title'; }
- }
-
- // Copyright 2018 The Distill Template Authors
-
- const T$8 = Template('d-references', `
-
-`, false);
-
- class References extends T$8(HTMLElement) {
-
- }
-
- // Copyright 2018 The Distill Template Authors
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- class TOC extends HTMLElement {
-
- static get is() { return 'd-toc'; }
-
- connectedCallback() {
- if (!this.getAttribute('prerendered')) {
- window.onload = () => {
- const article = document.querySelector('d-article');
- const headings = article.querySelectorAll('h2, h3');
- renderTOC(this, headings);
- };
- }
- }
-
- }
-
- function renderTOC(element, headings) {
-
- let ToC =`
-
-
-
Table of contents
-
`;
-
- for (const el of headings) {
- // should element be included in TOC?
- const isInTitle = el.parentElement.tagName == 'D-TITLE';
- const isException = el.getAttribute('no-toc');
- if (isInTitle || isException) continue;
- // create TOC entry
- const title = el.textContent;
- const link = '#' + el.getAttribute('id');
-
- let newLine = '
-`;
-
- // Copyright 2018 The Distill Template Authors
-
- const T$b = Template('distill-header', headerTemplate, false);
-
- class DistillHeader extends T$b(HTMLElement) {
-
- }
-
- // Copyright 2018 The Distill Template Authors
-
- const styles$2 = `
-
-`;
-
- function appendixTemplate(frontMatter) {
- let html = styles$2;
-
- if (typeof frontMatter.githubUrl !== 'undefined') {
- html += `
-
Updates and Corrections
-
`;
- if (frontMatter.githubCompareUpdatesUrl) {
- html += `View all changes to this article since it was first published.`;
- }
- html += `
- If you see mistakes or want to suggest changes, please create an issue on GitHub.
Diagrams and text are licensed under Creative Commons Attribution CC-BY 4.0 with the source available on GitHub, unless noted otherwise. The figures that have been reused from other sources don’t fall under this license and can be recognized by a note in their caption: “Figure from …”.
- `;
- }
-
- if (typeof frontMatter.publishedDate !== 'undefined') {
- html += `
-
Citation
-
For attribution in academic contexts, please cite this work as
',n.githubCompareUpdatesUrl&&(t+=`View all changes to this article since it was first published.`),t+=`\n If you see mistakes or want to suggest changes, please create an issue on GitHub.
Diagrams and text are licensed under Creative Commons Attribution CC-BY 4.0 with the source available on GitHub, unless noted otherwise. The figures that have been reused from other sources don\u2019t fall under this license and can be recognized by a note in their caption: \u201cFigure from \u2026\u201d.
`)}}
+// Copyright 2018 The Distill Template Authors
+const co="\nd-citation-list {\n contain: style;\n}\n\nd-citation-list .references {\n grid-column: text;\n}\n\nd-citation-list .references .title {\n font-weight: 500;\n}\n";class ho extends HTMLElement{static get is(){return"d-citation-list"}connectedCallback(){this.hasAttribute("distill-prerendered")||(this.style.display="none")}set citations(n){x(this,n)}}var po=m(function(n){var t=function(n){function t(n,t,e,i,r){this.type=n,this.content=t,this.alias=e,this.length=0|(i||"").length,this.greedy=!!r}function e(n,i,a,s,l,u,d){for(var h in a)if(a.hasOwnProperty(h)&&a[h]){var p=a[h];p=Array.isArray(p)?p:[p];for(var f=0;fn.length)return;if(!(M instanceof t)){var T=1;if(y&&k!=i.tail.prev){if(g.lastIndex=S,!(N=g.exec(n)))break;var _=N.index+(b&&N[1]?N[1].length:0),C=N.index+N[0].length,A=S;for(A+=k.value.length;_>=A;)A+=(k=k.next).value.length;if(S=A-=k.value.length,k.value instanceof t)continue;for(var E=k;E!==i.tail&&(A1&&e(n,i,a,k.prev,S,!0,h+","+f),u)break}else if(u)break}}}}}function i(){var n={value:null,prev:null,next:null},t={value:null,prev:n,next:null};n.next=t,this.head=n,this.tail=t,this.length=0}function r(n,t,e){var i=t.next,r={value:e,prev:t,next:i};return t.next=r,i.prev=r,n.length++,r}function o(n,t,e){for(var i=t.next,r=0;r"+i.content+""+i.tag+">"},!n.document)return n.addEventListener?(c.disableWorkerMessageHandler||n.addEventListener("message",function(t){var e=JSON.parse(t.data),i=e.language,r=e.code,o=e.immediateClose;n.postMessage(c.highlight(r,c.languages[i],i)),o&&n.close()},!1),c):c;var d=c.util.currentScript();if(d&&(c.filename=d.src,d.hasAttribute("data-manual")&&(c.manual=!0)),!c.manual){var h=document.readyState;"loading"===h||"interactive"===h&&d&&d.defer?document.addEventListener("DOMContentLoaded",s):window.requestAnimationFrame?window.requestAnimationFrame(s):window.setTimeout(s,16)}return c}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});n.exports&&(n.exports=t),void 0!==ro&&(ro.Prism=t),t.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/?[\da-z]{1,8};/i},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.hooks.add("wrap",function(n){"entity"===n.type&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(n,e){var i={};i["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[e]},i.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:i}};r["language-"+e]={pattern:/[\s\S]+/,inside:t.languages[e]};var o={};o[n]={pattern:RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:r},t.languages.insertBefore("markup","cdata",o)}}),t.languages.xml=t.languages.extend("markup",{}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,function(n){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,lookbehind:!0,alias:"selector"}}},url:{pattern:RegExp("url\\((?:"+t.source+"|[^\n\r()]*)\\)","i"),greedy:!0,inside:{"function":/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var e=n.languages.markup;e&&(e.tag.addInlined("style","css"),n.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:e.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:n.languages.css}},alias:"language-css"}},e.tag))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,"function":/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,"function":/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}}}),t.languages.markup&&t.languages.markup.tag.addInlined("script","javascript"),t.languages.js=t.languages.javascript,"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(n){n=n||document;var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(n.querySelectorAll("pre[data-src]")).forEach(function(n){if(!n.hasAttribute("data-src-loaded")){for(var i,r=n.getAttribute("data-src"),o=n,a=/\blang(?:uage)?-([\w-]+)\b/i;o&&!a.test(o.className);)o=o.parentNode;if(o&&(i=(n.className.match(a)||[,""])[1]),!i){var s=(r.match(/\.(\w+)$/)||[,""])[1];i=e[s]||s}var l=document.createElement("code");l.className="language-"+i,n.textContent="",l.textContent="Loading\u2026",n.appendChild(l);var u=new XMLHttpRequest;u.open("GET",r,!0),u.onreadystatechange=function(){4==u.readyState&&(u.status<400&&u.responseText?(l.textContent=u.responseText,t.highlightElement(l),n.setAttribute("data-src-loaded","")):u.status>=400?l.textContent="\u2716 Error "+u.status+" while fetching file: "+u.statusText:l.textContent="\u2716 Error: File does not exist or is empty")},u.send(null)}})},document.addEventListener("DOMContentLoaded",function(){self.Prism.fileHighlight()}))});Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python,Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,"function":/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[\s\S]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+\.?[a-f\d]*(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|\.?\d*(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,"function":/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},function(n){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",e={environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};n.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:e},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\2)[^\\])*\2/,lookbehind:!0,greedy:!0,inside:e}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:e.variable,"function":{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var i=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],r=e.variable[1].inside,o=0;o(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,number:/(?:\b0x[a-f\d]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[-+]?\d+)?)i?/i,string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0}}),delete Prism.languages.go["class-name"],function(n){function t(n,t){return n=n.replace(//g,function(){return e}),t&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+n+")")}var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?!\n|\r\n?))/.source,i=/(?:\\.|``.+?``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,r=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|$)/.source.replace(/__/g,function(){return i}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+r+o+"(?:"+r+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+r+o+")(?:"+r+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+r+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+r+"$"),inside:{"table-header":{pattern:RegExp(i),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:t(/__(?:(?!_)|_(?:(?!_))+_)+__/.source,!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:t(/_(?:(?!_)|__(?:(?!_))+__)+_/.source,!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:t(/(~~?)(?:(?!~))+?\2/.source,!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:t(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[(?:(?!\]))+\])/.source,!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike"].forEach(function(e){t!==e&&(n.languages.markdown[t].inside.content.inside[e]=n.languages.markdown[e])})}),n.hooks.add("after-tokenize",function(n){function t(n){if(n&&"string"!=typeof n)for(var e=0,i=n.length;e]?|<(?:<=?|[=:])?|>(?:=|>>?=?)?|==?=?|[~\u2260\u2264\u2265]/,punctuation:/[{}[\];(),.:]/,constant:/\b(?:(?:NaN|Inf)(?:16|32|64)?)\b/};
+// Copyright 2018 The Distill Template Authors
+const fo=Or("d-code",`\n\n\n\n\n`);class go extends(Dr(fo(HTMLElement))){renderContent(){if(this.languageName=this.getAttribute("language"),!this.languageName)return void console.warn('You need to provide a language attribute to your block to let us know how to highlight your code; e.g.:\n zeros = np.zeros(shape).');const n=po.languages[this.languageName];if(n==undefined)return void console.warn(`Distill does not yet support highlighting your code block in "${this.languageName}'.`);let t=this.textContent;const e=this.shadowRoot.querySelector("#code-container");if(this.hasAttribute("block")){const n=(t=t.replace(/\n/,"")).match(/\s*/);if(t=(t=t.replace(new RegExp("\n"+n,"g"),"\n")).trim(),e.parentNode instanceof ShadowRoot){const n=document.createElement("pre");this.shadowRoot.removeChild(e),n.appendChild(e),this.shadowRoot.appendChild(n)}}e.className=`language-${this.languageName}`,e.innerHTML=po.highlight(t,n)}}
+// Copyright 2018 The Distill Template Authors
+const mo=Or("d-footnote",'\n\n\n\n
\n \n
\n\n\n\n \n\n\n');class bo extends(mo(HTMLElement)){constructor(){super();const n={childList:!0,characterData:!0,subtree:!0};new MutationObserver(this.notify).observe(this,n)}notify(){const n=new CustomEvent("onFootnoteChanged",{detail:this,bubbles:!0});document.dispatchEvent(n)}connectedCallback(){this.hoverBox=this.root.querySelector("d-hover-box"),window.customElements.whenDefined("d-hover-box").then(()=>{this.hoverBox.listen(this)}),bo.currentFootnoteId+=1;const n=bo.currentFootnoteId.toString();this.root.host.id="d-footnote-"+n;const t="dt-fn-hover-box-"+n;this.hoverBox.id=t;const e=this.root.querySelector("#fn-");e.setAttribute("id","fn-"+n),e.setAttribute("data-hover-ref",t),e.textContent=n}}bo.currentFootnoteId=0;
+// Copyright 2018 The Distill Template Authors
+const yo=Or("d-footnote-list","\n\n\n
Footnotes
\n\n",!1);class vo extends(yo(HTMLElement)){connectedCallback(){super.connectedCallback(),this.list=this.root.querySelector("ol"),this.root.style.display="none"}set footnotes(n){if(this.list.innerHTML="",n.length){this.root.style.display="";for(const t of n){const n=document.createElement("li");n.id=t.id+"-listing",n.innerHTML=t.innerHTML;const e=document.createElement("a");e.setAttribute("class","footnote-backlink"),e.textContent="[\u21a9]",e.href="#"+t.id,n.appendChild(e),this.list.appendChild(n)}}else this.root.style.display="none"}}
+// Copyright 2018 The Distill Template Authors
+const wo=Or("d-hover-box",'\n\n\n
\n
\n \n
\n
\n');class xo extends(wo(HTMLElement)){constructor(){super()}connectedCallback(){}listen(n){this.bindDivEvents(this),this.bindTriggerEvents(n)}bindDivEvents(n){n.addEventListener("mouseover",()=>{this.visible||this.showAtNode(n),this.stopTimeout()}),n.addEventListener("mouseout",()=>{this.extendTimeout(500)}),n.addEventListener("touchstart",n=>{n.stopPropagation()},{passive:!0}),document.body.addEventListener("touchstart",()=>{this.hide()},{passive:!0})}bindTriggerEvents(n){n.addEventListener("mouseover",()=>{this.visible||this.showAtNode(n),this.stopTimeout()}),n.addEventListener("mouseout",()=>{this.extendTimeout(300)}),n.addEventListener("touchstart",t=>{this.visible?this.hide():this.showAtNode(n),t.stopPropagation()},{passive:!0})}show(n){this.visible=!0,this.style.display="block",this.style.top=Math.round(n[1]+10)+"px"}showAtNode(n){const t=n.getBoundingClientRect();this.show([n.offsetLeft+t.width,n.offsetTop+t.height])}hide(){this.visible=!1,this.style.display="none",this.stopTimeout()}stopTimeout(){this.timeout&&clearTimeout(this.timeout)}extendTimeout(n){this.stopTimeout(),this.timeout=setTimeout(()=>{this.hide()},n)}}
+// Copyright 2018 The Distill Template Authors
+class ko extends HTMLElement{static get is(){return"d-title"}}
+// Copyright 2018 The Distill Template Authors
+const So=Or("d-references","\n\n",!1);class Mo extends(So(HTMLElement)){}
+// Copyright 2018 The Distill Template Authors
+class To extends HTMLElement{static get is(){return"d-toc"}connectedCallback(){this.getAttribute("prerendered")||(window.onload=(()=>{k(this,document.querySelector("d-article").querySelectorAll("h2, h3"))}))}}class _o extends HTMLElement{static get is(){return"d-figure"}static get readyQueue(){return _o._readyQueue||(_o._readyQueue=[]),_o._readyQueue}static addToReadyQueue(n){-1===_o.readyQueue.indexOf(n)&&(_o.readyQueue.push(n),_o.runReadyQueue())}static runReadyQueue(){const n=_o.readyQueue.sort((n,t)=>n._seenOnScreen-t._seenOnScreen).filter(n=>!n._ready).pop();n&&(n.ready(),requestAnimationFrame(_o.runReadyQueue))}constructor(){super(),this._ready=!1,this._onscreen=!1,this._offscreen=!0}connectedCallback(){this.loadsWhileScrolling=this.hasAttribute("loadsWhileScrolling"),_o.marginObserver.observe(this),_o.directObserver.observe(this)}disconnectedCallback(){_o.marginObserver.unobserve(this),_o.directObserver.unobserve(this)}static get marginObserver(){if(!_o._marginObserver){const n=window.innerHeight,t=Math.floor(2*n),e={rootMargin:t+"px 0px "+t+"px 0px",threshold:.01},i=_o.didObserveMarginIntersection,r=new IntersectionObserver(i,e);_o._marginObserver=r}return _o._marginObserver}static didObserveMarginIntersection(n){for(const t of n){const n=t.target;t.isIntersecting&&!n._ready&&_o.addToReadyQueue(n)}}static get directObserver(){return _o._directObserver||(_o._directObserver=new IntersectionObserver(_o.didObserveDirectIntersection,{rootMargin:"0px",threshold:[0,1]})),_o._directObserver}static didObserveDirectIntersection(n){for(const t of n){const n=t.target;t.isIntersecting?(n._seenOnScreen=new Date,n._offscreen&&n.onscreen()):n._onscreen&&n.offscreen()}}addEventListener(n,t){super.addEventListener(n,t),"ready"===n&&-1!==_o.readyQueue.indexOf(this)&&(this._ready=!1,_o.runReadyQueue()),"onscreen"===n&&this.onscreen()}ready(){this._ready=!0,_o.marginObserver.unobserve(this);const n=new CustomEvent("ready");this.dispatchEvent(n)}onscreen(){this._onscreen=!0,this._offscreen=!1;const n=new CustomEvent("onscreen");this.dispatchEvent(n)}offscreen(){this._onscreen=!1,this._offscreen=!0;const n=new CustomEvent("offscreen");this.dispatchEvent(n)}}if("undefined"!=typeof window){let n;_o.isScrolling=!1;const t=()=>{_o.isScrolling=!0,clearTimeout(n),n=setTimeout(()=>{_o.isScrolling=!1,_o.runReadyQueue()},500)};window.addEventListener("scroll",t,!0)}
+// Copyright 2018 The Distill Template Authors
+const Co="distill.pub",Ao=Or("d-interstitial",'\n\n\n
\n
\n
This article is in review.
\n
Do not share this URL or the contents of this article. Thank you!
\n \n
Enter the password we shared with you as part of the review process to view the article.
\n
\n
\n');class Eo extends(Ao(HTMLElement)){connectedCallback(){if(this.shouldRemoveSelf())this.parentElement.removeChild(this);else{this.root.querySelector("#interstitial-password-input").oninput=(n=>this.passwordChanged(n))}}passwordChanged(n){n.target.value===this.password&&(console.log("Correct password entered."),this.parentElement.removeChild(this),"undefined"!=typeof Storage&&(console.log("Saved that correct password was entered."),localStorage.setItem(this.localStorageIdentifier(),"true")))}shouldRemoveSelf(){return window&&window.location.hostname===Co?(console.warn("Interstitial found on production, hiding it."),!0):"undefined"!=typeof Storage&&"true"===localStorage.getItem(this.localStorageIdentifier())&&(console.log("Loaded that correct password was entered before; skipping interstitial."),!0)}localStorageIdentifier(){const n="interstitial-password-correct";return"distill-drafts"+(window?window.location.pathname:"-")+n}}var No=M(S).right,Lo=Math.sqrt(50),Do=Math.sqrt(10),Oo=Math.sqrt(2),Io=.7,Fo=1/Io,Ro="\\s*([+-]?\\d+)\\s*",Uo="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",$o="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Po=/^#([0-9a-f]{3,8})$/,Ho=new RegExp("^rgb\\("+[Ro,Ro,Ro]+"\\)$"),zo=new RegExp("^rgb\\("+[$o,$o,$o]+"\\)$"),qo=new RegExp("^rgba\\("+[Ro,Ro,Ro,Uo]+"\\)$"),jo=new RegExp("^rgba\\("+[$o,$o,$o,Uo]+"\\)$"),Bo=new RegExp("^hsl\\("+[Uo,$o,$o]+"\\)$"),Yo=new RegExp("^hsla\\("+[Uo,$o,$o,Uo]+"\\)$"),Wo={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};L(O,U,{copy:function(n){return Object.assign(new this.constructor,this,n)},displayable:function(){return this.rgb().displayable()},hex:I,formatHex:I,formatHsl:F,formatRgb:R,toString:R}),L(q,z,D(O,{brighter:function(n){return n=null==n?Fo:Math.pow(Fo,n),new q(this.r*n,this.g*n,this.b*n,this.opacity)},darker:function(n){return n=null==n?Io:Math.pow(Io,n),new q(this.r*n,this.g*n,this.b*n,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:j,formatHex:j,formatRgb:B,toString:B})),L(K,V,D(O,{brighter:function(n){return n=null==n?Fo:Math.pow(Fo,n),new K(this.h,this.s,this.l*n,this.opacity)},darker:function(n){return n=null==n?Io:Math.pow(Io,n),new K(this.h,this.s,this.l*n,this.opacity)},rgb:function(){var n=this.h%360+360*(this.h<0),t=isNaN(n)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*t,r=2*e-i;return new q(X(n>=240?n-240:n+120,r,i),X(n,r,i),X(n<120?n+240:n-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var n=this.opacity;return(1===(n=isNaN(n)?1:Math.max(0,Math.min(1,n)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===n?")":", "+n+")")}}));var Go=Math.PI/180,Vo=180/Math.PI,Ko=18,Xo=.96422,Zo=1,Qo=.82521,Jo=4/29,na=6/29,ta=3*na*na,ea=na*na*na;L(J,Q,D(O,{brighter:function(n){return new J(this.l+Ko*(null==n?1:n),this.a,this.b,this.opacity)},darker:function(n){return new J(this.l-Ko*(null==n?1:n),this.a,this.b,this.opacity)},rgb:function(){var n=(this.l+16)/116,t=isNaN(this.a)?n:n+this.a/500,e=isNaN(this.b)?n:n-this.b/200;return new q(en(3.1338561*(t=Xo*tn(t))-1.6168667*(n=Zo*tn(n))-.4906146*(e=Qo*tn(e))),en(-.9787684*t+1.9161415*n+.033454*e),en(.0719453*t-.2289914*n+1.4052427*e),this.opacity)}})),L(sn,an,D(O,{brighter:function(n){return new sn(this.h,this.c,this.l+Ko*(null==n?1:n),this.opacity)},darker:function(n){return new sn(this.h,this.c,this.l-Ko*(null==n?1:n),this.opacity)},rgb:function(){return ln(this).rgb()}}));var ia=-.14861,ra=1.78277,oa=-.29227,aa=-.90649,sa=1.97294,la=sa*aa,ua=sa*ra,ca=ra*oa-aa*ia;L(dn,cn,D(O,{brighter:function(n){return n=null==n?Fo:Math.pow(Fo,n),new dn(this.h,this.s,this.l*n,this.opacity)},darker:function(n){return n=null==n?Io:Math.pow(Io,n),new dn(this.h,this.s,this.l*n,this.opacity)},rgb:function(){var n=isNaN(this.h)?0:(this.h+120)*Go,t=+this.l,e=isNaN(this.s)?0:this.s*t*(1-t),i=Math.cos(n),r=Math.sin(n);return new q(255*(t+e*(ia*i+ra*r)),255*(t+e*(oa*i+aa*r)),255*(t+e*(sa*i)),this.opacity)}}));var da,ha=function gs(n){function t(n,t){var i=e((n=z(n)).r,(t=z(t)).r),r=e(n.g,t.g),o=e(n.b,t.b),a=mn(n.opacity,t.opacity);return function(t){return n.r=i(t),n.g=r(t),n.b=o(t),n.opacity=a(t),n+""}}var e=gn(n);return t.gamma=gs,t}(1),pa=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fa=new RegExp(pa.source,"g"),ga=[0,1],ma=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;qn.prototype=jn.prototype,jn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===undefined?"":Math.max(1,0|this.width))+(this.comma?",":"")+(this.precision===undefined?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ba,ya,va,wa={"%":function(n,t){return(100*n).toFixed(t)},b:function(n){return Math.round(n).toString(2)},c:function(n){return n+""},d:function(n){return Math.round(n).toString(10)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},g:function(n,t){return n.toPrecision(t)},o:function(n){return Math.round(n).toString(8)},p:function(n,t){return Wn(100*n,t)},r:Wn,s:Yn,X:function(n){return Math.round(n).toString(16).toUpperCase()},x:function(n){return Math.round(n).toString(16)}},xa=Array.prototype.map,ka=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];Kn({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var Sa=new Date,Ma=new Date,Ta=et(function(){},function(n,t){n.setTime(+n+t)},function(n,t){return t-n});Ta.every=function(n){return n=Math.floor(n),isFinite(n)&&n>0?n>1?et(function(t){t.setTime(Math.floor(t/n)*n)},function(t,e){t.setTime(+t+e*n)},function(t,e){return(e-t)/n}):Ta:null};var _a=1e3,Ca=6e4,Aa=36e5,Ea=864e5,Na=6048e5,La=(et(function(n){n.setTime(n-n.getMilliseconds())},function(n,t){n.setTime(+n+t*_a)},function(n,t){return(t-n)/_a},function(n){return n.getUTCSeconds()}),et(function(n){n.setTime(n-n.getMilliseconds()-n.getSeconds()*_a)},function(n,t){n.setTime(+n+t*Ca)},function(n,t){return(t-n)/Ca},function(n){return n.getMinutes()}),et(function(n){n.setTime(n-n.getMilliseconds()-n.getSeconds()*_a-n.getMinutes()*Ca)},function(n,t){n.setTime(+n+t*Aa)},function(n,t){return(t-n)/Aa},function(n){return n.getHours()}),et(function(n){n.setHours(0,0,0,0)},function(n,t){n.setDate(n.getDate()+t)},function(n,t){return(t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*Ca)/Ea},function(n){return n.getDate()-1})),Da=it(0),Oa=it(1),Ia=(it(2),it(3),it(4)),Fa=(it(5),it(6),et(function(n){n.setDate(1),n.setHours(0,0,0,0)},function(n,t){n.setMonth(n.getMonth()+t)},function(n,t){return t.getMonth()-n.getMonth()+12*(t.getFullYear()-n.getFullYear())},function(n){return n.getMonth()}),et(function(n){n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n,t){return t.getFullYear()-n.getFullYear()},function(n){return n.getFullYear()}));Fa.every=function(n){return isFinite(n=Math.floor(n))&&n>0?et(function(t){t.setFullYear(Math.floor(t.getFullYear()/n)*n),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e*n)}):null};et(function(n){n.setUTCSeconds(0,0)},function(n,t){n.setTime(+n+t*Ca)},function(n,t){return(t-n)/Ca},function(n){return n.getUTCMinutes()}),et(function(n){n.setUTCMinutes(0,0,0)},function(n,t){n.setTime(+n+t*Aa)},function(n,t){return(t-n)/Aa},function(n){return n.getUTCHours()});var Ra=et(function(n){n.setUTCHours(0,0,0,0)},function(n,t){n.setUTCDate(n.getUTCDate()+t)},function(n,t){return(t-n)/Ea},function(n){return n.getUTCDate()-1}),Ua=rt(0),$a=rt(1),Pa=(rt(2),rt(3),rt(4)),Ha=(rt(5),rt(6),et(function(n){n.setUTCDate(1),n.setUTCHours(0,0,0,0)},function(n,t){n.setUTCMonth(n.getUTCMonth()+t)},function(n,t){return t.getUTCMonth()-n.getUTCMonth()+12*(t.getUTCFullYear()-n.getUTCFullYear())},function(n){return n.getUTCMonth()}),et(function(n){n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,t){n.setUTCFullYear(n.getUTCFullYear()+t)},function(n,t){return t.getUTCFullYear()-n.getUTCFullYear()},function(n){return n.getUTCFullYear()}));Ha.every=function(n){return isFinite(n=Math.floor(n))&&n>0?et(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/n)*n),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e*n)}):null};var za,qa,ja,Ba={"-":"",_:" ",0:"0"},Ya=/^\s*\d+/,Wa=/^%/,Ga=/[\\^$*+?|[\]().{}]/g;me({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Va="%Y-%m-%dT%H:%M:%S.%LZ",Ka=(Date.prototype.toISOString||qa(Va),+new Date("2000-01-01T00:00:00.000Z")||ja(Va),{value:function(){}});we.prototype=ve.prototype={constructor:we,on:function(n,t){var e,i=this._,r=xe(n+"",i),o=-1,a=r.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o0)for(var e,i,r=new Array(e),o=0;o=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};var Ja={},ns=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Ja={mouseenter:"mouseover",mouseleave:"mouseout"}));var ts=[null];or.prototype=ar.prototype={constructor:or,select:Ne,selectAll:Oe,filter:Fe,data:qe,enter:Ue,exit:je,join:Be,merge:Ye,order:We,sort:Ge,call:Ke,nodes:Xe,node:Ze,size:Qe,empty:Je,each:ni,attr:si,style:hi,property:bi,classed:_i,text:Ni,html:Ii,raise:Ri,lower:$i,append:Pi,insert:zi,remove:ji,clone:Wi,datum:Gi,on:Ji,dispatch:rr},br.prototype.on=function(){var n=this._.on.apply(this._,arguments);return n===this._?this:n};const es=Or("d-slider","\n\n\n
-`;
- }
-
- // Copyright 2018 The Distill Template Authors
-
- function Byline(dom, data) {
- const byline = dom.querySelector('d-byline');
- if (byline) {
- byline.innerHTML = bylineTemplate(data);
- }
- }
-
- // Copyright 2018 The Distill Template Authors
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- // no appendix -> add appendix
- // title in front, no h1 -> add it
- // no title in front, h1 -> read and put into frontMatter
- // footnote -> footnote list
- // break up bib
- // if citation, no bib-list -> add citation-list
-
- // if authors, no byline -> add byline
-
- function OptionalComponents(dom, data) {
- const body = dom.body;
- const article = body.querySelector('d-article');
-
- // If we don't have an article tag, something weird is going on—giving up.
- if (!article) {
- console.warn('No d-article tag found; skipping adding optional components!');
- return;
- }
-
- let byline = dom.querySelector('d-byline');
- if (!byline) {
- if (data.authors) {
- byline = dom.createElement('d-byline');
- body.insertBefore(byline, article);
- } else {
- console.warn('No authors found in front matter; please add them before submission!');
- }
- }
-
- let title = dom.querySelector('d-title');
- if (!title) {
- title = dom.createElement('d-title');
- body.insertBefore(title, byline);
- }
-
- let h1 = title.querySelector('h1');
- if (!h1) {
- h1 = dom.createElement('h1');
- h1.textContent = data.title;
- title.insertBefore(h1, title.firstChild);
- }
-
- const hasPassword = typeof data.password !== 'undefined';
- let interstitial = body.querySelector('d-interstitial');
- if (hasPassword && !interstitial) {
- const inBrowser = typeof window !== 'undefined';
- const onLocalhost = inBrowser && window.location.hostname.includes('localhost');
- if (!inBrowser || !onLocalhost) {
- interstitial = dom.createElement('d-interstitial');
- interstitial.password = data.password;
- body.insertBefore(interstitial, body.firstChild);
- }
- } else if (!hasPassword && interstitial) {
- interstitial.parentElement.removeChild(this);
- }
-
- let appendix = dom.querySelector('d-appendix');
- if (!appendix) {
- appendix = dom.createElement('d-appendix');
- dom.body.appendChild(appendix);
- }
-
- let footnoteList = dom.querySelector('d-footnote-list');
- if (!footnoteList) {
- footnoteList = dom.createElement('d-footnote-list');
- appendix.appendChild(footnoteList);
- }
-
- let citationList = dom.querySelector('d-citation-list');
- if (!citationList) {
- citationList = dom.createElement('d-citation-list');
- appendix.appendChild(citationList);
- }
-
- }
-
- var katex$1 = createCommonjsModule(function (module, exports) {
- (function(f){{module.exports=f();}})(function(){return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof commonjsRequire=="function"&&commonjsRequire;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r);}return n[o].exports}var i=typeof commonjsRequire=="function"&&commonjsRequire;for(var o=0;o= 0; --i) {
- tok = expansion[i];
- if (tok.text === "#") {
- if (i === 0) {
- throw new _ParseError2.default("Incomplete placeholder at end of macro body", tok);
- }
- tok = expansion[--i]; // next token on stack
- if (tok.text === "#") {
- // ## → #
- expansion.splice(i + 1, 1); // drop first #
- } else if (/^[1-9]$/.test(tok.text)) {
- // expansion.splice(i, 2, arg[0], arg[1], …)
- // to replace placeholder with the indicated argument.
- // TODO: use spread once we move to ES2015
- expansion.splice.apply(expansion, [i, 2].concat(args[tok.text - 1]));
- } else {
- throw new _ParseError2.default("Not a valid argument number", tok);
- }
- }
- }
- }
- this.stack = this.stack.concat(expansion);
- }
- }
- }, {
- key: "get",
- value: function get(ignoreSpace) {
- this.discardedWhiteSpace = [];
- var token = this.nextToken();
- if (ignoreSpace) {
- while (token.text === " ") {
- this.discardedWhiteSpace.push(token);
- token = this.nextToken();
- }
- }
- return token;
- }
-
- /**
- * Undo the effect of the preceding call to the get method.
- * A call to this method MUST be immediately preceded and immediately followed
- * by a call to get. Only used during mode switching, i.e. after one token
- * was got in the old mode but should get got again in a new mode
- * with possibly different whitespace handling.
- */
-
- }, {
- key: "unget",
- value: function unget(token) {
- this.stack.push(token);
- while (this.discardedWhiteSpace.length !== 0) {
- this.stack.push(this.discardedWhiteSpace.pop());
- }
- }
- }]);
- return MacroExpander;
- }();
-
- module.exports = MacroExpander;
-
- },{"./Lexer":26,"./ParseError":29,"./macros":44,"babel-runtime/helpers/classCallCheck":4,"babel-runtime/helpers/createClass":5,"object-assign":25}],28:[function(require,module,exports){
-
- var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
-
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
- var _createClass2 = require("babel-runtime/helpers/createClass");
-
- var _createClass3 = _interopRequireDefault(_createClass2);
-
- var _fontMetrics2 = require("./fontMetrics");
-
- var _fontMetrics3 = _interopRequireDefault(_fontMetrics2);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var BASESIZE = 6; /**
- * This file contains information about the options that the Parser carries
- * around with it while parsing. Data is held in an `Options` object, and when
- * recursing, a new `Options` object can be created with the `.with*` and
- * `.reset` functions.
- */
-
- var sizeStyleMap = [
- // Each element contains [textsize, scriptsize, scriptscriptsize].
- // The size mappings are taken from TeX with \normalsize=10pt.
- [1, 1, 1], // size1: [5, 5, 5] \tiny
- [2, 1, 1], // size2: [6, 5, 5]
- [3, 1, 1], // size3: [7, 5, 5] \scriptsize
- [4, 2, 1], // size4: [8, 6, 5] \footnotesize
- [5, 2, 1], // size5: [9, 6, 5] \small
- [6, 3, 1], // size6: [10, 7, 5] \normalsize
- [7, 4, 2], // size7: [12, 8, 6] \large
- [8, 6, 3], // size8: [14.4, 10, 7] \Large
- [9, 7, 6], // size9: [17.28, 12, 10] \LARGE
- [10, 8, 7], // size10: [20.74, 14.4, 12] \huge
- [11, 10, 9]];
-
- var sizeMultipliers = [
- // fontMetrics.js:getFontMetrics also uses size indexes, so if
- // you change size indexes, change that function.
- 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.2, 1.44, 1.728, 2.074, 2.488];
-
- var sizeAtStyle = function sizeAtStyle(size, style) {
- return style.size < 2 ? size : sizeStyleMap[size - 1][style.size - 1];
- };
-
- /**
- * This is the main options class. It contains the current style, size, color,
- * and font.
- *
- * Options objects should not be modified. To create a new Options with
- * different properties, call a `.having*` method.
- */
-
- var Options = function () {
- function Options(data) {
- (0, _classCallCheck3.default)(this, Options);
-
- this.style = data.style;
- this.color = data.color;
- this.size = data.size || BASESIZE;
- this.textSize = data.textSize || this.size;
- this.phantom = data.phantom;
- this.font = data.font;
- this.sizeMultiplier = sizeMultipliers[this.size - 1];
- this._fontMetrics = null;
- }
-
- /**
- * Returns a new options object with the same properties as "this". Properties
- * from "extension" will be copied to the new options object.
- */
-
-
- (0, _createClass3.default)(Options, [{
- key: "extend",
- value: function extend(extension) {
- var data = {
- style: this.style,
- size: this.size,
- textSize: this.textSize,
- color: this.color,
- phantom: this.phantom,
- font: this.font
- };
-
- for (var key in extension) {
- if (extension.hasOwnProperty(key)) {
- data[key] = extension[key];
- }
- }
-
- return new Options(data);
- }
-
- /**
- * Return an options object with the given style. If `this.style === style`,
- * returns `this`.
- */
-
- }, {
- key: "havingStyle",
- value: function havingStyle(style) {
- if (this.style === style) {
- return this;
- } else {
- return this.extend({
- style: style,
- size: sizeAtStyle(this.textSize, style)
- });
- }
- }
-
- /**
- * Return an options object with a cramped version of the current style. If
- * the current style is cramped, returns `this`.
- */
-
- }, {
- key: "havingCrampedStyle",
- value: function havingCrampedStyle() {
- return this.havingStyle(this.style.cramp());
- }
-
- /**
- * Return an options object with the given size and in at least `\textstyle`.
- * Returns `this` if appropriate.
- */
-
- }, {
- key: "havingSize",
- value: function havingSize(size) {
- if (this.size === size && this.textSize === size) {
- return this;
- } else {
- return this.extend({
- style: this.style.text(),
- size: size,
- textSize: size
- });
- }
- }
-
- /**
- * Like `this.havingSize(BASESIZE).havingStyle(style)`. If `style` is omitted,
- * changes to at least `\textstyle`.
- */
-
- }, {
- key: "havingBaseStyle",
- value: function havingBaseStyle(style) {
- style = style || this.style.text();
- var wantSize = sizeAtStyle(BASESIZE, style);
- if (this.size === wantSize && this.textSize === BASESIZE && this.style === style) {
- return this;
- } else {
- return this.extend({
- style: style,
- size: wantSize,
- baseSize: BASESIZE
- });
- }
- }
-
- /**
- * Create a new options object with the given color.
- */
-
- }, {
- key: "withColor",
- value: function withColor(color) {
- return this.extend({
- color: color
- });
- }
-
- /**
- * Create a new options object with "phantom" set to true.
- */
-
- }, {
- key: "withPhantom",
- value: function withPhantom() {
- return this.extend({
- phantom: true
- });
- }
-
- /**
- * Create a new options objects with the give font.
- */
-
- }, {
- key: "withFont",
- value: function withFont(font) {
- return this.extend({
- font: font || this.font
- });
- }
-
- /**
- * Return the CSS sizing classes required to switch from enclosing options
- * `oldOptions` to `this`. Returns an array of classes.
- */
-
- }, {
- key: "sizingClasses",
- value: function sizingClasses(oldOptions) {
- if (oldOptions.size !== this.size) {
- return ["sizing", "reset-size" + oldOptions.size, "size" + this.size];
- } else {
- return [];
- }
- }
-
- /**
- * Return the CSS sizing classes required to switch to the base size. Like
- * `this.havingSize(BASESIZE).sizingClasses(this)`.
- */
-
- }, {
- key: "baseSizingClasses",
- value: function baseSizingClasses() {
- if (this.size !== BASESIZE) {
- return ["sizing", "reset-size" + this.size, "size" + BASESIZE];
- } else {
- return [];
- }
- }
-
- /**
- * Return the font metrics for this size.
- */
-
- }, {
- key: "fontMetrics",
- value: function fontMetrics() {
- if (!this._fontMetrics) {
- this._fontMetrics = _fontMetrics3.default.getFontMetrics(this.size);
- }
- return this._fontMetrics;
- }
-
- /**
- * A map of color names to CSS colors.
- * TODO(emily): Remove this when we have real macros
- */
-
- }, {
- key: "getColor",
-
-
- /**
- * Gets the CSS color of the current options object, accounting for the
- * `colorMap`.
- */
- value: function getColor() {
- if (this.phantom) {
- return "transparent";
- } else {
- return Options.colorMap[this.color] || this.color;
- }
- }
- }]);
- return Options;
- }();
-
- /**
- * The base size index.
- */
-
-
- Options.colorMap = {
- "katex-blue": "#6495ed",
- "katex-orange": "#ffa500",
- "katex-pink": "#ff00af",
- "katex-red": "#df0030",
- "katex-green": "#28ae7b",
- "katex-gray": "gray",
- "katex-purple": "#9d38bd",
- "katex-blueA": "#ccfaff",
- "katex-blueB": "#80f6ff",
- "katex-blueC": "#63d9ea",
- "katex-blueD": "#11accd",
- "katex-blueE": "#0c7f99",
- "katex-tealA": "#94fff5",
- "katex-tealB": "#26edd5",
- "katex-tealC": "#01d1c1",
- "katex-tealD": "#01a995",
- "katex-tealE": "#208170",
- "katex-greenA": "#b6ffb0",
- "katex-greenB": "#8af281",
- "katex-greenC": "#74cf70",
- "katex-greenD": "#1fab54",
- "katex-greenE": "#0d923f",
- "katex-goldA": "#ffd0a9",
- "katex-goldB": "#ffbb71",
- "katex-goldC": "#ff9c39",
- "katex-goldD": "#e07d10",
- "katex-goldE": "#a75a05",
- "katex-redA": "#fca9a9",
- "katex-redB": "#ff8482",
- "katex-redC": "#f9685d",
- "katex-redD": "#e84d39",
- "katex-redE": "#bc2612",
- "katex-maroonA": "#ffbde0",
- "katex-maroonB": "#ff92c6",
- "katex-maroonC": "#ed5fa6",
- "katex-maroonD": "#ca337c",
- "katex-maroonE": "#9e034e",
- "katex-purpleA": "#ddd7ff",
- "katex-purpleB": "#c6b9fc",
- "katex-purpleC": "#aa87ff",
- "katex-purpleD": "#7854ab",
- "katex-purpleE": "#543b78",
- "katex-mintA": "#f5f9e8",
- "katex-mintB": "#edf2df",
- "katex-mintC": "#e0e5cc",
- "katex-grayA": "#f6f7f7",
- "katex-grayB": "#f0f1f2",
- "katex-grayC": "#e3e5e6",
- "katex-grayD": "#d6d8da",
- "katex-grayE": "#babec2",
- "katex-grayF": "#888d93",
- "katex-grayG": "#626569",
- "katex-grayH": "#3b3e40",
- "katex-grayI": "#21242c",
- "katex-kaBlue": "#314453",
- "katex-kaGreen": "#71B307"
- };
- Options.BASESIZE = BASESIZE;
-
- module.exports = Options;
-
- },{"./fontMetrics":41,"babel-runtime/helpers/classCallCheck":4,"babel-runtime/helpers/createClass":5}],29:[function(require,module,exports){
-
- var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
-
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- /**
- * This is the ParseError class, which is the main error thrown by KaTeX
- * functions when something has gone wrong. This is used to distinguish internal
- * errors from errors in the expression that the user provided.
- *
- * If possible, a caller should provide a Token or ParseNode with information
- * about where in the source string the problem occurred.
- *
- * @param {string} message The error message
- * @param {(Token|ParseNode)=} token An object providing position information
- */
- var ParseError = function ParseError(message, token) {
- (0, _classCallCheck3.default)(this, ParseError);
-
- var error = "KaTeX parse error: " + message;
- var start = void 0;
- var end = void 0;
-
- if (token && token.lexer && token.start <= token.end) {
- // If we have the input and a position, make the error a bit fancier
-
- // Get the input
- var input = token.lexer.input;
-
- // Prepend some information
- start = token.start;
- end = token.end;
- if (start === input.length) {
- error += " at end of input: ";
- } else {
- error += " at position " + (start + 1) + ": ";
- }
-
- // Underline token in question using combining underscores
- var underlined = input.slice(start, end).replace(/[^]/g, "$&\u0332");
-
- // Extract some context from the input and add it to the error
- var left = void 0;
- if (start > 15) {
- left = "…" + input.slice(start - 15, start);
- } else {
- left = input.slice(0, start);
- }
- var right = void 0;
- if (end + 15 < input.length) {
- right = input.slice(end, end + 15) + "…";
- } else {
- right = input.slice(end);
- }
- error += left + underlined + right;
- }
-
- // Some hackery to make ParseError a prototype of Error
- // See http://stackoverflow.com/a/8460753
- var self = new Error(error);
- self.name = "ParseError";
- self.__proto__ = ParseError.prototype;
-
- self.position = start;
- return self;
- };
-
- // More hackery
-
-
- ParseError.prototype.__proto__ = Error.prototype;
-
- module.exports = ParseError;
-
- },{"babel-runtime/helpers/classCallCheck":4}],30:[function(require,module,exports){
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
-
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- /**
- * The resulting parse tree nodes of the parse tree.
- *
- * It is possible to provide position information, so that a ParseNode can
- * fulfil a role similar to a Token in error reporting.
- * For details on the corresponding properties see Token constructor.
- * Providing such information can lead to better error reporting.
- *
- * @param {string} type type of node, like e.g. "ordgroup"
- * @param {?object} value type-specific representation of the node
- * @param {string} mode parse mode in action for this node,
- * "math" or "text"
- * @param {Token=} firstToken first token of the input for this node,
- * will omit position information if unset
- * @param {Token=} lastToken last token of the input for this node,
- * will default to firstToken if unset
- */
- var ParseNode = function ParseNode(type, value, mode, firstToken, lastToken) {
- (0, _classCallCheck3.default)(this, ParseNode);
-
- this.type = type;
- this.value = value;
- this.mode = mode;
- if (firstToken && (!lastToken || lastToken.lexer === firstToken.lexer)) {
- this.lexer = firstToken.lexer;
- this.start = firstToken.start;
- this.end = (lastToken || firstToken).end;
- }
- };
-
- exports.default = ParseNode;
-
- },{"babel-runtime/helpers/classCallCheck":4}],31:[function(require,module,exports){
-
- var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
-
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
- var _createClass2 = require("babel-runtime/helpers/createClass");
-
- var _createClass3 = _interopRequireDefault(_createClass2);
-
- var _functions = require("./functions");
-
- var _functions2 = _interopRequireDefault(_functions);
-
- var _environments = require("./environments");
-
- var _environments2 = _interopRequireDefault(_environments);
-
- var _MacroExpander = require("./MacroExpander");
-
- var _MacroExpander2 = _interopRequireDefault(_MacroExpander);
-
- var _symbols = require("./symbols");
-
- var _symbols2 = _interopRequireDefault(_symbols);
-
- var _utils = require("./utils");
-
- var _utils2 = _interopRequireDefault(_utils);
-
- var _units = require("./units");
-
- var _units2 = _interopRequireDefault(_units);
-
- var _unicodeRegexes = require("./unicodeRegexes");
-
- var _ParseNode = require("./ParseNode");
-
- var _ParseNode2 = _interopRequireDefault(_ParseNode);
-
- var _ParseError = require("./ParseError");
-
- var _ParseError2 = _interopRequireDefault(_ParseError);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- /**
- * This file contains the parser used to parse out a TeX expression from the
- * input. Since TeX isn't context-free, standard parsers don't work particularly
- * well.
- *
- * The strategy of this parser is as such:
- *
- * The main functions (the `.parse...` ones) take a position in the current
- * parse string to parse tokens from. The lexer (found in Lexer.js, stored at
- * this.lexer) also supports pulling out tokens at arbitrary places. When
- * individual tokens are needed at a position, the lexer is called to pull out a
- * token, which is then used.
- *
- * The parser has a property called "mode" indicating the mode that
- * the parser is currently in. Currently it has to be one of "math" or
- * "text", which denotes whether the current environment is a math-y
- * one or a text-y one (e.g. inside \text). Currently, this serves to
- * limit the functions which can be used in text mode.
- *
- * The main functions then return an object which contains the useful data that
- * was parsed at its given point, and a new position at the end of the parsed
- * data. The main functions can call each other and continue the parsing by
- * using the returned position as a new starting point.
- *
- * There are also extra `.handle...` functions, which pull out some reused
- * functionality into self-contained functions.
- *
- * The earlier functions return ParseNodes.
- * The later functions (which are called deeper in the parse) sometimes return
- * ParseFuncOrArgument, which contain a ParseNode as well as some data about
- * whether the parsed object is a function which is missing some arguments, or a
- * standalone object which can be used as an argument to another function.
- */
-
- /**
- * An initial function (without its arguments), or an argument to a function.
- * The `result` argument should be a ParseNode.
- */
- function ParseFuncOrArgument(result, isFunction, token) {
- this.result = result;
- // Is this a function (i.e. is it something defined in functions.js)?
- this.isFunction = isFunction;
- this.token = token;
- } /* eslint no-constant-condition:0 */
-
- var Parser = function () {
- function Parser(input, settings) {
- (0, _classCallCheck3.default)(this, Parser);
-
- // Create a new macro expander (gullet) and (indirectly via that) also a
- // new lexer (mouth) for this parser (stomach, in the language of TeX)
- this.gullet = new _MacroExpander2.default(input, settings.macros);
- // Use old \color behavior (same as LaTeX's \textcolor) if requested.
- // We do this after the macros object has been copied by MacroExpander.
- if (settings.colorIsTextColor) {
- this.gullet.macros["\\color"] = "\\textcolor";
- }
- // Store the settings for use in parsing
- this.settings = settings;
- // Count leftright depth (for \middle errors)
- this.leftrightDepth = 0;
- }
-
- /**
- * Checks a result to make sure it has the right type, and throws an
- * appropriate error otherwise.
- *
- * @param {boolean=} consume whether to consume the expected token,
- * defaults to true
- */
-
-
- (0, _createClass3.default)(Parser, [{
- key: "expect",
- value: function expect(text, consume) {
- if (this.nextToken.text !== text) {
- throw new _ParseError2.default("Expected '" + text + "', got '" + this.nextToken.text + "'", this.nextToken);
- }
- if (consume !== false) {
- this.consume();
- }
- }
-
- /**
- * Considers the current look ahead token as consumed,
- * and fetches the one after that as the new look ahead.
- */
-
- }, {
- key: "consume",
- value: function consume() {
- this.nextToken = this.gullet.get(this.mode === "math");
- }
- }, {
- key: "switchMode",
- value: function switchMode(newMode) {
- this.gullet.unget(this.nextToken);
- this.mode = newMode;
- this.consume();
- }
-
- /**
- * Main parsing function, which parses an entire input.
- *
- * @return {?Array.}
- */
-
- }, {
- key: "parse",
- value: function parse() {
- // Try to parse the input
- this.mode = "math";
- this.consume();
- var parse = this.parseInput();
- return parse;
- }
-
- /**
- * Parses an entire input tree.
- */
-
- }, {
- key: "parseInput",
- value: function parseInput() {
- // Parse an expression
- var expression = this.parseExpression(false);
- // If we succeeded, make sure there's an EOF at the end
- this.expect("EOF", false);
- return expression;
- }
- }, {
- key: "parseExpression",
-
-
- /**
- * Parses an "expression", which is a list of atoms.
- *
- * @param {boolean} breakOnInfix Should the parsing stop when we hit infix
- * nodes? This happens when functions have higher precendence
- * than infix nodes in implicit parses.
- *
- * @param {?string} breakOnTokenText The text of the token that the expression
- * should end with, or `null` if something else should end the
- * expression.
- *
- * @return {ParseNode}
- */
- value: function parseExpression(breakOnInfix, breakOnTokenText) {
- var body = [];
- // Keep adding atoms to the body until we can't parse any more atoms (either
- // we reached the end, a }, or a \right)
- while (true) {
- var lex = this.nextToken;
- if (Parser.endOfExpression.indexOf(lex.text) !== -1) {
- break;
- }
- if (breakOnTokenText && lex.text === breakOnTokenText) {
- break;
- }
- if (breakOnInfix && _functions2.default[lex.text] && _functions2.default[lex.text].infix) {
- break;
- }
- var atom = this.parseAtom();
- if (!atom) {
- if (!this.settings.throwOnError && lex.text[0] === "\\") {
- var errorNode = this.handleUnsupportedCmd();
- body.push(errorNode);
- continue;
- }
-
- break;
- }
- body.push(atom);
- }
- return this.handleInfixNodes(body);
- }
-
- /**
- * Rewrites infix operators such as \over with corresponding commands such
- * as \frac.
- *
- * There can only be one infix operator per group. If there's more than one
- * then the expression is ambiguous. This can be resolved by adding {}.
- *
- * @returns {Array}
- */
-
- }, {
- key: "handleInfixNodes",
- value: function handleInfixNodes(body) {
- var overIndex = -1;
- var funcName = void 0;
-
- for (var i = 0; i < body.length; i++) {
- var node = body[i];
- if (node.type === "infix") {
- if (overIndex !== -1) {
- throw new _ParseError2.default("only one infix operator per group", node.value.token);
- }
- overIndex = i;
- funcName = node.value.replaceWith;
- }
- }
-
- if (overIndex !== -1) {
- var numerNode = void 0;
- var denomNode = void 0;
-
- var numerBody = body.slice(0, overIndex);
- var denomBody = body.slice(overIndex + 1);
-
- if (numerBody.length === 1 && numerBody[0].type === "ordgroup") {
- numerNode = numerBody[0];
- } else {
- numerNode = new _ParseNode2.default("ordgroup", numerBody, this.mode);
- }
-
- if (denomBody.length === 1 && denomBody[0].type === "ordgroup") {
- denomNode = denomBody[0];
- } else {
- denomNode = new _ParseNode2.default("ordgroup", denomBody, this.mode);
- }
-
- var value = this.callFunction(funcName, [numerNode, denomNode], null);
- return [new _ParseNode2.default(value.type, value, this.mode)];
- } else {
- return body;
- }
- }
-
- // The greediness of a superscript or subscript
-
- }, {
- key: "handleSupSubscript",
-
-
- /**
- * Handle a subscript or superscript with nice errors.
- */
- value: function handleSupSubscript(name) {
- var symbolToken = this.nextToken;
- var symbol = symbolToken.text;
- this.consume();
- var group = this.parseGroup();
-
- if (!group) {
- if (!this.settings.throwOnError && this.nextToken.text[0] === "\\") {
- return this.handleUnsupportedCmd();
- } else {
- throw new _ParseError2.default("Expected group after '" + symbol + "'", symbolToken);
- }
- } else if (group.isFunction) {
- // ^ and _ have a greediness, so handle interactions with functions'
- // greediness
- var funcGreediness = _functions2.default[group.result].greediness;
- if (funcGreediness > Parser.SUPSUB_GREEDINESS) {
- return this.parseFunction(group);
- } else {
- throw new _ParseError2.default("Got function '" + group.result + "' with no arguments " + "as " + name, symbolToken);
- }
- } else {
- return group.result;
- }
- }
-
- /**
- * Converts the textual input of an unsupported command into a text node
- * contained within a color node whose color is determined by errorColor
- */
-
- }, {
- key: "handleUnsupportedCmd",
- value: function handleUnsupportedCmd() {
- var text = this.nextToken.text;
- var textordArray = [];
-
- for (var i = 0; i < text.length; i++) {
- textordArray.push(new _ParseNode2.default("textord", text[i], "text"));
- }
-
- var textNode = new _ParseNode2.default("text", {
- body: textordArray,
- type: "text"
- }, this.mode);
-
- var colorNode = new _ParseNode2.default("color", {
- color: this.settings.errorColor,
- value: [textNode],
- type: "color"
- }, this.mode);
-
- this.consume();
- return colorNode;
- }
-
- /**
- * Parses a group with optional super/subscripts.
- *
- * @return {?ParseNode}
- */
-
- }, {
- key: "parseAtom",
- value: function parseAtom() {
- // The body of an atom is an implicit group, so that things like
- // \left(x\right)^2 work correctly.
- var base = this.parseImplicitGroup();
-
- // In text mode, we don't have superscripts or subscripts
- if (this.mode === "text") {
- return base;
- }
-
- // Note that base may be empty (i.e. null) at this point.
-
- var superscript = void 0;
- var subscript = void 0;
- while (true) {
- // Lex the first token
- var lex = this.nextToken;
-
- if (lex.text === "\\limits" || lex.text === "\\nolimits") {
- // We got a limit control
- if (!base || base.type !== "op") {
- throw new _ParseError2.default("Limit controls must follow a math operator", lex);
- } else {
- var limits = lex.text === "\\limits";
- base.value.limits = limits;
- base.value.alwaysHandleSupSub = true;
- }
- this.consume();
- } else if (lex.text === "^") {
- // We got a superscript start
- if (superscript) {
- throw new _ParseError2.default("Double superscript", lex);
- }
- superscript = this.handleSupSubscript("superscript");
- } else if (lex.text === "_") {
- // We got a subscript start
- if (subscript) {
- throw new _ParseError2.default("Double subscript", lex);
- }
- subscript = this.handleSupSubscript("subscript");
- } else if (lex.text === "'") {
- // We got a prime
- if (superscript) {
- throw new _ParseError2.default("Double superscript", lex);
- }
- var prime = new _ParseNode2.default("textord", "\\prime", this.mode);
-
- // Many primes can be grouped together, so we handle this here
- var primes = [prime];
- this.consume();
- // Keep lexing tokens until we get something that's not a prime
- while (this.nextToken.text === "'") {
- // For each one, add another prime to the list
- primes.push(prime);
- this.consume();
- }
- // If there's a superscript following the primes, combine that
- // superscript in with the primes.
- if (this.nextToken.text === "^") {
- primes.push(this.handleSupSubscript("superscript"));
- }
- // Put everything into an ordgroup as the superscript
- superscript = new _ParseNode2.default("ordgroup", primes, this.mode);
- } else {
- // If it wasn't ^, _, or ', stop parsing super/subscripts
- break;
- }
- }
-
- if (superscript || subscript) {
- // If we got either a superscript or subscript, create a supsub
- return new _ParseNode2.default("supsub", {
- base: base,
- sup: superscript,
- sub: subscript
- }, this.mode);
- } else {
- // Otherwise return the original body
- return base;
- }
- }
-
- // A list of the size-changing functions, for use in parseImplicitGroup
-
-
- // A list of the style-changing functions, for use in parseImplicitGroup
-
-
- // Old font functions
-
- }, {
- key: "parseImplicitGroup",
-
-
- /**
- * Parses an implicit group, which is a group that starts at the end of a
- * specified, and ends right before a higher explicit group ends, or at EOL. It
- * is used for functions that appear to affect the current style, like \Large or
- * \textrm, where instead of keeping a style we just pretend that there is an
- * implicit grouping after it until the end of the group. E.g.
- * small text {\Large large text} small text again
- * It is also used for \left and \right to get the correct grouping.
- *
- * @return {?ParseNode}
- */
- value: function parseImplicitGroup() {
- var start = this.parseSymbol();
-
- if (start == null) {
- // If we didn't get anything we handle, fall back to parseFunction
- return this.parseFunction();
- }
-
- var func = start.result;
-
- if (func === "\\left") {
- // If we see a left:
- // Parse the entire left function (including the delimiter)
- var left = this.parseFunction(start);
- // Parse out the implicit body
- ++this.leftrightDepth;
- var body = this.parseExpression(false);
- --this.leftrightDepth;
- // Check the next token
- this.expect("\\right", false);
- var right = this.parseFunction();
- return new _ParseNode2.default("leftright", {
- body: body,
- left: left.value.value,
- right: right.value.value
- }, this.mode);
- } else if (func === "\\begin") {
- // begin...end is similar to left...right
- var begin = this.parseFunction(start);
- var envName = begin.value.name;
- if (!_environments2.default.hasOwnProperty(envName)) {
- throw new _ParseError2.default("No such environment: " + envName, begin.value.nameGroup);
- }
- // Build the environment object. Arguments and other information will
- // be made available to the begin and end methods using properties.
- var env = _environments2.default[envName];
- var args = this.parseArguments("\\begin{" + envName + "}", env);
- var context = {
- mode: this.mode,
- envName: envName,
- parser: this,
- positions: args.pop()
- };
- var result = env.handler(context, args);
- this.expect("\\end", false);
- var endNameToken = this.nextToken;
- var end = this.parseFunction();
- if (end.value.name !== envName) {
- throw new _ParseError2.default("Mismatch: \\begin{" + envName + "} matched " + "by \\end{" + end.value.name + "}", endNameToken);
- }
- result.position = end.position;
- return result;
- } else if (_utils2.default.contains(Parser.sizeFuncs, func)) {
- // If we see a sizing function, parse out the implicit body
- this.consumeSpaces();
- var _body = this.parseExpression(false);
- return new _ParseNode2.default("sizing", {
- // Figure out what size to use based on the list of functions above
- size: _utils2.default.indexOf(Parser.sizeFuncs, func) + 1,
- value: _body
- }, this.mode);
- } else if (_utils2.default.contains(Parser.styleFuncs, func)) {
- // If we see a styling function, parse out the implicit body
- this.consumeSpaces();
- var _body2 = this.parseExpression(true);
- return new _ParseNode2.default("styling", {
- // Figure out what style to use by pulling out the style from
- // the function name
- style: func.slice(1, func.length - 5),
- value: _body2
- }, this.mode);
- } else if (func in Parser.oldFontFuncs) {
- var style = Parser.oldFontFuncs[func];
- // If we see an old font function, parse out the implicit body
- this.consumeSpaces();
- var _body3 = this.parseExpression(true);
- if (style.slice(0, 4) === 'text') {
- return new _ParseNode2.default("text", {
- style: style,
- body: new _ParseNode2.default("ordgroup", _body3, this.mode)
- }, this.mode);
- } else {
- return new _ParseNode2.default("font", {
- font: style,
- body: new _ParseNode2.default("ordgroup", _body3, this.mode)
- }, this.mode);
- }
- } else if (func === "\\color") {
- // If we see a styling function, parse out the implicit body
- var color = this.parseColorGroup(false);
- if (!color) {
- throw new _ParseError2.default("\\color not followed by color");
- }
- var _body4 = this.parseExpression(true);
- return new _ParseNode2.default("color", {
- type: "color",
- color: color.result.value,
- value: _body4
- }, this.mode);
- } else if (func === "$") {
- if (this.mode === "math") {
- throw new _ParseError2.default("$ within math mode");
- }
- this.consume();
- var outerMode = this.mode;
- this.switchMode("math");
- var _body5 = this.parseExpression(false, "$");
- this.expect("$", true);
- this.switchMode(outerMode);
- return new _ParseNode2.default("styling", {
- style: "text",
- value: _body5
- }, "math");
- } else {
- // Defer to parseFunction if it's not a function we handle
- return this.parseFunction(start);
- }
- }
-
- /**
- * Parses an entire function, including its base and all of its arguments.
- * The base might either have been parsed already, in which case
- * it is provided as an argument, or it's the next group in the input.
- *
- * @param {ParseFuncOrArgument=} baseGroup optional as described above
- * @return {?ParseNode}
- */
-
- }, {
- key: "parseFunction",
- value: function parseFunction(baseGroup) {
- if (!baseGroup) {
- baseGroup = this.parseGroup();
- }
-
- if (baseGroup) {
- if (baseGroup.isFunction) {
- var func = baseGroup.result;
- var funcData = _functions2.default[func];
- if (this.mode === "text" && !funcData.allowedInText) {
- throw new _ParseError2.default("Can't use function '" + func + "' in text mode", baseGroup.token);
- } else if (this.mode === "math" && funcData.allowedInMath === false) {
- throw new _ParseError2.default("Can't use function '" + func + "' in math mode", baseGroup.token);
- }
-
- var args = this.parseArguments(func, funcData);
- var token = baseGroup.token;
- var result = this.callFunction(func, args, args.pop(), token);
- return new _ParseNode2.default(result.type, result, this.mode);
- } else {
- return baseGroup.result;
- }
- } else {
- return null;
- }
- }
-
- /**
- * Call a function handler with a suitable context and arguments.
- */
-
- }, {
- key: "callFunction",
- value: function callFunction(name, args, positions, token) {
- var context = {
- funcName: name,
- parser: this,
- positions: positions,
- token: token
- };
- return _functions2.default[name].handler(context, args);
- }
-
- /**
- * Parses the arguments of a function or environment
- *
- * @param {string} func "\name" or "\begin{name}"
- * @param {{numArgs:number,numOptionalArgs:number|undefined}} funcData
- * @return the array of arguments, with the list of positions as last element
- */
-
- }, {
- key: "parseArguments",
- value: function parseArguments(func, funcData) {
- var totalArgs = funcData.numArgs + funcData.numOptionalArgs;
- if (totalArgs === 0) {
- return [[this.pos]];
- }
-
- var baseGreediness = funcData.greediness;
- var positions = [this.pos];
- var args = [];
-
- for (var i = 0; i < totalArgs; i++) {
- var nextToken = this.nextToken;
- var argType = funcData.argTypes && funcData.argTypes[i];
- var arg = void 0;
- if (i < funcData.numOptionalArgs) {
- if (argType) {
- arg = this.parseGroupOfType(argType, true);
- } else {
- arg = this.parseGroup(true);
- }
- if (!arg) {
- args.push(null);
- positions.push(this.pos);
- continue;
- }
- } else {
- if (argType) {
- arg = this.parseGroupOfType(argType);
- } else {
- arg = this.parseGroup();
- }
- if (!arg) {
- if (!this.settings.throwOnError && this.nextToken.text[0] === "\\") {
- arg = new ParseFuncOrArgument(this.handleUnsupportedCmd(this.nextToken.text), false);
- } else {
- throw new _ParseError2.default("Expected group after '" + func + "'", nextToken);
- }
- }
- }
- var argNode = void 0;
- if (arg.isFunction) {
- var argGreediness = _functions2.default[arg.result].greediness;
- if (argGreediness > baseGreediness) {
- argNode = this.parseFunction(arg);
- } else {
- throw new _ParseError2.default("Got function '" + arg.result + "' as " + "argument to '" + func + "'", nextToken);
- }
- } else {
- argNode = arg.result;
- }
- args.push(argNode);
- positions.push(this.pos);
- }
-
- args.push(positions);
-
- return args;
- }
-
- /**
- * Parses a group when the mode is changing.
- *
- * @return {?ParseFuncOrArgument}
- */
-
- }, {
- key: "parseGroupOfType",
- value: function parseGroupOfType(innerMode, optional) {
- var outerMode = this.mode;
- // Handle `original` argTypes
- if (innerMode === "original") {
- innerMode = outerMode;
- }
-
- if (innerMode === "color") {
- return this.parseColorGroup(optional);
- }
- if (innerMode === "size") {
- return this.parseSizeGroup(optional);
- }
-
- this.switchMode(innerMode);
- if (innerMode === "text") {
- // text mode is special because it should ignore the whitespace before
- // it
- this.consumeSpaces();
- }
- // By the time we get here, innerMode is one of "text" or "math".
- // We switch the mode of the parser, recurse, then restore the old mode.
- var res = this.parseGroup(optional);
- this.switchMode(outerMode);
- return res;
- }
- }, {
- key: "consumeSpaces",
- value: function consumeSpaces() {
- while (this.nextToken.text === " ") {
- this.consume();
- }
- }
-
- /**
- * Parses a group, essentially returning the string formed by the
- * brace-enclosed tokens plus some position information.
- *
- * @param {string} modeName Used to describe the mode in error messages
- * @param {boolean=} optional Whether the group is optional or required
- */
-
- }, {
- key: "parseStringGroup",
- value: function parseStringGroup(modeName, optional) {
- if (optional && this.nextToken.text !== "[") {
- return null;
- }
- var outerMode = this.mode;
- this.mode = "text";
- this.expect(optional ? "[" : "{");
- var str = "";
- var firstToken = this.nextToken;
- var lastToken = firstToken;
- while (this.nextToken.text !== (optional ? "]" : "}")) {
- if (this.nextToken.text === "EOF") {
- throw new _ParseError2.default("Unexpected end of input in " + modeName, firstToken.range(this.nextToken, str));
- }
- lastToken = this.nextToken;
- str += lastToken.text;
- this.consume();
- }
- this.mode = outerMode;
- this.expect(optional ? "]" : "}");
- return firstToken.range(lastToken, str);
- }
-
- /**
- * Parses a regex-delimited group: the largest sequence of tokens
- * whose concatenated strings match `regex`. Returns the string
- * formed by the tokens plus some position information.
- *
- * @param {RegExp} regex
- * @param {string} modeName Used to describe the mode in error messages
- */
-
- }, {
- key: "parseRegexGroup",
- value: function parseRegexGroup(regex, modeName) {
- var outerMode = this.mode;
- this.mode = "text";
- var firstToken = this.nextToken;
- var lastToken = firstToken;
- var str = "";
- while (this.nextToken.text !== "EOF" && regex.test(str + this.nextToken.text)) {
- lastToken = this.nextToken;
- str += lastToken.text;
- this.consume();
- }
- if (str === "") {
- throw new _ParseError2.default("Invalid " + modeName + ": '" + firstToken.text + "'", firstToken);
- }
- this.mode = outerMode;
- return firstToken.range(lastToken, str);
- }
-
- /**
- * Parses a color description.
- */
-
- }, {
- key: "parseColorGroup",
- value: function parseColorGroup(optional) {
- var res = this.parseStringGroup("color", optional);
- if (!res) {
- return null;
- }
- var match = /^(#[a-z0-9]+|[a-z]+)$/i.exec(res.text);
- if (!match) {
- throw new _ParseError2.default("Invalid color: '" + res.text + "'", res);
- }
- return new ParseFuncOrArgument(new _ParseNode2.default("color", match[0], this.mode), false);
- }
-
- /**
- * Parses a size specification, consisting of magnitude and unit.
- */
-
- }, {
- key: "parseSizeGroup",
- value: function parseSizeGroup(optional) {
- var res = void 0;
- if (!optional && this.nextToken.text !== "{") {
- res = this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, "size");
- } else {
- res = this.parseStringGroup("size", optional);
- }
- if (!res) {
- return null;
- }
- var match = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(res.text);
- if (!match) {
- throw new _ParseError2.default("Invalid size: '" + res.text + "'", res);
- }
- var data = {
- number: +(match[1] + match[2]), // sign + magnitude, cast to number
- unit: match[3]
- };
- if (!_units2.default.validUnit(data)) {
- throw new _ParseError2.default("Invalid unit: '" + data.unit + "'", res);
- }
- return new ParseFuncOrArgument(new _ParseNode2.default("size", data, this.mode), false);
- }
-
- /**
- * If the argument is false or absent, this parses an ordinary group,
- * which is either a single nucleus (like "x") or an expression
- * in braces (like "{x+y}").
- * If the argument is true, it parses either a bracket-delimited expression
- * (like "[x+y]") or returns null to indicate the absence of a
- * bracket-enclosed group.
- *
- * @param {boolean=} optional Whether the group is optional or required
- * @return {?ParseFuncOrArgument}
- */
-
- }, {
- key: "parseGroup",
- value: function parseGroup(optional) {
- var firstToken = this.nextToken;
- // Try to parse an open brace
- if (this.nextToken.text === (optional ? "[" : "{")) {
- // If we get a brace, parse an expression
- this.consume();
- var expression = this.parseExpression(false, optional ? "]" : null);
- var lastToken = this.nextToken;
- // Make sure we get a close brace
- this.expect(optional ? "]" : "}");
- if (this.mode === "text") {
- this.formLigatures(expression);
- }
- return new ParseFuncOrArgument(new _ParseNode2.default("ordgroup", expression, this.mode, firstToken, lastToken), false);
- } else {
- // Otherwise, just return a nucleus, or nothing for an optional group
- return optional ? null : this.parseSymbol();
- }
- }
-
- /**
- * Form ligature-like combinations of characters for text mode.
- * This includes inputs like "--", "---", "``" and "''".
- * The result will simply replace multiple textord nodes with a single
- * character in each value by a single textord node having multiple
- * characters in its value. The representation is still ASCII source.
- *
- * @param {Array.} group the nodes of this group,
- * list will be moified in place
- */
-
- }, {
- key: "formLigatures",
- value: function formLigatures(group) {
- var n = group.length - 1;
- for (var i = 0; i < n; ++i) {
- var a = group[i];
- var v = a.value;
- if (v === "-" && group[i + 1].value === "-") {
- if (i + 1 < n && group[i + 2].value === "-") {
- group.splice(i, 3, new _ParseNode2.default("textord", "---", "text", a, group[i + 2]));
- n -= 2;
- } else {
- group.splice(i, 2, new _ParseNode2.default("textord", "--", "text", a, group[i + 1]));
- n -= 1;
- }
- }
- if ((v === "'" || v === "`") && group[i + 1].value === v) {
- group.splice(i, 2, new _ParseNode2.default("textord", v + v, "text", a, group[i + 1]));
- n -= 1;
- }
- }
- }
-
- /**
- * Parse a single symbol out of the string. Here, we handle both the functions
- * we have defined, as well as the single character symbols
- *
- * @return {?ParseFuncOrArgument}
- */
-
- }, {
- key: "parseSymbol",
- value: function parseSymbol() {
- var nucleus = this.nextToken;
-
- if (_functions2.default[nucleus.text]) {
- this.consume();
- // If there exists a function with this name, we return the function and
- // say that it is a function.
- return new ParseFuncOrArgument(nucleus.text, true, nucleus);
- } else if (_symbols2.default[this.mode][nucleus.text]) {
- this.consume();
- // Otherwise if this is a no-argument function, find the type it
- // corresponds to in the symbols map
- return new ParseFuncOrArgument(new _ParseNode2.default(_symbols2.default[this.mode][nucleus.text].group, nucleus.text, this.mode, nucleus), false, nucleus);
- } else if (this.mode === "text" && _unicodeRegexes.cjkRegex.test(nucleus.text)) {
- this.consume();
- return new ParseFuncOrArgument(new _ParseNode2.default("textord", nucleus.text, this.mode, nucleus), false, nucleus);
- } else if (nucleus.text === "$") {
- return new ParseFuncOrArgument(nucleus.text, false, nucleus);
- } else {
- return null;
- }
- }
- }]);
- return Parser;
- }();
-
- Parser.endOfExpression = ["}", "\\end", "\\right", "&", "\\\\", "\\cr"];
- Parser.SUPSUB_GREEDINESS = 1;
- Parser.sizeFuncs = ["\\tiny", "\\sixptsize", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge"];
- Parser.styleFuncs = ["\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle"];
- Parser.oldFontFuncs = {
- "\\rm": "mathrm",
- "\\sf": "mathsf",
- "\\tt": "mathtt",
- "\\bf": "mathbf",
- "\\it": "mathit"
- };
-
-
- Parser.prototype.ParseNode = _ParseNode2.default;
-
- module.exports = Parser;
-
- },{"./MacroExpander":27,"./ParseError":29,"./ParseNode":30,"./environments":40,"./functions":43,"./symbols":48,"./unicodeRegexes":49,"./units":50,"./utils":51,"babel-runtime/helpers/classCallCheck":4,"babel-runtime/helpers/createClass":5}],32:[function(require,module,exports){
-
- var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
-
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
- var _utils = require("./utils");
-
- var _utils2 = _interopRequireDefault(_utils);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- /**
- * The main Settings object
- *
- * The current options stored are:
- * - displayMode: Whether the expression should be typeset as inline math
- * (false, the default), meaning that the math starts in
- * \textstyle and is placed in an inline-block); or as display
- * math (true), meaning that the math starts in \displaystyle
- * and is placed in a block with vertical margin.
- */
- var Settings = function Settings(options) {
- (0, _classCallCheck3.default)(this, Settings);
-
- // allow null options
- options = options || {};
- this.displayMode = _utils2.default.deflt(options.displayMode, false);
- this.throwOnError = _utils2.default.deflt(options.throwOnError, true);
- this.errorColor = _utils2.default.deflt(options.errorColor, "#cc0000");
- this.macros = options.macros || {};
- this.colorIsTextColor = _utils2.default.deflt(options.colorIsTextColor, false);
- }; /**
- * This is a module for storing settings passed into KaTeX. It correctly handles
- * default settings.
- */
-
- module.exports = Settings;
-
- },{"./utils":51,"babel-runtime/helpers/classCallCheck":4}],33:[function(require,module,exports){
-
- var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
-
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
- var _createClass2 = require("babel-runtime/helpers/createClass");
-
- var _createClass3 = _interopRequireDefault(_createClass2);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- /**
- * This file contains information and classes for the various kinds of styles
- * used in TeX. It provides a generic `Style` class, which holds information
- * about a specific style. It then provides instances of all the different kinds
- * of styles possible, and provides functions to move between them and get
- * information about them.
- */
-
- /**
- * The main style class. Contains a unique id for the style, a size (which is
- * the same for cramped and uncramped version of a style), and a cramped flag.
- */
- var Style = function () {
- function Style(id, size, cramped) {
- (0, _classCallCheck3.default)(this, Style);
-
- this.id = id;
- this.size = size;
- this.cramped = cramped;
- }
-
- /**
- * Get the style of a superscript given a base in the current style.
- */
-
-
- (0, _createClass3.default)(Style, [{
- key: "sup",
- value: function sup() {
- return styles[_sup[this.id]];
- }
-
- /**
- * Get the style of a subscript given a base in the current style.
- */
-
- }, {
- key: "sub",
- value: function sub() {
- return styles[_sub[this.id]];
- }
-
- /**
- * Get the style of a fraction numerator given the fraction in the current
- * style.
- */
-
- }, {
- key: "fracNum",
- value: function fracNum() {
- return styles[_fracNum[this.id]];
- }
-
- /**
- * Get the style of a fraction denominator given the fraction in the current
- * style.
- */
-
- }, {
- key: "fracDen",
- value: function fracDen() {
- return styles[_fracDen[this.id]];
- }
-
- /**
- * Get the cramped version of a style (in particular, cramping a cramped style
- * doesn't change the style).
- */
-
- }, {
- key: "cramp",
- value: function cramp() {
- return styles[_cramp[this.id]];
- }
-
- /**
- * Get a text or display version of this style.
- */
-
- }, {
- key: "text",
- value: function text() {
- return styles[_text[this.id]];
- }
-
- /**
- * Return if this style is tightly spaced (scriptstyle/scriptscriptstyle)
- */
-
- }, {
- key: "isTight",
- value: function isTight() {
- return this.size >= 2;
- }
- }]);
- return Style;
- }();
-
- // IDs of the different styles
-
-
- var D = 0;
- var Dc = 1;
- var T = 2;
- var Tc = 3;
- var S = 4;
- var Sc = 5;
- var SS = 6;
- var SSc = 7;
-
- // Instances of the different styles
- var styles = [new Style(D, 0, false), new Style(Dc, 0, true), new Style(T, 1, false), new Style(Tc, 1, true), new Style(S, 2, false), new Style(Sc, 2, true), new Style(SS, 3, false), new Style(SSc, 3, true)];
-
- // Lookup tables for switching from one style to another
- var _sup = [S, Sc, S, Sc, SS, SSc, SS, SSc];
- var _sub = [Sc, Sc, Sc, Sc, SSc, SSc, SSc, SSc];
- var _fracNum = [T, Tc, S, Sc, SS, SSc, SS, SSc];
- var _fracDen = [Tc, Tc, Sc, Sc, SSc, SSc, SSc, SSc];
- var _cramp = [Dc, Dc, Tc, Tc, Sc, Sc, SSc, SSc];
- var _text = [D, Dc, T, Tc, T, Tc, T, Tc];
-
- // We only export some of the styles. Also, we don't export the `Style` class so
- // no more styles can be generated.
- module.exports = {
- DISPLAY: styles[D],
- TEXT: styles[T],
- SCRIPT: styles[S],
- SCRIPTSCRIPT: styles[SS]
- };
-
- },{"babel-runtime/helpers/classCallCheck":4,"babel-runtime/helpers/createClass":5}],34:[function(require,module,exports){
-
- var _domTree = require("./domTree");
-
- var _domTree2 = _interopRequireDefault(_domTree);
-
- var _fontMetrics = require("./fontMetrics");
-
- var _fontMetrics2 = _interopRequireDefault(_fontMetrics);
-
- var _symbols = require("./symbols");
-
- var _symbols2 = _interopRequireDefault(_symbols);
-
- var _utils = require("./utils");
-
- var _utils2 = _interopRequireDefault(_utils);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- // The following have to be loaded from Main-Italic font, using class mainit
- /* eslint no-console:0 */
- /**
- * This module contains general functions that can be used for building
- * different kinds of domTree nodes in a consistent manner.
- */
-
- var mainitLetters = ["\\imath", // dotless i
- "\\jmath", // dotless j
- "\\pounds"];
-
- /**
- * Looks up the given symbol in fontMetrics, after applying any symbol
- * replacements defined in symbol.js
- */
- var lookupSymbol = function lookupSymbol(value, fontFamily, mode) {
- // Replace the value with its replaced value from symbol.js
- if (_symbols2.default[mode][value] && _symbols2.default[mode][value].replace) {
- value = _symbols2.default[mode][value].replace;
- }
- return {
- value: value,
- metrics: _fontMetrics2.default.getCharacterMetrics(value, fontFamily)
- };
- };
-
- /**
- * Makes a symbolNode after translation via the list of symbols in symbols.js.
- * Correctly pulls out metrics for the character, and optionally takes a list of
- * classes to be attached to the node.
- *
- * TODO: make argument order closer to makeSpan
- * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which
- * should if present come first in `classes`.
- */
- var makeSymbol = function makeSymbol(value, fontFamily, mode, options, classes) {
- var lookup = lookupSymbol(value, fontFamily, mode);
- var metrics = lookup.metrics;
- value = lookup.value;
-
- var symbolNode = void 0;
- if (metrics) {
- var italic = metrics.italic;
- if (mode === "text") {
- italic = 0;
- }
- symbolNode = new _domTree2.default.symbolNode(value, metrics.height, metrics.depth, italic, metrics.skew, classes);
- } else {
- // TODO(emily): Figure out a good way to only print this in development
- typeof console !== "undefined" && console.warn("No character metrics for '" + value + "' in style '" + fontFamily + "'");
- symbolNode = new _domTree2.default.symbolNode(value, 0, 0, 0, 0, classes);
- }
-
- if (options) {
- symbolNode.maxFontSize = options.sizeMultiplier;
- if (options.style.isTight()) {
- symbolNode.classes.push("mtight");
- }
- if (options.getColor()) {
- symbolNode.style.color = options.getColor();
- }
- }
-
- return symbolNode;
- };
-
- /**
- * Makes a symbol in Main-Regular or AMS-Regular.
- * Used for rel, bin, open, close, inner, and punct.
- */
- var mathsym = function mathsym(value, mode, options, classes) {
- // Decide what font to render the symbol in by its entry in the symbols
- // table.
- // Have a special case for when the value = \ because the \ is used as a
- // textord in unsupported command errors but cannot be parsed as a regular
- // text ordinal and is therefore not present as a symbol in the symbols
- // table for text
- if (value === "\\" || _symbols2.default[mode][value].font === "main") {
- return makeSymbol(value, "Main-Regular", mode, options, classes);
- } else {
- return makeSymbol(value, "AMS-Regular", mode, options, classes.concat(["amsrm"]));
- }
- };
-
- /**
- * Makes a symbol in the default font for mathords and textords.
- */
- var mathDefault = function mathDefault(value, mode, options, classes, type) {
- if (type === "mathord") {
- var fontLookup = mathit(value);
- return makeSymbol(value, fontLookup.fontName, mode, options, classes.concat([fontLookup.fontClass]));
- } else if (type === "textord") {
- var font = _symbols2.default[mode][value] && _symbols2.default[mode][value].font;
- if (font === "ams") {
- return makeSymbol(value, "AMS-Regular", mode, options, classes.concat(["amsrm"]));
- } else {
- // if (font === "main") {
- return makeSymbol(value, "Main-Regular", mode, options, classes.concat(["mathrm"]));
- }
- } else {
- throw new Error("unexpected type: " + type + " in mathDefault");
- }
- };
-
- /**
- * Determines which of the two font names (Main-Italic and Math-Italic) and
- * corresponding style tags (mainit or mathit) to use for font "mathit",
- * depending on the symbol. Use this function instead of fontMap for font
- * "mathit".
- */
- var mathit = function mathit(value, mode, options, classes) {
- if (/[0-9]/.test(value.charAt(0)) ||
- // glyphs for \imath and \jmath do not exist in Math-Italic so we
- // need to use Main-Italic instead
- _utils2.default.contains(mainitLetters, value)) {
- return {
- fontName: "Main-Italic",
- fontClass: "mainit"
- };
- } else {
- return {
- fontName: "Math-Italic",
- fontClass: "mathit"
- };
- }
- };
-
- /**
- * Makes either a mathord or textord in the correct font and color.
- */
- var makeOrd = function makeOrd(group, options, type) {
- var mode = group.mode;
- var value = group.value;
-
- var classes = ["mord"];
-
- var font = options.font;
- if (font) {
- var fontLookup = void 0;
- if (font === "mathit" || _utils2.default.contains(mainitLetters, value)) {
- fontLookup = mathit(value);
- } else {
- fontLookup = fontMap[font];
- }
- if (lookupSymbol(value, fontLookup.fontName, mode).metrics) {
- return makeSymbol(value, fontLookup.fontName, mode, options, classes.concat([fontLookup.fontClass || font]));
- } else {
- return mathDefault(value, mode, options, classes, type);
- }
- } else {
- return mathDefault(value, mode, options, classes, type);
- }
- };
-
- /**
- * Calculate the height, depth, and maxFontSize of an element based on its
- * children.
- */
- var sizeElementFromChildren = function sizeElementFromChildren(elem) {
- var height = 0;
- var depth = 0;
- var maxFontSize = 0;
-
- if (elem.children) {
- for (var i = 0; i < elem.children.length; i++) {
- if (elem.children[i].height > height) {
- height = elem.children[i].height;
- }
- if (elem.children[i].depth > depth) {
- depth = elem.children[i].depth;
- }
- if (elem.children[i].maxFontSize > maxFontSize) {
- maxFontSize = elem.children[i].maxFontSize;
- }
- }
- }
-
- elem.height = height;
- elem.depth = depth;
- elem.maxFontSize = maxFontSize;
- };
-
- /**
- * Makes a span with the given list of classes, list of children, and options.
- *
- * TODO: Ensure that `options` is always provided (currently some call sites
- * don't pass it).
- * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which
- * should if present come first in `classes`.
- */
- var makeSpan = function makeSpan(classes, children, options) {
- var span = new _domTree2.default.span(classes, children, options);
-
- sizeElementFromChildren(span);
-
- return span;
- };
-
- /**
- * Prepends the given children to the given span, updating height, depth, and
- * maxFontSize.
- */
- var prependChildren = function prependChildren(span, children) {
- span.children = children.concat(span.children);
-
- sizeElementFromChildren(span);
- };
-
- /**
- * Makes a document fragment with the given list of children.
- */
- var makeFragment = function makeFragment(children) {
- var fragment = new _domTree2.default.documentFragment(children);
-
- sizeElementFromChildren(fragment);
-
- return fragment;
- };
-
- /**
- * Makes a vertical list by stacking elements and kerns on top of each other.
- * Allows for many different ways of specifying the positioning method.
- *
- * Arguments:
- * - children: A list of child or kern nodes to be stacked on top of each other
- * (i.e. the first element will be at the bottom, and the last at
- * the top). Element nodes are specified as
- * {type: "elem", elem: node}
- * while kern nodes are specified as
- * {type: "kern", size: size}
- * - positionType: The method by which the vlist should be positioned. Valid
- * values are:
- * - "individualShift": The children list only contains elem
- * nodes, and each node contains an extra
- * "shift" value of how much it should be
- * shifted (note that shifting is always
- * moving downwards). positionData is
- * ignored.
- * - "top": The positionData specifies the topmost point of
- * the vlist (note this is expected to be a height,
- * so positive values move up)
- * - "bottom": The positionData specifies the bottommost point
- * of the vlist (note this is expected to be a
- * depth, so positive values move down
- * - "shift": The vlist will be positioned such that its
- * baseline is positionData away from the baseline
- * of the first child. Positive values move
- * downwards.
- * - "firstBaseline": The vlist will be positioned such that
- * its baseline is aligned with the
- * baseline of the first child.
- * positionData is ignored. (this is
- * equivalent to "shift" with
- * positionData=0)
- * - positionData: Data used in different ways depending on positionType
- * - options: An Options object
- *
- */
- var makeVList = function makeVList(children, positionType, positionData, options) {
- var depth = void 0;
- var currPos = void 0;
- var i = void 0;
- if (positionType === "individualShift") {
- var oldChildren = children;
- children = [oldChildren[0]];
-
- // Add in kerns to the list of children to get each element to be
- // shifted to the correct specified shift
- depth = -oldChildren[0].shift - oldChildren[0].elem.depth;
- currPos = depth;
- for (i = 1; i < oldChildren.length; i++) {
- var diff = -oldChildren[i].shift - currPos - oldChildren[i].elem.depth;
- var size = diff - (oldChildren[i - 1].elem.height + oldChildren[i - 1].elem.depth);
-
- currPos = currPos + diff;
-
- children.push({ type: "kern", size: size });
- children.push(oldChildren[i]);
- }
- } else if (positionType === "top") {
- // We always start at the bottom, so calculate the bottom by adding up
- // all the sizes
- var bottom = positionData;
- for (i = 0; i < children.length; i++) {
- if (children[i].type === "kern") {
- bottom -= children[i].size;
- } else {
- bottom -= children[i].elem.height + children[i].elem.depth;
- }
- }
- depth = bottom;
- } else if (positionType === "bottom") {
- depth = -positionData;
- } else if (positionType === "shift") {
- depth = -children[0].elem.depth - positionData;
- } else if (positionType === "firstBaseline") {
- depth = -children[0].elem.depth;
- } else {
- depth = 0;
- }
-
- // Create a strut that is taller than any list item. The strut is added to
- // each item, where it will determine the item's baseline. Since it has
- // `overflow:hidden`, the strut's top edge will sit on the item's line box's
- // top edge and the strut's bottom edge will sit on the item's baseline,
- // with no additional line-height spacing. This allows the item baseline to
- // be positioned precisely without worrying about font ascent and
- // line-height.
- var pstrutSize = 0;
- for (i = 0; i < children.length; i++) {
- if (children[i].type === "elem") {
- var child = children[i].elem;
- pstrutSize = Math.max(pstrutSize, child.maxFontSize, child.height);
- }
- }
- pstrutSize += 2;
- var pstrut = makeSpan(["pstrut"], []);
- pstrut.style.height = pstrutSize + "em";
-
- // Create a new list of actual children at the correct offsets
- var realChildren = [];
- var minPos = depth;
- var maxPos = depth;
- currPos = depth;
- for (i = 0; i < children.length; i++) {
- if (children[i].type === "kern") {
- currPos += children[i].size;
- } else {
- var _child = children[i].elem;
-
- var childWrap = makeSpan([], [pstrut, _child]);
- childWrap.style.top = -pstrutSize - currPos - _child.depth + "em";
- if (children[i].marginLeft) {
- childWrap.style.marginLeft = children[i].marginLeft;
- }
- if (children[i].marginRight) {
- childWrap.style.marginRight = children[i].marginRight;
- }
-
- realChildren.push(childWrap);
- currPos += _child.height + _child.depth;
- }
- minPos = Math.min(minPos, currPos);
- maxPos = Math.max(maxPos, currPos);
- }
-
- // The vlist contents go in a table-cell with `vertical-align:bottom`.
- // This cell's bottom edge will determine the containing table's baseline
- // without overly expanding the containing line-box.
- var vlist = makeSpan(["vlist"], realChildren);
- vlist.style.height = maxPos + "em";
-
- // A second row is used if necessary to represent the vlist's depth.
- var rows = void 0;
- if (minPos < 0) {
- var depthStrut = makeSpan(["vlist"], []);
- depthStrut.style.height = -minPos + "em";
-
- // Safari wants the first row to have inline content; otherwise it
- // puts the bottom of the *second* row on the baseline.
- var topStrut = makeSpan(["vlist-s"], [new _domTree2.default.symbolNode("\u200B")]);
-
- rows = [makeSpan(["vlist-r"], [vlist, topStrut]), makeSpan(["vlist-r"], [depthStrut])];
- } else {
- rows = [makeSpan(["vlist-r"], [vlist])];
- }
-
- var vtable = makeSpan(["vlist-t"], rows);
- if (rows.length === 2) {
- vtable.classes.push("vlist-t2");
- }
- vtable.height = maxPos;
- vtable.depth = -minPos;
- return vtable;
- };
-
- // A map of spacing functions to their attributes, like size and corresponding
- // CSS class
- var spacingFunctions = {
- "\\qquad": {
- size: "2em",
- className: "qquad"
- },
- "\\quad": {
- size: "1em",
- className: "quad"
- },
- "\\enspace": {
- size: "0.5em",
- className: "enspace"
- },
- "\\;": {
- size: "0.277778em",
- className: "thickspace"
- },
- "\\:": {
- size: "0.22222em",
- className: "mediumspace"
- },
- "\\,": {
- size: "0.16667em",
- className: "thinspace"
- },
- "\\!": {
- size: "-0.16667em",
- className: "negativethinspace"
- }
- };
-
- /**
- * Maps TeX font commands to objects containing:
- * - variant: string used for "mathvariant" attribute in buildMathML.js
- * - fontName: the "style" parameter to fontMetrics.getCharacterMetrics
- */
- // A map between tex font commands an MathML mathvariant attribute values
- var fontMap = {
- // styles
- "mathbf": {
- variant: "bold",
- fontName: "Main-Bold"
- },
- "mathrm": {
- variant: "normal",
- fontName: "Main-Regular"
- },
- "textit": {
- variant: "italic",
- fontName: "Main-Italic"
- },
-
- // "mathit" is missing because it requires the use of two fonts: Main-Italic
- // and Math-Italic. This is handled by a special case in makeOrd which ends
- // up calling mathit.
-
- // families
- "mathbb": {
- variant: "double-struck",
- fontName: "AMS-Regular"
- },
- "mathcal": {
- variant: "script",
- fontName: "Caligraphic-Regular"
- },
- "mathfrak": {
- variant: "fraktur",
- fontName: "Fraktur-Regular"
- },
- "mathscr": {
- variant: "script",
- fontName: "Script-Regular"
- },
- "mathsf": {
- variant: "sans-serif",
- fontName: "SansSerif-Regular"
- },
- "mathtt": {
- variant: "monospace",
- fontName: "Typewriter-Regular"
- }
- };
-
- module.exports = {
- fontMap: fontMap,
- makeSymbol: makeSymbol,
- mathsym: mathsym,
- makeSpan: makeSpan,
- makeFragment: makeFragment,
- makeVList: makeVList,
- makeOrd: makeOrd,
- prependChildren: prependChildren,
- spacingFunctions: spacingFunctions
- };
-
- },{"./domTree":39,"./fontMetrics":41,"./symbols":48,"./utils":51}],35:[function(require,module,exports){
-
- var _stringify = require("babel-runtime/core-js/json/stringify");
-
- var _stringify2 = _interopRequireDefault(_stringify);
-
- var _ParseError = require("./ParseError");
-
- var _ParseError2 = _interopRequireDefault(_ParseError);
-
- var _Style = require("./Style");
-
- var _Style2 = _interopRequireDefault(_Style);
-
- var _buildCommon = require("./buildCommon");
-
- var _buildCommon2 = _interopRequireDefault(_buildCommon);
-
- var _delimiter = require("./delimiter");
-
- var _delimiter2 = _interopRequireDefault(_delimiter);
-
- var _domTree = require("./domTree");
-
- var _domTree2 = _interopRequireDefault(_domTree);
-
- var _units = require("./units");
-
- var _units2 = _interopRequireDefault(_units);
-
- var _utils = require("./utils");
-
- var _utils2 = _interopRequireDefault(_utils);
-
- var _stretchy = require("./stretchy");
-
- var _stretchy2 = _interopRequireDefault(_stretchy);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- /* eslint no-console:0 */
- /**
- * This file does the main work of building a domTree structure from a parse
- * tree. The entry point is the `buildHTML` function, which takes a parse tree.
- * Then, the buildExpression, buildGroup, and various groupTypes functions are
- * called, to produce a final HTML tree.
- */
-
- var isSpace = function isSpace(node) {
- return node instanceof _domTree2.default.span && node.classes[0] === "mspace";
- };
-
- // Binary atoms (first class `mbin`) change into ordinary atoms (`mord`)
- // depending on their surroundings. See TeXbook pg. 442-446, Rules 5 and 6,
- // and the text before Rule 19.
- var isBin = function isBin(node) {
- return node && node.classes[0] === "mbin";
- };
-
- var isBinLeftCanceller = function isBinLeftCanceller(node, isRealGroup) {
- // TODO: This code assumes that a node's math class is the first element
- // of its `classes` array. A later cleanup should ensure this, for
- // instance by changing the signature of `makeSpan`.
- if (node) {
- return _utils2.default.contains(["mbin", "mopen", "mrel", "mop", "mpunct"], node.classes[0]);
- } else {
- return isRealGroup;
- }
- };
-
- var isBinRightCanceller = function isBinRightCanceller(node, isRealGroup) {
- if (node) {
- return _utils2.default.contains(["mrel", "mclose", "mpunct"], node.classes[0]);
- } else {
- return isRealGroup;
- }
- };
-
- /**
- * Splice out any spaces from `children` starting at position `i`, and return
- * the spliced-out array. Returns null if `children[i]` does not exist or is not
- * a space.
- */
- var spliceSpaces = function spliceSpaces(children, i) {
- var j = i;
- while (j < children.length && isSpace(children[j])) {
- j++;
- }
- if (j === i) {
- return null;
- } else {
- return children.splice(i, j - i);
- }
- };
-
- /**
- * Take a list of nodes, build them in order, and return a list of the built
- * nodes. documentFragments are flattened into their contents, so the
- * returned list contains no fragments. `isRealGroup` is true if `expression`
- * is a real group (no atoms will be added on either side), as opposed to
- * a partial group (e.g. one created by \color).
- */
- var buildExpression = function buildExpression(expression, options, isRealGroup) {
- // Parse expressions into `groups`.
- var groups = [];
- for (var i = 0; i < expression.length; i++) {
- var group = expression[i];
- var output = buildGroup(group, options);
- if (output instanceof _domTree2.default.documentFragment) {
- Array.prototype.push.apply(groups, output.children);
- } else {
- groups.push(output);
- }
- }
- // At this point `groups` consists entirely of `symbolNode`s and `span`s.
-
- // Explicit spaces (e.g., \;, \,) should be ignored with respect to atom
- // spacing (e.g., "add thick space between mord and mrel"). Since CSS
- // adjacency rules implement atom spacing, spaces should be invisible to
- // CSS. So we splice them out of `groups` and into the atoms themselves.
- for (var _i = 0; _i < groups.length; _i++) {
- var spaces = spliceSpaces(groups, _i);
- if (spaces) {
- // Splicing of spaces may have removed all remaining groups.
- if (_i < groups.length) {
- // If there is a following group, move space within it.
- if (groups[_i] instanceof _domTree2.default.symbolNode) {
- groups[_i] = (0, _buildCommon.makeSpan)([].concat(groups[_i].classes), [groups[_i]]);
- }
- _buildCommon2.default.prependChildren(groups[_i], spaces);
- } else {
- // Otherwise, put any spaces back at the end of the groups.
- Array.prototype.push.apply(groups, spaces);
- break;
- }
- }
- }
-
- // Binary operators change to ordinary symbols in some contexts.
- for (var _i2 = 0; _i2 < groups.length; _i2++) {
- if (isBin(groups[_i2]) && (isBinLeftCanceller(groups[_i2 - 1], isRealGroup) || isBinRightCanceller(groups[_i2 + 1], isRealGroup))) {
- groups[_i2].classes[0] = "mord";
- }
- }
-
- // Process \\not commands within the group.
- // TODO(kevinb): Handle multiple \\not commands in a row.
- // TODO(kevinb): Handle \\not{abc} correctly. The \\not should appear over
- // the 'a' instead of the 'c'.
- for (var _i3 = 0; _i3 < groups.length; _i3++) {
- if (groups[_i3].value === "\u0338" && _i3 + 1 < groups.length) {
- var children = groups.slice(_i3, _i3 + 2);
-
- children[0].classes = ["mainrm"];
- // \u0338 is a combining glyph so we could reorder the children so
- // that it comes after the other glyph. This works correctly on
- // most browsers except for Safari. Instead we absolutely position
- // the glyph and set its right side to match that of the other
- // glyph which is visually equivalent.
- children[0].style.position = "absolute";
- children[0].style.right = "0";
-
- // Copy the classes from the second glyph to the new container.
- // This is so it behaves the same as though there was no \\not.
- var classes = groups[_i3 + 1].classes;
- var container = (0, _buildCommon.makeSpan)(classes, children);
-
- // LaTeX adds a space between ords separated by a \\not.
- if (classes.indexOf("mord") !== -1) {
- // \glue(\thickmuskip) 2.77771 plus 2.77771
- container.style.paddingLeft = "0.277771em";
- }
-
- // Ensure that the \u0338 is positioned relative to the container.
- container.style.position = "relative";
- groups.splice(_i3, 2, container);
- }
- }
-
- return groups;
- };
-
- // Return math atom class (mclass) of a domTree.
- var getTypeOfDomTree = function getTypeOfDomTree(node) {
- if (node instanceof _domTree2.default.documentFragment) {
- if (node.children.length) {
- return getTypeOfDomTree(node.children[node.children.length - 1]);
- }
- } else {
- if (_utils2.default.contains(["mord", "mop", "mbin", "mrel", "mopen", "mclose", "mpunct", "minner"], node.classes[0])) {
- return node.classes[0];
- }
- }
- return null;
- };
-
- /**
- * Sometimes, groups perform special rules when they have superscripts or
- * subscripts attached to them. This function lets the `supsub` group know that
- * its inner element should handle the superscripts and subscripts instead of
- * handling them itself.
- */
- var shouldHandleSupSub = function shouldHandleSupSub(group, options) {
- if (!group.value.base) {
- return false;
- } else {
- var base = group.value.base;
- if (base.type === "op") {
- // Operators handle supsubs differently when they have limits
- // (e.g. `\displaystyle\sum_2^3`)
- return base.value.limits && (options.style.size === _Style2.default.DISPLAY.size || base.value.alwaysHandleSupSub);
- } else if (base.type === "accent") {
- return isCharacterBox(base.value.base);
- } else if (base.type === "horizBrace") {
- var isSup = group.value.sub ? false : true;
- return isSup === base.value.isOver;
- } else {
- return null;
- }
- }
- };
-
- /**
- * Sometimes we want to pull out the innermost element of a group. In most
- * cases, this will just be the group itself, but when ordgroups and colors have
- * a single element, we want to pull that out.
- */
- var getBaseElem = function getBaseElem(group) {
- if (!group) {
- return false;
- } else if (group.type === "ordgroup") {
- if (group.value.length === 1) {
- return getBaseElem(group.value[0]);
- } else {
- return group;
- }
- } else if (group.type === "color") {
- if (group.value.value.length === 1) {
- return getBaseElem(group.value.value[0]);
- } else {
- return group;
- }
- } else if (group.type === "font") {
- return getBaseElem(group.value.body);
- } else {
- return group;
- }
- };
-
- /**
- * TeXbook algorithms often reference "character boxes", which are simply groups
- * with a single character in them. To decide if something is a character box,
- * we find its innermost group, and see if it is a single character.
- */
- var isCharacterBox = function isCharacterBox(group) {
- var baseElem = getBaseElem(group);
-
- // These are all they types of groups which hold single characters
- return baseElem.type === "mathord" || baseElem.type === "textord" || baseElem.type === "bin" || baseElem.type === "rel" || baseElem.type === "inner" || baseElem.type === "open" || baseElem.type === "close" || baseElem.type === "punct";
- };
-
- var makeNullDelimiter = function makeNullDelimiter(options, classes) {
- var moreClasses = ["nulldelimiter"].concat(options.baseSizingClasses());
- return (0, _buildCommon.makeSpan)(classes.concat(moreClasses));
- };
-
- /**
- * This is a map of group types to the function used to handle that type.
- * Simpler types come at the beginning, while complicated types come afterwards.
- */
- var groupTypes = {};
-
- groupTypes.mathord = function (group, options) {
- return _buildCommon2.default.makeOrd(group, options, "mathord");
- };
-
- groupTypes.textord = function (group, options) {
- return _buildCommon2.default.makeOrd(group, options, "textord");
- };
-
- groupTypes.bin = function (group, options) {
- return _buildCommon2.default.mathsym(group.value, group.mode, options, ["mbin"]);
- };
-
- groupTypes.rel = function (group, options) {
- return _buildCommon2.default.mathsym(group.value, group.mode, options, ["mrel"]);
- };
-
- groupTypes.open = function (group, options) {
- return _buildCommon2.default.mathsym(group.value, group.mode, options, ["mopen"]);
- };
-
- groupTypes.close = function (group, options) {
- return _buildCommon2.default.mathsym(group.value, group.mode, options, ["mclose"]);
- };
-
- groupTypes.inner = function (group, options) {
- return _buildCommon2.default.mathsym(group.value, group.mode, options, ["minner"]);
- };
-
- groupTypes.punct = function (group, options) {
- return _buildCommon2.default.mathsym(group.value, group.mode, options, ["mpunct"]);
- };
-
- groupTypes.ordgroup = function (group, options) {
- return (0, _buildCommon.makeSpan)(["mord"], buildExpression(group.value, options, true), options);
- };
-
- groupTypes.text = function (group, options) {
- var newOptions = options.withFont(group.value.style);
- var inner = buildExpression(group.value.body, newOptions, true);
- for (var i = 0; i < inner.length - 1; i++) {
- if (inner[i].tryCombine(inner[i + 1])) {
- inner.splice(i + 1, 1);
- i--;
- }
- }
- return (0, _buildCommon.makeSpan)(["mord", "text"], inner, newOptions);
- };
-
- groupTypes.color = function (group, options) {
- var elements = buildExpression(group.value.value, options.withColor(group.value.color), false);
-
- // \color isn't supposed to affect the type of the elements it contains.
- // To accomplish this, we wrap the results in a fragment, so the inner
- // elements will be able to directly interact with their neighbors. For
- // example, `\color{red}{2 +} 3` has the same spacing as `2 + 3`
- return new _buildCommon2.default.makeFragment(elements);
- };
-
- groupTypes.supsub = function (group, options) {
- // Superscript and subscripts are handled in the TeXbook on page
- // 445-446, rules 18(a-f).
-
- // Here is where we defer to the inner group if it should handle
- // superscripts and subscripts itself.
- if (shouldHandleSupSub(group, options)) {
- return groupTypes[group.value.base.type](group, options);
- }
-
- var base = buildGroup(group.value.base, options);
- var supm = void 0;
- var subm = void 0;
-
- var metrics = options.fontMetrics();
- var newOptions = void 0;
-
- // Rule 18a
- var supShift = 0;
- var subShift = 0;
-
- if (group.value.sup) {
- newOptions = options.havingStyle(options.style.sup());
- supm = buildGroup(group.value.sup, newOptions, options);
- if (!isCharacterBox(group.value.base)) {
- supShift = base.height - newOptions.fontMetrics().supDrop * newOptions.sizeMultiplier / options.sizeMultiplier;
- }
- }
-
- if (group.value.sub) {
- newOptions = options.havingStyle(options.style.sub());
- subm = buildGroup(group.value.sub, newOptions, options);
- if (!isCharacterBox(group.value.base)) {
- subShift = base.depth + newOptions.fontMetrics().subDrop * newOptions.sizeMultiplier / options.sizeMultiplier;
- }
- }
-
- // Rule 18c
- var minSupShift = void 0;
- if (options.style === _Style2.default.DISPLAY) {
- minSupShift = metrics.sup1;
- } else if (options.style.cramped) {
- minSupShift = metrics.sup3;
- } else {
- minSupShift = metrics.sup2;
- }
-
- // scriptspace is a font-size-independent size, so scale it
- // appropriately
- var multiplier = options.sizeMultiplier;
- var scriptspace = 0.5 / metrics.ptPerEm / multiplier + "em";
-
- var supsub = void 0;
- if (!group.value.sup) {
- // Rule 18b
- subShift = Math.max(subShift, metrics.sub1, subm.height - 0.8 * metrics.xHeight);
-
- var vlistElem = [{ type: "elem", elem: subm, marginRight: scriptspace }];
- // Subscripts shouldn't be shifted by the base's italic correction.
- // Account for that by shifting the subscript back the appropriate
- // amount. Note we only do this when the base is a single symbol.
- if (base instanceof _domTree2.default.symbolNode) {
- vlistElem[0].marginLeft = -base.italic + "em";
- }
-
- supsub = _buildCommon2.default.makeVList(vlistElem, "shift", subShift, options);
- } else if (!group.value.sub) {
- // Rule 18c, d
- supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight);
-
- supsub = _buildCommon2.default.makeVList([{ type: "elem", elem: supm, marginRight: scriptspace }], "shift", -supShift, options);
- } else {
- supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight);
- subShift = Math.max(subShift, metrics.sub2);
-
- var ruleWidth = metrics.defaultRuleThickness;
-
- // Rule 18e
- if (supShift - supm.depth - (subm.height - subShift) < 4 * ruleWidth) {
- subShift = 4 * ruleWidth - (supShift - supm.depth) + subm.height;
- var psi = 0.8 * metrics.xHeight - (supShift - supm.depth);
- if (psi > 0) {
- supShift += psi;
- subShift -= psi;
- }
- }
-
- var _vlistElem = [{ type: "elem", elem: subm, shift: subShift, marginRight: scriptspace }, { type: "elem", elem: supm, shift: -supShift, marginRight: scriptspace }];
- // See comment above about subscripts not being shifted
- if (base instanceof _domTree2.default.symbolNode) {
- _vlistElem[0].marginLeft = -base.italic + "em";
- }
-
- supsub = _buildCommon2.default.makeVList(_vlistElem, "individualShift", null, options);
- }
-
- // We ensure to wrap the supsub vlist in a span.msupsub to reset text-align
- var mclass = getTypeOfDomTree(base) || "mord";
- return (0, _buildCommon.makeSpan)([mclass], [base, (0, _buildCommon.makeSpan)(["msupsub"], [supsub])], options);
- };
-
- groupTypes.genfrac = function (group, options) {
- // Fractions are handled in the TeXbook on pages 444-445, rules 15(a-e).
- // Figure out what style this fraction should be in based on the
- // function used
- var style = options.style;
- if (group.value.size === "display") {
- style = _Style2.default.DISPLAY;
- } else if (group.value.size === "text") {
- style = _Style2.default.TEXT;
- }
-
- var nstyle = style.fracNum();
- var dstyle = style.fracDen();
- var newOptions = void 0;
-
- newOptions = options.havingStyle(nstyle);
- var numerm = buildGroup(group.value.numer, newOptions, options);
-
- newOptions = options.havingStyle(dstyle);
- var denomm = buildGroup(group.value.denom, newOptions, options);
-
- var rule = void 0;
- var ruleWidth = void 0;
- var ruleSpacing = void 0;
- if (group.value.hasBarLine) {
- rule = makeLineSpan("frac-line", options);
- ruleWidth = rule.height;
- ruleSpacing = rule.height;
- } else {
- rule = null;
- ruleWidth = 0;
- ruleSpacing = options.fontMetrics().defaultRuleThickness;
- }
-
- // Rule 15b
- var numShift = void 0;
- var clearance = void 0;
- var denomShift = void 0;
- if (style.size === _Style2.default.DISPLAY.size) {
- numShift = options.fontMetrics().num1;
- if (ruleWidth > 0) {
- clearance = 3 * ruleSpacing;
- } else {
- clearance = 7 * ruleSpacing;
- }
- denomShift = options.fontMetrics().denom1;
- } else {
- if (ruleWidth > 0) {
- numShift = options.fontMetrics().num2;
- clearance = ruleSpacing;
- } else {
- numShift = options.fontMetrics().num3;
- clearance = 3 * ruleSpacing;
- }
- denomShift = options.fontMetrics().denom2;
- }
-
- var frac = void 0;
- if (ruleWidth === 0) {
- // Rule 15c
- var candidateClearance = numShift - numerm.depth - (denomm.height - denomShift);
- if (candidateClearance < clearance) {
- numShift += 0.5 * (clearance - candidateClearance);
- denomShift += 0.5 * (clearance - candidateClearance);
- }
-
- frac = _buildCommon2.default.makeVList([{ type: "elem", elem: denomm, shift: denomShift }, { type: "elem", elem: numerm, shift: -numShift }], "individualShift", null, options);
- } else {
- // Rule 15d
- var axisHeight = options.fontMetrics().axisHeight;
-
- if (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth) < clearance) {
- numShift += clearance - (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth));
- }
-
- if (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift) < clearance) {
- denomShift += clearance - (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift));
- }
-
- var midShift = -(axisHeight - 0.5 * ruleWidth);
-
- frac = _buildCommon2.default.makeVList([{ type: "elem", elem: denomm, shift: denomShift }, { type: "elem", elem: rule, shift: midShift }, { type: "elem", elem: numerm, shift: -numShift }], "individualShift", null, options);
- }
-
- // Since we manually change the style sometimes (with \dfrac or \tfrac),
- // account for the possible size change here.
- newOptions = options.havingStyle(style);
- frac.height *= newOptions.sizeMultiplier / options.sizeMultiplier;
- frac.depth *= newOptions.sizeMultiplier / options.sizeMultiplier;
-
- // Rule 15e
- var delimSize = void 0;
- if (style.size === _Style2.default.DISPLAY.size) {
- delimSize = options.fontMetrics().delim1;
- } else {
- delimSize = options.fontMetrics().delim2;
- }
-
- var leftDelim = void 0;
- var rightDelim = void 0;
- if (group.value.leftDelim == null) {
- leftDelim = makeNullDelimiter(options, ["mopen"]);
- } else {
- leftDelim = _delimiter2.default.customSizedDelim(group.value.leftDelim, delimSize, true, options.havingStyle(style), group.mode, ["mopen"]);
- }
- if (group.value.rightDelim == null) {
- rightDelim = makeNullDelimiter(options, ["mclose"]);
- } else {
- rightDelim = _delimiter2.default.customSizedDelim(group.value.rightDelim, delimSize, true, options.havingStyle(style), group.mode, ["mclose"]);
- }
-
- return (0, _buildCommon.makeSpan)(["mord"].concat(newOptions.sizingClasses(options)), [leftDelim, (0, _buildCommon.makeSpan)(["mfrac"], [frac]), rightDelim], options);
- };
-
- groupTypes.array = function (group, options) {
- var r = void 0;
- var c = void 0;
- var nr = group.value.body.length;
- var nc = 0;
- var body = new Array(nr);
-
- // Horizontal spacing
- var pt = 1 / options.fontMetrics().ptPerEm;
- var arraycolsep = 5 * pt; // \arraycolsep in article.cls
-
- // Vertical spacing
- var baselineskip = 12 * pt; // see size10.clo
- // Default \jot from ltmath.dtx
- // TODO(edemaine): allow overriding \jot via \setlength (#687)
- var jot = 3 * pt;
- // Default \arraystretch from lttab.dtx
- // TODO(gagern): may get redefined once we have user-defined macros
- var arraystretch = _utils2.default.deflt(group.value.arraystretch, 1);
- var arrayskip = arraystretch * baselineskip;
- var arstrutHeight = 0.7 * arrayskip; // \strutbox in ltfsstrc.dtx and
- var arstrutDepth = 0.3 * arrayskip; // \@arstrutbox in lttab.dtx
-
- var totalHeight = 0;
- for (r = 0; r < group.value.body.length; ++r) {
- var inrow = group.value.body[r];
- var height = arstrutHeight; // \@array adds an \@arstrut
- var depth = arstrutDepth; // to each tow (via the template)
-
- if (nc < inrow.length) {
- nc = inrow.length;
- }
-
- var outrow = new Array(inrow.length);
- for (c = 0; c < inrow.length; ++c) {
- var elt = buildGroup(inrow[c], options);
- if (depth < elt.depth) {
- depth = elt.depth;
- }
- if (height < elt.height) {
- height = elt.height;
- }
- outrow[c] = elt;
- }
-
- var gap = 0;
- if (group.value.rowGaps[r]) {
- gap = _units2.default.calculateSize(group.value.rowGaps[r].value, options);
- if (gap > 0) {
- // \@argarraycr
- gap += arstrutDepth;
- if (depth < gap) {
- depth = gap; // \@xargarraycr
- }
- gap = 0;
- }
- }
- // In AMS multiline environments such as aligned and gathered, rows
- // correspond to lines that have additional \jot added to the
- // \baselineskip via \openup.
- if (group.value.addJot) {
- depth += jot;
- }
-
- outrow.height = height;
- outrow.depth = depth;
- totalHeight += height;
- outrow.pos = totalHeight;
- totalHeight += depth + gap; // \@yargarraycr
- body[r] = outrow;
- }
-
- var offset = totalHeight / 2 + options.fontMetrics().axisHeight;
- var colDescriptions = group.value.cols || [];
- var cols = [];
- var colSep = void 0;
- var colDescrNum = void 0;
- for (c = 0, colDescrNum = 0;
- // Continue while either there are more columns or more column
- // descriptions, so trailing separators don't get lost.
- c < nc || colDescrNum < colDescriptions.length; ++c, ++colDescrNum) {
-
- var colDescr = colDescriptions[colDescrNum] || {};
-
- var firstSeparator = true;
- while (colDescr.type === "separator") {
- // If there is more than one separator in a row, add a space
- // between them.
- if (!firstSeparator) {
- colSep = (0, _buildCommon.makeSpan)(["arraycolsep"], []);
- colSep.style.width = options.fontMetrics().doubleRuleSep + "em";
- cols.push(colSep);
- }
-
- if (colDescr.separator === "|") {
- var separator = (0, _buildCommon.makeSpan)(["vertical-separator"], []);
- separator.style.height = totalHeight + "em";
- separator.style.verticalAlign = -(totalHeight - offset) + "em";
-
- cols.push(separator);
- } else {
- throw new _ParseError2.default("Invalid separator type: " + colDescr.separator);
- }
-
- colDescrNum++;
- colDescr = colDescriptions[colDescrNum] || {};
- firstSeparator = false;
- }
-
- if (c >= nc) {
- continue;
- }
-
- var sepwidth = void 0;
- if (c > 0 || group.value.hskipBeforeAndAfter) {
- sepwidth = _utils2.default.deflt(colDescr.pregap, arraycolsep);
- if (sepwidth !== 0) {
- colSep = (0, _buildCommon.makeSpan)(["arraycolsep"], []);
- colSep.style.width = sepwidth + "em";
- cols.push(colSep);
- }
- }
-
- var col = [];
- for (r = 0; r < nr; ++r) {
- var row = body[r];
- var elem = row[c];
- if (!elem) {
- continue;
- }
- var shift = row.pos - offset;
- elem.depth = row.depth;
- elem.height = row.height;
- col.push({ type: "elem", elem: elem, shift: shift });
- }
-
- col = _buildCommon2.default.makeVList(col, "individualShift", null, options);
- col = (0, _buildCommon.makeSpan)(["col-align-" + (colDescr.align || "c")], [col]);
- cols.push(col);
-
- if (c < nc - 1 || group.value.hskipBeforeAndAfter) {
- sepwidth = _utils2.default.deflt(colDescr.postgap, arraycolsep);
- if (sepwidth !== 0) {
- colSep = (0, _buildCommon.makeSpan)(["arraycolsep"], []);
- colSep.style.width = sepwidth + "em";
- cols.push(colSep);
- }
- }
- }
- body = (0, _buildCommon.makeSpan)(["mtable"], cols);
- return (0, _buildCommon.makeSpan)(["mord"], [body], options);
- };
-
- groupTypes.spacing = function (group, options) {
- if (group.value === "\\ " || group.value === "\\space" || group.value === " " || group.value === "~") {
- // Spaces are generated by adding an actual space. Each of these
- // things has an entry in the symbols table, so these will be turned
- // into appropriate outputs.
- if (group.mode === "text") {
- return _buildCommon2.default.makeOrd(group, options, "textord");
- } else {
- return (0, _buildCommon.makeSpan)(["mspace"], [_buildCommon2.default.mathsym(group.value, group.mode, options)], options);
- }
- } else {
- // Other kinds of spaces are of arbitrary width. We use CSS to
- // generate these.
- return (0, _buildCommon.makeSpan)(["mspace", _buildCommon2.default.spacingFunctions[group.value].className], [], options);
- }
- };
-
- groupTypes.llap = function (group, options) {
- var inner = (0, _buildCommon.makeSpan)(["inner"], [buildGroup(group.value.body, options)]);
- var fix = (0, _buildCommon.makeSpan)(["fix"], []);
- return (0, _buildCommon.makeSpan)(["mord", "llap"], [inner, fix], options);
- };
-
- groupTypes.rlap = function (group, options) {
- var inner = (0, _buildCommon.makeSpan)(["inner"], [buildGroup(group.value.body, options)]);
- var fix = (0, _buildCommon.makeSpan)(["fix"], []);
- return (0, _buildCommon.makeSpan)(["mord", "rlap"], [inner, fix], options);
- };
-
- groupTypes.op = function (group, options) {
- // Operators are handled in the TeXbook pg. 443-444, rule 13(a).
- var supGroup = void 0;
- var subGroup = void 0;
- var hasLimits = false;
- if (group.type === "supsub") {
- // If we have limits, supsub will pass us its group to handle. Pull
- // out the superscript and subscript and set the group to the op in
- // its base.
- supGroup = group.value.sup;
- subGroup = group.value.sub;
- group = group.value.base;
- hasLimits = true;
- }
-
- var style = options.style;
-
- // Most operators have a large successor symbol, but these don't.
- var noSuccessor = ["\\smallint"];
-
- var large = false;
- if (style.size === _Style2.default.DISPLAY.size && group.value.symbol && !_utils2.default.contains(noSuccessor, group.value.body)) {
-
- // Most symbol operators get larger in displaystyle (rule 13)
- large = true;
- }
-
- var base = void 0;
- if (group.value.symbol) {
- // If this is a symbol, create the symbol.
- var fontName = large ? "Size2-Regular" : "Size1-Regular";
- base = _buildCommon2.default.makeSymbol(group.value.body, fontName, "math", options, ["mop", "op-symbol", large ? "large-op" : "small-op"]);
- } else if (group.value.value) {
- // If this is a list, compose that list.
- var inner = buildExpression(group.value.value, options, true);
- if (inner.length === 1 && inner[0] instanceof _domTree2.default.symbolNode) {
- base = inner[0];
- base.classes[0] = "mop"; // replace old mclass
- } else {
- base = (0, _buildCommon.makeSpan)(["mop"], inner, options);
- }
- } else {
- // Otherwise, this is a text operator. Build the text from the
- // operator's name.
- // TODO(emily): Add a space in the middle of some of these
- // operators, like \limsup
- var output = [];
- for (var i = 1; i < group.value.body.length; i++) {
- output.push(_buildCommon2.default.mathsym(group.value.body[i], group.mode));
- }
- base = (0, _buildCommon.makeSpan)(["mop"], output, options);
- }
-
- // If content of op is a single symbol, shift it vertically.
- var baseShift = 0;
- var slant = 0;
- if (base instanceof _domTree2.default.symbolNode) {
- // Shift the symbol so its center lies on the axis (rule 13). It
- // appears that our fonts have the centers of the symbols already
- // almost on the axis, so these numbers are very small. Note we
- // don't actually apply this here, but instead it is used either in
- // the vlist creation or separately when there are no limits.
- baseShift = (base.height - base.depth) / 2 - options.fontMetrics().axisHeight;
-
- // The slant of the symbol is just its italic correction.
- slant = base.italic;
- }
-
- if (hasLimits) {
- // IE 8 clips \int if it is in a display: inline-block. We wrap it
- // in a new span so it is an inline, and works.
- base = (0, _buildCommon.makeSpan)([], [base]);
-
- var supm = void 0;
- var supKern = void 0;
- var subm = void 0;
- var subKern = void 0;
- var newOptions = void 0;
- // We manually have to handle the superscripts and subscripts. This,
- // aside from the kern calculations, is copied from supsub.
- if (supGroup) {
- newOptions = options.havingStyle(style.sup());
- supm = buildGroup(supGroup, newOptions, options);
-
- supKern = Math.max(options.fontMetrics().bigOpSpacing1, options.fontMetrics().bigOpSpacing3 - supm.depth);
- }
-
- if (subGroup) {
- newOptions = options.havingStyle(style.sub());
- subm = buildGroup(subGroup, newOptions, options);
-
- subKern = Math.max(options.fontMetrics().bigOpSpacing2, options.fontMetrics().bigOpSpacing4 - subm.height);
- }
-
- // Build the final group as a vlist of the possible subscript, base,
- // and possible superscript.
- var finalGroup = void 0;
- var top = void 0;
- var bottom = void 0;
- if (!supGroup) {
- top = base.height - baseShift;
-
- // Shift the limits by the slant of the symbol. Note
- // that we are supposed to shift the limits by 1/2 of the slant,
- // but since we are centering the limits adding a full slant of
- // margin will shift by 1/2 that.
- finalGroup = _buildCommon2.default.makeVList([{ type: "kern", size: options.fontMetrics().bigOpSpacing5 }, { type: "elem", elem: subm, marginLeft: -slant + "em" }, { type: "kern", size: subKern }, { type: "elem", elem: base }], "top", top, options);
- } else if (!subGroup) {
- bottom = base.depth + baseShift;
-
- finalGroup = _buildCommon2.default.makeVList([{ type: "elem", elem: base }, { type: "kern", size: supKern }, { type: "elem", elem: supm, marginLeft: slant + "em" }, { type: "kern", size: options.fontMetrics().bigOpSpacing5 }], "bottom", bottom, options);
- } else if (!supGroup && !subGroup) {
- // This case probably shouldn't occur (this would mean the
- // supsub was sending us a group with no superscript or
- // subscript) but be safe.
- return base;
- } else {
- bottom = options.fontMetrics().bigOpSpacing5 + subm.height + subm.depth + subKern + base.depth + baseShift;
-
- finalGroup = _buildCommon2.default.makeVList([{ type: "kern", size: options.fontMetrics().bigOpSpacing5 }, { type: "elem", elem: subm, marginLeft: -slant + "em" }, { type: "kern", size: subKern }, { type: "elem", elem: base }, { type: "kern", size: supKern }, { type: "elem", elem: supm, marginLeft: slant + "em" }, { type: "kern", size: options.fontMetrics().bigOpSpacing5 }], "bottom", bottom, options);
- }
-
- return (0, _buildCommon.makeSpan)(["mop", "op-limits"], [finalGroup], options);
- } else {
- if (baseShift) {
- base.style.position = "relative";
- base.style.top = baseShift + "em";
- }
-
- return base;
- }
- };
-
- groupTypes.mod = function (group, options) {
- var inner = [];
-
- if (group.value.modType === "bmod") {
- // “\nonscript\mskip-\medmuskip\mkern5mu”
- if (!options.style.isTight()) {
- inner.push((0, _buildCommon.makeSpan)(["mspace", "negativemediumspace"], [], options));
- }
- inner.push((0, _buildCommon.makeSpan)(["mspace", "thickspace"], [], options));
- } else if (options.style.size === _Style2.default.DISPLAY.size) {
- inner.push((0, _buildCommon.makeSpan)(["mspace", "quad"], [], options));
- } else if (group.value.modType === "mod") {
- inner.push((0, _buildCommon.makeSpan)(["mspace", "twelvemuspace"], [], options));
- } else {
- inner.push((0, _buildCommon.makeSpan)(["mspace", "eightmuspace"], [], options));
- }
-
- if (group.value.modType === "pod" || group.value.modType === "pmod") {
- inner.push(_buildCommon2.default.mathsym("(", group.mode));
- }
-
- if (group.value.modType !== "pod") {
- var modInner = [_buildCommon2.default.mathsym("m", group.mode), _buildCommon2.default.mathsym("o", group.mode), _buildCommon2.default.mathsym("d", group.mode)];
- if (group.value.modType === "bmod") {
- inner.push((0, _buildCommon.makeSpan)(["mbin"], modInner, options));
- // “\mkern5mu\nonscript\mskip-\medmuskip”
- inner.push((0, _buildCommon.makeSpan)(["mspace", "thickspace"], [], options));
- if (!options.style.isTight()) {
- inner.push((0, _buildCommon.makeSpan)(["mspace", "negativemediumspace"], [], options));
- }
- } else {
- Array.prototype.push.apply(inner, modInner);
- inner.push((0, _buildCommon.makeSpan)(["mspace", "sixmuspace"], [], options));
- }
- }
-
- if (group.value.value) {
- Array.prototype.push.apply(inner, buildExpression(group.value.value, options, false));
- }
-
- if (group.value.modType === "pod" || group.value.modType === "pmod") {
- inner.push(_buildCommon2.default.mathsym(")", group.mode));
- }
-
- return _buildCommon2.default.makeFragment(inner);
- };
-
- groupTypes.katex = function (group, options) {
- // The KaTeX logo. The offsets for the K and a were chosen to look
- // good, but the offsets for the T, E, and X were taken from the
- // definition of \TeX in TeX (see TeXbook pg. 356)
- var k = (0, _buildCommon.makeSpan)(["k"], [_buildCommon2.default.mathsym("K", group.mode)], options);
- var a = (0, _buildCommon.makeSpan)(["a"], [_buildCommon2.default.mathsym("A", group.mode)], options);
-
- a.height = (a.height + 0.2) * 0.75;
- a.depth = (a.height - 0.2) * 0.75;
-
- var t = (0, _buildCommon.makeSpan)(["t"], [_buildCommon2.default.mathsym("T", group.mode)], options);
- var e = (0, _buildCommon.makeSpan)(["e"], [_buildCommon2.default.mathsym("E", group.mode)], options);
-
- e.height = e.height - 0.2155;
- e.depth = e.depth + 0.2155;
-
- var x = (0, _buildCommon.makeSpan)(["x"], [_buildCommon2.default.mathsym("X", group.mode)], options);
-
- return (0, _buildCommon.makeSpan)(["mord", "katex-logo"], [k, a, t, e, x], options);
- };
-
- var makeLineSpan = function makeLineSpan(className, options, thickness) {
- var line = (0, _buildCommon.makeSpan)([className], [], options);
- line.height = thickness || options.fontMetrics().defaultRuleThickness;
- line.style.borderBottomWidth = line.height + "em";
- line.maxFontSize = 1.0;
- return line;
- };
-
- groupTypes.overline = function (group, options) {
- // Overlines are handled in the TeXbook pg 443, Rule 9.
-
- // Build the inner group in the cramped style.
- var innerGroup = buildGroup(group.value.body, options.havingCrampedStyle());
-
- // Create the line above the body
- var line = makeLineSpan("overline-line", options);
-
- // Generate the vlist, with the appropriate kerns
- var vlist = _buildCommon2.default.makeVList([{ type: "elem", elem: innerGroup }, { type: "kern", size: 3 * line.height }, { type: "elem", elem: line }, { type: "kern", size: line.height }], "firstBaseline", null, options);
-
- return (0, _buildCommon.makeSpan)(["mord", "overline"], [vlist], options);
- };
-
- groupTypes.underline = function (group, options) {
- // Underlines are handled in the TeXbook pg 443, Rule 10.
- // Build the inner group.
- var innerGroup = buildGroup(group.value.body, options);
-
- // Create the line above the body
- var line = makeLineSpan("underline-line", options);
-
- // Generate the vlist, with the appropriate kerns
- var vlist = _buildCommon2.default.makeVList([{ type: "kern", size: line.height }, { type: "elem", elem: line }, { type: "kern", size: 3 * line.height }, { type: "elem", elem: innerGroup }], "top", innerGroup.height, options);
-
- return (0, _buildCommon.makeSpan)(["mord", "underline"], [vlist], options);
- };
-
- groupTypes.sqrt = function (group, options) {
- // Square roots are handled in the TeXbook pg. 443, Rule 11.
-
- // First, we do the same steps as in overline to build the inner group
- // and line
- var inner = buildGroup(group.value.body, options.havingCrampedStyle());
-
- // Some groups can return document fragments. Handle those by wrapping
- // them in a span.
- if (inner instanceof _domTree2.default.documentFragment) {
- inner = (0, _buildCommon.makeSpan)([], [inner], options);
- }
-
- // Calculate the minimum size for the \surd delimiter
- var metrics = options.fontMetrics();
- var theta = metrics.defaultRuleThickness;
-
- var phi = theta;
- if (options.style.id < _Style2.default.TEXT.id) {
- phi = options.fontMetrics().xHeight;
- }
-
- // Calculate the clearance between the body and line
- var lineClearance = theta + phi / 4;
-
- var minDelimiterHeight = (inner.height + inner.depth + lineClearance + theta) * options.sizeMultiplier;
-
- // Create a sqrt SVG of the required minimum size
- var img = _delimiter2.default.customSizedDelim("\\surd", minDelimiterHeight, false, options, group.mode);
-
- // Calculate the actual line width.
- // This actually should depend on the chosen font -- e.g. \boldmath
- // should use the thicker surd symbols from e.g. KaTeX_Main-Bold, and
- // have thicker rules.
- var ruleWidth = options.fontMetrics().sqrtRuleThickness * img.sizeMultiplier;
-
- var delimDepth = img.height - ruleWidth;
-
- // Adjust the clearance based on the delimiter size
- if (delimDepth > inner.height + inner.depth + lineClearance) {
- lineClearance = (lineClearance + delimDepth - inner.height - inner.depth) / 2;
- }
-
- // Shift the sqrt image
- var imgShift = img.height - inner.height - lineClearance - ruleWidth;
-
- // We add a special case here, because even when `inner` is empty, we
- // still get a line. So, we use a simple heuristic to decide if we
- // should omit the body entirely. (note this doesn't work for something
- // like `\sqrt{\rlap{x}}`, but if someone is doing that they deserve for
- // it not to work.
- var body = void 0;
- if (inner.height === 0 && inner.depth === 0) {
- body = (0, _buildCommon.makeSpan)();
- } else {
- inner.style.paddingLeft = img.surdWidth + "em";
-
- // Overlay the image and the argument.
- body = _buildCommon2.default.makeVList([{ type: "elem", elem: inner }, { type: "kern", size: -(inner.height + imgShift) }, { type: "elem", elem: img }, { type: "kern", size: ruleWidth }], "firstBaseline", null, options);
- body.children[0].children[0].classes.push("svg-align");
- }
-
- if (!group.value.index) {
- return (0, _buildCommon.makeSpan)(["mord", "sqrt"], [body], options);
- } else {
- // Handle the optional root index
-
- // The index is always in scriptscript style
- var newOptions = options.havingStyle(_Style2.default.SCRIPTSCRIPT);
- var rootm = buildGroup(group.value.index, newOptions, options);
-
- // The amount the index is shifted by. This is taken from the TeX
- // source, in the definition of `\r@@t`.
- var toShift = 0.6 * (body.height - body.depth);
-
- // Build a VList with the superscript shifted up correctly
- var rootVList = _buildCommon2.default.makeVList([{ type: "elem", elem: rootm }], "shift", -toShift, options);
- // Add a class surrounding it so we can add on the appropriate
- // kerning
- var rootVListWrap = (0, _buildCommon.makeSpan)(["root"], [rootVList]);
-
- return (0, _buildCommon.makeSpan)(["mord", "sqrt"], [rootVListWrap, body], options);
- }
- };
-
- function sizingGroup(value, options, baseOptions) {
- var inner = buildExpression(value, options, false);
- var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier;
-
- // Add size-resetting classes to the inner list and set maxFontSize
- // manually. Handle nested size changes.
- for (var i = 0; i < inner.length; i++) {
- var pos = _utils2.default.indexOf(inner[i].classes, "sizing");
- if (pos < 0) {
- Array.prototype.push.apply(inner[i].classes, options.sizingClasses(baseOptions));
- } else if (inner[i].classes[pos + 1] === "reset-size" + options.size) {
- // This is a nested size change: e.g., inner[i] is the "b" in
- // `\Huge a \small b`. Override the old size (the `reset-` class)
- // but not the new size.
- inner[i].classes[pos + 1] = "reset-size" + baseOptions.size;
- }
-
- inner[i].height *= multiplier;
- inner[i].depth *= multiplier;
- }
-
- return _buildCommon2.default.makeFragment(inner);
- }
-
- groupTypes.sizing = function (group, options) {
- // Handle sizing operators like \Huge. Real TeX doesn't actually allow
- // these functions inside of math expressions, so we do some special
- // handling.
- var newOptions = options.havingSize(group.value.size);
- return sizingGroup(group.value.value, newOptions, options);
- };
-
- groupTypes.styling = function (group, options) {
- // Style changes are handled in the TeXbook on pg. 442, Rule 3.
-
- // Figure out what style we're changing to.
- var styleMap = {
- "display": _Style2.default.DISPLAY,
- "text": _Style2.default.TEXT,
- "script": _Style2.default.SCRIPT,
- "scriptscript": _Style2.default.SCRIPTSCRIPT
- };
-
- var newStyle = styleMap[group.value.style];
- var newOptions = options.havingStyle(newStyle);
- return sizingGroup(group.value.value, newOptions, options);
- };
-
- groupTypes.font = function (group, options) {
- var font = group.value.font;
- return buildGroup(group.value.body, options.withFont(font));
- };
-
- groupTypes.delimsizing = function (group, options) {
- var delim = group.value.value;
-
- if (delim === ".") {
- // Empty delimiters still count as elements, even though they don't
- // show anything.
- return (0, _buildCommon.makeSpan)([group.value.mclass]);
- }
-
- // Use delimiter.sizedDelim to generate the delimiter.
- return _delimiter2.default.sizedDelim(delim, group.value.size, options, group.mode, [group.value.mclass]);
- };
-
- groupTypes.leftright = function (group, options) {
- // Build the inner expression
- var inner = buildExpression(group.value.body, options, true);
-
- var innerHeight = 0;
- var innerDepth = 0;
- var hadMiddle = false;
-
- // Calculate its height and depth
- for (var i = 0; i < inner.length; i++) {
- if (inner[i].isMiddle) {
- hadMiddle = true;
- } else {
- innerHeight = Math.max(inner[i].height, innerHeight);
- innerDepth = Math.max(inner[i].depth, innerDepth);
- }
- }
-
- // The size of delimiters is the same, regardless of what style we are
- // in. Thus, to correctly calculate the size of delimiter we need around
- // a group, we scale down the inner size based on the size.
- innerHeight *= options.sizeMultiplier;
- innerDepth *= options.sizeMultiplier;
-
- var leftDelim = void 0;
- if (group.value.left === ".") {
- // Empty delimiters in \left and \right make null delimiter spaces.
- leftDelim = makeNullDelimiter(options, ["mopen"]);
- } else {
- // Otherwise, use leftRightDelim to generate the correct sized
- // delimiter.
- leftDelim = _delimiter2.default.leftRightDelim(group.value.left, innerHeight, innerDepth, options, group.mode, ["mopen"]);
- }
- // Add it to the beginning of the expression
- inner.unshift(leftDelim);
-
- // Handle middle delimiters
- if (hadMiddle) {
- for (var _i4 = 1; _i4 < inner.length; _i4++) {
- var middleDelim = inner[_i4];
- if (middleDelim.isMiddle) {
- // Apply the options that were active when \middle was called
- inner[_i4] = _delimiter2.default.leftRightDelim(middleDelim.isMiddle.value, innerHeight, innerDepth, middleDelim.isMiddle.options, group.mode, []);
- // Add back spaces shifted into the delimiter
- var spaces = spliceSpaces(middleDelim.children, 0);
- if (spaces) {
- _buildCommon2.default.prependChildren(inner[_i4], spaces);
- }
- }
- }
- }
-
- var rightDelim = void 0;
- // Same for the right delimiter
- if (group.value.right === ".") {
- rightDelim = makeNullDelimiter(options, ["mclose"]);
- } else {
- rightDelim = _delimiter2.default.leftRightDelim(group.value.right, innerHeight, innerDepth, options, group.mode, ["mclose"]);
- }
- // Add it to the end of the expression.
- inner.push(rightDelim);
-
- return (0, _buildCommon.makeSpan)(["minner"], inner, options);
- };
-
- groupTypes.middle = function (group, options) {
- var middleDelim = void 0;
- if (group.value.value === ".") {
- middleDelim = makeNullDelimiter(options, []);
- } else {
- middleDelim = _delimiter2.default.sizedDelim(group.value.value, 1, options, group.mode, []);
- middleDelim.isMiddle = { value: group.value.value, options: options };
- }
- return middleDelim;
- };
-
- groupTypes.rule = function (group, options) {
- // Make an empty span for the rule
- var rule = (0, _buildCommon.makeSpan)(["mord", "rule"], [], options);
-
- // Calculate the shift, width, and height of the rule, and account for units
- var shift = 0;
- if (group.value.shift) {
- shift = _units2.default.calculateSize(group.value.shift, options);
- }
-
- var width = _units2.default.calculateSize(group.value.width, options);
- var height = _units2.default.calculateSize(group.value.height, options);
-
- // Style the rule to the right size
- rule.style.borderRightWidth = width + "em";
- rule.style.borderTopWidth = height + "em";
- rule.style.bottom = shift + "em";
-
- // Record the height and width
- rule.width = width;
- rule.height = height + shift;
- rule.depth = -shift;
- // Font size is the number large enough that the browser will
- // reserve at least `absHeight` space above the baseline.
- // The 1.125 factor was empirically determined
- rule.maxFontSize = height * 1.125 * options.sizeMultiplier;
-
- return rule;
- };
-
- groupTypes.kern = function (group, options) {
- // Make an empty span for the rule
- var rule = (0, _buildCommon.makeSpan)(["mord", "rule"], [], options);
-
- if (group.value.dimension) {
- var dimension = _units2.default.calculateSize(group.value.dimension, options);
- rule.style.marginLeft = dimension + "em";
- }
-
- return rule;
- };
-
- groupTypes.accent = function (group, options) {
- // Accents are handled in the TeXbook pg. 443, rule 12.
- var base = group.value.base;
-
- var supsubGroup = void 0;
- if (group.type === "supsub") {
- // If our base is a character box, and we have superscripts and
- // subscripts, the supsub will defer to us. In particular, we want
- // to attach the superscripts and subscripts to the inner body (so
- // that the position of the superscripts and subscripts won't be
- // affected by the height of the accent). We accomplish this by
- // sticking the base of the accent into the base of the supsub, and
- // rendering that, while keeping track of where the accent is.
-
- // The supsub group is the group that was passed in
- var supsub = group;
- // The real accent group is the base of the supsub group
- group = supsub.value.base;
- // The character box is the base of the accent group
- base = group.value.base;
- // Stick the character box into the base of the supsub group
- supsub.value.base = base;
-
- // Rerender the supsub group with its new base, and store that
- // result.
- supsubGroup = buildGroup(supsub, options);
- }
-
- // Build the base group
- var body = buildGroup(base, options.havingCrampedStyle());
-
- // Does the accent need to shift for the skew of a character?
- var mustShift = group.value.isShifty && isCharacterBox(base);
-
- // Calculate the skew of the accent. This is based on the line "If the
- // nucleus is not a single character, let s = 0; otherwise set s to the
- // kern amount for the nucleus followed by the \skewchar of its font."
- // Note that our skew metrics are just the kern between each character
- // and the skewchar.
- var skew = 0;
- if (mustShift) {
- // If the base is a character box, then we want the skew of the
- // innermost character. To do that, we find the innermost character:
- var baseChar = getBaseElem(base);
- // Then, we render its group to get the symbol inside it
- var baseGroup = buildGroup(baseChar, options.havingCrampedStyle());
- // Finally, we pull the skew off of the symbol.
- skew = baseGroup.skew;
- // Note that we now throw away baseGroup, because the layers we
- // removed with getBaseElem might contain things like \color which
- // we can't get rid of.
- // TODO(emily): Find a better way to get the skew
- }
-
- // calculate the amount of space between the body and the accent
- var clearance = Math.min(body.height, options.fontMetrics().xHeight);
-
- // Build the accent
- var accentBody = void 0;
- if (!group.value.isStretchy) {
- var accent = _buildCommon2.default.makeSymbol(group.value.label, "Main-Regular", group.mode, options);
- // Remove the italic correction of the accent, because it only serves to
- // shift the accent over to a place we don't want.
- accent.italic = 0;
-
- // The \vec character that the fonts use is a combining character, and
- // thus shows up much too far to the left. To account for this, we add a
- // specific class which shifts the accent over to where we want it.
- // TODO(emily): Fix this in a better way, like by changing the font
- // Similarly, text accent \H is a combining character and
- // requires a different adjustment.
- var accentClass = null;
- if (group.value.label === "\\vec") {
- accentClass = "accent-vec";
- } else if (group.value.label === '\\H') {
- accentClass = "accent-hungarian";
- }
-
- accentBody = (0, _buildCommon.makeSpan)([], [accent]);
- accentBody = (0, _buildCommon.makeSpan)(["accent-body", accentClass], [accentBody]);
-
- // Shift the accent over by the skew. Note we shift by twice the skew
- // because we are centering the accent, so by adding 2*skew to the left,
- // we shift it to the right by 1*skew.
- accentBody.style.marginLeft = 2 * skew + "em";
-
- accentBody = _buildCommon2.default.makeVList([{ type: "elem", elem: body }, { type: "kern", size: -clearance }, { type: "elem", elem: accentBody }], "firstBaseline", null, options);
- } else {
- accentBody = _stretchy2.default.svgSpan(group, options);
-
- accentBody = _buildCommon2.default.makeVList([{ type: "elem", elem: body }, { type: "elem", elem: accentBody }], "firstBaseline", null, options);
-
- var styleSpan = accentBody.children[0].children[0].children[1];
- styleSpan.classes.push("svg-align"); // text-align: left;
- if (skew > 0) {
- // Shorten the accent and nudge it to the right.
- styleSpan.style.width = "calc(100% - " + 2 * skew + "em)";
- styleSpan.style.marginLeft = 2 * skew + "em";
- }
- }
-
- var accentWrap = (0, _buildCommon.makeSpan)(["mord", "accent"], [accentBody], options);
-
- if (supsubGroup) {
- // Here, we replace the "base" child of the supsub with our newly
- // generated accent.
- supsubGroup.children[0] = accentWrap;
-
- // Since we don't rerun the height calculation after replacing the
- // accent, we manually recalculate height.
- supsubGroup.height = Math.max(accentWrap.height, supsubGroup.height);
-
- // Accents should always be ords, even when their innards are not.
- supsubGroup.classes[0] = "mord";
-
- return supsubGroup;
- } else {
- return accentWrap;
- }
- };
-
- groupTypes.horizBrace = function (group, options) {
- var style = options.style;
-
- var hasSupSub = group.type === "supsub";
- var supSubGroup = void 0;
- var newOptions = void 0;
- if (hasSupSub) {
- // Ref: LaTeX source2e: }}}}\limits}
- // i.e. LaTeX treats the brace similar to an op and passes it
- // with \limits, so we need to assign supsub style.
- if (group.value.sup) {
- newOptions = options.havingStyle(style.sup());
- supSubGroup = buildGroup(group.value.sup, newOptions, options);
- } else {
- newOptions = options.havingStyle(style.sub());
- supSubGroup = buildGroup(group.value.sub, newOptions, options);
- }
- group = group.value.base;
- }
-
- // Build the base group
- var body = buildGroup(group.value.base, options.havingBaseStyle(_Style2.default.DISPLAY));
-
- // Create the stretchy element
- var braceBody = _stretchy2.default.svgSpan(group, options);
-
- // Generate the vlist, with the appropriate kerns ┏━━━━━━━━┓
- // This first vlist contains the subject matter and the brace: equation
- var vlist = void 0;
- if (group.value.isOver) {
- vlist = _buildCommon2.default.makeVList([{ type: "elem", elem: body }, { type: "kern", size: 0.1 }, { type: "elem", elem: braceBody }], "firstBaseline", null, options);
- vlist.children[0].children[0].children[1].classes.push("svg-align");
- } else {
- vlist = _buildCommon2.default.makeVList([{ type: "elem", elem: braceBody }, { type: "kern", size: 0.1 }, { type: "elem", elem: body }], "bottom", body.depth + 0.1 + braceBody.height, options);
- vlist.children[0].children[0].children[0].classes.push("svg-align");
- }
-
- if (hasSupSub) {
- // In order to write the supsub, wrap the first vlist in another vlist:
- // They can't all go in the same vlist, because the note might be wider
- // than the equation. We want the equation to control the brace width.
-
- // note long note long note
- // ┏━━━━━━━━┓ or ┏━━━┓ not ┏━━━━━━━━━┓
- // equation eqn eqn
-
- var vSpan = (0, _buildCommon.makeSpan)(["mord", group.value.isOver ? "mover" : "munder"], [vlist], options);
-
- if (group.value.isOver) {
- vlist = _buildCommon2.default.makeVList([{ type: "elem", elem: vSpan }, { type: "kern", size: 0.2 }, { type: "elem", elem: supSubGroup }], "firstBaseline", null, options);
- } else {
- vlist = _buildCommon2.default.makeVList([{ type: "elem", elem: supSubGroup }, { type: "kern", size: 0.2 }, { type: "elem", elem: vSpan }], "bottom", vSpan.depth + 0.2 + supSubGroup.height, options);
- }
- }
-
- return (0, _buildCommon.makeSpan)(["mord", group.value.isOver ? "mover" : "munder"], [vlist], options);
- };
-
- groupTypes.accentUnder = function (group, options) {
- // Treat under accents much like underlines.
- var innerGroup = buildGroup(group.value.body, options);
-
- var accentBody = _stretchy2.default.svgSpan(group, options);
- var kern = /tilde/.test(group.value.label) ? 0.12 : 0;
-
- // Generate the vlist, with the appropriate kerns
- var vlist = _buildCommon2.default.makeVList([{ type: "elem", elem: accentBody }, { type: "kern", size: kern }, { type: "elem", elem: innerGroup }], "bottom", accentBody.height + kern, options);
-
- vlist.children[0].children[0].children[0].classes.push("svg-align");
-
- return (0, _buildCommon.makeSpan)(["mord", "accentunder"], [vlist], options);
- };
-
- groupTypes.enclose = function (group, options) {
- // \cancel, \bcancel, \xcancel, \sout, \fbox
- var inner = buildGroup(group.value.body, options);
-
- var label = group.value.label.substr(1);
- var scale = options.sizeMultiplier;
- var img = void 0;
- var pad = 0;
- var imgShift = 0;
-
- if (label === "sout") {
- img = (0, _buildCommon.makeSpan)(["stretchy", "sout"]);
- img.height = options.fontMetrics().defaultRuleThickness / scale;
- imgShift = -0.5 * options.fontMetrics().xHeight;
- } else {
- // Add horizontal padding
- inner.classes.push(label === "fbox" ? "boxpad" : "cancel-pad");
-
- // Add vertical padding
- var isCharBox = isCharacterBox(group.value.body);
- // ref: LaTeX source2e: \fboxsep = 3pt; \fboxrule = .4pt
- // ref: cancel package: \advance\totalheight2\p@ % "+2"
- pad = label === "fbox" ? 0.34 : isCharBox ? 0.2 : 0;
- imgShift = inner.depth + pad;
-
- img = _stretchy2.default.encloseSpan(inner, label, pad, options);
- }
-
- var vlist = _buildCommon2.default.makeVList([{ type: "elem", elem: inner, shift: 0 }, { type: "elem", elem: img, shift: imgShift }], "individualShift", null, options);
-
- if (label !== "fbox") {
- vlist.children[0].children[0].children[1].classes.push("svg-align");
- }
-
- if (/cancel/.test(label)) {
- // cancel does not create horiz space for its line extension.
- // That is, not when adjacent to a mord.
- return (0, _buildCommon.makeSpan)(["mord", "cancel-lap"], [vlist], options);
- } else {
- return (0, _buildCommon.makeSpan)(["mord"], [vlist], options);
- }
- };
-
- groupTypes.xArrow = function (group, options) {
- var style = options.style;
-
- // Build the argument groups in the appropriate style.
- // Ref: amsmath.dtx: \hbox{$\scriptstyle\mkern#3mu{#6}\mkern#4mu$}%
-
- var newOptions = options.havingStyle(style.sup());
- var upperGroup = buildGroup(group.value.body, newOptions, options);
- upperGroup.classes.push("x-arrow-pad");
-
- var lowerGroup = void 0;
- if (group.value.below) {
- // Build the lower group
- newOptions = options.havingStyle(style.sub());
- lowerGroup = buildGroup(group.value.below, newOptions, options);
- lowerGroup.classes.push("x-arrow-pad");
- }
-
- var arrowBody = _stretchy2.default.svgSpan(group, options);
-
- var arrowShift = -options.fontMetrics().axisHeight + arrowBody.depth;
- var upperShift = -options.fontMetrics().axisHeight - arrowBody.height - 0.111; // 2 mu. Ref: amsmath.dtx: #7\if0#2\else\mkern#2mu\fi
-
- // Generate the vlist
- var vlist = void 0;
- if (group.value.below) {
- var lowerShift = -options.fontMetrics().axisHeight + lowerGroup.height + arrowBody.height + 0.111;
- vlist = _buildCommon2.default.makeVList([{ type: "elem", elem: upperGroup, shift: upperShift }, { type: "elem", elem: arrowBody, shift: arrowShift }, { type: "elem", elem: lowerGroup, shift: lowerShift }], "individualShift", null, options);
- } else {
- vlist = _buildCommon2.default.makeVList([{ type: "elem", elem: upperGroup, shift: upperShift }, { type: "elem", elem: arrowBody, shift: arrowShift }], "individualShift", null, options);
- }
-
- vlist.children[0].children[0].children[1].classes.push("svg-align");
-
- return (0, _buildCommon.makeSpan)(["mrel", "x-arrow"], [vlist], options);
- };
-
- groupTypes.phantom = function (group, options) {
- var elements = buildExpression(group.value.value, options.withPhantom(), false);
-
- // \phantom isn't supposed to affect the elements it contains.
- // See "color" for more details.
- return new _buildCommon2.default.makeFragment(elements);
- };
-
- groupTypes.mclass = function (group, options) {
- var elements = buildExpression(group.value.value, options, true);
-
- return (0, _buildCommon.makeSpan)([group.value.mclass], elements, options);
- };
-
- /**
- * buildGroup is the function that takes a group and calls the correct groupType
- * function for it. It also handles the interaction of size and style changes
- * between parents and children.
- */
- var buildGroup = function buildGroup(group, options, baseOptions) {
- if (!group) {
- return (0, _buildCommon.makeSpan)();
- }
-
- if (groupTypes[group.type]) {
- // Call the groupTypes function
- var groupNode = groupTypes[group.type](group, options);
-
- // If the size changed between the parent and the current group, account
- // for that size difference.
- if (baseOptions && options.size !== baseOptions.size) {
- groupNode = (0, _buildCommon.makeSpan)(options.sizingClasses(baseOptions), [groupNode], options);
-
- var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier;
-
- groupNode.height *= multiplier;
- groupNode.depth *= multiplier;
- }
-
- return groupNode;
- } else {
- throw new _ParseError2.default("Got group of unknown type: '" + group.type + "'");
- }
- };
-
- /**
- * Take an entire parse tree, and build it into an appropriate set of HTML
- * nodes.
- */
- var buildHTML = function buildHTML(tree, options) {
- // buildExpression is destructive, so we need to make a clone
- // of the incoming tree so that it isn't accidentally changed
- tree = JSON.parse((0, _stringify2.default)(tree));
-
- // Build the expression contained in the tree
- var expression = buildExpression(tree, options, true);
- var body = (0, _buildCommon.makeSpan)(["base"], expression, options);
-
- // Add struts, which ensure that the top of the HTML element falls at the
- // height of the expression, and the bottom of the HTML element falls at the
- // depth of the expression.
- var topStrut = (0, _buildCommon.makeSpan)(["strut"]);
- var bottomStrut = (0, _buildCommon.makeSpan)(["strut", "bottom"]);
-
- topStrut.style.height = body.height + "em";
- bottomStrut.style.height = body.height + body.depth + "em";
- // We'd like to use `vertical-align: top` but in IE 9 this lowers the
- // baseline of the box to the bottom of this strut (instead staying in the
- // normal place) so we use an absolute value for vertical-align instead
- bottomStrut.style.verticalAlign = -body.depth + "em";
-
- // Wrap the struts and body together
- var htmlNode = (0, _buildCommon.makeSpan)(["katex-html"], [topStrut, bottomStrut, body]);
-
- htmlNode.setAttribute("aria-hidden", "true");
-
- return htmlNode;
- };
-
- module.exports = buildHTML;
-
- },{"./ParseError":29,"./Style":33,"./buildCommon":34,"./delimiter":38,"./domTree":39,"./stretchy":47,"./units":50,"./utils":51,"babel-runtime/core-js/json/stringify":2}],36:[function(require,module,exports){
-
- var _buildCommon = require("./buildCommon");
-
- var _buildCommon2 = _interopRequireDefault(_buildCommon);
-
- var _fontMetrics = require("./fontMetrics");
-
- var _fontMetrics2 = _interopRequireDefault(_fontMetrics);
-
- var _mathMLTree = require("./mathMLTree");
-
- var _mathMLTree2 = _interopRequireDefault(_mathMLTree);
-
- var _ParseError = require("./ParseError");
-
- var _ParseError2 = _interopRequireDefault(_ParseError);
-
- var _Style = require("./Style");
-
- var _Style2 = _interopRequireDefault(_Style);
-
- var _symbols = require("./symbols");
-
- var _symbols2 = _interopRequireDefault(_symbols);
-
- var _utils = require("./utils");
-
- var _utils2 = _interopRequireDefault(_utils);
-
- var _stretchy = require("./stretchy");
-
- var _stretchy2 = _interopRequireDefault(_stretchy);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- /**
- * Takes a symbol and converts it into a MathML text node after performing
- * optional replacement from symbols.js.
- */
- /**
- * This file converts a parse tree into a cooresponding MathML tree. The main
- * entry point is the `buildMathML` function, which takes a parse tree from the
- * parser.
- */
-
- var makeText = function makeText(text, mode) {
- if (_symbols2.default[mode][text] && _symbols2.default[mode][text].replace) {
- text = _symbols2.default[mode][text].replace;
- }
-
- return new _mathMLTree2.default.TextNode(text);
- };
-
- /**
- * Returns the math variant as a string or null if none is required.
- */
- var getVariant = function getVariant(group, options) {
- var font = options.font;
- if (!font) {
- return null;
- }
-
- var mode = group.mode;
- if (font === "mathit") {
- return "italic";
- }
-
- var value = group.value;
- if (_utils2.default.contains(["\\imath", "\\jmath"], value)) {
- return null;
- }
-
- if (_symbols2.default[mode][value] && _symbols2.default[mode][value].replace) {
- value = _symbols2.default[mode][value].replace;
- }
-
- var fontName = _buildCommon.fontMap[font].fontName;
- if (_fontMetrics2.default.getCharacterMetrics(value, fontName)) {
- return _buildCommon.fontMap[options.font].variant;
- }
-
- return null;
- };
-
- /**
- * Functions for handling the different types of groups found in the parse
- * tree. Each function should take a parse group and return a MathML node.
- */
- var groupTypes = {};
-
- var defaultVariant = {
- "mi": "italic",
- "mn": "normal",
- "mtext": "normal"
- };
-
- groupTypes.mathord = function (group, options) {
- var node = new _mathMLTree2.default.MathNode("mi", [makeText(group.value, group.mode)]);
-
- var variant = getVariant(group, options) || "italic";
- if (variant !== defaultVariant[node.type]) {
- node.setAttribute("mathvariant", variant);
- }
- return node;
- };
-
- groupTypes.textord = function (group, options) {
- var text = makeText(group.value, group.mode);
-
- var variant = getVariant(group, options) || "normal";
-
- var node = void 0;
- if (group.mode === 'text') {
- node = new _mathMLTree2.default.MathNode("mtext", [text]);
- } else if (/[0-9]/.test(group.value)) {
- // TODO(kevinb) merge adjacent nodes
- // do it as a post processing step
- node = new _mathMLTree2.default.MathNode("mn", [text]);
- } else if (group.value === "\\prime") {
- node = new _mathMLTree2.default.MathNode("mo", [text]);
- } else {
- node = new _mathMLTree2.default.MathNode("mi", [text]);
- }
- if (variant !== defaultVariant[node.type]) {
- node.setAttribute("mathvariant", variant);
- }
-
- return node;
- };
-
- groupTypes.bin = function (group) {
- var node = new _mathMLTree2.default.MathNode("mo", [makeText(group.value, group.mode)]);
-
- return node;
- };
-
- groupTypes.rel = function (group) {
- var node = new _mathMLTree2.default.MathNode("mo", [makeText(group.value, group.mode)]);
-
- return node;
- };
-
- groupTypes.open = function (group) {
- var node = new _mathMLTree2.default.MathNode("mo", [makeText(group.value, group.mode)]);
-
- return node;
- };
-
- groupTypes.close = function (group) {
- var node = new _mathMLTree2.default.MathNode("mo", [makeText(group.value, group.mode)]);
-
- return node;
- };
-
- groupTypes.inner = function (group) {
- var node = new _mathMLTree2.default.MathNode("mo", [makeText(group.value, group.mode)]);
-
- return node;
- };
-
- groupTypes.punct = function (group) {
- var node = new _mathMLTree2.default.MathNode("mo", [makeText(group.value, group.mode)]);
-
- node.setAttribute("separator", "true");
-
- return node;
- };
-
- groupTypes.ordgroup = function (group, options) {
- var inner = buildExpression(group.value, options);
-
- var node = new _mathMLTree2.default.MathNode("mrow", inner);
-
- return node;
- };
-
- groupTypes.text = function (group, options) {
- var body = group.value.body;
-
- // Convert each element of the body into MathML, and combine consecutive
- // outputs into a single tag. In this way, we don't
- // nest non-text items (e.g., $nested-math$) within an .
- var inner = [];
- var currentText = null;
- for (var i = 0; i < body.length; i++) {
- var _group = buildGroup(body[i], options);
- if (_group.type === 'mtext' && currentText != null) {
- Array.prototype.push.apply(currentText.children, _group.children);
- } else {
- inner.push(_group);
- if (_group.type === 'mtext') {
- currentText = _group;
- }
- }
- }
-
- // If there is a single tag in the end (presumably ),
- // just return it. Otherwise, wrap them in an .
- if (inner.length === 1) {
- return inner[0];
- } else {
- return new _mathMLTree2.default.MathNode("mrow", inner);
- }
- };
-
- groupTypes.color = function (group, options) {
- var inner = buildExpression(group.value.value, options);
-
- var node = new _mathMLTree2.default.MathNode("mstyle", inner);
-
- node.setAttribute("mathcolor", group.value.color);
-
- return node;
- };
-
- groupTypes.supsub = function (group, options) {
- // Is the inner group a relevant horizonal brace?
- var isBrace = false;
- var isOver = void 0;
- var isSup = void 0;
- if (group.value.base) {
- if (group.value.base.value.type === "horizBrace") {
- isSup = group.value.sup ? true : false;
- if (isSup === group.value.base.value.isOver) {
- isBrace = true;
- isOver = group.value.base.value.isOver;
- }
- }
- }
-
- var removeUnnecessaryRow = true;
- var children = [buildGroup(group.value.base, options, removeUnnecessaryRow)];
-
- if (group.value.sub) {
- children.push(buildGroup(group.value.sub, options, removeUnnecessaryRow));
- }
-
- if (group.value.sup) {
- children.push(buildGroup(group.value.sup, options, removeUnnecessaryRow));
- }
-
- var nodeType = void 0;
- if (isBrace) {
- nodeType = isOver ? "mover" : "munder";
- } else if (!group.value.sub) {
- nodeType = "msup";
- } else if (!group.value.sup) {
- nodeType = "msub";
- } else {
- var base = group.value.base;
- if (base && base.value.limits && options.style === _Style2.default.DISPLAY) {
- nodeType = "munderover";
- } else {
- nodeType = "msubsup";
- }
- }
-
- var node = new _mathMLTree2.default.MathNode(nodeType, children);
-
- return node;
- };
-
- groupTypes.genfrac = function (group, options) {
- var node = new _mathMLTree2.default.MathNode("mfrac", [buildGroup(group.value.numer, options), buildGroup(group.value.denom, options)]);
-
- if (!group.value.hasBarLine) {
- node.setAttribute("linethickness", "0px");
- }
-
- if (group.value.leftDelim != null || group.value.rightDelim != null) {
- var withDelims = [];
-
- if (group.value.leftDelim != null) {
- var leftOp = new _mathMLTree2.default.MathNode("mo", [new _mathMLTree2.default.TextNode(group.value.leftDelim)]);
-
- leftOp.setAttribute("fence", "true");
-
- withDelims.push(leftOp);
- }
-
- withDelims.push(node);
-
- if (group.value.rightDelim != null) {
- var rightOp = new _mathMLTree2.default.MathNode("mo", [new _mathMLTree2.default.TextNode(group.value.rightDelim)]);
-
- rightOp.setAttribute("fence", "true");
-
- withDelims.push(rightOp);
- }
-
- var outerNode = new _mathMLTree2.default.MathNode("mrow", withDelims);
-
- return outerNode;
- }
-
- return node;
- };
-
- groupTypes.array = function (group, options) {
- return new _mathMLTree2.default.MathNode("mtable", group.value.body.map(function (row) {
- return new _mathMLTree2.default.MathNode("mtr", row.map(function (cell) {
- return new _mathMLTree2.default.MathNode("mtd", [buildGroup(cell, options)]);
- }));
- }));
- };
-
- groupTypes.sqrt = function (group, options) {
- var node = void 0;
- if (group.value.index) {
- node = new _mathMLTree2.default.MathNode("mroot", [buildGroup(group.value.body, options), buildGroup(group.value.index, options)]);
- } else {
- node = new _mathMLTree2.default.MathNode("msqrt", [buildGroup(group.value.body, options)]);
- }
-
- return node;
- };
-
- groupTypes.leftright = function (group, options) {
- var inner = buildExpression(group.value.body, options);
-
- if (group.value.left !== ".") {
- var leftNode = new _mathMLTree2.default.MathNode("mo", [makeText(group.value.left, group.mode)]);
-
- leftNode.setAttribute("fence", "true");
-
- inner.unshift(leftNode);
- }
-
- if (group.value.right !== ".") {
- var rightNode = new _mathMLTree2.default.MathNode("mo", [makeText(group.value.right, group.mode)]);
-
- rightNode.setAttribute("fence", "true");
-
- inner.push(rightNode);
- }
-
- var outerNode = new _mathMLTree2.default.MathNode("mrow", inner);
-
- return outerNode;
- };
-
- groupTypes.middle = function (group, options) {
- var middleNode = new _mathMLTree2.default.MathNode("mo", [makeText(group.value.middle, group.mode)]);
- middleNode.setAttribute("fence", "true");
- return middleNode;
- };
-
- groupTypes.accent = function (group, options) {
- var accentNode = void 0;
- if (group.value.isStretchy) {
- accentNode = _stretchy2.default.mathMLnode(group.value.label);
- } else {
- accentNode = new _mathMLTree2.default.MathNode("mo", [makeText(group.value.label, group.mode)]);
- }
-
- var node = new _mathMLTree2.default.MathNode("mover", [buildGroup(group.value.base, options), accentNode]);
-
- node.setAttribute("accent", "true");
-
- return node;
- };
-
- groupTypes.spacing = function (group) {
- var node = void 0;
-
- if (group.value === "\\ " || group.value === "\\space" || group.value === " " || group.value === "~") {
- node = new _mathMLTree2.default.MathNode("mtext", [new _mathMLTree2.default.TextNode("\xA0")]);
- } else {
- node = new _mathMLTree2.default.MathNode("mspace");
-
- node.setAttribute("width", _buildCommon2.default.spacingFunctions[group.value].size);
- }
-
- return node;
- };
-
- groupTypes.op = function (group, options) {
- var node = void 0;
-
- // TODO(emily): handle big operators using the `largeop` attribute
-
- if (group.value.symbol) {
- // This is a symbol. Just add the symbol.
- node = new _mathMLTree2.default.MathNode("mo", [makeText(group.value.body, group.mode)]);
- } else if (group.value.value) {
- // This is an operator with children. Add them.
- node = new _mathMLTree2.default.MathNode("mo", buildExpression(group.value.value, options));
- } else {
- // This is a text operator. Add all of the characters from the
- // operator's name.
- // TODO(emily): Add a space in the middle of some of these
- // operators, like \limsup.
- node = new _mathMLTree2.default.MathNode("mi", [new _mathMLTree2.default.TextNode(group.value.body.slice(1))]);
- }
-
- return node;
- };
-
- groupTypes.mod = function (group, options) {
- var inner = [];
-
- if (group.value.modType === "pod" || group.value.modType === "pmod") {
- inner.push(new _mathMLTree2.default.MathNode("mo", [makeText("(", group.mode)]));
- }
- if (group.value.modType !== "pod") {
- inner.push(new _mathMLTree2.default.MathNode("mo", [makeText("mod", group.mode)]));
- }
- if (group.value.value) {
- var space = new _mathMLTree2.default.MathNode("mspace");
- space.setAttribute("width", "0.333333em");
- inner.push(space);
- inner = inner.concat(buildExpression(group.value.value, options));
- }
- if (group.value.modType === "pod" || group.value.modType === "pmod") {
- inner.push(new _mathMLTree2.default.MathNode("mo", [makeText(")", group.mode)]));
- }
-
- return new _mathMLTree2.default.MathNode("mo", inner);
- };
-
- groupTypes.katex = function (group) {
- var node = new _mathMLTree2.default.MathNode("mtext", [new _mathMLTree2.default.TextNode("KaTeX")]);
-
- return node;
- };
-
- groupTypes.font = function (group, options) {
- var font = group.value.font;
- return buildGroup(group.value.body, options.withFont(font));
- };
-
- groupTypes.delimsizing = function (group) {
- var children = [];
-
- if (group.value.value !== ".") {
- children.push(makeText(group.value.value, group.mode));
- }
-
- var node = new _mathMLTree2.default.MathNode("mo", children);
-
- if (group.value.mclass === "mopen" || group.value.mclass === "mclose") {
- // Only some of the delimsizing functions act as fences, and they
- // return "mopen" or "mclose" mclass.
- node.setAttribute("fence", "true");
- } else {
- // Explicitly disable fencing if it's not a fence, to override the
- // defaults.
- node.setAttribute("fence", "false");
- }
-
- return node;
- };
-
- groupTypes.styling = function (group, options) {
- // Figure out what style we're changing to.
- // TODO(kevinb): dedupe this with buildHTML.js
- // This will be easier of handling of styling nodes is in the same file.
- var styleMap = {
- "display": _Style2.default.DISPLAY,
- "text": _Style2.default.TEXT,
- "script": _Style2.default.SCRIPT,
- "scriptscript": _Style2.default.SCRIPTSCRIPT
- };
-
- var newStyle = styleMap[group.value.style];
- var newOptions = options.havingStyle(newStyle);
-
- var inner = buildExpression(group.value.value, newOptions);
-
- var node = new _mathMLTree2.default.MathNode("mstyle", inner);
-
- var styleAttributes = {
- "display": ["0", "true"],
- "text": ["0", "false"],
- "script": ["1", "false"],
- "scriptscript": ["2", "false"]
- };
-
- var attr = styleAttributes[group.value.style];
-
- node.setAttribute("scriptlevel", attr[0]);
- node.setAttribute("displaystyle", attr[1]);
-
- return node;
- };
-
- groupTypes.sizing = function (group, options) {
- var newOptions = options.havingSize(group.value.size);
- var inner = buildExpression(group.value.value, newOptions);
-
- var node = new _mathMLTree2.default.MathNode("mstyle", inner);
-
- // TODO(emily): This doesn't produce the correct size for nested size
- // changes, because we don't keep state of what style we're currently
- // in, so we can't reset the size to normal before changing it. Now
- // that we're passing an options parameter we should be able to fix
- // this.
- node.setAttribute("mathsize", newOptions.sizeMultiplier + "em");
-
- return node;
- };
-
- groupTypes.overline = function (group, options) {
- var operator = new _mathMLTree2.default.MathNode("mo", [new _mathMLTree2.default.TextNode("\u203E")]);
- operator.setAttribute("stretchy", "true");
-
- var node = new _mathMLTree2.default.MathNode("mover", [buildGroup(group.value.body, options), operator]);
- node.setAttribute("accent", "true");
-
- return node;
- };
-
- groupTypes.underline = function (group, options) {
- var operator = new _mathMLTree2.default.MathNode("mo", [new _mathMLTree2.default.TextNode("\u203E")]);
- operator.setAttribute("stretchy", "true");
-
- var node = new _mathMLTree2.default.MathNode("munder", [buildGroup(group.value.body, options), operator]);
- node.setAttribute("accentunder", "true");
-
- return node;
- };
-
- groupTypes.accentUnder = function (group, options) {
- var accentNode = _stretchy2.default.mathMLnode(group.value.label);
- var node = new _mathMLTree2.default.MathNode("munder", [buildGroup(group.value.body, options), accentNode]);
- node.setAttribute("accentunder", "true");
- return node;
- };
-
- groupTypes.enclose = function (group, options) {
- var node = new _mathMLTree2.default.MathNode("menclose", [buildGroup(group.value.body, options)]);
- var notation = "";
- switch (group.value.label) {
- case "\\bcancel":
- notation = "downdiagonalstrike";
- break;
- case "\\sout":
- notation = "horizontalstrike";
- break;
- case "\\fbox":
- notation = "box";
- break;
- default:
- notation = "updiagonalstrike";
- }
- node.setAttribute("notation", notation);
- return node;
- };
-
- groupTypes.horizBrace = function (group, options) {
- var accentNode = _stretchy2.default.mathMLnode(group.value.label);
- return new _mathMLTree2.default.MathNode(group.value.isOver ? "mover" : "munder", [buildGroup(group.value.base, options), accentNode]);
- };
-
- groupTypes.xArrow = function (group, options) {
- var arrowNode = _stretchy2.default.mathMLnode(group.value.label);
- var node = void 0;
- var lowerNode = void 0;
-
- if (group.value.body) {
- var upperNode = buildGroup(group.value.body, options);
- if (group.value.below) {
- lowerNode = buildGroup(group.value.below, options);
- node = new _mathMLTree2.default.MathNode("munderover", [arrowNode, lowerNode, upperNode]);
- } else {
- node = new _mathMLTree2.default.MathNode("mover", [arrowNode, upperNode]);
- }
- } else if (group.value.below) {
- lowerNode = buildGroup(group.value.below, options);
- node = new _mathMLTree2.default.MathNode("munder", [arrowNode, lowerNode]);
- } else {
- node = new _mathMLTree2.default.MathNode("mover", [arrowNode]);
- }
- return node;
- };
-
- groupTypes.rule = function (group) {
- // TODO(emily): Figure out if there's an actual way to draw black boxes
- // in MathML.
- var node = new _mathMLTree2.default.MathNode("mrow");
-
- return node;
- };
-
- groupTypes.kern = function (group) {
- // TODO(kevin): Figure out if there's a way to add space in MathML
- var node = new _mathMLTree2.default.MathNode("mrow");
-
- return node;
- };
-
- groupTypes.llap = function (group, options) {
- var node = new _mathMLTree2.default.MathNode("mpadded", [buildGroup(group.value.body, options)]);
-
- node.setAttribute("lspace", "-1width");
- node.setAttribute("width", "0px");
-
- return node;
- };
-
- groupTypes.rlap = function (group, options) {
- var node = new _mathMLTree2.default.MathNode("mpadded", [buildGroup(group.value.body, options)]);
-
- node.setAttribute("width", "0px");
-
- return node;
- };
-
- groupTypes.phantom = function (group, options) {
- var inner = buildExpression(group.value.value, options);
- return new _mathMLTree2.default.MathNode("mphantom", inner);
- };
-
- groupTypes.mclass = function (group, options) {
- var inner = buildExpression(group.value.value, options);
- return new _mathMLTree2.default.MathNode("mstyle", inner);
- };
-
- /**
- * Takes a list of nodes, builds them, and returns a list of the generated
- * MathML nodes. A little simpler than the HTML version because we don't do any
- * previous-node handling.
- */
- var buildExpression = function buildExpression(expression, options) {
- var groups = [];
- for (var i = 0; i < expression.length; i++) {
- var group = expression[i];
- groups.push(buildGroup(group, options));
- }
-
- // TODO(kevinb): combine \\not with mrels and mords
-
- return groups;
- };
-
- /**
- * Takes a group from the parser and calls the appropriate groupTypes function
- * on it to produce a MathML node.
- */
- // TODO(kevinb): determine if removeUnnecessaryRow should always be true
- var buildGroup = function buildGroup(group, options) {
- var removeUnnecessaryRow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
-
- if (!group) {
- return new _mathMLTree2.default.MathNode("mrow");
- }
-
- if (groupTypes[group.type]) {
- // Call the groupTypes function
- var result = groupTypes[group.type](group, options);
- if (removeUnnecessaryRow) {
- if (result.type === "mrow" && result.children.length === 1) {
- return result.children[0];
- }
- }
- return result;
- } else {
- throw new _ParseError2.default("Got group of unknown type: '" + group.type + "'");
- }
- };
-
- /**
- * Takes a full parse tree and settings and builds a MathML representation of
- * it. In particular, we put the elements from building the parse tree into a
- * tag so we can also include that TeX source as an annotation.
- *
- * Note that we actually return a domTree element with a `