No commit activity in last 3 years
No release in over 3 years
A group of plugins that make Jekyll sites easier for research publications. Includes support for LateX formulas and citations
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.5.2
> 0
 Project Readme

__J__ekyll __Sc__ientific plugin - JSC

A plugin which extends markdown to include features akin to Latex's that make markdown viable for research write-ups.

How to use it

In your Jekyll _config.yaml file add a gems array and add jsc to it as in gems : [jsc]

On the command line run

   gem install jekyll-scientific

Git branch structure

To publish your site with JSC, a certain structure is needed. You must have two branches, one must be called gh-pages and the other can be called anything, "master" for example. In master is where you will put all your development content. From the master branch create an orphan branch with:

git checkout --orphan gh-pages

Now delete all the files in the directory and push the new gh-pages branch to Github. Checkout the master branch,edit your content as you see fit and when your finished, commit all your changes in master and push them to Github. Once your master branch is pushed to Github, run the jsc command from the master branch.

jsc publish

This will build your Jekyll site using all your local plugins and then push the site to the gh-pages branch on Github. Give it up to 10 minutes and your site will be accessible.

That's it, plugin specific config options are included below.

What it supports Support

Todo

  • Add pandoc support so that Jekyll site can be completely written in LateX or another format and output to HTML and PDF. See pandoc-multiple-formats or pandoc-plugin

  • Unfortunately you can't run custom plugins with GitHub pages (for obv. reasons). So JSC sites need to be built locally and their _site directory pushed to GitHub. One the list of things to do is use git hooks to automatically build the jekyll site see Git global hooks and Githooks

Configuration

Various config options are available for each plugin included.

Citations

Citations are provided by jekyll-scholar. Visit the link for detailed covered of available options and usage. In summary the following options are available to configure how citations work

   scholar:
     style: apa
     locale: en

     sort_by: none
     order: ascending

     source: bibtex #says refereces.bib stored in bibtex folder
     bibliography: references #says a file called bibtex/references.bib is the main bib file
     bibliography_template: "%{reference}"

     details_dir:    bibliography
     details_layout: bibtex.html
     details_link:   Details

     query: "@*"

To cite a work from the main bib fileuse the cite tag as in: e.g. {% cite kirsch2006distance %} would cite the entry with the given name. To append a list of references at the bottom of the page or post use the references tag as in: {% bibliography -c %},-c tells it to only include citations used on the current page or post without -c all entries from the bibliography file will be listed

LateX math / Formulas

Formulas are done using the MathJax library. There are two tags available for adding math.

  1. {% m %} and {% em %} pairs are used to add math inline i.e. within a sentence

  2. {% math %} and {% endmath %} pairs are used to add math in a centered block as is typical in LateX documents.

For e.g.

{% m %}
	e = mc^2
{% em %}

{% math %}
\mathbf{V}_1 \times \mathbf{V}_2 =  \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\frac{\partial X}{\partial u} &  \frac{\partial Y}{\partial u} & 0 \\
\frac{\partial X}{\partial v} &  \frac{\partial Y}{\partial v} & 0
\end{vmatrix}
{% endmath %}

todo

Formulas are currently not as configurable as they could be. MathJax has a lot of config options that could be added.