TEXAS
This crate used to be Texas with a capital T. An issue was raised, and thus I have 'renamed' it the only way I know how. Apologies for any inconvenience. It is now rust-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. https://github.com/Abhay478/texas/issues
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 = document!;
write!?
- The document can be filled with
Components,Packages andCommands. They can be created using both functions and macros. 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 = part!;
p1.attach?
.attach?; // and so on.
p1.attach_vec?;
doc.new_component;
Commands can be created and installed like so:
doc.new_command;
- And commands can be called in-text like so:
let mut p1 = section!;
p1.attach?;
- Will add ability to generate stuff like
ensuremathfrom code eventually. - Packages can be created and installed like so:
doc.new_package;
- Also has trait
Opt, which allows for adding options to a command (likeusepackageanddocumentclass, for now).
Log
-
0.1.7
package!macro wasn't working, fixed that.- Moved the modules to the front (re-exported them in
lib.rs) for convenience.
-
0.1.8
- Small whoops. Latex errors due to
Linecode.
- Small whoops. Latex errors due to
-
0.1.9
- Brought structs into scope.
-
0.2.1
- Documentation is a thing now.
-
0.2.2
- Images and tables.
- Fixed a few documentation hiccups.
- Fixed another problem with the
package!macro. Wasn't really crippling to begin with.
-
0.2.3
- Lil cleanup
- Finally added the ensuremath stuff. Adding a bunch more.