mtx v0.0.1
Work in progress
mtx
LaTeX on crack
Package manager for LaTeX.
latex.json
This file defines the properties of a module.
Type of content
There can be up to three types of content files in a module:
stylesheetbibliographytext
stylesheet
Defines stylesheet components that can be included via the \usepackage macro.
bibliography
Defines bibliographical components. mtx build uses bibtex to generate the
bibliography.
text
Defaults
{
"compiler" : "xelatex" ,
"dependencies" : [ ] ,
"template" : "default" ,
"stylesheet" : {
"files" : "sty" ,
"name" : "stylesheet" ,
"processor" : "default" ,
} ,
"bibliography" : {
"files" : "bib" ,
"name" : "bibliography" ,
"processor" : "default" ,
} ,
"text" : {
"files" : "tex" ,
"name" : "text" ,
"processor" : "default" ,
} ,
}The default template and processors simply concatenate files in lexicographic order. I am still not sure how we will allow to use external templates and processors.
Examples
The following examples try to exhaustively expose the power of mtx.
Dependencies
This latex.json illustrates how to declare dependencies.
{
"dependencies" : [
"dblp:journals/algorithmica/CardinalJ15" ,
"github:aureooms/sty-symbols-polylog#master@^1.0.0" ,
"github:aureooms/sty-symbols-3SUM#without-dash" ,
"github:aureooms/sty-symbols-k-SUM#with-dash@^1.0.0" ,
"github:aureooms/theorem-BSG" ,
] ,
}The syntax for a dependency is registry:uri. Currently supported
registries are:
- url
- github
- dblp
Currently supported urls are:
- git url
- zip file containing any of the above
- tar.gz file containing any of the above
actions
mtx i|install
- install dependencies
mtx i|install <module>
- install module as a dependency
mtx r|remove <module>
- remove a dependency
mtx u|update [<module>]
Updates dependencies.
mtx U|upgrade [<module>]
Upgrades dependencies.
mtx b|build [<**options>]
Requires at least text files to be defined:
- compiles dependencies (recursively) and own files into
- single stylesheet (default
stylesheet.sty) - single bib file (default
bibliography.bib) - single text file (default
text.tex)
- single stylesheet (default
- process text file with compiler of choice (default
xelatex)
The <**options> arguments override the configuration found in the
latex.json file.
mtx D|detach <dependency>
Create hard copy of dependency for modification. This removes the dependency
from the latex.json file.
mtx B|bundle <dest> [<**options>]
Bundle all types of content files into a small number of files. Can be used to
make an archive of the project, share the project with peers, continue to work
without mtx, etc.
mtx A|archive <dest> [-a <archiver>] [<**options>]
Bundles then compress the folder. Uses zip by default.
10 years ago