# texstyles Release 0.0.9

Hundreds of styles fueling Authorea.com's exporter to PDF. Use with the "exportstylist" gem for a Ruby API.

MIT
Install
 gem install texstyles -v 0.0.9 

# TeX Styles

A collection of ERB-based TeX/LaTeX preamble styles, for the world of scholarly writing and beyond. Founded and maintained by the Authorea team.

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

## Common Questions

Does this repository compete with CTAN? No, to the contrary. It builds on top of the CTAN wealth of LaTeX packages, and some custom publisher-provided ones, to assemble styling templates that fully conform to specific sets of submission guidelines. The original use case has been submissions of scholarly articles, but we welcome extensions to theses, homeworks, quizzes, exercise sets, etc.

Why the choice of Ruby and ERB? We wanted to optimize for simplicity and reusability, so we avoided more tool-focused templating solutions, such as Pandoc templates, or more elaborate XML-based solutions common to publishers.

What is the Goal? Anyone should be able to grab this repository, write down a tiny metadata file, split out the header and main body of their LaTeX document and then have it typeset in but a few lines of Ruby (example). We developed this component for our Authorea exporter and are happy to contribute it back to the community and develop it jointly from here on out.

Wait, it's not so simple, how about... This repository collects and refines an ever-growing dataset of stylistic templates for LaTeX documents. As such, it currently focuses entirely on document frontmatter/preamble information, and misses out on a long list of additional concerns, for example:

• citation styles, and going beyond LaTeX citations (via CSL)
• internationalization
• conflict-free use of a default set of packages

To address these issues we have also released the texstylist Ruby gem, which is almost always the preferable entry point, as the texstyles library is included in it and a higher-level API is provided.

## Usage

require 'texstyles'

abstract = '% Abstract goes here'

'title' => 'An example scholarly article',
# ... full range of scholarly metadata omitted for space
'abstract' => abstract
}

# Choose any available Texstyles::Style here
# Full list can be fetched via: Texstyles::Style.list
authorea_style = Texstyles::Style.new(:authorea)

# To obtain the correct latex preamble for the given style:

# Then piece together a document by hand (or use the texstylist gem for further automation)
stylized_document = stylized_preamble + "a basic example\n"  + "\\end{document}"

# Enjoy!

You can see a full example here

## Installation

gem 'texstyles'

And then execute:

$bundle  Or install it yourself as: $ gem install texstyles


### Supported

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

### Upcoming

• Postamble support: Certain styles use a \begin{env}\end{env} wrapper around the entire article body, see e.g. a0poster