git clone https://github.com/nfd/texdown(Or use Mercurial: hg clone git+ssh://firstname.lastname@example.org/nfd/texdown)
python texdown2latex.py infile.texdown outfile.tex
Bold: Surround the text with single asterisks.
Italics: Surround the text with single forward slashes.
Teletype: Surround the text with '' on both sides.
Chapters: Create a chapter by putting "##" on either side of the chapter name.
Sections: Same idea, using "=="
Subsections: Same again, using "=".
Subsubsections: And same again, using "-".
Labels: Create a label by surrounding the label name with "<<" and ">>".
References: Use single square brackets for referencing.
Citations: Use "[[" and "]]" for citations.
Captions: Use "~~ " and " ~~" to create a caption. Captions may contain labels.
Bulleted lists: create a bulleted list by starting a one or more lines with one or more spaces, then a single asterisk.
Definition lists: Each element must start with a space and end with a colon.
Type !! at the start of a line, followed by a macro name, followed by any arguments, to run a single-line macro.
Indent one or more contiguous lines with a single tab character. This forms a "block". At the end of the first line, type a tab, then "!!", then the name of the macro to be invoked on this block.
texdown2latex attempts to import localmacros.py when it starts up. A sample is included in the distribution. Inside localmacros.py, define a class named Macros. Then, add your macros. The function name should start with the macro_ followed by the name you'd like to reference the macro by from within your Texdown document.
These commands start with "!!" at the beginning of the line. The implementing function takes a single parameter (apart from self), args, which contains everything typed after the macro name on the same line. The function macro_floatgraphic gives an example.
These commands mark-up blocks, which are defined as contiguous lines each indented with one or more tab characters, where the first line ends with a tab character, !!, and a macro name. These take as an argument a list of lines in the block. The lines have their first tab character stripped, as well as the macro name sequence on the first line. macro_floatcode gives an example.