I want to write a private letter where I don't need the address fields. The letter should start with "Dear xx". I know it's a stupid question but I want to know if it is easily possible. I have made a lot of definitions in a lco file and want to reuse them without using another template.
[Tex/LaTex] Letter without “from address” and “to address” and no indention for letter text
koma-scriptscrlttr2
Related Solutions
You could misuse the \publishers
element:
\documentclass[a4paper,12pt,abstracton,titlepage]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage{lmodern}
\titlehead{University}
\title{Title}
\subject{Subject}
\author{Author}
\publishers{%
\normalfont\normalsize%
\parbox{0.8\linewidth}{%
Your abstarct Text. Your abstarct Text. Your abstarct Text.
Your abstarct Text. Your abstarct Text. Your abstarct Text.
Your abstarct Text. Your abstarct Text.
}
}
\begin{document}
\maketitle
\end{document}
Since it’s value normally is centered an in \Large
you have to put in it a \parbox
of the desired width and set the font back to \normalsize
(the \normalfont
is a little superfluous here but does no harm at all).
If this doesn’t fits your needs on can redefine {abstract}
and \maketitle
to let the first collect and store it’s contest and the latter print out the content. But this would be an equal effort as making the title page manually. And only gainful if you need this in more than one or two documents …
Update
How to misuse the \date
field to make the abstract appear higher on the page?
\date{%
\today% thats the default I guess
\\[2\baselineskip]% Space between date and abstract
\normalfont\normalsize%
\parbox{0.8\linewidth}{%
Your abstarct Text. Your abstarct Text. Your abstarct Text.
Your abstarct Text. Your abstarct Text. Your abstarct Text.
Your abstarct Text. Your abstarct Text.
}
}
There’s only the little problem that the argument of \date
can‘t contain paragraphs (i.e. blank lines or \par
) so we must use \\[<dim>]
to get a new line an insert some space.
Markus Kohm, the author if KOMAscript, has included a nowindow
-lco in the samples to his book (see Beispiele aus der 4. Auflage des KOMA-Script-Buches). The sources for the file is:
% nowindow.lco
% Copyright 2008 Markus Kohm
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Markus Kohm.
%
% This work consists of this file only.
%-----------------------------------------------------------------------
\ProvidesFile{nowindow.lco}%
[2003/01/24 v0.1 unsupported letter-class-option]
\@setplength{firstheadwidth}{\textwidth}
\@setplength{toaddrhpos}{\oddsidemargin}
\@addtoplength{toaddrhpos}{1in}
\KOMAoptions{backaddress=false}
\endinput
Copy this source to a text editor and save it as nowindow.lco
in your tex search path (your texmf-local
), or to the same directory as your letter. Remember to update the tex file database (run texhash
or whatever command on your system, for example ‘Refresh FNDB’ from the Settings in MiKTeX.)
A MWE for the use of nowindow.lco
:
\documentclass[UKenglish]{scrlttr2}
\usepackage{babel}
\usepackage[utf8]{inputenx}
\LoadLetterOption{nowindow}
\begin{document}
\begin{letter}{Name of Recipient \\ Address \\ of \\ Recipient}
\opening{Hello} % eg. Hello
\closing{Kind regards} %eg. Regards
\end{letter}
\end{document}
EDIT: PSH asks why you have to add 1in to the \toaddrhpos
. This is explained by Markus Kohn in this reply at Komascript’s home page.
An approximate translation from German:
In the end the 1in originate from the history of TeX. TeX does not start in the outer margin of the page, but move one inch to the left and one inch down. Consequently, the \oddsidemargin is one inch less than the margin on the even side pages. To make it easier for the user, the pseudo-lenght is calculated from the real left margin (and from the real top of the page). Therefore, you have to take that one inch into consideration when you are using \oddsidemargin in an pseudo-lenght.
(German natives, feel free to improve the translation.)
Best Answer
The most basic approach, if you don't want any of the "letter" attributes, is to set the document as-is (not using
\opening
,\closing
, ...):