diff options
author | Karl Berry <karl@freefriends.org> | 2023-09-27 20:02:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-09-27 20:02:55 +0000 |
commit | e22475de373e1171d30f4388be9d3bcc6eaa775c (patch) | |
tree | a39a9e7eb24a9c575386d0e5099392a3d72637be /Master/texmf-dist | |
parent | 4e19119c888357bffdde891a22b64738e4a3cee1 (diff) |
homework (27sep23)
git-svn-id: svn://tug.org/texlive/trunk@68381 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
16 files changed, 312 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/homework/README.md b/Master/texmf-dist/doc/latex/homework/README.md index 0374b4030f8..c580a03fa88 100644 --- a/Master/texmf-dist/doc/latex/homework/README.md +++ b/Master/texmf-dist/doc/latex/homework/README.md @@ -6,7 +6,7 @@ The current document class is for writing homework. It has the following features. - Simple and clear interface. -- Built-in support for many theorem-like environments, already configured and ready to use (in the mean time also very customizable, via `\SetTheorem`). +- Built-in support for many theorem-type environments, already configured and ready to use (in the mean time also very customizable, via `\SetTheorem`), with clever referencing supported. - Multilingual support: currently supporting Chinese (both simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish. - Page numbers are of the form `Page [current] of [total]`, which can help you ensure that there are no missing pages when you print your homework for submission. - Support writing problem statements and solutions (or proofs) in different colors. @@ -20,14 +20,14 @@ A typical homework document looks like this: ```latex \documentclass[11pt, - logo = {image-file-of-your-university-logo}, - % logo height = 1cm, + logo = {image-file-of-your-university-logo}, % Remove this line if you don't want logo presented. + % logo height = 1cm, % In case you are not satisfied with the default logo size. title in boldface, title in sffamily, theorem in new line, ]{homework} -\UseLanguage{...} % If you wish to write your homework in languages other than English +\UseLanguage{...} % If you wish to write your homework in languages other than English. \title{The Subject, Week 1} @@ -47,11 +47,11 @@ A typical homework document looks like this: % If you wish to state the problem and then write your answer... -\begin{problem} +\begin{problem}[You can add some brief problem description here] You may also state the problem here... \end{problem} -\begin{solution} +\begin{solution}% You may also use the "answer" environment, they are essentially the same. ... and write the solution here... \end{solution} @@ -60,7 +60,7 @@ A typical homework document looks like this: \begin{solution}[Proof] ... or a proof like this one... - % You may write lemmas or propositions inside your solution. + % You may write claims, lemmas, propositions, etc. inside your solution. \begin{lemma}\label{lem} Some auxiliary result. \end{lemma} @@ -68,7 +68,7 @@ A typical homework document looks like this: The proof of \cref{lem}, where we use the following formula: \[ \infty = \infty + 1. - \qedhere % To place the QED symbol in the right place + \qedhere % For placing the QED symbol in the right place. \] \end{proof} ... and the rest steps... @@ -84,8 +84,10 @@ A few remarks: 1) The logo image can be included via the class option `logo = {⟨image file name⟩}`, and if you are not satisfied with its default size, then you may manually specify the size via the option `logo height = {⟨height⟩}`. If you do not want to show any logo in the title bar, you may simply remove the option `logo = {⟨image file name⟩}`. 1) The options `title in boldface`, `title in sffamily` or even `title in scshape` are for configuring the text effect of the title line, the sectional titles and theorem names. 1) The option `theorem in new line` is for showing the problem / theorem name, numbering and description in a separate line, for the sake of clarity. -1) `\title`, `author` and `\date` should be placed before `\begin{document}`. -1) Since the problem, solution and other theorem-type environments have a QED symbol at the end, if your text ends with displayed formula or lists, then you may need to place a `\qedhere` so that the QED symbol is placed in the right place. +1) `\title`, `\author` and `\date` should be placed before `\begin{document}`. +1) Since the problem, solution and other theorem-type environments have a QED symbol at the end, if your text ends with a displayed equation or a `itemize`/`enumerate`/`description` list, then you would need to add a `\qedhere` so that the QED symbol is placed in the right place. +1) Every theorem-type environment has a starred unnumbered version, for instance, `claim*` for unnumbered `claim`, `lemma*` for unnumbered `lemma`, etc. +1) It is recommended to use clever reference, such as `\cref`. For languages such as French and German, to ensure that the generated referencing text is grammatically correct, you may write the definite article and/or declension as optional argument for the referencing commands, for instance, `\cref[à]{⟨label⟩}` or `\cref[de]{⟨label⟩}` for French, `\cref[nom.]{⟨label⟩}` or `\cref[von,dat.]{⟨label⟩}` for German, etc. ## TeXnical details diff --git a/Master/texmf-dist/doc/latex/homework/homework-demo-cn.pdf b/Master/texmf-dist/doc/latex/homework/homework-demo-cn.pdf Binary files differindex 03fbd68d8ca..a3f96f3fad1 100644 --- a/Master/texmf-dist/doc/latex/homework/homework-demo-cn.pdf +++ b/Master/texmf-dist/doc/latex/homework/homework-demo-cn.pdf diff --git a/Master/texmf-dist/doc/latex/homework/homework-demo-cn.tex b/Master/texmf-dist/doc/latex/homework/homework-demo-cn.tex index 40898201070..9585ebc126a 100644 --- a/Master/texmf-dist/doc/latex/homework/homework-demo-cn.tex +++ b/Master/texmf-dist/doc/latex/homework/homework-demo-cn.tex @@ -11,6 +11,7 @@ \title{学科名称,第一周} \author{作者} +% \date{\today,地点} % \date{\today[only-year-month],地点} \date{\TheDate{2023-12-25},地点} diff --git a/Master/texmf-dist/doc/latex/homework/homework-demo-de.pdf b/Master/texmf-dist/doc/latex/homework/homework-demo-de.pdf Binary files differnew file mode 100644 index 00000000000..9d61979cc5d --- /dev/null +++ b/Master/texmf-dist/doc/latex/homework/homework-demo-de.pdf diff --git a/Master/texmf-dist/doc/latex/homework/homework-demo-de.tex b/Master/texmf-dist/doc/latex/homework/homework-demo-de.tex new file mode 100644 index 00000000000..0efb6739d8a --- /dev/null +++ b/Master/texmf-dist/doc/latex/homework/homework-demo-de.tex @@ -0,0 +1,74 @@ +\documentclass[11pt, + logo = {example-image}, + % logo height = 1cm, + title in boldface, + % title in sffamily, + theorem in new line, +]{homework} + +\UseLanguage{German} + + +\title{Das Thema, Woche 1} +\author{Vorname NAME} +% \date{\today, der Standort} +% \date{\today[only-year-month], der Standort} +\date{\TheDate{2023-12-25}, der Standort} + + +\begin{document} + + +\bigskip\textcolor{gray!55}{(Wenn Sie die Antwort direkt schreiben möchten ...)} + +\begin{problem} + Hier liegt die Lösung / der Beweis. +\end{problem} + + +\bigskip\textcolor{gray!55}{(Wenn Sie das Problem angeben und dann Ihre Antwort schreiben möchten ...)} + +\begin{problem}[Kurze Beschreibung] + Sie können das Problem auch hier angeben ... +\end{problem} + +\begin{solution} + ... und schreibe hier die Lösung ... +\end{solution} + +\bigskip\textcolor{gray!55}{(Wenn Sie \textquote{Beweis} anstelle von \textquote{Lösung} bevorzugen ...)} + +\begin{solution}[Beweis] + ... oder ein Beweis wie dieser ... + \begin{lemma}[Sie können hier eine Beschreibung schreiben]\label{lem} + Einige zusätzlich Ergebnisse. + \end{lemma} + \begin{proof} + Der Beweis \cref[gen.]{lem}, wobei wir die folgende Formel verwenden: % oder der Beweis \cref[von]{lem}, oder der Beweis \cref[von, dat.]{lem} + \[ + \infty = \infty + 1. + \qedhere % Um das QED-Symbol an der richtigen Stelle zu stellen + \] + \end{proof} + ... und die übrigen Schritte ... +\end{solution} + + +\bigskip\textcolor{gray!55}{(Wenn Sie möchten, können Sie auch \texttt{answer} anstelle von \texttt{solution} schreiben ...)} + +\begin{answer} + Die Verwendung der \verb|answer|-Umgebung ist genau gleich wie \verb|solution|. +\end{answer} + + +\bigskip\textcolor{gray!55}{(Wenn Sie den klassischen Proof-Stil bevorzugen ...)} + +\begin{proof} + Die übliche \verb|proof|-Umgebung funktioniert ebenfalls. +\end{proof} + + +\DNF<etwas Beschreibung> + + +\end{document} diff --git a/Master/texmf-dist/doc/latex/homework/homework-demo-en.pdf b/Master/texmf-dist/doc/latex/homework/homework-demo-en.pdf Binary files differindex 19dff1fb8fe..317b090c697 100644 --- a/Master/texmf-dist/doc/latex/homework/homework-demo-en.pdf +++ b/Master/texmf-dist/doc/latex/homework/homework-demo-en.pdf diff --git a/Master/texmf-dist/doc/latex/homework/homework-demo-en.tex b/Master/texmf-dist/doc/latex/homework/homework-demo-en.tex index dd25bbc6b5e..ac618af0aa7 100644 --- a/Master/texmf-dist/doc/latex/homework/homework-demo-en.tex +++ b/Master/texmf-dist/doc/latex/homework/homework-demo-en.tex @@ -9,6 +9,7 @@ \title{The Subject, Week 1} \author{Author NAME} +% \date{\today, Location} % \date{\today[only-year-month], Location} \date{\TheDate{2023-12-25}, Location} diff --git a/Master/texmf-dist/doc/latex/homework/homework-demo-es.pdf b/Master/texmf-dist/doc/latex/homework/homework-demo-es.pdf Binary files differnew file mode 100644 index 00000000000..2b46b9b98b3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/homework/homework-demo-es.pdf diff --git a/Master/texmf-dist/doc/latex/homework/homework-demo-es.tex b/Master/texmf-dist/doc/latex/homework/homework-demo-es.tex new file mode 100644 index 00000000000..e905034442c --- /dev/null +++ b/Master/texmf-dist/doc/latex/homework/homework-demo-es.tex @@ -0,0 +1,74 @@ +\documentclass[11pt, + logo = {example-image}, + % logo height = 1cm, + title in boldface, + % title in sffamily, + theorem in new line, +]{homework} + +\UseLanguage{Spanish} + + +\title{El tema, semana 1} +\author{Nombre APELLIDO} +% \date{\today, Ubicación} +% \date{\today[only-year-month], Ubicación} +\date{\TheDate{2023-12-25}, Ubicación} + + +\begin{document} + + +\bigskip\textcolor{gray!55}{(Si desea escribir la respuesta directamente...)} + +\begin{problem} + Aquí está la solución / la prueba. +\end{problem} + + +\bigskip\textcolor{gray!55}{(Si desea plantear el problema y luego escribir su respuesta...)} + +\begin{problem}[Breve descripción] + También puedes plantear el problema aquí... +\end{problem} + +\begin{solution} + ... y escribir la solución aquí... +\end{solution} + +\bigskip\textcolor{gray!55}{(Si prefiere \textquote{Prueba} en lugar de \textquote{Solución}...)} + +\begin{solution}[Prueba] + ... o una prueba como ésta... + \begin{lemma}[Puedes escribir alguna descripción aquí]\label{lem} + Algún resultado auxiliar. + \end{lemma} + \begin{proof} + La prueba \cref[de]{lem}, donde usamos la siguiente fórmula: + \[ + \infty = \infty + 1. + \qedhere % Para colocar el símbolo QED en el lugar correcto. + \] + \end{proof} + ... y el resto pasos... +\end{solution} + + +\bigskip\textcolor{gray!55}{(También puedes escribir \texttt{answer} en lugar de \texttt{solution} si lo deseas...)} + +\begin{answer} + El uso del entorno \verb|answer| es exactamente lo mismo que \verb|solution|. +\end{answer} + + +\bigskip\textcolor{gray!55}{(Si prefieres el estilo clásico de prueba...)} + +\begin{proof} + El entorno habitual de \verb|proof| también funciona. +\end{proof} + + +\DNF<alguna descripción> + + +\end{document} diff --git a/Master/texmf-dist/doc/latex/homework/homework-demo-fr.pdf b/Master/texmf-dist/doc/latex/homework/homework-demo-fr.pdf Binary files differindex 30abef74dee..784bea54892 100644 --- a/Master/texmf-dist/doc/latex/homework/homework-demo-fr.pdf +++ b/Master/texmf-dist/doc/latex/homework/homework-demo-fr.pdf diff --git a/Master/texmf-dist/doc/latex/homework/homework-demo-fr.tex b/Master/texmf-dist/doc/latex/homework/homework-demo-fr.tex index 0c79fc02b7b..642278fbff6 100644 --- a/Master/texmf-dist/doc/latex/homework/homework-demo-fr.tex +++ b/Master/texmf-dist/doc/latex/homework/homework-demo-fr.tex @@ -11,6 +11,7 @@ \title{Le sujet, semaine 1} \author{Prénom NOM} +% \date{\today, Location} % \date{\today[only-year-month], Location} \date{\TheDate{2023-12-25}, Location} diff --git a/Master/texmf-dist/doc/latex/homework/homework-demo-jp.pdf b/Master/texmf-dist/doc/latex/homework/homework-demo-jp.pdf Binary files differnew file mode 100644 index 00000000000..b3a118c9d51 --- /dev/null +++ b/Master/texmf-dist/doc/latex/homework/homework-demo-jp.pdf diff --git a/Master/texmf-dist/doc/latex/homework/homework-demo-jp.tex b/Master/texmf-dist/doc/latex/homework/homework-demo-jp.tex new file mode 100644 index 00000000000..2c72ee81e36 --- /dev/null +++ b/Master/texmf-dist/doc/latex/homework/homework-demo-jp.tex @@ -0,0 +1,74 @@ +\documentclass[11pt, + logo = {example-image}, + % logo height = 1cm, + title in boldface, + % title in sffamily, + theorem in new line, +]{homework} + +\UseLanguage{Japanese} + + +\title{科目名、第 1 週} +\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}の証明です。次の式が使用されます: + \[ + \infty = \infty + 1 + \makebox[0pt][l]{\,。} % 文末のピリオド + \qedhere % QED シンボルを正しい位置に配置するために使用されます + \] + \end{proof} + …そして残りのステップ… +\end{solution} + +\bigskip\textcolor{gray!55}{(\texttt{answer} 環境を使用することもできます…)} + +\begin{answer} + \verb|answer| 環境は \verb|solution| 環境とまったく同じように使用されます。 +\end{answer} + + +\bigskip\textcolor{gray!55}{(伝統的な証明スタイルがお好みなら…)} + +\begin{proof} + \verb|proof| 環境はまだ利用可能です。 +\end{proof} + + +\DNF<いくつかの説明> + + +\end{document} diff --git a/Master/texmf-dist/doc/latex/homework/homework-demo-tc.pdf b/Master/texmf-dist/doc/latex/homework/homework-demo-tc.pdf Binary files differnew file mode 100644 index 00000000000..f9f67a70f17 --- /dev/null +++ b/Master/texmf-dist/doc/latex/homework/homework-demo-tc.pdf diff --git a/Master/texmf-dist/doc/latex/homework/homework-demo-tc.tex b/Master/texmf-dist/doc/latex/homework/homework-demo-tc.tex new file mode 100644 index 00000000000..9c56aae43ed --- /dev/null +++ b/Master/texmf-dist/doc/latex/homework/homework-demo-tc.tex @@ -0,0 +1,74 @@ +\documentclass[11pt, + logo = {example-image}, + % logo height = 1cm, + title in boldface, + % title in sffamily, + theorem in new line, +]{homework} + +\UseLanguage{Traditional 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}的證明,其中用到下面的公式: + \[ + \infty = \infty + 1 + \makebox[0pt][l]{\,。} % 句尾的句號 + \qedhere % 用來把 QED 放在正確的位置 + \] + \end{proof} + …剩餘的步驟… +\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} + + +\DNF<一些描述> + + +\end{document} diff --git a/Master/texmf-dist/tex/latex/homework/homework.cls b/Master/texmf-dist/tex/latex/homework/homework.cls index 1f3fe68cb88..a130b171038 100644 --- a/Master/texmf-dist/tex/latex/homework/homework.cls +++ b/Master/texmf-dist/tex/latex/homework/homework.cls @@ -12,7 +12,7 @@ \NeedsTeXFormat{LaTeX2e}[2022-06-01] \ProvidesExplClass {homework} - {2023/09/25} {} + {2023/09/25a} {} {Document class for writing homework} \keys_define:nn { homework } |