将 scrlttr2 格式改为印度风格

将 scrlttr2 格式改为印度风格

我已经写信给部门主管,要求他准予值班。我想将其格式化为印度的书写方式,我想添加“收件人”,我想删除下划线的文本(重复的地址部分),在右上角或底部显示地点和日期,并且在第 6 个,“th”必须作为上标出现。如何实现这些?代码如下:

   \documentclass[pagenumber=false,parskip=half,fromalign=right,foldmarks=true,addrfield=true
,subject=afteropening]{scrlttr2}
\usepackage[english]{babel}
\renewcommand*{\raggedsignature}{\raggedright}

\setkomavar{fromname}{Subham Soni.S}
\setkomavar{fromaddress}{6th Semester \\ B.Tech Computer Science and Engg. \\ Pondicherry Engineering College \\ Puducherry$-$605 014}
\setkomavar{signature}{\textsc{Subham Soni.S}}
\setkomavar{subject}{Request for grant of On$-$Duty regarding,}

\date{\today}
\begin{document}
\begin{letter}{Head of the Department \\ Computer Science and Engineering \\ Pondicherry Engineering College \\ Puducherry$-$605 014 }
\opening{Respected Sir,}
I Subham Soni.S of 6th semester pursuing my B.Tech degree in Computer Science and Engineering request you to grant me \emph{On$-$Duty} on 9-Jan-2014 and 10-Jan-2014 because I attended the National Workshop on Intelligent Information Retrieval(NWIIR) conducted by the Department. 
\closing{Sincerely,}
\end{letter}
\end{document}

在此处输入图片描述

答案1

下划线地址称为反向地址,只需设置选项即可关闭false。要获取序数,KOMA-script 提供了\textsuperscript。更专业的解决方案是使用nth带有选项的包super

\documentclass[pagenumber=false,parskip=half,
fromalign=right,foldmarks=true,addrfield=true
,subject=afteropening,
backaddress=false%<--------
]{scrlttr2}
\usepackage[english]{babel}
\renewcommand*{\raggedsignature}{\raggedright}
%\usepackage[super]{nth} %\nth{6}

\setkomavar{fromname}{Subham Soni.S}
\setkomavar{fromaddress}{6\textsuperscript{th} Semester\\%
B.Tech Computer Science and Eng.\\%
Pondicherry Engineering College\\%
Puducherry--605 014%
}
\setkomavar{signature}{Subham Soni.S}
\setkomavar{subject}{Request for grant of On--Duty regarding,}

\date{\today}
\begin{document}
\begin{letter}{Head of the Department\\%
Computer Science and Engineering\\%
Pondicherry Engineering College\\%
Puducherry--605 014}
    \opening{Respected Sir,}
    I Subham Soni.S of 6th semester pursuing my B.Tech
    degree in Computer Science and Engineering request you
    to grant me \emph{On--Duty} on 9-Jan-2014 and
    10-Jan-2014 because I attended the National Workshop
    on Intelligent Information Retrieval (NWIIR) conducted
    by the Department. 
    \closing{Sincerely,}
\end{letter}
\end{document}

可以更改页面上元素的位置,但需要使用 KOMA 文档高级部分中描述的伪长度专用接口。以下是更改接收方和发送方距离的示例,并另外添加了字符串到:从:

\begin{filecontents}{\jobname-special.lco}
\@setplength{firstheadvpos}{%
  3cm}
\@setplength{toaddrvpos}{%
  5.5cm}
  \endinput
\end{filecontents}
\documentclass[%loading the speacial options
\jobname-special,
backaddress=false]{scrlttr2}
\usepackage[english]{babel}
\renewcommand*{\raggedsignature}{\raggedright}

\setkomavar{fromname}{Subham Soni.S}
\setkomavar{fromaddress}{6\textsuperscript{th}
Semester\\%
B.Tech Computer Science and Eng.\\%
Pondicherry Engineering College\\%
Puducherry--605 014%
}
\setkomavar{signature}{Subham Soni.S}
\setkomavar{subject}{Request for grant of On--Duty regarding,}
\providecommand{\fromstartstring}{From:}
\usepackage{regexpatch}
\makeatletter
\tracingxpatches% for debugging
\xpatchcmd*{\@gen@firsthead}{%
    \usekomafont{fromname}\strut\ignorespaces}%
    {\fromstartstring\\\usekomafont{fromname}\strut\ignorespaces}{}{}
\makeatother
\date{\today}
\begin{document}
\begin{letter}{To:\\Head of the Department\\%
Computer Science and Engineering\\%
Pondicherry Engineering College\\%
Puducherry--605 014}
    \opening{Respected Sir,}
    I Subham Soni.S of 6th semester pursuing my B.Tech
    degree in Computer Science and Engineering request you
    to grant me \emph{On--Duty} on 9-Jan-2014 and
    10-Jan-2014 because I attended the National Workshop
    on Intelligent Information Retrieval (NWIIR) conducted
    by the Department. 
    \closing{Sincerely,}
\end{letter}
\end{document}

subhamSclttrP长度

KOMA 字体中的信件是可重复使用的材料(根据某些标准),能够使用数据库发送数千封信件。如果没有限制或想要写一封非正式信件,则可以使用简单的文章文档来实现以下目的:

subham非正式

\documentclass[parskip=half]{scrartcl}
\usepackage{blindtext}
\begin{document}
\begin{parbox}{.5\linewidth}
    \raggedright
    From:\\The sender\\
    Sesame street\\
    N.Y.C\\[1cm]
    To:\\The receiver\\
    Elm Street\\
    Horror Twon
\end{parbox}
\begin{center}\bfseries I want to have a day off\end{center}
\hfill\mbox{2014-12-23}\bigbreak
Respected sir,

please let me have a day off. I am tired. \blindtext
\bigbreak
Sincerely,\par Your Slave
\end{document}

相关内容