From: Guenter M. <mi...@us...> - 2016-04-26 19:27:08
|
Ahoj, On 2016-04-25, Matěj Cepl wrote: > I am using LyX and LaTeX class scrlttr2 for writing my business > letters. However, whenever I start to write a new letter, I am > painfully reminded that it is actually last use of LyX I have > (with the help of zrst2* tools I can now use Zotero for writing > documents in rST; thank you!). Of course, I could easily write > those letters just in a plain LaTeX in my $EDITOR, but it seems > that highly form-like documents like business letters could be > with benefit written in rST. I guess it is just question of > defining proper roles and some kind of templating. If you are prepared to * do some "creative writing" (using rST objects for different purpose via re-defining the generated LaTeX macros) * use some roles * use a "heavy" custom LaTeX preamble, * eventually use some raw LaTeX this should be possible. Remember, you can set the documentclass, a custom template file, a custom preamble, loaded packages etc in the config file or via command line options. (See the latex writer doc which also applies to the XeTeX writer (generating LaTeX suited for LuaLaTeX and XeLaTeX processing.) Some hints: * all fixed data can go into the custom preamble:: \setkomavar{fromname}{Matěj Cepl} \setkomavar{fromaddress}{27 Golden Leaf Lane\\ A5G 28 Minas Tirith 5} \setkomavar{fromemail}{ma...@ex...} \setkomavar{signature}{Matěj Cepl} \setkomavar{place}{V Praze} \setkomavar{date}{\today} \setkomavar{signature}{Matěj Cepl} * With some role definitions and redefinitions in the preamble:: \newcommand{\DUroleopening}{\opening} \newcommand{\DUroleclosing}{\closing} \newcommand{\DUrolesubject}{\setkomavar{subject}} you can write:: .. role:: subject .. role:: opening .. role:: closing :subject:`Žádost o změnu registrace smlouvy` .. raw:: latex \begin{letter}{ČSOB Penzijní společnost\\ Radlická 333/150\\ 150 57 Praha 5\\ tel.: +420 495 800 600\\ email: \url{cs...@cs...}} :opening:`Žádost o změnu registrace smlouvy` Letter content :closing:`S pozdravem` There is currently no easy way to get line-breaks in exported LaTeX. Handling of the :address: docinfo field is currently hard-coded towards use in an article. This could be improved to allow for a more versatile use by intermediate macros... Günter |