Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Commit

Permalink
Add configuration features to README
Browse files Browse the repository at this point in the history
  • Loading branch information
shuber2 committed Sep 20, 2013
1 parent 617e819 commit 48f2793
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.markdown
Expand Up @@ -6,10 +6,10 @@ The available modes are %TEXT%, $MATH$, and %%PREAMBLE%%.
Markdown-LaTeX can technically allow for any sort of LaTeX expression, but there are three main modes that make writing everything much easier.

### %TEXT% mode
The most basic of the modes is %TEXT% mode. Any expression within %TEXT% will be parsed in a basic LaTeX text-mode, e.g. plain. For example, %"Justin Bruce Van Horne"%.
The most basic of the modes is %TEXT% mode. Any expression within %TEXT% will be parsed in a basic LaTeX text-mode, e.g. plain. For example, %``Justin Bruce Van Horne''%.

### $MATH$ mode
Math mode is our second basic functinality of Markdown-LaTeX. It automatically puts LaTeX into math mode and allows for inline and multiline expressions. Let's say that we wanted to write [Euler's formula](http://en.wikipedia.org/wiki/Euler's_formula): We would then write $e^{\imath x} = \cos{x} + \imath\sin{x}$.
Math mode is our second basic functionality of Markdown-LaTeX. It automatically puts LaTeX into math mode and allows for inline and multiline expressions. Let's say that we wanted to write [Euler's formula](http://en.wikipedia.org/wiki/Euler's_formula): We would then write $e^{\imath x} = \cos{x} + \imath\sin{x}$.

### %%PREAMBLE%% mode
Preamble mode is the only "complex" mode. It allows you to add to the preamble of the LaTeX template. So, if there are specific packages or commands you want for the HTML page, then this is where to do it. This is a global modifier and will affect the entire document. I haven't come up with an intuitive design for a per-expression basis.
Expand All @@ -27,6 +27,19 @@ You can either copy it into the extensions sub-directory in your markdown folder
## Usage
markdown -x latex somefile.markdown > somefile.html

## Configuration

This plugin uses dvipng in order to produce the output images. The arguments
passed to dvipng are configurable, see tests/markdown-latex.cfg for an example.
In particular, you may want to adapt the argument passed to the -D option in
order to change output resolution resp. font size.

You may also change the delimiters used for text, math and preamble mode within
the configuration file, see tests2/markdown-latex.cfg. When running this plugin
on existing text you need to escape all occurrences of % and $. Changing
delimiters may reduce this effort.


----

## How does it work?
Expand All @@ -37,3 +50,4 @@ The LaTeX extension will search for either $text$ or %text% expressions. For eac
## Suggestions/Improvements:
- [Geremy Condra](https://github.com/debatem1)
- [Jabba Laci](https://github.com/jabbalaci)
- [Stefan Huber](https://github.com/shuber2)

0 comments on commit 48f2793

Please sign in to comment.