TeX Stylist

Authorea's TeX-based stylist. Think Instagram filters for scholarly documents.

CAUTION: This repository is in a pre-alpha dev sprint, consider it completely unstable until a 0.1.0 release

Build Status license Gem Version

Common Questions

Who is this gem intended for? Mostly for people working on micro-publication platforms interested in a turnkey solution to customizing the appearance of exported documents. If you're an author you can simply, and freely, use the export features of Authorea.

Can I directly use it on my LaTeX documents? Almost. As convention has it with Authorea, you can use your document body directly, but we request that you prepare the document metadata separately, together with the customization parameters.

We have also released the texstyles Ruby gem, which contains the full list of scholarly styles used at Authorea. We welcome contributions and corrections!

Usage

require 'texstylist'

header = '% A latex preamble, of e.g. custom macro definitions, or custom overrides for the desired style'
abstract = 'An (optional) document abstract'
body = 'An example article body.'

 = {
  'title' => 'An example scholarly article',
  'abstract' => abstract,
  # ... full range of scholarly metadata omitted for space
  'bibliography' => 'biblio.bib',
  # any bibtex or CSL citation style is accepted
  'citation_style' => 'apacite',
}

# Any available Style from the texstyles gem is accepted
stylist = Texstylist.new(:authorea)
# A single render call styles the document and citations, typesets the metadata, and handles internationalization
styled_doc = stylist.render(body, header, )

# Enjoy!

You can see a full example here.

Installation

Add this line to your application's Gemfile:

gem 'texstylist'

And then execute:

$ bundle

Or install it yourself as:

$ gem install texstylist

Roadmap

Supported via Texstyles

  • 100+ and growing scholarly export styles
  • Core metadata items of scholarly articles
  • White/blacklisting LaTeX style and class conflicts
  • Independent citation style specifications

Support via Texstylist

  • Unicode-only input and output
  • Automatic internationalization for LaTeX via babel and pdflatex, by analyzing Unicode locales
  • Citation styling API, supporting both CSL and bibtex style files (.bst)

Upcoming

  • Use a standard vocabulary and serialization format(s) for scholarly metadata
  • Undergo a round of community feedback and evolve the gem respectively

License

The gem is available as open source under the terms of the MIT License.