농담대학교 개교 제10주년 및 전서 개설 제8주년 - 내년에도 만나요~ 제발~
이제는 평창입니다

사용자:Tigger10/수업자료/pm1.sty

농담학회 전서
이동: 둘러보기, 검색

% Style file for Physical Mathematics I % Ewan Stewart % KAIST % 2010/9/10


%%%% Layout %%%%

\addtolength{\hoffset}{-1cm} \addtolength{\textwidth}{2cm} \addtolength{\voffset}{-1cm} \addtolength{\headheight}{1mm} \addtolength{\textheight}{1.9cm} % Reduces the margins and expands the text to fit.

\def\today{\number\day~\ifcase\month \or January\or February\or March\or April\or May\or June% \or July\or August\or September\or October\or November\or December% \fi\space\number\year} % Redefines the date format generated by "\today".

\usepackage{fancyhdr} % A package for adding fancy headers and footers. \renewcommand{\headrulewidth}{0pt} % Eliminates the headrule. \pagestyle{fancy} \lhead{PH211} \chead{Physical Mathematics I} \rhead{Fall 2010} \lfoot{Ewan Stewart} \rfoot{\number\year/\number\month/\number\day}


%%%% Figures %%%%

\usepackage{tikz} % PGF figures %\usepackage{graphicx} % A package for including external graphics (included in the TikZ package loaded above).

\tikzset{->-/.style={->,shorten > = -0.5\pgflinewidth}} % Defines "->-" to be "->" lengthened appropriately for a mid-line arrow.


%%%% Color %%%%

%\usepackage{xcolor} % A package to add color (included in the TikZ package loaded above). \definecolor{green}{rgb}{0,0.8,0} % Redefines the color green.


%%%% Mathematics %%%%

\usepackage{amssymb} % A package for extra mathematical symbols. \usepackage{bm} % A package for bold mathematical symbols.

\newcommand{\N}{\mathbb{N}} % Defines the command "\N" to be "N" written in blackboard bold font. \newcommand{\Z}{\mathbb{Z}} \newcommand{\R}{\mathbb{R}} \newcommand{\C}{\mathbb{C}}

\renewcommand{\Re}{\mathop{\mathrm{Re}}} % Redefines the command "\Re" to be "Re" written in Roman font and treated as a mathematical operator. \renewcommand{\Im}{\mathop{\mathrm{Im}}} \newcommand{\sgn}{\mathop{\mathrm{sgn}}} \newcommand{\Tr}{\mathop{\mathrm{Tr}}}

\renewcommand{\d}[1]{\mathinner{d#1}} % Redefines the command "\d{ }" to be "d" followed by its argument and treated as a sub-formula. \newcommand{\fn}[2]{\mathinner{#1\mathopen{\left(#2\right)}}} % Defines the command "\fn{ }{ }" to be its first argument followed by "\left(" followed by its second argument followed by "\right)" and treated as a sub-formula. The "\mathopen" command makes the spacing before the "\left(" appropriate for a "(" rather than a sub-formula. \newcommand{\order}[1]{\mathinner{\mathcal{O}\mathopen{\left(#1\right)}}} \newcommand{\group}[2]{\fn{\mathrm{#1}}{#2}}

\newcommand{\bra}[1]{\left\langle #1 \right|} % Defines a new command "\bra{ }" to be a left angled bracket "\langle" followed by its argument followed by "|". \newcommand{\ket}[1]{\left| #1 \right\rangle} \newcommand{\braket}[2]{\left\langle \mathord{#1} | \mathord{#2} \right\rangle} % Defines a new command "\braket{ }{ }" to be a left angled bracket "\langle" followed by its first argument followed by "|" followed by its second argument followed by a right angled bracket "\rangle".

\newcommand{\hilbert}[1]{\mathcal{#1}} % Defines the notation for Hilbert spaces to be calligraphic.

\newcommand{\vect}[1]{\bm{#1}} % Defines vector notation to be boldface. \newcommand{\unitvect}[1]{\hat{\bm{#1}}} % Defines unit vector notation to be hatted boldface. %\newcommand{\vect}[1]{\!\vec{\,#1}} % Defines vector notation to be arrowed. The negative and positive spacing commands "\!" and "\," adjust the horizontal positions of the arrows. %\newcommand{\twovect}[1]{\!\vec{\vec{\,#1}}} %\newcommand{\threevect}[1]{\!\vec{\vec{\vec{\,#1}}}} %\newcommand{\fourvect}[1]{\!\vec{\vec{\vec{\vec{\,#1}}}}} %\newcommand{\covect}[1]{\underline{#1}} % Defines covector notation to be underlined. %\newcommand{\twoform}[1]{\underline{\underline{#1}}} %\newcommand{\threeform}[1]{\underline{\underline{\underline{#1}}}} %\newcommand{\fourform}[1]{\underline{\underline{\underline{\underline{#1}}}}}


%%%% Text %%%%

\newcommand{\keyword}[1]{\textbf{#1}} % Defines the command "\keyword{ }" to be its argument written in bold font. \newcommand{\command}[1]{\texttt{\textbackslash #1}} % Defines the command "\command{}" to be its argument, preceded by a backslash, written in typewriter font. \newcommand{\eq}[1]{Eq.~(\ref{#1})} % Defines the command "\eq{<equation label>}" to be "Eq.~(<equation number>)". \newcommand{\eqs}[2]{Eqs.~(\ref{#1}) and (\ref{#2})} % Defines the command "\eqs{<first equation label>}{<second equation label>}" to be "Eqs.~(<first equation number>) and (<second equation number>)". \newcommand{\eqss}[3]{Eqs.~(\ref{#1}), (\ref{#2}) and (\ref{#3})} % Defines the command "\eqss{<first equation label>}{<second equation label>}{<third equation label>}" to be "Eqs.~(<first equation number>), (<second equation number>) and (<third equation number>)".


%%%% Annotations %%%%

\newcommand{\texthl}[2][red]{\begingroup\setlength\fboxsep{1pt}\colorbox{#1!50}{#2}\endgroup} % Defines the command "\texthl[<color>]{<text>}" to be the text of its mandatory argument, highlighted with intensity 50% in the color of its optional argument, whose default is red. \newcommand{\displayhl}[2][red]{\begingroup\setlength\fboxsep{1pt}\colorbox{#1!50}{$\displaystyle #2$}\endgroup} % Defines the command "\displayhl[<color>]{<displayed math>}" to be the displayed mathematics of its mandatory argument, highlighted with intensity 50% in the color of its optional argument, whose default is red. \newcommand{\scripthl}[2][red]{\begingroup\setlength\fboxsep{1pt}\colorbox{#1!50}{$\scriptstyle #2$}\endgroup} % Defines the command "\scripthl[<color>]{<superscript or subscript>}" to be the superscript or subscript of its mandatory argument, highlighted with intensity 50% in the color of its optional argument, whose default is red.

\newcommand{\textfhl}[2][red]{\begingroup\setlength\fboxsep{0.2pt}\setlength\fboxrule{0.8pt}\fcolorbox{#1}{white}{#2}\endgroup} % Defines the command "\textfhl[<color>]{<text>}" to be the text of its mandatory argument framed in the color of its optional argument, whose default is red. \newcommand{\displayfhl}[2][red]{\begingroup\setlength\fboxsep{0.2pt}\setlength\fboxrule{0.8pt}\fcolorbox{#1}{white}{$\displaystyle #2$}\endgroup} % Defines the command "\displayfhl[<color>]{<displayed math>}" to be the displayed mathematics of its mandatory argument framed in the color of its optional argument, whose default is red. \newcommand{\scriptfhl}[2][red]{\begingroup\setlength\fboxsep{0.2pt}\setlength\fboxrule{0.8pt}\fcolorbox{#1}{white}{$\scriptstyle #2$}\endgroup} % Defines the command "\scriptfhl[<color>]{<superscript or subscript>}" to be the superscript or subscript of its mandatory argument framed in the color of its optional argument, whose default is red.

\newcommand{\lcomment}[2][red]{\reversemarginpar\marginpar{\color{#1}\scriptsize #2}} % Defines the command "\lcomment[<color>]{<text>}" to be the text of its mandatory argument written as a scriptsize left marginal note in the color of its optional argument, whose default is red. \newcommand{\rcomment}[2][red]{\normalmarginpar\marginpar{\color{#1}\scriptsize #2}} % Defines the command "\rcomment[<color>]{<text>}" to be the text of its mandatory argument written as a scriptsize right marginal note in the color of its optional argument, whose default is red.


%%%% Counters %%%%

\@addtoreset{equation}{section} % Resets the equation counter to zero at the beginning of each section. \renewcommand{\theequation}{\thesection.\arabic{equation}} % Changes equation numbering to "(chapter.section.equation)". \@addtoreset{table}{section} \renewcommand{\thetable}{\thesection.\arabic{table}} \@addtoreset{figure}{section} \renewcommand{\thefigure}{\thesection.\arabic{figure}}


%%%% Homework %%%%

\newcounter{homework} % Defines a new counter "homework".

\newenvironment{homework}[1][]{ %\renewcommand{\thequestion}{\thehomework.\arabic{question}} % Redefines the question number to be "<the homework number>.<value of the question counter written in Arabic numerals>". \renewcommand{\theequation}{\theenumi.\arabic{equation}} % Redefines the equation number to be "<the item number>.<value of the equation counter written in Arabic numerals>". \renewcommand{\thefigure}{\theenumi.\arabic{figure}} % Redefines the figure number to be "<the item number>.<value of the figure counter written in Arabic numerals>". \section*{Homework \thehomework}

  1. 1

\begin{enumerate} }{ \end{enumerate} } % Defines the environment "homework" to be an unnumbered section title "Homework <the homework number>" followed by its optional argument followed by a numbered list environment.


%%%% Exam %%%%

\newenvironment{exam}[2]{ \renewcommand{\theequation}{\theenumi.\arabic{equation}} % Redefines the equation number to be "<the item number>.<value of the equation counter written in Arabic numerals>". \renewcommand{\thefigure}{\theenumi.\arabic{figure}} % Redefines the figure number to be "<the item number>.<value of the figure counter written in Arabic numerals>". \subsection*{Final Exam - #1, #2} You should start from basic principles and give reasoning at every step. Answers should be clear and concise. Unclear or excessively long answers will not be graded. \begin{enumerate} }{ \end{enumerate} } % Defines the environment "exam", with two arguments for time and place, to be an unnumbered section title "Final Exam -


%%%% Questions and Answers %%%%

\newcounter{question} % Defines a new counter "question".

\newcommand{\question}[1]{ \refstepcounter{question} \label{#1} % Adds one to the question counter and makes a reference to the label produce the question number. \renewcommand{\theenumi}{Q\thequestion} % Redefines the item number to be "Q<the question number>". \item \setcounter{equation}{0} % Resets the equation counter to zero. \setcounter{figure}{0} % Resets the figure counter to zero. } % Defines the command "\question{<question label>}" to be a labelled list item.

\newcommand{\answer}[1]{ \renewcommand{\theenumi}{A\ref{#1}} % Redefines the item number to be "A<the referred question number>". \item \setcounter{equation}{0} % Resets the equation counter to zero. \setcounter{figure}{0} % Resets the figure counter to zero. } % Defines the command "\answer{<question label>}" to be a list item with reference to a question.


%%%% End %%%%