summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/homework/homework-demo-cn.tex
blob: 44bc036e2c2ae72a0b0740a540a06a615e34d451 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
\documentclass[11pt,
  logo = {example-image},
  % logo height = 1cm,
  title in boldface,
  % title in sffamily,
  theorem in new line,
  % twoside,
]{homework}

%% For highlighting the code in this document
\usepackage{newverbs}
\newverbcommand{\cverb}{\color{red!50!orange}}{}

%% Below is the main document


\UseLanguage{Chinese}


\title{学科名称,第一周}
\author{作者}
% \date{\today,地点}
% \date{\today[only-year-month],地点}
\date{\TheDate{2023-12-25},地点}


\begin{document}


\bigskip\textcolor{gray!55}{(如果你打算直接写出解答…)}

\begin{problem}
    这里是解答/证明。
\end{problem}


\bigskip\textcolor{gray!55}{(如果你打算先陈述问题后再写出解答…)}

\begin{problem}[问题简介]
    你可以把问题陈述在这里…
\end{problem}

\begin{solution}
    …然后把解答写在这里…
\end{solution}

\bigskip\textcolor{gray!55}{(如果比起\textquote{解},你更希望写\textquote{证明}…)}

\begin{solution}[证明]
    …或者写一个这样的证明…
    \begin{lemma}[你可以在这里写一些注释]\label{lem}
        一些辅助结果。
    \end{lemma}
    \begin{proof}
        这是\cref{lem}的证明,其中用到下面的公式(注意使用 \cverb|\qedhere|):
        \[
            \infty = \infty + 1
            \makebox[0pt][l]{\,。} % 句尾的句号
            \qedhere               % 用来把 Q.E.D. 符号放在正确的位置
        \]
    \end{proof}
    \begin{fact}[这个结论无需证明]
        \proofless
        使用 \cverb|\proofless| 可以将标记定理结束的空心方框变为实心方框。
    \end{fact}
    …剩余的步骤……
\end{solution}

\bigskip\textcolor{gray!55}{(写\textquote{答}也是可以的…)}

\begin{answer}
    \verb|answer| 环境的用法和 \verb|solution| 是完全相同的。
\end{answer}


\bigskip\textcolor{gray!55}{(如果你更喜欢传统的证明样式…)}

\begin{proof}
    \verb|proof| 环境依然可用。
\end{proof}


\bigskip\textcolor{gray!55}{(如果你想为一个大问题中的每个小问题分别撰写解答…)}

\begin{problem}[一个由很多小问题构成的大问题]
    \begin{enumerate}[itemsep=.5\baselineskip]
        \item 第一个问题。

        \begin{solution}
            第一个问题的解答。
        \end{solution}

        \item 第二个问题。

        \begin{enumerate}[itemsep=.3\baselineskip]
            \item 第一个小问。

            \begin{solution}
                第一个小问的解答。
            \end{solution}

            \item 第二个小问。

            \begin{solution}
                第二个小问的解答。
            \end{solution}

        \end{enumerate}

        \item 第三个问题。

        \begin{solution}
            第三个问题的解答。
        \end{solution}

    \end{enumerate}
    在末尾使用 \cverb|\noqed|(或 \cverb|\noQED|)可以取消标记用于当前问题结束的方框。
    \noQED
\end{problem}


\bigskip\textcolor{gray!55}{(如果你有暂时解决不出来的问题…)}

\DNF<一些描述>


\end{document}