
を使って手紙を書いているときに、 8ページのコマンドnewlfm
を使ってみました。\greettoskipbefore
マニュアルそして「未定義の制御シーケンス」というエラーが出ました。ソース、この特定のコマンドは定義されていないようですが、他のすべてのスキップ コマンドは定義されて\greettoskipafter
います。
\def\greettoskipafter#1{\setlength{\@greet@to@sk@a}{#1}}%
\define@key{ov}{greettoskipafter}{\setlength{\@greet@to@sk@a}{#1}}%
プリミティブ TeX をまったく理解していない LaTeX 初心者として、私は困惑しています。手動で追加して\greettoskipbefore
再コンパイルすることnewlfm
も 1 つの選択肢のように思えますが、それは、このパッケージの作者がこの問題を修正するまで、私のシステムでドキュメントをコンパイルできないことを意味します。パッケージが 5 年間更新されていないことを考えると、すぐには修正されない可能性があります。そこで、\greettoskipbefore
一時的なハックとして LaTeX ドキュメントで定義することは可能でしょうか?という質問が浮かびます。
編集: MWEはこちら
\documentclass[11pt,busletternofrom]{newlfm}
\newlfmP{noLines}
\PhrRegard{RE}
\dateset{\today}
\namefrom{John Smith}
\newcommand{\companyname}{Netgear}
\newcommand{\shortcompanyname}{Netgear}
\nameto{Darryl Simpson}
\addrto{
\companyname \\
13911 Wireless Way, Suite 200 \\
Richmond, BC V6V 3B9 \\
}
\regarding{Hardware Design Engineer}
\greetto{Dear Mr. Simpson,}
\closeline{Sincerely,}
\begin{document}
\begin{newlfm}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{newlfm}
\end{document}
答え1
標準の文書クラス内で手紙を書くのは非常に簡単なので、手紙専用の文書クラスを使用する必要性を感じたことは一度もありません。article
ドキュメントクラス(公式の手紙を書くそしてTeX カバーレターに「Sincerely, My Name」が表示されないたとえば、 などです。しかし、それはここでの論点ではありません...
skip は、 " " 節の後にip を\@greet@to@sk@a
配置するためのもので、確かに、" " 節の前にを提供するためのが付随しています。ただし、この長さを設定するための正式な手段は提供されていません。この「欠落している」 skip の位置は、 " ess" 節の後のip (長さ によって提供される)と同じ位置 (垂直方向) にあり、これには設定マクロが使用可能です。sk
a
greet
to
\@greet@to@sk@b
skip
b
greet
to
sk
a
to
addr
\@addr@to@sk@a
\def\addrtoskipafter#1{\setlength{\@addr@to@sk@a}{#1}}%
したがって、欠落しているスキップではなく、このスキップを設定するだけで十分かもしれません。以下に最小限の例を示します(TeX カバーレターに「Sincerely, My Name」が表示されない) はこの効果を強調しています。
\documentclass[10pt,stdletter]{newlfm}
\usepackage{charter}
\widowpenalty=1000
\clubpenalty=1000
\newsavebox{\Luiuc}
\sbox{\Luiuc}{%
\parbox[b]{1.75in}{%
\vspace{0.5in}%
\includegraphics[height=2\baselineskip]{example-image}%
}%
}%
\makeletterhead{Uiuc}{\Lheader{\usebox{\Luiuc}}}
\newlfmP{headermarginskip=20pt}
\newlfmP{sigsize=50pt}
\newlfmP{dateskipafter=20pt}
\newlfmP{addrfromphone}
\newlfmP{addrfromemail}
\PhrPhone{Phone}
\PhrEmail{Email}
\lthUiuc
\namefrom{Matthew J.\ Miller}
\addrfrom{%
439 Coordinated Science Laboratory\\
1308 West Main Street\\
Urbana, IL 61801
}
\phonefrom{217-244-6024}
\emailfrom{[email protected]}
\addrto{%
Faculty Search Committee\\
Department of Computer Science\\
Clemson University\\
Clemson, SC 29634-0974}
\addrfromskipbefore{-4\baselineskip}% Skip before "From Address" clause
\addrtoskipafter{4\baselineskip}% Skip after "To Address" clause
\greetto{To Whom It May Concern,}
\closeline{Sincerely,}
\begin{document}
\begin{newlfm}
I am writing to apply for the position of assistant
professor in Clemson University's Computer Science Department. I plan to receive my
Ph.D.\ degree from the University of Illinois at
Urbana-Champaign in Summer of 2006. My adviser is
Prof.\ Nitin H.\ Vaidya, and my general areas of interest
include wireless and sensor network performance and security.
Having many friends and family in the area, I would be
most enthused to return to the South permanently by accepting
a position at your institution.
In my graduate work, I focus on the design of
energy-efficient protocols and secure key distribution.
More specifically, I have explored various techniques at
multiple layers of the network stack to effectively reduce
the energy consumption of wireless communication. In security,
my work was the first to propose leveraging channel diversity
for sensor network key distribution. My research appears in
the \textit{IEEE Transactions on Mobile Computing} journal as
well as \textit{Infocom 2006} and \textit{ICDCS 2005},
prestigious conferences in the areas of networking and distributed
systems, respectively.
Enclosed is my curriculum vitae (including a list of
publications), contact information for my references, a research
statement, and a teaching statement. All of my publications and
presentations are available at:
http://www.crhc.uiuc.edu/$\sim$mjmille2/publications/
Please let me know if there are any other materials
or information that will assist you in processing my application.
Thank you for your consideration. I look forward to
hearing from you.
\end{newlfm}
\end{document}
かなり大胆な代替案として、独自のものを作成することもできますnewlfm-fix.sty
(local/texmf
必要な修正がすべて含まれているフォルダに)。更新は必要なときにいつでもロードできます(\usepackage{newlfm-fix}
)が、他のディストリビューションに持ち込む必要があります。newlfm
が発行された場合 (...ちなみに、パッケージの作成者に連絡してください)、 を含めるのをやめることができますnewlfm-fix.sty
。
\\[<len>]
内の特定のコンポーネントがnewlfm
で設定されているため、 を使用してスペースを追加することもできますtabular
。たとえば、
\regarding{Hardware Design Engineer\\[4\baselineskip]}
4\normalbaselineskip
「regards」の後に挿入します: