如何在 LaTeX 中将信件中的日期从右侧(默认)移动到左侧?

如何在 LaTeX 中将信件中的日期从右侧(默认)移动到左侧?

我想准备一封求职信,为此我从在线网站下载了一个模板。LaTeX 代码如下。默认情况下,日期显示在右上角。我该如何将其移到左侧?我是 LaTeX 新手,任何有关这方面的帮助都将不胜感激。

\documentclass{letter}
\usepackage{amssymb,amsmath}
\usepackage{graphicx}
\oddsidemargin=.2in
\evensidemargin=.2in
\textwidth=5.9in
\topmargin=-.5in
\textheight=9in


\newcommand {\qed}{\mbox{$\Box$}}
\renewcommand {\iff}{\Longleftrightarrow}
\newcommand {\R}{\mathbb{R}}
\newcommand {\N}{\mathbb{N}}
\newcommand {\Q}{\mathbb{Q}}
\newcommand {\Z}{\mathbb{Z}}

\newcommand {\sub}{\mbox{SB}}


\begin{document}
\begin{letter}{Mathematics Search Committee\\
Department of Mathematics\\
University of Somewhere\\
1234 Math Building
Somewhere, IL, 23456}


\opening{Dear Search Committee,}

My research interests include continuous logic and its application to metric structures from analysis and geometry. My thesis work is on the model theory of $\R$-trees, which are metric spaces of central importance in geometric group theory. I am currently finishing a paper with my advisor, and expect at least one more paper to result from the contents of my thesis.

\closing{Sincerely, }
Sylvia Carlisle\\
\end{letter}

\end{document}

在此处输入图片描述

答案1

\date一个想法是通过重新定义或实际上将日期刷新到左侧\@date。(这要求这是唯一\@date使用的地方。)

\documentclass{letter}
\usepackage{amssymb,amsmath}
\usepackage{graphicx}
\oddsidemargin=.2in
\evensidemargin=.2in
\textwidth=5.9in
\topmargin=-.5in
\textheight=9in


\newcommand {\qed}{\mbox{$\Box$}}
\renewcommand {\iff}{\Longleftrightarrow}
\newcommand {\R}{\mathbb{R}}
\newcommand {\N}{\mathbb{N}}
\newcommand {\Q}{\mathbb{Q}}
\newcommand {\Z}{\mathbb{Z}}

\newcommand {\sub}{\mbox{SB}}

%%%%%%%%%%%%%% New stuff
\makeatletter
\renewcommand\date[1]{\gdef\@date{\hbox to \linewidth{#1\hss}}}
\makeatother
\date{\today}
%%%%%%%%%%%%%%

\begin{document}
\begin{letter}{Mathematics Search Committee\\
Department of Mathematics\\
University of Somewhere\\
1234 Math Building
Somewhere, IL, 23456}


\opening{Dear Search Committee,}

My research interests include continuous logic and its application to metric structures from analysis and geometry. My thesis work is on the model theory of $\R$-trees, which are metric spaces of central importance in geometric group theory. I am currently finishing a paper with my advisor, and expect at least one more paper to result from the contents of my thesis.

\closing{Sincerely, }
Sylvia Carlisle\\
\end{letter}

\end{document}

在此处输入图片描述

答案2

你可以加

\date{\begin{flushleft}\today\end{flushleft}}

低于你的\begin{document}

希望这可以帮助!

相关内容