# [tex-live] Letter template

Kai Hendry hendry at webconverger.com
Sat Jun 18 08:17:45 CEST 2016

Thank you for your reply Zdenek,

On 17 June 2016 at 09:09, Zdenek Wagner <zdenek.wagner at gmail.com> wrote:
> this question has nothing to do with TeX Live maintenance so this should be
> posted somewhere else.

Sorry, please let me know a better forum. Perhaps
http://tex.stackexchange.com/ ?

> Anyway, I am afraid that a good general answer does not exist. Although
> various internationalization projects exist so that you can prepare a
> general template containing macros as \from, \to, \cc etc., the universe is
> not that grey. First, there are different conventions in different countries
> one of them being the position of the signature. Generally it can be said
> that for A4 or letter size paper the font size should be 11pt or 12pt,
> margins should be around 1in (the old Czech standard required 25mm which is

I think that's really the problem I have. I don't even know how to
change the font size or if I even need this lines:

\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\usepackage{xunicode}
\usepackage{babel}

> almost the same dimension). Setting of \parindent and \parskip is also a
> matter of convention. What is the most important is "corporate identity". I
> was asked to prepare letter templates for several companies. The layout was
> designed by a graphuical design studio. The people from the studio do not
> know LaTeX and the companies requested LaTeX so I have implemented it for
> them. In short, if you wish a professional design, ask a graphical designer.
> If you think that you can do it yourself. look at letters that you receive
> from others and try to do it in a similar way.

I don't have the skills to hack tex templates. I would be just
shooting in the dark. I was hoping to find a canonical minimal letter
template and go from there but I was struggling. I did find a couple
of more templates on a Github search:

https://github.com/khemanta/Rescv/blob/master/CL.tex <-- bit complex
https://github.com/albcorp/alb-latex/blob/master/make/serial/example-letter.tex
<-- better

So I've since minimised my template:
https://github.com/kaihendry/letterly/commit/45dd0a0de6590fb2466205f86ffa3cab7db5a780

I find marrying tex with a Web form quite a challenge. Perhaps someone
has already done the work? For example certain characters like # need
escaping. Is there a list?

There are certain commands I need to disable like braces
https://github.com/kaihendry/letterly/blob/master/www/pdf/index.php#L3
I am running in a container which should prevent an attacker "owning"
my system, but it seems very difficult to secure latex from malicious
input.

Has anyone converted markdown the latex? I simply want to be able to
write lists and embolden text and have that reflected in the output
without the jarring latex syntax.

How does one handle emojis or unicode? Since in my tests it doesn't work at all.

And last but not least, why is texlive-bin texlive-core (both seems