Created
June 28, 2012 14:43
-
-
Save wildmichael/3011745 to your computer and use it in GitHub Desktop.
Diacritics problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% | |
%% This is file `brief.cls', | |
%% generated with the docstrip utility. | |
%% | |
%% The original source files were: | |
%% | |
%% brief.dtx (with options: `class') | |
%% | |
%% This is a generated file. | |
%% Copyright (C) 2012 by Michael Wild | |
%% This file may be distributed and/or modified under the | |
%% conditions of the LaTeX Project Public License, either | |
%% version 1.2 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.2 or later is part of all distributions of | |
%% LaTeX version 1999/12/01 or later. | |
\NeedsTeXFormat{LaTeX2e}[1999/12/01] | |
\ProvidesClass{brief} | |
[2012/06/27 v0.1 | |
Letter class for testing] | |
\LoadClassWithOptions{letter} | |
\RequirePackage{ifthen} | |
\RequirePackage{graphicx} | |
\RequirePackage{lastpage} | |
\RequirePackage{fontenc} | |
\RequirePackage{ragged2e} | |
\RequirePackage{babel} | |
\RequirePackage{hyperref} | |
\DeclareOption{oneside}{\PassOptionsToClass{oneside}{letter}} | |
\DeclareOption{twoside}{\PassOptionsToClass{twoside}{letter}} | |
\DeclareOption{final}{\PassOptionsToClass{final}{letter}} | |
\DeclareOption{draft}{\PassOptionsToClass{draft}{letter}} | |
\DeclareOption{leqno}{\PassOptionsToClass{leqno}{letter}} | |
\DeclareOption{fleqn}{\PassOptionsToClass{fleqn}{letter}} | |
\newboolean{brief@german} | |
\newcommand{\mypagename}{page} | |
\DeclareOption{english}{ | |
\renewcommand{\mypagename}{page} | |
\renewcommand{\enclname}{\textbf{Enclosures: }} | |
\renewcommand{\cc}{\textbf{CC: }} | |
\renewcommand{\ps}{\textbf{PS: }} | |
\PassOptionsToPackage{english}{babel} | |
\setboolean{brief@german}{false} | |
} | |
\DeclareOption{german}{ | |
\renewcommand{\mypagename}{Seite} | |
\renewcommand{\enclname}{}% \textbf{Anlage(n): }} | |
\renewcommand{\ps}{}% \textbf{PS: }} | |
\renewcommand{\cc}{{Kopie: }} | |
\PassOptionsToPackage{ngerman}{babel} | |
\setboolean{brief@german}{true} | |
} | |
\DeclareOption*{\ClassWarning{brief}{Unknown option `\CurrentOption'}} | |
\ProcessOptions\relax | |
\AtBeginDocument{ | |
\pagestyle{headings} | |
\raggedright | |
} | |
\renewcommand{\familydefault}{phv} | |
\renewcommand{\sfdefault}{phv} | |
\DeclareFixedFont{\x}{T1}{phv}{m}{n}{10} | |
\DeclareFixedFont{\xb}{T1}{phv}{b}{n}{10} | |
\newfont{\xiiiv}{phvr8t at 8.5pt} | |
\newfont{\xiiivb}{phvb8t at 8.5pt} | |
\setlength{\textwidth}{16.6cm} | |
\setlength{\textheight}{23.5cm} | |
\setlength{\voffset}{-0.49cm} | |
\setlength{\topmargin}{0cm} | |
\setlength{\headheight}{0cm}% | |
\setlength{\headsep}{1.45cm}% | |
\setlength{\oddsidemargin}{-3mm} | |
\setlength{\evensidemargin}{\oddsidemargin} | |
\setlength{\hoffset}{0cm} | |
\setlength{\topskip}{0cm} | |
\setlength{\footskip}{15mm} | |
\renewcommand{\ps@firstpage} | |
{ | |
\renewcommand{\@oddhead}{}% | |
\renewcommand{\@oddfoot}{\hfill \raggedleft \mbox{\mypagename~\thepage~/~\pageref{LastPage}}} | |
\renewcommand{\@evenhead}{}\renewcommand{\@evenfoot}{}} | |
\renewcommand{\ps@headings} | |
{ | |
\renewcommand{\@oddhead}{\mbox{\ifx\@empty\BetreffTextHead{\ } \else\textbf{\BetreffTextHead}\fi}}% | |
\renewcommand{\@oddfoot}{\hfill \raggedleft \mbox{\mypagename~\thepage~/~\pageref{LastPage}}} | |
\renewcommand{\@evenhead}{\@oddhead} | |
\renewcommand{\@evenfoot}{\@oddfoot} | |
} | |
\newcommand{\brief@EinheitName}{} | |
\newcommand{\brief@EinheitInfo}{} | |
\newcommand{\brief@PersonName}{} | |
\newcommand{\brief@PersonAdresse}{} | |
\newcommand{\brief@PersonInfo}{} | |
\newcommand{\brief@Ort}{Z\"urich} | |
\newcommand{\brief@Betreff}{\vspace{-6mm}} | |
\newcommand{\BetreffTextHead}{\vspace{-6mm}} | |
\newcommand{\EinheitName} [1]{\renewcommand{\brief@EinheitName}{#1}} | |
\newcommand{\EinheitInfo} [1]{\renewcommand{\brief@EinheitInfo}{#1}} | |
\newcommand{\PersonName} [1]{\renewcommand{\brief@PersonName}{#1}} | |
\newcommand{\PersonAdresse}[1]{\renewcommand{\brief@PersonAdresse}{#1}} | |
\newcommand{\PersonInfo} [1]{\renewcommand{\brief@PersonInfo}{#1}} | |
\newcommand{\Ort} [1]{\renewcommand{\brief@Ort}{#1}} | |
\newcommand{\Betreff} [2][]{\renewcommand{\brief@Betreff}{#2}% | |
\ifthenelse{\equal{#1}{}}% | |
{\renewcommand{\BetreffTextHead}{#2}}% | |
{\renewcommand{\BetreffTextHead}{#1}} | |
} | |
\let\UnitName\EinheitName | |
\let\UnitInfo\EinheitInfo | |
\let\PersonAddress\PersonAdresse | |
\let\City\Ort | |
\let\Subject\Betreff | |
\let\subject\Betreff | |
\renewcommand{\opening}[1]{% | |
\thispagestyle{firstpage} % Special style for firstpage | |
\setlength{\unitlength}{1mm} | |
\begin{picture}(166,63) | |
\put(-1,88){ | |
\begin{picture}(0,0) | |
\put(98,0){\makebox(0,0)[lt]{% | |
\begin{minipage}[t]{68mm} | |
{\xiiivb \brief@EinheitName}\\[4mm] | |
{\xiiiv \brief@PersonAdresse}\\[4mm] | |
{\xiiivb \brief@PersonName}\\ | |
{\xiiiv \brief@PersonInfo} | |
\end{minipage} | |
}} | |
\end{picture} | |
} | |
\end{picture} | |
\par | |
\brief@Ort, \@date | |
\par | |
\ifx\@empty\brief@Betreff\else\textbf{\brief@Betreff}\vspace{5mm}\fi | |
\par | |
{\x #1} | |
\par | |
\flushbottom | |
} | |
\renewcommand{\closing}[1]{\par \ \par \nobreak% | |
\stopbreaks | |
\noindent | |
\ifx\@empty\fromaddress\else | |
\hspace*{\longindentation} | |
\fi | |
\parbox{\indentedwidth}{\raggedright | |
\ignorespaces \x #1\\[6\medskipamount]% | |
\ifx\@empty\fromsig | |
\fromname | |
\else \fromsig \fi\strut}% | |
\ \par | |
\ \par | |
} | |
\endinput | |
%% | |
%% End of file `brief.cls'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[german]{brief} | |
\EinheitName{XYZ Departement} | |
\EinheitInfo{SSS} | |
\PersonName{Felix Muster} | |
\PersonAdresse{% | |
Universit\"at AAA\\ Geb\"aude XX\\ | |
Beispielplatz 5 \\ CH-8000 Z\"urich% | |
} | |
\PersonInfo{% | |
{\setlength{\tabcolsep}{0mm} | |
\begin{tabular}{@{}l@{~}l@{}} | |
Tel & +41-44-63 2a aaa \\ | |
Fax & +41-44-63 2a aab\\ | |
Mobil & +41-79-59 aa bbb\\ | |
\end{tabular} }\\[0.6ex] | |
[email protected]\\ | |
www.muster.aaa.ch | |
} | |
\Ort{Z\"urich} | |
\signature{Felix Muster} | |
\Betreff{Beispiel f\"ur Briefvorlage} | |
\begin{document} | |
\begin{letter}{Johanna Beispiel \\ | |
Industrieweg 1 \\ | |
ACME Corp. \\ | |
9999 Ort} | |
\opening{Liebe Frau Beispiel,} | |
Nunc congue mauris non justo dapibus a condimentum sapien convallis. | |
Vivamus dictum tristique imperdiet. Nulla facilisi. Donec id nunc lacus, in | |
aliquet arcu. Nullam dapibus urna sem, quis vehicula arcu. Proin eget nisl | |
sem. Pellentesque habitant morbi tristique senectus et netus et malesuada | |
fames ac turpis egestas. Vivamus urna nisi, venenatis quis interdum vel, | |
varius quis sapien. Donec risus nibh, facilisis in laoreet eleifend, | |
volutpat id massa. | |
Donec placerat, nulla vel lacinia ultricies, nulla dolor accumsan purus, ac | |
laoreet massa tellus pharetra ligula. Vivamus lobortis placerat quam, nec | |
dapibus ligula aliquam et. Nullam ut nunc quis orci fringilla pellentesque. | |
Nam semper tempus metus sit amet tincidunt. Praesent tempus mi ac erat | |
porttitor semper. Vestibulum ante ipsum primis in faucibus orci luctus et | |
ultrices posuere cubilia Curae; Nulla mattis luctus enim, eu venenatis est | |
porttitor in. Nulla vulputate erat a eros tincidunt tincidunt. Sed | |
convallis quam quis felis molestie nec mollis lorem ultrices. Donec orci | |
sapien, euismod eget venenatis sed, pulvinar ut mauris. Maecenas vehicula | |
dapibus dui porttitor vulputate. Praesent eu elementum mauris. Nullam nisi | |
metus, cursus in sollicitudin vitae, venenatis sed massa. Praesent bibendum | |
turpis sit amet odio condimentum adipiscing. Etiam at euismod elit. | |
Vestibulum a risus velit, ac aliquet dolor. | |
\closing{Mit freundlichen Gr\"ussen} | |
\cc{Kopieempf\"anger 1, Kopieempf\"anger 2} | |
\encl{Beilage 1 \\ Beilage 2} | |
\ps{Irgend ein Text am Ende der Seite.} | |
\end{letter} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment