Skip to content

Commit

Permalink
Add KOMA-Script variables fromaddress, fromalign; Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mm committed Sep 10, 2016
1 parent 7f64ddc commit 8fe9058
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -4,6 +4,7 @@ This template extends [Pandoc]'s original LaTeX-template by parsing variables an

## Changelog

- **2016-09-10**: Add KOMA-Script variables `fromaddress`, `fromalign`
- **2016-02-11**: Merged changes to Pandoc's `default.latex` template to fetch up with changes in Pandoc. Use [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) language codes instead of the old bable names now, for example `en` or `en-US` instead of `english`, `de-DE` instead of `ngerman`.
- **2015-12-30**: To and from address fields are now standard multiline markdown fields instead of lists, which is easier to read and handle and potentially available for all variables.

Expand All @@ -27,7 +28,7 @@ To make typesetting of letters more convenient, a wrapper script is included, wh

To install the wrapper script `panletter`, copy or link it into your `$PATH`. The usual system-wide location would be `/usr/local/bin`, you can of course also choose any other location or reference the script directly. The basic usage is as easy as

pandletter example-letter.md
panletter example-letter.md

For more details, view `panletter --help`.

Expand Down Expand Up @@ -62,7 +63,7 @@ The only variable required by `scrlttr2` is `to`.

A bunch of KOMA-script variables for `scrlttr2` are exposed, especially all that reflect actual content (like recipient address, ...). Variables not exposed are for example seperators.

Exposed variables, that can directly be used are `addresseeimage`, `backaddress`, `customer`, `date`, `fromaddress`, `frombank`, `fromemail`, `fromfax`, `fromlogo`, `frommobilephone`, `fromname`, `fromphone`, `fromurl`, `fromzipcode`, `invoice`, `location`, `myref`, `place`, `PPdatamatrix`, `PPcode`, `signature`, `specialmail`, `subject`, `title`, `toaddress`, `toname`, `yourmail` and `yourref`. For more details on their use, refer to the [KOMA-script manual].
Exposed variables, that can directly be used are `addresseeimage`, `backaddress`, `customer`, `date`, `firstfoot`, `fromaddress`, `fromalign`, `frombank`, `fromemail`, `fromfax`, `fromlogo`, `frommobilephone`, `fromname`, `fromphone`, `fromurl`, `fromzipcode`, `invoice`, `location`, `myref`, `place`, `PPdatamatrix`, `PPcode`, `signature`, `specialmail`, `subject`, `title`, `toaddress`, `toname`, `yourmail` and `yourref`. For more details on their use, refer to the [KOMA-script manual].

### Template Variables

Expand Down
7 changes: 4 additions & 3 deletions scrlttr2.latex
Expand Up @@ -214,13 +214,15 @@ $endif$
\KOMAoptions{frommobilephone=false}
\KOMAoptions{fromphone=false}
\KOMAoptions{fromurl=false}
\KOMAoptions{fromalign=right}

$for(letteroption)$
\LoadLetterOption{$letteroption$}
$endfor$

$if(addresseeimage)$\setkomavar{addresseeimage}{$addresseeimage$}$endif$
$if(backaddress)$\setkomavar{backaddress}{$backaddress$}\KOMAoptions{backaddress=true}$endif$
$if(fromalign)$\KOMAoptions{fromalign=$fromalign$}$endif$
$if(customer)$\setkomavar{customer}{$customer$}$endif$
$if(date)$\setkomavar{date}{$date$}$endif$
$if(fromaddress)$\setkomavar{fromaddress}{$fromaddress$}$endif$
Expand Down Expand Up @@ -250,11 +252,10 @@ $if(yourmail)$\setkomavar{yourmail}{$yourmail$}$endif$
$if(yourref)$\setkomavar{yourref}{$yourref$}$endif$
$if(opening)$\setkomavar{opening}{$opening$}$endif$
$if(closing)$\setkomavar{closing}{$closing$}$endif$
$if(firstfoot)$\setkomavar{firstfoot}{$firstfoot$}$endif$



\KOMAoptions{
fromalign=right
}

\begin{document}

Expand Down

0 comments on commit 8fe9058

Please sign in to comment.