Project

texstylist

0.01
No commit activity in last 3 years
No release in over 3 years
Produces a TeX document from a document+style specification pair. Use with the texstyles gem for easy access to hundreds of styles.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
~> 5.0
~> 0.10
~> 10.0

Runtime

= 1.0.1.7
~> 1.8
~> 2.5
~> 0.0.9
 Project Readme

TeX Stylist

Authorea's TeX-based stylist.

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.'

metadata = {
  '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, metadata)

# 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.