Texas-0.1.5 has been yanked.
Texas
Purpose
This crate does not, in any way, even remotely cover the vast variety of things you can do with latex. Instead, it attempts to provide a friendly API for some of the most basic functions. Furthermore, it does not catch most latex errors.
It's also my first foray into the open-source world, so constructive criticism is welcome and appreciated.
Basics
- The primary type is
Document, which you populate per your whims and fancies. This can be written to a file like so:
let mut q = create?;
let doc = new;
write!?
- The document can be filled with
Components,Packages andCommands. Componentis an enum, with each variant containing a separate struct. If a componentimpls thePopulatetrait, you can fill it with moreComponents, then install it in theDocumentlike so:
let mut p1 = new;
p1.attach?
.attach?;
doc.new_component;
Commands can be created and installed like so:
doc.new_command(Command::new("brak", 1, "\\ensuremath{\\left(#1\\right)}"));
- And commands can be called in-text like so:
let mut p1 = section!;
p1.attach?;
p1.attach?;
- Will add ability to generate stuff like
ensuremathfrom code eventually. - Packages can be created and installed like so:
let mut p1 = new;
p1.add_option;
doc.new_package;
- Also has trait
Opt, which allows for adding options to a command (likeusepackageanddocumentclass, for now).
Commands were seriously buggy, so some breaking changes.