summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-10-11 03:01:16 +0000
committerNorbert Preining <norbert@preining.info>2022-10-11 03:01:16 +0000
commit2713ec666b0e53418a839b97c48e0a9234fe5c98 (patch)
tree44f44c40d7cf3d6c2c0be9da7bfcf4dad97eb483 /macros
parent9c7942efff8183c8695ec824008847dd068dbfe7 (diff)
CTAN sync 202210110301
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/centeredline/README.md46
-rw-r--r--macros/latex/contrib/centeredline/centeredline.sty24
-rw-r--r--macros/latex/contrib/currfile/README6
-rw-r--r--macros/latex/contrib/currfile/currfile.dtx29
-rw-r--r--macros/latex/contrib/currfile/currfile.pdfbin172948 -> 182606 bytes
-rw-r--r--macros/latex/contrib/exam-n/A1.clo82
-rw-r--r--macros/latex/contrib/exam-n/README69
-rw-r--r--macros/latex/contrib/exam-n/README.md (renamed from macros/latex/contrib/exam-n/README.ctan)0
-rw-r--r--macros/latex/contrib/exam-n/exam-n.dtx1518
-rw-r--r--macros/latex/contrib/exam-n/exam-n.html473
-rw-r--r--macros/latex/contrib/exam-n/exam-n.pdfbin271514 -> 230344 bytes
-rw-r--r--macros/latex/contrib/exam-n/examndefs.sty121
-rw-r--r--macros/latex/contrib/exam-n/myclass.clo42
-rw-r--r--macros/latex/contrib/exam-n/notes-for-authors.pdfbin228150 -> 241142 bytes
-rw-r--r--macros/latex/contrib/exam-n/notes-for-authors.tex225
-rw-r--r--macros/latex/contrib/exam-n/release-notes-dist.html656
-rw-r--r--macros/latex/contrib/exam-n/release-notes.dtx43
-rw-r--r--macros/latex/contrib/exam-n/release-notes.html340
-rw-r--r--macros/latex/contrib/exam-n/sample/Makefile25
-rw-r--r--macros/latex/contrib/exam-n/sample/cosmo1.tex37
-rw-r--r--macros/latex/contrib/exam-n/sample/cosmo2.tex8
-rw-r--r--macros/latex/contrib/exam-n/sample/cosmo3.tex4
-rw-r--r--macros/latex/contrib/exam-n/sample/dynamical1.tex8
-rw-r--r--macros/latex/contrib/exam-n/sample/sample_exam.tex46
-rw-r--r--macros/latex/contrib/exam-n/sample/sample_exam_mcq.tex (renamed from macros/latex/contrib/exam-n/sample/sample_mcq.tex)0
-rw-r--r--macros/latex/contrib/exam-n/sample/sample_exam_solution.tex65
-rw-r--r--macros/latex/contrib/exam-n/sample_exam.pdfbin192111 -> 0 bytes
-rw-r--r--macros/latex/contrib/exam-n/sample_exam_solution.pdfbin246164 -> 0 bytes
-rw-r--r--macros/latex/contrib/exam-n/style.css230
-rw-r--r--macros/latex/contrib/exam-n/template-master.pdfbin0 -> 60878 bytes
-rw-r--r--macros/latex/contrib/exam-n/template-master.tex20
-rw-r--r--macros/latex/contrib/exam-n/template-question.pdfbin0 -> 59142 bytes
-rw-r--r--macros/latex/contrib/exam-n/template-question.tex22
-rw-r--r--macros/latex/contrib/iexec/iexec.dtx36
-rw-r--r--macros/latex/contrib/iexec/iexec.pdfbin294434 -> 293850 bytes
-rw-r--r--macros/latex/contrib/pdfpages/pdfpages.dtx50
-rw-r--r--macros/latex/contrib/pdfpages/pdfpages.pdfbin300782 -> 301211 bytes
-rw-r--r--macros/latex/contrib/standalone/DEPENDS.txt10
-rw-r--r--macros/latex/contrib/standalone/README9
-rw-r--r--macros/latex/contrib/standalone/standalone.dtx43
-rw-r--r--macros/latex/contrib/standalone/standalone.pdfbin270986 -> 280807 bytes
-rw-r--r--macros/luatex/latex/japanese-mathformulas/README.txt4
-rw-r--r--macros/luatex/latex/japanese-mathformulas/japanese-mathformulas-sample.tex2
-rw-r--r--macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.pdfbin550271 -> 565692 bytes
-rw-r--r--macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.sty1825
-rw-r--r--macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.tex150
46 files changed, 4027 insertions, 2241 deletions
diff --git a/macros/latex/contrib/centeredline/README.md b/macros/latex/contrib/centeredline/README.md
index 8be6413692..d92cd59fd5 100644
--- a/macros/latex/contrib/centeredline/README.md
+++ b/macros/latex/contrib/centeredline/README.md
@@ -2,9 +2,9 @@
Author: Jean-Francois Burnol
Package: centeredline
- Version: 1.1 (2019/05/03)
+ Version: 1.2 (2022/10/10)
License: LPPL 1.3c
- Copyright (C) 2019 Jean-Francois Burnol
+ Copyright (C) 2019, 2022 Jean-Francois Burnol
<jfbu at free dot fr>
# DESCRIPTION #
@@ -13,21 +13,37 @@ After `\usepackage{centeredline}` one can use
\centeredline{....}
-to get the argument centered, in a better way than with `\centerline`:
+to get the argument centered, without ending the current paragraph, and
+without adding extra vertical spacing, in a better way than if using
+`\centerline`:
1. `\verb` or other catcode changes inside the argument are allowed,
-2. the centering (with respect to the surrounding text paragraph) will
+2. The centering (with respect to the surrounding text paragraph) will
be as expected if this all happens inside an item from a LaTeX list
environment.
+3. One does not need to use `\newline` before and after (or at least
+ leave a space token after). Doing so does not hurt, though.
-Material whose natural width exceeds the linewidth will get properly
-centered too.
+The macro itself may be used while in paragraph or in vertical mode.
+Like `\centerline`, if used in vertical mode, it does not enter
+paragraph mode.
-The macro itself may be encountered in paragraph or in vertical mode.
-It places the argument inside a `\hbox` (inside an extra simple group).
+The macro places its argument in a `\hbox` and assignments done inside
+the argument see thus their scope limited to the line.
+The macro is usable from inside a (paragraph mode) table cell.
-# HISTORY #
+It can be nested (for example the argument is a `tabular` or a `\parbox`
+and inside it another `\centeredline` is used).
+
+Material whose natural width exceeds the line width will get properly
+centered too, the extra width going into the margins (or into the
+neighboring cells, if used in a paragraph mode table cell).
+
+
+# CHANGE LOG #
+
+Initial statement:
I have used this macro since 2013 and it has served me well.
@@ -36,11 +52,15 @@ have some limitations which I somehow did not encounter in my personal usage.
Suggestions for improvements are welcome, and will be recorded although I do
not expect to update the package anytime soon.
-
-# CHANGE LOG #
-
- v1.0 (2019/04/27): First release.
-- v1.1 (2019/05/03): Improved description (this file).
+- v1.1 (2019/05/03): Improve this README.
+- v1.2 (2022/10/10):
+ * make the macro usable in table cells
+ (thanks to Antoine Missier for pointing out this limitation;
+ see his package `spacingtricks` for another centering macro)
+ * avoid an extra empty line if the macro is used following a `\\`
+ or a `\newline` (but why should it be? ;-) )
+ (thanks to Kroum Tzanev for a related discussion)
# LICENSE #
diff --git a/macros/latex/contrib/centeredline/centeredline.sty b/macros/latex/contrib/centeredline/centeredline.sty
index d1afe19f3e..240ac64b90 100644
--- a/macros/latex/contrib/centeredline/centeredline.sty
+++ b/macros/latex/contrib/centeredline/centeredline.sty
@@ -1,26 +1,18 @@
%% File: centeredline.sty
-%% Version: 1.1 (2019/05/03)
+%% Version: 1.2 (2022/10/10)
%% License: LPPL 1.3c
-%% Copyright (C) 2019 Jean-Francois Burnol <jfbu at free dot fr>
+%% Copyright (C) 2019, 2022 Jean-Francois Burnol <jfbu at free dot fr>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{centeredline}[2019/05/03 v1.1 centering a line the JFB way]
+\ProvidesPackage{centeredline}[2022/10/10 v1.2 centering a line the JFB way]
% \centeredline: OUR OWN LITTLE MACRO FOR CENTERING LINES
%
-% 7 mars 2013
-% \ignorespaces added June 9, 2013
-%
-% This macro allows to conveniently center a line inside a paragraph and still
-% allow usage therein of \verb or other macros changing catcodes.
-%
-% It works nicely in list environments (as it uses \linewidth, not \hsize...;
-% maybe there is an even better LaTeX parameter to use, but I don't know
-% LaTeX2e that well enough and never typeset in two-column mode.)
-%
-% Note: \centeredline is scope limiting for assignments done during execution
-% of its argument.
+% March 7, 2013 : first version
+% June 9, 2013 : \ignorespaces added
+% Oct. 10, 2022 : \unpenalty\newline replaces \\\relax
%
+% See README.md for documentation.
\newcommand*\centeredline{%
- \ifhmode \\\relax
+ \ifhmode \unpenalty\newline
\def\centeredline@@{\hss\egroup\hskip\z@skip\ignorespaces}%
\else
\def\centeredline@@{\hss\egroup}%
diff --git a/macros/latex/contrib/currfile/README b/macros/latex/contrib/currfile/README
index d8c9f7be4c..26eb70dd62 100644
--- a/macros/latex/contrib/currfile/README
+++ b/macros/latex/contrib/currfile/README
@@ -1,8 +1,8 @@
LaTeX package 'currfile'
~~~~~~~~~~~~~~~~~~~~~~~~
-Copyright (c) 2010-2020 by Martin Scharrer <martin@scharrer-online.de>
-WWW: https://sourceforge.net/projects/currfile/
-Code repository: https://sourceforge.net/p/currfile/code/
+Copyright (c) 2010-2022 by Martin Scharrer <martin.scharrer@web.de>
+Repository: https://github.com/MartinScharrer/currfile
+Issues: https://github.com/MartinScharrer/currfile/issues
Provides macros holding the file name information (dir, base name, extension, full name and full path) for
files read by LaTeX's \input and \include macros.
diff --git a/macros/latex/contrib/currfile/currfile.dtx b/macros/latex/contrib/currfile/currfile.dtx
index 5f677130a0..539c8dc728 100644
--- a/macros/latex/contrib/currfile/currfile.dtx
+++ b/macros/latex/contrib/currfile/currfile.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%<=*COPYRIGHT>
%%
-%% Copyright (c) 2010-2020 by Martin Scharrer <martin@scharrer-online.de>
+%% Copyright (c) 2010-2022 by Martin Scharrer <martin.scharrer@web.de>
%% ----------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -29,10 +29,10 @@
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesFile{currfile.dtx}[%
%<=*DATE>
- 2020/09/29
+ 2022/10/10
%<=/DATE>
%<=*VERSION>
- v0.7d
+ v0.8
%<=/VERSION>
DTX file for currfile package]
@@ -59,7 +59,7 @@
%</driver>
% \fi
%
-% \CheckSum{1114}
+% \CheckSum{1115}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -91,6 +91,7 @@
% \changes{v0.7b}{2013/02/01}{Support for \cs{\subinput*} etc.\ from the \pkg{import} package which requires a different path search order.}
% \changes{v0.7c}{2015/04/23}{Removed stack underflow warning if loaded by other package. Set default file name in this case to main file name.}
% \changes{v0.7d}{2020/09/29}{Updated documentation for 2020/10/01 \LaTeX\ release.}
+% \changes{v0.8}{2022/10/10}{Fixed issue with filename with spaces.}
%
%
% \GetFileInfo{currfile.dtx}
@@ -103,8 +104,8 @@
% \DoNotIndex{\message,\jobname,\@namedef}
%
% \author{Martin Scharrer}
-% \email{martin@scharrer-online.de}
-% \repository{https://sourceforge.net/projects/currfile/}
+% \email{martin.scharrer@web.de}
+% \repository{https://github.com/MartinScharrer/currfile}
% \maketitle
%
% \begin{abstract}
@@ -529,6 +530,16 @@
% \end{macro}
%
%
+% \begin{macro}{\currfile@openin}[2]{file handle}{file path}
+% Opens the given file for reading.
+% \begin{macrocode}
+\def\currfile@openin#1#2{%
+\openin#1="#2"\relax
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
% \begin{macro}{\currfile@checkpath}
% This loop is placed in an own macro for efficiency reasons.
% In the majority of cases it should not be needed and having it as
@@ -537,7 +548,7 @@
% \changes{2011/09/18}{v0.5}{New macro as part of the \cs{input@path} support.}
% \begin{macrocode}
\def\currfile@checkpath{%
- \openin\@inputcheck\@filef@und\relax
+\currfile@openin{\@inputcheck}{\@filef@und}%
\ifeof\@inputcheck
\currfile@check@inputpath
\fi
@@ -554,7 +565,7 @@
\expandafter\@tfor
\expandafter\@tempb
\expandafter:\expandafter=\input@path\do{%
- \openin\@inputcheck\@tempb\@filef@und\relax
+\currfile@openin{\@inputcheck}{\@tempb\@filef@und}%
\ifeof\@inputcheck\else
\edef\@filef@und{\@tempb\@filef@und}%
\@break@tfor
@@ -572,7 +583,7 @@
\ifx\IfFileExists\@iffileonpath
\currfile@check@inputpath
\else
- \openin\@inputcheck\@filef@und\relax
+\currfile@openin{\@inputcheck}{\@filef@und}%
\ifeof\@inputcheck
\currfile@check@inputpath
\fi
diff --git a/macros/latex/contrib/currfile/currfile.pdf b/macros/latex/contrib/currfile/currfile.pdf
index fa175e5248..21c3c7f4b2 100644
--- a/macros/latex/contrib/currfile/currfile.pdf
+++ b/macros/latex/contrib/currfile/currfile.pdf
Binary files differ
diff --git a/macros/latex/contrib/exam-n/A1.clo b/macros/latex/contrib/exam-n/A1.clo
deleted file mode 100644
index d40b8c26a9..0000000000
--- a/macros/latex/contrib/exam-n/A1.clo
+++ /dev/null
@@ -1,82 +0,0 @@
-\ProvidesFile{A1.clo}[2016/12/19 1.1.4]
-\typeout{A1 exam options, 1.1.4}
-%%%% Source: Mercurial revision e8a612cb25f4, 2016-12-19 16:49 +0000, tag exam-n-1.1.4 + 0
-%%%% File: A1.clo
-%%%% Copyright 2005--2016, Norman Gray
-%%
-%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
-%%
-%% This work has the LPPL maintenance status `maintained'.
-%%
-%% The Current Maintainer of this work is Norman Gray <http://nxg.me.uk>
-%%
-%% This work consists of the files exam-n.dtx and exam-n.ins,
-%% the derived file exam-n.cls,
-%% and the associated *.clo files.
-
-% Nothing here beyond the constants sheet
-\constantssheet{
-\begin{center}
-\def\e{{\rm e}}\def\deg{^\circ}
-\def\dmin{^{\rm m}}
-\def\dsec{^{\rm s}}
-\def\ez{\epsilon_{\rm 0}} % permittivity of free space
-\def\er{\epsilon_{\rm r}} % relative permittivity
-\def\ep{\epsilon} % permittivity
-\def\muz{\mu_{\rm 0}} % permeability of free space
-\def\mur{\mu_{\rm r}} % relative permeability
-\def\me{m_{\rm e}} % mass of the electron
-\def\mprot{m_{\rm p}} % mass of the proton
-\def\az{\a_{\rm 0}} % Bohr radius
-\def\mub{\mu_{\rm B}} % Bohr magneton
-%
-\def\tothe#1{$^{#1}$} % raise to the power #1
-\def\metre{\,{\rm m}}
-\def\kg{\,{\rm kg}}
-\def\sec{\,{\rm s}}
-\def\mm{\,{\rm mm}}
-\def\mol{\,{\rm mol}}
-\def\kelvin{\,{\rm K}}
-\def\joule{\,{\rm J}}
-\def\farad{\,{\rm F}}
-\def\ampere{\,{\rm A}}
-\def\ev{\,{\rm eV}}
-\def\hz{\,{\rm Hz}}
-\def\volt{\,{\rm V}}
-\def\watt{\,{\rm W}}
-\def\newton{\,{\rm N}}
-\def\unit#1{\,{\rm #1}}
-%
-{\Large\textbf{Values of astrophysical constants}}\\[\bigskipamount]
-\begin{tabular}{lll} \hline\\[-1.5ex] % slightly hacky extra space after hline
- speed of light & $c$ & $2.998\times 10^8 \metre\sec^{-1}$\\
- gravitational constant & $G$ & $6.673\times10^{-11}\newton\metre^2\kg^{-2}$\\
- Planck constant & $h$ & $6.626\times10^{-34}\joule\sec$\\
- Boltzmann constant & $k_{\rm B}$ & $1.381\times10^{-23} \joule\kelvin^{-1}$\\
- Stefan-Boltzmann constant & $\sigma$ & $5.671\times10^{-8}\watt\metre^{-2}\kelvin^{-4}$\\
- Rydberg constant & $R_\infty$ &$1.097\times10^{7}\metre^{-1}$\\
- Avogadro constant & $N_{\rm A}$ & $6.022\times 10^{23}\unit{mol}^{-1}$\\
- gas constant & $R$ & $8.315 \joule\mol^{-1}\kelvin^{-1}$\\
- proton mass & $\mprot$ & $1.673\times10^{-27} \kg$\\
- electron mass & $\me$ & $9.109\times10^{-31} \kg$\\
- elementary charge & $e$ & $1.602\times 10^{-19}\unit{C}$\\
- electronvolt & ${\rm eV}$ & $1.602\times 10^{-19}\unit{J}$\\[3pt]
- astronomical unit & au & $1.496\times10^{11} \metre$\\
- parsec & pc & $3.086\times10^{16}\metre$\\
- light year & ly & $9.461\times10^{15} \metre$\\[3pt]
- solar mass & $M_\odot$ & $1.989\times10^{30} \kg$\\
- solar radius & $R_\odot$ & $6.960\times10^8 \metre$\\
- solar luminosity & $L_\odot$ & $3.826\times10^{26}\watt$\\
- Earth mass & $M_\oplus$ & $5.976\times10^{24} \kg$\\
- Earth radius & $R_\oplus$ & $6.378\times10^6 \metre$\\
- obliquity of the ecliptic & $\epsilon$ & $23^\circ\,26'$\\[\medskipamount]
-\hline
-\end{tabular}
-\end{center}
-}
diff --git a/macros/latex/contrib/exam-n/README b/macros/latex/contrib/exam-n/README
deleted file mode 100644
index a128c336ef..0000000000
--- a/macros/latex/contrib/exam-n/README
+++ /dev/null
@@ -1,69 +0,0 @@
-
-exam-n: LaTeX class file for exams, version 1.1.4, 2016 December 19.
-====================================
-
-[ Mercurial revision e8a612cb25f4, 2016-12-19 16:49 +0000, tag exam-n-1.1.4 + 0 ]
-
-
-Overview
---------
-
-The class is designed to be localised to a particular institution's
-exam layout, by a suitably skilled LaTeX hacker. There are three
-possible ways of doing this, in increasing order of sophistication:
-
- 1. Make suitable adjustments to individual exam `.tex` files; or
-
- 2. Rename the distributed `exam-n.dtx` file to something more locally
- suitable, and edit it with suitable changes (search for
- `%%%CONFIGURE` for hints on where to adjust); or
-
- 3. Fork the Mercurial repository at
- [bitbucket](https://bitbucket.org/nxg/exam-n), change the
- value of the `EXAM-N` variable in the `Makefile`, and then
- edit the `exam-n.dtx` file. See the comments at the top of the
- `Makefile`.
-
-In case 2, you _must_ change the name of the `.dtx` file, and in case
-3, you must change the `EXAM-N` variable, to avoid terrible confusion
-(you probably also want to avoid the names of the other exam style
-files at CTAN, since they just might have found their way into your
-TEXINPUTS path).
-
-For general details, talk to Norman Gray <norman@astro.gla.ac.uk>.
-
-This is free software, and you are encouraged to use and adapt it as
-you see fit. Norman can give advice. If, however, you need more
-substantial help with the customisations of option 3 above, or need
-continuing support, then we can surely arrange something more
-elaborate.
-
-With the version 1.1 release, the interface should now be regarded
-as rather stable. However version 1.1 was the first to be released
-outside Glasgow University, so there may be some changes to the
-interface which will emerge with broader use, as well as some bug
-fixes. The interface _may_, therefore, yet change. If you use
-this class to produce exams, it would be wise to include a copy of
-the class file locally, rather than relying on a central version. If
-you need an earlier version of the class, let me know.
-
-
-Documentation
-------------
-
- * Documentation for question authors is in `notes-for-authors.pdf`.
- * The full version of the documentation, for 'exam conveners' (or
- equivalent) is in `exam-n.pdf`. This and the author
- documentation are built as part of the distribution.
- * Basic documentation for a LaTeX localiser is in this file (see
- above), with extra remarks at the top of the `Makefile`.
-
-There are brief release notes in exam-n.html.
-
-
-Distribution and copyright
---------------------------
-
-Copyright 2005--2016, Norman Gray <http://nxg.me.uk>
-Distributed under the terms of The LaTeX Project Public License (LPPL);
-see the file lppl.txt for details.
diff --git a/macros/latex/contrib/exam-n/README.ctan b/macros/latex/contrib/exam-n/README.md
index 872ae0b92a..872ae0b92a 100644
--- a/macros/latex/contrib/exam-n/README.ctan
+++ b/macros/latex/contrib/exam-n/README.md
diff --git a/macros/latex/contrib/exam-n/exam-n.dtx b/macros/latex/contrib/exam-n/exam-n.dtx
index 043d2c9f7c..ce752727b8 100644
--- a/macros/latex/contrib/exam-n/exam-n.dtx
+++ b/macros/latex/contrib/exam-n/exam-n.dtx
@@ -3,10 +3,13 @@
%
% Generated file : DO NOT EDIT
%
-%% Release version 1.1.4, 2016 December 19.
+%% Release version exam-n-1.4.0, 2022 October 10.
+%% See https://purl.org/nxg/dist/exam-n
+%% and https://heptapod.host/nxg/exam-n
+%% and https://www.ctan.org/pkg/exam-n
%%
%%%% File: exam-n.dtx
-%%%% Copyright 2005--2016, Norman Gray
+%%%% Copyright 2005--2022, Norman Gray
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -18,136 +21,47 @@
%%
%% This work has the LPPL maintenance status `maintained'.
%%
-%% The Current Maintainer of this work is Norman Gray <http://nxg.me.uk>
+%% The Current Maintainer of this work is Norman Gray <https://nxg.me.uk>
%%
%% This work consists of the files exam-n.dtx and exam-n.ins,
%% the derived file exam-n.cls,
%% and the associated *.clo files.
-%<+package|driver|example>%%%% Source: Mercurial revision e8a612cb25f4, 2016-12-19 16:49 +0000, tag exam-n-1.1.4 + 0
+
+%<+package|driver|example>%%%% Source: a91e9cff7cac, 2022-10-10T13:33:17+01:00
%%
%<*package|driver>
%</package|driver>
%<+package>\NeedsTeXFormat{LaTeX2e}
-%<+package>\ProvidesClass{exam-n}[2016/12/19 1.1.4]
-%<+package>\typeout{Class: `exam-n 1.1.4 <2016/12/19>}
+%<+package>\ProvidesClass{exam-n}[2022/10/10 exam-n-1.4.0]
+%<+package>\typeout{Class: `exam-n-1.4.0 <2022/10/10>}
%
%<*driver>
\documentclass{ltxdoc}
\title{exam-n: exam papers}
-\author{Norman Gray\\(\texttt{norman@astro.gla.ac.uk})}
-\date{Release 1.1.4}
+\author{Norman Gray\\(\texttt{norman.gray@glasgow.ac.uk})}
+\date{Version exam-n-1.4.0, 2022 October 10}% ...rather than exam-n-1.4.0, which isn't reader-focused
\usepackage{url}
\newcommand\Lopt[1]{\textsf {#1}} % options
\newcommand\file[1]{\texttt {#1}}
\newcommand\Lcount[1]{\textsl {\small#1}}
\newcommand\Lenv[1]{\texttt{\{#1\}}} %environments
-\newcommand\Lpackage[1]{\{\textsf{#1}\}} %packages
-%Make command strings easier to write
+\newcommand\Lpackage[1]{[\textsf{#1}]} %packages
+%Make command strings easier to write, with \cmd|\foo|
%{\catcode`\<=\active \gdef<#1>{\meta{#1}}}
{\catcode`\<=\active
\gdef<#1>{{\ensuremath\langle\normalfont\textsl{#1}\ensuremath\rangle}}}
\def\cmd{\begingroup
- \catcode`\\=12 \catcode`\{=12 \catcode`\}=12
+ \catcode`\\=12 \catcode`\{=12 \catcode`\}=12 \catcode`\#=12
\catcode`\<=\active \catcode`\|=12
\docmd}
\def\docmd|#1|{\texttt{#1}\endgroup}
-%%% \url macro (url.sty does this better)
-%\def\setpathdots{\discretionary{.}{}{.}}
-%\def\setpathslash{\discretionary{/}{}{/}}
-%{\catcode`\.=\active
-% \catcode`\/=\active
-% \gdef\pathcats{%
-% \catcode`\%=12 \catcode`\~=12
-% \catcode`\.=\active \let.\setpathdots
-% \catcode`\/=\active \let/\setpathslash
-% \catcode`\#=12 \catcode`\_=12}%
-% }
-%\def\setpath#1{\ttfamily <\nobreak #1\nobreak>\endgroup}
-%\def\url{\begingroup\pathcats\setpath}
-\def\bs{$\backslash$}
-\makeatletter
-% See Makefile for gymnastics here...
-% This hoiks the extra symbols at the bottom of the file, into the
-% text here, so they can be documented.
-% Abbreviations for degrees.
-% \begin{macrocode}
-\newcommand\BSc{B.Sc.{}}
-\newcommand\MSci{M.Sci.{}}
-\newcommand\MSc{M.Sc.{}}
-\newcommand\MA{M.A.{}}
-\newcommand\MEng{M.Eng.{}}
-\newcommand\BEng{B.Eng.{}}
-% \end{macrocode}
-%
-% Tweaks to differentials.
-% \begin{macrocode}
-\newcommand{\dd}{\mathrm{d}}
-\newcommand{\ddd}{\,\mathrm{d}} % inside an integral, including thinspace
+\def\secref#1{Sect.~\ref{#1}}
-\def\Diffl{\@ifstar\@Difflflat\@Diffl}
-\def\Partial{\@ifstar\@Partialflat\@Partial}
-\def\@Partial{\@ifnextchar[{\@@Diffl\partial}{\@@Diffl\partial[]}}
-\def\@Partialflat{\@ifnextchar[{\@@Difflflat\partial}{\@@Difflflat\partial[]}}
-\def\@Diffl{\@ifnextchar[{\@@Diffl\dd}{\@@Diffl\dd[]}}
-\def\@Difflflat{\@ifnextchar[{\@@Difflflat\dd}{\@@Difflflat\dd[]}}
-\def\@@Diffl#1[#2]#3#4{%
- \def\@tempa{#2}%
- \ifx\@tempa\empty
- \frac{#1#3}{#1#4}%
- \else
- \frac{{#1}^{#2}#3}{#1{#4}^{#2}}%
- \fi}
-\def\@@Difflflat#1[#2]#3#4{%
- \def\@tempa{#2}%
- \ifx\@tempa\empty
- #1#3\mskip-0.8mu/\mskip-1.2mu #1#4%
- \else
- {#1}^{#2}#3\mskip-0.8mu /\mskip-1.2mu #1{#4}^{#2}%
- \fi}
-% \end{macrocode}
-%
-% The exponential sign
-% \begin{macrocode}
-\def\e{{\mathrm e}}
-% \end{macrocode}
-%
-% Physical units in |\rm|. Unstarred version includes leading
-% |\thinspace|. Starred version doesn't, and is used when referring to
-% the unit by itself (eg axis is |$B/\units*T$|), and is not qualifying
-% a number.
-% FIXME: |\mu| in |\units| can come out wrong in some fonts (mtpro2?)
-% -- needs investigation.
-% \begin{macrocode}
-\def\units{\begingroup
- \catcode`\.=\active
- \@ifstar{\let\un@tsspace\relax \un@ts}%
- {\let\un@tsspace\thinspace\un@ts}}
-\begingroup
- \catcode`\.=\active
- \gdef\un@ts#1{\let~\thinspace\let.\thinspace
- \ifmmode
- \un@tsspace\mathrm{#1}%
- \else
- \nobreak$\un@tsspace\mathrm{#1}$%
- \fi
- \endgroup}
-\endgroup
-% \end{macrocode}
-%
-% Other miscellaneous symbols:
-% The AU is nothing exciting, but may be adjusted in future
-% \begin{macrocode}
-\def\au{au}
-% \end{macrocode}
-% The symbol for Compton wavelength is a crossed lambda -- the following isn't perfect, but is OK for now.
-% \begin{macrocode}
-\def\lambdabar{\setbox\@tempboxa\hbox{$\lambda$}%
- \hbox to 0pt{\hbox to \wd\@tempboxa{\hss$\bar{}$\hss}\hss}\box\@tempboxa}
-% \end{macrocode}
-\makeatother
+% Various definitions of this package, so we can document them.
+\usepackage{examndefs}
% Uncomment \OnlyDescription to skip the implementation
%\OnlyDescription
@@ -214,14 +128,74 @@
% |\comment| command.
%
% \item[\Lopt{cmfonts}, \Lopt{psfonts}, \Lopt{mathptm},
-% \Lopt{mathtime}, \Lopt{mtpro2}]
-% The \Lopt{cmfonts} option uses the Computer Modern fonts for the
-% document, and the \Lopt{psfonts} uses PostScript fonts. In this
-% latter case, you will possibly want to use one of the
-% \Lopt{mathtime} or \Lopt{mtpro2} options also, to use the
-% mathtime or MTPro2 font set for the maths in the document;
-% alternatively you can use the \Lopt{mathptm} option to use that
-% free but less good alternative.
+% \Lopt{mathtime}, \Lopt{mtpro2}, \Lopt{stix2}]
+% The \Lopt{cmfonts} option (the default) uses the Computer Modern fonts for the
+% document, and the other options use PostScript or OpenType fonts.
+%
+% The \Lopt{mathtime} or \Lopt{mtpro2} options select PostScript
+% Times Roman, Helvetica and Courier for the body text, plus either Mathtime or
+% Mathtime Professional~2 to typeset maths (this is commercially
+% distributed by
+% PC\TeX\footnote{\url{https://www.pctex.com/mtpro2.html}}, and
+% designed to be compatible with Times Roman). A broadly
+% compatible alternative to this is to use the \Lopt{mathptm}
+% option, but although this is free, the results aren't impressive.
+%
+% A final option is to use the \Lopt{stix2} option to choose
+% specifically and exclusively the
+% (free) STIX2 font set\footnote{\url{https://www.stixfonts.org}}
+% for both text and maths.
+% On this site, you will need to download and install
+% the files in the \url{static_otf.zip} bundle.
+% Note that the support for this option is somewhat experimental, and
+% at present, this package simply uses (serif) STIX2 roman
+% for all font shapes. Since the exam style doesn't use any sans serif by
+% default, this doesn't matter, at some level. The
+% \Lopt{sansserif} option is not compatible with this option (the option
+% won't produce any error, but neither will it produce any effect).
+%
+% \textbf{FIXME: remove this when unicode-math is working.}
+% \textbf{Note:} because of an unfortunate interaction between packages, the
+% \Lpackage{stix2} and \Lpackage{siunitx} packages can produce unexpected
+% results with some combinations of \TeX\ engine and package version
+% (specifically, \Lpackage{stix2} plus \Lpackage{siunitx}
+% and \cmd|\micro| or \cmd|\circ| can produce garbled characters
+% without \LaTeX\ reporting an error). Before \TeX Live 2021, this
+% worked correctly with Xe\LaTeX\ and Lua\LaTeX, but not with
+% pdf\LaTeX; from \TeX Live 2021 this works as expected with
+% pdf\LaTeX, but works with the other two \emph{only} if you load
+% the \Lpackage{siunitx} package with
+% \cmd|\usepackage{siunitx}[=v2]|. I hope that future versions of
+% one or other of these packages will make clear how this package
+% should handle them, in a way which avoids this special-casing.
+% \iffalse See
+% https://github.com/josephwright/siunitx/issues/550
+% https://github.com/josephwright/siunitx/issues/547
+% https://github.com/stipub/stixfonts/issues/235
+% \fi
+%
+% The handling of non-standard fonts has always been slightly
+% fragile in \LaTeX.
+% The \Lopt{mtpro2} and \Lopt{stix2} options are those currently
+% most used by the author, and are therefore the ones most likely
+% to get the various font nuances correct.
+%
+% \item[\Lopt{uprightpi}]By default $\pi$ is set slanted, as is the
+% usual \LaTeX\ default. When this is referring to the circular
+% constant, however, this should (in some typesetting styles) be set as an upright letter, in
+% fonts which support this. If the option \Lopt{uprightpi} is
+% present, then |\pi| is defined to produce an upright letter, and
+% the command |\italicpi| is defined to produce the slanted version.
+% Whether this option is supplied or not, the macro |\uppi| will
+% produce a single upright~$\pi$.
+% Note: this is at present implemented
+% only for the \Lopt{mtpro2} and \Lopt{stix2} options,
+% and the combination of pdflatex+stix2 does not support |\uppi| at present.
+%
+% \item[\Lopt{(no)siunitx}] Load the \Lpackage{siunitx} package, or
+% not. The default is yes. The |\units| macro, described below,
+% still exists as an alternative, but will be removed in a
+% forthcoming release (probably after 1.4.x).
%
% \item[\Lopt{(no)showsolutions}]
% These control whether the solutions to
@@ -235,7 +209,7 @@
% These control whether mark totals and subtotals are tracked within
% the question (perquestionmarks), and whether the total available
% marks are displayed at the end of the question (showmarktotals).
-% See Sect.\,\ref{s:question} for more discussion (this
+% See \secref{s:question} for more discussion (this
% option was called \Lopt{showmarks} up to release 0.15).
%
% \item[\Lopt{(no)pageperquestion}]
@@ -269,8 +243,9 @@
% \item[\Lopt{sansserif}]
% Use a sans serif font for the body text. This is plug-ugly, not
% least because it doesn't match the maths font; also, it may be
-% easier or harder for dyslexic students to read (depending on your
-% superstition -- there seems remarkably little actual evidence
+% easier or harder for dyslexic students to read (there seems to be
+% a variety of advice here, in both directions, ranging from
+% confident to dogmatic, but remarkably little solid evidence
% either way).
%
% \item[\Lopt{largefont}, or \Lopt{hugefont}]
@@ -283,9 +258,9 @@
% \file{.clo} file, containing course-, department- or group-specific style
% modifications. Most typically, these changes will affect the
% rubric, and the sheet of physical constants.
-% The only generic style option is \Lopt{A1}
+% The only generic style option is \Lopt{myclass}
% (which is included as an example of how such a file is written).
-% See section~\ref{s:custom} below.
+% See \secref{s:custom} below.
%
% In some circumstances -- for example when processing exam scripts
% under the control of a Makefile or script -- it can be convenient to
@@ -390,6 +365,9 @@
% preamble. After that, you must provide a question-number argument
% (in square brackets) for every question.
%
+% Using |\label| within a question sets a label for the question number;
+% using it within a |\part| (see below) labels the part number.
+%
% In some odder circumstances, you might not want to have any question
% numbers at all; for example, you might want to require examinees to
% attempt \emph{all} of the questions, and so simply have a mark for
@@ -467,7 +445,8 @@
% different questions, but cannot be |\input|
% unedited, as described above. If, however, they have \emph{only}
% these structures (that is, only the |\documentclass| command,
-% the \Lenv{document} environment, and zero or more |\usepackage| commands),
+% the \Lenv{document} environment, and zero or more |\usepackage|
+% or |\RequirePackage| commands),
% then you can most conveniently import them unedited using the
% |\includequestion| command.
% \begin{verbatim}
@@ -483,6 +462,12 @@
% question, you will have to make sure that whoever is assembling the
% master file includes those packages there, too.
%
+% That is, we don't try too hard to support including just any old \LaTeX, here:
+% any complicated preamble requirements in an included file should
+% probably be managed by the exams convener transplanting them into
+% the preamble of the main document. This may be an overly
+% simple-minded approach, and may change in future versions.
+%
% The |\includequestion| command takes an optional argument which
% overrides the question number. This caters for the case where
% question authors have (unhelpfully) included question numbers in the
@@ -505,7 +490,7 @@
% (c)..., or (i), (ii), (iii), and so on. Precede each of these with
% this |\part| command. The formatting of the part numbers is
% controlled by the exam style, as customised in
-% Sect.~\ref{s:custom}. This macro starts a new paragraph.
+% \secref{s:custom}. This macro starts a new paragraph.
%
% You can use the |\part| macro within solutions: this is useful if
% you have the entire \Lenv{solution} environment at the end of the
@@ -515,6 +500,13 @@
% so if you use this in the solutions, you must have as many
% |\part|s in the solution as there are parts in the question.
%
+% In some (rare) cases, you may want to force a particular part
+% number. You can do that with an optional argument |\part[99]|
+% which overrides the auto-incremented numbering. Note that this
+% skips the auto-increment of the number but doesn't cancel it, so
+% if you do this for one part number you should probably do it for
+% all of them.
+%
% \DescribeMacro{\partmarks}
% \DescribeMacro{\partmarks*}
% Macros \cmd|\partmarks{<num>}| and \cmd|\partmarks*{<num>}| announce
@@ -523,21 +515,55 @@
% number declared at the beginning of the {question} environment.
% You will typically have just one |\partmarks| per |\part|, but
% you can have more if you want.
-% The starred version differs by adjusting the position of the mark
-% indicator, and should be used either (i) after (for example) an
-% itemized list, or some other structure which leaves an expanse of
-% white space on the right-hand side of the page; or (ii) within
-% an \emph{unnumbered} equation. If, in case (ii), the style of
-% the part-marks indicators is such that the indicator may be
-% mistaken for an equation number, then it would be wise to use
-% either |\partmarks*| or plain |\partmarks| after the equation,
-% instead.
+%
+% The |\partmarks| command will most typically go at the end of a
+% paragraph, but it may also appear inside an equation (that is, in
+% |\[...\]|; don't use |$$...$$|), inside one or other
+% \Lpackage{amsmath} display or \Lenv{equation} environments, or in
+% a list or other environment. If it appears
+% inside an environment, the indicator will appear at the
+% \emph{end} of the environment, independent of where in the
+% environment the command was typed (which implies that you can't
+% have more than one inside an environment). The alignment of
+% the partmarks indicator is not currently as good as I'd like it
+% to be, in the case of \Lpackage{amsmath} alignments, but this
+% turns out to be hard to improve.
+%
+% The starred version is similar, but budges its indicator upwards
+% a little, and is a heuristic alternative which is useful in some
+% cases \emph{after} a list or display, if the placement of the
+% indicator is otherwise inaesthetic
+% (if the style of the part-marks indicators happens to be such
+% that the indicator may be mistaken for an equation number, then
+% it would be wise to use either |\partmarks| or |\partmarks*|
+% after the equation, instead). If you use |\partmarks*| within a
+% display, you might be confronted by an error message, talking
+% about |\eqno| in maths mode, which is even more incomprehensible
+% than most \LaTeX\ messages.
%
% The unstarred version should only be used at the end of a
% paragraph, and in fact forces a paragraph end; the starred
% version should on stylistic grounds generally be used only at the
% end of a paragraph, but it doesn't force one.
%
+% The |\partmarks| command has an optional argument which
+% indicates the category of the question, thus `bookwork', `unseen',
+% and so on. If this is present, then the category is included in the
+% marks indicator.
+%
+% The |\partmarks| category/comment will typically be only one or two words
+% long, and can sit comfortably in the margin. If an author wants to
+% write more here, then it will be turned into a footnote on the
+% page. This will obviously change the layout of the page, though
+% since this text appears only in \Lopt{showsolutions} mode, that
+% shouldn't be a problem.
+%
+% \DescribeMacro{\defaultpartmarkscategory}
+% If the exams convener wishes to \emph{oblige} people to
+% include such a category, then they might call
+% |\defaultpartmarkscategory{category?}| in a package-options (|.clo|)
+% file, to default the category with a highlighted remark to the question setter.
+%
% \DescribeMacro{\comment}
% \cmd|\comment{<text>}| associates a comment with a part of the text.
% This is ignored in \Lopt{final} mode, but appears in the margin in the
@@ -585,11 +611,10 @@
% Since the contents of this command is automatically uppercased in
% some styles, and there are per-department specifics about the punctuation
% of abbreviations, you should use the commands |\BSc|, |\MSci|, and
-% friends (see section~\ref{s:othercommands}) to set the degree names
+% friends (see \secref{s:othercommands}) to set the degree names
% appropriately.
%
% \DescribeMacro{\universitycoursecode}
-% \DescribeMacro{\schoolcoursecode}
% \DescribeMacro{\degreedescriptions}
% \DescribeMacro{\coursetitle}
% Declare the identity of the exam with
@@ -600,11 +625,6 @@
% This is the code for the course (and thus for the paper) as it
% appears in university information systems, and is a
% university-unique code such as `PHYS3031'.
-% \item[School course code]
-% This is a more informal, but more recognisable, code for the
-% course/paper, as it is generally recognised within the school;
-% for example, the honours Quantum Mechanics course is known
-% within the school as P304H.
% \item[Course title]
% This is just a textual name for the course, for example `Quantum Mechanics'.
% \item[Degree descriptions]
@@ -623,6 +643,13 @@
% |\rubric|) are suppressed. The layout may end up looking a little
% funny.
%
+% \DescribeMacro{\schoolcoursecode}
+% There is also a command |\schoolcoursecode|, which is a more
+% informal, but possibly more recognisable, code for the course/paper,
+% as it is generally recognised within the school; for example, the
+% honours Quantum Mechanics course is known within the school as
+% P304H. Its use is optional.
+%
% \DescribeMacro{\paperident}
% It can be convenient to add some identification to each page, if for
% no other reason than to double-check that you haven't inserted a
@@ -645,7 +672,7 @@
% Sometimes an exam may
% have different time limits for different qualifications: this case,
% separate the various times with |\\|, as in
-% \texttt{\bs examtime\{9.30am -- 12 noon\bs\bs (or) 9.30am -- 1.45am\}}
+% \cmd|\examtime{9.30am -- 12 noon\\ (or) 9.30am -- 1.45am}|.
%
% \DescribeMacro{\rubric}
% \DescribeMacro{\norubric}
@@ -666,6 +693,12 @@
% You will typically not have to change this, but if you do for some
% reason, you can override it with the |\baserubric| command.
%
+% Note that the |\baserubric| command is typically used within a |.clo|
+% file, within the argument to |\OverrideFormatting|. If you wish to
+% further override this on a per-exam basis, then you will need to do
+% so after |\OverrideFormatting| has done its work, and thus
+% immediately after the |\begin{document}|.
+%
% \DescribeMacro{\numquestions}
% Finally, declare the number of questions which are to be in the
% paper with |\numquestions|.
@@ -711,6 +744,13 @@
% There is analogous support for partial derivatives with |\Partial|.
%
% \DescribeMacro{\units}
+% You should generally type units, and numbers with units, using
+% the \Lpackage{siunitx} package, which is loaded by the
+% \Lopt{siunitx} option (which is now enabled by default). However
+% this class currently also supports a basic |\units| command,
+% described below. This macro will be removed in a future version
+% of the class.
+%
% Macros |\units|, |\units*|: you can typeset physical units in
% |\rm|, with tilde or dot
% acting as a separator between units. Since this is typeset in maths mode, all
@@ -719,19 +759,20 @@
% $v=10\units{m.s^{-1}}$. The starred
% version can be used when referring to the unit by itself
% (eg axis is |$B/\units*T$|, or $B/\units*T$), and is not
-% qualifying a number. These macros might be replaced, in the
-% future, by a recommendation to use the \Lpackage{siunitx} package.
+% qualifying a number.
%
-% For other useful symbols, see table~\ref{t:symbols}.
+% \def\cs#1{$\backslash$\texttt{#1}}
+% For other useful symbols, see table~\ref{t:symbols}.\footnote{The
+% package used to support an \cs{au} macro, for astronomical
+% unit, and \cs{lambdabar} for Compton wavelength, but these have
+% since been removed. The former is available via
+% \Lpackage{siunitx}.}
%
% \begin{table}
% \hrule \medskip
% \begin{tabular}{rlp{8cm}}
% |\e|&$\e^{i\pi}=-1$& the exponential is typeset in an upright rather than
% italic shape, as in |$\e^{i\pi}=-1$|.\\
-% |\au|&10\au& use this macro for astronomical units.\\
-% |\lambdabar|&$\lambdabar$& the Compton wavelength, as a lambda with a
-% bar through it.\\
% \end{tabular}
% \caption{\label{t:symbols}Miscellaneous symbols}
% \medskip\hrule
@@ -741,7 +782,7 @@
% \section{Customising the exam style}
% \label{s:custom}
%
-% As described in section~\ref{s:options} above, any unrecognised
+% As described in \secref{s:options} above, any unrecognised
% options are interpreted as an instruction to search for and include
% a class options file, formed from the name of the unrecognised
% option, suffixed with \file{.clo}, which can be anywhere in the
@@ -751,7 +792,7 @@
% The most typical changes here will be to adjust the exam rubric for
% a particular class, with the command |\baserubric|, and to change the
% sheet of physical constants, with the command |\constantssheet|.
-% See the sample file |A1.clo| for examples.
+% See the sample file |myclass.clo| for examples.
%
% Examine this sample \file{SpecialExam.clo} file:
% \begin{verbatim}
@@ -817,13 +858,32 @@
% If you really want to go to town on reformatting, you can redefine
% the command |\maketitle|, which formats the front-page title. When
% formatting this, you have access to each of the fragments of text
-% described in section~\ref{s:preamble}, via a macro named after the
+% described in \secref{s:preamble}, via a macro named after the
% corresponding command. Thus the argument of the |\exambanner| command
% is available in the macro |\@exambanner|. The exception is
% |\numquestions|. If you find yourself needing to do this, it might
% be worth having a discussion with the style's maintainer -- there
% may be a simpler way to get what you want.
%
+% \DescribeMacro{\CheckExamMetadata}
+% One of the things you may change within the |\maketitle| is the
+% checking of exam metadata -- which fields are required and which are
+% optional. You can change these from the default (in
+% \secref{s:preamble}) by defining a command |\CheckExamMetadata|.
+% \DescribeMacro{\RequiredMetadata}
+% This macro takes no arguments, and should use the command
+% \cmd|\RequiredMetadata{<field>}{<description>}{<help-text>}| to
+% perform its tests.
+% {\catcode`\<=\active Here <field> is the metadata key, such as
+% |{examdate}|, which corresponds to the macro |\examdate|, <description> is
+% a brief description of the field, such as |{exam date}|, and
+% <help-text> is a longer bit of explanation. If the corresponding
+% data is missing, then \LaTeX\ stops with an error, and the user can
+% examine the <help-text> by pressing the \texttt h key. You can
+% adjust the test by examining the value of
+% |\iffussydescription ... \fi|, which is set to |\false| if the \Lopt{sloppydescription}
+% option was provided.}
+%
% No more clues. If you want to hack at this, see the definition of
% |\maketitle| in the class file \file{exam-n.cls}.
% Aspire not to break things.
@@ -944,12 +1004,11 @@ $\Delta=6\pi M^2/h^2$, stating clearly any assumptions that
you make.\partmarks{6}
The solar-mass star HD83443 has a 0.35 Jupiter-mass planet that
-follows a circular orbit of period 2.986 days and radius 0.038\units\au.
+follows a circular orbit of period 2.986 days and radius \SI{0.038}{\astronomicalunit}.
Calculate the rate of precession, in arcseconds per year, of the
pericentre line of the planet's orbit.\partmarks{4}
-[Schwartzschild radius of the Sun${}= 3.0\times10^3\units{m}$,
-$1\units\au=1.5\times10^{11}\units m$].
+[Schwartzschild radius of the Sun: \SI{3e3}m; $\SI1\astronomicalunit = \SI{1.5e11}m$]
\begin{solution}
In the first type of calculation, we do a calculation in the LIF, in
@@ -987,6 +1046,12 @@ have a clue.
%</example>
% \end{macrocode}
%
+% \section{Release notes}
+% Recent release notes are below. For older notes, see the source
+% distribution.
+%
+% \input{release-notes.dtx}
+%
% \subsection*{Acknowledgements}
% \addcontentsline{toc}{subsection}{Acknowledgements}
%
@@ -998,6 +1063,26 @@ have a clue.
% \section{Implementation}
%
+% \subsection{\LaTeX3 compatibility}\label{s:compatibility}
+%
+% As of release 1.4.0, we depend on the \LaTeX3 hooks mechanism, which
+% was introduced in 2020. We therefore cannot work with versions
+% older than that.
+%
+% Note that we can't use the (apparently preferable)
+% |\IfFormatAtLeastTF| command to do this test: we want to continue to
+% work even when we're using a \LaTeX\ which is too old for this
+% command to be defined.
+% \begin{macrocode}
+\@ifl@t@r\fmtversion{2020/10/01}
+ {\typeout{Format is \fmtversion -- OK!}}
+ {\ClassError{exam-n}
+ {You need a more recent version of LaTeX}
+ {This class now requires a
+ LaTeX version at least 2020/10/01; version
+ \fmtversion\ is too old}}
+% \end{macrocode}
+%
% \subsection{Options}
%
% First, process the compose/draft/final option.
@@ -1031,13 +1116,33 @@ have a clue.
% from within this class file -- the only reliable way of checking if
% they're present is to look for something like rmtmi.pfa, but
% |\IfFileExists| isn't able to search for any of those files, only ones
-% on the TEXINPUTS path such as mathtime.sty, which can be, and are
+% on the \texttt{TEXINPUTS} path such as \texttt{mathtime.sty}, which can be, and are
% often, installed without the fonts themselves being present.
% \begin{macrocode}
\newcount\examn@mtselect \examn@mtselect=0
\DeclareOption{mathptm}{\@psfontstrue\examn@mtselect=0}
\DeclareOption{mathtime}{\@psfontstrue\examn@mtselect=1}
\DeclareOption{mtpro2}{\@psfontstrue\examn@mtselect=2}
+\DeclareOption{stix2}{\@psfontstrue\examn@mtselect=3}
+% \end{macrocode}
+%
+% The letter $\pi$ is usually the circular constant, and as such
+% should be set in an upright greek font. Don't this by default,
+% since that goes against the usual \LaTeX\ default, but instead
+% define the [uprightpi] option to support this, where possible.
+% Not all fonts make this easy.
+% \begin{macrocode}
+\newif\ifexamn@uprightpi \examn@uprightpifalse
+\DeclareOption{uprightpi}{\examn@uprightpitrue}
+% \end{macrocode}
+%
+% Load the \Lpackage{siunitx} package, or not, defaulting yes.
+% This is now preferred to the |\units| macro, and the latter will be
+% removed in a forthcoming release.
+% \begin{macrocode}
+\newif\ifexamn@siunitx \examn@siunitxtrue
+\DeclareOption{siunitx}{\examn@siunitxtrue}
+\DeclareOption{nosiunitx}{\examn@siunitxfalse}
% \end{macrocode}
%
% Switch between serif and sans serif fonts. We make little attempt
@@ -1109,12 +1214,12 @@ have a clue.
% \end{macrocode}
%
% If \Lopt{sloppydescription} is given, then we don't demand that all
-% the exam metadata is provided. Failing this, we object, fatally, to
+% the required exam metadata is provided. Failing this, we object, fatally, to
% missing information.
% \begin{macrocode}
-\newif\if@fussydescription
-\@fussydescriptiontrue
-\DeclareOption{sloppydescription}{\@fussydescriptionfalse}
+\newif\iffussydescription
+\fussydescriptiontrue
+\DeclareOption{sloppydescription}{\fussydescriptionfalse}
% \end{macrocode}
%
% The university logo is typeset in colour by default; the \Lopt{mono}
@@ -1127,7 +1232,7 @@ have a clue.
% \begin{macrocode}
\def\examn@header@shoutformat#1{{\Large\bfseries #1}}
\DeclareOption{mono}{
- \PassOptionsToPackage{monochrome}{color}
+ \PassOptionsToPackage{monochrome}{xcolor}
\def\examn@header@shoutformat#1{{\Huge\bfseries #1}}
}
\DeclareOption{colour}{}
@@ -1137,13 +1242,16 @@ have a clue.
% exam in `big' or `huge' font sizes, to help students with visual impairments.
% The available font variants are represented as numbers.
% Note: the |\examn@fontvariant| mechanism is in principle more
-% general than simply size variants, but some of the code below
+% general than simply size variants, but some of the code below
% assumes that |\examn@fontvariant| greater than zero means large
% text, and so would need to be adjusted if this becomes untrue.
%
-% The flag |\ifbigfont| is true if the font is `significantly large';
+% The flag |\ifbigfont| is true if the font is `significantly large',
+% in the sense that exam text, or hyphenation or layout, may have to
+% be adjusted in this case:
% option \Lopt{hugefont} sets it true, option \Lopt{largefont} does
-% not; it's intended to be a user-visible and -settable flag.
+% not. It's intended to be a user-visible and -settable flag.
+%
% \emph{Note:} the \Lopt{hugefont} option used to be \Lopt{bigfont};
% the latter is deprecated and may be removed in v1.2.
% \begin{macrocode}
@@ -1174,10 +1282,20 @@ have a clue.
\@styleoverrides={}
\def\OverrideFormatting{\@styleoverrides=}
% \end{macrocode}
+%
+% There are a few other settings which may be defaulted within a
+% \file{.clo} file:
+% \begin{itemize}
+% \item |\constantsheet{...}|: is a table of, for example, physical
+% constants which should appear in exams associated with a particular
+% course. Despite the name, this can be any text which should appear
+% on the first non-cover sheet of the exam.
+% \item |\baserubric|: a modified `base rubric' -- see the
+% documentation of |\rubric| below.
+% \end{itemize}
+%
% If \@constantssheet is defined (using |\constantsheet{...}| in a
-% .clo file), then display it on a page by itself. The macro
-% |\constantssheet| is declared above, before the point where we include
-% .clo files.
+% .clo file), then display it on a page by itself.
% \begin{macrocode}
\newtoks\@constantstoks
\def\@@displayconstants{%
@@ -1198,6 +1316,38 @@ have a clue.
\@constantstoks=}
% \end{macrocode}
%
+% Similarly for the |\baserubric| and |\rubric| commands.
+%
+% The rubric is typically a per-exam thing. The `base rubric' is
+% more-or-less common to all exams, though it's possible to override
+% it in a .clo file.
+% \begin{macrocode}
+\def\@rubric{}
+\def\rubric{\long\def\@rubric}
+\def\norubric{\let\@rubric\@nnil}
+% \end{macrocode}
+% \dots and the base rubric:
+% \begin{macrocode}
+\def\@baserubric{%
+\textbf{Answer each question in a separate booklet}\par
+Candidates are reminded that devices able to store or display text or
+images may not be used in examinations without prior arrangement.
+\if@perquestionmarks
+ \par
+ Approximate marks are indicated in brackets as a guide for candidates.
+\fi
+}
+\def\baserubric{\long\def\@baserubric}
+% \end{macrocode}
+%
+% The |\defaultpartmarkscategory| macro creates a default partmarks
+% `category'. See below. This is declared here, so that it can be
+% used in a |.clo| file without error.
+% \begin{macrocode}
+\let\examn@defaultpartmarkscategory\relax
+\def\defaultpartmarkscategory#1{\def\examn@defaultpartmarkscategory{#1}}
+% \end{macrocode}
+%
% Spit out the style overrides at the beginning of the document,
% rather than here.
% \begin{macrocode}
@@ -1279,11 +1429,23 @@ have a clue.
\hrule}}
% \end{macrocode}
%
-% Other required packages
+% Other required packages.
% \begin{macrocode}
\RequirePackage[english]{babel} % UK hyphenation
\RequirePackage{amsmath}
-\RequirePackage{color}
+\ifexamn@siunitx
+ \RequirePackage{siunitx}
+\fi
+% \end{macrocode}
+% We use the \Lpackage{xcolor} package, in preference to
+% \Lpackage{color}, so that we are compatible with TikZ (TikZ loads
+% the \Lpackage{xcolor} package internally, and that isn't compatible
+% with \Lpackage{color}). We could probably work around this some
+% other way, but \Lpackage{xcolor} seems to be relatively standard,
+% and appears to be backward compatible with \Lpackage{color},
+% so this change is harmless.
+% \begin{macrocode}
+\RequirePackage{xcolor}
% \end{macrocode}
%
% I think flush-left equations look MUCH better than centred, but
@@ -1294,74 +1456,52 @@ have a clue.
%
% \subsection{Layout}
%
-% First, handle PDF metadata, and other document identifiers.
-%
-% Generate an identifier, |\examn@docident| for this paper. This is obtained
-% from the university or school course code, followed by the
-% day-of-year, and the number of minutes since midnight (the goal here
-% is to produce an identifier which automatically increments in time,
-% but which isn't obviously a date
-% \begin{macrocode}
-\def\examn@setdocident{%
- \begingroup
- % yes, a big \ifcase would be more straightforward;
- % no, that wouldn't be any fun at all
- % (also it ends up looking messy and even tricksier).
- \def\@step##1##2\@nil{\advance\@tempcnta##1 \def\@tempa{##2}}
- \def\@tempa{{31}{28}{31}{30}{31}{30}{31}{31}{30}{31}{30}{31}}%
- \@tempcnta=\day % day of month
- \@tempcntb=\month % month of year (unit-offset)
- \loop
- \advance\@tempcntb-1
- \ifnum \@tempcntb>0
- \expandafter\@step\@tempa\@nil
- \repeat
- \@tempcntb=\year % yes, do calculate leap years
- \divide\@tempcntb 4 \multiply\@tempcntb 4
- \ifnum\@tempcntb=\year
- \ifnum\month>2 % but let's not worry about century years...
- \advance\@tempcnta 1
- \fi
+% \subsubsection{The \TeX\ engine}
+% Identify the \TeX\ engine we're using. If we are using pdf\TeX,
+% Xe\TeX, or Lua\TeX, we presume we're generating PDF. The
+% \Lpackage{ifpdf} package exists, and evaluates to true for Lua\TeX,
+% but doesn't distinguish between Xe- and Lua\TeX.
+% It would be nice to use a package such as \Lpackage{iftex}, but (as of late
+% 2017) this seems to do something sufficiently exotic with
+% respect to |\if| nesting, that it confuses the logic here.
+% It seems safer to do this test ourselves, so (a) we know what
+% we're getting, and (b) we have the result in a convenient integer form.
+% \begin{macrocode}
+\newcount\examn@engine
+\examn@engine=0
+\expandafter\ifx\csname pdfmatch\endcsname\relax
+ \expandafter\ifx\csname XeTeXinterchartoks\endcsname\relax
+ \expandafter\ifx\csname directlua\endcsname\relax
+ \examn@engine=0 % this is presumably original-TeX (how unutterably retro!)
+ \else
+ \examn@engine=3
\fi
- % remove any \\ or ~ in the coursecode fields
- \let\\\space
- \let~\space
- \xdef\examn@docident{% first element is based on uni/school course code
- \ifx\@coursetitle\@empty
- \ifx\@schoolcoursecode\@empty
- exam%
- \else
- \@schoolcoursecode
- \fi
- \else
- \@coursetitle
- \fi
- /\the\@tempcnta % day-of-year
- -\the\time} % minutes since midnight
- \endgroup
-}
-% \end{macrocode}
-% Check whether we're generating PDF, and define the |\ifpdf| macro
-% accordingly. This does depend on Oberdiek's \Lpackage{ifpdf} package being
-% available, but that's been available for quite a long while, and if
-% it isn't for some people's installations, we can potentially bring
-% back the code which it replaces.
-% \begin{macrocode}
-\RequirePackage{ifpdf}
-\def\@SetDocumentInfo{%
- \ifpdf
- {\pdfinfo{/Title (\examn@docident)}}%
- % Don't put out an /Author(xxx) info entry -- there may be
- % multiple authors, and it isn't obviously useful
+ \else
+ \examn@engine=2
\fi
-}
-\AtBeginDocument{\examn@setdocident\@SetDocumentInfo}
+\else
+ \ifnum\pdfoutput>0
+ \examn@engine=1
+ \else
+ % this _is_ pdftex, but it's in generate-dvi mode
+ % (we decide not to detect this case with the other engines)
+ \examn@engine=0
+ \fi
+\fi
% \end{macrocode}
%
+% \subsubsection{Fonts}
+%
% Choose the font set, based on |\if@psfonts| and |\examn@mtselect|.
+% The following is \emph{messy}, and it's not clear to me if it's
+% irreducibly so, or whether I'm just doing it the wrong way.
+%
+% Case |\examn@mtselect| is 0: the rather hacky \Lpackage{mathptm} solution.
% \begin{macrocode}
+\def\ex@fontlabel{???}
\if@psfonts
\ifcase\examn@mtselect
+ \def\ex@fontlabel{mathptm}
\ifexamn@serif
\RequirePackage{times}
\else
@@ -1369,7 +1509,14 @@ have a clue.
\fi
\RequirePackage{mathptm}
\ClassWarningNoLine{exam-n}{Using mathptm fonts}
- \or % use mathtime fonts
+% \end{macrocode}
+%
+% Case |\examn@mtselect| is 1 or 2: use mathtime or Mathtime Pro 2 fonts
+% for maths. We use postscript Times and Helvetica for the body fonts
+% in both cases.
+% \begin{macrocode}
+ \or
+ \def\ex@fontlabel{mathtime}
\RequirePackage[LY1]{fontenc} % specify text font encoding
\RequirePackage[LY1,mtbold]{mathtime} % switch math fonts
\ifexamn@serif
@@ -1379,6 +1526,7 @@ have a clue.
\fi
\ClassWarningNoLine{exam-n}{Using Mathtime fonts}
\or % use mtpro2 fonts
+ \def\ex@fontlabel{mtpro2}
\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
\ifexamn@serif
@@ -1389,13 +1537,103 @@ have a clue.
\fi
\RequirePackage[mtpbb]{mtpro2}
\ClassWarningNoLine{exam-n}{Using MTPro2 fonts}
+% \end{macrocode}
+%
+% Finally, case |\examn@mtselect| is 3: use STIX2 fonts: \url{http://www.stixfonts.org}.
+% Since this requires fontspec, it also requires either XeLaTeX or
+% LuaLaTeX. If we are in this branch, and not using either
+% engine, then fail with what we hope is a reasonably clear error.
+%
+% First off, refuse to work with original TeX.
+% \begin{macrocode}
+ \or
+ \def\ex@fontlabel{stix2}
+ \ifcase\examn@engine
+ \ClassError{exam-n}
+ {You can't use STIX fonts with original/DVI LaTeX}
+ {You must use either XeLaTeX or LuaLaTeX}
+% \end{macrocode}
+%
+% Use of the STIX fonts with pdflatex mostly works, but there is a
+% tricky current/legacy issue here.
+% The \Lpackage{stix2} package is intended to use the STIX2
+% fonts with `legacy' \TeX\ engines. Does this apply to pdflatex, now
+% it defaults to unicode input? See the discussion of
+% \Lpackage{unicode-math} below.
+%
+% As of TeXLive 2022, this mostly works, in the sense that we do use STIX
+% fonts, but the upright-pi support below fails (no LaTeX errors, but
+% |\uppi| produces slanted pi).
+% \begin{macrocode}
+ \or % pdflatex
+ \RequirePackage{stix2}
+% \end{macrocode}
+%
+% We support only Xe\TeX\ and Lua\TeX\ here, since only these can use
+% `system' fonts. For Xe\LaTeX\ we use `system' Helvetica and Courier
+% fonts (slightly scaled) as the sans and mono fonts, respectively, for the sake of
+% completeness.
+%
+% Note: unicode-math is a little complicated. As I (unfortunately)
+% discovered via mistaken bug report
+% \url{https://github.com/stipub/stixfonts/issues/235},
+% the \Lpackage{stix} package is intended to be used \emph{only} for
+% `legacy' \TeX\ engines, and \Lpackage{unicode-math} for current ones
+% such as Xe\LaTeX\ and Lua\LaTeX.
+% I'm fairly confident (as of 2022 July 11) that the following does
+% the right thing, but not yet 100% confident.
+%
+% Note that (as explained in the \Lpackage{unicode-math} manual, we
+% should use the STIX Two \emph{Math} font for symbols, and not the
+% text font.
+% \begin{macrocode}
+ \or % XeLaTeX
+ \RequirePackage[bold-style=ISO,math-style=ISO]{unicode-math}
+ \setmathfont{STIX Two Math}
+ \setmainfont{STIX Two Text}
+ \or % LuaLaTeX: like XeLaTeX
+ \RequirePackage[bold-style=ISO,math-style=ISO]{unicode-math}
+ \setmathfont{STIX Two Math}
+ \setmainfont{STIX Two Text}
+ \fi
+% \end{macrocode}
+% The no-match case shouldn't happen.
+% \begin{macrocode}
\else
- \ClassError{exam-n}{Impossible value of mtselect: \examn@mtselect}
+ \def\ex@fontlabel{ERROR}
+ \ClassError{exam-n}
+ {Impossible value of mtselect: \examn@mtselect}
+ {This shouldn't happen -- this is a class file bug}
\fi
+% \end{macrocode}
+%
+% There are no font complications when using CM fonts. That's nice.
+% \begin{macrocode}
\else
+ \def\ex@fontlabel{CM}
\ClassWarningNoLine{exam-n}{Using CM fonts}
\fi
% \end{macrocode}
+%
+% Report what engine and font configuration we're using.
+% \begin{macrocode}
+\typeout{Environment:
+ engine: \ifcase\examn@engine original/DVI\or pdfTeX\or XeTeX\or LuaTeX\else ???\fi;
+ fonts: \ex@fontlabel;
+ options: % show any non-default options
+ \ifexamn@uprightpi uprightpi, \fi
+ \ifexamn@siunitx siunitx, \fi
+ \ifexamn@serif\else noserif, \fi
+ \if@pageperquestion pageperquestion, \fi
+ \if@perquestionmarks\else noperquestionmarks, \fi
+ \if@showmarktotals\else noshowmarktotals, \fi
+ \if@twosidepages twoside, \fi
+ \if@fleqn fleqn, \fi
+ \iffussydescription\else sloppydescription, \fi
+ \ifbigfont hugefont, \fi
+ \if@showsolutions showsolutions\else noshowsolutions\fi}
+% \end{macrocode}
+%
% If we're using a sans serif font, then redefine |\normalfont| appropriately.
% The macro |\examn@bodyfontchange| stores up these font changes until
% they're applied just after |\maketitle|.
@@ -1415,6 +1653,14 @@ have a clue.
% \begin{macrocode}
\ifcase\examn@fontvariant
% default: do nothing
+ \def\examn@bodyfontchange{
+ % ...apart from redefine \small to be more clearly distinct from \normalsize
+ \renewcommand\small{%
+ \@setfontsize\normalsize{9}{11}%
+ \abovedisplayskip 9\p@ \@plus1.5\p@ \@minus5\p@
+ \abovedisplayshortskip \z@ \@plus2.5\p@
+ \belowdisplayshortskip 5\p@ \@plus2.5\p@ \@minus2.5\p@
+ \belowdisplayskip \abovedisplayskip}}
\or
% font variant 1: 18pt
\def\examn@bodyfontchange{
@@ -1425,6 +1671,12 @@ have a clue.
\belowdisplayshortskip 10\p@ \@plus5\p@ \@minus5\p@
\belowdisplayskip \abovedisplayskip
\let\@listi\@listI}
+ \renewcommand\small{%
+ \@setfontsize\normalsize{12}{16}%
+ \abovedisplayskip 12\p@ \@plus2\p@ \@minus6\p@
+ \abovedisplayshortskip \z@ \@plus4\p@
+ \belowdisplayshortskip 6.5\p@ \@plus3\p@ \@minus3\p@
+ \belowdisplayskip \abovedisplayskip}
\parindent=24pt
\parskip=18pt
% Redefine \FormatPartMarks so that it doesn't push the text off the paper
@@ -1440,6 +1692,12 @@ have a clue.
\belowdisplayshortskip 21\p@ \@plus10.5\p@ \@minus10.5\p@
\belowdisplayskip \abovedisplayskip
\let\@listi\@listI}
+ \renewcommand\small{%
+ \@setfontsize\normalsize{24}{28}%
+ \abovedisplayskip 24\p@ \@plus5\p@ \@minus12\p@
+ \abovedisplayshortskip \z@ \@plus8\p@
+ \belowdisplayshortskip 14\p@ \@plus8\p@ \@minus8\p@
+ \belowdisplayskip \abovedisplayskip}
\parindent=48pt
\parskip=36pt
% Redefine \FormatPartMarks so that it doesn't push the text off the paper
@@ -1466,6 +1724,79 @@ have a clue.
\fi}
% \end{macrocode}
%
+% Adjust maths font sizes for the various cases:
+% \begin{macrocode}
+\DeclareMathSizes\@xiipt{12}{9}{7}
+\DeclareMathSizes\@xipt{10}{8}{6}
+% \end{macrocode}
+%
+% \subsubsection{PDF metadata, and other document identifiers}
+%
+% Generate an identifier, |\examn@docident| for this paper. This is obtained
+% from the university or school course code, followed by the
+% day-of-year, and the number of minutes since midnight (the goal here
+% is to produce an identifier which automatically increments in time,
+% but which isn't obviously a date.
+%
+% Yes, a big |\ifcase| would be more straightforward;
+% no, that wouldn't be any fun at all
+% (also it ends up looking messy and even tricksier).
+% \begin{macrocode}
+\def\examn@setdocident{%
+ \begingroup
+ \def\@step##1##2\@nil{\advance\@tempcnta##1 \def\@tempa{##2}}
+ \def\@tempa{{31}{28}{31}{30}{31}{30}{31}{31}{30}{31}{30}{31}}%
+ \@tempcnta=\day % day of month
+ \@tempcntb=\month % month of year (unit-offset)
+ \loop
+ \advance\@tempcntb-1
+ \ifnum \@tempcntb>0
+ \expandafter\@step\@tempa\@nil
+ \repeat
+ \@tempcntb=\year % yes, do calculate leap years
+ \divide\@tempcntb 4 \multiply\@tempcntb 4
+ \ifnum\@tempcntb=\year
+ \ifnum\month>2 % but let's not worry about century years...
+ \advance\@tempcnta 1
+ \fi
+ \fi
+ % remove any \\ or ~ in the coursecode fields
+ \let\\\space
+ \let~\space
+ \xdef\examn@docident{% first element is based on uni/school course code
+ \ifx\@coursetitle\@empty
+ \ifx\@schoolcoursecode\@empty
+ exam%
+ \else
+ \@schoolcoursecode
+ \fi
+ \else
+ \@coursetitle
+ \fi
+ /\the\@tempcnta % day-of-year
+ -\the\time} % minutes since midnight
+ \endgroup
+}
+% \end{macrocode}
+%
+% Add information to the PDF document metadata.
+% \begin{macrocode}
+\ifcase\examn@engine
+ \let\@SetDocumentInfo\relax % original TeX
+\or % pdfTeX
+ \def\@SetDocumentInfo{\pdfinfo{/Title (\examn@docident)}}%
+ % Don't put out an /Author(xxx) info entry -- there may be
+ % multiple authors, and it isn't obviously useful
+\or % XeTeX
+ % dvipdfm special -- see the dvipdfm manual
+ \def\@SetDocumentInfo{\special{pdf: docinfo << /Title (\examn@docident) >>}}%
+\or % LuaTeX
+ % from the LuaTeX manual
+ \def\@SetDocumentInfo{\pdfextension info {/Title (\examn@docident)}}%
+\fi
+\AtBeginDocument{\examn@setdocident\@SetDocumentInfo}
+% \end{macrocode}
+%
% \subsubsection{Exam metadata}
%
% \begin{macrocode}
@@ -1508,25 +1839,6 @@ have a clue.
\next}
\expandafter\dd\@degreedescriptions\\}
% \end{macrocode}
-% The rubric is typically a per-exam thing. The `base rubric' is
-% more-or-less common to all exams, though it's possible to override
-% it in a .clo file.
-% \begin{macrocode}
-\def\@rubric{}
-\def\rubric{\long\def\@rubric}
-\def\norubric{\let\@rubric\@nnil}
-
-\def\@baserubric{%
-\textbf{Answer each question in a separate booklet}\par
-Candidates are reminded that devices able to store or display text or
-images may not be used in examinations without prior arrangement.
-\if@perquestionmarks
- \par
- Approximate marks are indicated in brackets as a guide for candidates.
-\fi
-}
-\def\baserubric{\long\def\@baserubric}
-% \end{macrocode}
%
% We can optionally check the total number of questions. Store this
% if it is present, and add a check to the |\end{document}| to check
@@ -1623,7 +1935,10 @@ images may not be used in examinations without prior arrangement.
%% headheight=\the\headheight, headsep=\the\headsep, topmargin=\the\topmargin}
\marginparsep=0.5cm
}
-
+% \end{macrocode}
+% In the \Lopt{draft} case, we nudge the text block to the side, to
+% give a larger margin.
+% \begin{macrocode}
\ifnum\@draftstatus > 0
\@settextblock{2cm}
\else
@@ -1660,7 +1975,7 @@ images may not be used in examinations without prior arrangement.
% |begingroup |ttfamily
% \catcode`\{=12 \catcode`\}=12 \catcode`\\=12
% |noindent \newcommand\FormatPartNumber{|linebreak
-% |noindent|quad\hbox to 2em{(\StylePartNumber{partnumber})\hss}}
+% |noindent|null|quad\hbox to 2em{(\StylePartNumber{partnumber})\hss}}
% |endgroup
% \end{quotation}
% works adequately as a part number,
@@ -1782,7 +2097,7 @@ images may not be used in examinations without prior arrangement.
\fancyhead[C]{\examn@bighead{\highlighted{DRAFT + SOLUTIONS, p\thepage/\pageref{lastpage}}}}
\else
\fancyhead[C]{\examn@bighead{\highlighted{DRAFT, p\thepage/\pageref{lastpage}}}}
- \fi
+ \fi
\else
\if@showsolutions
% Add a very prominent banner
@@ -1805,8 +2120,9 @@ images may not be used in examinations without prior arrangement.
%
% \subsubsection{The title page}
%
-% Define a special page style for the title page
-% No header: all of the text on the page is handled by |\maketitle|
+% Define a special page style for the title page.
+%
+% There is no header: all of the text on the page is handled by |\maketitle|
% The first-page footer doesn't show anything, but it does have to set
% |\examn@topmark| in case Q1 starts on this page.
% \begin{macrocode}
@@ -1817,53 +2133,52 @@ images may not be used in examinations without prior arrangement.
% \end{macrocode}
%
% Create a custom maketitle.
-% First, handle the 'final' or 'draft' versions.
% Check all required information is present.
% \begin{macrocode}
-\renewcommand\maketitle{
- \ifnum\@draftstatus < 2 % final or draft version
- \ifx\@examdate\@empty
- \ClassError{exam-n}
- {No exam date given}
- {Specify an exam date using \protect\examdate}
- \fi
- \ifx\@examtime\@empty
- \ClassError{exam-n}
- {No exam time given}
- {Specify an exam time using \protect\examtime}
- \fi
- \ifx\@exambanner\@empty
- \ClassError{exam-n}
- {No exam banner given}
- {Specify an exam banner (eg Examination for the degree...) using \protect\exambanner}
- \fi
- \if@fussydescription
- \ifx\@schoolcoursecode\@empty
- \ClassError{exam-n}
- {No school course code given}
- {Specify a school course code (eg P304H) using \protect\schoolcoursecode}
- \fi
- \ifx\@universitycoursecode\@empty
- \ClassError{exam-n}
+\def\RequiredMetadata#1#2#3{
+ \expandafter\ifx\csname @#1\endcsname\@empty
+ \ClassError{exam-n}{#2}{#3 (command \@backslashchar #1)}
+ \else
+ \typeout{#1 check OK}
+ \fi}
+% \end{macrocode}
+% Define a |\CheckExamMetadata| test, but only if the macro wasn't defined in a |.clo| file.
+% \begin{macrocode}
+\@ifundefined{CheckExamMetadata}{
+ \def\CheckExamMetadata{
+ % First, data which is always required
+ \RequiredMetadata{examdate}
+ {No exam date given}
+ {Specify an exam date}
+ \RequiredMetadata{examtime}
+ {No exam time given}
+ {Specify an exam time}
+ \RequiredMetadata{exambanner}
+ {No exam banner given}
+ {Specify an exam banner (eg Examination for the degree...)}
+ \iffussydescription
+ % The following tests can be skipped by using the option [sloppydescription]
+ \RequiredMetadata{universitycoursecode}
{No paper title given}
- {Specify a university course code (eg PHYS3031) using \protect\universitycoursecode}
- \fi
- \ifx\@coursetitle\@empty
- \ClassError{exam-n}
+ {Specify a university course code (eg PHYS3031)}
+ \RequiredMetadata{coursetitle}
{No course title given}
- {Specify a course title (eg Quantum Mechanics) using \protect\coursetitle}
- \fi
- \ifx\@degreedescriptions\@empty
- \ClassError{exam-n}
+ {Specify a course title (eg Quantum Mechanics)}
+ \RequiredMetadata{degreedescriptions}
{No paper subject given}
- {Specify a 'degree description' (eg Physics 3) using \protect\degreedescriptions}
- \fi
- \ifx\@rubric\@empty
- \ClassError{exam-n}
+ {Specify a 'degree description' (eg Physics 3)}
+ \RequiredMetadata{rubric}
{No rubric given}
- {Specify a rubric using \protect\rubric, or declare its absence with \protect\norubric}
- \fi
+ {Specify a rubric, or declare its absence with \protect\norubric}
\fi
+ }}{}
+% \end{macrocode}
+% Start the |\maketitle| command.
+% First, handle the 'final' or 'draft' versions.
+% \begin{macrocode}
+\renewcommand\maketitle{
+ \ifnum\@draftstatus < 2 % final or draft version
+ \CheckExamMetadata
% \end{macrocode}
% All OK so far\dots. Now produce the actual text.
% \begin{macrocode}
@@ -2073,6 +2388,8 @@ images may not be used in examinations without prior arrangement.
%
% \subsection{Structuring commands}
%
+% \subsubsection{Sections}
+%
% Define simple sectioning commands. We also check that these aren't
% inside questions.
% \begin{macrocode}
@@ -2143,6 +2460,7 @@ images may not be used in examinations without prior arrangement.
\@starttoc{toc}}
% \end{macrocode}
%
+% \subsubsection{Questions and solutions}
% Counters:
% \begin{macrocode}
\newcount\marktotal % number of marks accumulated so far
@@ -2155,9 +2473,17 @@ images may not be used in examinations without prior arrangement.
% within a question. It's a \LaTeX\ counter, so we can use |\roman|.
%
% We override the \Lenv{article} |\part| command.
+%
+% FIXME:
+% We would like to use |\StylePartNumber| here, but can't, because
+% that's defined as being eg |\alph|, and not |\@alph|. To change
+% this, we'll have to retire |\StylePartNumber|, in favour of saying
+% that, to change the formatting here, it's merely necessary to
+% redefine |\thepartnumber|.
% \begin{macrocode}
\newcounter{partnumber}
-\renewcommand\part{%
+\renewcommand\thepartnumber{\thequestionnumber\@alph\c@partnumber}
+\renewcommand\part[1][]{%
\if@nobreak \else
\par
\@nobreakfalse
@@ -2166,14 +2492,28 @@ images may not be used in examinations without prior arrangement.
\vskip 0pt plus 4\bigskipamount
\penalty-50
\fi
- \stepcounter{partnumber}%
- \noindent\FormatPartNumber
+ \def\@tempa{#1}%
+ \ifx\@tempa\@empty
+ \refstepcounter{partnumber}%
+ \noindent\FormatPartNumber
+ \else
+ \noindent\FormatPartNumber[#1]%
+ \fi
}
% \end{macrocode}
% The default |\FormatPartNumber| creates a box the same size as a
% parindent. This therefore assumes that it's following a |\noindent|.
% \begin{macrocode}
-\newcommand\FormatPartNumber{\hbox to \parindent{(\StylePartNumber{partnumber})\hss}}
+\newcommand\FormatPartNumber[1][]{%
+ \def\@tempa{#1}%
+ \hbox to \parindent{(%
+ \ifx\@tempa\@empty
+ \StylePartNumber{partnumber}%
+ \else
+ \@tempa
+ \fi
+ )\hss}%
+}
% \end{macrocode}
% And by default we use alphanumeric counters for parts (we abstract
% this, rather than simply including |\alph| in the definition of
@@ -2235,102 +2575,355 @@ images may not be used in examinations without prior arrangement.
}
% \end{macrocode}
%
+% \subsubsection{Partmarks}
+%
% |\partmarks| is used at the end of a paragraph to indicate the
% number of marks associated with this part. The starred variant
-% |\partmarks*| is used when the end of a part is the end of a display
+% |\partmarks*| is used only when the end of a part is the end of a display
% maths block which doesn't have an equation number. This moves the
% part note up a bit, which looks nicer.
+%
+% It's also permissible to use |\partmarks| in the solution, to
+% indicate precisely where marks accrue. It's reasonable for this to
+% be more fine-grained than in the question. We don't check that the
+% partmarks in the solution add up to the mark goal.
+%
+% Manage the partmarks comments as the contents of a zero-width hbox,
+% which is sized to fit reasonably well in the margin. We insert this
+% into the output just before formatting the partmarks.
+%
+% The |\defaultpartmarkscategory| macro creates a default partmarks
+% `category'. If this is something like |{category?}|, then this
+% should prompt question authors to indicate the category in each call
+% to |\partmarks|. This can be declared within a |.clo| option file
+% (and is declared above, so that it can be read from there without error).
+%
+% Below, we must add the footnote text after the end of the paragraph,
+% otherwise this inserts vertical mode material, which causes a
+% linebreak, at least in the case where the last line is almost full.
+% Because we are using the hook mechanism, this package now depends on
+% the expl3 modules, and thus on TeXLive versions which aren't too old
+% (how old is too old? I'm not sure, but I expect TeXLive 2020 is new enough).
+% \begin{macrocode}
+\newbox\examn@partmarkscomment
+\def\examn@makepartmarkscomment#1{%
+ \setbox0=\hbox{\small #1}%
+ \ifdim\wd0 < 3\marginparwidth % let shortish comments wrap here
+ \setbox\examn@partmarkscomment=\hbox to 0pt{\hbox{%
+ \vtop to 0pt{%
+ \hsize=\marginparwidth
+ \parindent=0pt
+ \parskip=0pt
+ \leftskip=1em % 1em matches the hskip in default \FormatPartMarks
+ \rightskip=0pt plus 0.5\marginsize
+ \hangindent=2em \hangafter=-1
+ \small
+ #1\vss}}\hss
+ }%
+ \else
+ \stepcounter\@mpfn
+ \protected@xdef\@thefnmark{\thempfn}%
+ \@footnotetext{#1}%
+ % 3em matches the \leftskip+\hangindent above
+ \setbox\examn@partmarkscomment=\hbox to 0pt{%
+ \hskip3em\highlighted{\small [comment \thempfn]}\hss}%
+ \fi
+ }
+\def\examn@getpartmarkscomment{%
+ \ifhbox\examn@partmarkscomment
+ \box\examn@partmarkscomment
+ \fi}
+% \end{macrocode}
+% Now, finally, define the actual |\partmarks| command.
% \begin{macrocode}
\def\partmarks{%
\@ifstar{\@tempswatrue \@partmarks}{\@tempswafalse \@partmarks}}
\newdimen\@partmarksspace
\@partmarksspace=2em % default value
% \end{macrocode}
-% Now implement the part marks indicator. First, check that
+% Check whether there's an optional (comment/category) argument,
+% enclosed in |[...]|.
+% \begin{macrocode}
+\def\@partmarks{%
+ \@ifnextchar[%]
+ \@@partmarks{\@@partmarks[]}}
+% \end{macrocode}
+% Implement the part marks indicator. First, check that
% `perquestionmarks' is turned on; if it's not, then we shouldn't be
% using |\partmarks|.
% \begin{macrocode}
-\def\@partmarks#1{%
+\def\@@partmarks[#1]#2{%
\if@perquestionmarks
\if@insolution
- % visual display only -- doesn't count towards mark total
- \setbox0=\vbox to 0pt{\vss
- \hbox to \textwidth{\hfil\hbox to 0pt{\quad\small[\dots #1]\hss}}
- \vskip0.25ex }%
- % the next line is probably unnecessary, but guarantees that box0
- % has zero depth, so no extra vertical space appears because of
- % this new box
- \dp0=0pt
- \ifvmode
- \box0
+ \@@partmarks@solution{#1}{#2}%
+ \else
+ \@@partmarks@question{#1}{#2}%
+ \fi
+ \else
+ \ClassError{exam-n}{\string\partmarks\ is not compatible with
+ noperquestionmarks}{Either remove \string\partmarks\ or remove
+ the noperquestionmarks option}
+ \fi
+}
+% \end{macrocode}
+%
+% Finally, implement the two partmarks variants for questions and solutions.
+%
+% The |\@@partmarks@endenv| command is called when |\partmarks| is
+% invoked within an environment, and is used to add a suitable vbox to
+% an after-environment hook.
+%
+% First prepare the vbox that's to be inserted, and then work out how
+% to place it. The |\vskip\baselineskip| in the |\@partmarksbox| is
+% to better position the box relative to where it ends up in the
+% vertical list, and the value has a large heuristic element.
+% \begin{macrocode}
+\newbox\@partmarksbox
+\def\@@partmarks@endenv@display{\@tempswatrue\@@partmarks@endenv@common}
+\def\@@partmarks@endenv@nodisplay{\@tempswafalse\@@partmarks@endenv@common}
+\def\@@partmarks@endenv@common#1{%
+ \ifvbox\@partmarksbox % ooops -- been here before: two \partmarks in one env
+ \ClassError{exam-n}
+ {Two partmarks commands in one environment! First one IGNORED!}
+ {You can (currently) have only one partmarks command per environment}
+ \fi
+ \global\setbox\@partmarksbox=\vbox to 0pt{\vss
+ \hbox to \textwidth{%
+ \strut\hfill
+ \examn@getpartmarkscomment
+ \FormatPartMarks{#1}}%
+ \vskip\baselineskip}%
+ %\dp\@partmarksbox=0pt
+% \end{macrocode}
+% Test whether we have the |{question}| environment as our immediate
+% container, as opposed to being in an inner environment.
+% \begin{macrocode}
+ \def\@tempa{question}%
+ \ifx\@tempa\@currenvir
+ \setbox1=\vbox to 0pt{\vss\box\@partmarksbox}%
+ \ifvmode
+ \box1
+ \else
+ \vadjust{\box1}%
+ \fi
+ \else
+% \end{macrocode}
+% Generally the \cmd|env/<env>/end| hook seems to
+% produce better results, in terms of positioning things at the end of
+% environments, but this does not work for environments
+% where the command is located inside a display (ie, in \TeX\ terms,
+% inside |$$...$$|); in these situations we have to use the
+% \texttt{.../after} hook instead. Such displays are most typically amsmath
+% alignment environments, but an \cmd|\halign| inside a display will
+% also qualify (see the discussion of `alignment displays' in \TeX
+% Book ch.19). There isn't a completely straightforward way of
+% detecting this situation (though amsmath's \cmd|\start@align| sets
+% \cmd|\xatlevel@| to be non-\cmd|\@empty|, which we take to indicate the
+% amsmath case), so we have to rely on the caller of this
+% command to invoke the \texttt{...@display} or \texttt{...@nodisplay}
+% variant appropriately.
+% \begin{macrocode}
+ \if@tempswa % display variant
+ \AddToHookNext{env/\@currenvir/after}{%
+ %\typeout{hook:endenv/display #1}%
+ \ifvmode\box\@partmarksbox
+ \else\vadjust{\box\@partmarksbox}\fi}%
+ \else
+ \AddToHookNext{env/\@currenvir/end}{%
+ %\typeout{hook:endenv/nodisplay: env/\@currenvir/end #1}%
+ \ifvmode\box\@partmarksbox
+ \else\vadjust{\box\@partmarksbox}\fi}%
+ \fi
+ \fi
+}
+% \end{macrocode}
+%
+% First, define the questions version, for appearing in the version candidates see.
+% Here, \cmd|#1| is the possibly empty `classification' text, and \cmd|#2| is the
+% number of marks. At this point |\if@tempswa| is true if we got here
+% via the \cmd|\partmarks*| variant, and false if it's the unstarred one.
+%
+% The argument |#2| must be a number: any non-number text will not
+% cause an error but will appear in the text.
+%
+% But first\dots!
+%
+% The |\partmarks| command increments a global counter, and we
+% \emph{don't} want to do this when an \Lpackage{amsmath} alignment is evaluating
+% the content in its `measuring' phase. Fortunately,
+% \Lpackage{amsmath} has an (internal) flag |\ifmeasuring@| which is
+% true in that phase, which it uses for this purpose, so make this macro a no-op in that case.
+% \begin{macrocode}
+\def\@@partmarks@question{%
+ \ifmeasuring@
+ \let\@@partmarksnext\@gobbletwo
+ \else
+ \let\@@partmarksnext\@@partmarks@question@do
+ \fi
+ \@@partmarksnext
+}
+% \end{macrocode}
+% On with the main business.
+% \begin{macrocode}
+\def\@@partmarks@question@do#1#2{%
+ \global\advance\marktotal #2
+ \let\@@partmarksnext\relax % base case
+% \end{macrocode}
+% Display the `part category', \emph{visible in the question},
+% if \Lopt{showsolutions} is true, either
+% explicitly, or implicitly as a consequence of the
+% compose/draft/final mode. It's arguable that this should be
+% dependent on the mode only, but after some discussion, it ended up
+% seeming more reasonable to tie this to \Lopt{showsolutions} directly.
+% \begin{macrocode}
+ \if@showsolutions
+ \def\@tempa{#1}%
+ \ifx\@tempa\@empty
+ \ifx\examn@defaultpartmarkscategory\relax
+ \let\examn@category\relax
\else
- \vadjust{\nointerlineskip\box0}%
+ \examn@makepartmarkscomment{\highlighted{\examn@defaultpartmarkscategory}}%
\fi
\else
- \global\advance\marktotal #1
- \if@tempswa
+ \examn@makepartmarkscomment{\highlighted{#1}}%
+ \fi
+ \fi
% \end{macrocode}
-% This is the starred form of |\partmarks|. That is, this is being invoked
-% (i) just after maths (or some other display which doesn't fill the line),
-% \emph{or} (ii) at the end of an unnumbered equation. In case (i),
-% we move the part mark up a bit; in case (ii), we format the
-% partmarks as a type of equation number
-%
-% We handle case (ii) first, by detecting whether we're in a maths
-% display. If so, we format the partmarks as an equation number, using
-% |\eqno|. Note that \Lpackage{amsmath} maths (which is what we're
-% using here) formats this differently if the material following
-% |\eqno| is of zero size, so we make this slightly larger than that.
-% \begin{macrocode}
- \ifdim\displaywidth>0pt
- \if@eqnsw
- \ClassError{exam-n}{\string\partmarks* may not be used
- within numbered equations}{Replace \string\partmarks*
- with a \string\partmarks\ after the equation}
- \global\advance\marktotal -#1 % to cause the mark total to be wrong
- \else
- \eqno \hbox to 1sp{\FormatPartMarks{#1}\hfil}%
- \fi
+%
+% If |\@tempswa|, then this is the starred form of |\partmarks|.
+% This is intended to be used only occasionally, after a display or
+% list environment, where for some reason the command can't go inside
+% the environment.
+% \begin{macrocode}
+ \if@tempswa
+ \ifdim\displaywidth>0pt
+ \ClassError{exam-n}
+ {Don't use \partmarks* inside a display}
+ {Use \partmarks inside the display, or \partmarks*
+ after it, if necessary}
% \end{macrocode}
-% Case (i), not in maths: We don't automatically end the
-% paragraph here, because a display will often not be the end of a paragraph.
-% I am not at all convinced that this is the correct approach
-% to nudging the partmarks text up the right amount. The
-% following appears to do roughly the right thing, but there's a
-% strong element of trial and error in it.
+% Else we are most likely just after an equation or just after a list
+% environment, or something similar.
+% (here and below we include some |{#2:n}| debugging code for when I,
+% inevitably, revisit this to worry about the spacing).
% \begin{macrocode}
- \else
- \setbox0=\vbox to 0pt{\vss
- \hbox to \textwidth{\strut\hfill\FormatPartMarks{#1}}%
- \vskip 1\baselineskip}% vskip means box has zero depth
- \ifvmode
- \box0
- \else
- \vadjust{\box0}%
- \fi
+ \else
+ \@@partmarks@endenv@nodisplay{#2}%{#2:1*}%
+ \fi
+% \end{macrocode}
+% We've called the unstarred version of |\partmarks|.
+% This is the more usual mode.
+% \begin{macrocode}
+ \else
+ \ifdim\displaywidth>0pt
+% \end{macrocode}
+% We're in a display, after |$$|: \TeX\ is probably (but not certainly) in
+% maths mode just now; if we're in an amsmath alignment, we're in
+% specifically inner maths mode; there are other, rarer, ways of being
+% in an `alignment display'. Additionally, and commonly, if we're in
+% an \Lenv{equation} environment now -- which we can detect because
+% that, amongst other amsmath environments, sets |\eqnsw| to be true
+% -- then we're \emph{not} in an alignment, but we \emph{are} in a
+% case where the |\eqno| technique will fail (with `You can't use
+% `eqno' in math mode.'), so catch that.
+%
+% CONSIDER: is this |\@eqnsw| test in fact the only one I have to do
+% -- is the inner math mode test equivalent? That is, is this, when
+% it comes down to it, testing the actual thing I need to test here?
+% This will require another dive into the amsmath magic.
+% \begin{macrocode}
+ \@tempswafalse
+ \ifmmode\ifinner \else \@tempswatrue \fi\fi
+ \if@tempswa
+ \if@eqnsw % not so fast... we're in an {equation}
+ \@tempswafalse
\fi
+ \fi
+ \if@tempswa
% \end{macrocode}
-% We've called the unstarred version of |\partmarks|. We also end the paragraph here
-% (this technique is filched from the TeXBook, p106).
+% We're in outer maths mode, which we can take to mean a |\[...\]| equation.
+% In this case, we can very neatly position the partmarks indicator
+% using |\eqno|.
+% \begin{macrocode}
+ \def\@@partmarksnext{\eqno \hbox to 1sp{% the \eqno argument must not be zero size
+ \examn@getpartmarkscomment
+ \FormatPartMarks{#2}%{#2:1}
+ \hss}}%
+% \end{macrocode}
+% Or we're in one or other type of display.
% \begin{macrocode}
\else
+ \def\@@partmarksnext{\@@partmarks@endenv@display{#2}}%
+ %\def\@@partmarksnext{\@@partmarks@endenv@display{#2:2,\@currenvir}}%
+ \fi
+% \end{macrocode}
+%
+% Otherwise, |\displaywidth=0pt|, and we're not in a display.
+% If we are in the |{question}| environment, as opposed to any sub-environment,
+% we end the paragraph here and put the partmarks indicator at the end
+% of the final line of the paragraph (this technique is filched from the TeXBook, p106).
+% Otherwise, we add a suitable box to an end-of-environment hook.
+%
+% Omitting the |{question}| test below, and handling all cases with
+% the end-of-paragraph technique, works in most case, in the sense of
+% looking fine. Where it fails is in the case of, eg, |{quote}|,
+% where the end-of-line ends up indented from the right.
+%
+% Using the hook has the additional advantage that |\partmarks| can be anywhere
+% within the environment and this locates it at the end.
+%
+% The dimension |\@partmarksspace| controls how much space the
+% partmarks-number takes up, the default is the special case of 0pt,
+% which puts it in the margin.
+% \begin{macrocode}
+ \else
+ \def\@tempa{question}%
+ \ifx\@tempa\@currenvir
\ifdim\@partmarksspace > 0pt
{\unskip\nobreak\hfil\penalty50 \hskip\@partmarksspace
- \hbox{}\nobreak\hfil\FormatPartMarks{#1}%
+ \hbox{}\nobreak\hfil\examn@getpartmarkscomment\FormatPartMarks{#2}%{#2:3}%
\parfillskip=0pt \finalhyphendemerits=0 \par}
\else
- \unskip\nobreak\hfill\FormatPartMarks{#1}\par
+ \unskip\nobreak\hfill\examn@getpartmarkscomment\FormatPartMarks{#2}\par%{#2:4}\par
\fi
+ \let\@@partmarksnext\relax
+ \else
+ \def\@@partmarksnext{\@@partmarks@endenv@nodisplay{#2}}%
+ %\def\@@partmarksnext{\@@partmarks@endenv@nodisplay{#2:5,\@currenvir}}%
\fi
\fi
- \else
- \ClassError{exam-n}{\string\partmarks\ is not compatible with
- noperquestionmarks}{Either remove \string\partmarks\ or remove
- the noperquestionmarks option}
\fi
+% \end{macrocode}
+%
+% The `question' variant of this macro includes an |\ignorespaces| at the
+% end, since that is generally the right thing to do (the command
+% almost always appears at the end of paragraphs, or after equations).
+% \begin{macrocode}
+ \@@partmarksnext
\ignorespaces
}
% \end{macrocode}
+% Then the solutions version, for the benefit of markers, which is
+% typically more finely itemized, and which isn't summed (ie, we don't
+% at present confirm that the marks here match the question's marks goal).
+% The solutions variant of this macro omits the |\ignorespaces|
+% (since in solutions this macro is scattered within the text).
+% Setting |\dp0=0pt| is probably unnecessary, but guarantees that box0
+% has zero depth, so no extra vertical space appears because of
+% this new box.
+% \begin{macrocode}
+\def\@@partmarks@solution#1#2{%
+ \setbox0=\vbox to 0pt{\vss
+ \hbox to \textwidth{\hfil\hbox to 0pt{\quad\small[\dots #2]\hss}}
+ \vskip0.25ex }%
+ \dp0=0pt
+ \ifvmode
+ \box0
+ \else
+ \vadjust{\nointerlineskip\box0}%
+ \fi
+}
+% \end{macrocode}
%
% The code above permits page-breaks between lists and |\partmarks|.
% That's because |\@endparenv|, which is called within |\endtrivlist|,
@@ -2340,7 +2933,6 @@ images may not be used in examinations without prior arrangement.
% \begin{macrocode}
\@endparpenalty=\@M
% \end{macrocode}
-
%
% The number of marks is formatted by the command |\FormatPartMarks|, which
% may be overridden, using |\renewcommand| in a |.clo| file.
@@ -2430,7 +3022,7 @@ images may not be used in examinations without prior arrangement.
% \begin{macrocode}
\def\item{\@tempswafalse\ex@mcqitem}
\def\answer{\@tempswatrue\ex@mcqitem}
-% \end{macrocode
+% \end{macrocode}
% Initialise counters, and invoke the common |\do@question| macro.
% \begin{macrocode}
\ex@mcqi=0
@@ -2863,9 +3455,15 @@ images may not be used in examinations without prior arrangement.
% \end{macrocode}
%
% The |\includequestion| command includes a question from another
-% file. For convenience, we disable |\documentclass|, |\usepackage|, and the
+% file. For convenience, we disable
+%|\documentclass|, |\usepackage|, |\RequirePackage|, and the
% \Lenv{document} environment, so that the included file may be a
% complete \LaTeX\ document.
+% We don't try too hard to support including just any old \LaTeX, here:
+% any complicated preamble requirements in an included file should
+% probably be managed by the exams convener transplanting them into
+% the preamble of the main document. This may be an overly
+% simple-minded approach, and may change in future versions.
% \begin{macrocode}
\def\dummy@documentclass{%
\@ifnextchar[\dummy@@documentclass{\dummy@@documentclass[]}}
@@ -2877,7 +3475,7 @@ images may not be used in examinations without prior arrangement.
\begingroup
\let\documentclass\dummy@documentclass
\let\document\@empty % not \relax: makes \begin think {document} is undef'd
- \let\enddocument\relax
+ \let\enddocument\endinput % stop reading, discarding any junk below \end{document}
\def\@tempa{#1}
\ifx\@tempa\@empty \else
\def\@includequestionoverridenumber{#1}
@@ -2885,6 +3483,7 @@ images may not be used in examinations without prior arrangement.
\fi
\def\usepackage##1{\ClassWarning{exam-n}
{Ignoring \string\usepackage{##1} in included question #2}}
+ \let\RequirePackage\usepackage
\input{#2}
\endgroup
}
@@ -2930,6 +3529,15 @@ images may not be used in examinations without prior arrangement.
% Putting a box round the solution would be desirable (it keeps it all
% together and would allow a coloured background), but that's rather
% hard to arrange in practice.
+%
+% Solutions are shown in a slightly smaller size (namely |\small|).
+% It's debatable whether this is a good thing or not. Note that if
+% this is changed by removing the |\small|, then
+% |\examn@dummycaptions| will have to be adjusted, too.
+%
+% If either of the `enlarged font' options has been given, then we set
+% the solutions in the same large font, since these might be
+% distributed to students as model answers.
% \begin{macrocode}
\def\@formatsolution{\par
\if@insolution
@@ -2937,7 +3545,7 @@ images may not be used in examinations without prior arrangement.
\else
\@insolutiontrue % this happens within a group
\fi
- \examn@dummycaptions % dummy captions within solutions
+ \examn@dummycaptions % dummy captions within solutions
\typeout{SHOWING SOLUTIONS}
\let\part\examn@solutionpart
% \end{macrocode}
@@ -2948,9 +3556,7 @@ images may not be used in examinations without prior arrangement.
\parskip 0.5\baselineskip
\raggedright
\color{solutiontext}%\slshape
- \ifbigfont \else
- \small
- \fi
+ \normalsize
\hrule
\hbox to \textwidth{\vrule height 1ex \hfil \vrule height 1ex}
\nobreak
@@ -2984,20 +3590,32 @@ images may not be used in examinations without prior arrangement.
\if@showsolutions
\let\solution\@formatsolution
\let\endsolution\end@formatsolution
+% \end{macrocode}
+% In the case where we're not showing solutions, note that we
+% \emph{do} format the contents, so any |\global| effects will still
+% happen, unless we take action to avoid them.
+%
+% In particular, |\part|, which is normally redefined in solutions to
+% increment \texttt{answerpartnumber} rather than
+% \texttt{partnumber}, would increment \texttt{partnumber} in answers
+% unless we take action to stop it.
+% \begin{macrocode}
\else
- \def\solution{%
+ \def\solution{% make a vbox...
+ \par
\if@insolution
\ClassError{exam-n}{Misplaced solution}{You can't have a solution within a solution}
\fi
\let\endfigure\endfloat@skipsolutions
\let\endtable\endfloat@skipsolutions
- \examn@dummycaptions % dummy captions avoid counter increments
+ \examn@dummycaptions % dummy captions avoid counter increments
+ \let\part\relax % make \part a no-op in discarded {solution}
\@ifundefined{includepdf}{}{\let\includepdf\examn@disabledpdfpages}
- \par
\setbox\@tempboxa\vbox\bgroup
- \@insolutiontrue}
- \def\endsolution{%
- \egroup % ...and do nothing with this box
+ \@insolutiontrue
+ }
+ \def\endsolution{%...and do nothing with this box
+ \egroup
}
\fi
% \end{macrocode}
@@ -3025,9 +3643,14 @@ images may not be used in examinations without prior arrangement.
% re-using the standard LaTeX parameter means that \caption works
\def\@captype{#1}
\setbox\@tempboxa\vbox\bgroup}
+% \end{macrocode}
+% End both |{figure}| and |{table}| environments.
+% End the |\@tempboxa| and add some space and good breaks before displaying it.
+% We're typically in hmode here, but don't depend on it.
+% \begin{macrocode}
\def\examn@endfloat{%
\egroup % end \@tempboxa
- \unskip
+ \ifvmode\else \unskip \fi % bare \unskip would can an error in vmode
\nobreak
% add lots of stretchability, but non-infinite, for the sake of tidiness
\vskip 0pt plus 0.5\textheight
@@ -3055,6 +3678,18 @@ images may not be used in examinations without prior arrangement.
\let\endfigure\examn@endfloat
\let\endtable\examn@endfloat
% \end{macrocode}
+% And disable the \texttt{figure*} and \texttt{table*} environments.
+% \begin{macrocode}
+\expandafter\def\csname figure*\endcsname{%
+ \ClassError{exam-n}
+ {Bad environment figure* -- there is no figure* environment in exam-n}
+ {Use plain {figure} instead. See the documentation for discussion}}
+\expandafter\def\csname table*\endcsname{%
+ \ClassError{exam-n}
+ {Bad environment table* -- there is no table* environment in exam-n}
+ {Use plain {table} instead. See the documentation for discussion}}
+% \end{macrocode}
+%
% Within these 'floats', we must redefine |\caption|, so that we don't
% increment the float counters. One motivation for this is so that we don't have
% table numbers changing depending on whether solutions are included
@@ -3110,25 +3745,83 @@ images may not be used in examinations without prior arrangement.
\WriteLastPageLabel}
% \end{macrocode}
%
+% \iffalse extradefs:start
+% This is a magic comment -- see Makefile.
+% these definitions are referred to, in order to document
+% them, both in this class's documentation, and in the
+% notes-for-authors. \fi
+%
% \subsection{Other formatting niceties}
%
% Format vectors (the default for |\vec| is a symbol with an arrow
% over it):
+%
+% Note: the STIX2+(XeLaTeX/LuaLaTeX) support depends on the LaTeX hook
+% mechanism released in 2020. It therefore does not work on versions of
+% LaTeX older than that. There is a check for this above (see
+% Sect~\ref{s:compatibility}).
% \begin{macrocode}
-\ifcase\examn@mtselect
- % mathptm fonts
- % This is a very clumsy version, but it appears to be our only option
- \def\vec#1{\mathchoice{\mbox{\boldmath $\displaystyle #1$}}
- {\mbox{\boldmath $ #1$}}
- {\mbox{\boldmath $\scriptstyle #1$}}
- {\mbox{\boldmath $\scriptscriptstyle #1$}}}
-\or % mathtime (should this be the same for mathtime as for mtpro2?
+\if@psfonts
+ \ifcase\examn@mtselect
+ % mathptm fonts
+ % This is a very clumsy version, but it appears to be our only option
+ \def\vec#1{\mathchoice{\mbox{\boldmath $\displaystyle #1$}}
+ {\mbox{\boldmath $ #1$}}
+ {\mbox{\boldmath $\scriptstyle #1$}}
+ {\mbox{\boldmath $\scriptscriptstyle #1$}}}
+ \ifexamn@uprightpi
+ \ClassWarning{exam-n}{Can't do uprightpi in [mathptm] -- sorry}
+ \let\italicpi\pi
+ \examn@uprightpifalse
+ \fi
+ \or % mathtime (should this be the same for mathtime as for mtpro2?
+ \let\vec\mathbf
+ \ifexamn@uprightpi
+ \ClassWarning{exam-n}{Can't do uprightpi in [mathtime] -- sorry}
+ \let\italicpi\pi
+ \examn@uprightpifalse
+ \fi
+ \or % mtpro2
+ \let\vec\mathbold
+ % \uppi is predefined in mtpro2
+ \ifexamn@uprightpi
+ \let\italicpi\pi
+ \let\pi\uppi
+ \fi
+ \else
+ % STIX2: the unicode-math package provides a \symbf for bold math symbols,
+ \ifnum\examn@engine<2 % pdflatex
+ \let\vec\mathbf
+ % pdftex (or original tex)
+ % The following should, I think, create an upright pi, but doesn't
+ \def\uppi{\mathrm{\pi}}
+ \let\italicpi\pi %for consistency
+ \let\symup\mathrm %not fully the right thing, but avoid errors below
+ \else % xelatex or lualatex
+ % This is where the dependence on a recent LaTeX enters.
+ \let\vec\symbf
+ \typeout{stix2: upright=\ifexamn@uprightpi true\else false\fi}
+ \AddToHook{begindocument/end}{\gdef\uppi{\symup{𝜋}}}
+ \ifexamn@uprightpi
+ \AddToHook{begindocument/end}{\gdef\italicpi{\symit{𝜋}}\global\let\pi\uppi}
+ \fi
+ \fi
+ \fi
+\else
+ % CM fonts: \mathbf doesn't work with greek in CM
\let\vec\mathbf
-\or % mtpro2
- \let\vec\mathbold
+ \ifexamn@uprightpi
+ % upright greek is hard to do portably, so give up
+ % See eg https://tex.stackexchange.com/questions/145926/ for discussion
+ \ClassWarning{exam-n}{Can't do uprightpi in [cmfonts] -- sorry}
+ \let\italicpi\pi
+ \let\uppi\pi %but avoid errors
+ \examn@uprightpifalse
+ \fi
\fi
% \end{macrocode}
-% Abbreviations for degrees.
+%
+% Abbreviations for various degrees.
% \begin{macrocode}
\newcommand\BSc{B.Sc.{}}
\newcommand\MSci{M.Sci.{}}
@@ -3138,10 +3831,22 @@ images may not be used in examinations without prior arrangement.
\newcommand\BEng{B.Eng.{}}
% \end{macrocode}
%
-% Tweaks to differentials.
+% Formatting differentials, and the base of natural logs,
+% which should be in an upright font.
+% See section~\ref{s:othercommands}, or the `notes for authors',
+% for a description of these macros.
+% The macro |\ddd| is used inside an integral, and includes a leading thinspace
% \begin{macrocode}
-\newcommand{\dd}{\mathrm{d}}
-\newcommand{\ddd}{\,\mathrm{d}} % inside an integral, including thinspace
+\ifnum\examn@mtselect>2
+ % ie, STIX2, and thus using the unicode-math package (see above)
+ \def\e{\symup{e}}
+ \newcommand{\dd}{\symup{d}}
+ \newcommand{\ddd}{\,\symup{d}}
+\else
+ \def\e{\mathrm{e}}
+ \newcommand{\dd}{\mathrm{d}}
+ \newcommand{\ddd}{\,\mathrm{d}}
+\fi
\def\Diffl{\@ifstar\@Difflflat\@Diffl}
\def\Partial{\@ifstar\@Partialflat\@Partial}
@@ -3165,19 +3870,31 @@ images may not be used in examinations without prior arrangement.
\fi}
% \end{macrocode}
%
-% The exponential sign
-% \begin{macrocode}
-\def\e{{\mathrm e}}
-% \end{macrocode}
+% Physical units in upright roman. This macro is now deprecated in
+% favour of use of the \Lopt{siunitx} option (which uses the
+% \Lpackage{siunitx} package, qv), and it will be removed in a
+% minor release after v1.4.
%
-% Physical units in |\rm|. Unstarred version includes leading
-% |\thinspace|. Starred version doesn't, and is used when referring to
+% The unstarred version includes leading
+% |\thinspace|. The starred version doesn't, and is used when referring to
% the unit by itself (eg axis is |$B/\units*T$|), and is not qualifying
% a number.
-% FIXME: |\mu| in |\units| can come out wrong in some fonts (mtpro2?)
-% -- needs investigation.
+% Separate units with either \texttt{.} or |~|, as in |\units{m~s^{-1}}| or
+% |\units{m.s^{-1}}|.
+% Note that although \texttt{.} and |~| are both possible unit separators in
+% general, the former won't work if used within a table (due to the timing of
+% token-reading).
+%
+% This is a rather simple-minded approach to unit formatting. For a much more
+% comprehensive treatment, see the \texttt{siunitx} package,
+% \url{https://ctan.org/pkg/siunitx}, which is now preferred, in place
+% of further use of this macro.
+%
+% Note: there are detailed prescriptions on the formatting of units and symbols in
+% ISO-80000-1:2009, Sect. 7.
% \begin{macrocode}
-\def\units{\begingroup
+\def\units{\examn@unitswarning
+ \begingroup
\catcode`\.=\active
\@ifstar{\let\un@tsspace\relax \un@ts}%
{\let\un@tsspace\thinspace\un@ts}}
@@ -3191,18 +3908,15 @@ images may not be used in examinations without prior arrangement.
\fi
\endgroup}
\endgroup
-% \end{macrocode}
-%
-% Other miscellaneous symbols:
-% The AU is nothing exciting, but may be adjusted in future
-% \begin{macrocode}
-\def\au{au}
-% \end{macrocode}
-% The symbol for Compton wavelength is a crossed lambda -- the following isn't perfect, but is OK for now.
-% \begin{macrocode}
-\def\lambdabar{\setbox\@tempboxa\hbox{$\lambda$}%
- \hbox to 0pt{\hbox to \wd\@tempboxa{\hss$\bar{}$\hss}\hss}\box\@tempboxa}
-% \end{macrocode}
+\newif\ifexamn@warnunits \examn@warnunitstrue
+\def\examn@unitswarning{\ifexamn@warnunits
+ \ClassWarning{exam-n}{The units macro will be removed in the next
+ version; the [siunitx] option is now on by default, so you can use
+ the macros in the siunits package}%
+ \global\examn@warnunitsfalse
+\fi}
+% \end{macrocode}
+% \iffalse extradefs:end % magic comment -- see Makefile \fi
%
% All done.
% \begin{macrocode}
diff --git a/macros/latex/contrib/exam-n/exam-n.html b/macros/latex/contrib/exam-n/exam-n.html
index 717d683aa9..f0b7547897 100644
--- a/macros/latex/contrib/exam-n/exam-n.html
+++ b/macros/latex/contrib/exam-n/exam-n.html
@@ -1,10 +1,242 @@
+<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>exam-n class</title>
-<link href="http://nxg.me.uk" rev="author"/>
-<link type="text/css" rel="stylesheet"
- href="style.css"/>
-<style type='text/css'>
+<link href="https://nxg.me.uk" rev="author"/>
+
+
+<style class="distonly" type="text/css">body {
+ color: #333;
+ background: white;
+ margin-left: +30%;
+ width: 50%; /* body is 50% of screen width */
+ margin-right: auto; /* ie, 20% */
+ padding: 0.5em; /* this will make a difference if I decide to
+ have the background a different colour */
+ /* I can't decide on font: Optima's always nice, but Gill looks
+ agreeably intense. Helvetica's a decent fallback. */
+ font-family: "Helvetica Neue", Helvetica, "Gill Sans", gill, sans-serif;
+ /* font-family: Optima, "Gill Sans", gill, Helvetica, sans-serif; */
+ /* font-family: "Gill Sans", gill, Helvetica, sans-serif; */
+ /* I seem to have used 11pt at some point in the past, but this
+ is far too big -- did I ever have a reason for that, or is it
+ just due to browser changes? */
+ font-size: 10pt;
+ line-height: 150%;
+}
+
+div.topsidebar {
+ float: right;
+ width: 50%; /* ...of the body width (ie, 50% x 50% of screen) */
+ font-size: smaller;
+ margin-left: 1em;
+ padding-left: 1em;
+ border-left: solid thin #AAA;
+}
+
+/* On wider screens, move the sidebar out to the right hand side */
+/* This uses CSS3 media queries: http://www.w3.org/TR/css3-mediaqueries/ */
+@media screen and (min-width: 700pt) and (max-width: 850pt) {
+ body {
+ margin-left: 210pt;
+ width: 350pt; /* 50% of 700pt */
+ margin-right: auto;
+ }
+ div.topsidebar {
+ position: absolute;
+ /* I feel this size should be 595pt (350 + 210 + 0.05*700),
+ but that's clearly not right -- I don't think I understand what the -5%
+ in the h1 spec below is actually 5% of! */
+ left: 570pt;
+ width: auto;
+ margin-left: 0pt;
+ padding-left: 0pt;
+ border: none;
+ }
+}
+/* On still-wider screens, expand the left-margin, keeping the sidebar attached to the right-hand edge.
+ When the screen is 850pt wide (expanding from the @media case above),
+ the left margin will be 210pt, the width 350pt, and the right margin therefore 290pt.*/
+@media screen and (min-width: 850pt) {
+ body {
+ margin-right: 290pt; /* 290 = 850-(210+350) */
+ width: 350pt;
+ margin-left: auto; /* ...takes up the slack */
+ }
+ div.topsidebar {
+ position: absolute;
+ width: 290pt; /* same 290pt as above */
+ left: auto;
+ right: 0%;
+ padding-left: 0pt;
+ border: none;
+ }
+}
+
+
+code, pre {
+ font-family: Monaco, fixed;
+ font-size: 9pt;
+}
+
+a { text-decoration: none; }
+a:link { color: #66C; }
+a:visited { color: #669; }
+a[href]:hover { background: #EEE; }
+
+div.abstract {
+ font-style: oblique;
+ text-align: left;
+}
+div.abstract em { font-style: normal; }
+div.abstract code {
+ font-style: normal;
+ font-size: 80%;
+}
+
+/* a span/div style for attracting attention */
+.attention {
+ color: #822;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #822;
+ font-weight: 100; /* few fonts have ultra-light weights */
+ line-height: 100%; /* no need to spread out titles */
+}
+h1 {
+ margin-left: -40%;
+ margin-right: -5%;
+ padding: 0.5em;
+ border: solid thin #666;
+ text-align: right;
+}
+h2 {
+ margin-left: -40%;
+ margin-right: -5%;
+ padding: 0.2em;
+ border-top: solid thin #666;
+ clear: both;
+}
+
+h2.appendices {
+ margin-top: 10ex;
+ border-top: double medium #666;
+}
+h3 {
+ margin-left: -30%;
+ float: left;
+ width: 25%;
+ display: block;
+ text-align: right;
+ vertical-align: bottom;
+ padding-top: 0pt;
+ padding-right: 0.5em;
+ margin-top: 0pt;
+ line-height: 100%;
+}
+
+/*
+h4 {
+ color: #C66;
+}
+*/
+
+pre, table { background: #dde; }
+
+pre {
+ padding: 1em;
+ line-height: 130%;
+}
+
+table {
+ font-size: smaller;
+}
+td {
+ padding: 0.5ex;
+}
+
+Q:before { content: "“"; }
+Q:after { content: "”"; }
+
+img.smallimage {
+ float: right;
+ margin: 24pt;
+ margin-right: -30%;
+}
+
+div.signature {
+ margin-left: -40%;
+ margin-right: -5%;
+ margin-top: 4ex;
+ text-align: right;
+ border: solid thin #666;
+ padding: 0.3em;
+ clear: both;
+}
+
+/* ============================================================
+ * Some other curiosities of my one-time formatting for web pages
+ */
+.doc-history {
+ font-size: xx-small;
+ background: #eee;
+ line-height: 100%;
+}
+
+div.subtoc, div.subsubtoc { display: none; }
+
+/* ============================================================
+ * Special formatting for ToC
+ */
+
+/*
+ If there's significant amount of text in front of the first subsection,
+ then the following are good to put in the per-document stylesheet:
+ width: 25%;
+ float: right;
+*/
+div#toc {
+ color: #888;
+ padding: 0;
+ font-size: smaller;
+ text-align: right;
+}
+div#toc a:link { color: #888; }
+div#toc &gt; ul {
+ padding: 0pt;
+ margin: 0pt;
+ list-style: none;
+}
+div#toc li {
+ padding: 0pt;
+ display: inline-block;
+}
+div#toc li:before {
+ content: "§ ";
+ margin-left: 1em;
+}
+/* the following elements aren't currently generated by structure.lx */
+div#toc li ul {
+ padding-left: 1em;
+ margin-left: 0;
+ font-style: italic;
+ display: inline;
+}
+div#toc li ul:before {
+ content: "( ";
+}
+div#toc li ul:after {
+ content: " ) ";
+}
+div#toc li li {
+ padding-left: 0pt;
+}
+div#toc li li:after {
+ content: "; ";
+}
+</style>
+<style type="text/css">
dd ul { padding: 0pt; margin: 0pt; }
</style>
</head>
@@ -14,26 +246,24 @@ dd ul { padding: 0pt; margin: 0pt; }
<p>Format exam papers</p>
-<p>Version 1.1.4, 2016 December 19.</p>
+<p class="distonly">This is version exam-n-1.4.0, 2022 October 10.</p>
+
+
<ul>
-<li>Download: <a href='exam-n-1.1.4.tar.gz'>tarball</a>
-or <a href='exam-n-1.1.4.zip'>zip file</a></li>
-<li>You may want to look at a <a href='sample_exam.pdf'>sample
-exam</a>. See the <code>sample/</code> directory in the distribution
-for the source of this. That demonstrates the final version of the
-paper, as opposed to the ‘draft’ and ‘compose’ versions; there’s also
-a version with this layout but
-<a href='sample_exam_solution.pdf'>showing the solutions</a>.</li>
+
+<li class="distonly">See the sample exam in the distribution.</li>
<li>If you're a question author, you probably don't want to read the
full documentation. Stick to the shorter
-<a href='notes-for-authors.pdf'>notes for authors</a>.</li>
-<li>See the <a href='exam-n.pdf' >documentation</a> for fuller
+<a href="notes-for-authors.pdf">notes for authors</a>.</li>
+<li>See the <a href="exam-n.pdf">documentation</a> for fuller
discussion.</li>
<li>The package's 'home page' is
-<a href='http://purl.org/nxg/dist/exam-n'><code>http://purl.org/nxg/dist/exam-n</code></a>,
-and the repository is available at
-<a href='https://bitbucket.org/nxg/exam-n'>bitbucket</a>.</li>
+<a href="https://purl.org/nxg/dist/exam-n"><code>https://purl.org/nxg/dist/exam-n</code></a>,
+and the repository is available to
+<a href="https://heptapod.host/nxg/exam-n">browse</a>
+or clone.</li>
+<li>And it's on CTAN at <a href="https://www.ctan.org/pkg/exam-n">/pkg/exam-n</a>.</li>
</ul>
<h2>Overview</h2>
@@ -41,13 +271,13 @@ and the repository is available at
<h3>Other exam styles</h3>
<p>There are already multiple ‘exam’ LaTeX styles on CTAN,
including
-the (original?) <a href='http://dante.ctan.org/tex-archive/macros/latex/contrib/exam/'>exam class</a>,
-the extensive <a href='http://www.math.uakron.edu/~dpstory/webeq.html' >AcroTeX</a> bundle,
+the (original?) <a href="http://dante.ctan.org/tex-archive/macros/latex/contrib/exam/">exam class</a>,
+the extensive <a href="http://www.math.uakron.edu/~dpstory/webeq.html">AcroTeX</a> bundle,
the
-<a href='http://dante.ctan.org/tex-archive/macros/latex/contrib/examdesign/'>examdesign</a> and
-<a href='http://dante.ctan.org/tex-archive/macros/latex/contrib/exams/'>exams</a>
+<a href="http://dante.ctan.org/tex-archive/macros/latex/contrib/examdesign/">examdesign</a> and
+<a href="http://dante.ctan.org/tex-archive/macros/latex/contrib/exams/">exams</a>
classes, and
-<a href='http://www.tex.ac.uk/cgi-bin/CTANcataloguesearch.pl?CATSTRING=exam'>a variety of other packages</a>
+<a href="http://www.tex.ac.uk/cgi-bin/CTANcataloguesearch.pl?CATSTRING=exam">a variety of other packages</a>
which mention exams in some way.
Some of these are more focused on generating quizzes
(even doing things like randomising answers)
@@ -82,6 +312,45 @@ checks to avoid mistakes. The result has, in effect, been validated
by practice.</p>
+<h2>To install</h2>
+<p>Unpack the distribution tarball or zip
+file, and move the directory <code>move-to-texmf</code> (or its
+contents) to some
+location on the LaTeX search path. You're probably looking for a
+directory called <code>texmf-local</code>, or something like that.</p>
+
+<p>‘Move…to a suitable place’ is admittedly very vague. Here are some
+pointers, however:</p>
+<ul>
+<li>This can be the same location as your exam source files. This
+will work, but you'll have to do this for each directory.</li>
+<li>See the good generic advice in
+<a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=inst-wlcf">the
+TeX FAQ</a>.</li>
+<li>Your LaTeX environment might have some hints on ‘installing new
+style files’, or you can search online with some search string like
+that.</li>
+<li>If you're on a unix-like OS, then the command <code>kpsewhich
+guexam.cls</code> will show you which class file LaTeX will use (so if
+it produces no result, that's telling you that LaTeX won't find the
+files); also <code>kpsepath tex</code> will display, in an admittedly
+very oblique form, the list of places where TeX will search.</li>
+<li>If you're using MikTeX, then the documentation on the
+‘<a href="https://miktex.org/howto/miktex-console">MikTeX console</a>’
+includes a section on ‘Registering a user-managed TEXMF root
+directory’. This rather obliquely says that you can ‘register a
+user-managed TEXMF root directory’. What that means is that (i)
+you should go to a folder such as
+<code>...\Users\<em>yourname</em>\AppData\MikTeX</code>, (ii) create a
+sequence of folders so that you end up with
+<code>...\MikTeX\texmf\tex\latex\exam-n</code>, and (iii) put the
+distributed <code>.sty</code> and <code>.clo</code> files in the
+latter folder. The directory <code>...\MikTex\texmf</code> is your
+‘user-managed TEXMF root directory’, and you should add it to MikTeX's
+search path using the instructions above.</li>
+</ul>
+
+
<h2>Releases</h2>
<p>With the version 1.1 release, the interface should now be regarded
@@ -99,65 +368,113 @@ renamed to avoid a conflict with a pre-existing LaTeX class with the
same name; and in the second it was renamed to make it more
generically useful to other institutions.</p>
-<dl>
-
-<!-- @RELEASENOTES@ -->
-<dt><span class='attention'>1.1.4, 2016 December 19</span></dt>
-<dd><ul>
-<li>Documentation: add notes about use of pdfpages.</li>
-<li>Added <code>[largefont]</code> option.
-<strong>Note</strong>:
-option <code>[hugefont]</code> has replaced <code>[bigfont]</code>;
-the latter is now deprecated, and may be removed in v1.2.</li>
-<li>Use of the <code>\part</code> macro is now supported within
-solutions (it produced the wrong numbers before), and there is a new
-<code>\StylePartNumber</code> customisation macro.</li>
-</ul></dd>
-
-<dt>1.1.3</dt>
-<dd><ul>
-<li>Version 1.1.3 was never released</li>
-</ul></dd>
-
-<dt>1.1.2, 2015 November 26</dt>
-<dd><ul>
-<li>Handled trailing floats at end of document (generated by packages
-such as <code>rotating</code>.</li>
-<li><code>\label</code> within question environment now refers to the
-question number.</li>
-<li>Work around a problem when a paragraph starts with <code>{\bf ...}</code>
-rather than (post-1995) <code>\textbf{...}</code>.</li>
-<li><code>\begin{questiondata}</code> now starts a new paragraph.</li>
-<li>Some documentation adjustments.</li>
-</ul></dd>
-
-<dt>1.1.1, 2014 November 27</dt>
-<dd><ul>
-<li>Adjust <code>\partmarks*</code> behaviour; now behaves differently
-within display maths (addresses
-<a href='https://bitbucket.org/nxg/exam-n/issue/1/'>issue 1</a>).</li>
-<li>Various documentation and release fixes.</li>
-</ul></dd>
-
-<dt>1.1, 2014 May 3</dt>
-<dd>Converted to a generic class, <code>exam-n</code>, ready for wider
-distribution.
-Available on <a href='https://bitbucket.org/nxg/exam-n/'>bitbucket</a>
-and at CTAN.</dd>
-
-
-<dt>...</dt>
-<dd><a href='release-notes.html'>Earlier release notes</a> are available</dd>
-
-</dl>
+<h:dl xmlns:h="http://www.w3.org/1999/xhtml">
+<h:dt><h:span class="attention">1.4.0, 2022 October 10</h:span></h:dt><h:dd>
+ <ul>
+ <li>The [siunitx] option is now on by default, and the
+ <code>\units</code> macro produces a one-time-per-document
+ warning that it will be removed in the next version.</li>
+ <li>Having two <code>\partmarks</code> commands in an
+ environment is now detected as an error (it was documented as an
+ error, but not checked, so the extra <code>\partmarks</code>
+ commands were simply ignored).</li>
+ </ul>
+ </h:dd>
+
+<h:dt>1.4.0-b1, 2022 August 7</h:dt><h:dd>
+ <ul>
+ <li>The class file now depends on a version of LaTeX which is at least
+ the 2020/10/01 release. This is so that we can use the current LaTeX
+ hooks mechanism.</li>
+ <li>Rework <code>\partmarks</code>: the <code>\partmarks</code>
+ indicator can now go <em>inside</em> most environments, including
+ list, quotes, unnumbered equations, and the various amsmath displays. In these
+ cases, the indicator will automatically appear at the end of the
+ environment. The starred variant of the command still exists, but
+ should rarely be necessary.</li>
+ </ul>
+ </h:dd>
+
+<h:dt>1.3.5-b1, 2022 July 11</h:dt><h:dd><ul>
+<li>Fix erroneous broken line before <code>\partmarks</code>, in
+compose mode, when a paragraph fills the last line.</li>
+<li>Fix support for STIX2 fonts in XeLaTeX and LuaLaTeX (it was
+working inaccurately before).</li>
+<li>Add an optional argument for <code>\part</code> to override part numbering.</li>
+<li>Use the <code>xcolor</code> package for colour management, instead
+of the core <code>color</code> package (the <code>xcolor</code>
+package is well-known and stable, and this means that we are
+compatible with TikZ).</li>
+<li><code>\partmarks</code> in solutions no longer gobble trailing space
+(doing so is probably right in questions, and is still the case, but
+<code>\partmarks</code> in solutions tend to be more interspersed with
+text).</li>
+<li><code>\label</code> within a <code>\part</code> now refers to the
+part number (as opposed to the question number).</li>
+<li>Avoid a ‘You can't use `\unskip' in vertical mode’ error,
+in certain circumstances.</li>
+<li>Add the <code>[siunitx]</code> option, indicating that we should
+load the <a href="https://www.ctan.org/pkg/siunitx">siunitx</a> package (default no).
+This is now preferred to the <code>\units</code> macro, and the latter will be
+removed in a forthcoming release.</li>
+<li>Renamed <code>A1.clo</code> to clearer <code>myclass.clo</code></li>
+<li>Repository moved from bitbucket to
+<a href="https://heptapod.host/nxg/exam-n">https://heptapod.host/nxg/exam-n</a>,
+when bitbucket dropped support for Mercurial.
+This means, incidentally, that links to specific issues at bitbucket
+are now broken.</li>
+<li>Bold-italic maths should now work correctly with STIX.</li>
+<li>Long <code>\partmarks</code> comments now appear as footnotes.</li>
+<li>Solutions are now set <code>\normalsize</code>.</li>
+<li>Bugfix: move definition of <code>\defaultpartmarkscategory</code>
+so it can be invoked within a <code>.clo</code> file straightforwardly.</li>
+<li>Define the <code>[uprightpi]</code> option to set <code>\pi</code>
+as an upright character, as appropriate for a constant (this is
+implemented fully only for the <code>[mtpro2]</code> and
+<code>[stix2]</code> options)..</li>
+<li>Note that the <code>\units</code> macro is likely to be deprecated
+in a forthcoming version, and replaced by a recommendation to use the
+standard <code>[siunitx]</code> package.</li>
+</ul></h:dd>
+
+<h:dt>1.3, 2018 November 21</h:dt><h:dd><ul>
+<li>Add a ‘category’ optional argument to <code>\partmarks</code>, and
+add <code>\defaultpartmarkscategory</code>.</li>
+</ul>
+</h:dd>
+
+<h:dt>1.2.1, 2018 July 2</h:dt><h:dd><ul>
+<li>Bugfix: ignore any content which appears after
+<code>\end{document}</code>, in <code>\includequestion</code> (author)
+files (fixes issue 6).</li>
+<li>The environments <code>{figure*}</code> and <code>{table*}</code> now produce an error.</li>
+<li>The macro <code>\vec</code> now produces correct greek bold maths.</li>
+<li>Docmentation: notes on unit formatting.</li>
+</ul>
+</h:dd>
+
+<h:dt>1.2, 2017 December 1</h:dt><h:dd><ul>
+<li>Use serif STIX2 fonts for sans and monospace cases, when using
+Lua- or XeLaTeX (the style doesn't use/encourage any sans-serif text,
+so this shouldn't matter).</li>
+<li>Fix font sizes in solutions.</li>
+<li>Adjustments to font-handling, which appear to have fixed LuaLaTeX differences.</li>
+<li>Add the <code>stix2</code> option, to use the
+<a href="http://www.stixfonts.org/">STIX2 font set</a>.</li>
+<li>Make it possible to use <code>\rubric</code> and <code>\baserubric</code> within a <code>.clo</code> file.
+This was advertised as being possible, but it seems it had never been tested!</li>
+</ul></h:dd>
+</h:dl>
+
+
+
+<p class="distonly"><a href="release-notes-dist.html">Earlier release notes</a> are available</p>
<div class="signature">
-<a href='http://nxg.me.uk'>Norman Gray</a><br/>
-2016 December 19
+<a href="https://nxg.me.uk">Norman Gray</a><br/>
+2022 October 10
</div>
</body>
</html>
-
-
diff --git a/macros/latex/contrib/exam-n/exam-n.pdf b/macros/latex/contrib/exam-n/exam-n.pdf
index 66e4392de8..1505f61f4b 100644
--- a/macros/latex/contrib/exam-n/exam-n.pdf
+++ b/macros/latex/contrib/exam-n/exam-n.pdf
Binary files differ
diff --git a/macros/latex/contrib/exam-n/examndefs.sty b/macros/latex/contrib/exam-n/examndefs.sty
new file mode 100644
index 0000000000..5ad56f1e26
--- /dev/null
+++ b/macros/latex/contrib/exam-n/examndefs.sty
@@ -0,0 +1,121 @@
+% Generated file : DO NOT EDIT
+\@ifundefined{@psfontsfalse}{\newif\if@psfonts \@psfontsfalse}{}
+\@ifundefined{examn@uprightpifalse}{\newif\ifexamn@uprightpi \examn@uprightpifalse}{}
+\@ifundefined{examn@mtselect}{\newcount\examn@mtselect \examn@mtselect=0}{}
+\if@psfonts
+ \ifcase\examn@mtselect
+ % mathptm fonts
+ % This is a very clumsy version, but it appears to be our only option
+ \def\vec#1{\mathchoice{\mbox{\boldmath $\displaystyle #1$}}
+ {\mbox{\boldmath $ #1$}}
+ {\mbox{\boldmath $\scriptstyle #1$}}
+ {\mbox{\boldmath $\scriptscriptstyle #1$}}}
+ \ifexamn@uprightpi
+ \ClassWarning{exam-n}{Can't do uprightpi in [mathptm] -- sorry}
+ \let\italicpi\pi
+ \examn@uprightpifalse
+ \fi
+ \or % mathtime (should this be the same for mathtime as for mtpro2?
+ \let\vec\mathbf
+ \ifexamn@uprightpi
+ \ClassWarning{exam-n}{Can't do uprightpi in [mathtime] -- sorry}
+ \let\italicpi\pi
+ \examn@uprightpifalse
+ \fi
+ \or % mtpro2
+ \let\vec\mathbold
+ % \uppi is predefined in mtpro2
+ \ifexamn@uprightpi
+ \let\italicpi\pi
+ \let\pi\uppi
+ \fi
+ \else
+ % STIX2: the unicode-math package provides a \symbf for bold math symbols,
+ \ifnum\examn@engine<2 % pdflatex
+ \let\vec\mathbf
+ % pdftex (or original tex)
+ % The following should, I think, create an upright pi, but doesn't
+ \def\uppi{\mathrm{\pi}}
+ \let\italicpi\pi %for consistency
+ \let\symup\mathrm %not fully the right thing, but avoid errors below
+ \else % xelatex or lualatex
+ % This is where the dependence on a recent LaTeX enters.
+ \let\vec\symbf
+ \typeout{stix2: upright=\ifexamn@uprightpi true\else false\fi}
+ \AddToHook{begindocument/end}{\gdef\uppi{\symup{𝜋}}}
+ \ifexamn@uprightpi
+ \AddToHook{begindocument/end}{\gdef\italicpi{\symit{𝜋}}\global\let\pi\uppi}
+ \fi
+ \fi
+ \fi
+\else
+ % CM fonts: \mathbf doesn't work with greek in CM
+ \let\vec\mathbf
+ \ifexamn@uprightpi
+ % upright greek is hard to do portably, so give up
+ % See eg https://tex.stackexchange.com/questions/145926/ for discussion
+ \ClassWarning{exam-n}{Can't do uprightpi in [cmfonts] -- sorry}
+ \let\italicpi\pi
+ \let\uppi\pi %but avoid errors
+ \examn@uprightpifalse
+ \fi
+\fi
+\newcommand\BSc{B.Sc.{}}
+\newcommand\MSci{M.Sci.{}}
+\newcommand\MSc{M.Sc.{}}
+\newcommand\MA{M.A.{}}
+\newcommand\MEng{M.Eng.{}}
+\newcommand\BEng{B.Eng.{}}
+\ifnum\examn@mtselect>2
+ % ie, STIX2, and thus using the unicode-math package (see above)
+ \def\e{\symup{e}}
+ \newcommand{\dd}{\symup{d}}
+ \newcommand{\ddd}{\,\symup{d}}
+\else
+ \def\e{\mathrm{e}}
+ \newcommand{\dd}{\mathrm{d}}
+ \newcommand{\ddd}{\,\mathrm{d}}
+\fi
+
+\def\Diffl{\@ifstar\@Difflflat\@Diffl}
+\def\Partial{\@ifstar\@Partialflat\@Partial}
+\def\@Partial{\@ifnextchar[{\@@Diffl\partial}{\@@Diffl\partial[]}}
+\def\@Partialflat{\@ifnextchar[{\@@Difflflat\partial}{\@@Difflflat\partial[]}}
+\def\@Diffl{\@ifnextchar[{\@@Diffl\dd}{\@@Diffl\dd[]}}
+\def\@Difflflat{\@ifnextchar[{\@@Difflflat\dd}{\@@Difflflat\dd[]}}
+\def\@@Diffl#1[#2]#3#4{%
+ \def\@tempa{#2}%
+ \ifx\@tempa\empty
+ \frac{#1#3}{#1#4}%
+ \else
+ \frac{{#1}^{#2}#3}{#1{#4}^{#2}}%
+ \fi}
+\def\@@Difflflat#1[#2]#3#4{%
+ \def\@tempa{#2}%
+ \ifx\@tempa\empty
+ #1#3\mskip-0.8mu/\mskip-1.2mu #1#4%
+ \else
+ {#1}^{#2}#3\mskip-0.8mu /\mskip-1.2mu #1{#4}^{#2}%
+ \fi}
+\def\units{\examn@unitswarning
+ \begingroup
+ \catcode`\.=\active
+ \@ifstar{\let\un@tsspace\relax \un@ts}%
+ {\let\un@tsspace\thinspace\un@ts}}
+\begingroup
+ \catcode`\.=\active
+ \gdef\un@ts#1{\let~\thinspace\let.\thinspace
+ \ifmmode
+ \un@tsspace\mathrm{#1}%
+ \else
+ \nobreak$\un@tsspace\mathrm{#1}$%
+ \fi
+ \endgroup}
+\endgroup
+\newif\ifexamn@warnunits \examn@warnunitstrue
+\def\examn@unitswarning{\ifexamn@warnunits
+ \ClassWarning{exam-n}{The units macro will be removed in the next
+ version; the [siunitx] option is now on by default, so you can use
+ the macros in the siunits package}%
+ \global\examn@warnunitsfalse
+\fi}
diff --git a/macros/latex/contrib/exam-n/myclass.clo b/macros/latex/contrib/exam-n/myclass.clo
new file mode 100644
index 0000000000..9fd69120cc
--- /dev/null
+++ b/macros/latex/contrib/exam-n/myclass.clo
@@ -0,0 +1,42 @@
+\ProvidesFile{myclass.clo}[2022/10/10 exam-n-1.4.0]
+\typeout{myclass exam options, exam-n-1.4.0}
+%%%% Source: a91e9cff7cac, 2022-10-10T13:33:17+01:00
+%%%% File: myclass.clo
+%%%% Copyright 2005--2022, Norman Gray
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Norman Gray <https://nxg.me.uk>
+%%
+%% This work consists of the files exam-n.dtx and exam-n.ins,
+%% the derived file exam-n.cls,
+%% and the associated *.clo files.
+
+
+% It's possible to change the rubric and base rubric here.
+%\rubric{Answer questions.}
+%
+%\baserubric{\emph{Do not attempt to write on both sides of the paper at once.}
+%
+%You may sing, if you feel you must.}
+
+% Nothing here beyond the constants sheet
+\constantssheet{
+\begin{center}
+{\Large\textbf{Values of astrophysical constants}}\\[\bigskipamount]
+\begin{tabular}{lll} \hline\\[-1.5ex] % slightly hacky extra space after hline
+ speed of light & $c$ & $2.998\times 10^8 \,{\rm ms^{-1}}$\\
+ gravitational constant & $G$ & $6.673\times10^{-11}\,{\rm Nm^2kg^{-2}}$\\
+ \vdots \\
+\hline
+\end{tabular}
+\end{center}
+}
diff --git a/macros/latex/contrib/exam-n/notes-for-authors.pdf b/macros/latex/contrib/exam-n/notes-for-authors.pdf
index ca51908af3..8cbe643d87 100644
--- a/macros/latex/contrib/exam-n/notes-for-authors.pdf
+++ b/macros/latex/contrib/exam-n/notes-for-authors.pdf
Binary files differ
diff --git a/macros/latex/contrib/exam-n/notes-for-authors.tex b/macros/latex/contrib/exam-n/notes-for-authors.tex
index de9e3a8ba7..d2798c9ed0 100644
--- a/macros/latex/contrib/exam-n/notes-for-authors.tex
+++ b/macros/latex/contrib/exam-n/notes-for-authors.tex
@@ -6,33 +6,46 @@
\title{Notes for exam question authors}
\author{Norman Gray}
-\date{exam-n 1.1.4, 2016 December 19}
+\date{Version exam-n-1.4.0, 2022 October 10}
\parindent=0pt
\parskip=\medskipamount
\makeatletter
-\def\csarg#1{\texttt\{\textit{#1}\texttt\}%
+\def\cs@arg#1{\texttt\{\textit{#1}\texttt\}%
\advance\@tempcnta-1
\ifnum\@tempcnta>0
- \let\next\csarg
+ \let\next\cs@arg
\else
\let\next\endgroup % begun in \cs
\fi
\next}
+{\catcode`\|=0 \catcode`\\=12
+|gdef|cs@textbackslash#1{|texttt{\#1}}}
+% \cs{foo} typeset \foo
+% \cs[2]{foo}{bar}{baz} typeset \foo{bar}{baz}
\newcommand\cs[2][0]{\begingroup
\color{cscolour}%
- $\backslash$\texttt{#2}%
+ \cs@textbackslash{#2}%
\@tempcnta=#1
\ifnum\@tempcnta>0
- \let\next\csarg
+ \let\next\cs@arg
\else
\let\next\endgroup
\fi
\next}
-\def\env#1{\texttt{\textcolor{cscolour}{#1}}}
+\let\origvec\vec
+% We'd like to say here
+% \newif\ifexamn@uprightpi \examn@uprightpitrue
+% but that's not supported for CM fonts
+\usepackage{examndefs}
+
+\makeatother
+
+\def\env#1{\texttt{\textcolor{cscolour}{\{#1\}}}}
\def\opt#1{\texttt{[#1]}}
+\def\package#1{\textsf{#1}}
\setcounter{secnumdepth}0
@@ -61,7 +74,7 @@ together. It follows from that that you should be hesitant about putting anythi
the preamble other than \cs{usepackage} commands, and you should
consult with the exams convener to ensure that such packages go into
the master file, too. It's probably a safe bet that the `graphicx'
-package will be included in the master file. If you want to include
+package will be included in the master file. If you want to include
a \cs{newcommand}, or anything like that,
it can be placed inside the \env{question} environment. For
other customisations, negotiate with the exams convener.
@@ -76,16 +89,54 @@ not displayed in the final version (obviously), but which do appear in
draft modes. You'll most typically have a \cs{partmarks} macro and a
\env{solution} environment for each \cs{part}, but they don't have to
match up, and you can have the entire solution at the end if you prefer.
-The \cs[1]{partmarks*}n command is almost the same, but places the
-mark indicator in a slightly different position which looks better
-when there would otherwise be a gap at the right of the page. It can
-be placed after a list, or inside but at the end of an equation.
+
+The \cs{partmarks} command will most typically go at the end of a
+paragraph, but it may also appear inside an equation (that is, in
+\verb|\[...\]|; don't use \verb|$$...$$|), inside one or other
+\package{amsmath} display environments, or in a list or other
+environment. If it appears inside an environment, the indicator will
+appear at the \emph{end} of the environment, independent of where in
+the environment the command was typed (which implies that you can't
+have more than one inside an environment).
+
+The starred version is similar, but budges its indicator upwards
+a little, and is a heuristic alternative which is useful in some
+cases \emph{after} a list or display, or after a numbered equation, if the placement of the
+indicator is otherwise inaesthetic
+(if the style of the part-marks indicators happens to be such
+that the indicator may be mistaken for an equation number, then
+it would be wise to use either \cs{partmarks} or \cs{partmarks*}
+after the equation, instead). If you use \cs{partmarks*} within a
+display, you might be confronted by an error message, talking
+about \cs{eqno} in maths mode, which is even more incomprehensible
+than most \LaTeX\ messages.
+
Note that \cs{partmarks} ends a paragraph (\cs{partmarks*} doesn't): this is
probably good style, but if you insist on mid-paragraph marks, then a following
\verb|\noindent| will be useful. It's helpful to use \cs{partmarks} inside a
\env{solution} to indicate the distribution of marks -- this doesn't mess up
the mark-totalling calculation.
+You may optionally give a question number as an argument to the
+\env{question} environment: \cs[1]{begin\{question\}[n]}{markgoal}.
+In \opt{compose} mode, this simply sets the question number, but in the other
+modes, when the question file is included in a master file, this
+checks that the given number~$n$ is what would be assigned
+automatically, to help detect missing or out-of-order questions. If
+the question identifier is not a number, such as `D1', then you can
+provide that identifier here also, but in this case you must also set
+\cs{QuestionNumberChecksOff} in the question preamble.
+
+The \cs{partmarks} command has an optional argument which
+indicates the category of the question, thus `bookwork', `unseen',
+and so on. If this is present -- for example
+\cs[1]{partmarks[bookwork]}{5} -- then the category is included in the
+marks indicator.
+As you might hope, the \cs{partmarks*} command can take this
+optional argument also: \cs[1]{partmarks*[bookwork]}{5}.
+This extra text will typically be only one or two words long, but if
+the text is much longer than that, it will be turned into a footnote.
+
One common exam or test question type is a multiple-choice question.
This is indicated by a \cs{begin\{mcq\}} environment, which contains a
textual question followed by a sequence of possible answers indicated by
@@ -115,15 +166,17 @@ The \cs[1]{caption}{text} command works as usual; the figure and table
numbering sequences continue through the solutions, if they're shown,
but this isn't expected to be a problem.
-If you use \cs{label} within a \env{question} environment, that label
-will, as you might expect, refer to the question number.
+There is neither a \env{figure*} nor a \env{table*} environment,
+because this is a single-column class.
+Use the no-option unstarred versions instead.
+
+\subsection{Hints}
-Hints:
Figures can be included with \cs{includegraphics} as usual, as long as
-the `graphicx' package has been included at the top of the master
+the \package{graphicx} package has been included at the top of the master
file. If you want to include complete pages from a PDF (most
typically containing a scanned handwritten model answer), then you can
-do so by including the `pdfpages' package at the top of the file, and
+do so by including the \package{pdfpages} package at the top of the file, and
then \cs[1]{includepdf[pages=\{-\}]}{filename} inside a \env{solution}
environment.
The \texttt{pages=\{-\}} option means that all pages from the file are
@@ -131,7 +184,10 @@ inserted; you may wish to use \texttt{scale=0.8} to shrink the PDF;
the option \verb|pagecommand={\thispagestyle{fancy}}| will cause the other
class apparatus, such as page numbers and headers, to be
superimposed on the included pages.
-See the documentation of the `pdfpages' package for more information.
+See the documentation of the \package{pdfpages} package for more information.
+
+If you use \cs{label} within a \env{question} environment, that label
+will, as you might expect, refer to the question number.
Include marginal notes with \cs[1]{comment}{remark} -- these show up in drafting
modes (\opt{draft} and \opt{compose}), but not in the final version.
@@ -139,99 +195,27 @@ The \cs[1]{author}{name} command is just
a type of comment. If you need to make more noise, then
\cs[1]{shout}{remark} inserts a highlighted \emph{remark} in the flow of text
(so it can be used anywhere) and includes the remark in a prominent
-list of exclamations at the end of the document.
+list of exclamations at the end of the document. Note that \cs{shout}
+text \emph{appears in the \opt{final} version}: it is to draw
+attention to problems (for example \cs[1]{shout}{solution wrong!})
+which must be resolved before the exam is presented to students.
At the bottom of each page, you see a faint identification code, such
as `QM/123-456'. This consists of an exam identifier, extracted from
the exam preamble, plus a code which changes each time \LaTeX\ is
-run. This helps you avoid collation accidents, and to distinguish
+run, but which is otherwise meaningless.
+This helps you avoid collation accidents, and to distinguish
between slightly different versions of the printed document.
\subsection{Various convenience commands}
\label{s:othercommands}
-\makeatletter
-% Definitions edited in at build time...
-% Abbreviations for degrees.
-% \begin{macrocode}
-\newcommand\BSc{B.Sc.{}}
-\newcommand\MSci{M.Sci.{}}
-\newcommand\MSc{M.Sc.{}}
-\newcommand\MA{M.A.{}}
-\newcommand\MEng{M.Eng.{}}
-\newcommand\BEng{B.Eng.{}}
-% \end{macrocode}
-%
-% Tweaks to differentials.
-% \begin{macrocode}
-\newcommand{\dd}{\mathrm{d}}
-\newcommand{\ddd}{\,\mathrm{d}} % inside an integral, including thinspace
-
-\def\Diffl{\@ifstar\@Difflflat\@Diffl}
-\def\Partial{\@ifstar\@Partialflat\@Partial}
-\def\@Partial{\@ifnextchar[{\@@Diffl\partial}{\@@Diffl\partial[]}}
-\def\@Partialflat{\@ifnextchar[{\@@Difflflat\partial}{\@@Difflflat\partial[]}}
-\def\@Diffl{\@ifnextchar[{\@@Diffl\dd}{\@@Diffl\dd[]}}
-\def\@Difflflat{\@ifnextchar[{\@@Difflflat\dd}{\@@Difflflat\dd[]}}
-\def\@@Diffl#1[#2]#3#4{%
- \def\@tempa{#2}%
- \ifx\@tempa\empty
- \frac{#1#3}{#1#4}%
- \else
- \frac{{#1}^{#2}#3}{#1{#4}^{#2}}%
- \fi}
-\def\@@Difflflat#1[#2]#3#4{%
- \def\@tempa{#2}%
- \ifx\@tempa\empty
- #1#3\mskip-0.8mu/\mskip-1.2mu #1#4%
- \else
- {#1}^{#2}#3\mskip-0.8mu /\mskip-1.2mu #1{#4}^{#2}%
- \fi}
-% \end{macrocode}
-%
-% The exponential sign
-% \begin{macrocode}
-\def\e{{\mathrm e}}
-% \end{macrocode}
-%
-% Physical units in |\rm|. Unstarred version includes leading
-% |\thinspace|. Starred version doesn't, and is used when referring to
-% the unit by itself (eg axis is |$B/\units*T$|), and is not qualifying
-% a number.
-% FIXME: |\mu| in |\units| can come out wrong in some fonts (mtpro2?)
-% -- needs investigation.
-% \begin{macrocode}
-\def\units{\begingroup
- \catcode`\.=\active
- \@ifstar{\let\un@tsspace\relax \un@ts}%
- {\let\un@tsspace\thinspace\un@ts}}
-\begingroup
- \catcode`\.=\active
- \gdef\un@ts#1{\let~\thinspace\let.\thinspace
- \ifmmode
- \un@tsspace\mathrm{#1}%
- \else
- \nobreak$\un@tsspace\mathrm{#1}$%
- \fi
- \endgroup}
-\endgroup
-% \end{macrocode}
-%
-% Other miscellaneous symbols:
-% The AU is nothing exciting, but may be adjusted in future
-% \begin{macrocode}
-\def\au{au}
-% \end{macrocode}
-% The symbol for Compton wavelength is a crossed lambda -- the following isn't perfect, but is OK for now.
-% \begin{macrocode}
-\def\lambdabar{\setbox\@tempboxa\hbox{$\lambda$}%
- \hbox to 0pt{\hbox to \wd\@tempboxa{\hss$\bar{}$\hss}\hss}\box\@tempboxa}
-% \end{macrocode}
-\makeatother
-
-Macro \cs[1]{vec}{v} is redefined to give bold-font vectors, rather than
-vectors with arrows, which is the (weird) \LaTeX\ default. This
-should work for bold greek as well as roman.
+Macro \cs[1]{vec}{v} is redefined to give bold-font vectors
+rather than vectors with arrows, which is the (weird) \LaTeX\ default
+-- thus $\vec v$ rather than $\origvec v$.
+This is intended to work for bold greek as well as roman,
+but it does so reliably only for the \opt{mtpro2} and \opt{stix2}
+options.
Macros \cs{dd} and \cs{ddd}: \cs{dd} is a roman d, as used for
differentials; \cs{ddd} is the same with a preceding thinspace,
@@ -254,6 +238,12 @@ The unstarred versions are for displayed equations, the starred
ones for inline maths.
There is analogous support for partial derivatives with \cs[2]{Partial}ab.
+You should generally type units, and numbers with units, using the
+\package{siunitx} package (use the \opt{siunitx} \cs{documentclass} option).
+
+However this package currently also
+supports a basic \verb|\units| command, described here. This macro
+is very likely to be removed in a future version of this package.
Macros \cs[1]{units}{expr}, \cs[1]{units*}{expr}: These typeset
physical units in an upright shape, with tilde or dot acting as a
separator between units. Since this is typeset in maths mode, all
@@ -261,22 +251,21 @@ other spacing is ignored. For example, \verb|$v=10\units{m.\mu s^{-1}}$|
gives $v=10\units{m.\mu s^{-1}}$. The unstarred version includes some
leading space; the starred version can be used when referring to the
unit by itself, where it is not qualifying a number (eg labelling an
-axis with units \verb|$B/\units*T$|, or $B/\units*T$). These macros
-might be replaced, in the future, by a recommendation to use the
-\texttt{siunitx} package.
-
-For some other useful symbols, see the table below:
-
-\def\arraystretch{1.5}
-\begin{tabular}{rcp{8cm}}
-\cs{e}&$\e^{i\pi}+1=0$& the exponential is typeset in an upright rather than
-an italic shape, as in \verb|$\e^{i\pi} + 1 = 0$|.\\
-\cs{au}&10\units\au& astronomical units:
-\verb|10\units{\au}|.\\
-\cs{lambdabar}&$\lambdabar$& the Compton wavelength, as a lambda with a
-bar through it.\\
-\end{tabular}
-
+axis with units \verb|$B/\units*T$|, or $B/\units*T$).
+
+The command \cs{e} sets an upright~`e':
+\verb|$\e^{i\pi} + 1 = 0$| produces $\e^{i\pi} + 1 = 0$.
+Other shortcuts may be available in customisations of this class.\footnote{%
+The package used to support an \cs{au} macro, for astronomical
+unit, and \cs{lambdabar} for Compton wavelength, but these have
+since been removed. The former is available via \package{siunitx}.}
+
+Note: $\pi$ is set as an italic pi character, matching the
+\LaTeX\ default. Since it's (usually) used as the circular constant,
+it should more properly be set upright, and you can get that using the
+\opt{uprightpi} option. This option also defines a \verb|\italicpi|
+command, for completeness. This option is at present
+implemented only for the \opt{mtpro2} and \opt{stix2} options.
\subsection{Extra: Creating complete exams}
\label{s:complete}
@@ -288,7 +277,7 @@ below. For more detail, see the complete documentation in \texttt{exam-n.pdf}.
\goodbreak
\listinginput1{template-master.tex}
-The \texttt{exam-n} class currently supports a sample class option \opt{A1}.
+The \texttt{exam-n} class currently supports a sample class option \opt{myclass}.
This automatically includes a suitable constants sheet in the
formatted paper.
diff --git a/macros/latex/contrib/exam-n/release-notes-dist.html b/macros/latex/contrib/exam-n/release-notes-dist.html
new file mode 100644
index 0000000000..1200c9828f
--- /dev/null
+++ b/macros/latex/contrib/exam-n/release-notes-dist.html
@@ -0,0 +1,656 @@
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>exam-n class – full release notes</title>
+
+
+<style class="distonly" type="text/css">body {
+ color: #333;
+ background: white;
+ margin-left: +30%;
+ width: 50%; /* body is 50% of screen width */
+ margin-right: auto; /* ie, 20% */
+ padding: 0.5em; /* this will make a difference if I decide to
+ have the background a different colour */
+ /* I can't decide on font: Optima's always nice, but Gill looks
+ agreeably intense. Helvetica's a decent fallback. */
+ font-family: "Helvetica Neue", Helvetica, "Gill Sans", gill, sans-serif;
+ /* font-family: Optima, "Gill Sans", gill, Helvetica, sans-serif; */
+ /* font-family: "Gill Sans", gill, Helvetica, sans-serif; */
+ /* I seem to have used 11pt at some point in the past, but this
+ is far too big -- did I ever have a reason for that, or is it
+ just due to browser changes? */
+ font-size: 10pt;
+ line-height: 150%;
+}
+
+div.topsidebar {
+ float: right;
+ width: 50%; /* ...of the body width (ie, 50% x 50% of screen) */
+ font-size: smaller;
+ margin-left: 1em;
+ padding-left: 1em;
+ border-left: solid thin #AAA;
+}
+
+/* On wider screens, move the sidebar out to the right hand side */
+/* This uses CSS3 media queries: http://www.w3.org/TR/css3-mediaqueries/ */
+@media screen and (min-width: 700pt) and (max-width: 850pt) {
+ body {
+ margin-left: 210pt;
+ width: 350pt; /* 50% of 700pt */
+ margin-right: auto;
+ }
+ div.topsidebar {
+ position: absolute;
+ /* I feel this size should be 595pt (350 + 210 + 0.05*700),
+ but that's clearly not right -- I don't think I understand what the -5%
+ in the h1 spec below is actually 5% of! */
+ left: 570pt;
+ width: auto;
+ margin-left: 0pt;
+ padding-left: 0pt;
+ border: none;
+ }
+}
+/* On still-wider screens, expand the left-margin, keeping the sidebar attached to the right-hand edge.
+ When the screen is 850pt wide (expanding from the @media case above),
+ the left margin will be 210pt, the width 350pt, and the right margin therefore 290pt.*/
+@media screen and (min-width: 850pt) {
+ body {
+ margin-right: 290pt; /* 290 = 850-(210+350) */
+ width: 350pt;
+ margin-left: auto; /* ...takes up the slack */
+ }
+ div.topsidebar {
+ position: absolute;
+ width: 290pt; /* same 290pt as above */
+ left: auto;
+ right: 0%;
+ padding-left: 0pt;
+ border: none;
+ }
+}
+
+
+code, pre {
+ font-family: Monaco, fixed;
+ font-size: 9pt;
+}
+
+a { text-decoration: none; }
+a:link { color: #66C; }
+a:visited { color: #669; }
+a[href]:hover { background: #EEE; }
+
+div.abstract {
+ font-style: oblique;
+ text-align: left;
+}
+div.abstract em { font-style: normal; }
+div.abstract code {
+ font-style: normal;
+ font-size: 80%;
+}
+
+/* a span/div style for attracting attention */
+.attention {
+ color: #822;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #822;
+ font-weight: 100; /* few fonts have ultra-light weights */
+ line-height: 100%; /* no need to spread out titles */
+}
+h1 {
+ margin-left: -40%;
+ margin-right: -5%;
+ padding: 0.5em;
+ border: solid thin #666;
+ text-align: right;
+}
+h2 {
+ margin-left: -40%;
+ margin-right: -5%;
+ padding: 0.2em;
+ border-top: solid thin #666;
+ clear: both;
+}
+
+h2.appendices {
+ margin-top: 10ex;
+ border-top: double medium #666;
+}
+h3 {
+ margin-left: -30%;
+ float: left;
+ width: 25%;
+ display: block;
+ text-align: right;
+ vertical-align: bottom;
+ padding-top: 0pt;
+ padding-right: 0.5em;
+ margin-top: 0pt;
+ line-height: 100%;
+}
+
+/*
+h4 {
+ color: #C66;
+}
+*/
+
+pre, table { background: #dde; }
+
+pre {
+ padding: 1em;
+ line-height: 130%;
+}
+
+table {
+ font-size: smaller;
+}
+td {
+ padding: 0.5ex;
+}
+
+Q:before { content: "“"; }
+Q:after { content: "”"; }
+
+img.smallimage {
+ float: right;
+ margin: 24pt;
+ margin-right: -30%;
+}
+
+div.signature {
+ margin-left: -40%;
+ margin-right: -5%;
+ margin-top: 4ex;
+ text-align: right;
+ border: solid thin #666;
+ padding: 0.3em;
+ clear: both;
+}
+
+/* ============================================================
+ * Some other curiosities of my one-time formatting for web pages
+ */
+.doc-history {
+ font-size: xx-small;
+ background: #eee;
+ line-height: 100%;
+}
+
+div.subtoc, div.subsubtoc { display: none; }
+
+/* ============================================================
+ * Special formatting for ToC
+ */
+
+/*
+ If there's significant amount of text in front of the first subsection,
+ then the following are good to put in the per-document stylesheet:
+ width: 25%;
+ float: right;
+*/
+div#toc {
+ color: #888;
+ padding: 0;
+ font-size: smaller;
+ text-align: right;
+}
+div#toc a:link { color: #888; }
+div#toc &gt; ul {
+ padding: 0pt;
+ margin: 0pt;
+ list-style: none;
+}
+div#toc li {
+ padding: 0pt;
+ display: inline-block;
+}
+div#toc li:before {
+ content: "§ ";
+ margin-left: 1em;
+}
+/* the following elements aren't currently generated by structure.lx */
+div#toc li ul {
+ padding-left: 1em;
+ margin-left: 0;
+ font-style: italic;
+ display: inline;
+}
+div#toc li ul:before {
+ content: "( ";
+}
+div#toc li ul:after {
+ content: " ) ";
+}
+div#toc li li {
+ padding-left: 0pt;
+}
+div#toc li li:after {
+ content: "; ";
+}
+</style>
+<style type="text/css">
+dd ul { padding: 0pt; margin: 0pt; }
+</style>
+</head>
+
+<body>
+<h1>The exam-n class – release notes</h1>
+
+<h:dl xmlns:h="http://www.w3.org/1999/xhtml">
+
+
+
+
+<h:dt><h:span class="attention">1.4.0, 2022 October 10</h:span></h:dt><h:dd>
+ <ul>
+ <li>The [siunitx] option is now on by default, and the
+ <code>\units</code> macro produces a one-time-per-document
+ warning that it will be removed in the next version.</li>
+ <li>Having two <code>\partmarks</code> commands in an
+ environment is now detected as an error (it was documented as an
+ error, but not checked, so the extra <code>\partmarks</code>
+ commands were simply ignored).</li>
+ </ul>
+ </h:dd>
+
+<h:dt>1.4.0-b1, 2022 August 7</h:dt><h:dd>
+ <ul>
+ <li>The class file now depends on a version of LaTeX which is at least
+ the 2020/10/01 release. This is so that we can use the current LaTeX
+ hooks mechanism.</li>
+ <li>Rework <code>\partmarks</code>: the <code>\partmarks</code>
+ indicator can now go <em>inside</em> most environments, including
+ list, quotes, unnumbered equations, and the various amsmath displays. In these
+ cases, the indicator will automatically appear at the end of the
+ environment. The starred variant of the command still exists, but
+ should rarely be necessary.</li>
+ </ul>
+ </h:dd>
+
+<h:dt>1.3.5-b1, 2022 July 11</h:dt><h:dd><ul>
+<li>Fix erroneous broken line before <code>\partmarks</code>, in
+compose mode, when a paragraph fills the last line.</li>
+<li>Fix support for STIX2 fonts in XeLaTeX and LuaLaTeX (it was
+working inaccurately before).</li>
+<li>Add an optional argument for <code>\part</code> to override part numbering.</li>
+<li>Use the <code>xcolor</code> package for colour management, instead
+of the core <code>color</code> package (the <code>xcolor</code>
+package is well-known and stable, and this means that we are
+compatible with TikZ).</li>
+<li><code>\partmarks</code> in solutions no longer gobble trailing space
+(doing so is probably right in questions, and is still the case, but
+<code>\partmarks</code> in solutions tend to be more interspersed with
+text).</li>
+<li><code>\label</code> within a <code>\part</code> now refers to the
+part number (as opposed to the question number).</li>
+<li>Avoid a ‘You can't use `\unskip' in vertical mode’ error,
+in certain circumstances.</li>
+<li>Add the <code>[siunitx]</code> option, indicating that we should
+load the <a href="https://www.ctan.org/pkg/siunitx">siunitx</a> package (default no).
+This is now preferred to the <code>\units</code> macro, and the latter will be
+removed in a forthcoming release.</li>
+<li>Renamed <code>A1.clo</code> to clearer <code>myclass.clo</code></li>
+<li>Repository moved from bitbucket to
+<a href="https://heptapod.host/nxg/exam-n">https://heptapod.host/nxg/exam-n</a>,
+when bitbucket dropped support for Mercurial.
+This means, incidentally, that links to specific issues at bitbucket
+are now broken.</li>
+<li>Bold-italic maths should now work correctly with STIX.</li>
+<li>Long <code>\partmarks</code> comments now appear as footnotes.</li>
+<li>Solutions are now set <code>\normalsize</code>.</li>
+<li>Bugfix: move definition of <code>\defaultpartmarkscategory</code>
+so it can be invoked within a <code>.clo</code> file straightforwardly.</li>
+<li>Define the <code>[uprightpi]</code> option to set <code>\pi</code>
+as an upright character, as appropriate for a constant (this is
+implemented fully only for the <code>[mtpro2]</code> and
+<code>[stix2]</code> options)..</li>
+<li>Note that the <code>\units</code> macro is likely to be deprecated
+in a forthcoming version, and replaced by a recommendation to use the
+standard <code>[siunitx]</code> package.</li>
+</ul></h:dd>
+
+<h:dt>1.3, 2018 November 21</h:dt><h:dd><ul>
+<li>Add a ‘category’ optional argument to <code>\partmarks</code>, and
+add <code>\defaultpartmarkscategory</code>.</li>
+</ul>
+</h:dd>
+
+<h:dt>1.2.1, 2018 July 2</h:dt><h:dd><ul>
+<li>Bugfix: ignore any content which appears after
+<code>\end{document}</code>, in <code>\includequestion</code> (author)
+files (fixes issue 6).</li>
+<li>The environments <code>{figure*}</code> and <code>{table*}</code> now produce an error.</li>
+<li>The macro <code>\vec</code> now produces correct greek bold maths.</li>
+<li>Docmentation: notes on unit formatting.</li>
+</ul>
+</h:dd>
+
+<h:dt>1.2, 2017 December 1</h:dt><h:dd><ul>
+<li>Use serif STIX2 fonts for sans and monospace cases, when using
+Lua- or XeLaTeX (the style doesn't use/encourage any sans-serif text,
+so this shouldn't matter).</li>
+<li>Fix font sizes in solutions.</li>
+<li>Adjustments to font-handling, which appear to have fixed LuaLaTeX differences.</li>
+<li>Add the <code>stix2</code> option, to use the
+<a href="http://www.stixfonts.org/">STIX2 font set</a>.</li>
+<li>Make it possible to use <code>\rubric</code> and <code>\baserubric</code> within a <code>.clo</code> file.
+This was advertised as being possible, but it seems it had never been tested!</li>
+</ul></h:dd>
+
+
+<h:dt><h:span class="attention">1.1.5, 2016 December 22</h:span></h:dt><h:dd><ul>
+<li>Make <code>\schoolcoursecode</code> optional exam metadata.
+Rework how this is checked, and support customising this in a
+<code>.clo</code> file.</li>
+</ul></h:dd>
+
+<h:dt>1.1.4, 2016 December 19</h:dt><h:dd><ul>
+<li>Documentation: add notes about use of pdfpages.</li>
+<li>Added <code>[largefont]</code> option.
+<strong>Note</strong>:
+option <code>[hugefont]</code> has replaced <code>[bigfont]</code>;
+the latter is now deprecated, and may be removed in v1.2.</li>
+<li>Use of the <code>\part</code> macro is now supported within
+solutions (it produced the wrong numbers before), and there is a new
+<code>\StylePartNumber</code> customisation macro.</li>
+</ul></h:dd>
+
+<h:dt>1.1.3, n/d</h:dt><h:dd><ul>
+<li>Version 1.1.3 was never released</li>
+</ul></h:dd>
+
+<h:dt>1.1.2, 2015 November 26</h:dt><h:dd><ul>
+<li>Handled trailing floats at end of document (generated by packages
+such as <code>rotating</code>.</li>
+<li><code>\label</code> within question environment now refers to the
+question number.</li>
+<li>Work around a problem when a paragraph starts with <code>{\bf ...}</code>
+rather than (post-1995) <code>\textbf{...}</code>.</li>
+<li><code>\begin{questiondata}</code> now starts a new paragraph.</li>
+<li>Some documentation adjustments.</li>
+</ul></h:dd>
+
+<h:dt>1.1.1, 2014 November 27</h:dt><h:dd><ul>
+<li>Adjust <code>\partmarks*</code> behaviour; now behaves differently
+within display maths (addresses
+<a href="https://bitbucket.org/nxg/exam-n/issue/1/">issue 1</a>).</li>
+<li>Various documentation and release fixes.</li>
+</ul></h:dd>
+
+<h:dt>1.1, 2014 May 3</h:dt><h:dd><p>Converted to a generic class, <code>exam-n</code>, ready for wider
+distribution.
+Available on <a href="https://bitbucket.org/nxg/exam-n/">bitbucket</a>
+and at CTAN.</p>
+</h:dd>
+
+<h:dt>1.0.16, 2014 February 28</h:dt><h:dd><ul>
+<li>Option mtpro2 now switches to times (this fixes a pre-existing bug
+ exposed by the [sansserif] option).</li>
+<li>The [bigfont] option now works (this fixes a pre-existing bug, to
+ do with <code>\subsections</code>, which was exposed by the addition
+ of the [bigfont] option).</li>
+<li>Added the [bigfont] option</li>
+<li>Fixed 'shouts' warning at start (again)</li>
+<li>Forbid *section commands inside questions (and don't freak out)</li>
+<li>Rename <code>\questiontrailer</code> to <code>\questionpreamble</code> (more logical)</li>
+<li>Fixed mcq warnings, and 'question continued' errors.</li>
+<li>Renamed <code>\multiplechoicequestions</code> to more logical
+ <code>\multiplechoiceanswers</code></li>
+<li>Various (further) spacing changes</li>
+<li>Added <code>\subsection</code></li>
+<li>Release includes
+1.0.16b1 (2014 January 20);
+1.0.16b2 (20 January);
+1.0.16b3 (22 January);
+1.0.16b4 (14 February).
+</li>
+</ul>
+</h:dd>
+
+<h:dt>1.0.15, 2014 January 19</h:dt><h:dd><ul>
+<li>Fixed mcq and showsolutions, to suppress incorrect warning of missing answers.</li>
+</ul></h:dd>
+
+<h:dt>1.0.14, 2014 January 10</h:dt><h:dd><ul>
+<li>pdfpages content now appears in draft mode.</li>
+<li>The <code>[draft]</code> option now implies [showsolutions] (so if
+you want to suppress the solutions in this mode, you must now follow
+<code>[draft]</code> with <code>[noshowsolutions]</code>).</li>
+<li>Showing missing information: shouts and missing exam date/time are
+now highlighted.</li>
+<li>Fixed bug where excess <code>\QuestionNumberChecksOff</code>
+caused question numbers to disappear.</li>
+<li>Remove indent at start of question.</li>
+</ul></h:dd>
+
+<h:dt>1.0.13, 2013 December 4</h:dt><h:dd><ul>
+<li>Added a <code>[sansserif]</code> class option.</li>
+<li>Improved spacing and linebreaking; there are now fewer bad page-breaks.</li>
+<li>Added the <code>{mcq}</code> environment.</li>
+<li>Changed the distribution licence from GPL to LPPL.</li>
+</ul>
+</h:dd>
+
+<h:dt>1.0.12, 2013 November 11</h:dt><h:dd><ul>
+<li>Adjustments to banner text and base rubric (consulting with Morag Casey).</li>
+<li>Added notes about <code>\includepdf</code> in ‘notes for authors’.</li>
+<li>Adjustments to the distributed example files.</li>
+</ul></h:dd>
+
+<h:dt>1.0.11, 2013 July 18</h:dt><h:dd>
+<p>Adjustments to question data: k_B, etc, should have roman
+subscripts.</p>
+</h:dd>
+
+<h:dt>1.0.10, 2013 June 27</h:dt><h:dd>
+ <p>Minor documentation and distribution fixes</p>
+</h:dd>
+
+<h:dt>1.0.9, 2013 March 22</h:dt><h:dd>
+ <p>Remove leftover debugging code (garhhh)</p>
+</h:dd>
+
+<h:dt>1.0.8, 2013 March 14</h:dt><h:dd>
+ <p>Add the <code>mono</code> and <code>colour</code> options.</p>
+</h:dd>
+
+<h:dt>1.0.7, 2013 March 14</h:dt><h:dd><ul>
+<li>pdfpages is now disabled <em>only</em> in solutions</li>
+<li>Minor layout changes (exam title adjusts size for long
+titles)</li>
+</ul></h:dd>
+
+<h:dt>1.0.6, 2013 March 13</h:dt><h:dd><ul>
+<li>Avoid tables and figures in solutions incrementing the float counter.</li>
+<li>Layout changes; adjustment to default base rubric; A345 rubric change</li>
+<li>Some documentation changes</li>
+</ul>
+</h:dd>
+
+<h:dt>1.0.4-1, 2013 March 8</h:dt><h:dd>
+ <p>This is a bugfix release: it's a re-release of now-deprecated
+1.0.5 minus a breaking change.</p>
+<ul>
+<li>Add <code>{table}</code> support, paralleling existing
+<code>{figure}</code> support (ie tables don't float, but captions
+work as expected).</li>
+<li>Blank lines after a <code>\begin{question}</code> no longer
+result in extra space.</li>
+<li>Adjust spacing and layout of front page (again); various other
+cosmetic changes.</li>
+<li>A document identifier appears at the bottom of each page,
+corroborating the exam the page is for (to avoid photocopier collation
+accidents), and giving a numeric identifier which increases with time
+(allowing you to identify which of two printouts is later).</li>
+</ul></h:dd>
+
+<h:dt>1.0.4, 2013 March 6</h:dt><h:dd>
+ <p>Adjust base rubric; assorted distribution and detail fixes.</p>
+</h:dd>
+
+<h:dt>1.0.3, 2013 January 25</h:dt><h:dd>
+ <p>Added <code>[A2]</code> class option.</p>
+</h:dd>
+
+<h:dt>1.0.2, 2013 January 25</h:dt><h:dd><ul>
+<li>The `pdfpages' package wasn't working when the `noshowsolutions'
+option was present. Fixed, by special-casing, specifically disabling the
+<code>\includepdf</code> command in this case.</li>
+<li>Adjust display of <code>\partmarks</code> (no need for extra
+space, since <code>\partmarks</code> is now fully in the margin).</li>
+<li>Adjusting the front-page layout. Again.</li>
+</ul></h:dd>
+
+<h:dt>1.0.1, 2013 January 18</h:dt><h:dd><ul>
+<li><code>{figure}</code> now works, because it's explicitly
+supported (<code>{figure}</code> inside solutions could cause problems
+before). The contents don't float.</li>
+<li>Layout adjustments.</li>
+<li>Graphics now appear in draft mode.</li>
+</ul>
+</h:dd>
+
+<h:dt>1.0, 2012 December 11</h:dt><h:dd>
+ <p>This is the nominal version 1.0 release, and will be used for the
+2012-13 Honours Astronomy exams (it might get further tweaks along the
+ way, but we believe this is a complete distribution set).</p>
+ <ul>
+<li>More adjustments to notes-for-authors, now showing example LaTeX results.</li>
+<li>Addition of template-question.tex</li>
+<li>Adjustments to base rubric.</li>
+ </ul>
+</h:dd>
+
+<h:dt>1.0b5, 2012 December 3</h:dt><h:dd><ul>
+<li>Fine formatting adjustments: occasional <code>\nobreak</code> and
+rationalisation of <code>\maketitle</code>.</li>
+<li>Improvements to notes-for-authors.</li>
+</ul></h:dd>
+
+<h:dt>1.0b4, 2012 November 30</h:dt><h:dd><ul>
+<li>Improve generation of PDF metadata.</li>
+<li>Add macro <code>\shout</code>, for highlighted `FIXME' comments.</li>
+<li>Add showmarktotals option.</li>
+<li>Permit <code>\partmarks</code> in solutions, without it adding to
+the marks added up for the question (at the same time, forbid having a
+solution within a solution).</li>
+<li>Various formatting adjustments.</li>
+</ul>
+</h:dd>
+
+<h:dt>1.0b3, 2012 November 8</h:dt><h:dd><ul>
+<li>Add [A345] option.</li>
+<li>Make compose/draft material appear in red.</li>
+<li>Some packaging changes and bugfixes.</li>
+</ul></h:dd>
+
+<h:dt>1.0b2, 2012 November 6</h:dt><h:dd><p>Mild formatting adjustments.</p></h:dd>
+
+<h:dt>1.0rc1, 2012 November 2</h:dt><h:dd><ul>
+<li>Significant rewrite of formatting, producing a consensus
+AandA/PhysHons style, and renaming some confusingly named
+commands.</li>
+<li>Consequently, the AandA.clo and PhysHons.clo options have
+disappeared.</li>
+<li>The <code>\constantssheet</code> macro has appeared, and setting
+this is now the principal function of per-class <code>.clo</code>
+files.
+See the new <code>A1.clo</code> and modified <code>P2.clo</code> option files.</li>
+</ul>
+</h:dd>
+
+<h:dt>0.17.1, 2012 September 21</h:dt><h:dd><p>Fix packaging infelicity</p></h:dd>
+
+<h:dt>0.17, 2012 September 21</h:dt><h:dd><ul>
+<li>Rework <code>solutions</code> environment to make it a little more robust.</li>
+<li>Add <code>\MSc</code> degree shorthand.</li>
+<li>Bugfix: continuation headers now appear if a question starts on page 1.</li>
+<li>Bugfix: fix wrong syntax in draft+showsolutions mode -- now works again</li>
+</ul>
+</h:dd>
+
+<h:dt>0.16, 2012 July 26</h:dt><h:dd><ul>
+<li>Renamed the [showmarks] option to more rational [perquestionmarks]
+(because the option doesn't control whether per-question marks are
+<em>displayed</em>, but whether they're tracked at all). Slightly
+improved the documentation of this at the same time.</li>
+<li>Added <code>\lambdabar</code> macro</li>
+<li>Fix long-standing problem with continuation lines -- these should now be robust.</li>
+</ul></h:dd>
+<h:dt>0.15, 2011 November 23</h:dt><h:dd>
+ <p>Avoid conflict with <code>ifpdf</code> package. Now
+ <em>depends</em> on <code>ifpdf</code>.</p>
+</h:dd>
+
+<h:dt>0.14, 2010 August 6</h:dt><h:dd><ul>
+<li>Fixed the problem where the question-continuation marks would be
+messed up by the presence of floats.</li>
+<li>Added P2.clo; adjust 'showing solutions' banner
+to avoid collision with other headers (thanks to Morag Casey for the .clo
+file and the report).</li>
+<li>Changed the name of the class to 'guexam', from potentially confusing 'exam'.
+Support guexam.config for forcing options (for example).</li>
+</ul></h:dd>
+
+<h:dt>0.13-1, 2008 November 21</h:dt><h:dd>
+ <p>Make the gulogo style optional, so that question authors don't
+have to download and install that before they can draft a question.
+ Also adjust the logo size.</p>
+</h:dd>
+
+<h:dt>0.13, 2008 November 11</h:dt><h:dd><p>Add university logo, and slightly rearrange the header.
+Add <code>{questiondata}</code> environment.</p></h:dd>
+
+<h:dt>0.12-2, 2008 April 14</h:dt><h:dd><p>...keep on truckin'. Further changes to the
+<code>\partmarks*</code> spacing code, still largely unprincipled, but
+looking closer to what's required.</p></h:dd>
+
+<h:dt>0.12-1, 2008 April 3</h:dt><h:dd><p>...and again. This time, I think I actually see what the problem
+was. Macro <code>\partmarks</code> now forces a new paragraph (it was
+documented to be usable at the end of a paragraph, so this is again
+forced, and the documentation made more explicit), this makes what I
+thought was the solution actually work. Which is nice. Redefined
+<code>enumerate</code> and <code>itemize</code> environments, to
+improve spacing somewhat.</p></h:dd>
+
+<h:dt>0.12, 2008 April 3</h:dt><h:dd><p>Further adjustments to <code>\partmarks</code>: again, it should
+be more consistent without necessarily being more principled, alas.</p></h:dd>
+
+<h:dt>0.11, 2008 March 30</h:dt><h:dd><p>Minor fixes: Adjust display of partmarks -- should now be more
+consistent; option [showsolutions] no longer defaults
+[{no,}pageperquestion]; add macro <code>\e</code> to format roman
+exponential.</p></h:dd>
+
+<h:dt>0.10, 2008 January 17</h:dt><h:dd><p>Fix <code>\vec</code> when it appears in sub- or superscript
+position. Add <code>\paperident</code> command.</p></h:dd>
+
+<h:dt>0.9, 2007 December 10</h:dt><h:dd><p>Various formatting changes. Added optional argument to
+<code>\includequestion</code> overriding question number.</p></h:dd>
+
+<h:dt>0.8, 2007 November 25</h:dt><h:dd><p>You can now use <code>\usepackage</code> within
+<code>[compose]</code> mode.</p></h:dd>
+
+<h:dt>0.7, 2007 November 20</h:dt><h:dd><p>Make changes to the display of the 'University of Glasgow' banner
+at the top: resolves some font problems. Other minor layout tweaks.</p></h:dd>
+
+<h:dt>0.6, 2007 November 18</h:dt><h:dd><p>Fixed bold maths problems: <code>\vec</code> now works with greek
+letters, too. Support MTpro2 (mathtime maths fonts) with the new
+<code>[mtpro2]</code> class option. The <code>{solution}</code>
+environment can appear multiple times within a question. Question
+numbers now appear correctly in 'final' mode.</p></h:dd>
+
+<h:dt>0.5, 2007 October 30</h:dt><h:dd><p>Fix collision with LaTeX internal: a <code>\comment</code> at the
+start of a <code>{question}</code> now works.</p></h:dd>
+
+</h:dl>
+
+
+</body>
+</html>
diff --git a/macros/latex/contrib/exam-n/release-notes.dtx b/macros/latex/contrib/exam-n/release-notes.dtx
new file mode 100644
index 0000000000..84cde9c3a5
--- /dev/null
+++ b/macros/latex/contrib/exam-n/release-notes.dtx
@@ -0,0 +1,43 @@
+% \begin{description}\item[1.4.0, 2022 October 10]\relax \P\thinspace The [siunitx] option is now on by default, and the
+% |\units| macro produces a one-time-per-document
+% warning that it will be removed in the next version. \P\thinspace Having two |\partmarks| commands in an
+% environment is now detected as an error (it was documented as an
+% error, but not checked, so the extra |\partmarks|
+% commands were simply ignored).\par\item[1.4.0-b1, 2022 August 7]\relax \P\thinspace The class file now depends on a version of LaTeX which is at least
+% the 2020/10/01 release. This is so that we can use the current LaTeX
+% hooks mechanism. \P\thinspace Rework |\partmarks|: the |\partmarks|
+% indicator can now go \emph{inside} most environments, including
+% list, quotes, unnumbered equations, and the various amsmath displays. In these
+% cases, the indicator will automatically appear at the end of the
+% environment. The starred variant of the command still exists, but
+% should rarely be necessary.\par\item[1.3.5-b1, 2022 July 11]\relax \P\thinspace Fix erroneous broken line before |\partmarks|, in
+% compose mode, when a paragraph fills the last line. \P\thinspace Fix support for STIX2 fonts in XeLaTeX and LuaLaTeX (it was
+% working inaccurately before). \P\thinspace Add an optional argument for |\part| to override part numbering. \P\thinspace Use the |xcolor| package for colour management, instead
+% of the core |color| package (the |xcolor|
+% package is well-known and stable, and this means that we are
+% compatible with TikZ). \P\thinspace |\partmarks| in solutions no longer gobble trailing space
+% (doing so is probably right in questions, and is still the case, but
+% |\partmarks| in solutions tend to be more interspersed with
+% text). \P\thinspace |\label| within a |\part| now refers to the
+% part number (as opposed to the question number). \P\thinspace Avoid a ‘You can't use `\unskip' in vertical mode’ error,
+% in certain circumstances. \P\thinspace Add the |[siunitx]| option, indicating that we should
+% load the siunitx\footnote{\url{https://www.ctan.org/pkg/siunitx}} package (default no).
+% This is now preferred to the |\units| macro, and the latter will be
+% removed in a forthcoming release. \P\thinspace Renamed |A1.clo| to clearer |myclass.clo| \P\thinspace Repository moved from bitbucket to
+% https://heptapod.host/nxg/exam-n\footnote{\url{https://heptapod.host/nxg/exam-n}},
+% when bitbucket dropped support for Mercurial.
+% This means, incidentally, that links to specific issues at bitbucket
+% are now broken. \P\thinspace Bold-italic maths should now work correctly with STIX. \P\thinspace Long |\partmarks| comments now appear as footnotes. \P\thinspace Solutions are now set |\normalsize|. \P\thinspace Bugfix: move definition of |\defaultpartmarkscategory|
+% so it can be invoked within a |.clo| file straightforwardly. \P\thinspace Define the |[uprightpi]| option to set |\pi|
+% as an upright character, as appropriate for a constant (this is
+% implemented fully only for the |[mtpro2]| and
+% |[stix2]| options).. \P\thinspace Note that the |\units| macro is likely to be deprecated
+% in a forthcoming version, and replaced by a recommendation to use the
+% standard |[siunitx]| package.\par\item[1.3, 2018 November 21]\relax \P\thinspace Add a ‘category’ optional argument to |\partmarks|, and
+% add |\defaultpartmarkscategory|.\par\item[1.2.1, 2018 July 2]\relax \P\thinspace Bugfix: ignore any content which appears after
+% |\end{document}|, in |\includequestion| (author)
+% files (fixes issue 6). \P\thinspace The environments |{figure*}| and |{table*}| now produce an error. \P\thinspace The macro |\vec| now produces correct greek bold maths. \P\thinspace Docmentation: notes on unit formatting.\par\item[1.2, 2017 December 1]\relax \P\thinspace Use serif STIX2 fonts for sans and monospace cases, when using
+% Lua- or XeLaTeX (the style doesn't use/encourage any sans-serif text,
+% so this shouldn't matter). \P\thinspace Fix font sizes in solutions. \P\thinspace Adjustments to font-handling, which appear to have fixed LuaLaTeX differences. \P\thinspace Add the |stix2| option, to use the
+% STIX2 font set\footnote{\url{http://www.stixfonts.org/}}. \P\thinspace Make it possible to use |\rubric| and |\baserubric| within a |.clo| file.
+% This was advertised as being possible, but it seems it had never been tested!\par\end{description} \ No newline at end of file
diff --git a/macros/latex/contrib/exam-n/release-notes.html b/macros/latex/contrib/exam-n/release-notes.html
deleted file mode 100644
index 9f843e11f6..0000000000
--- a/macros/latex/contrib/exam-n/release-notes.html
+++ /dev/null
@@ -1,340 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>exam-n class – release notes</title>
-<link href="http://nxg.me.uk" rev="author"/>
-<link type="text/css" rel="stylesheet"
- href="style.css"/>
-<style type='text/css'>
-dd ul { padding: 0pt; margin: 0pt; }
-</style>
-</head>
-
-<body>
-<h1>The exam-n class – release notes</h1>
-
-<dl>
-<!-- @CURRENT@ -->
-<dt><span class='attention'>1.1.4, 2016 December 19</span></dt>
-<dd><ul>
-<li>Documentation: add notes about use of pdfpages.</li>
-<li>Added <code>[largefont]</code> option.
-<strong>Note</strong>:
-option <code>[hugefont]</code> has replaced <code>[bigfont]</code>;
-the latter is now deprecated, and may be removed in v1.2.</li>
-<li>Use of the <code>\part</code> macro is now supported within
-solutions (it produced the wrong numbers before), and there is a new
-<code>\StylePartNumber</code> customisation macro.</li>
-</ul></dd>
-
-<dt>1.1.3</dt>
-<dd><ul>
-<li>Version 1.1.3 was never released</li>
-</ul></dd>
-
-<dt>1.1.2, 2015 November 26</dt>
-<dd><ul>
-<li>Handled trailing floats at end of document (generated by packages
-such as <code>rotating</code>.</li>
-<li><code>\label</code> within question environment now refers to the
-question number.</li>
-<li>Work around a problem when a paragraph starts with <code>{\bf ...}</code>
-rather than (post-1995) <code>\textbf{...}</code>.</li>
-<li><code>\begin{questiondata}</code> now starts a new paragraph.</li>
-<li>Some documentation adjustments.</li>
-</ul></dd>
-
-<dt>1.1.1, 2014 November 27</dt>
-<dd><ul>
-<li>Adjust <code>\partmarks*</code> behaviour; now behaves differently
-within display maths (addresses
-<a href='https://bitbucket.org/nxg/exam-n/issue/1/'>issue 1</a>).</li>
-<li>Various documentation and release fixes.</li>
-</ul></dd>
-
-<dt>1.1, 2014 May 3</dt>
-<dd>Converted to a generic class, <code>exam-n</code>, ready for wider
-distribution.
-Available on <a href='https://bitbucket.org/nxg/exam-n/'>bitbucket</a>
-and at CTAN.</dd>
-
-<!-- @ENDCURRENT@ -->
-
-<dt>1.0.16, 2014 February 28</dt>
-<dd><ul>
-<li>Option mtpro2 now switches to times (this fixes a pre-existing bug
- exposed by the [sansserif] option).</li>
-<li>The [bigfont] option now works (this fixes a pre-existing bug, to
- do with <code>\subsections</code>, which was exposed by the addition
- of the [bigfont] option).</li>
-<li>Added the [bigfont] option</li>
-<li>Fixed 'shouts' warning at start (again)</li>
-<li>Forbid *section commands inside questions (and don't freak out)</li>
-<li>Rename <code>\questiontrailer</code> to <code>\questionpreamble</code> (more logical)</li>
-<li>Fixed mcq warnings, and 'question continued' errors.</li>
-<li>Renamed <code>\multiplechoicequestions</code> to more logical
- <code>\multiplechoiceanswers</code></li>
-<li>Various (further) spacing changes</li>
-<li>Added <code>\subsection</code></li>
-<li>Release includes
-1.0.16b1 (2014 January 20);
-1.0.16b2 (20 January);
-1.0.16b3 (22 January);
-1.0.16b4 (14 February).
-</li>
-</ul>
-</dd>
-
-<dt>1.0.15, 2014 January 19</dt>
-<dd><ul>
-<li>Fixed mcq and showsolutions, to suppress incorrect warning of missing answers.</li>
-</ul></dd>
-
-<dt>1.0.14, 2014 January 10</dt>
-<dd><ul>
-<li>pdfpages content now appears in draft mode.</li>
-<li>The <code>[draft]</code> option now implies [showsolutions] (so if
-you want to suppress the solutions in this mode, you must now follow
-<code>[draft]</code> with <code>[noshowsolutions]</code>).</li>
-<li>Showing missing information: shouts and missing exam date/time are
-now highlighted.</li>
-<li>Fixed bug where excess <code>\QuestionNumberChecksOff</code>
-caused question numbers to disappear.</li>
-<li>Remove indent at start of question.</li>
-</ul></dd>
-
-<dt>1.0.13, 2013 December 4</dt>
-<dd><ul>
-<li>Added a <code>[sansserif]</code> class option.</li>
-<li>Improved spacing and linebreaking; there are now fewer bad page-breaks.</li>
-<li>Added the <code>{mcq}</code> environment.</li>
-<li>Changed the distribution licence from GPL to LPPL.</li>
-</ul>
-</dd>
-
-<dt>1.0.12, 2013 November 11</dt>
-<dd><ul>
-<li>Adjustments to banner text and base rubric (consulting with Morag Casey).</li>
-<li>Added notes about <code>\includepdf</code> in <q>notes for authors</q>.</li>
-<li>Adjustments to the distributed example files.</li>
-</ul></dd>
-
-<dt>1.0.11, 2013 July 18</dt>
-<dd>Adjustments to question data: k_B, etc, should have roman subscripts.</dd>
-
-<dt>1.0.10, 2013 June 27</dt>
-<dd>Minor documentation and distribution fixes</dd>
-
-<dt><span>1.0.9, 2013 March 22</span></dt>
-<dd>Remove leftover debugging code (garhhh)</dd>
-
-<dt>1.0.8, 2013 March 14</dt>
-<dd>Add the <code>mono</code> and <code>colour</code> options.</dd>
-
-<dt>1.0.7, 2013 March 14</dt>
-<dd><ul>
-<li>pdfpages is now disabled <em>only</em> in solutions</li>
-<li>Minor layout changes (exam title adjusts size for long
-titles)</li>
-</ul></dd>
-
-<dt>1.0.6, 2013 March 13</dt>
-<dd><ul>
-<li>Avoid tables and figures in solutions incrementing the float counter.</li>
-<li>Layout changes; adjustment to default base rubric; A345 rubric change</li>
-<li>Some documentation changes</li>
-</ul>
-</dd>
-
-<dt>1.0.4-1, 2013 March 8</dt>
-<dd>This is a bugfix release: it's a re-release of now-deprecated
-1.0.5 minus a breaking change.<ul>
-<li>Add <code>{table}</code> support, paralleling existing
-<code>{figure}</code> support (ie tables don't float, but captions
-work as expected).</li>
-<li>Blank lines after a <code>\begin{question}</code> no longer
-result in extra space.</li>
-<li>Adjust spacing and layout of front page (again); various other
-cosmetic changes.</li>
-<li>A document identifier appears at the bottom of each page,
-corroborating the exam the page is for (to avoid photocopier collation
-accidents), and giving a numeric identifier which increases with time
-(allowing you to identify which of two printouts is later).</li>
-</ul></dd>
-
-<dt>1.0.4, 2013 March 6</dt>
-<dd>Adjust base rubric; assorted distribution and detail fixes.</dd>
-
-<dt>1.0.3, 2013 January 25</dt>
-<dd>Added <code>[A2]</code> class option.</dd>
-
-<dt>1.0.2, 2013 January 25</dt>
-<dd><ul>
-<li>The `pdfpages' package wasn't working when the `noshowsolutions'
-option was present. Fixed, by special-casing, specifically disabling the
-<code>\includepdf</code> command in this case.</li>
-<li>Adjust display of <code>\partmarks</code> (no need for extra
-space, since <code>\partmarks</code> is now fully in the margin).</li>
-<li>Adjusting the front-page layout. Again.</li>
-</ul></dd>
-
-<dt>1.0.1, 2013 January 18</dt>
-<dd><ul>
-<li><code>{figure}</code> now works, because it's explicitly
-supported (<code>{figure}</code> inside solutions could cause problems
-before). The contents don't float.</li>
-<li>Layout adjustments.</li>
-<li>Graphics now appear in draft mode.</li>
-</ul>
-</dd>
-
-<dt>1.0, 2012 December 11</dt>
-<dd>This is the nominal version 1.0 release, and will be used for the
-2012-13 Honours Astronomy exams (it might get further tweaks along the
-way, but we believe this is a complete distribution set).<ul>
-<li>More adjustments to notes-for-authors, now showing example LaTeX results.</li>
-<li>Addition of template-question.tex</li>
-<li>Adjustments to base rubric.</li>
-</ul></dd>
-
-<dt>1.0b5, 2012 December 3</dt>
-<dd><ul>
-<li>Fine formatting adjustments: occasional <code>\nobreak</code> and
-rationalisation of <code>\maketitle</code>.</li>
-<li>Improvements to notes-for-authors.</li>
-</ul></dd>
-
-<dt>1.0b4, 2012 November 30</dt>
-<dd><ul>
-<li>Improve generation of PDF metadata.</li>
-<li>Add macro <code>\shout</code>, for highlighted `FIXME' comments.</li>
-<li>Add showmarktotals option.</li>
-<li>Permit <code>\partmarks</code> in solutions, without it adding to
-the marks added up for the question (at the same time, forbid having a
-solution within a solution).</li>
-<li>Various formatting adjustments.</li>
-</ul>
-</dd>
-
-<dt>1.0b3, 2012 November 8</dt>
-<dd><ul>
-<li>Add [A345] option.</li>
-<li>Make compose/draft material appear in red.</li>
-<li>Some packaging changes and bugfixes.</li>
-</ul></dd>
-
-<dt>1.0b2, 2012 November 6</dt>
-<dd>Mild formatting adjustments.</dd>
-
-<dt>1.0rc1, 2012 November 2</dt>
-<dd><ul>
-<li>Significant rewrite of formatting, producing a consensus
-AandA/PhysHons style, and renaming some confusingly named
-commands.</li>
-<li>Consequently, the AandA.clo and PhysHons.clo options have
-disappeared.</li>
-<li>The <code>\constantssheet</code> macro has appeared, and setting
-this is now the principal function of per-class <code>.clo</code>
-files.
-See the new <code>A1.clo</code> and modified <code>P2.clo</code> option files.</li>
-</ul>
-</dd>
-
-<dt>0.17.1, 2012 September 21</dt>
-<dd>Fix packaging infelicity</dd>
-
-<dt>0.17, 2012 September 21</dt>
-<dd><ul>
-<li>Rework <code>solutions</code> environment to make it a little more robust.</li>
-<li>Add <code>\MSc</code> degree shorthand.</li>
-<li>Bugfix: continuation headers now appear if a question starts on page 1.</li>
-<li>Bugfix: fix wrong syntax in draft+showsolutions mode -- now works again</li>
-</ul>
-</dd>
-
-<dt>0.16, 2012 July 26</dt>
-<dd><ul>
-<li>Renamed the [showmarks] option to more rational [perquestionmarks]
-(because the option doesn't control whether per-question marks are
-<em>displayed</em>, but whether they're tracked at all). Slightly
-improved the documentation of this at the same time.</li>
-<li>Added <code>\lambdabar</code> macro</li>
-<li>Fix long-standing problem with continuation lines -- these should now be robust.</li>
-</ul></dd>
-<dt>0.15, 2011 November 23</dt>
-<dd>Avoid conflict with <code>ifpdf</code> package.
-Now <em>depends</em> on <code>ifpdf</code>.</dd>
-<dt>0.14, 2010 August 6</dt>
-<dd><ul>
-<li>Fixed the problem where the question-continuation marks would be
-messed up by the presence of floats.</li>
-<li>Added P2.clo; adjust 'showing solutions' banner
-to avoid collision with other headers (thanks to Morag Casey for the .clo
-file and the report).</li>
-<li>Changed the name of the class to 'guexam', from potentially confusing 'exam'.
-Support guexam.config for forcing options (for example).</li>
-</ul></dd>
-
-<dt>0.13-1, 2008 November 21</dt>
-<dd>Make the gulogo style optional, so that question authors don't
-have to download and install that before they can draft a question.
-Also adjust the logo size.</dd>
-
-<dt>0.13, 2008 November 11</dt>
-<dd>Add university logo, and slightly rearrange the header.
-Add <code>{questiondata}</code> environment.</dd>
-
-<dt>0.12-2, 2008 April 14</dt>
-<dd>...keep on truckin'. Further changes to the
-<code>\partmarks*</code> spacing code, still largely unprincipled, but
-looking closer to what's required.</dd>
-
-<dt>0.12-1, 2008 April 3</dt>
-<dd>...and again. This time, I think I actually see what the problem
-was. Macro <code>\partmarks</code> now forces a new paragraph (it was
-documented to be usable at the end of a paragraph, so this is again
-forced, and the documentation made more explicit), this makes what I
-thought was the solution actually work. Which is nice. Redefined
-<code>enumerate</code> and <code>itemize</code> environments, to
-improve spacing somewhat.</dd>
-
-<dt>0.12, 2008 April 3</dt>
-<dd>Further adjustments to <code>\partmarks</code>: again, it should
-be more consistent without necessarily being more principled, alas.</dd>
-
-<dt>0.11, 2008 March 30</dt>
-<dd>Minor fixes: Adjust display of partmarks -- should now be more
-consistent; option [showsolutions] no longer defaults
-[{no,}pageperquestion]; add macro <code>\e</code> to format roman
-exponential.</dd>
-
-<dt>0.10, 2008 January 17</dt>
-<dd>Fix <code>\vec</code> when it appears in sub- or superscript
-position. Add <code>\paperident</code> command.</dd>
-
-<dt>0.9, 2007 December 10</dt>
-<dd>Various formatting changes. Added optional argument to
-<code>\includequestion</code> overriding question number.</dd>
-
-<dt>0.8, 2007 November 25</dt>
-<dd>You can now use <code>\usepackage</code> within
-<code>[compose]</code> mode.</dd>
-
-<dt>0.7, 2007 November 20</dt>
-<dd>Make changes to the display of the 'University of Glasgow' banner
-at the top: resolves some font problems. Other minor layout tweaks.</dd>
-
-<dt>0.6, 2007 November 18</dt>
-<dd>Fixed bold maths problems: <code>\vec</code> now works with greek
-letters, too. Support MTpro2 (mathtime maths fonts) with the new
-<code>[mtpro2]</code> class option. The <code>{solution}</code>
-environment can appear multiple times within a question. Question
-numbers now appear correctly in 'final' mode.</dd>
-
-<dt>0.5, 2007 October 30</dt>
-<dd>Fix collision with LaTeX internal: a <code>\comment</code> at the
-start of a <code>{question}</code> now works.</dd>
-
-</dl>
-
-</body>
-</html>
diff --git a/macros/latex/contrib/exam-n/sample/Makefile b/macros/latex/contrib/exam-n/sample/Makefile
index 253245e534..91223625a3 100644
--- a/macros/latex/contrib/exam-n/sample/Makefile
+++ b/macros/latex/contrib/exam-n/sample/Makefile
@@ -1,16 +1,31 @@
+LATEX=pdflatex
+
+QUESTIONS=cosmo1.tex \
+ cosmo2.tex \
+ cosmo3.tex \
+ dynamical1.tex \
+ dynamical2.tex \
+ dynamical3.tex \
+ excos1.tex \
+ numerical1.tex \
+ numerical2.tex \
+ numerical3.tex
+
%.pdf: %.tex ../exam-n.cls
- TEXINPUTS=..: pdflatex $<
- if grep 'Rerun to get cross' ${<:.tex=.log}; then TEXINPUTS=..: pdflatex $<; else :; fi
+ TEXINPUTS=..: $(LATEX) $<
+ if grep 'Rerun to get cross' ${<:.tex=.log}; then TEXINPUTS=..: $(LATEX) $<; else :; fi
all: sample_exam.pdf
-sample_exam.pdf: numerical1-solution.pdf
+sample_exam.pdf: numerical1-solution.pdf $(QUESTIONS)
-sample_exam_solution.pdf: sample_exam_solution.tex
+sample_exam_solution.pdf: sample_exam_solution.tex $(QUESTIONS)
sample_exam_solution.tex: sample_exam.tex
rm -f $@
- sed '1s/documentclass/documentclass[showsolutions]/' sample_exam.tex >sample_exam_solution.tex
+ sed -e '1s/documentclass\[/documentclass[showsolutions,/' \
+ -e '1s/documentclass{/documentclass[showsolutions]{/' \
+ sample_exam.tex >sample_exam_solution.tex
# This will depend somehow on the .dtx file in the parent directory,
# but expressing that here second-guesses how that file is actually
diff --git a/macros/latex/contrib/exam-n/sample/cosmo1.tex b/macros/latex/contrib/exam-n/sample/cosmo1.tex
index 27045d026a..a9e13b790b 100644
--- a/macros/latex/contrib/exam-n/sample/cosmo1.tex
+++ b/macros/latex/contrib/exam-n/sample/cosmo1.tex
@@ -21,21 +21,25 @@ included as a graphic. Fully zenned up? Then let us begin\dots.
\caption{\label{f:spiral}A spiral}
\end{figure}
-\part Show that, under the action of gravity alone, the scale size
-of the Universe varies according to
+\part Show that, under the action of \textsf{gravity} alone, the scale size
+of the Universe (which we should note is larger than \SI1m in
+diameter and more massive than \SI{10}{kg}) varies according to
\begin{equation}
\ddot{R}=-\frac{4\pi G \rho_0}{3R^2}
+\partmarks[demonstration]{4}
\end{equation}
-\partmarks*{4}
and that, consequently,
\begin{equation*}
\dot{R}^2=-\frac{8\pi G \rho_0}{3R}=-K.
-\partmarks*{3}
+\partmarks[another remarkably long remark]{3}
\end{equation*}
Express $K$ in terms of the present values of the Hubble constant
$H_0$ and of the density parameter $\Omega_0$.
-\partmarks{3}
+\partmarks[bookwork from a very long and boring book, which goes on
+ and on at really quite unreasonable length, line after line,
+ until the reader is adequately cudgelled into intellectual
+ submission]{3}
\begin{solution}
This can be solved by \emph{remembering} the solution
\partmarks{3}
@@ -74,8 +78,14 @@ Finis.
Hubble's law: $v=H_0 D$
\end{questiondata}
\partmarks{4}
+% Test uprightness of \pi
+All is geometry: $\mathrm e^{\mathrm{i}\pi} = -1^{x^x}, \forall x=1$, or $E=mc^2$.
+% and that \vec produces italic bold, in greek as well as roman
+That includes vectors: $\vec v=\Diffl*{\vec x}t + \vec\gamma$.
\begin{solution}
-Explanations are superfluous; all that is, is.
+ \tracingmacros=2 \tracingcommands=2
+Explanations are superfluous;\partmarks1 all that is, is.
+ \tracingmacros=0 \tracingcommands=0
\begin{table}
\begin{tabular}{r|l}
First rows&are premier\\
@@ -83,11 +93,20 @@ subsequent rows&are of secondary interest
\end{tabular}
\caption{\label{t:dullnessII}A table o'erbrimming with otioseness}
\end{table}
-In addition, Table~\ref{t:dullnessII} adds nothing to the discussion,
-adds nothing to our understanding of our place in the cosmos, but it
+In addition, Table~\ref{t:dullnessII} adds nothing to the discussion,\partmarks{1}
+and adds nothing to our understanding of our place in the cosmos, but it
\emph{does} contribute slightly to the heat-death of the universe (can
you work out how many deuterium nuclei decayed during the typing of
-this table?).
+this table?).\partmarks1
+
+All is geometry\partmarks1 (in here, too): $\mathrm e^{\mathrm{i}\pi} = -1^{x^x}, \forall x=1$,
+or $E=mc^2$, or
+\begin{align*}
+\mathrm e^{\mathrm{i}\pi} &= \cos\pi + i \sin\pi = -1^{x^x}\\
+E&= mc^2\qquad\text{inevitably}.
+\end{align*}
\end{solution}
\end{question}
\end{document}
+
+Here are some further ramblings & rantings. This text should be ignored.
diff --git a/macros/latex/contrib/exam-n/sample/cosmo2.tex b/macros/latex/contrib/exam-n/sample/cosmo2.tex
index bb6c512b9d..51253d590a 100644
--- a/macros/latex/contrib/exam-n/sample/cosmo2.tex
+++ b/macros/latex/contrib/exam-n/sample/cosmo2.tex
@@ -12,8 +12,8 @@ distance $r$, observed with radiation flux $\ge F$ is (neglecting
other selection and redshift effects)
\begin{equation*}
N(F)=4\pi\int_0^{(\frac{L}{4\pi F})^{1/2}} n(r) r^2\ddd r.
+\partmarks{5}
\end{equation*}
-\partmarks*{5}
Use this to show that for $n=n_1=$constant at $r<r_1$ and
$n=n_2=$constant at $r>r_1$,
@@ -42,19 +42,19 @@ Reduce these two expressions to the result for a completely
uniform density universe with $n_1=n_2=n_0$.
\partmarks{3}
-% An itemized list followed by partmarks*
+% An itemized list containing partmarks
Sketch how $n(F)$ would look in universes which are
\begin{itemize}
\item flat,
\item open,
\item and closed.
+\partmarks3
\end{itemize}
-\partmarks*{3}
\begin{solution}
A sufficiently heavy weight will reduce expressions to completely
uniform sheets of paper if it is placed on top of them.\partmarks3
-In a flat universe, $n(F)$ will look like n(F).\partmarks*3
+In a flat universe, $n(F)$ will look like n(F).\partmarks3
\end{solution}
\end{question}
\end{document}
diff --git a/macros/latex/contrib/exam-n/sample/cosmo3.tex b/macros/latex/contrib/exam-n/sample/cosmo3.tex
index b7b74c0107..aa3f78868a 100644
--- a/macros/latex/contrib/exam-n/sample/cosmo3.tex
+++ b/macros/latex/contrib/exam-n/sample/cosmo3.tex
@@ -32,7 +32,7 @@ equivalent to an empty, flat, Universe with a non-zero $\Lambda$.
of state with $w = 0$ for $0 < t < t_0$, but which changes to
$W=0$ for $t\ge t_0$ without any discontinuity in $H(t)$.
Regarding this second stage as driven by a non-zero $\Lambda$ what
-is the value of $\Lambda$ if $t_0 = 10^{24}$\units{\mu s}? Define the
+is the value of $\Lambda$ if $t_0 = \SI{1e24}{\mu s}$? Define the
dimensionless deceleration parameter, $q$, and find its value
before and after $t_0$.
\shout{Shout it loud: I'm a geek and I'm proud}
@@ -40,7 +40,7 @@ before and after $t_0$.
Note: that's
\[
-t_0=10^{24}\units{\mu s}\qquad\text{with a letter mu: $\mu$}.
+t_0=\SI{1e24}{\mu s}\qquad\text{with a letter mu: $\mu$}.
\]
\part To what extent does this idealized model resemble the currently
diff --git a/macros/latex/contrib/exam-n/sample/dynamical1.tex b/macros/latex/contrib/exam-n/sample/dynamical1.tex
index e3a51a803b..c371e9f900 100644
--- a/macros/latex/contrib/exam-n/sample/dynamical1.tex
+++ b/macros/latex/contrib/exam-n/sample/dynamical1.tex
@@ -23,20 +23,20 @@ $a(t)$ is the semimajor axis at time $t$)
\begin{equation*}
\frac{a(t)}{a_0}=\left[1-\frac{t\Delta V}{2^{1/2}\pi
a_0(1-e_0)^{1/2}}\right]^2
+\partmarks{2}
\end{equation*}
-\partmarks*{2}
and
\begin{equation*}
\frac{T(t)}{T_0}=\left[1-\frac{t\Delta V}{2^{1/2}\pi
a_0(1-e_0)^{1/2}}\right]^3
+\partmarks{1}
\end{equation*}
-\partmarks*{1}
and the eccentricity satisfies (with $e_0=e(0)$)
\begin{equation*}
e(t)=1-\frac{1-e_0}{\left[1-\frac{t\Delta V}{2^{1/2}\pi
a_0(1-e_0)^{1/2}}\right]^2}.
+\partmarks{2}
\end{equation*}
-\partmarks*{2}
Show that, once the orbit is circular, its radius decays
exponentially with time on timescale $m_0/2\dot{m}$ where $m_0$
@@ -62,8 +62,8 @@ passage distances for the system, show that this leads to a natural
time $T$ for the system, where
\begin{equation*}
T\propto\frac{\bar{u}u^2}{m^2\nu\log N}.
+\partmarks{5}
\end{equation*}
-\partmarks*{5}
\begin{questiondata}
You may assume that the sphere of influence radius of a star is
diff --git a/macros/latex/contrib/exam-n/sample/sample_exam.tex b/macros/latex/contrib/exam-n/sample/sample_exam.tex
index 98031e6091..4ae4e18f0a 100644
--- a/macros/latex/contrib/exam-n/sample/sample_exam.tex
+++ b/macros/latex/contrib/exam-n/sample/sample_exam.tex
@@ -1,19 +1,39 @@
-\documentclass{exam-n}
+% A suitable documentclass line is the following.
+% Change this to [final] for the final version.
+% This option enables showing solutions, showing comments, and a few
+% other adjustments which seem useful at draft time. The [final]
+% option turns all of these off.
+\documentclass[stix2,uprightpi]{exam-n}
+
+% Include a local .clo file like this:
+%\documentclass[myclass]{exam-n}
+%
+% Choose different font sets:
+%\documentclass[stix2]{exam-n}
+%\documentclass[mtpro2]{exam-n}
+%\documentclass[mtpro2,sansserif]{exam-n}
+%
+% There are some alternatives for those who need special versions
+% with large fonts:
%\documentclass[largefont]{exam-n}
%\documentclass[hugefont,sansserif]{exam-n}
-%\documentclass[mtpro2,showsolutions]{exam-n}
-%\documentclass[mtpro2,showsolutions,sansserif]{exam-n}
-%\documentclass[draft,showsolutions,sansserif]{exam-n}
-
-% Note: this sample question dates from an earlier phase, in which
-% `paper n' would contain a bundle of questions from various courses.
-% That's why the \coursetitle doesn't match the broad range of
-% subjects being 'examined'.
%
-% Several of the questions are gibberish.
+% It wouldn't make sense for this file, but the files being included
+% using \includequestion should start with:
+%\documentclass[compose]{exam-n}
%
-% This collection of questions has in part turned into an informal
-% regression test for the class file.
+% For discussion of these various class options, and more, see the
+% guexam.pdf documentation.
+%
+% Note:
+%
+% * Several of the questions are gibberish.
+% * This collection of questions has in part turned into an
+% informal regression test for the class file. Thus they
+% shouldn't necessarily be regarded as canonically best practice.
+
+% Include a default category for \partmarks
+%\defaultpartmarkscategory{category?}
\examdate{Wednesday, 23 May 2007}
\examtime{9:30 -- 10:45 (1 course)\\9:30 -- 12:00 (2 courses)}
@@ -25,7 +45,7 @@
Astrophysics 3\\Theoretical Physics 3M\\Joint Physics 3}
\schoolcoursecode{P304D and P304H}
\universitycoursecode{PHYS3031 and PHYS4025}
-\coursetitle{Quantum Mechanics}
+\coursetitle{Quantum Mechanics (and other bits of physics)}
\usepackage{pdfpages}
diff --git a/macros/latex/contrib/exam-n/sample/sample_mcq.tex b/macros/latex/contrib/exam-n/sample/sample_exam_mcq.tex
index 268417ff7d..268417ff7d 100644
--- a/macros/latex/contrib/exam-n/sample/sample_mcq.tex
+++ b/macros/latex/contrib/exam-n/sample/sample_exam_mcq.tex
diff --git a/macros/latex/contrib/exam-n/sample/sample_exam_solution.tex b/macros/latex/contrib/exam-n/sample/sample_exam_solution.tex
deleted file mode 100644
index 853bccbce9..0000000000
--- a/macros/latex/contrib/exam-n/sample/sample_exam_solution.tex
+++ /dev/null
@@ -1,65 +0,0 @@
-\documentclass[showsolutions]{exam-n}
-%\documentclass[largefont]{exam-n}
-%\documentclass[hugefont,sansserif]{exam-n}
-%\documentclass[mtpro2,showsolutions]{exam-n}
-%\documentclass[mtpro2,showsolutions,sansserif]{exam-n}
-%\documentclass[draft,showsolutions,sansserif]{exam-n}
-
-% Note: this sample question dates from an earlier phase, in which
-% `paper n' would contain a bundle of questions from various courses.
-% That's why the \coursetitle doesn't match the broad range of
-% subjects being 'examined'.
-%
-% Several of the questions are gibberish.
-%
-% This collection of questions has in part turned into an informal
-% regression test for the class file.
-
-\examdate{Wednesday, 23 May 2007}
-\examtime{9:30 -- 10:45 (1 course)\\9:30 -- 12:00 (2 courses)}
-
-\exambanner{Examination for the degrees of \BSc\,
- \MSci\ and \MA\ on the honours standard }
-
-\degreedescriptions{Physics 3\\Chemical Physics 3\\Physics with
- Astrophysics 3\\Theoretical Physics 3M\\Joint Physics 3}
-\schoolcoursecode{P304D and P304H}
-\universitycoursecode{PHYS3031 and PHYS4025}
-\coursetitle{Quantum Mechanics}
-
-\usepackage{pdfpages}
-
-\rubric{Candidates should answer Questions 1 and 2 (10~marks each),
- \linebreak\textbf{and either} Question 3 \textbf{or} Question 4 (30~marks).
- \linebreak The content of this sample exam derives from real
- questions, but the result is in many cases test gibberish.}
-%\norubric
-
-\numquestions{13}
-
-\usepackage{graphicx} % for graphic in dynamical1
-
-\begin{document}
-\maketitle
-
-\section{I}
-\includequestion{cosmo1}
-\includequestion{numerical1}
-\includequestion{dynamical1}
-
-\section{II}
-\includequestion{cosmo2}
-\subsection{Cosmology question number 3}
-\includequestion{cosmo3}
-\includequestion{excos1} % four multiple-choice questions
-
-\section{III}
-% Override the question number, to test/demo this
-\includequestion[99]{numerical2}
-\includequestion{numerical3}
-
-\section{IV}
-\includequestion{dynamical2}
-\includequestion{dynamical3}
-
-\end{document}
diff --git a/macros/latex/contrib/exam-n/sample_exam.pdf b/macros/latex/contrib/exam-n/sample_exam.pdf
deleted file mode 100644
index db389f7e34..0000000000
--- a/macros/latex/contrib/exam-n/sample_exam.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/exam-n/sample_exam_solution.pdf b/macros/latex/contrib/exam-n/sample_exam_solution.pdf
deleted file mode 100644
index 994205d6e9..0000000000
--- a/macros/latex/contrib/exam-n/sample_exam_solution.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/exam-n/style.css b/macros/latex/contrib/exam-n/style.css
deleted file mode 100644
index c7be40749a..0000000000
--- a/macros/latex/contrib/exam-n/style.css
+++ /dev/null
@@ -1,230 +0,0 @@
-body {
- color: #333;
- background: white;
- margin-left: +30%;
- width: 50%; /* body is 50% of screen width */
- margin-right: auto; /* ie, 20% */
- padding: 0.5em; /* this will make a difference if I decide to
- have the background a different colour */
- /* I can't decide on font: Optima's always nice, but Gill looks
- agreeably intense. Helvetica's a decent fallback. */
- font-family: "Helvetica Neue", Helvetica, "Gill Sans", gill, sans-serif;
- /* font-family: Optima, "Gill Sans", gill, Helvetica, sans-serif; */
- /* font-family: "Gill Sans", gill, Helvetica, sans-serif; */
- /* I seem to have used 11pt at some point in the past, but this
- is far too big -- did I ever have a reason for that, or is it
- just due to browser changes? */
- font-size: 10pt;
- line-height: 150%;
-}
-
-div.topsidebar {
- float: right;
- width: 50%; /* ...of the body width (ie, 50% x 50% of screen) */
- font-size: smaller;
- margin-left: 1em;
- padding-left: 1em;
- border-left: solid thin #AAA;
-}
-
-/* On wider screens, move the sidebar out to the right hand side */
-/* This uses CSS3 media queries: http://www.w3.org/TR/css3-mediaqueries/ */
-@media screen and (min-width: 700pt) and (max-width: 850pt) {
- body {
- margin-left: 210pt;
- width: 350pt; /* 50% of 700pt */
- margin-right: auto;
- }
- div.topsidebar {
- position: absolute;
- /* I feel this size should be 595pt (350 + 210 + 0.05*700),
- but that's clearly not right -- I don't think I understand what the -5%
- in the h1 spec below is actually 5% of! */
- left: 570pt;
- width: auto;
- margin-left: 0pt;
- padding-left: 0pt;
- border: none;
- }
-}
-/* On still-wider screens, expand the left-margin, keeping the sidebar attached to the right-hand edge.
- When the screen is 850pt wide (expanding from the @media case above),
- the left margin will be 210pt, the width 350pt, and the right margin therefore 290pt.*/
-@media screen and (min-width: 850pt) {
- body {
- margin-right: 290pt; /* 290 = 850-(210+350) */
- width: 350pt;
- margin-left: auto; /* ...takes up the slack */
- }
- div.topsidebar {
- position: absolute;
- width: 290pt; /* same 290pt as above */
- left: auto;
- right: 0%;
- padding-left: 0pt;
- border: none;
- }
-}
-
-
-code, pre {
- font-family: Monaco, fixed;
- font-size: 9pt;
-}
-
-a { text-decoration: none; }
-a:link { color: #66C; }
-a:visited { color: #669; }
-a[href]:hover { background: #EEE; }
-
-div.abstract {
- font-style: oblique;
- text-align: left;
-}
-div.abstract em { font-style: normal; }
-div.abstract code {
- font-style: normal;
- font-size: 80%;
-}
-
-/* a span/div style for attracting attention */
-.attention {
- color: #822;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #822;
- font-weight: 100; /* few fonts have ultra-light weights */
- line-height: 100%; /* no need to spread out titles */
-}
-h1 {
- margin-left: -40%;
- margin-right: -5%;
- padding: 0.5em;
- border: solid thin #666;
- text-align: right;
-}
-h2 {
- margin-left: -40%;
- margin-right: -5%;
- padding: 0.2em;
- border-top: solid thin #666;
- clear: both;
-}
-
-h2.appendices {
- margin-top: 10ex;
- border-top: double medium #666;
-}
-h3 {
- margin-left: -30%;
- float: left;
- width: 25%;
- display: block;
- text-align: right;
- vertical-align: bottom;
- padding-top: 0pt;
- padding-right: 0.5em;
- margin-top: 0pt;
- line-height: 100%;
-}
-
-/*
-h4 {
- color: #C66;
-}
-*/
-
-pre, table { background: #dde; }
-
-pre {
- padding: 1em;
- line-height: 130%;
-}
-
-table {
- font-size: smaller;
-}
-td {
- padding: 0.5ex;
-}
-
-Q:before { content: "“"; }
-Q:after { content: "”"; }
-
-img.smallimage {
- float: right;
- margin: 24pt;
- margin-right: -30%;
-}
-
-div.signature {
- margin-left: -40%;
- margin-right: -5%;
- margin-top: 4ex;
- text-align: right;
- border: solid thin #666;
- padding: 0.3em;
- clear: both;
-}
-
-/* ============================================================
- * Some other curiosities of my one-time formatting for web pages
- */
-.doc-history {
- font-size: xx-small;
- background: #eee;
- line-height: 100%;
-}
-
-div.subtoc, div.subsubtoc { display: none; }
-
-/* ============================================================
- * Special formatting for ToC
- */
-
-/*
- If there's significant amount of text in front of the first subsection,
- then the following are good to put in the per-document stylesheet:
- width: 25%;
- float: right;
-*/
-div#toc {
- color: #888;
- padding: 0;
- font-size: smaller;
- text-align: right;
-}
-div#toc a:link { color: #888; }
-div#toc > ul {
- padding: 0pt;
- margin: 0pt;
- list-style: none;
-}
-div#toc li {
- padding: 0pt;
- display: inline-block;
-}
-div#toc li:before {
- content: "§ ";
- margin-left: 1em;
-}
-/* the following elements aren't currently generated by structure.lx */
-div#toc li ul {
- padding-left: 1em;
- margin-left: 0;
- font-style: italic;
- display: inline;
-}
-div#toc li ul:before {
- content: "( ";
-}
-div#toc li ul:after {
- content: " ) ";
-}
-div#toc li li {
- padding-left: 0pt;
-}
-div#toc li li:after {
- content: "; ";
-}
diff --git a/macros/latex/contrib/exam-n/template-master.pdf b/macros/latex/contrib/exam-n/template-master.pdf
new file mode 100644
index 0000000000..30f7de8e5b
--- /dev/null
+++ b/macros/latex/contrib/exam-n/template-master.pdf
Binary files differ
diff --git a/macros/latex/contrib/exam-n/template-master.tex b/macros/latex/contrib/exam-n/template-master.tex
new file mode 100644
index 0000000000..9ac66cc13a
--- /dev/null
+++ b/macros/latex/contrib/exam-n/template-master.tex
@@ -0,0 +1,20 @@
+\documentclass[siunitx]{exam-n}
+
+\exambanner{Examination for the degree of Master of Examinations}
+\universitycoursecode{EX-666}
+\schoolcoursecode{Exams001}
+\coursetitle{Advanced setting of exams}
+\degreedescriptions{Examinations 3}
+
+\examdate{2012 December 25}
+\examtime{12:00 -- 23:00}
+\rubric{Be creative, but not vindictive}
+
+\numquestions{1}
+
+\begin{document}
+\maketitle
+
+\includequestion{template-question}
+
+\end{document}
diff --git a/macros/latex/contrib/exam-n/template-question.pdf b/macros/latex/contrib/exam-n/template-question.pdf
new file mode 100644
index 0000000000..a0fad417f9
--- /dev/null
+++ b/macros/latex/contrib/exam-n/template-question.pdf
Binary files differ
diff --git a/macros/latex/contrib/exam-n/template-question.tex b/macros/latex/contrib/exam-n/template-question.tex
new file mode 100644
index 0000000000..6337f5970c
--- /dev/null
+++ b/macros/latex/contrib/exam-n/template-question.tex
@@ -0,0 +1,22 @@
+\documentclass[compose,siunitx]{exam-n}
+\begin{document}
+\begin{question}{20} \author{Frieda Bloggs}
+\shout{Dummy question}
+\part Show that, under the action of gravity alone, the scale size
+of the Universe varies according to
+\[
+\ddot{R}=-\frac{4\pi G \rho_0}{3R^2}.
+\]
+Is $\ddot{R}=\Diffl*[2]{R}{t} > \SI{10}{\astronomicalunit. s^{-2}}$?
+\partmarks*{4}
+\begin{solution}
+This can be solved by remembering the answer.
+\end{solution}
+
+\part Explain the nature of being.
+\partmarks{16}
+\begin{solution}
+Om.
+\end{solution}
+\end{question}
+\end{document}
diff --git a/macros/latex/contrib/iexec/iexec.dtx b/macros/latex/contrib/iexec/iexec.dtx
index 2478ac224a..28c2a62136 100644
--- a/macros/latex/contrib/iexec/iexec.dtx
+++ b/macros/latex/contrib/iexec/iexec.dtx
@@ -50,7 +50,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{iexec}
%<*package>
-[09.10.20220 0.7.0 Inputable Shell Executions]
+[2022-10-10 0.8.1 Inputable Shell Executions]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -210,7 +210,23 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
\usepackage{iexec}
\begin{document}
\iexec[log]{echo 'Hello, \\LaTeX!'}
-\input{foo.txt}
+\end{document}
+\end{verbatim}
+%\iffalse
+%</verb>
+%\fi
+% \end{macro}
+
+% \begin{macro}{null}
+% The stdout of the command will be sent to |/dev/null|:
+%\iffalse
+%<*verb>
+%\fi
+\begin{verbatim}
+\documentclass{article}
+\usepackage{iexec}
+\begin{document}
+\iexec[null]{rm some-file.txt}
\end{document}
\end{verbatim}
%\iffalse
@@ -226,6 +242,8 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
% \changes{v0.4.0}{2021/08/01}{Runtime verification for --shell-escape option}
% \changes{v0.4.1}{2021/08/08}{Options trace, stdout, and quiet added}
% \changes{v0.5.0}{2022/01/08}{Major bug fixes}
+% \changes{v0.6.0}{2022/10/09}{Additional options 'log' and 'append'}
+% \changes{v0.7.0}{2022/10/10}{Additional option 'null'}
% First, we include a few packages:
% \begin{macrocode}
@@ -248,6 +266,7 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
trace/.estore in = \iexec@traceit,
append/.estore in = \iexec@append,
log/.estore in = \iexec@log,
+ null/.estore in = \iexec@null,
quiet/.estore in = \iexec@quiet,
stdout
}\makeatother
@@ -300,23 +319,25 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
% \end{macrocode}
% Then, we execute it:
% \begin{macrocode}
- \ShellEscape{#2 \ifdefined\iexec@append>\fi> \iexec@stdout}%
+ \ShellEscape{#2 \ifdefined\iexec@append>\fi>\ifdefined\iexec@null/dev/null\else\iexec@stdout\fi}%
% \end{macrocode}
% Then, a message is printed to TeX log:
% \begin{macrocode}
- \message{^^Jiexec: [#2 > \iexec@stdout]^^J}%
+ \message{^^Jiexec: [#2 \ifdefined\iexec@append>\fi>\ifdefined\iexec@null/dev/null\else\iexec@stdout\fi]^^J}%
\endgroup%
% \end{macrocode}
% Then, if required, the content of the stdout file will be printed to the log:
% \begin{macrocode}
+ \ifdefined\iexec@null\else
\ifdefined\iexec@log
\message{^^Jiexec: this is the content of \iexec@stdout:^^J}%
\iexec@typeout{\iexec@stdout}
\message{^^J<EOF>^^J}%
- \fi%
+ \fi\fi%
% \end{macrocode}
% Then, include the produced output into the current document:
% \begin{macrocode}
+ \ifdefined\iexec@null\else
\ifdefined\iexec@quiet
\message{^^Jiexec: Due to 'quiet' option we didn't read
the content of '\iexec@stdout' (\pdffilesize{} bytes)^^J}%
@@ -326,10 +347,11 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
\input{\iexec@stdout}%
\message{^^Jiexec: The content of '\iexec@stdout'
was included into the document^^J}%
- \fi%
+ \fi\fi%
% \end{macrocode}
% Finally, delete the file or leave it untouched:
% \begin{macrocode}
+ \ifdefined\iexec@null\else
\ifiexec@trace%
\message{^^Jiexec: Due to package option 'trace',
the file '\iexec@stdout' was not deleted^^J}%
@@ -341,7 +363,7 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
\ShellEscape{rm \iexec@stdout}%
\message{^^Jiexec: The file '\iexec@stdout' was deleted^^J}%
\fi%
- \fi%
+ \fi\fi%
\endgroup
}\makeatother
% \end{macrocode}
diff --git a/macros/latex/contrib/iexec/iexec.pdf b/macros/latex/contrib/iexec/iexec.pdf
index 6030b3fa7a..58c79fa6a3 100644
--- a/macros/latex/contrib/iexec/iexec.pdf
+++ b/macros/latex/contrib/iexec/iexec.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfpages/pdfpages.dtx b/macros/latex/contrib/pdfpages/pdfpages.dtx
index 1342d7ba42..7496cc82d0 100644
--- a/macros/latex/contrib/pdfpages/pdfpages.dtx
+++ b/macros/latex/contrib/pdfpages/pdfpages.dtx
@@ -27,12 +27,12 @@
%<*dtx>
\makeatletter
%</dtx>
-\def\AM@fileversion{v0.5v}
+\def\AM@fileversion{v0.5w}
\def\AM@Git@Date@process$#1: #2 #3${\AM@Git@Date@process@i#2\END}
\def\AM@Git@Date@process@i#1-#2-#3\END{\def\AM@Git@Date{#1/#2/#3}}
\def\AM@Git@SHA@process$#1: #2${\def\AM@Git@SHA{#2}}
-\AM@Git@Date@process$Date: 2022-05-22 20:11:16 +0200 $
-\AM@Git@SHA@process$SHA-1: 059ee4174cc52b0e6a4c834c1a9719bcf5a453b0 $
+\AM@Git@Date@process$Date: 2022-10-09 23:29:26 +0200 $
+\AM@Git@SHA@process$SHA-1: b912335fcefa15a5e7de97ef3732a2dcb82fe755 $
%</!(example1,example2,example3,installer)>
%
%
@@ -3208,11 +3208,11 @@
\def\AM@pagestemp{#1}}
\define@key{pdfpages}{pages}{\AM@CheckValue{pages}{#1}%
\edef\AM@pagestemp{#1}}
-\define@key{pdfpages}{nup}{\AM@parse@nup#1x\END}
-\define@key{pdfpages}{deltax}{\AM@parse@deltax#1 \\}
-\define@key{pdfpages}{deltay}{\AM@parse@deltay#1 \\}
-\define@key{pdfpages}{delta}{\AM@parse@delta#1 \\}
-\define@key{pdfpages}{offset}{\AM@parse@offset#1 \\}
+\define@key{pdfpages}{nup}{\expandafter\AM@parse@nup\expanded{#1}x\END}
+\define@key{pdfpages}{deltax}{\expandafter\AM@parse@deltax\expanded{#1} \\}
+\define@key{pdfpages}{deltay}{\expandafter\AM@parse@deltay\expanded{#1} \\}
+\define@key{pdfpages}{delta}{\expandafter\AM@parse@delta\expanded{#1} \\}
+\define@key{pdfpages}{offset}{\expandafter\AM@parse@offset\expanded{#1} \\}
\define@key{pdfpages}{frame}[true]{\setboolean{AM@frame}{#1}}
\define@key{pdfpages}{openright}[true]{\setboolean{AM@openright}{#1}}
\define@key{pdfpages}{openrighteach}[true]{\setboolean{AM@openrighteach}{#1}}
@@ -3225,13 +3225,12 @@
\define@key{pdfpages}{noautoscale}[true]%
{\setboolean{AM@noautoscale}{#1}}
\define@key{pdfpages}{thread}[true]{\setboolean{AM@thread}{#1}}
-\define@key{pdfpages}{threadname}{\def\AM@threadname{#1}}
+\define@key{pdfpages}{threadname}{\edef\AM@threadname{#1}}
\define@key{pdfpages}{link}[true]{\setboolean{AM@link}{#1}}
-%\define@key{pdfpages}{linkfit}{\def\AM@linkfit{#1}}
-\define@key{pdfpages}{linkfit}{\AM@convert@dest{#1}}
-\define@key{pdfpages}{linkname}{\def\AM@linkname@option{#1}}
+\define@key{pdfpages}{linkfit}{\expandafter\AM@convert@dest\expanded{{#1}}}
+\define@key{pdfpages}{linkname}{\edef\AM@linkname@option{#1}}
\define@key{pdfpages}{linktodoc}[true]{\setboolean{AM@linktodoc}{#1}}
-\define@key{pdfpages}{linktodocfit}{\def\AM@linktodocfit{#1}}
+\define@key{pdfpages}{linktodocfit}{\edef\AM@linktodocfit{#1}}
\define@key{pdfpages}{linkfilename}{\pdfstringdef\AM@linkfilename{#1}%
\AM@linkfilenametrue}
\define@key{pdfpages}{survey}[true]{%
@@ -3241,10 +3240,10 @@
\ifAM@pkg@survey\setboolean{AM@surveynolink}{#1}%
\setboolean{AM@survey}{#1}
\else\AM@outputfalse\fi}
-\define@key{pdfpages}{xr-prefix}{\def\AM@xrprefix{#1}}
+\define@key{pdfpages}{xr-prefix}{\edef\AM@xrprefix{#1}}
\define@key{pdfpages}{fitpaper}[true]{\setboolean{AM@fitpaper}{#1}}
-\define@key{pdfpages}{addtotoc}{\def\AM@toclist{#1,}}
-\define@key{pdfpages}{addtolist}{\def\AM@loflist{#1,}}
+\define@key{pdfpages}{addtotoc}{\edef\AM@toclist{#1,}}
+\define@key{pdfpages}{addtolist}{\edef\AM@loflist{#1,}}
\define@key{pdfpages}{doublepages}[true]%
{\setboolean{AM@doublepages}{#1}}
\define@key{pdfpages}{doublepagestwist}[true]%
@@ -3266,16 +3265,16 @@
\AM@doublepagestmpfalse\AM@doublepagestmpitrue
\AM@doublepagestwistxtrue}
\define@key{pdfpages}{duplicatepages}[2]%
- {\def\AM@nduplicatepages{#1}%
+ {\edef\AM@nduplicatepages{#1}%
\AM@duplicatepagestrue}
-\define@key{pdfpages}{signature}{\def\AM@signature{#1}}
-\define@key{pdfpages}{signature*}{\def\AM@signature{#1}%
+\define@key{pdfpages}{signature}{\edef\AM@signature{#1}}
+\define@key{pdfpages}{signature*}{\edef\AM@signature{#1}%
\AM@signaturestartrue}
\define@key{pdfpages}{booklet}[true]{\setboolean{AM@booklet}{#1}%
\def\AM@signature{x}}
\define@key{pdfpages}{pagetemplate}{\AM@CheckValue{pagetemplate}{#1}%
\def\AM@pagetemplate{#1}}
-\define@key{pdfpages}{templatesize}{\AM@parse@templatesize#1\END}
+\define@key{pdfpages}{templatesize}{\expandafter\AM@parse@templatesize\expanded{#1}\END}
\define@key{pdfpages}{rotateoversize}[true]%
{\setboolean{AM@rotateoversize}{#1}}
\define@key{pdfpages}{picturecommand}{\def\AM@picturecommand{#1}}
@@ -3283,7 +3282,7 @@
\define@key{pdfpages}{newwindow}[true]{\setboolean{AM@newwindow}{#1}}
\define@key{pdfpages}{reflect*}[true]{\setboolean{AM@reflect}{#1}}
\define@key{pdfpages}{reflect}[true]{\setboolean{AM@reflectall}{#1}}
-\define@key{pdfpages}{lastpage}{\def\AM@pagecount{#1}}
+\define@key{pdfpages}{lastpage}{\edef\AM@pagecount{#1}}
% \end{macrocode}
% \macro{\AM@parse@nup}
% Parsing \texttt{nup} item.
@@ -4859,13 +4858,18 @@
% \subsection*{2022/01/29 v0.5u}
% \begin{itemize}
% \item Adding |\leavevmode| before |\@chapter|,... in |addtotoc|.
-% Bug fix for \url{https://tex.stackexchange.com/questions/631514/}.
+% Bug fix for \url{https://tex.stackexchange.com/questions/631514/}.
% \end{itemize}
%
% \subsection*{2022/05/21 v0.5v}
% \begin{itemize}
% \item Do not enter an infinite loop if the PDF file doesn't exist.
-% Bug fix for \url{https://tex.stackexchange.com/questions/644971/}.
+% Bug fix for \url{https://tex.stackexchange.com/questions/644971/}.
+% \end{itemize}
+%
+% \subsection*{2022/10/09 v0.5w}
+% \begin{itemize}
+% \item Keyval arguments get fully expanded.
% \end{itemize}
% \Finale
%
diff --git a/macros/latex/contrib/pdfpages/pdfpages.pdf b/macros/latex/contrib/pdfpages/pdfpages.pdf
index 15703669ad..918fc0a62f 100644
--- a/macros/latex/contrib/pdfpages/pdfpages.pdf
+++ b/macros/latex/contrib/pdfpages/pdfpages.pdf
Binary files differ
diff --git a/macros/latex/contrib/standalone/DEPENDS.txt b/macros/latex/contrib/standalone/DEPENDS.txt
new file mode 100644
index 0000000000..6f17f86d9b
--- /dev/null
+++ b/macros/latex/contrib/standalone/DEPENDS.txt
@@ -0,0 +1,10 @@
+hard xkeyval
+hard currfile
+hard adjustbox
+hard gincltex
+hard filemod
+soft varwidth
+soft shellesc
+soft ifluatex
+soft ifpdf
+soft ifxetex \ No newline at end of file
diff --git a/macros/latex/contrib/standalone/README b/macros/latex/contrib/standalone/README
index 577a44994c..04e021db29 100644
--- a/macros/latex/contrib/standalone/README
+++ b/macros/latex/contrib/standalone/README
@@ -1,11 +1,12 @@
LaTeX class and package 'standalone'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Copyright (c) 2010-2018 by Martin Scharrer <martin@scharrer-online.de>
-Repository: http://bitbucket.org/martin_scharrer/standalone
+Copyright (c) 2010-2022 by Martin Scharrer <martin.scharrer@web.de>
+Repository: https://github.com/MartinScharrer/standalone
+Issues: https://github.com/MartinScharrer/standalone/issues
-Allows TeX pictures or other TeX code in sub-files to be compiled standalone
+Allows TeX diagrams or other TeX code in sub-files to be compiled standalone
or as part of a main document.
-Provides support for pictures with beamer overlays.
+Provides support for diagrams with beamer overlays.
Since v0.3 the package provides options to automatically or manually include
all sub-files preambles in the main document preamble.
diff --git a/macros/latex/contrib/standalone/standalone.dtx b/macros/latex/contrib/standalone/standalone.dtx
index e2b20a99e8..322797c310 100644
--- a/macros/latex/contrib/standalone/standalone.dtx
+++ b/macros/latex/contrib/standalone/standalone.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%<=*COPYRIGHT>
-%% Copyright (C) 2011-2017 by Martin Scharrer <martin@scharrer-online.de>
+%% Copyright (C) 2010-2022 by Martin Scharrer <martin.scharrer@web.de>
%% ---------------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -26,10 +26,10 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{standalone.dtx}[%
%<=*DATE>
- 2018/03/26
+ 2022/10/10
%<=/DATE>
%<=*VERSION>
- v1.3a
+ v1.3b
%<=/VERSION>
DTX file of the standalone bundle]
\documentclass[a4paper,11pt]{ydoc}
@@ -61,7 +61,7 @@
%</driver>
% \fi
%
-% \CheckSum{3781}
+% \CheckSum{3934}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -94,6 +94,7 @@
% Added loading of LuaTeX compatibility packages.
% Changed filemodedate code to support LuaTeX.
% Fixes for option combination multi,convert.}
+% \changes{v1.3b}{2022/10/10}{Fixed incorrect/unwanted messages for conversion feature. Updated project URLs in documentation. Added dependency list file.}
%
% \GetFileInfo{\jobname.dtx}
%
@@ -113,15 +114,15 @@
%
% \ifpdf
% \hypersetup{%
-% pdfauthor = {Martin Scharrer <martin@scharrer-online.de>},
+% pdfauthor = {Martin Scharrer <martin.scharrer@web.de>},
% pdftitle = {The standalone class and package},
% pdfsubject = {Documentation of LaTeX class and package 'standalone'},
% pdfkeywords = {standalone, LaTeX, TeX}
% }%
% \fi
% \author{Martin Scharrer}
-% \email{martin@scharrer-online.de}
-% \repository{https://bitbucket.org/martin_scharrer/standalone}
+% \email{martin.scharrer@web.de}
+% \repository{https://github.com/MartinScharrer/standalone}
% \maketitle
%
%
@@ -142,8 +143,8 @@
% This bundle is released on the comprehensive \TeX\ archive network (CTAN) under \url{https://ctan.org/pkg/standalone}.
% Any modern \LaTeX\ distribution should pick it from there automatically, though. CTAN now allows votes and comments on packages and such feedback is very welcome.
%
-% The source code of this bundle is hosted on Bitbucket as Mercurial repository under \url{https://bitbucket.org/martin_scharrer/standalone/}.
-% The ticket system there should be used to report bugs or request new features: \url{https://bitbucket.org/martin_scharrer/standalone/issues/new}.
+% The source code of this bundle is hosted on Github under \url{https://github.com/MartinScharrer/standalone}.
+% The ticket system there should be used to report bugs or request new features: \url{https://github.com/MartinScharrer/standalone/issues}.
%
% User which need help with should search for an existing solution on the site TeX.Stackexchange.com: \url{https://tex.stackexchange.com/questions/tagged/standalone}
% or post a new question: \url{https://tex.stackexchange.com/questions/ask?tags=standalone}.
@@ -156,8 +157,7 @@
%
% \subsection{Installation with TeX Live}
% Using a normal TeX Live the bundle is easily installed using the package manager \texttt{tlmgr}.
-% The command \texttt{tlmgr install \csname @package\endcsname} will install it and \texttt{tlmgr update \csname
-% @package\endcsname} can be used to update it.
+% The command \texttt{tlmgr install standalone} will install it and \texttt{tlmgr update standalone} can be used to update it.
%
% Because the Ubuntu/Debian version of TeX Live may not include \texttt{tlmgr} a manual install of the package is
% required. The author recommends to manually install the vanilla version of TeX Live instead which will include
@@ -175,7 +175,8 @@
%
% \subsubsection{Installation from TDS ZIP file}
% The TDS (\TeX\ Directory Structur) ZIP file includes all package files in the final form and relative location.
-% It can be downloaded from CTAN: \Eurl{http://mirrors.ctan.org/install/macros/latex/contrib/\csname @package\endcsname.tds.zip} and from the Bitbucket project site \Eurl{https://bitbucket.org/martin_scharrer/standalone/downloads/\csname @package\endcsname.tds.zip}.
+% It can be downloaded from CTAN: \url{http://mirrors.ctan.org/install/macros/latex/contrib/standalone.tds.zip} and
+% from the Github project site \url{https://github.com/MartinScharrer/standalone/releases/}.
% It needs only to be unzipped in a TEXMF directory. Under Linux/Unix this is usually the user TEXMF directory
% \path{~/texmf}.
% Under Windows it is usually \path{C:\Users\<user name>\texmf} (Windows Vista/7) or \path{C:\Documents and
@@ -191,7 +192,7 @@
%
% \subsubsection{Installation from DTX File}
% The package is also provided as DTX (Documented TeX file) which is accompanied by an INS (Install) file
-% under \Eurl{http://www.ctan.org/tex-archive/macros/latex/contrib/\csname @package\endcsname}.
+% under \url{http://www.ctan.org/tex-archive/macros/latex/contrib/standalone}.
% To unpack all package files from the DTX file compile the INS file with |tex| once.
% The manual can be compiled from the DTX file with |pdflatex|. This requires the \pkg{ydoc} bundle to be installed.
%
@@ -211,8 +212,8 @@
%
% \section{Bug reports, feature requests and other feedback}
% Bug reports, feature requests and other feedback about the \cls{standalone} bundle can be sent to the author
-% either by email to \href{mailto:martin@scharrer-online.de?subject=standalone:%20}{martin@scharrer-online.de}
-% or using the issue tracker for the bundle under \url{https://bitbucket.org/martin_scharrer/standalone/issues}.
+% either by email to \href{mailto:martin.scharrer@web.de?subject=standalone:%20}{martin.scharrer@web.de}
+% or using the issue tracker for the bundle under \url{https://github.com/MartinScharrer/standalone/issues}.
% Bug reports should include the used version of \cls{standalone} as well as the used \LaTeX\ format (|pdflatex|, |latex|, |xelatex|, etc.) and distribution including its version.
% Usually a minimal example which recreate the issue is immensely helpful in analysing and solving any bug.
% Please look for existing related issue tickets first and check the FAQ/troubleshooting in \autoref{sec:classfaq} first.
@@ -2598,7 +2599,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\let\sa@convert@stop\stop
+\def\sa@convert@stop{\csname fi\endcsname\stop}%
\begingroup
\let\on@line\@gobble
% \end{macrocode}
@@ -2664,16 +2665,16 @@
\def\sa@multi@pagemark{}%
\edef\sa@lastoutfile{\outfile}%
\else
+ \begingroup
+ \def\sa@multi@pagemark{-\the\@tempcnta}%
+ \xdef\sa@lastoutfile{\outfile}%
+ \endgroup
\@tempcntb\z@
\loop\ifnum\@tempcnta>0
\advance\@tempcntb\@ne
\divide\@tempcnta by 10\relax
\repeat
\edef\sa@multi@pagemark{-\percent0\the\@tempcntb d}%
- \begingroup
- \def\sa@multi@pagemark{-\the\@tempcnta}%
- \xdef\sa@lastoutfile{\outfile}%
- \endgroup
\fi
%
\if@tempswa
@@ -2686,8 +2687,10 @@
% \begin{macrocode}
\edef\sa@convert@precommand{\sa@convert@precommand}%
\ifx\sa@convert@precommand\@empty\else
+\message{Executing precommand:^^J\sa@convert@precommand^^J^^J}%
\ShellEscape{\sa@convert@precommand}%
\fi
+\message{Executing command:^^J\sa@convert@command^^J^^J}%
\ShellEscape{\sa@convert@command}%
\@tempswafalse
\IfFileExists{\sa@lastoutfile}{%
diff --git a/macros/latex/contrib/standalone/standalone.pdf b/macros/latex/contrib/standalone/standalone.pdf
index e0c4f081a1..3c494438ff 100644
--- a/macros/latex/contrib/standalone/standalone.pdf
+++ b/macros/latex/contrib/standalone/standalone.pdf
Binary files differ
diff --git a/macros/luatex/latex/japanese-mathformulas/README.txt b/macros/luatex/latex/japanese-mathformulas/README.txt
index 8f5c0199b8..adab40bf2c 100644
--- a/macros/luatex/latex/japanese-mathformulas/README.txt
+++ b/macros/luatex/latex/japanese-mathformulas/README.txt
@@ -1,5 +1,5 @@
japanese-mathformulas - mathematical formula using amsmath and tikz==================================
-version 1.0.1
+version 1.0.2
Licence----------------------------------------------------------------------------------------------
lppl1.3c
@@ -12,7 +12,7 @@ http://www.latex-project.org/lppl.txt
and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later.
Description------------------------------------------------------------------------------------------
-This is a style file for compiling basic math formulas. \NewDocumentCommand allows you to specify whether the formula should be used within a sentence or on a new line. The main packages used are amsmath, amssymb, siunitx, ifthen, xparse, tikz, mathtools, graphics.
+This is a style file for compiling basic math formulas. \NewDocumentCommand allows you to specify whether the formula should be used within a sentence or on a new line. The main packages used are mathtools(loading amsmath), amssymb, siunitx, ifthen, xparse, tikz, graphics.
Contents---------------------------------------------------------------------------------------------
japanese-mathformulas.sty the main file
diff --git a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas-sample.tex b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas-sample.tex
index 4eb0ec70a2..08786e5a34 100644
--- a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas-sample.tex
+++ b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas-sample.tex
@@ -2,7 +2,7 @@
\usepackage{iwona}%
\usepackage{bookmark,xurl}
-\usepackage{japanese-mathformulas,ascolorbox,enumerate,environ,tcolorbox,color}%
+\usepackage{mathformula,ascolorbox,enumerate,environ,tcolorbox,color}%
\usepackage[hiragino-pron,deluxe,expert,bold]{luatexja-preset}%
\usepackage[usetype1]{uline--}
\usepackage[margin=15mm]{geometry}
diff --git a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.pdf b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.pdf
index 8514e8de6a..06d3dcd74c 100644
--- a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.pdf
+++ b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.pdf
Binary files differ
diff --git a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.sty b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.sty
index 5038049b59..8664e026ff 100644
--- a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.sty
+++ b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.sty
@@ -1,12 +1,13 @@
-\NeedsTeXFormat{LaTeX2e}%
+\NeedsTeXFormat{LaTeX2e}% lualatex
-\ProvidesPackage{japanese-mathformulas}[2022/10/3,Version 1.0.1]%
+\ProvidesPackage{mathformula}%[2022/10/5,Version 1.0.2]%
\RequirePackage{luatexja}%
\RequirePackage{luatexja-fontspec}%
\RequirePackage{luatexja-otf}%
%\RequirePackage[hiragino-pron,deluxe,expert,bold]{luatexja-preset}%
-\RequirePackage{amsmath,amssymb,siunitx,ifthen,xparse,tikz,mathtools,graphics}%
+\RequirePackage{mathtools,amssymb,ifthen,xparse,tikz,graphics}%
+\usepackage[b]{esvect}%
\usetikzlibrary{arrows,shapes,intersections,calc,angles,decorations.shapes,arrows.meta,quotes,through,decorations.text}%
\newcommand{\空行}{\vskip0.00001\baselineskip}%
@@ -26,16 +27,43 @@
\newcommand{\証明開始}{\noindent\textgt{【証明】}\par}%
\newcommand{\証明終了}{\@rightalign{\ (Q.E.D.)}\par}%
\newcommand{\数式カンマスペース}{,\ }%
+\let\original@sqrt\sqrt%
+\NewDocumentCommand\@@sqrt{ O{} m }%
+ {\ifthenelse{\equal{#1}{}}{\ensuremath{\original@sqrt{\vphantom{b}#2}}}{\ensuremath{\original@sqrt[#1]{\vphantom{b}#2}}}}%
+\def\sqrt{\@@sqrt}%
\NewDocumentCommand\根号{ O{} m }%
- {\ifthenelse{\equal{#1}{}}{\sqrt{#2\,}}{\sqrt[#1]{#2\,}}}%
-\newcommand{\ベクトル}[1]{\vec{\mathstrut #1}}%
-\newcommand{\overrightarrowtext}[1]{\overrightarrow{\text{#1}}}%
+ {\ifthenelse{\equal{#1}{}}{\ensuremath{\original@sqrt{\vphantom{b}#2\,}}}{\ensuremath{\original@sqrt[#1]{\vphantom{b}#2\,}}}}%
+\newcommand{\ベクトル}[1]{\vv{\mathstrut#1}}%
+\newcommand{\階乗}{\ensuremath{\mkern1mu!\mkern1mu}}%
+\newcommand{\実数入り}{\ensuremath{\in\mathbb{R}}}%
+\newcommand{\共役}[1]{\ensuremath{\overline{\mathstrut#1}}}%
+\def\相似sizeratio#1{\Mulself\sz@s{#1}\Mulself\sz@r{#1}\ignorespaces}%
+\edef\sz@s{1.4}%
+\edef\sz@r{.33}%
+\def\souzisizeratio#1{\Mulself\sz@s{#1}\Mulself\sz@r{#1}\ignorespaces}%
+\DeclareRobustCommand\相似{\@ifnextchar[{\@相似}{\@相似[\empty]}}%
+\def\@相似[#1]{%
+ \ifx\empty #1\else
+ \Mulself\sz@s{#1}%
+ \Mulself\sz@r{#1}%
+ \fi
+ \mathrel{\hbox{\chgfontsizeratio{\sz@s}\raisebox{-\sz@r ex}{∽}\!\!}}%
+}%
+\def\chgfontsizeratio#1{\setlength{\@tempdima@math}{\f@size pt}%
+ \setlength{\@tempdima@math}{#1\@tempdima@math}%
+ \@tempdimb@math=\@tempdima@math\advance\@tempdimb@math2\p@
+ \def\@tmp@size{%
+ \@setfontsize\@tmp@size{\strip@pt\@tempdima@math}{\strip@pt\@tempdimb@math}}%
+ \@tmp@size\ignorespaces
+}%
+\def\平行{\mathrel{/\kern-.25em/}}%
+\newcommand{\vvtext}[1]{\ensuremath{\vv{\text{#1}}}}%
\newcommand{\overarc}[1]%
{%
- \tikz[baseline = (N.base),every node/.style={}]%
+ \tikz[baseline=(N.base),every node/.style={}]%
{%
- \node[inner sep = 0pt](N){\text{#1}};%
- \draw[line width = 0.4pt] plot [smooth, tension=1.3]coordinates%
+ \node[inner sep=0pt](N){\text{#1}};%
+ \draw[line width=0.4pt]plot[smooth,tension=1.3]coordinates%
{($(N.north west)+(0.1ex,0)$)($(N.north)+(0,0.5ex)$)($(N.north east)+(0,0)$)};%
}%
}%
@@ -51,7 +79,7 @@
\newcommand{\Tzettaiti}[1]{\left|\,#1\,\right|}%
\def\shikimaru#1{\text{\quad$\cdots\cdots$\,\ajMaru{#1}}}
\let\originalbigtriangleup\bigtriangleup
-\def\bigtriangleup#1{\originalbigtriangleup{\mathrm{#1}}}
+\def\bigtriangleup#1{\originalbigtriangleup{\text{#1}}}
\DeclareRobustCommand\bunsuu{\@ifstar{\bunsuu@}{\@@bunsuu}}
\def\@@bunsuu#1#2{%
\dfrac{\lower.44ex\hbox{$\,#1\,$}}{\lower-.1ex\hbox{$\,#2\,$}}}%
@@ -64,7 +92,6 @@
\def\@EMvphantom[#1]{\@ifnextchar[{\@@EMvphantom[#1]}{%
\@@EMvphantom[#1][#1]}}
\def\@@EMvphantom[#1][#2]#3{{%
-% \edef\apnd@ht{#1}\edef\apnd@dp{#2}%
\@ifundefined{hakobanpush}{%
\@@@EMvphantom{#3}\ignorespaces
}{%
@@ -96,7 +123,7 @@
\long\def\@icolonforloop#1:#2\@@#3#4{\def#3{#1}\ifx #3\@nnil
\expandafter\@fornoop \else
#4\relax\expandafter\@icolonforloop\fi#2\@@#3{#4}}%
-\def\phrases@math{\renewcommand{\arraystretch}{1}\@ifnextchar<{\@phrases@math}{\@phrases@math<lr>}}
+\def\phrasesmath{\renewcommand{\arraystretch}{1}\@ifnextchar<{\@phrases@math}{\@phrases@math<lr>}}
\def\@phrases@math<#1>{\@ifnextchar[{\@@phrases@math<#1>}{\@@phrases@math<#1>[l]}}
\def\@@phrases@math<#1>[#2]{\@ifnextchar({\@@@phrases@math<#1>[#2]}{\@@@phrases@math<#1>[#2](c)}}
\def\@@@phrases@math<#1>[#2](#3){\@ifnextchar|{\@@@@phrases@math<#1>[#2](#3)}{\@@@phrases@math<#1>[#2](#3)|0pt|}}
@@ -136,7 +163,7 @@
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
{$\Ttyuukakko{a-b}^2=a^2-2ab+b^2$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{a-b}^2=a^2-2ab+b^2\]}{\relax}%
+ {\[\Ttyuukakko{a-b}^2=a^2-2ab+b^2\]}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
{$\Ttyuukakko{x-a}\Ttyuukakko{x+a}=x^2-a^2$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}
@@ -153,52 +180,52 @@
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
{$a^2+2ab+b^2=\Ttyuukakko{a+b}^2$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
- {\[a^2+2ab+b^2=\Ttyuukakko{a+b}^2\]}{\relax}%
+ {\[a^2+2ab+b^2=\Ttyuukakko{a+b}^2\]}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
{$a^2-2ab+b^2=\Ttyuukakko{a-b}^2$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
- {\[a^2-2ab+b^2=\Ttyuukakko{a-b}^2\]}{\relax}%
+ {\[a^2-2ab+b^2=\Ttyuukakko{a-b}^2\]}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
{$x^2-a^2=\Ttyuukakko{x-a}\Ttyuukakko{x+a}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}
- {\[x^2-a^2=\Ttyuukakko{x-a}\Ttyuukakko{x+a}\]}{\relax}%
+ {\[x^2-a^2=\Ttyuukakko{x-a}\Ttyuukakko{x+a}\]}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
{$x+\Ttyuukakko{a+b}x+ab=\Ttyuukakko{x+a}\Ttyuukakko{x+b}$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
{\[x+\Ttyuukakko{a+b}x+ab=\Ttyuukakko{x+a}\Ttyuukakko{x+b}\]}{\relax}%
- }%
+ }%
\NewDocumentCommand{\平方根}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
- {$a$は実数として,$\根号{a^2}=\Tzettaiti{a}$}%
+ {$a$は実数として,\,\,$\sqrt{a^2}=\Tzettaiti{a}$}%
{\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
$a$は実数として,%
\[\根号{a^2}=\Tzettaiti{a}\]%
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{i}}%
{%
$a\geqq0$のとき,%
$\Ttyuukakko{\根号{a}}^2=\Ttyuukakko{-\根号{a}}^2=a\数式カンマスペース\根号{a}\leqq0$%
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{b}}%
{%
$a\leqq0$のとき,%
- \[\Ttyuukakko{\根号{a}}^2=\Ttyuukakko{-\根号{a}}^2=a\数式カンマスペース\根号{a}\leqq0\]%
+\[\Ttyuukakko{\根号{a}}^2=\Ttyuukakko{-\根号{a}}^2=a\数式カンマスペース\根号{a}\leqq0\]%
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{i}}%
{$\根号{a}=\Tzettaiti{a}$}%
{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{b}}%
{\[\根号{a}=\Tzettaiti{a}\]}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{i}}%
{%
$a>0\数式カンマスペース b>0\数式カンマスペース a\neq b$のとき,%
@@ -208,7 +235,8 @@
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{b}}%
{%
$a>0\数式カンマスペース b>0\数式カンマスペース a\neq b$のとき,%
- \[\根号{a}\根号{b}=\根号{ab}\]%
+\[\根号{a}\根号{b}=\根号{ab}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{性質D}\AND\equal{#2}{i}}%
@@ -223,36 +251,39 @@
\ifthenelse{\equal{#1}{性質E}\AND\equal{#2}{b}}%
{\[\根号{k^2a}=k\根号{a}\]}%
{\relax}%
- }%
+ }%
\NewDocumentCommand{\一次不等式}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{i}}%
- {$a<b$のとき\数式カンマスペース $a+c<b+c$}{\relax}%
+ {$a<b$のとき\数式カンマスペース $a+c<b+c$}{\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{b}}%
{%
$a<b$のとき\数式カンマスペース %
- \[a+c<b+c\]%
+\[a+c<b+c\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{i}}%
- {$c>0$のとき,$ac<bc$}{\relax}%
+ {$c>0$のとき,$ac<bc$}{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{b}}%
{%
$c>0$のとき,%
- \[ac<bc\]%
+\[ac<bc\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{i}}%
- {$c<0$のとき,$ac>bc$}{\relax}%
+ {$c<0$のとき,$ac>bc$}{\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{b}}%
{%
$c<0$のとき,%
- \[ac>bc\]%
+\[ac>bc\]%
+
}%
{\relax}%
- }%
+ }%
\NewDocumentCommand{\集合}{ m O{i} }%
@@ -260,44 +291,54 @@
\ifthenelse{\equal{#1}{積集合}\AND\equal{#2}{i}}%
{$\Ttyuukakko{A\cap B}$}{\relax}%
\ifthenelse{\equal{#1}{積集合}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{A\cap B}\]}{\relax}%
+ {\[\Ttyuukakko{A\cap B}\]}{\relax}%
\ifthenelse{\equal{#1}{和集合}\AND\equal{#2}{i}}%
{$\Ttyuukakko{A\cup B}$}{\relax}%
\ifthenelse{\equal{#1}{和集合}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{A\cup B}\]}{\relax}%
+ {\[\Ttyuukakko{A\cup B}\]}{\relax}%
\ifthenelse{\equal{#1}{補集合}\AND\equal{#2}{i}}%
- {$\Ttyuukakko{\overline{A}}$}{\relax}%
+ {$\Ttyuukakko{\共役{A}}$}{\relax}%
\ifthenelse{\equal{#1}{補集合}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{\overline{A}}\]}{\relax}%
- }%
+ {\[\Ttyuukakko{\共役{A}}\]}{\relax}%
+ }%
\NewDocumentCommand{\対偶}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{定理}\AND\equal{#2}{i}}%
{%
- $P$ならば$Q$の命題において,\par%
- 逆は$Q$ならば$P$\par%
- 裏は$P$でないならば$Q$でない\par%
- 対偶は$Q$でないならば$P$でない\par%
+ $P$ならば$Q$の命題において,%
+
+ 逆は$Q$ならば$P$%
+
+ 裏は$P$でないならば$Q$でない%
+
+ 対偶は$Q$でないならば$P$でない%
+
対偶と元の命題の真偽は一致する。%
}%
{\relax}%
\ifthenelse{\equal{#1}{定理}\AND\equal{#2}{b}}%
{%
- $P$ならば$Q$の命題において,\par%
- 逆は$Q$ならば$P$\par%
- 裏は$P$でないならば$Q$でない\par%
- 対偶は$Q$でないならば$P$でない\par%
+ $P$ならば$Q$の命題において,%
+
+ 逆は$Q$ならば$P$%
+
+ 裏は$P$でないならば$Q$でない%
+
+ 対偶は$Q$でないならば$P$でない%
+
対偶と元の命題の真偽は一致する。%
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
- 命題を「$p$ならば$q$」とし$p$の真理集合を$P$\数式カンマスペース $q$の真理集合を$Q$とする。\par%
- 「$p$ならば$q$」が真のとき,$Q\subset P\Leftrightarrow\overline{P}\subset\overline{Q}$より対偶命題「$q$でないならば$p$でない」は真。\par%
- 「$p$ならば$q$」が偽のとき,$Q\not\subset P\Leftrightarrow\overline{P}\not\subset\overline{Q}$より対偶命題「$q$でないならば$p$でない」は偽。\par
+ 命題を「$p$ならば$q$」とし,$p$の真理集合を$P$\数式カンマスペース $q$の真理集合を$Q$とする。%
+
+ 「$p$ならば$q$」が真のとき,$Q\subset P\Leftrightarrow\共役{P}\subset\共役{Q}$より対偶命題「$q$でないならば$p$でない」は真。%
+
+ 「$p$ならば$q$」が偽のとき,$Q\not\subset P\Leftrightarrow\共役{P}\not\subset\共役{Q}$より対偶命題「$q$でないならば$p$でない」は偽。\par
従って,対偶命題と元の命題の真偽は一致する。%
\証明終了%
}%
@@ -313,7 +354,7 @@
\ifthenelse{\equal{#1}{標準形}\AND\equal{#2}{i}}%
{$y=a\Ttyuukakko{x-p}^2+q$}{\relax}%
\ifthenelse{\equal{#1}{標準形}\AND\equal{#2}{b}}%
- {\[y=a\Ttyuukakko{x-p}^2+q\]}{\relax}%
+ {\[y=a\Ttyuukakko{x-p}^2+q\]}{\relax}%
\ifthenelse{\equal{#1}{一般形}\AND\equal{#2}{i}}%
{$y=ax^2+bx+c$}{\relax}%
\ifthenelse{\equal{#1}{一般形}\AND\equal{#2}{b}}%
@@ -321,26 +362,28 @@
\ifthenelse{\equal{#1}{切片形}\AND\equal{#2}{i}}%
{$y=a\Ttyuukakko{x-\alpha}\Ttyuukakko{x-\beta}$}{\relax}%
\ifthenelse{\equal{#1}{切片形}\AND\equal{#2}{b}}%
- {\[y=a\Ttyuukakko{x-\alpha}\Ttyuukakko{x-\beta}\]}{\relax}%
+ {\[y=a\Ttyuukakko{x-\alpha}\Ttyuukakko{x-\beta}\]}{\relax}%
\ifthenelse{\equal{#1}{平方完成}\AND\equal{#2}{i}}%
- {$y=ax^2+bx+c$に対して,$y=a\Ttyuukakko{x+\bunsuu{b}{2a}}-\bunsuu{b^2-4ac}{4a}$}{\relax}%
+ {$y=ax^2+bx+c$に対して,$y=a\Ttyuukakko{x+\bunsuu{b}{2a}}-\bunsuu{b^2-4ac}{4a}$}{\relax}%
\ifthenelse{\equal{#1}{平方完成}\AND\equal{#2}{b}}%
{%
$y=ax^2+bx+c$に対して,%
- \[y=a\Ttyuukakko{x+\bunsuu{b}{2a}}-\bunsuu{b^2-4ac}{4a}\]%
+\[y=a\Ttyuukakko{x+\bunsuu{b}{2a}}-\bunsuu{b^2-4ac}{4a}\]%
+
}%
{\relax}%
- }%
+ }%
\NewDocumentCommand{\二次方程式の解の公式}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {$ax^2+bx+c=0 \Ttyuukakko{a\neq0}$に対して,$x=\bunsuu{-b\pm\根号{b^2-4ac}}{2a}$}{\relax}%
+ {$ax^2+bx+c=0 \Ttyuukakko{a\neq0}$に対して,$x=\bunsuu{-b\pm\根号{b^2-4ac}}{2a}$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
$ax^2+bx+c=0 \Ttyuukakko{a\neq0}$に対して,%
- \[x=\bunsuu{-b\pm\根号{b^2-4ac}}{2a}\]%
+\[x=\bunsuu{-b\pm\根号{b^2-4ac}}{2a}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{証明A}}%
@@ -391,12 +434,13 @@
\draw pic["$\theta$",draw=black,->,thin,angle eccentricity=1.4,angle radius=0.4cm]{angle=B--A--C};%
\end{tikzpicture}%
\空行%
- 図の様な直角$\triangle{\text{ABC}}$において$\angle\mathrm{CAB}=\theta$のとき,%
+ 図の様な直角$\triangle{\text{ABC}}$において$\angle\text{CAB}=\theta$のとき,%
\[%
\sin\theta=\bunsuu{\text{BC}}{\text{AC}}\数式カンマスペース%
\cos\theta=\bunsuu{\text{AB}}{\text{AC}}\数式カンマスペース%
\tan\theta=\bunsuu{\text{BC}}{\text{AB}}%
\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{定義B}\AND\equal{#2}{i}}%
@@ -420,7 +464,8 @@
\end{tikzpicture}%
\空行%
図において%
- \[\sin\theta=\bunsuu{y}{r}\数式カンマスペース\cos\theta=\bunsuu{x}{r}\数式カンマスペース\tan\theta=\bunsuu{y}{x}\]%
+\[\sin\theta=\bunsuu{y}{r}\数式カンマスペース\cos\theta=\bunsuu{x}{r}\数式カンマスペース\tan\theta=\bunsuu{y}{x}\]%
+
このとき,$r=1$にしても一般性を失わない。%
}%
{\relax}%
@@ -432,11 +477,11 @@
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
{$\sin^2\theta+\cos^2\theta=1$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
- {\[\sin^2\theta+\cos^2\theta=1\]}{\relax}%
+ {\[\sin^2\theta+\cos^2\theta=1\]}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
{$\tan\theta=\bunsuu{\sin\theta}{\cos\theta}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
- {\[\tan\theta=\bunsuu{\sin\theta}{\cos\theta}\]}{\relax}%
+ {\[\tan\theta=\bunsuu{\sin\theta}{\cos\theta}\]}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
{$1+\tan^2\theta=\bunsuu{1}{\cos^2\theta}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
@@ -463,21 +508,24 @@
\end{tikzpicture}%
\空行%
図において,$\sin\theta=\bunsuu{y}{r}\数式カンマスペース\quad\cos\theta=\bunsuu{x}{r}$より%
- \[\sin^2\theta+\cos^2\theta=\bunsuu{y^2+x^2}{r^2}\]%
+\[\sin^2\theta+\cos^2\theta=\bunsuu{y^2+x^2}{r^2}\]%
+
ここで,三平方の定理より$x^2+y^2=r^2$なので%
- \[\sin^2\theta+\cos^2\theta=\bunsuu{r^2}{r^2}=1\]%
+\[\sin^2\theta+\cos^2\theta=\bunsuu{r^2}{r^2}=1\]%
+
\空行%
- $\sin\theta=\bunsuu{y}{r}\数式カンマスペース\quad\cos\theta=\bunsuu{x}{r}\quad\tan\theta=\bunsuu{y}{x}$より%
- \[\bunsuu{\sin\theta}{\cos\theta}=\bunsuu{y}{x}=\tan\theta\]%
+ $\sin\theta=\bunsuu{y}{r}\数式カンマスペース\quad\cos\theta=\bunsuu{x}{r}\quad\tan\theta=\bunsuu{y}{x}$より% \[\bunsuu{\sin\theta}{\cos\theta}=\bunsuu{y}{x}=\tan\theta\]%
+
\空行%
$\sin^2\theta+\cos^2\theta=1$の両辺を$\cos^2\theta$で割ることで,%
- \[\bunsuu{\sin^2\theta}{\cos^2\theta}+1=\bunsuu{1}{\cos^2\theta}\]%
+\[\bunsuu{\sin^2\theta}{\cos^2\theta}+1=\bunsuu{1}{\cos^2\theta}\]%
+
ここで,$\bunsuu{\sin\theta}{\cos\theta}=\tan\theta$なので%
- \[\tan^2\theta+1=\bunsuu{1}{\cos^2\theta}\]%
+\[\tan^2\theta+1=\bunsuu{1}{\cos^2\theta}\]%
\証明終了%
}%
{\relax}%
- }%
+ }%
\NewDocumentCommand{\ユークリッド幾何の公理}{ m O{i} }%
@@ -500,9 +548,10 @@
\newcommand{\距離}
{%
- 空でない集合Xの元$x\数式カンマスペース y$に対して,実数値$d(x\数式カンマスペース y)$が定義され,%
+ 空でない集合$X$の元$x\数式カンマスペース y$に対して,実数値$d(x\数式カンマスペース y)$が定義され,%
\[d(x\数式カンマスペース y)=0\Leftrightarrow x=y\数式カンマスペース\quad(x\数式カンマスペース y)=d(y\数式カンマスペース x)\数式カンマスペース\quad(x\数式カンマスペース y)\leqq d(x\数式カンマスペース y)+d(y\数式カンマスペース x)\]%
- の三つの性質を満たす$d$をX上の距離といい,$(\text{X}\数式カンマスペース d)$を距離空間という。 %
+
+ の三つの性質を満たす$d$を$X$上の距離といい,$(X\数式カンマスペース d)$を距離空間という。 %
}%
@@ -530,11 +579,11 @@
\draw(2,0)coordinate(B);%
\draw(0,2)coordinate(C); %
\draw(1,1)coordinate(D);%
- \draw pic["A",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=A--D--C};%
+ \draw pic["A",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=A--D--C};%
\draw pic["B",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=O--D--B};%
\end{tikzpicture}%
\空行%
- 図において,$\angle\mathrm{A}$と$\angle\mathrm{B}$を対頂角という。%
+ 図において,$\angle\text{A}$と$\angle\text{B}$を対頂角という。%
}%
{\relax}%
\ifthenelse{\equal{#1}{性質}}%
@@ -550,14 +599,14 @@
\draw(2,0)coordinate(B);%
\draw(0,2)coordinate(C);%
\draw(1,1)coordinate(D);%
- \draw pic["A",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=A--D--C};%
- \draw pic["\,C",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.3cm] {angle=B--D--A};%
+ \draw pic["A",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=A--D--C};%
+ \draw pic["\,C",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.3cm] {angle=B--D--A};%
\draw pic["B",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=O--D--B};%
\end{tikzpicture}%
\空行%
- \[180^\circ =\angle\mathrm{A}+\angle\mathrm{C}\]%
- \[180^\circ=\angle\mathrm{B}+\angle\mathrm{C}\]%
- \[\Leftrightarrow\angle\mathrm{A}=\angle\mathrm{B}\]%
+\[180^\circ =\angle\text{A}+\angle\text{C}\]%
+ \[180^\circ=\angle\text{B}+\angle\text{C}\]%
+\[\Leftrightarrow\angle\text{A}=\angle\text{B}\]%
\証明終了%
}%
{\relax}%
@@ -584,11 +633,11 @@
\draw pic["B\,\,\,",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.3cm] {angle=B--E--G};%
\end{tikzpicture}
\空行%
- 図において,$\angle\mathrm{A}$と$\angle\mathrm{B}$を錯角という。%
+ 図において,$\angle\text{A}$と$\angle\text{B}$を錯角という。%
}%
{\relax}%
\ifthenelse{\equal{#1}{性質}}%
- {直線$l\数式カンマスペース m$において,錯角が等しい$\Leftrightarrow$直線$l\数式カンマスペース m$は平行。}{\relax}%
+ {直線$l\数式カンマスペース m$において,錯角が等しい$\Leftrightarrow$直線$l\数式カンマスペース m$は平行}{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
@@ -613,16 +662,20 @@
\item 「平行ならば錯角が等しい」の証明。%
\空行%
対頂角は等しいので,%
- \[\angle\mathrm{A}=\angle\mathrm{C}\]%
- ここで,$\angle\mathrm{B}$と$\angle\mathrm{C}$は同位角なので等しいので,%
- \[\angle\mathrm{A}=\angle\mathrm{B}\]%
+\[\angle\text{A}=\angle\text{C}\]%
+
+ ここで,$\angle\text{B}$と$\angle\text{C}$は同位角なので等しいので,%
+\[\angle\text{A}=\angle\text{B}\]%
+
\item 「錯角が等しいならば平行」の証明。%
\空行%
錯角が等しいので,%
- \[\angle\mathrm{A}=\angle\mathrm{B}\]%
+\[\angle\text{A}=\angle\text{B}\]%
+
対頂角は等しいので,%
- \[\angle\mathrm{A}=\angle\mathrm{C}\]%
- \[\Leftrightarrow\angle\mathrm{C}=\angle\mathrm{B}\]%
+\[\angle\text{A}=\angle\text{C}\]%
+\[\Leftrightarrow\angle\text{C}=\angle\text{B}\]%
+
即ち,同位角が等しいので二直線は平行。%
\end{enumerate}%
\証明終了%
@@ -650,7 +703,7 @@
\draw pic["\,\,B",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=D--E--B};%
\end{tikzpicture}
\空行%
- 図において,$\angle\mathrm{A}$と$\angle\mathrm{B}$を同位角という。
+ 図において,$\angle\text{A}$と$\angle\text{B}$を同位角という。
}%
{\relax}%
\ifthenelse{\equal{#1}{公理}}%
@@ -658,15 +711,91 @@
}%
+\NewDocumentCommand{\平行線と線分比の性質}{ m O{i} }%
+ {%
+ \ifthenelse{\equal{#1}{公式A}}%
+ {%
+ \begin{tikzpicture}%
+ \draw(0,0)--(3,4)--(5,0)--cycle;%
+ \draw(0,0)node[below]{B};%
+ \draw(3,4)node[above]{A};%
+ \draw(5,0)node[below]{C};%
+ \draw(1.5,2)--(4,2);%
+ \draw(1.5,2)node[left]{D};%
+ \draw(4,2)node[right]{E};%
+ \end{tikzpicture}%
+ \空行%
+ 図において,%
+\[\text{AD}:\text{AB}=\text{AE}:\text{AC}=\text{DE}:\text{BC}\]%
+
+ }%
+ {\relax}%
+ \ifthenelse{\equal{#1}{公式B}}%
+ {%
+ \begin{tikzpicture}%
+ \draw(0,0)--(3,4)--(5,0)--cycle;%
+ \draw(0,0)node[below]{B};%
+ \draw(3,4)node[above]{A};%
+ \draw(5,0)node[below]{C};%
+ \draw(1.5,2)--(4,2);%
+ \draw(1.5,2)node[left]{D};%
+ \draw(4,2)node[right]{E};%
+ \end{tikzpicture}%
+ \空行%
+ 図において,%
+\[\text{AD}:\text{DB}=\text{AE}:\text{EC}\]%
+
+ }%
+ {\relax}%
+ \ifthenelse{\equal{#1}{証明}}%
+ {%
+ \証明開始%
+ \begin{tikzpicture}%
+ \draw(0,0)--(3,4)--(5,0)--cycle;%
+ \draw(0,0)node[below]{B};%
+ \draw(3,4)node[above]{A};%
+ \draw(5,0)node[below]{C};%
+ \draw(1.5,2)--(4,2);%
+ \draw(1.5,2)node[left]{D};%
+ \draw(4,2)node[right]{E};%
+ \draw(2.5,0)--(4,2);%
+ \draw(2.5,0)node[below]{F};%
+ \end{tikzpicture}%
+ \空行%
+ 図において, %
+\[\text{DE}\平行\text{BC}\]%
+\[\Leftrightarrow\angle\text{ADE}=\angle\text{ABC}\数式カンマスペース\angle\text{AED}=\angle\text{ACB}\]%
+
+ よって,$\triangle\text{ADE}\相似\triangle\text{ABC}\Leftrightarrow\text{AD}:\text{AB}=\text{AE}:\text{AC}=\text{DE}:\text{BC}$%
+
+ また,図において,%
+\[\text{AB}\平行\text{EF}\Leftrightarrow\angle\text{CEF}=\angle\text{CAB}\数式カンマスペース\angle\text{CFE}=\angle\text{CBA}\]%
+
+ また,%
+\[\text{DE}\平行\text{BC}\Leftrightarrow\angle\text{EDA}=\angle\text{CBA}\]%
+
+ これと$\angle\text{CFE}=\angle\text{CBA}$より,%
+\[\angle\text{EDA}=\angle\text{CFE}\]%
+
+ よって,$\triangle\text{ADE}\相似\triangle\text{EFC}\Leftrightarrow\text{AD}:\text{EF}=\text{AE}:\text{EC}$%
+ ここで,%
+\[\text{EF}=\text{DB}\Leftrightarrow\text{AD}:\text{DB}=\text{AE}:\text{EC}\]%
+ \証明終了%
+ }%
+ {\relax}%
+ }%
+
+
\NewDocumentCommand{\正弦定理}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {$\triangle{\text{ABC}}$の外接円の半径を$R$として,$\bunsuu{a}{\sin\text{A}}=2\text{R}\text{\ (}b\数式カンマスペース\text{B
-}\数式カンマスペース c\数式カンマスペース\text{Cについても同様に成立})$}{\relax}%
+ {$\triangle{\text{ABC}}$の外接円の半径を$R$として,$\bunsuu{a}{\sin\text{A}}=2\text{R}\text{\ (\,$b\数式カンマスペース\text{B
+}\数式カンマスペース c\数式カンマスペース\text{C}$についても同様に成立)}$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
$\triangle{\text{ABC}}$の外接円の半径を$R$として,%
- \[\bunsuu{a}{sin\text{A}}=2R\text{\ (\,$b\数式カンマスペース\text{B}\数式カンマスペース c\数式カンマスペース\text{C}$についても同様に成立)}\]%
+ \[\bunsuu{a}{\sin\text{A}}=2R\text{\ (\,$b\数式カンマスペース\text{B}\数式カンマスペース c\数式カンマスペース\text{C}$についても同様に成立)}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
@@ -693,9 +822,10 @@
\end{tikzpicture}%
\空行%
図において円周角の定理より,%
- \[\angle\mathrm{A}=\angle\mathrm{D}\]%
+\[\angle\text{A}=\angle\text{D}\]%
+
なので,円Oの半径をRとして$\sin\text{A}=\sin\text{D}=\bunsuu{a}{2\text{R}}$より,%
- \[\bunsuu{a}{\sin\text{A}}=2\text{R}\]%
+\[\bunsuu{a}{\sin\text{A}}=2\text{R}\]%
\証明終了%
}%
{\relax}%
@@ -705,11 +835,12 @@
\NewDocumentCommand{\余弦定理}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {$\triangle{\text{ABC}}$において,$a^2=b^2+c^2-2bc\cos\text{A}$}{\relax}%
+ {$\triangle{\text{ABC}}$において,$a^2=b^2+c^2-2bc\cos\text{A}$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
$\triangle{\text{ABC}}$において,%
- \[a^2=b^2+c^2-2bc\cos\text{A}\]%
+\[a^2=b^2+c^2-2bc\cos\text{A}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
@@ -731,10 +862,12 @@
\end{tikzpicture}%
\空行%
図において$\text{BC}=a,\text{CA}=b,\text{AC}=c$として,%
- \[\text{BH}=c\sin\text{A},\quad\text{AH}=c\cos\text{A}\]%
+\[\text{BH}=c\sin\text{A},\quad\text{AH}=c\cos\text{A}\]%
+
また,$\triangle{\text{BHC}}$に三平方の定理を用いることにより%
- \[\text{CB}^2=\text{BH}^2+\text{HC}^2\]%
- ここで,$\text{HC}=\text{AC}-\text{AH}=b-c\cos\text{A},\quad\text{BH}=c\sin\text{A}$より%
+\[\text{CB}^2=\text{BH}^2+\text{HC}^2\]%
+
+ ここで,$\text{HC}=\text{AC}-\text{AH}=b-c\cos\text{A}\数式カンマスペース\text{BH}=c\sin\text{A}$より%
\begin{align*}%
a^2&=\Ttyuukakko{c\sin\text{A}}^2+\Ttyuukakko{b-c\cos\text{A}}^2&\\%
&=c^2\sin^2\text{A}+b^2-2bc\cos\text{A}+c^2\cos^2\text{A}&\\%
@@ -742,21 +875,22 @@
&=b^2+c^2-2bc\cos\text{A}%
\end{align*}%
よって,%
- \[a^2=b^2+c^2-2bc\cos\text{A}\]%
+\[a^2=b^2+c^2-2bc\cos\text{A}\]%
\証明終了%
}%
{\relax}%
}%
-\NewDocumentCommand{\三角形の面積}{ m O{i} }%
+\NewDocumentCommand{\三角比の三角形の面積公式}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {$\triangle{\text{ABC}}$の面積を$S$として,$S=\bunsuu{1}{2}bc\sin\text{A}$}{\relax}%
+ {$\triangle{\text{ABC}}$の面積を$S$として,$S=\bunsuu{1}{2}bc\sin\text{A}$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
$\triangle{\text{ABC}}$の面積を$S$として,%
- \[S=\bunsuu{1}{2}bc\sin\text{A}\]%
+\[S=\bunsuu{1}{2}bc\sin\text{A}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
@@ -777,167 +911,290 @@
\end{tikzpicture}%
\空行%
図において%
- \[\text{BC}=a\数式カンマスペース\text{CA}=B\数式カンマスペース\text{AC}=c\]%
+\[\text{BC}=a\数式カンマスペース\text{CA}=B\数式カンマスペース\text{AC}=c\]%
+
また,$\triangle{\text{ABC}}$の面積を$S$として$S=\bunsuu{1}{2}\text{AC}\times\text{BH}$と,$\text{AB}\sin\text{A}=\text{BH}$から,%
- \[S=\bunsuu{1}{2}bc\sin\text{A}\]%
+\[S=\bunsuu{1}{2}bc\sin\text{A}\]%
\証明終了%
}%
{\relax}%
}%
+\NewDocumentCommand{\ヘロンの公式}{ m O{i} }%
+ {%
+ \ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
+ {%
+ \begin{tikzpicture}%
+ \draw(0,0)--(3,4)--(5,0)--cycle;%
+ \draw(0,0)node[below]{B};%
+ \draw(3,4)node[above]{A};%
+ \draw(5,0)node[below]{C};%
+ \draw(1.5,2)node[left]{$c$};%
+ \draw(2.5,0)node[below]{$a$};%
+ \draw(4,2)node[right]{$b$};%
+  \end{tikzpicture}%
+ \空行%
+ 図において$s=\bunsuu{a+b+c}{2}$のとき三角形の面積$S$は,$\根号{s(s-a)(s-b)(s-c)}$%
+ }%
+ {\relax}%
+ \ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
+ {%
+ \begin{tikzpicture}%
+ \draw(0,0)--(3,4)--(5,0)--cycle;%
+ \draw(0,0)node[below]{B};%
+ \draw(3,4)node[above]{A};%
+ \draw(5,0)node[below]{C};%
+ \draw(1.5,2)node[left]{$c$};%
+ \draw(2.5,0)node[below]{$a$};%
+ \draw(4,2)node[right]{$b$};%
+  \end{tikzpicture}%
+ \空行%
+ 図において$s=\bunsuu{a+b+c}{2}$のとき三角形の面積$S$は,%
+\[\根号{s(s-a)(s-b)(s-c)}\]%
+
+ }%
+ {\relax}%
+ \ifthenelse{\equal{#1}{証明}}%
+ {%
+ \証明開始%
+ \begin{tikzpicture}%
+ \draw(0,0)--(3,4)--(5,0)--cycle;%
+ \draw(0,0)node[below]{B};%
+ \draw(3,4)node[above]{A};%
+ \draw(5,0)node[below]{C};%
+ \draw(1.5,2)node[left]{$c$};%
+ \draw(2.5,0)node[below]{$a$};%
+ \draw(4,2)node[right]{$b$};%
+  \end{tikzpicture}%
+ \空行%
+ 三角形の面積公式より,%
+\[S=\bunsuu{1}{2}ab\sin\text{C}\]%
+
+ ここで$\sin^2\theta+\cos^2\theta=1$より,%
+\[S=\bunsuu{1}{2}ac\根号{1-\cos^2\text{C}}\]%
+
+ 余弦定理より$\cos\text{C}=\bunsuu{a^2+b^2-c^2}{2ab}$なので,%
+ \begin{align*}%
+ S&=\bunsuu{1}{2}ab\根号{1-\Ttyuukakko{\bunsuu{a^2+b^2-c^2}{2ab}}^2}&\\%
+ &=\bunsuu{1}{4}\根号{(2ab)^2-(a-2+b^2-c^2)^2}&\\%
+ &=\bunsuu{1}{4}\根号{(2ab+a^2+b^2-c^2)(2ab-a^2-b^2+c^2)}&\\%
+ &=\bunsuu{1}{2}\根号{\Tdaikakko{(a+b)^2-c^2}\Tdaikakko{c^2-(a-b)^2}}&\\%
+ &=\根号{\bunsuu{(a+b+c)(-a+b+c)(a-b+c)(a+b-c)}{2\cdot2\cdot2\cdot2}}&\\%
+ &=\根号{s(s-a)(s-b)(s-c)}
+ \end{align*}%
+ \証明終了%
+ }%
+ {\relax}%
+ }%
+
+
+\NewDocumentCommand{\外接円の半径と三角形の面積}{ m O{i} }%
+ {%
+ \ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
+ {%
+ $3$辺の長さが$a\数式カンマスペース b\数式カンマスペース c$の三角形の外接円の半径を$R$,面積を$S$とおくと,$S=\bunsuu{abc}{4R}$
+ }%
+ {\relax}%
+ \ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
+ {%
+ $3$辺の長さが$a\数式カンマスペース b\数式カンマスペース c$の三角形の外接円の半径を$R$,面積を$S$とおくと,%
+ \[S=\bunsuu{abc}{4R}\]%
+ }%
+ {\relax}%
+ \ifthenelse{\equal{#1}{証明}}%
+ {%
+ \証明開始%
+ 正弦定理より,%
+ \[a=2R\sin\text{A}\]%
+
+ 三角形の面積の公式から,%
+ \[S=\bunsuu{1}{2}bc\sin\text{A}\]%
+
+ 以上の2式より,%
+ \[S=\bunsuu{abc}{4R}\]%
+ \証明終了%
+ }%
+ {\relax}%
+ }%
+
+\newlength{\sankekkeinomensekikoushiki}%
+\settowidth{\sankekkeinomensekikoushiki}{$\sqrt{s(s-a)(s-b)(s-c)}\ \Ttyuukakko{s=\bunsuu{a+b+c}{2}}$}%
+\NewDocumentCommand{\三角形の面積公式}{ O{} }%
+ {%
+ \begin{align*}%
+ S&=\parbox[c]{\the\sankekkeinomensekikoushiki}{$\bunsuu12bc\sin{\text{A}}$}\shikimaru{1}\\%
+ &=\parbox[c]{\the\sankekkeinomensekikoushiki}{$\sqrt{s(s-a)(s-b)(s-c)}\ \Ttyuukakko{s=\bunsuu{a+b+c}{2}}$}\shikimaru{2}\\%
+ &=\parbox[c]{\the\sankekkeinomensekikoushiki}{$rs$}\shikimaru{3}\\%
+ &=\parbox[c]{\the\sankekkeinomensekikoushiki}{$\bunsuu{abc}{4R}$}\shikimaru{4}\\%
+ &=\parbox[c]{\the\sankekkeinomensekikoushiki}{$\bunsuu12\sqrt{\Tzettaiti{\ベクトル{a}}^2\Tzettaiti{\ベクトル{b}}^2-\Ttyuukakko{\ベクトル{a}\cdot\ベクトル{b}}^2}$}\shikimaru{5}\\%
+ &=\parbox[c]{\the\sankekkeinomensekikoushiki}{$\bunsuu12|x_1y_2-x_2y_1|$}\shikimaru{6}%
+ \end{align*}%
+ }%
+
+
\NewDocumentCommand{\場合の数と確率}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{和集合の要素の個数}\AND\equal{#2}{i}}%
{$n\Ttyuukakko{A\cup B}=n\Ttyuukakko{A}+n\Ttyuukakko{B}-n\Ttyuukakko{A\cap B}$}{\relax}%
\ifthenelse{\equal{#1}{和集合の要素の個数}\AND\equal{#2}{b}}%
- {\[n\Ttyuukakko{A\cup B}=n\Ttyuukakko{A}+n\Ttyuukakko{B}-n\Ttyuukakko{A\cap B}\]}{\relax}%
+ {\[n\Ttyuukakko{A\cup B}=n\Ttyuukakko{A}+n\Ttyuukakko{B}-n\Ttyuukakko{A\cap B}\]}{\relax}%
\ifthenelse{\equal{#1}{補集合の要素の個数}\AND\equal{#2}{i}}%
- {全体集合を$U$として,$n\Ttyuukakko{\overline{A}}=n\Ttyuukakko{U}-n\Ttyuukakko{A}$}{\relax}%
+ {全体集合を$U$として,$n\Ttyuukakko{\共役{A}}=n\Ttyuukakko{U}-n\Ttyuukakko{A}$}{\relax}%
\ifthenelse{\equal{#1}{補集合の要素の個数}\AND\equal{#2}{b}}%
- {全体集合を$U$として,\[n\Ttyuukakko{\overline{A}}=n\Ttyuukakko{U}-n\Ttyuukakko{A}\]}{\relax}%
+ {全体集合を$U$として,\[n\Ttyuukakko{\共役{A}}=n\Ttyuukakko{U}-n\Ttyuukakko{A}\]}{\relax}%
\ifthenelse{\equal{#1}{和の法則}\AND\equal{#2}{i}}%
- {二つの事象$\text{A}$\数式カンマスペース Bにたいして,Aの起こりかたが$a$通り,Bの起こりかたが$b$通りのとき,AまたはBの起こる場合の数は$a+b$通り}{\relax}%
+ {二つの事象$A$\数式カンマスペース$B$に対して,Aの起こり方が$a$通り,Bの起こり方が$b$通りのとき,AまたはBの起こる場合の数は$a+b$通り}{\relax}%
\ifthenelse{\equal{#1}{和の法則}\AND\equal{#2}{b}}%
- {二つの事象$\text{A}$\数式カンマスペース Bにたいして,Aの起こりかたが$a$通り,Bの起こりかたが$b$通りのとき,AまたはBの起こる場合の数は$a+b$通り}{\relax}%
+ {二つの事象$A$\数式カンマスペース$B$に対して,Aの起こり方が$a$通り,Bの起こり方が$b$通りのとき,AまたはBの起こる場合の数は$a+b$通り}{\relax}%
\ifthenelse{\equal{#1}{積の法則}\AND\equal{#2}{i}}%
- {二つの事象$\text{A}$\数式カンマスペース Bにたいして,Aの起こりかたが$a$通り,Bの起こりかたが$b$通りのとき,AかつBの起こる場合の数は$ab$通り}{\relax}%
+ {二つの事象$A$\数式カンマスペース$B$に対して,Aの起こり方が$a$通り,Bの起こり方が$b$通りのとき,AかつBの起こる場合の数は$ab$通り}{\relax}%
\ifthenelse{\equal{#1}{積の法則}\AND\equal{#2}{b}}%
- {二つの事象$\text{A}$\数式カンマスペース Bにたいして,Aの起こりかたが$a$通り,Bの起こりかたが$b$通りのとき,AかつBの起こる場合の数は$ab$通り}{\relax}%
+ {二つの事象$A$\数式カンマスペース$B$に対して,Aの起こり方が$a$通り,Bの起こり方が$b$通りのとき,AかつBの起こる場合の数は$ab$通り}{\relax}%
\ifthenelse{\equal{#1}{順列}\AND\equal{#2}{i}}%
- {異なる$n$個のものから$r$個選んで並べる場合の数は${}_{n}P_{r}=\bunsuu{n!}{\Ttyuukakko{n-r}!}$}{\relax}%
+ {異なる$n$個のものから$r$個選んで並べる場合の数は${}_{n}\text{P}_{r}=\bunsuu{n\階乗}{\Ttyuukakko{n-r}\階乗}$}{\relax}%
\ifthenelse{\equal{#1}{順列}\AND\equal{#2}{b}}%
{%
異なる$n$個のものから$r$個選んで並べる場合の数は%
- \[{}_{n}P_{r}=\bunsuu{n!}{\Ttyuukakko{n-r}!}\]%
+\[{}_{n}\text{P}_{r}=\bunsuu{n\階乗}{\Ttyuukakko{n-r}\階乗}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{順列の証明}}%
{%
\証明開始%
異なる$n$個のものから$r$個選んで並べる場合の数は,%
- \[n\times\Ttyuukakko{n-1}\times\Ttyuukakko{n-2}\times\cdots\Ttyuukakko{n-r+1}=\bunsuu{n!}{\Ttyuukakko{n-r}!}\]%
- ここで,$\bunsuu{n!}{\Ttyuukakko{n-r}!}$を${}_{n} P_{r}$と表す。%
+\[n\times\Ttyuukakko{n-1}\times\Ttyuukakko{n-2}\times\cdots\times\Ttyuukakko{n-r+1}=\bunsuu{n\階乗}{\Ttyuukakko{n-r}\階乗}\]%
+
+ ここで,$\bunsuu{n\階乗}{\Ttyuukakko{n-r}\階乗}$を${}_{n} P_{r}$と表す。%
\証明終了%
}%
{\relax}%
\ifthenelse{\equal{#1}{円順列}\AND\equal{#2}{i}}%
- {異なる$n$個のものを円に並べる場合の数は$\Ttyuukakko{n-1}!$}{\relax}%
+ {異なる$n$個のものを円に並べる場合の数は$\Ttyuukakko{n-1}\階乗 $}{\relax}%
\ifthenelse{\equal{#1}{円順列}\AND\equal{#2}{b}}%
- {異なる$n$個のものを円に並べる場合の数は\[\Ttyuukakko{n-1}!\]}{\relax}%
+ {異なる$n$個のものを円に並べる場合の数は\[\Ttyuukakko{n-1}\階乗\]}{\relax}%
\ifthenelse{\equal{#1}{円順列の証明}}%
{%
\証明開始%
- $n$個のものを円形に並べるとき,1つを固定して考えると,残り$n-1$個を並べる順列の個数に等しい。よって$\Ttyuukakko{n-1}!$通りとなる。%
+ $n$個のものを円形に並べるとき,1つを固定して考えると,残り$n-1$個を並べる順列の個数に等しい。よって$\Ttyuukakko{n-1}\階乗 $通りとなる。%
}%
{\relax}%
\ifthenelse{\equal{#1}{重複順列}\AND\equal{#2}{i}}%
- {$n$個から$r$個,重複を許して並べる場合の数は$n^r$}{\relax}%
+ {$n$個から$r$個,重複を許して並べる場合の数は$n^r$}{\relax}%
\ifthenelse{\equal{#1}{重複順列}\AND\equal{#2}{b}}%
- {$n$個から$r$個,重複を許して並べる場合の数は\[n^r\]}{\relax}%
+ {$n$個から$r$個,重複を許して並べる場合の数は\[n^r\]}{\relax}%
\ifthenelse{\equal{#1}{組み合わせ}\AND\equal{#2}{i}}%
- {異なる$n$個のものから$r$個選ぶ場合の数は,${}_{n}C_{r}=\bunsuu{n!}{r!\Ttyuukakko{n-r}!}$}{\relax}%
+ {異なる$n$個のものから$r$個選ぶ場合の数は,${}_{n}\text{C}_{r}=\bunsuu{n\階乗}{r\階乗\Ttyuukakko{n-r}\階乗}$}{\relax}%
\ifthenelse{\equal{#1}{組み合わせ}\AND\equal{#2}{b}}%
{%
異なる$n$個のものから$r$個選ぶ場合の数は,%
- \[{}_{n}C_{r}=\bunsuu{n!}{r!\Ttyuukakko{n-r}!}\]%
+\[{}_{n}\text{C}_{r}=\bunsuu{n\階乗}{r\階乗\Ttyuukakko{n-r}\階乗}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{組み合わせの証明}}%
{%
\証明開始%
異なる$n$個のものから$r$個選ぶ場合の数は,順列を重複度で割ったものなので%
- \[\bunsuu{{}_{n} P_{r}}{r!}=\bunsuu{n!}{r!\Ttyuukakko{n-r}!}\]%
- ここで,$\bunsuu{n!}{r!\Ttyuukakko{n-r}!}$を${}_{n}C_{r}$と表す。
- \証明終了%
+\[\bunsuu{{}_{n} P_{r}}{r\階乗}=\bunsuu{n\階乗}{r\階乗\Ttyuukakko{n-r}\階乗}\]%
+
+ ここで,$\bunsuu{n\階乗}{r\階乗\Ttyuukakko{n-r}\階乗}$を${}_{n}\text{C}_{r}$と表す。 \証明終了%
}%
{\relax}%
\ifthenelse{\equal{#1}{同じものを含む順列}\AND\equal{#2}{i}}%
- {$a$が$p$個,$b$が$q$個,$c$が$r$個,とあるとき,それら全部を並べる場合の数は,$\bunsuu{n!}{p!q!r!}$(ただし,$p+q+r=n$)}{\relax}%
+ {$a$が$p$個,$b$が$q$個,$c$が$r$個,とあるとき,それら全部を並べる場合の数は,$\bunsuu{n\階乗}{p\階乗 q\階乗 r\階乗}$(ただし,$p+q+r=n$)}{\relax}%
\ifthenelse{\equal{#1}{同じものを含む順列}\AND\equal{#2}{b}}%
{%
$a$が$p$個,$b$が$q$個,$c$が$r$個,とあるとき,それら全部を並べる場合の数は,%
- \[\bunsuu{n!}{p!q!r!}\text{\ (ただし,$p+q+r=n$)}\]%
+\[\bunsuu{n\階乗}{p\階乗 q\階乗 r\階乗}\text{\ (ただし,$p+q+r=n$)}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{同じものを含む順列の証明}}%
{%
\証明開始%
- $n$個のものを並べる場合の数は$n!$通りだが,$n$個の中に同じものが含まれているので,重複度で割ることで$\bunsuu{n!}{p!q!r!}$を得る。%
+ $n$個のものを並べる場合の数は$n\階乗 $通りだが,$n$個の中に同じものが含まれているので,重複度で割ることで$\bunsuu{n\階乗}{p\階乗 q\階乗 r\階乗}$を得る。%
\証明終了%
}%
{\relax}%
\ifthenelse{\equal{#1}{確率の定義}\AND\equal{#2}{i}}%
- {全事象$\text{U}$のどの根元事象も同様に確からしいとき,事象$\text{A}$の起こる確率は,$P\Ttyuukakko{A}=\bunsuu{n\Ttyuukakko{A}}{n\Ttyuukakko{U}}$}{\relax}%
+ {全事象$U$のどの根元事象も同様に確からしいとき,事象$A$の起こる確率は,$P\Ttyuukakko{A}=\bunsuu{n\Ttyuukakko{A}}{n\Ttyuukakko{U}}$}{\relax}%
\ifthenelse{\equal{#1}{確率の定義}\AND\equal{#2}{b}}%
{%
- 全事象$\text{U}$のどの根元事象も同様に確からしいとき,事象$\text{A}$の起こる確率は,%
- \[P\Ttyuukakko{A}=\bunsuu{n\Ttyuukakko{A}}{n\Ttyuukakko{U}}\]%
+ 全事象$U$のどの根元事象も同様に確からしいとき,事象$A$の起こる確率は,%
+\[P\Ttyuukakko{A}=\bunsuu{n\Ttyuukakko{A}}{n\Ttyuukakko{U}}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{排反の定義}\AND\equal{#2}{i}}%
- {事象$\text{A}$\数式カンマスペース$\text{B}$が同時に起こりえないとき,AとBは互いに排反であるという。}{\relax}%
+ {事象$A$\数式カンマスペース$B$が同時に起こりえないとき,$A$と$B$は互いに排反であるという。}{\relax}%
\ifthenelse{\equal{#1}{排反の定義}\AND\equal{#2}{b}}%
- {事象$\text{A}$\数式カンマスペース$\text{B}$が同時に起こりえないとき,AとBは互いに排反であるという。}{\relax}%
+ {事象$A$\数式カンマスペース$B$が同時に起こりえないとき,$A$と$B$は互いに排反であるという。}{\relax}%
\ifthenelse{\equal{#1}{確率の性質A}\AND\equal{#2}{i}}%
- {任意の事象$\text{A}$に対して,$0\leqq A\leqq1$}{\relax}%
+ {任意の事象$A$に対して,$0\leqq A\leqq1$}{\relax}%
\ifthenelse{\equal{#1}{確率の性質A}\AND\equal{#2}{b}}%
{%
- 任意の事象$\text{A}$に対して,%
- \[0\leqq A\leqq1\]%
+ 任意の事象$A$に対して,%
+\[0\leqq A\leqq1\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{確率の性質B}\AND\equal{#2}{i}}%
- {全事象$\text{U}$の確率$P\Ttyuukakko{U}=1$}{\relax}%
+ {全事象$U$の確率$P\Ttyuukakko{U}=1$}{\relax}%
\ifthenelse{\equal{#1}{確率の性質B}\AND\equal{#2}{b}}%
{%
- 全事象$\text{U}$の確率%
- \[P\Ttyuukakko{U}=1\]%
+ 全事象$U$の確率%
+\[P\Ttyuukakko{U}=1\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{和事象の確率}\AND\equal{#2}{i}}%
{$P\Ttyuukakko{A\cup B}=P\Ttyuukakko{A}+P\Ttyuukakko{B}-P\Ttyuukakko{A\cap B}$}{\relax}%
\ifthenelse{\equal{#1}{和事象の確率}\AND\equal{#2}{b}}%
- {\[P\Ttyuukakko{A\cup B}=P\Ttyuukakko{A}+P\Ttyuukakko{B}-P\Ttyuukakko{A\cap B}\]}{\relax}%
+ {\[P\Ttyuukakko{A\cup B}=P\Ttyuukakko{A}+P\Ttyuukakko{B}-P\Ttyuukakko{A\cap B}\]}{\relax}%
\ifthenelse{\equal{#1}{余事象の確率}\AND\equal{#2}{i}}%
- {$P\Ttyuukakko{\overline{A}}=1-P\Ttyuukakko{A}$}{\relax}%
+ {$P\Ttyuukakko{\共役{A}}=1-P\Ttyuukakko{A}$}{\relax}%
\ifthenelse{\equal{#1}{余事象の確率}\AND\equal{#2}{b}}%
- {\[P\Ttyuukakko{\overline{A}}=1-P\Ttyuukakko{A}\]}{\relax}%
+ {\[P\Ttyuukakko{\共役{A}}=1-P\Ttyuukakko{A}\]}{\relax}%
\ifthenelse{\equal{#1}{独立な事象の確率}\AND\equal{#2}{i}}%
- {事象$\text{A}$とBが独立のとき,事象$\text{A}$が起こりかつ事象$\text{B}$が起こる確率$p$は,$p=P\Ttyuukakko{A}P\Ttyuukakko{B}$}{\relax}%
+ {事象$A$と$B$が独立のとき,事象$A$が起こりかつ事象$B$が起こる確率$p$は,$p=P\Ttyuukakko{A}P\Ttyuukakko{B}$}{\relax}%
\ifthenelse{\equal{#1}{独立な事象の確率}\AND\equal{#2}{b}}%
{%
- 事象$\text{A}$とBが独立のとき,事象$\text{A}$が起こりかつ事象$\text{B}$が起こる確率$p$は,%
- \[p=P\Ttyuukakko{A}P\Ttyuukakko{B}\]%
+ 事象$A$と$B$が独立のとき,事象$A$が起こりかつ事象$B$が起こる確率$p$は,%
+\[p=P\Ttyuukakko{A}P\Ttyuukakko{B}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{反復試行の確率}\AND\equal{#2}{i}}%
- {一回の試行で事象$\text{A}$の起こる確率を$p$として,この試行を$n$回行う反復試行でAが$r$回起こる確率は,${}_{n}C_{r}\Ttyuukakko{p}^r\Ttyuukakko{1-p}^{n-r}$}{\relax}%
+ {一回の試行で事象$A$の起こる確率を$p$として,この試行を$n$回行う反復試行でAが$r$回起こる確率は,${}_{n}\text{C}_{r}\Ttyuukakko{p}^r\Ttyuukakko{1-p}^{n-r}$}{\relax}%
\ifthenelse{\equal{#1}{反復試行の確率}\AND\equal{#2}{b}}%
{%
- 一回の試行で事象$\text{A}$の起こる確率を$p$として,この試行を$n$回行う反復試行でAが$r$回起こる確率は,%
- \[{}_{n}C_{r}\Ttyuukakko{p}^r\Ttyuukakko{1-p}^{n-r}\]%
+ 一回の試行で事象$A$の起こる確率を$p$として,この試行を$n$回行う反復試行でAが$r$回起こる確率は,%
+\[{}_{n}\text{C}_{r}\Ttyuukakko{p}^r\Ttyuukakko{1-p}^{n-r}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{反復試行の確率の証明}}%
{%
\証明開始%
- $n$回の試行のうち事象$\text{A}$が$r$回起こる順番の場合の数は${}_{n} C_{r}$通り。さらに,Aが起こる確率は$p$で$r$回起こり,Aの余事象が起こる確率は$p-1$で$n-r$回起こるので,%
- \[{}_{n}C_{r}\Ttyuukakko{p}^r\Ttyuukakko{1-p}^{n-r}\]%
- となる。
- \証明終了%
+ $n$回の試行のうち事象$A$が$r$回起こる順番の場合の数は${}_{n} C_{r}$通り。さらに,Aが起こる確率は$p$で$r$回起こり,Aの余事象が起こる確率は$p-1$で$n-r$回起こるので,%
+\[{}_{n}\text{C}_{r}\Ttyuukakko{p}^r\Ttyuukakko{1-p}^{n-r}\]%
+
+ となる。 \証明終了%
}%
{\relax}%
\ifthenelse{\equal{#1}{条件付き確率}\AND\equal{#2}{i}}%
- {事象$\text{A}$が起こったときの事象$\text{B}$の起こる確率は,$P_{A}\Ttyuukakko{B}=\bunsuu{P\Ttyuukakko{A\cap B}}{P\Ttyuukakko{A}}$}{\relax}%
+ {事象$A$が起こったときの事象$B$の起こる確率は,$P_{A}\Ttyuukakko{B}=\bunsuu{P\Ttyuukakko{A\cap B}}{P\Ttyuukakko{A}}$}{\relax}%
\ifthenelse{\equal{#1}{条件付き確率}\AND\equal{#2}{b}}%
{%
- 事象$\text{A}$が起こったときの事象$\text{B}$の起こる確率は,%
- \[P_{A}\Ttyuukakko{B}=\bunsuu{P\Ttyuukakko{A\cap B}}{P\Ttyuukakko{A}}\]%
+ 事象$A$が起こったときの事象$B$の起こる確率は,%
+\[P_{A}\Ttyuukakko{B}=\bunsuu{P\Ttyuukakko{A\cap B}}{P\Ttyuukakko{A}}\]%
+
}%
{\relax}%
- }%
+ }%
\newcommand{\図形の性質}[1]%
@@ -955,7 +1212,7 @@
\空行%
図においてOが内心%
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{外心}}%
{%
\begin{tikzpicture}%
@@ -969,7 +1226,7 @@
\空行%
図においてOが外心%
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{垂心}}%
{%
\begin{tikzpicture}%
@@ -1069,15 +1326,15 @@
\end{tikzpicture}%
\空行%
図において三角形の面積比を考えると,%
- \[\bigtriangleup{ABO}:\bigtriangleup{ACO}=\mathrm{BP}:\mathrm{CP}\]%
- \[\Leftrightarrow\bunsuu{\bigtriangleup{ABO}}{\bigtriangleup{ACO}}=\bunsuu{BP}{PC}\]%
- 同様にして,%
- \[\bunsuu{\bigtriangleup{BCO}}{\bigtriangleup{BAO}}=\bunsuu{CQ}{QA}\]%
- \[\bunsuu{\bigtriangleup{CAO}}{\bigtriangleup{CBO}}=\bunsuu{AR}{RB}\]%
+\[\bigtriangleup{ABO}:\bigtriangleup{ACO}=\text{BP}:\text{CP}\]%
+\[\Leftrightarrow\bunsuu{\bigtriangleup{ABO}}{\bigtriangleup{ACO}}=\bunsuu{\text{BP}}{\text{PC}}\]%
+
+ 同様にして,$\bunsuu{\bigtriangleup{BCO}}{\bigtriangleup{BAO}}=\bunsuu{\text{CQ}}{\text{QA}}\数式カンマスペース\bunsuu{\bigtriangleup{CAO}}{\bigtriangleup{CBO}}=\bunsuu{\text{AR}}{\text{RB}}$%
+
ここで,%
- \[\bunsuu{\bigtriangleup{ABO}}{\bigtriangleup{ACO}}\cdot\bunsuu{\bigtriangleup{BCO}}{\bigtriangleup{BAO}}\cdot\bunsuu{\bigtriangleup{CAO}}{\bigtriangleup{CBO}}=1\]%
- \[\Leftrightarrow\bunsuu{\text{BP}}{\text{PC}}\cdot\bunsuu{\text{CQ}}{\text{QA}}\cdot\bunsuu{\text{AR}}{\text{RB}}=1\]%
- \証明終了%
+\[\bunsuu{\bigtriangleup{ABO}}{\bigtriangleup{ACO}}\cdot\bunsuu{\bigtriangleup{BCO}}{\bigtriangleup{BAO}}\cdot\bunsuu{\bigtriangleup{CAO}}{\bigtriangleup{CBO}}=1\]%
+\[\Leftrightarrow\bunsuu{\text{BP}}{\text{PC}}\cdot\bunsuu{\text{CQ}}{\text{QA}}\cdot\bunsuu{\text{AR}}{\text{RB}}=1\]%
+ \証明終了%
}%
{\relax}%
\ifthenelse{\equal{#1}{メネラウスの定理}}%
@@ -1114,9 +1371,9 @@
\draw(0.65,0.975)--(3,0);%
\end{tikzpicture}%
\空行%
- $\text{SC}/ \!/ \text{RP}$より,%
- \[\text{RA}:\text{SR}=\text{QA}:\text{CQ},\text{BR}:\text{RS}=\text{BP}:\text{PC}\]%
- \[\Leftrightarrow\bunsuu{\text{CQ}}{\text{QA}}=\bunsuu{\text{SR}}{\text{AR}},\bunsuu{\text{BP}}{\text{PC}}=\bunsuu{\text{BR}}{\text{RS}}\]%
+ $\text{SC}\平行\text{RP}$より,%
+\[\text{RA}:\text{SR}=\text{QA}:\text{CQ}\数式カンマスペース\text{BR}:\text{RS}=\text{BP}:\text{PC}\]%
+\[\Leftrightarrow\bunsuu{\text{CQ}}{\text{QA}}=\bunsuu{\text{SR}}{\text{AR}}\数式カンマスペース\bunsuu{\text{BP}}{\text{PC}}=\bunsuu{\text{BR}}{\text{RS}}\]%
\[\bunsuu{\text{BP}}{\text{PC}}\cdot\bunsuu{\text{CQ}}{\text{QA}}\cdot\bunsuu{\text{AR}}{\text{RB}}=\bunsuu{\text{BR}}{\text{RS}}\cdot\bunsuu{\text{SR}}{\text{AR}}
\cdot\bunsuu{\text{AR}}{\text{RB}}=1\]%
\証明終了%
@@ -1134,7 +1391,7 @@
\draw(0,0)circle[radius=2];%
\end{tikzpicture}%
\空行%
- $\angle\mathrm{APB}=\angle\mathrm{AQB}$%
+ $\angle\text{APB}=\angle\text{AQB}$%
}%
{\relax}%
\ifthenelse{\equal{#1}{円周角の定理の証明}}%
@@ -1153,10 +1410,12 @@
\end{tikzpicture}%
\空行%
$\triangle{\text{AOP}}$\数式カンマスペース$\triangle{\text{BOP}}$は二等辺三角形なので,%
- \[\angle\mathrm{APO}=\angle\mathrm{OAP}\数式カンマスペース\angle\mathrm{BPO}=\angle\mathrm{OBP}\]%
+\[\angle\text{APO}=\angle\text{OAP}\数式カンマスペース\angle\text{BPO}=\angle\text{OBP}\]%
+
外角定理より,%
- \[\angle\mathrm{AOD}=2\angle\mathrm{APO}\数式カンマスペース\angle\mathrm{BOD}=2\angle\mathrm{BPO}\]%
- \[\Leftrightarrow\angle\mathrm{AOB}=2\angle\mathrm{APB}\]%
+\[\angle\text{AOD}=2\angle\text{APO}\数式カンマスペース\angle\text{BOD}=2\angle\text{BPO}\]%
+\[\Leftrightarrow\angle\text{AOB}=2\angle\text{APB}\]%
+
\空行%
\begin{tikzpicture}%
\draw(-1.6,-1.2)--(1.6,-1.2)--(1.6,1.2)--cycle;%
@@ -1164,14 +1423,16 @@
\draw(-1.6,-1.2)node[left]{A};%
\draw(1.6,-1.2)node[right]{B};%
\draw(1.6,1.2)node[above]{P};%
- \draw(0,0)node[above]{O};%
+ \draw(0,0)node[above]{O};%
\draw(0,0)circle[radius=2];%
\end{tikzpicture}%
\空行%
$\triangle{\text{OPB}}$は二等辺三角形なので,%
- \[\angle\mathrm{OPB}=\angle\mathrm{OBP}\]%
+\[\angle\text{OPB}=\angle\text{OBP}\]%
+
外角定理より%
- \[\angle\mathrm{AOB}=2\angle\mathrm{OPB}\]%
+\[\angle\text{AOB}=2\angle\text{OPB}\]%
+
\空行%
\begin{tikzpicture}%
\draw(-1.6,-1.2)--(1.2,-1.6)--(0,0)--cycle;%
@@ -1180,19 +1441,21 @@
\draw(-1.6,-1.2)node[left]{A};%
\draw(1.2,-1.6)node[right]{B};%
\draw(0,0)node[above]{O};%
- \draw(2,0)node[right]{D};%
+ \draw(2,0)node[right]{D};%
\draw(-2,0)node[left]{Q};%
\draw(0,0)circle[radius=2];%
\end{tikzpicture}%
\空行%
$\triangle{\text{QOA}}\数式カンマスペース\triangle{\text{OQB}}$は二等辺三角形なので,%
- \[\angle\mathrm{OQA}=\angle\mathrm{OAQ}\数式カンマスペース\angle\mathrm{OQB}=\angle\mathrm{OBQ}\]%
+\[\angle\text{OQA}=\angle\text{OAQ}\数式カンマスペース\angle\text{OQB}=\angle\text{OBQ}\]%
+
外角定理より,%
- \[\angle\mathrm{OQA}+\angle\mathrm{OAQ}=\angle\mathrm{DOA}\数式カンマスペース\angle\mathrm{OQB}+\angle\mathrm{OBQ}=\angle\mathrm{DOB}\]%
- \[\Leftrightarrow\angle\mathrm{DOA}-\angle\mathrm{DOB}=2\Ttyuukakko{\angle\mathrm{OQA}-\angle\mathrm{BQO}}\]%
- \[\Leftrightarrow\angle\mathrm{AOB}=2\angle\mathrm{AQB}\]%
+\[\angle\text{OQA}+\angle\text{OAQ}=\angle\text{DOA}\数式カンマスペース\angle\text{OQB}+\angle\text{OBQ}=\angle\text{DOB}\]%
+\[\Leftrightarrow\angle\text{DOA}-\angle\text{DOB}=2\Ttyuukakko{\angle\text{OQA}-\angle\text{BQO}}\]%
+\[\Leftrightarrow\angle\text{AOB}=2\angle\text{AQB}\]%
+
従って,円に内接する三角形について,円周角の$2$倍が中心角である。%
- \空行%
+ \空行~\空行%
\begin{tikzpicture}%
\draw(-1.6,-1.2)--(1.2,-1.6)--(1.2,1.6)--cycle;%
\draw(-1.6,-1.2)--(1.2,-1.6)--(-2,0)--cycle;%
@@ -1204,8 +1467,9 @@
\draw(0,0)node[above]{O};%
\draw(0,0)circle[radius=2];%
\end{tikzpicture}%
- \[\angle\mathrm{APB}=2\angle\mathrm{AOB},\angle\mathrm{AQB}=2\angle\mathrm{AOB}\]%
- \[\Leftrightarrow\angle\mathrm{AQB}=\angle\mathrm{APB}\]が成立。
+ \空行%
+ 以上より,以下が成立。 \[\angle\text{APB}=2\angle\text{AOB},\angle\text{AQB}=2\angle\text{AOB}\]%
+\[\Leftrightarrow\angle\text{AQB}=\angle\text{APB}\]
\証明終了%
}%
{\relax}%
@@ -1223,7 +1487,7 @@
\draw(0,0)circle[radius=2];%
\end{tikzpicture}%
\空行%
- $\angle\mathrm{ADC}=\angle\mathrm{CBT}$%
+ $\angle\text{ADC}=\angle\text{CBT}$%
}%
{\relax}%
\ifthenelse{\equal{#1}{内接四角形の定理の証明}}%
@@ -1245,10 +1509,11 @@
\fill[black](O)circle(0.03);%
\end{tikzpicture}%
\空行%
- \[\angle\mathrm{AOC}=2\angle\mathrm{ABC}\]%
- \[\angle\mathrm{AOC}=2\angle\mathrm{ADC}\]%
- ここで,$\angle\mathrm{ABC}+\angle\mathrm{ADC}=180^\circ$%
- \[\Leftrightarrow\angle\mathrm{AOC}+\angle\mathrm{AOC}=180^\circ\]%
+\[\angle\text{AOC}=2\angle\text{ABC}\]%
+ \[\angle\text{AOC}=2\angle\text{ADC}\]%
+
+ ここで,$\angle\text{ABC}+\angle\text{ADC}=180^\circ$%
+\[\Leftrightarrow\angle\text{AOC}+\angle\text{AOC}=180^\circ\]%
\証明終了%
}%
{\relax}%
@@ -1265,7 +1530,7 @@
\draw(0,0)circle[radius=2];%
\end{tikzpicture}
\空行%
- $\angle\mathrm{BAT}=\angle\mathrm{ACB}$%
+ $\angle\text{BAT}=\angle\text{ACB}$%
}%
{\relax}%
\ifthenelse{\equal{#1}{接弦定理の証明}}%
@@ -1293,12 +1558,15 @@
\end{tikzpicture}%
\空行%
$\triangle{\text{ACB}}$と$\triangle{\text{ABE}}$について円周角の定理より,%
- \[\angle\mathrm{ACB}=\angle\mathrm{AEB}\]%
+ \[\angle\text{ACB}=\angle\text{AEB}\]%
+
ここで,$\triangle{\text{ABE}}$について%
- \[\angle\mathrm{BEA}+\angle\mathrm{BAE}=90^\circ\]%
- また,ATが円の接線なので$\angle\mathrm{BAE}+\angle\mathrm{BAT}=90^\circ$から,%
- \[\angle\mathrm{BAT}=\angle\mathrm{AEB}\]%
- \[\Leftrightarrow\angle\mathrm{ACB}=\angle\mathrm{BAT}\]%
+ \[\angle\text{BEA}+\angle\text{BAE}=90^\circ\]%
+
+ また,$\text{AT}$が円の接線なので$\angle\text{BAE}+\angle\text{BAT}=90^\circ$から,%
+ \[\angle\text{BAT}=\angle\text{AEB}\]%
+ \[\Leftrightarrow\angle\text{ACB}=\angle\text{BAT}\]%
+
\空行%
\item 直角のとき%
\空行
@@ -1318,8 +1586,9 @@
\end{tikzpicture}%
\空行%
ATが円の接線なので,%
- \[\angle\mathrm{EAS}=90^\circ\]%
- \[\Leftrightarrow\angle\mathrm{EBA}=\angle\mathrm{EAS}\]%
+ \[\angle\text{EAS}=90^\circ\]%
+ \[\Leftrightarrow\angle\text{EBA}=\angle\text{EAS}\]%
+
\空行%
\item 鈍角のとき%
\空行%
@@ -1335,10 +1604,12 @@
\end{tikzpicture}%
\空行%
鋭角のときの接弦定理より,%
- \[\angle\mathrm{BCA}=\angle\mathrm{BAS}\]%
+ \[\angle\text{BCA}=\angle\text{BAS}\]%
+
また,$\triangle{\text{ABC}}$において%
- \[\angle\mathrm{ABC}=\angle\mathrm{ACB}+\angle\mathrm{BAC}\]%
- \[\Leftrightarrow\angle\mathrm{ABC}=\angle\mathrm{CAT}\]%
+ \[\angle\text{ABC}=\angle\text{ACB}+\angle\text{BAC}\]%
+ \[\Leftrightarrow\angle\text{ABC}=\angle\text{CAT}\]%
+
\空行%
\end{enumerate}%
従って円に内接する三角形について成り立つことが証明された。%
@@ -1360,8 +1631,8 @@
\draw(6.3,0.950943395)node[above]{R};%
\end{tikzpicture}%
\空行%
- $\angle\mathrm{BAP}=\angle\mathrm{PAC},\angle\mathrm{CAQ}=\angle\mathrm{QAR}$のとき,\par%
- $\text{BP}:\text{PC}=\text{BQ}:\text{QC}=\text{AB}:\text{AC}$%
+ $\angle\text{BAP}=\angle\text{PAC},\angle\text{CAQ}=\angle\text{QAR}$のとき,%
+\[\text{BP}:\text{PC}=\text{BQ}:\text{QC}=\text{AB}:\text{AC}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{方べきの定理A}}%
@@ -1397,9 +1668,10 @@
\end{tikzpicture}%
\空行%
円周角の定理より,%
- \[\angle\mathrm{CAP}=\angle\mathrm{BDP},\quad\angle\mathrm{ACP}=\angle\mathrm{DBP}\]%
- $\triangle{\text{ACP}}$と$\triangle{\text{DBP}}$は相似なので,%
- \[\text{PA}\cdot\text{PB}=\text{PC}\cdot\text{PD}\]%
+\[\angle\text{CAP}=\angle\text{BDP},\quad\angle\text{ACP}=\angle\text{DBP}\]%
+
+ $\triangle{\text{ACP}}\相似\triangle{\text{DBP}}$より,%
+\[\text{PA}\cdot\text{PB}=\text{PC}\cdot\text{PD}\]%
\証明終了%
}%
{\relax}%
@@ -1435,9 +1707,10 @@
\end{tikzpicture}%
\空行%
内接四角形の証明より,%
- \[\angle\mathrm{CDB}=\angle\mathrm{CAP}\数式カンマスペース\angle\mathrm{DBA}=\angle\mathrm{PCA}\]%
- $\triangle{\text{ACP}}$と$\triangle{\text{DPB}}$は相似なので,%
- \[\text{PA}\cdot\text{PB}=\text{PC}\cdot\text{PD}\]%
+\[\angle\text{CDB}=\angle\text{CAP}\数式カンマスペース\angle\text{DBA}=\angle\text{PCA}\]%
+
+ $\triangle{\text{ACP}}\相似\triangle{\text{DPB}}$より,%
+\[\text{PA}\cdot\text{PB}=\text{PC}\cdot\text{PD}\]%
\証明終了%
}%
{\relax}%
@@ -1472,9 +1745,10 @@
\end{tikzpicture}%
\空行%
接弦定理より,%
- \[\angle\mathrm{TBA}=\angle\mathrm{PTA}\]%
- これと,$\angle\mathrm{P}$共通なので$\triangle{\text{PTA}}$と$\triangle{\text{PBT}}$は相似より,%
- \[\text{PA}\cdot\text{PB}=\text{PT}^2\]%
+\[\angle\text{TBA}=\angle\text{PTA}\]%
+
+ これと,$\angle\text{P}$は共通なので$\triangle{\text{PTA}}\相似\triangle{\text{PBT}}$より,%
+\[\text{PA}\cdot\text{PB}=\text{PT}^2\]%
\証明終了%
}%
{\relax}%
@@ -1487,15 +1761,15 @@
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
{$\Ttyuukakko{a+b}^{3}=a^{3}+3a^2b+3ab^2+b^{3}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{a+b}^{3}=a^{3}+3a^2b+3ab^2+b^{3}\]}{\relax}%
+ {\[\Ttyuukakko{a+b}^{3}=a^{3}+3a^2b+3ab^2+b^{3}\]}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
{$\Ttyuukakko{a-b}^{3}=a^{3}-3a^2b+3ab^2-b^{3}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{a-b}^{3}=a^{3}-3a^2b+3ab^2-b^{3}\]}{\relax}%
+ {\[\Ttyuukakko{a-b}^{3}=a^{3}-3a^2b+3ab^2-b^{3}\]}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
{$\Ttyuukakko{a+b}\Ttyuukakko{a^2-ab+b^2}=a^{3}+b^{3}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{a+b}\Ttyuukakko{a^2-ab+b^2}=a^{3}+b^{3}\]}{\relax}%
+ {\[\Ttyuukakko{a+b}\Ttyuukakko{a^2-ab+b^2}=a^{3}+b^{3}\]}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
{$\Ttyuukakko{a-b}\Ttyuukakko{a^2+ab+b^2}=a^{3}-b^{3}$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
@@ -1508,15 +1782,15 @@
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
{$a^{3}+b^{3}=\Ttyuukakko{a+b}\Ttyuukakko{a^2-ab+b^2}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
- {\[a^{3}+b^{3}=\Ttyuukakko{a+b}\Ttyuukakko{a^2-ab+b^2}\]}{\relax}%
+ {\[a^{3}+b^{3}=\Ttyuukakko{a+b}\Ttyuukakko{a^2-ab+b^2}\]}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
{$a^{3}-b^{3}=\Ttyuukakko{a-b}\Ttyuukakko{a^2+ab+b^2}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
- {\[a^{3}-b^{3}=\Ttyuukakko{a-b}\Ttyuukakko{a^2+ab+b^2}\]}{\relax}%
+ {\[a^{3}-b^{3}=\Ttyuukakko{a-b}\Ttyuukakko{a^2+ab+b^2}\]}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
{$a^{3}+3a^2b+3ab^2+b^{3}=\Ttyuukakko{a+b}^{3}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
- {\[a^{3}+3a^2b+3ab^2+b^{3}=\Ttyuukakko{a+b}^{3}\]}{\relax}%
+ {\[a^{3}+3a^2b+3ab^2+b^{3}=\Ttyuukakko{a+b}^{3}\]}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
{$a^{3}-3a^2b+3ab^2-b^{3}=\Ttyuukakko{a-b}^{3}$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
@@ -1527,18 +1801,19 @@
\NewDocumentCommand{\二項定理}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {$\Ttyuukakko{a+b}^{n}={}_{n}C_{0} a^{n}+{}_{n}C_{1} a^{n-1}b+{}_{n}C_{2} a^{n-2}b^2+....{}_{n}C_{n-1} ab^{n-1}+{}_{n}C_{n} b^{n}$}{\relax}%
+ {$\Ttyuukakko{a+b}^{n}={}_{n}\text{C}_{0} a^{n}+{}_{n}\text{C}_{1} a^{n-1}b+{}_{n}\text{C}_{2} a^{n-2}b^2+....{}_{n}\text{C}_{n-1} ab^{n-1}+{}_{n}\text{C}_{n} b^{n}$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{a+b}^{n}={}_{n}C_{0} a^{n}+{}_{n}C_{1} a^{n-1}b+{}_{n}C_{2} a^{n-2}b^2+....{}_{n}C_{n-1} ab^{n-1}+{}_{n}C_{n} b^{n}\]}{\relax}%
+ {\[\Ttyuukakko{a+b}^{n}={}_{n}\text{C}_{0} a^{n}+{}_{n}\text{C}_{1} a^{n-1}b+{}_{n}\text{C}_{2} a^{n-2}b^2+....{}_{n}\text{C}_{n-1} ab^{n-1}+{}_{n}\text{C}_{n} b^{n}\]}{\relax}%
\ifthenelse{\equal{#1}{一般項}\AND\equal{#2}{i}}%
- {${}_{n}C_{r}a^{n-r}b^{r}$}{\relax}%
+ {${}_{n}\text{C}_{r}a^{n-r}b^{r}$}{\relax}%
\ifthenelse{\equal{#1}{一般項}\AND\equal{#2}{b}}%
- {\[{}_{n}C_{r}a^{n-r}b^{r}\]}{\relax}%
+ {\[{}_{n}\text{C}_{r}a^{n-r}b^{r}\]}{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
$\Ttyuukakko{a+b}^{n}$を展開すると,$a^{r}b^{n-r}$の項の係数は$n$個の$a$から$r$個$a$を選ぶ場合の数に等しいので係数は${}_{n} C_{r}$よって,一般項は%
- \[{}_{n}C_{r}a^{n-r}b^{r}\]%
+\[{}_{n}\text{C}_{r}a^{n-r}b^{r}\]%
+
この$r$に$1$から順番に自然数を代入したものが二項定理となる。%
\証明終了%
}%
@@ -1551,15 +1826,15 @@
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
{$\bunsuu{A}{B}\times\bunsuu{C}{D}=\bunsuu{AC}{BD}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
- {\[\bunsuu{A}{B}\times\bunsuu{C}{D}=\bunsuu{AC}{BD}\]}{\relax}%
+ {\[\bunsuu{A}{B}\times\bunsuu{C}{D}=\bunsuu{AC}{BD}\]}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
{$\bunsuu{A}{B}\div \bunsuu{C}{D}=\bunsuu{AD}{BC}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
- {\[\bunsuu{A}{B}\div \bunsuu{C}{D}=\bunsuu{AD}{BC}\]}{\relax}%
+ {\[\bunsuu{A}{B}\div \bunsuu{C}{D}=\bunsuu{AD}{BC}\]}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
{$\bunsuu{A}{C}+\bunsuu{B}{C}=\bunsuu{A+B}{C}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
- {\[\bunsuu{A}{C}+\bunsuu{B}{C}=\bunsuu{A+B}{C}\]}{\relax}%
+ {\[\bunsuu{A}{C}+\bunsuu{B}{C}=\bunsuu{A+B}{C}\]}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
{$\bunsuu{A}{C}-\bunsuu{B}{C}=\bunsuu{A-B}{C}$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
@@ -1574,18 +1849,21 @@
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
$a>0\数式カンマスペース b>0$のとき,%
- \[\bunsuu{a+b}{2}\geqq\根号{ab}\]%
+\[\bunsuu{a+b}{2}\geqq\根号{ab}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
$a+b-2\根号{ab}\geqq0$を示す。%
- \[a+b-2\根号{ab}=\Ttyuukakko{\根号{a}-\根号{b}}^2\]%
+\[a+b-2\根号{ab}=\Ttyuukakko{\根号{a}-\根号{b}}^2\]%
+
より,$\根号{a}-\根号{b}$は実数なので,%
- \[\Ttyuukakko{\根号{a}-\根号{b}}^2\geqq0\]%
+\[\Ttyuukakko{\根号{a}-\根号{b}}^2\geqq0\]%
+
よって,$a>0\数式カンマスペース b>0$のとき,%
- \[\bunsuu{a+b}{2}\geqq\根号{ab}\text{\ (等号成立条件は$a=b$)}\]%
+\[\bunsuu{a+b}{2}\geqq\根号{ab}\text{\ (等号成立条件は$a=b$)}\]%
\証明終了%
}%
{\relax}%
@@ -1598,7 +1876,7 @@
{$i=\根号{-1}$}{\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{\[i=\根号{-1}\]}{\relax}%
- }%
+ }%
\NewDocumentCommand{\複素数の定義}{ m O{i} }%
@@ -1608,7 +1886,8 @@
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
実数$a\数式カンマスペース b$を用いて,%
- \[a+bi\]%
+\[a+bi\]%
+
}%
{\relax}%
}%
@@ -1617,7 +1896,7 @@
\newcommand{\二次方程式の解の判別}%
{%
$ax^2+bx+c=0\数式カンマスペース\Ttyuukakko{a\neq0}$の判別式を$D=b^2-4ac$とすると,%
- \phrases@math[l]%
+ \phrasesmath[l]%
{%
$D>0$のとき,異なる二つの実数解\\%
$D=0$のとき,重解\\%
@@ -1634,7 +1913,8 @@
\ifthenelse{\equal{#1}{二次方程式の解と係数の関係A}\AND\equal{#2}{b}}%
{%
$ax^2+bx+c=0 \Ttyuukakko{a\neq0}$の解を$\alpha\数式カンマスペース\beta$として,%
- \[\alpha+\beta=-\bunsuu{b}{a}\]%
+\[\alpha+\beta=-\bunsuu{b}{a}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{二次方程式の解と係数の関係B}\AND\equal{#2}{i}}%
@@ -1642,17 +1922,19 @@
\ifthenelse{\equal{#1}{二次方程式の解と係数の関係B}\AND\equal{#2}{b}}%
{%
$ax^2+bx+c=0 \Ttyuukakko{a\neq0}$の解を$\alpha\数式カンマスペース\beta$として,%
- \[\alpha\beta=\bunsuu{c}{a}\]%
+\[\alpha\beta=\bunsuu{c}{a}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{二次方程式の解と係数の関係の証明}}%
{%
\証明開始%
\vspace{-2.5\zw}%
- \[ax^2+bx+c=a\Ttyuukakko{x-\alpha}\Ttyuukakko{x-\beta}=a\Tdaikakko{x^2-\Ttyuukakko{\alpha+\beta}x+\alpha\beta}\]%
- \[\Leftrightarrow ax^2+bx+c=a\Ttyuukakko{x^2+\bunsuu{b}{a}x+\bunsuu{c}{a}}\]%
- 係数比較することで,%
- \[\alpha+\beta=-\bunsuu{b}{a}\数式カンマスペース\alpha\beta=\bunsuu{c}{a}\]%
+\[ax^2+bx+c=a\Ttyuukakko{x-\alpha}\Ttyuukakko{x-\beta}=a\Tdaikakko{x^2-\Ttyuukakko{\alpha+\beta}x+\alpha\beta}\]%
+\[\Leftrightarrow ax^2+bx+c=a\Ttyuukakko{x^2+\bunsuu{b}{a}x+\bunsuu{c}{a}}\]%
+
+ 係数比較法より,両辺同次の係数を比較して,%
+\[\alpha+\beta=-\bunsuu{b}{a}\数式カンマスペース\alpha\beta=\bunsuu{c}{a}\]%
\証明終了%
}%
{\relax}%
@@ -1661,32 +1943,35 @@
\ifthenelse{\equal{#1}{三次方程式の解と係数の関係A}\AND\equal{#2}{b}}%
{%
$ax^{3}+bx^2+cx+d=0\Ttyuukakko{a\neq0}$の解を$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$として,%
- \[\alpha+\beta+\gamma=-\bunsuu{b}{a}\]%
+\[\alpha+\beta+\gamma=-\bunsuu{b}{a}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{三次方程式の解と係数の関係B}\AND\equal{#2}{i}}%
{$ax^{3}+bx^2+cx+d=0\Ttyuukakko{a\neq0}$の解を$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$として,$\alpha\beta+\beta\gamma+\gamma\alpha=\bunsuu{c}{a}$}{\relax}%
\ifthenelse{\equal{#1}{三次方程式の解と係数の関係B}\AND\equal{#2}{b}}%
{%
$ax^{3}+bx^2+cx+d=0\Ttyuukakko{a\neq0}$の解を$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$として,%
- \[\alpha\beta+\beta\gamma+\gamma\alpha=\bunsuu{c}{a}\]
+\[\alpha\beta+\beta\gamma+\gamma\alpha=\bunsuu{c}{a}\]
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{三次方程式の解と係数の関係C}\AND\equal{#2}{i}}%
{$ax^{3}+bx^2+cx+d=0\Ttyuukakko{a\neq0}$の解を$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$として,$\alpha\beta\gamma=-\bunsuu{d}{a}$}{\relax}%
\ifthenelse{\equal{#1}{三次方程式の解と係数の関係C}\AND\equal{#2}{b}}%
{%
$ax^{3}+bx^2+cx+d=0\Ttyuukakko{a\neq0}$の解を$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$として,%
- \[\alpha\beta\gamma=-\bunsuu{d}{a}\]%
+\[\alpha\beta\gamma=-\bunsuu{d}{a}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{三次方程式の解と係数の関係の証明}}%
{%
\証明開始%
\vspace{-2.5\zw}%
- \[ax^{3}+bx^2+cx+d=a\Ttyuukakko{x-\alpha}\Ttyuukakko{x-\beta}\Ttyuukakko{x-\gamma}=a\Tdaikakko{x^3-\Ttyuukakko{\alpha+\beta+\gamma}x^2+\Ttyuukakko{\alpha\beta+\beta\gamma+\gamma\alpha}x-\alpha\beta\gamma}\]%
- \[\Leftrightarrow ax^{3}+bx^2+cx+d=a\Ttyuukakko{x^3+\bunsuu{b}{a}x^2+\bunsuu{c}{a}x+\bunsuu{d}{a}}\]%
- 係数比較することで,\par%
+\[ax^{3}+bx^2+cx+d=a\Ttyuukakko{x-\alpha}\Ttyuukakko{x-\beta}\Ttyuukakko{x-\gamma}=a\Tdaikakko{x^3-\Ttyuukakko{\alpha+\beta+\gamma}x^2+\Ttyuukakko{\alpha\beta+\beta\gamma+\gamma\alpha}x-\alpha\beta\gamma}\]%
+\[\Leftrightarrow ax^{3}+bx^2+cx+d=a\Ttyuukakko{x^3+\bunsuu{b}{a}x^2+\bunsuu{c}{a}x+\bunsuu{d}{a}}\]%
+
+ 係数比較法より,両辺同次の係数を比較して,%
\[\alpha+\beta+\gamma=-\bunsuu{b}{a}\数式カンマスペース\alpha\beta+\beta\gamma+\gamma\alpha=\bunsuu{c}{a}\数式カンマスペース\alpha\beta\gamma=-\bunsuu{d}{a}\]%
\証明終了%
}%
@@ -1701,7 +1986,7 @@
\ifthenelse{\equal{#1}{定理A}\AND\equal{#2}{b}}%
{%
整式 $P\Ttyuukakko{x}$を$x-k$で割った余りは%
- \[P\Ttyuukakko{k}\]%
+\[P\Ttyuukakko{k}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{定理B}\AND\equal{#2}{i}}%
@@ -1709,18 +1994,21 @@
\ifthenelse{\equal{#1}{定理B}\AND\equal{#2}{b}}%
{%
整式$P\Ttyuukakko{x}$を$ax-b$で割った余りは%
- \[P\Ttyuukakko{\bunsuu{b}{a}}\]%
+\[P\Ttyuukakko{\bunsuu{b}{a}}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
$P\Ttyuukakko{x}$を$\Ttyuukakko{x-k}$で割った商を$Q\Ttyuukakko{x}$あまりを$R$として,%
- \[P\Ttyuukakko{x}=\Ttyuukakko{x-k}Q\Ttyuukakko{x}+R\]%
+\[P\Ttyuukakko{x}=\Ttyuukakko{x-k}Q\Ttyuukakko{x}+R\]%
+
$x=k$のとき,%
- \[P\Ttyuukakko{k}=R\]%
+\[P\Ttyuukakko{k}=R\]%
+
よって,余りは%
- \[P\Ttyuukakko{k}\]%
+\[P\Ttyuukakko{k}\]%
\証明終了%
}%
{\relax}%
@@ -1737,14 +2025,16 @@
\ifthenelse{\equal{#1}{定理}\AND\equal{#2}{b}}%
{%
整式$P\Ttyuukakko{x}$が$x-k$を因数に持つ%
- \[\Leftrightarrow P\Ttyuukakko{k}=0\]%
+\[\Leftrightarrow P\Ttyuukakko{k}=0\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
剰余の定理より,$x-k$で割った余りが$0$なので,%
- \[P\Ttyuukakko{k}=0\]%
+\[P\Ttyuukakko{k}=0\]%
+
剰余の定理より,$P\Ttyuukakko{k}=0$ということは$P\Ttyuukakko{x}$を$x-k$で割った余りが$0$ということなので,$P\Ttyuukakko{x}$は$x-k$を因数に持つ。%
\証明終了%
}%
@@ -1759,23 +2049,25 @@
\ifthenelse{\equal{#1}{二点間の距離}\AND\equal{#2}{b}}%
{%
$\text{A}\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース \text{B}\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$\text{AB}$間の距離は,%
- \[\根号{\Ttyuukakko{x_{2}-x_{1}}^2-\Ttyuukakko{y_{2}-y_{1}}^2}\]%
+\[\根号{\Ttyuukakko{x_{2}-x_{1}}^2-\Ttyuukakko{y_{2}-y_{1}}^2}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{内分点の座標}\AND\equal{#2}{i}}%
{$\text{A}\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース \text{B}\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$\text{AB}$を$m:n$に内分する点の座標は,$\Ttyuukakko{\bunsuu{nx_{1}+mx_{2}}{n+m}\数式カンマスペース\bunsuu{ny_{1}+my_{2}}{n+m}}$}{\relax}%
\ifthenelse{\equal{#1}{内分点の座標}\AND\equal{#2}{b}}%
{%
$\text{A}\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース \text{B}\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$\text{AB}$を$m:n$に内分する点の座標は,%
- \[\Ttyuukakko{\bunsuu{nx_{1}+mx_{2}}{n+m}\数式カンマスペース\bunsuu{ny_{1}+my_{2}}{n+m}}\]%
+\[\Ttyuukakko{\bunsuu{nx_{1}+mx_{2}}{n+m}\数式カンマスペース\bunsuu{ny_{1}+my_{2}}{n+m}}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{内分点の座標の証明}}%
{%
\証明開始%
$m:n$に内分する点の座標を$\text{P}\Ttyuukakko{x\数式カンマスペース y}$として,%
- \[m:n=x-x_{1}:x_{2}-x\]%
- \[\Leftrightarrow\Ttyuukakko{\bunsuu{nx_{1}+mx_{2}}{n+m}\数式カンマスペース\bunsuu{ny_{1}+my_{2}}{n+m}}\]%
+\[m:n=x-x_{1}:x_{2}-x\]%
+\[\Leftrightarrow\Ttyuukakko{\bunsuu{nx_{1}+mx_{2}}{n+m}\数式カンマスペース\bunsuu{ny_{1}+my_{2}}{n+m}}\]%
\証明終了%
}%
{\relax}%
@@ -1784,7 +2076,8 @@
\ifthenelse{\equal{#1}{外分点の座標}\AND\equal{#2}{b}}%
{%
$\text{A}\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース \text{B}\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$\text{AB}$を$m:n$に外分する点の座標は,%
- \[\Ttyuukakko{\bunsuu{-nx_{1}+mx_{2}}{m-n}\数式カンマスペース \bunsuu{-ny_{1}+my_{2}}{m-n}}\]%
+\[\Ttyuukakko{\bunsuu{-nx_{1}+mx_{2}}{m-n}\数式カンマスペース \bunsuu{-ny_{1}+my_{2}}{m-n}}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{外分点の座標の証明}}%
@@ -1792,17 +2085,22 @@
\証明開始%
\vspace{-1\zw}%
\begin{enumerate}%
- \item $m>n$のとき\par%
+ \item $m>n$のとき%
+
$n:m$に外分する点の座標を$\text{P}\Ttyuukakko{x\数式カンマスペース y}$として,%
- \[m:n=x-x_{1}:x-x_{2}\]%
- \[\Leftrightarrow\Ttyuukakko{\bunsuu{-nx_{1}+mx_{2}}{m-n}\数式カンマスペース \bunsuu{-ny_{1}+my_{2}}{m-n}}\]%
- \item $m<n$のとき\par%
+\[m:n=x-x_{1}:x-x_{2}\]%
+\[\Leftrightarrow\Ttyuukakko{\bunsuu{-nx_{1}+mx_{2}}{m-n}\数式カンマスペース \bunsuu{-ny_{1}+my_{2}}{m-n}}\]%
+
+ \item $m<n$のとき%
+
$n:m$に外分する点の座標を$\text{P}\Ttyuukakko{x\数式カンマスペース y}$として,%
\[m:n=x-x_{2}:x-x_{1}\]%
\[\Leftrightarrow\Ttyuukakko{\bunsuu{-nx_{1}+mx_{2}}{m-n}\数式カンマスペース \bunsuu{-ny_{1}+my_{2}}{m-n}}\]%
+
\end{enumerate}%
- よって$m\数式カンマスペース n$の大小に依らず%
+ よって$m\数式カンマスペース n$の大小によらず%
\[\Ttyuukakko{\bunsuu{-nx_{1}+mx_{2}}{m-n}\数式カンマスペース \bunsuu{-ny_{1}+my_{2}}{m-n}}\]%
+
となる。%
\証明終了%
}%
@@ -1812,14 +2110,15 @@
\ifthenelse{\equal{#1}{中点の座標}\AND\equal{#2}{b}}%
{%
$\text{A}\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース \text{B}\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$\text{AB}$の中点は,%
- \[\Ttyuukakko{\bunsuu{x_{1}+x_{2}}{2}\数式カンマスペース\bunsuu{y_{1}+y_{2}}{2}}\]%
+\[\Ttyuukakko{\bunsuu{x_{1}+x_{2}}{2}\数式カンマスペース\bunsuu{y_{1}+y_{2}}{2}}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{中点の座標の証明}}%
{%
\証明開始%
内分点の公式において$m=n$のとき,%
- \[\Ttyuukakko{\bunsuu{x_{1}+x_{2}}{2}\数式カンマスペース\bunsuu{y_{1}+y_{2}}{2}}\]%
+\[\Ttyuukakko{\bunsuu{x_{1}+x_{2}}{2}\数式カンマスペース\bunsuu{y_{1}+y_{2}}{2}}\]%
\証明終了%
}%
{\relax}%
@@ -1828,15 +2127,17 @@
\ifthenelse{\equal{#1}{重心の座標}\AND\equal{#2}{b}}%
{%
$A\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース B\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}\数式カンマスペース C\Ttyuukakko{x_{3}\数式カンマスペース y_{3}}$として,$\triangle{\text{ABC}}$の重心の座標は,%
- \[\Ttyuukakko{\bunsuu{x_{1}+x_{2}+x_{3}}{3}\数式カンマスペース\bunsuu{y_{1}+y_{2}+y_{3}}{3}}\]%
+\[\Ttyuukakko{\bunsuu{x_{1}+x_{2}+x_{3}}{3}\数式カンマスペース\bunsuu{y_{1}+y_{2}+y_{3}}{3}}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{重心の座標の証明}}%
{%
\証明開始%
- $A$と$B$の中点$M$の座標は$\Ttyuukakko{\bunsuu{x_{1}+x_{2}}{2}\数式カンマスペース\bunsuu{y_{1}+y_{2}}{2}}$\par%
+ $A$と$B$の中点$M$の座標は$\Ttyuukakko{\bunsuu{x_{1}+x_{2}}{2}\数式カンマスペース\bunsuu{y_{1}+y_{2}}{2}}$%
+
重心は$CM$を$2:1$に内分するので,重心の座標は内分点の公式より,%
- \[\Ttyuukakko{\bunsuu{x_{1}+x_{2}+x_{3}}{3}\数式カンマスペース\bunsuu{y_{1}+y_{2}+y_{3}}{3}}\]%
+\[\Ttyuukakko{\bunsuu{x_{1}+x_{2}+x_{3}}{3}\数式カンマスペース\bunsuu{y_{1}+y_{2}+y_{3}}{3}}\]%
\証明終了%
}%
{\relax}%
@@ -1848,29 +2149,33 @@
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
{$ax+by+c=0$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
- {\[ax+by+c=0\]}{\relax}%
+ {\[ax+by+c=0\]}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
{点$\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}$を通り傾きが$m$の直線は,$y-y_{1}=m\Ttyuukakko{x-x_{1}}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
点$\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}$を通り傾きが$m$の直線は,%
- \[y-y_{1}=m\Ttyuukakko{x-x_{1}}\]%
+\[y-y_{1}=m\Ttyuukakko{x-x_{1}}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
{異なる二点$\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$を通る直線$\Ttyuukakko{x_{1}\neq x_{2}}$は,$y-y_{1}=\bunsuu{y_{2}-y_{1}}{x_{2}-x_{1}}\Ttyuukakko{x-x_{1}}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
{%
異なる二点$\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$を通る直線,$\Ttyuukakko{x_{1}\neq x_{2}}$は,%
- \[y-y_{1}=\bunsuu{y_{2}-y_{1}}{x_{2}-x_{1}}\Ttyuukakko{x-x_{1}}\]%
+\[y-y_{1}=\bunsuu{y_{2}-y_{1}}{x_{2}-x_{1}}\Ttyuukakko{x-x_{1}}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{公式Bの証明}}%
{%
\証明開始%
- 傾き$m$なので,$y=mx+a$と置ける(\,$a$は切片)。\par%
- ここで,$\Ttyuukakko{x_{1\数式カンマスペース x_{2}}}$を通るので,$y_{1}=mx_{1}+a$となり,連立することで%
- \[y-y_{1}=m\Ttyuukakko{x-x_{1}}\]%
+ 傾き$m$なので,$y=mx+a$と置ける(\,$a$は切片)。%
+
+ ここで,$\Ttyuukakko{x_{1}\数式カンマスペース x_{2}}$を通るので,$y_{1}=mx_{1}+a$となり,連立することで%
+\[y-y_{1}=m\Ttyuukakko{x-x_{1}}\]%
+
を得る。%
\証明終了%
}%
@@ -1885,23 +2190,26 @@
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
二直線$y=m_{1}x+n_{1}\数式カンマスペース y=m_{2}x+n_{2}$が平行%
- \[\Leftrightarrow m_{1}=m_{2}\]%
+\[\Leftrightarrow m_{1}=m_{2}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
{二直線$y=m_{1}x+n_{1}\数式カンマスペース y=m_{2}x+n_{2}$が垂直$\Leftrightarrow m_{1}m_{2}=-1$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
二直線$y=m_{1}x+n_{1}\数式カンマスペース y=m_{2}x+n_{2}$が垂直%
- \[\Leftrightarrow m_{1}m_{2}=-1\]%
+\[\Leftrightarrow m_{1}m_{2}=-1\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{公式Bの証明}}%
{%
\証明開始%
- $y=mx_{1}$上に点A$\Ttyuukakko{1\数式カンマスペース m_{1}}$\数式カンマスペース $y=mx_{2}$上にB$\Ttyuukakko{-m_{1}\数式カンマスペース 1}$をとる。\par%
+ $y=mx_{1}$上に点A$\Ttyuukakko{1\数式カンマスペース m_{1}}$\数式カンマスペース $y=mx_{2}$上にB$\Ttyuukakko{-m_{1}\数式カンマスペース 1}$をとる。%
+
H$\Ttyuukakko{1\数式カンマスペース 0}$\数式カンマスペース I$\Ttyuukakko{0\数式カンマスペース 1}$として,$\bigtriangleup{OAH}$と$\bigtriangleup{OBI}$は合同。よって,%
- \[m_{1}m_{2}=-1\]%
+\[m_{1}m_{2}=-1\]%
\証明終了%
}%
{\relax}%
@@ -1917,25 +2225,31 @@
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
点$\Ttyuukakko{x_{1}\数式カンマスペース y_{2}}$と直線$ax+bx+c=0$の距離は,%
- \[\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\根号{a^2+b^2}}\]%
+\[\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\根号{a^2+b^2}}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
- 全体を$x$軸方向に$-x_{1}$\数式カンマスペース $y$軸方向に$-y_{1}$平行移動するとき,直線$l$は$a\Ttyuukakko{x+x_{1}}+b\Ttyuukakko{y+y_{1}}+c=0$となる。\par%
+ 全体を$x$軸方向に$-x_{1}$\数式カンマスペース $y$軸方向に$-y_{1}$平行移動するとき,直線$l$は$a\Ttyuukakko{x+x_{1}}+b\Ttyuukakko{y+y_{1}}+c=0$となる。%
+
また,直線$l$に原点Oからおろした垂線との交点をHとする。ここでOH間の距離を$d$と置くと,%
\vspace{-1\zw}%
\begin{enumerate}%
- \item $a\neq0$のとき\par%
- 直線$l$の垂線の傾きは$b$の値に依らず,$y=\bunsuu{b}{a}$となる。\par%
+ \item $a\neq0$のとき%
+
+ 直線$l$の垂線の傾きは$b$の値によらず,$y=\bunsuu{b}{a}$となる。%
+
よって,Hの座標は二式を連立することで得られ,%
\[\Ttyuukakko{\bunsuu{-a\Ttyuukakko{ax_{1}+by_{1}+c}}{a^2+b^2}\数式カンマスペース\bunsuu{-b\Ttyuukakko{ax_{1}+by_{1}+c}}{a^2+b^2}}\]%
+
\begin{align*}%
\Leftrightarrow d&=\根号{\Tdaikakko{\Ttyuukakko{\bunsuu{-a\Ttyuukakko{ax_{1}+by_{1}+c}}{a^2+b^2}}^2+\Tdaikakko{\bunsuu{-b\Ttyuukakko{ax_{1}+by_{1}+c}}{a^2+b^2}}}^2}&\\%
&=\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\根号{a^2+b^2}} %
\end{align*}%
- \item $a=0$のとき\par%
+ \item $a=0$のとき%
+
直線$l$は$y=-\bunsuu{by_{1}+c}{b}$となるので,%
\begin{align*}%
d&=\Tzettaiti{-\bunsuu{by_{1}+c}{b}}&\\%
@@ -1944,7 +2258,8 @@
これは,$\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\根号{a^2+b^2}}$に$a=0$を代入したものである。
\end{enumerate}%
よって,いずれの場合も%
- \[\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\根号{a^2+b^2}}\]%
+\[\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\根号{a^2+b^2}}\]%
+
を得る。%
\証明終了%
}%
@@ -1955,13 +2270,15 @@
\NewDocumentCommand{\円の方程式}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {中心$\Ttyuukakko{a\数式カンマスペース b}$で半径$r$の円は,$\Ttyuukakko{x-a}^2+\Ttyuukakko{y-b}^2=r^2$と表す(\,$x^2+y^2+Ax+By+C=0\Ttyuukakko{A^2+B^2-4C>0}$の形でもよい)。}{\relax}%
+ {中心$\Ttyuukakko{a\数式カンマスペース b}$で半径$r$の円は,$\Ttyuukakko{x-a}^2+\Ttyuukakko{y-b}^2=r^2$と表す(通る$3$点がわかっている問題では,$x^2+y^2+Ax+By+C=0\Ttyuukakko{A^2+B^2-4C>0}$と置くこともある)。}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
中心$\Ttyuukakko{a\数式カンマスペース b}$で半径$r$の円は,%
- \[\Ttyuukakko{x-a}^2+\Ttyuukakko{y-b}^2=r^2\]%
+\[\Ttyuukakko{x-a}^2+\Ttyuukakko{y-b}^2=r^2\]%
+
また,円は%
- \[x^2+y^2+Ax+By+C=0\Ttyuukakko{A^2+B^2-4C>0}\]%
+\[x^2+y^2+Ax+By+C=0\Ttyuukakko{A^2+B^2-4C>0}\]%
+
とも表せられる。%
}%
{\relax}%
@@ -1969,7 +2286,7 @@
{%
\証明開始%
円の中心をO\数式カンマスペース 円周上の任意の点を$\text{P}\Ttyuukakko{x\数式カンマスペース y}$として,三平方の定理より%
- \[\Ttyuukakko{x-a}^2+\Ttyuukakko{y-b}^2=r^2\]%
+\[\Ttyuukakko{x-a}^2+\Ttyuukakko{y-b}^2=r^2\]%
\証明終了%
}%
{\relax}%
@@ -1979,11 +2296,12 @@
\NewDocumentCommand{\円と直線}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {円$x^2+y^2=r^2$上の点 $\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}$における接線の方程式は,$xx_{1}+yy_{1}=r^2$}{\relax}%
+ {円$x^2+y^2=r^2$上の点 $\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}$における接線の方程式は,$xx_{1}+yy_{1}=r^2$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
円$x^2+y^2=r^2$上の点 $\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}$における接線の方程式は,%
- \[xx_{1}+yy_{1}=r^2\]%
+\[xx_{1}+yy_{1}=r^2\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
@@ -1991,17 +2309,23 @@
\証明開始%
\vspace{-1\zw}%
\begin{enumerate}%
- \item $x_{0}\neq0\数式カンマスペース y_{0}\neq0$のとき\par%
+ \item $x_{0}\neq0\数式カンマスペース y_{0}\neq0$のとき%
+
$A\Ttyuukakko{x_{0}\数式カンマスペース y_{0}}$と置いて,OAの傾きは$\bunsuu{y_{0}}{x_{0}}$となる。接線の傾きはこれに垂直なので,$-\bunsuu{x_{0}}{y_{0}}$また接線は点$\Ttyuukakko{x_{0}\数式カンマスペース y_{0}}$を通るので%
- \[y=-\bunsuu{x_{0}}{y_{0}}\Ttyuukakko{x-x_{0}}+y_{0}\]%
- より,$\Ttyuukakko{x_{0}\数式カンマスペース y_{0}}$が$x^2+y^2=r^2$上に存在することに留意して,$x_{0}x+y_{0}y=r^2$となる。\par%
- \item $x_{0}\neq0$のとき\par%
- $y_{0}=\pm r$より接線は$y=\pm r\text{\ (複号同順)}$\par%
- \item $y_{0}=0$のとき\par%
+ \[y=-\bunsuu{x_{0}}{y_{0}}\Ttyuukakko{x-x_{0}}+y_{0}\]%
+
+ より,$\Ttyuukakko{x_{0}\数式カンマスペース y_{0}}$が$x^2+y^2=r^2$上に存在することに留意して,$x_{0}x+y_{0}y=r^2$となる。%
+
+ \item $x_{0}\neq0$のとき%
+
+ $y_{0}=\pm r$より接線は$y=\pm r\text{\ (複号同順)}$%
+
+ \item $y_{0}=0$のとき%
+
$x_{0}=\pm r$より接線は$x=\pm r\text{\ (複号同順)}$%
\end{enumerate}%
よって,接線の方程式は%
- \[xx_{1}+yy_{1}=r^2\]%
+\[xx_{1}+yy_{1}=r^2\]%
\証明終了%
}%
{\relax}%
@@ -2044,16 +2368,21 @@
\end{tikzpicture}%
\空行%
図において,$\sin\theta=\bunsuu{y}{r}\数式カンマスペース\quad\cos\theta=\bunsuu{x}{r}$より%
- \[\sin^2\theta+\cos^2\theta=\bunsuu{y^2+x^2}{r^2}\]%
- ここで,三平方の定理より$x^2+y^2=r^2$なので\par%
+\[\sin^2\theta+\cos^2\theta=\bunsuu{y^2+x^2}{r^2}\]%
+
+ ここで,三平方の定理より$x^2+y^2=r^2$なので%
+
$\sin^2\theta+\cos^2\theta=\bunsuu{r^2}{r^2}=1$%
\空行%
- $\sin\theta=\bunsuu{y}{r}\数式カンマスペース\quad\cos\theta=\bunsuu{x}{r}\quad\tan\theta=\bunsuu{y}{x}$より\par%
+ $\sin\theta=\bunsuu{y}{r}\数式カンマスペース\quad\cos\theta=\bunsuu{x}{r}\quad\tan\theta=\bunsuu{y}{x}$より%
+
$\bunsuu{\sin\theta}{\cos\theta}=\bunsuu{y}{x}=\tan\theta$%
\空行%
- $\sin^2\theta+\cos^2\theta=1$の両辺を$\cos^2\theta$で割ることで,\par%
+ $\sin^2\theta+\cos^2\theta=1$の両辺を$\cos^2\theta$で割ることで,%
\[\bunsuu{\sin^2\theta}{\cos^2\theta}+1=\bunsuu{1}{\cos^2\theta}\]%
- ここで,$\bunsuu{\sin\theta}{\cos\theta}=\tan\theta$なので\par%
+
+ ここで,$\bunsuu{\sin\theta}{\cos\theta}=\tan\theta$なので%
+
$\tan^2\theta+1=\bunsuu{1}{\cos^2\theta}$%
\証明終了%
}%
@@ -2164,26 +2493,36 @@
\end{tikzpicture}%
\空行%
図において,三角関数の性質より$\cos\Ttyuukakko{\beta-\alpha}=\cos\Ttyuukakko{\alpha-\beta}$なので,$\triangle{\text{QOP}}$について余弦定理より%
- \[\mathrm{QP}^2=1^2+1^2-2\cdot1\cdot1\cdot\cos\Ttyuukakko{\alpha-\beta}\]%
+\[\text{QP}^2=1^2+1^2-2\cdot1\cdot1\cdot\cos\Ttyuukakko{\alpha-\beta}\]%
+
また,QP間の距離について三平方の定理を用いて%
- \[\mathrm{QP}^2=\Ttyuukakko{\cos\beta-\cos\alpha}^2+\Ttyuukakko{\sin\alpha-\sin\beta}^2\]%
- \[\Leftrightarrow 2-2\cos\Ttyuukakko{\alpha-\beta}=\Ttyuukakko{\cos\beta-\cos\alpha}^2+\Ttyuukakko{\sin\alpha-\sin\beta}^2\]%
+\[\text{QP}^2=\Ttyuukakko{\cos\beta-\cos\alpha}^2+\Ttyuukakko{\sin\alpha-\sin\beta}^2\]%
+\[\Leftrightarrow 2-2\cos\Ttyuukakko{\alpha-\beta}=\Ttyuukakko{\cos\beta-\cos\alpha}^2+\Ttyuukakko{\sin\alpha-\sin\beta}^2\]%
+
両辺整理して,%
- \[\cos\Ttyuukakko{\alpha-\beta}=\cos\alpha\cos\beta+\sin\alpha\sin\beta\]%
- を得る。\par%
+\[\cos\Ttyuukakko{\alpha-\beta}=\cos\alpha\cos\beta+\sin\alpha\sin\beta\]%
+
+ を得る。%
+
また,$\sin-\theta=-\sin\theta$より,%
- \[\cos\Ttyuukakko{\alpha+\beta}=\cos\alpha\cos\beta-\sin\alpha\sin\beta\]%
+\[\cos\Ttyuukakko{\alpha+\beta}=\cos\alpha\cos\beta-\sin\alpha\sin\beta\]%
+
\空行%
- \[\cos\Ttyuukakko{\alpha-\beta}=\cos\alpha\cos\beta+\sin\alpha\sin\beta\]%
+\[\cos\Ttyuukakko{\alpha-\beta}=\cos\alpha\cos\beta+\sin\alpha\sin\beta\]%
+
において,$\alpha$を$\bunsuu{\pi}{2}-\alpha$にすることで,%
- \[\sin\Ttyuukakko{\alpha+\beta}=\sin\alpha \cos\beta+ \cos\alpha \sin\beta\]%
+\[\sin\Ttyuukakko{\alpha+\beta}=\sin\alpha \cos\beta+ \cos\alpha \sin\beta\]%
+
ここで,$\beta$を$-\beta$にすることで,%
- \[\sin\Ttyuukakko{\alpha-\beta}=\sin\alpha \cos\beta-\cos\alpha \sin\beta\]%
+\[\sin\Ttyuukakko{\alpha-\beta}=\sin\alpha \cos\beta-\cos\alpha \sin\beta\]%
+
\空行%
$\tan\theta=\bunsuu{\sin\theta}{\cos\theta}$より,%
- \[\tan\Ttyuukakko{\alpha\pm\beta}=\bunsuu{\sin\alpha \cos\beta\pm \cos\alpha \sin\beta}{\cos\alpha \cos\beta\mp \sin\alpha \sin\beta}\text{\ (複号同順)}\]%
+\[\tan\Ttyuukakko{\alpha\pm\beta}=\bunsuu{\sin\alpha \cos\beta\pm \cos\alpha \sin\beta}{\cos\alpha \cos\beta\mp \sin\alpha \sin\beta}\text{\ (複号同順)}\]%
+
両辺を$\cos\alpha\cos\beta$でわることで,%
- \[\tan\Ttyuukakko{\alpha\pm\beta}=\bunsuu{\tan\alpha \pm \tan\beta}{1\mp \tan\alpha \tan\beta}\text{\ (複号同順)}\]%
+\[\tan\Ttyuukakko{\alpha\pm\beta}=\bunsuu{\tan\alpha \pm \tan\beta}{1\mp \tan\alpha \tan\beta}\text{\ (複号同順)}\]%
+
を得る。%
\証明終了%
}%
@@ -2217,23 +2556,26 @@
{%
\証明開始%
三角関数の加法定理%
- \phrases@math[c]%
+ \phrasesmath[c]%
{%
$\sin\Ttyuukakko{\alpha+\beta}=\sin\alpha \cos\beta+\cos\alpha \sin\beta$\\%
$\cos\Ttyuukakko{\alpha+\beta}=\cos\alpha \cos\beta-\sin\alpha \sin\beta$\\%
$\tan\Ttyuukakko{\alpha+\beta}=\bunsuu{\tan\alpha+\tan\beta}{1-\tan\alpha \tan\beta}$%
}%
- において,$\alpha=\beta=\theta$として,\par%
- \hspace{3\zw}\phrases@math[c]%
+ において,$\alpha=\beta=\theta$として,%
+
+ \hspace{3\zw}\phrasesmath[c]%
{%
$\sin2\theta=2\sin\theta\cos\theta$\\%
$\cos2\theta=\cos^{2}\theta-\sin^{2}\theta$\\%
$\tan2\theta=\bunsuu{2\tan\theta}{1-\tan^{2}\theta}$%
}%
- を得る。\par%
+ を得る。%
+
また,$\cos2\theta=\cos^{2}\theta-\sin^{2}\theta$において,三角関数の相互関係$\sin^2\theta+\cos^2\theta=1$を用いて,%
- \[\cos2\theta=2\cos^{2}\theta-1\]%
- \[\Leftrightarrow\cos2\theta=1-2\sin^{2}\theta\]%
+\[\cos2\theta=2\cos^{2}\theta-1\]%
+\[\Leftrightarrow\cos2\theta=1-2\sin^{2}\theta\]%
+
を得る。%
\証明終了%
}%
@@ -2255,11 +2597,13 @@
{%
\証明開始%
三角関数の加法定理%
- \[\sin\Ttyuukakko{\alpha+\beta}=\sin\alpha \cos\beta+ \cos\alpha \sin\beta\]%
+\[\sin\Ttyuukakko{\alpha+\beta}=\sin\alpha \cos\beta+ \cos\alpha \sin\beta\]%
\[\cos\Ttyuukakko{\alpha+\beta}=\cos\alpha \cos\beta- \sin\alpha \sin\beta\]%
+
において,$\alpha=\theta\数式カンマスペース\beta=2\theta$のとき,%
- \[\sin3\theta=\sin\theta \cos2\theta+ \cos\theta \sin2\theta\]%
+\[\sin3\theta=\sin\theta \cos2\theta+ \cos\theta \sin2\theta\]%
\[\cos3\theta=\cos\theta\cos2\theta-\sin\theta\sin2\theta\]%
+
二倍角の公式と三角関数の相互関係より,%
\begin{align*}%
\sin3\theta&=\sin\theta\Ttyuukakko{1-2\sin^{2}\theta}+2\sin\theta\cos^2\theta&\\%
@@ -2300,13 +2644,15 @@
\cos\Ttyuukakko{\alpha-\beta}=\cos\alpha\cos\beta+\sin\alpha\sin\beta\shikimaru{4}%
\end{align*}
より,$\text{\ajMaru{1}}+\text{\ajMaru{2}}$から%
- \[\sin\alpha\cos\beta=\bunsuu{1}{2}\Tdaikakko{\sin\Ttyuukakko{\alpha+\beta}+\sin\Ttyuukakko{\alpha-\beta}}\]%
+\[\sin\alpha\cos\beta=\bunsuu{1}{2}\Tdaikakko{\sin\Ttyuukakko{\alpha+\beta}+\sin\Ttyuukakko{\alpha-\beta}}\]%
+
\半空行%
$\text{\ajMaru{3}}+\text{\ajMaru{4}}$から%
- \[\cos\alpha\cos\beta=\bunsuu{1}{2}\Tdaikakko{\cos\Ttyuukakko{\alpha+\beta}+\cos\Ttyuukakko{\alpha-\beta}}\]%
+\[\cos\alpha\cos\beta=\bunsuu{1}{2}\Tdaikakko{\cos\Ttyuukakko{\alpha+\beta}+\cos\Ttyuukakko{\alpha-\beta}}\]%
+
\半空行%
$\text{\ajMaru{4}}-\text{\ajMaru{3}}$から%
- \[\sin\alpha\sin\beta=\bunsuu{1}{2}\Tdaikakko{\cos\Ttyuukakko{\alpha-\beta}-\cos\Ttyuukakko{\alpha+\beta}}\]%
+\[\sin\alpha\sin\beta=\bunsuu{1}{2}\Tdaikakko{\cos\Ttyuukakko{\alpha-\beta}-\cos\Ttyuukakko{\alpha+\beta}}\]%
\証明終了%
}%
{\relax}%
@@ -2335,11 +2681,12 @@
{%
\証明開始%
三角関数の積和の公式%
- \[\sin\alpha\cos\beta=\bunsuu{1}{2}\Tdaikakko{\sin\Ttyuukakko{\alpha+\beta}+\sin\Ttyuukakko{\alpha-\beta}}\]%
+\[\sin\alpha\cos\beta=\bunsuu{1}{2}\Tdaikakko{\sin\Ttyuukakko{\alpha+\beta}+\sin\Ttyuukakko{\alpha-\beta}}\]%
\[\cos\alpha\cos\beta=\bunsuu{1}{2}\Tdaikakko{\cos\Ttyuukakko{\alpha+\beta}+\cos\Ttyuukakko{\alpha-\beta}}\]%
\[\sin\alpha\sin\beta=\bunsuu{1}{2}\Tdaikakko{\cos\Ttyuukakko{\alpha-\beta}-\cos\Ttyuukakko{\alpha+\beta}}\]%
+
において,$\alpha+\beta=A\数式カンマスペース\alpha-\beta=B$と置くことで,$\alpha=\bunsuu{A+B}{2}\数式カンマスペース\beta=\bunsuu{A-B}{2}$となるので,%
- \[\sin{A}+\sin{B}=2 \sin\bunsuu{A+B}{2}\cos\bunsuu{A-B}{2}\]%
+\[\sin{A}+\sin{B}=2 \sin\bunsuu{A+B}{2}\cos\bunsuu{A-B}{2}\]%
\[\sin{A}-\sin{B}=2 \cos\bunsuu{A+B}{2}\sin\bunsuu{A-B}{2}\]%
\[\cos{A}+\cos{B}=2 \cos\bunsuu{A+B}{2}\cos\bunsuu{A-B}{2}\]%
\[\cos{A}-\cos{B}=-2 \sin\bunsuu{A+B}{2}\sin\bunsuu{A-B}{2}\]%
@@ -2371,17 +2718,21 @@
{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
- \[a\sin\theta+b\cos\theta=\根号{a^2+b^2}\sin\Ttyuukakko{\theta+\alpha}\text{\ $\Ttyuukakko{\text{ただし,$\sin\alpha=\bunsuu{b}{\根号{a^2+b^2}}\数式カンマスペース\cos\alpha=\bunsuu{a}{\根号{a^2+b^2}}$}}$}\]%
+\[a\sin\theta+b\cos\theta=\根号{a^2+b^2}\sin\Ttyuukakko{\theta+\alpha}\text{\ $\Ttyuukakko{\text{ただし,$\sin\alpha=\bunsuu{b}{\根号{a^2+b^2}}\数式カンマスペース\cos\alpha=\bunsuu{a}{\根号{a^2+b^2}}$}}$}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
- 三角関数の加法定理\par%
+ 三角関数の加法定理%
+
$\sin\Ttyuukakko{\alpha+\beta}=\sin\alpha \cos\beta+ \cos\alpha \sin\beta$について,%
- \[\bunsuu{a}{\根号{a^2+b^2}}=\cos\alpha\数式カンマスペース\bunsuu{b}{\根号{a^2+b^2}}=\sin\alpha\]%
- とすることで,\par%
+\[\bunsuu{a}{\根号{a^2+b^2}}=\cos\alpha\数式カンマスペース\bunsuu{b}{\根号{a^2+b^2}}=\sin\alpha\]%
+
+ とすることで,%
\[a\sin\theta+b\cos\theta=\根号{a^2+b^2}\sin\Ttyuukakko{\theta+\alpha}\]%
+
となる。%
\証明終了%
}%
@@ -2395,8 +2746,8 @@
{$a>0$また$m\数式カンマスペース n$が正の整数,$r$が正の有理数のとき,$a^{\frac{m}{n}}=\sqrt[n]{a^{m}}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
- $a>0$また$m\数式カンマスペース n$が正の整数,$r$が正の有理数のとき,%
- \[a^{\frac{m}{n}}=\sqrt[n]{a^{m}}\]%
+ $a>0$また$m\数式カンマスペース n$が正の整数,$r$が正の有理数のとき,% \[a^{\frac{m}{n}}=\sqrt[n]{a^{m}}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
@@ -2404,7 +2755,8 @@
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
$a>0$また$n$が正の整数のとき,%
- \[a^{\frac{1}{n}}=\根号[n]{a}\]%
+\[a^{\frac{1}{n}}=\根号[n]{a}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
@@ -2412,7 +2764,8 @@
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
{%
$a>0$,$r$が正の有理数のとき,%
- \[a^{-r}=\bunsuu{1}{a^{r}}\]%
+\[a^{-r}=\bunsuu{1}{a^{r}}\]%
+
}%
{\relax}%
}%
@@ -2425,7 +2778,8 @@
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
$a>0$また,$r\数式カンマスペース s$は有理数のとき,%
- \[a^{r}a^{s}=a^{r+s}\]%
+\[a^{r}a^{s}=a^{r+s}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
@@ -2433,31 +2787,35 @@
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
$a>0$また,$r\数式カンマスペース s$は有理数のとき,%
- \[\Ttyuukakko{a^{r}}^{s}=a^{rs}\]%
+\[\Ttyuukakko{a^{r}}^{s}=a^{rs}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
{$a>0\数式カンマスペース b>0$また,$r$は有理数のとき,$\Ttyuukakko{ab}^{r}=a^{r}b^{r}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
{%
$a>0\数式カンマスペース b>0$また,$r$は有理数のとき,%
- \[\Ttyuukakko{ab}^{r}=a^{r}b^{r}\]%
+\[\Ttyuukakko{ab}^{r}=a^{r}b^{r}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
{$a>0$また,$r\数式カンマスペース s$は有理数のとき,$\bunsuu{a^{r}}{a^{s}}=a^{r-s}$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
{%
$a>0$また,$r\数式カンマスペース s$は有理数のとき,%
- \[\bunsuu{a^{r}}{a^{s}}=a^{r-s}\]%
+\[\bunsuu{a^{r}}{a^{s}}=a^{r-s}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{i}}%
{$a>0\数式カンマスペース b>0$また,$r$は有理数のとき,$\Ttyuukakko{\bunsuu{a}{b}}^{r}=\bunsuu{a^{r}}{b^{r}}$}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{b}}%
{%
$a>0\数式カンマスペース b>0$また,$r$は有理数のとき,%
- \[\Ttyuukakko{\bunsuu{a}{b}}^{r}=\bunsuu{a^{r}}{b^{r}}\]%
+\[\Ttyuukakko{\bunsuu{a}{b}}^{r}=\bunsuu{a^{r}}{b^{r}}\]%
+
}%
{\relax}%
}%
@@ -2467,17 +2825,17 @@
{%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
{%
- $a>0\数式カンマスペース b>0$で,$r\数式カンマスペース s$は有理数とする。\par%
- $a^{p}=M$ならば,$\log_{a}M$,$\log_{a}M \log_{a}M$ならば,$a^{p}=M$%
+ $a>0\数式カンマスペース b>0$で,$r\数式カンマスペース s$は有理数とすると,%
+ \phrasesmath{$a^{p}=M$ならば,$\log_{a}M$\\$\log_{a}M \log_{a}M$ならば,$a^{p}=M$}%
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
- $a>0\数式カンマスペース b>0$で,$r\数式カンマスペース s$は有理数とする。\par%
- $a^{p}=M$ならば,$\log_{a}M$\par%
- $\log_{a}M$ならば,$a^{p}=M$%
+ $a>0\数式カンマスペース b>0$で,$r\数式カンマスペース s$は有理数とすると,%
+\[a^{p}=M\Rightarrow\log_{a}M\数式カンマスペース\log_{a}M\Rightarrow a^{p}=M\]%
+
}%
- {\relax}%
+ {\relax}%
}%
@@ -2488,73 +2846,85 @@
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
$a>0\数式カンマスペース a\neq1$とするとき,%
- \[\log_{a}a=1\]%
+\[\log_{a}a=1\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
{$a>0\数式カンマスペース a\neq1$とするとき,$\log_{a}1=0$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
$a>0\数式カンマスペース a\neq1$とするとき,%
- \[\log_{a}1=0\]%
+\[\log_{a}1=0\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
{$a>0\数式カンマスペース a\neq1$とするとき,$\log_{a}\bunsuu{1}{a}=-1$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
{%
$a>0\数式カンマスペース a\neq1$とするとき,%
- \[\log_{a}\bunsuu{1}{a}=-1\]%
+\[\log_{a}\bunsuu{1}{a}=-1\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
{$a>0\数式カンマスペース a\neq1\数式カンマスペース M>0\数式カンマスペース N>0$とするとき,$\log_{a}MN=\log_{a}M+\log_{a}N$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
{%
$a>0\数式カンマスペース a\neq1\数式カンマスペース M>0\数式カンマスペース N>0$とするとき,%
- \[\log_{a}MN=\log_{a}M+\log_{a}N\]%
+\[\log_{a}MN=\log_{a}M+\log_{a}N\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{i}}%
{$a>0\数式カンマスペース a\neq1\数式カンマスペース M>0\数式カンマスペース N>0$とするとき,$\log_{a}\bunsuu{M}{N}=\log_{a}M-\log_{a}N$}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{b}}%
{%
$a>0\数式カンマスペース a\neq1\数式カンマスペース M>0\数式カンマスペース N>0$とするとき,%
- \[\log_{a}\bunsuu{M}{N}=\log_{a}M-\log_{a}N\]%
+\[\log_{a}\bunsuu{M}{N}=\log_{a}M-\log_{a}N\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式F}\AND\equal{#2}{i}}%
{$a>0\数式カンマスペース a\neq1\数式カンマスペース M>0\数式カンマスペース N>0$とするとき,$\log_{a}M^{k}=k\log_{a}M$}{\relax}%
\ifthenelse{\equal{#1}{公式F}\AND\equal{#2}{b}}%
{%
$a>0\数式カンマスペース a\neq1\数式カンマスペース M>0\数式カンマスペース N>0$とするとき,%
- \[\log_{a}M^{k}=k\log_{a}M\]%
+\[\log_{a}M^{k}=k\log_{a}M\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
- $p=\log_{a}M\数式カンマスペース q=\log_{a}N$として,\par%
- $MN=a^{p}a^{q}$指数法則より%
- \[MN=a^{p+q}\]%
- ここで,対数の定義より%
- \[\log_{a}MN=p+q\]%
-    \[\Leftrightarrow\log_{a}MN=\log_{a}M+\log_{a}N\]%
+ $p=\log_{a}M\数式カンマスペース q=\log_{a}N$として,$MN=a^{p}a^{q}$から,指数法則より%
+\[MN=a^{p+q}\]%
+
+ また,対数の定義より%
+\[\log_{a}MN=p+q\]%
+\[\Leftrightarrow\log_{a}MN=\log_{a}M+\log_{a}N\]%
+
\空行%
$p=\log_{a}M\数式カンマスペース q=\log_{a}N$として,%
- \[\bunsuu{M}{N}=\bunsuu{a^{p}}{a^{q}}\]%
+\[\bunsuu{M}{N}=\bunsuu{a^{p}}{a^{q}}\]%
+
指数法則より%
- \[\bunsuu{M}{N}=a^{p-q}\]%
+\[\bunsuu{M}{N}=a^{p-q}\]%
+
ここで,対数の定義より%
- \[\log_{a}\bunsuu{M}{N}=p-q\]%
- \[\Leftrightarrow\log_{a}\bunsuu{M}{N}=\log_{a}M-\log_{a}N\]%
+\[\log_{a}\bunsuu{M}{N}=p-q\]%
+\[\Leftrightarrow\log_{a}\bunsuu{M}{N}=\log_{a}M-\log_{a}N\]%
+
\空行%
$p=\log_{a}M$として,$a^{p}=M$より両辺$k$乗して%
- \[a^{pk}=M^{k}\]%
+\[a^{pk}=M^{k}\]%
+
対数を取ると%
- \[pk=\log_{a}M^{k}\]%
+\[pk=\log_{a}M^{k}\]%
+
$p=\log_{a}M$より,%
- \[\log_{a}M^{k}=k\log_{a}M\]%
+\[\log_{a}M^{k}=k\log_{a}M\]%
\証明終了%
}%
{\relax}%
@@ -2564,23 +2934,27 @@
\NewDocumentCommand{\底の変換公式}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {$a\数式カンマスペース b\数式カンマスペース c$は正の実数で,$a\neq1\数式カンマスペース b\neq1\数式カンマスペース c\neq1$のとき,$\log_{a}b=\bunsuu{\log_{c}b}{\log_{c}a}$}{\relax}%
+ {$a\数式カンマスペース b\数式カンマスペース c$は正の実数で,$a\neq1\数式カンマスペース b\neq1\数式カンマスペース c\neq1$のとき,$\log_{a}b=\bunsuu{\log_{c}b}{\log_{c}a}$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
$a\数式カンマスペース b\数式カンマスペース c$は正の実数で,$a\neq1\数式カンマスペース b\neq1\数式カンマスペース c\neq1$のとき,%
- \[\log_{a}b=\bunsuu{\log_{c}b}{\log_{c}a}\]%
+\[\log_{a}b=\bunsuu{\log_{c}b}{\log_{c}a}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
- 対数の定義より$a^{\log_{a}b}=b$が成立。\par%
+ 対数の定義より$a^{\log_{a}b}=b$が成立。%
+
底が$c$の対数を取ると,%
- \[\log_{c}a^{\log_{a}b}=\log_{c}b\]%
+\[\log_{c}a^{\log_{a}b}=\log_{c}b\]%
+
対数の性質より,%
- \[\log_{a}b\log_{c}a=\log_{c}b\]%
+\[\log_{a}b\log_{c}a=\log_{c}b\]%
+
よって,%
- \[\log_{a}b=\bunsuu{\log_{c}b}{\log_{c}a}\]%
+\[\log_{a}b=\bunsuu{\log_{c}b}{\log_{c}a}\]%
\証明終了%
}%
{\relax}%
@@ -2593,7 +2967,7 @@
{$f'\Ttyuukakko{x}=\displaystyle\lim_{h \to 0}\bunsuu{f\Ttyuukakko{x+h}-f\Ttyuukakko{x}}{h}$}{\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{\[f'\Ttyuukakko{x}=\displaystyle\lim_{h \to 0}\bunsuu{f\Ttyuukakko{x+h}-f\Ttyuukakko{x}}{h}\]}{\relax}%
- }%
+ }%
\NewDocumentCommand{\べき乗関数と定数関数の導関数}{ m O{i} }%
@@ -2601,7 +2975,7 @@
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
{$\Ttyuukakko{x^{n}}'=nx^{n-1}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{x^{n}}'=nx^{n-1}\]}{\relax}%
+ {\[\Ttyuukakko{x^{n}}'=nx^{n-1}\]}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
{$\Ttyuukakko{c}'=0$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
@@ -2609,15 +2983,17 @@
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
- 導関数の定義より,\par%
- \[\Ttyuukakko{x^{n}}'=\displaystyle\lim_{h \to 0}\bunsuu{\Ttyuukakko{x+h}^{n}-x^{n}}{h}\]%
- 二項定理より,\par%
+ 導関数の定義より,%
+\[\Ttyuukakko{x^{n}}'=\displaystyle\lim_{h \to 0}\bunsuu{\Ttyuukakko{x+h}^{n}-x^{n}}{h}\]%
+
+ 二項定理より,%
+
\begin{align*}%
\Ttyuukakko{x^{n}}'&=\displaystyle\lim_{h \to 0} \bunsuu{\Ttyuukakko{x+h}^{n}-x^{n}}{h}&\\%
- &=\displaystyle\lim_{h \to 0}\bunsuu{{}_{n}C_{0} x^{n}+{}_{n}C_{1} x^{n-1}h+{}_{n}C_{2}x^{n-2}h^2+\cdots\cdot{}_{n}C_{n-1} xh^{n-1}+{}_{n}C_{n} h^{n}-x^{n}}{h}&\\%
- &=\displaystyle\lim_{h \to 0}\Ttyuukakko{{}_{n}C_{1} x^{n-1}+{}_{n}C_{2}x^{n-2}h+\cdots+{}_{n}C_{n-1} xh^{n-2}+{}_{n}C_{n} h^{n-1}}&\\%
- &=\displaystyle\lim_{h \to 0}\Tdaikakko{{}_{n}C_{1} x^{n-1}+\Ttyuukakko{{}_{n}C_{2}x^{n-2}+\cdots\cdot{}_{n}C_{n-1} xh^{n-3}+{}_{n}C_{n} h^{n-2}}h}&\\%
- &={}_{n}C_{1} x^{n-1}&\\%
+ &=\displaystyle\lim_{h \to 0}\bunsuu{{}_{n}\text{C}_{0} x^{n}+{}_{n}\text{C}_{1} x^{n-1}h+{}_{n}\text{C}_{2}x^{n-2}h^2+\cdots\cdot{}_{n}\text{C}_{n-1} xh^{n-1}+{}_{n}\text{C}_{n} h^{n}-x^{n}}{h}&\\%
+ &=\displaystyle\lim_{h \to 0}\Ttyuukakko{{}_{n}\text{C}_{1} x^{n-1}+{}_{n}\text{C}_{2}x^{n-2}h+\cdots+{}_{n}\text{C}_{n-1} xh^{n-2}+{}_{n}\text{C}_{n} h^{n-1}}&\\%
+ &=\displaystyle\lim_{h \to 0}\Tdaikakko{{}_{n}\text{C}_{1} x^{n-1}+\Ttyuukakko{{}_{n}\text{C}_{2}x^{n-2}+\cdots\cdot{}_{n}\text{C}_{n-1} xh^{n-3}+{}_{n}\text{C}_{n} h^{n-2}}h}&\\%
+ &={}_{n}\text{C}_{1} x^{n-1}&\\%
&=nx^{n-1}%
\end{align*}%
\証明終了%
@@ -2631,11 +3007,11 @@
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
{${kf\Ttyuukakko{x}}'=kf'\Ttyuukakko{x}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
- {\[{kf\Ttyuukakko{x}}'=kf'\Ttyuukakko{x}\]}{\relax}%
+ {\[{kf\Ttyuukakko{x}}'=kf'\Ttyuukakko{x}\]}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
{${f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}'=f'\Ttyuukakko{x}\pm g'\Ttyuukakko{x}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
- {\[{f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}'=f'\Ttyuukakko{x}\pm g'\Ttyuukakko{x}\]}{\relax}%
+ {\[{f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}'=f'\Ttyuukakko{x}\pm g'\Ttyuukakko{x}\]}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
{${kf\Ttyuukakko{x}+lg\Ttyuukakko{x}}'=kf'\Ttyuukakko{x}+lg'\Ttyuukakko{x}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
@@ -2646,55 +3022,58 @@
\NewDocumentCommand{\接線の方程式}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {曲線$y=f\Ttyuukakko{x}$上の点$\Ttyuukakko{a\数式カンマスペース f\Ttyuukakko{a}}$における曲線の接線の方程式は,$y-f\Ttyuukakko{a}=f'\Ttyuukakko{x}\Ttyuukakko{x-a}$}{\relax}%
+ {曲線$y=f\Ttyuukakko{x}$上の点$\Ttyuukakko{a\数式カンマスペース f\Ttyuukakko{a}}$における曲線の接線の方程式は,$y-f\Ttyuukakko{a}=f'\Ttyuukakko{x}\Ttyuukakko{x-a}$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
曲線$y=f\Ttyuukakko{x}$上の点$\Ttyuukakko{a\数式カンマスペース f\Ttyuukakko{a}}$における曲線の接線の方程式は,%
- \[y-f\Ttyuukakko{a}=f'\Ttyuukakko{x}\Ttyuukakko{x-a}\]%
+\[y-f\Ttyuukakko{a}=f'\Ttyuukakko{x}\Ttyuukakko{x-a}\]%
+
}%
- {\relax}%
+ {\relax}%
}%
\NewDocumentCommand{\不定積分の定義}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
- {$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$のとき,$\displaystyle\int_{}^{} f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C\text{($C$は積分定数)}$}{\relax}%
+ {$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$のとき,$\displaystyle\int_{}^{}f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C\text{($C$は積分定数)}$}{\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$のとき,%
- \[\int_{}^{} f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C\text{\ (\,$C$は積分定数)}\]%
+\[\int_{}^{}f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C\text{\ (\,$C$は積分定数)}\]%
+
}%
{\relax}%
}%
-\NewDocumentCommand{\べき乗関数の不定積分}{ m O{i} }%
- {%
- \ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {$\displaystyle\int_{}^{} x^{n}dx=\bunsuu{1}{n+1}x^{n+1}+C\text{\ (\,$C$は積分定数)}$}{\relax}%
- \ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
- {%
- \[\int_{}^{} x^{n}dx=\bunsuu{1}{n+1}x^{n+1}+C\text{\ (\,$C$は積分定数)}\]%
- }%
- {\relax}%
- }%
+%\NewDocumentCommand{\べき乗関数の不定積分}{ m O{i} }%
+ %{%
+ %\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
+ %{$\displaystyle\int_{}^{}x^{n}dx=\bunsuu{1}{n+1}x^{n+1}+C\text{\ (\,$C$は積分定数)}$}{\relax}%
+ %\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
+ %{%
+ %\[\int_{}^{}x^{n}dx=\bunsuu{1}{n+1}x^{n+1}+C\text{\ (\,$C$は積分定数)}\]%
+
+ %}%
+ %{\relax}%
+ %}%
\NewDocumentCommand{\不定積分の性質}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$\displaystyle\int_{}^{} kf\Ttyuukakko{x}dx=k\displaystyle \int_{}^{} f\Ttyuukakko{x}dx$}{\relax}%
+ {$\displaystyle\int_{}^{}kf\Ttyuukakko{x}dx=k\displaystyle\int_{}^{}f\Ttyuukakko{x}dx$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
- {\[\int_{}^{} kf\Ttyuukakko{x}dx=k\int_{}^{} f\Ttyuukakko{x}dx\]}{\relax}%
+ {\[\int_{}^{}kf\Ttyuukakko{x}dx=k\int_{}^{}f\Ttyuukakko{x}dx\]}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$\displaystyle\int_{}^{} {f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}dx=\displaystyle \int_{}^{} f\Ttyuukakko{x}dx\pm\displaystyle \int_{}^{} g\Ttyuukakko{x}dx$}{\relax}%
+ {$\displaystyle\int_{}^{}{f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}dx=\displaystyle\int_{}^{}f\Ttyuukakko{x}dx\pm\displaystyle\int_{}^{}g\Ttyuukakko{x}dx\text{\ (複号同順)}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
- {\[\int_{}^{} {f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}dx=\int_{}^{} f\Ttyuukakko{x}dx\pm\int_{}^{} g\Ttyuukakko{x}dx\]}{\relax}%
+ {\[\int_{}^{}{f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}dx=\int_{}^{}f\Ttyuukakko{x}dx\pm\int_{}^{}g\Ttyuukakko{x}dx\text{\ (複号同順)}\]}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
- {$\displaystyle\int_{}^{} {kf\Ttyuukakko{x}+lg\Ttyuukakko{x}}dx=k\displaystyle \int_{}^{} f\Ttyuukakko{x}dx+l\displaystyle \int_{}^{} g\Ttyuukakko{x}$}{\relax}%
+ {$\displaystyle\int_{}^{}{kf\Ttyuukakko{x}+lg\Ttyuukakko{x}}dx=k\displaystyle\int_{}^{}f\Ttyuukakko{x}dx+l\displaystyle\int_{}^{}g\Ttyuukakko{x}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
- {\[\int_{}^{} {kf\Ttyuukakko{x}+lg\Ttyuukakko{x}}dx=k\int_{}^{} f\Ttyuukakko{x}dx+l\int_{}^{} g\Ttyuukakko{x}\]}{\relax}%
+ {\[\int_{}^{}{kf\Ttyuukakko{x}+lg\Ttyuukakko{x}}dx=k\int_{}^{}f\Ttyuukakko{x}dx+l\int_{}^{}g\Ttyuukakko{x}\]}{\relax}%
}%
@@ -2705,7 +3084,8 @@
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
曲線$y=f\Ttyuukakko{x}$と$x$軸(区間は$a$から$b$)に囲まれた部分の面積$S$について,$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$のとき,%
- \[S=\int_{b}^{a} f\Ttyuukakko{x}dx=[F\Ttyuukakko{x}]^{b}_{a}=F\Ttyuukakko{b}-F\Ttyuukakko{a}\]%
+\[S=\int_{b}^{a} f\Ttyuukakko{x}dx=[F\Ttyuukakko{x}]^{b}_{a}=F\Ttyuukakko{b}-F\Ttyuukakko{a}\]%
+
}%
{\relax}%
}%
@@ -2716,19 +3096,19 @@
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
{$\displaystyle\int_{b}^{a} kf\Ttyuukakko{x}dx=k\int_{b}^{a} f\Ttyuukakko{x}dx$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
- {\[\int_{b}^{a} kf\Ttyuukakko{x}dx=k\int_{b}^{a} f\Ttyuukakko{x}dx\]}{\relax}%
+ {\[\int_{b}^{a} kf\Ttyuukakko{x}dx=k\int_{b}^{a} f\Ttyuukakko{x}dx\]}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$\displaystyle\int_{b}^{a} {f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}dx=\int_{b}^{a} f\Ttyuukakko{x}dx\pm\int_{b}^{a} g\Ttyuukakko{x}dx$}{\relax}%
+ {$\displaystyle\int_{b}^{a}{f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}dx=\int_{b}^{a} f\Ttyuukakko{x}dx\pm\int_{b}^{a} g\Ttyuukakko{x}dx$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
- {\[\int_{b}^{a} {f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}dx=\int_{b}^{a} f\Ttyuukakko{x}dx\pm\int_{b}^{a} g\Ttyuukakko{x}dx\]}{\relax}%
+ {\[\int_{b}^{a}{f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}dx=\int_{b}^{a} f\Ttyuukakko{x}dx\pm\int_{b}^{a} g\Ttyuukakko{x}dx\]}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
{$\displaystyle\int_{a}^{a} f\Ttyuukakko{x}dx=0$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
- {\[\int_{a}^{a} f\Ttyuukakko{x}dx=0\]}{\relax}%
+ {\[\int_{a}^{a} f\Ttyuukakko{x}dx=0\]}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
{$\displaystyle\int_{b}^{a} f\Ttyuukakko{x}dx=-\int_{a}^{b} f\Ttyuukakko{x}dx$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
- {\[\int_{b}^{a} f\Ttyuukakko{x}dx=-\int_{a}^{b} f\Ttyuukakko{x}dx\]}{\relax}%
+ {\[\int_{b}^{a} f\Ttyuukakko{x}dx=-\int_{a}^{b} f\Ttyuukakko{x}dx\]}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{i}}%
{$\displaystyle\int_{b}^{a} f\Ttyuukakko{x}dx=\int_{a}^{c} f\Ttyuukakko{x}dx+\int_{c}^{b} f\Ttyuukakko{x}dx$}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{b}}%
@@ -2739,84 +3119,90 @@
\NewDocumentCommand{\ベクトルの演算}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$k\数式カンマスペース l$が実数のとき,$\ベクトル{a}+\ベクトル{b}=\ベクトル{b}+\ベクトル{a}$}{\relax}%
+ {$k\数式カンマスペース l$が実数のとき,$\ベクトル{a}+\ベクトル{b}=\ベクトル{b}+\ベクトル{a}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
$k\数式カンマスペース l$が実数のとき%
- \[\ベクトル{a}+\ベクトル{b}=\ベクトル{b}+\ベクトル{a}\]%
+\[\ベクトル{a}+\ベクトル{b}=\ベクトル{b}+\ベクトル{a}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$k\数式カンマスペース l$が実数のとき,$\Ttyuukakko{\ベクトル{a}+\ベクトル{b}}+\ベクトル{c}=\ベクトル{a}+\Ttyuukakko{\ベクトル{b}+\ベクトル{c}}$}{\relax}%
+ {$k\数式カンマスペース l$が実数のとき,$\Ttyuukakko{\ベクトル{a}+\ベクトル{b}}+\ベクトル{c}=\ベクトル{a}+\Ttyuukakko{\ベクトル{b}+\ベクトル{c}}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
$k\数式カンマスペース l$が実数のとき%
- \[\Ttyuukakko{\ベクトル{a}+\ベクトル{b}}+\ベクトル{c}=\ベクトル{a}+\Ttyuukakko{\ベクトル{b}+\ベクトル{c}}\]%
+\[\Ttyuukakko{\ベクトル{a}+\ベクトル{b}}+\ベクトル{c}=\ベクトル{a}+\Ttyuukakko{\ベクトル{b}+\ベクトル{c}}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
{$\ベクトル{a}+\Ttyuukakko{a\ベクトル{a}}=\ベクトル{0}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
- {\[\ベクトル{a}+\Ttyuukakko{a\ベクトル{a}}=\ベクトル{0}\]}{\relax}%
+ {\[\ベクトル{a}+\Ttyuukakko{a\ベクトル{a}}=\ベクトル{0}\]}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
{$\ベクトル{a}+\ベクトル{0}=\ベクトル{a}$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
- {\[\ベクトル{a}+\ベクトル{0}=\ベクトル{a}\]}{\relax}%
+ {\[\ベクトル{a}+\ベクトル{0}=\ベクトル{a}\]}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{i}}%
{$\ベクトル{a}-\ベクトル{b}=\ベクトル{a}+\Ttyuukakko{-\ベクトル{b}}$}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{b}}%
- {\[\ベクトル{a}-\ベクトル{b}=\ベクトル{a}+\Ttyuukakko{-\ベクトル{b}}\]}{\relax}%
+ {\[\ベクトル{a}-\ベクトル{b}=\ベクトル{a}+\Ttyuukakko{-\ベクトル{b}}\]}{\relax}%
\ifthenelse{\equal{#1}{公式F}\AND\equal{#2}{i}}%
- {$k\数式カンマスペース l$が実数のとき,$k\Ttyuukakko{l\ベクトル{a}}=l\Ttyuukakko{k\ベクトル{b}}$}{\relax}%
+ {$k\数式カンマスペース l$が実数のとき,$k\Ttyuukakko{l\ベクトル{a}}=l\Ttyuukakko{k\ベクトル{b}}$}{\relax}%
\ifthenelse{\equal{#1}{公式F}\AND\equal{#2}{b}}%
{%
$k\数式カンマスペース l$が実数のとき%
- \[k\Ttyuukakko{l\ベクトル{a}}=l\Ttyuukakko{k\ベクトル{b}}\]%
+\[k\Ttyuukakko{l\ベクトル{a}}=l\Ttyuukakko{k\ベクトル{b}}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式G}\AND\equal{#2}{i}}%
- {$k\数式カンマスペース l$が実数のとき,$\Ttyuukakko{k+l}\ベクトル{a}=k\ベクトル{a}+l\ベクトル{a}$}{\relax}%
+ {$k\数式カンマスペース l$が実数のとき,$\Ttyuukakko{k+l}\ベクトル{a}=k\ベクトル{a}+l\ベクトル{a}$}{\relax}%
\ifthenelse{\equal{#1}{公式G}\AND\equal{#2}{b}}%
{%
$k\数式カンマスペース l$が実数のとき%
- \[\Ttyuukakko{k+l}\ベクトル{a}=k\ベクトル{a}+l\ベクトル{a}\]%
+\[\Ttyuukakko{k+l}\ベクトル{a}=k\ベクトル{a}+l\ベクトル{a}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式H}\AND\equal{#2}{i}}%
- {$k$が実数のとき,$k\Ttyuukakko{\ベクトル{a}+\ベクトル{b}}=k\ベクトル{a}+k\ベクトル{b}$}{\relax}%
+ {$k$が実数のとき,$k\Ttyuukakko{\ベクトル{a}+\ベクトル{b}}=k\ベクトル{a}+k\ベクトル{b}$}{\relax}%
\ifthenelse{\equal{#1}{公式H}\AND\equal{#2}{b}}%
{%
$k$が実数のとき%
- \[k\Ttyuukakko{\ベクトル{a}+\ベクトル{b}}=k\ベクトル{a}+k\ベクトル{b}\]%
+\[k\Ttyuukakko{\ベクトル{a}+\ベクトル{b}}=k\ベクトル{a}+k\ベクトル{b}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式I}\AND\equal{#2}{i}}%
- {$\overrightarrowtext{AB}+\overrightarrowtext{BC}=\overrightarrowtext{AC}$}{\relax}%
+ {$\vvtext{AB}+\vvtext{BC}=\vvtext{AC}$}{\relax}%
\ifthenelse{\equal{#1}{公式I}\AND\equal{#2}{b}}%
- {\[\overrightarrowtext{AB}+\overrightarrowtext{BC}=\overrightarrowtext{AC}\]}{\relax}%
+ {\[\vvtext{AB}+\vvtext{BC}=\vvtext{AC}\]}{\relax}%
\ifthenelse{\equal{#1}{公式J}\AND\equal{#2}{i}}%
- {$\overrightarrowtext{OA}-\overrightarrowtext{OB}=\overrightarrowtext{BA}$}{\relax}%
+ {$\vvtext{OA}-\vvtext{OB}=\vvtext{BA}$}{\relax}%
\ifthenelse{\equal{#1}{公式J}\AND\equal{#2}{b}}%
- {\[\overrightarrowtext{OA}-\overrightarrowtext{OB}=\overrightarrowtext{BA}\]}{\relax}%
+ {\[\vvtext{OA}-\vvtext{OB}=\vvtext{BA}\]}{\relax}%
\ifthenelse{\equal{#1}{公式K}\AND\equal{#2}{i}}%
- {$\overrightarrowtext{AA}=\ベクトル{0}$}{\relax}%
+ {$\vvtext{AA}=\ベクトル{0}$}{\relax}%
\ifthenelse{\equal{#1}{公式K}\AND\equal{#2}{b}}%
- {\[\overrightarrowtext{AA}=\ベクトル{0}\]}{\relax}%
+ {\[\vvtext{AA}=\ベクトル{0}\]}{\relax}%
\ifthenelse{\equal{#1}{公式L}\AND\equal{#2}{i}}%
- {$\overrightarrowtext{BA}=\overrightarrowtext{AB}$}{\relax}%
+ {$\vvtext{BA}=\vvtext{AB}$}{\relax}%
\ifthenelse{\equal{#1}{公式L}\AND\equal{#2}{b}}%
- {\[\overrightarrowtext{BA}=\overrightarrowtext{AB}\]}{\relax}%
+ {\[\vvtext{BA}=\vvtext{AB}\]}{\relax}%
}%
\NewDocumentCommand{\平面ベクトルの分解}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {$\ベクトル{a}\neq0\数式カンマスペース\ベクトル{b}\neq0$で,$\ベクトル{a}$と$\ベクトル{b}$が平行でないとき,任意の$\ベクトル{p}$はただ一通りに,$\ベクトル{p}=s\ベクトル{a}+t\ベクトル{b}$の形に表せられる。}{\relax}%
+ {$\ベクトル{a}\neq0\数式カンマスペース\ベクトル{b}\neq0$で,$\ベクトル{a}$と$\ベクトル{b}$が平行でないとき,任意の$\ベクトル{p}$はただ一通りに,$\ベクトル{p}=s\ベクトル{a}+t\ベクトル{b}$の形に表せられる。}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
$\ベクトル{a}\neq0\数式カンマスペース\ベクトル{b}\neq0$で,$\ベクトル{a}$と$\ベクトル{b}$が平行でないとき,任意の$\ベクトル{p}$はただ一通りに,%
- \[\ベクトル{p}=s\ベクトル{a}+t\ベクトル{b}\]%
+\[\ベクトル{p}=s\ベクトル{a}+t\ベクトル{b}\]%
+
の形に表せられる。%
}%
{\relax}%
@@ -2826,37 +3212,44 @@
\NewDocumentCommand{\平面ベクトルの成分}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$\ベクトル{a}=\ベクトル{b}\Leftrightarrow a_{1}=b_{1}\数式カンマスペース a_{2}=b_{2}$}{\relax}%
+ {$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$\ベクトル{a}=\ベクトル{b}\Leftrightarrow a_{1}=b_{1}\数式カンマスペース a_{2}=b_{2}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,%
- $\ベクトル{a}=\ベクトル{b}$%
- \[\Leftrightarrow a_{1}=b_{1}\数式カンマスペース a_{2}=b_{2}\]%
+\[\ベクトル{a}=\ベクトル{b}\Leftrightarrow a_{1}=b_{1}\数式カンマスペース a_{2}=b_{2}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$a_{1}=b_{1}\数式カンマスペース a_{2}=b_{2}\Leftrightarrow\ベクトル{a}=\ベクトル{b}$}{\relax}%
+ {$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$a_{1}=b_{1}\数式カンマスペース a_{2}=b_{2}\Leftrightarrow\ベクトル{a}=\ベクトル{b}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,%
- $a_{1}=b_{1}\数式カンマスペース a_{2}=b_{2}$%
- \[\Leftrightarrow\ベクトル{a}=\ベクトル{b}\]%
+\[a_{1}=b_{1}\数式カンマスペース a_{2}=b_{2}\Leftrightarrow\ベクトル{a}=\ベクトル{b}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
- {$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}$とすると,$\Tzettaiti{\ベクトル{a}}=\根号{a_{1}^2+a_{2}^2}$}{\relax}%
+ {$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}$とすると,$\Tzettaiti{\ベクトル{a}}=\根号{a_{1}^2+a_{2}^2}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
{%
$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}$とすると,%
- \[\Tzettaiti{\ベクトル{a}}=\根号{a_{1}^2+a_{2}^2}\]%
+\[\Tzettaiti{\ベクトル{a}}=\根号{a_{1}^2+a_{2}^2}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
- {$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$また,$k\数式カンマスペース l$を実数として,$k\ベクトル{a}+l\ベクトル{b}=k\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}+l\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}=\Ttyuukakko{ka_{1}+lb_{1}\数式カンマスペース ka_{2}+lb_{2}}$}{\relax}%
+ {%
+ $k\数式カンマスペース l$を実数,$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$として,%
+
+ \hfill{$k\ベクトル{a}+l\ベクトル{b}=k\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}+l\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}=\Ttyuukakko{ka_{1}+lb_{1}\数式カンマスペース ka_{2}+lb_{2}}$}%
+ }%
+ {\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
{%
- $\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$また,$k\数式カンマスペース l$を実数として,%
- \[k\ベクトル{a}+l\ベクトル{b}=k\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}+l\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}=\Ttyuukakko{ka_{1}+lb_{1}\数式カンマスペース ka_{2}+lb_{2}}\]%
+ $k\数式カンマスペース l$を実数,$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$として,%
+\[k\ベクトル{a}+l\ベクトル{b}=k\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}+l\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}=\Ttyuukakko{ka_{1}+lb_{1}\数式カンマスペース ka_{2}+lb_{2}}\]%
+
}%
{\relax}%
}%
@@ -2865,26 +3258,28 @@
\NewDocumentCommand{\ベクトルの成分と大きさ}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース B\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$\overrightarrowtext{AB}=\Ttyuukakko{b_{1}-a_{1}\数式カンマスペース b_{2}-a_{2}}$}{\relax}%
+ {$A\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース B\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$\vvtext{AB}=\Ttyuukakko{b_{1}-a_{1}\数式カンマスペース b_{2}-a_{2}}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
$A\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース B\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,%
- \[\overrightarrowtext{AB}=\Ttyuukakko{b_{1}-a_{1}\数式カンマスペース b_{2}-a_{2}}\]%
+\[\vvtext{AB}=\Ttyuukakko{b_{1}-a_{1}\数式カンマスペース b_{2}-a_{2}}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース B\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$\Tzettaiti{\overrightarrowtext{AB}}=\根号{\Ttyuukakko{b_{1}-a_{1}}^2+\Ttyuukakko{b_{2}-a_{2}}^2}$}{\relax}%
+ {$A\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース B\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$\Tzettaiti{\vvtext{AB}}=\根号{\Ttyuukakko{b_{1}-a_{1}}^2+\Ttyuukakko{b_{2}-a_{2}}^2}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
$A\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース B\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,%
- \[\Tzettaiti{\overrightarrowtext{AB}}=\根号{\Ttyuukakko{b_{1}-a_{1}}^2+\Ttyuukakko{b_{2}-a_{2}}^2}\]%
+\[\Tzettaiti{\vvtext{AB}}=\根号{\Ttyuukakko{b_{1}-a_{1}}^2+\Ttyuukakko{b_{2}-a_{2}}^2}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
三平方の定理より,%
- \[\Tzettaiti{\overrightarrowtext{AB}}=\根号{\Ttyuukakko{b_{1}-a_{1}}^2+\Ttyuukakko{b_{2}-a_{2}}^2}\]%
+\[\Tzettaiti{\vvtext{AB}}=\根号{\Ttyuukakko{b_{1}-a_{1}}^2+\Ttyuukakko{b_{2}-a_{2}}^2}\]%
\証明終了%
}%
{\relax}%
@@ -2894,11 +3289,12 @@
\NewDocumentCommand{\平面ベクトルの内積}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {ベクトルの内積は,$\ベクトル{a} \cdot\ベクトル{b}=|\ベクトル{a}||\ベクトル{b}|\cos\theta \Ttyuukakko{0^{\circ} \leqq \theta \leqq 180^{\circ}}\text{\ (ただし,$\theta$は$\ベクトル{a}$と$\ベクトル{b}$のなす角)}$}{\relax}%
+ {ベクトルの内積は,$\ベクトル{a} \cdot\ベクトル{b}=|\ベクトル{a}||\ベクトル{b}|\cos\theta \Ttyuukakko{0^{\circ} \leqq \theta \leqq 180^{\circ}}\text{\ (ただし,$\theta$は$\ベクトル{a}$と$\ベクトル{b}$のなす角)}$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
ベクトルの内積は,%
- \[\ベクトル{a} \cdot\ベクトル{b}=|\ベクトル{a}||\ベクトル{b}|\cos\theta \Ttyuukakko{0^{\circ} \leqq \theta \leqq 180^{\circ}}\text{\ (ただし,$\theta$は$\ベクトル{a}$と$\ベクトル{b}$のなす角)}\]%
+\[\ベクトル{a} \cdot\ベクトル{b}=|\ベクトル{a}||\ベクトル{b}|\cos\theta \Ttyuukakko{0^{\circ} \leqq \theta \leqq 180^{\circ}}\text{\ (ただし,$\theta$は$\ベクトル{a}$と$\ベクトル{b}$のなす角)}\]%
+
}%
{\relax}%
}%
@@ -2909,27 +3305,28 @@
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
{$\ベクトル{a} \cdot\ベクトル{b}=\ベクトル{b} \cdot\ベクトル{a}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
- {\[\ベクトル{a} \cdot\ベクトル{b}=\ベクトル{b} \cdot\ベクトル{a}\]}{\relax}%
+ {\[\ベクトル{a} \cdot\ベクトル{b}=\ベクトル{b} \cdot\ベクトル{a}\]}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
{$\Ttyuukakko{\ベクトル{a}+\ベクトル{b}} \cdot\ベクトル{c}=\ベクトル{a} \cdot\ベクトル{c}+\ベクトル{b} \cdot\ベクトル{c}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{\ベクトル{a}+\ベクトル{b}} \cdot\ベクトル{c}=\ベクトル{a} \cdot\ベクトル{c}+\ベクトル{b} \cdot\ベクトル{c}\]}{\relax}%
+ {\[\Ttyuukakko{\ベクトル{a}+\ベクトル{b}} \cdot\ベクトル{c}=\ベクトル{a} \cdot\ベクトル{c}+\ベクトル{b} \cdot\ベクトル{c}\]}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
{$\ベクトル{c} \cdot\Ttyuukakko{\ベクトル{b}+\ベクトル{c}}=\ベクトル{a} \cdot\ベクトル{c}+\ベクトル{b} \cdot\ベクトル{c}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
- {\[\ベクトル{c} \cdot\Ttyuukakko{\ベクトル{b}+\ベクトル{c}}=\ベクトル{a} \cdot\ベクトル{c}+\ベクトル{b} \cdot\ベクトル{c}\]}{\relax}%
+ {\[\ベクトル{c} \cdot\Ttyuukakko{\ベクトル{b}+\ベクトル{c}}=\ベクトル{a} \cdot\ベクトル{c}+\ベクトル{b} \cdot\ベクトル{c}\]}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
- {$k$が実数のとき,$\Ttyuukakko{k\ベクトル{a}} \cdot\ベクトル{b}=\ベクトル{a} \cdot\Ttyuukakko{k\ベクトル{b}}=k\Ttyuukakko{\ベクトル{a} \cdot\ベクトル{b}}$}{\relax}%
+ {$k$が実数のとき,$\Ttyuukakko{k\ベクトル{a}} \cdot\ベクトル{b}=\ベクトル{a} \cdot\Ttyuukakko{k\ベクトル{b}}=k\Ttyuukakko{\ベクトル{a} \cdot\ベクトル{b}}$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
{%
$k$が実数のとき,%
- \[\Ttyuukakko{k\ベクトル{a}} \cdot\ベクトル{b}=\ベクトル{a} \cdot\Ttyuukakko{k\ベクトル{b}}=k\Ttyuukakko{\ベクトル{a} \cdot\ベクトル{b}}\]%
+\[\Ttyuukakko{k\ベクトル{a}} \cdot\ベクトル{b}=\ベクトル{a} \cdot\Ttyuukakko{k\ベクトル{b}}=k\Ttyuukakko{\ベクトル{a} \cdot\ベクトル{b}}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{i}}%
{$\ベクトル{a} \cdot\ベクトル{a}=\Tzettaiti{\ベクトル{a}}^2$}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{b}}%
- {\[\ベクトル{a} \cdot\ベクトル{a}=\Tzettaiti{\ベクトル{a}}^2\]}{\relax}%
+ {\[\ベクトル{a} \cdot\ベクトル{a}=\Tzettaiti{\ベクトル{a}}^2\]}{\relax}%
\ifthenelse{\equal{#1}{公式F}\AND\equal{#2}{i}}%
{$\Tzettaiti{\ベクトル{a}}=\根号{\ベクトル{a} \cdot\ベクトル{a}}$}{\relax}%
\ifthenelse{\equal{#1}{公式F}\AND\equal{#2}{b}}%
@@ -2941,17 +3338,17 @@
{%
\ifthenelse{\equal{#1}{条件}\AND\equal{#2}{i}}%
{%
- $\ベクトル{a}\neq\ベクトル{0}\数式カンマスペース\ベクトル{b}\neq\ベクトル{0}$また,$k$は実数とする,\par%
- $\ベクトル{a}/ \!/ \ベクトル{b}\Leftrightarrow\ベクトル{b}=k\ベクトル{a}$,$\ベクトル{b}=k\ベクトル{a}$%
+ $\ベクトル{a}\neq\ベクトル{0}\数式カンマスペース\ベクトル{b}\neq\ベクトル{0}\数式カンマスペース k\実数入り$として,%
+ $\ベクトル{a}\平行\ベクトル{b}\Leftrightarrow\ベクトル{b}=k\ベクトル{a}$%
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{条件}\AND\equal{#2}{b}}%
{%
- $\ベクトル{a}\neq\ベクトル{0}\数式カンマスペース\ベクトル{b}\neq\ベクトル{0}$また,$k$は実数とする,\par%
- $\ベクトル{a}/ \!/ \ベクトル{b}$%
- \[\Leftrightarrow\ベクトル{b}=k\ベクトル{a}\]%
+ $\ベクトル{a}\neq\ベクトル{0}\数式カンマスペース\ベクトル{b}\neq\ベクトル{0}\数式カンマスペース k\実数入り$として,%
+\[\ベクトル{a}\平行\ベクトル{b}\Leftrightarrow\ベクトル{b}=k\ベクトル{a}\]%
+
}%
- {\relax}%
+ {\relax}%
}%
@@ -2959,29 +3356,31 @@
{%
\ifthenelse{\equal{#1}{条件}\AND\equal{#2}{i}}%
{%
- $\ベクトル{a}\neq\ベクトル{0}\数式カンマスペース\ベクトル{b}\neq\ベクトル{0}$で,$k$は実数とすると,%
- $\ベクトル{a} \perp \ベクトル{b}\Leftrightarrow\ベクトル{a} \cdot\ベクトル{b}=0$%
+ $\ベクトル{a}\neq\ベクトル{0}\数式カンマスペース\ベクトル{b}\neq\ベクトル{0}\数式カンマスペース k\実数入り$とすると,%
+ $\ベクトル{a}\perp\ベクトル{b}\Leftrightarrow\ベクトル{a} \cdot\ベクトル{b}=0$%
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{条件}\AND\equal{#2}{b}}%
{%
- $\ベクトル{a}\neq\ベクトル{0}\数式カンマスペース\ベクトル{b}\neq\ベクトル{0}$で,$k$は実数とすると,%
- \[\ベクトル{a} \perp \ベクトル{b}\Leftrightarrow\ベクトル{a} \cdot\ベクトル{b}=0\]%
+ $\ベクトル{a}\neq\ベクトル{0}\数式カンマスペース\ベクトル{b}\neq\ベクトル{0}\数式カンマスペース k\実数入り$とすると,%
+\[\ベクトル{a}\perp\ベクトル{b}\Leftrightarrow\ベクトル{a} \cdot\ベクトル{b}=0\]%
+
}%
{\relax}%
- }%
+ }%
\NewDocumentCommand{\位置ベクトル}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とすると,線分$\text{AB}$を$m:n$に内分する点は,$\bunsuu{n\ベクトル{a}+m\ベクトル{b}}{m+n}$}{\relax}%
+ {$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とすると,線分$\text{AB}$を$m:n$に内分する点は,$\bunsuu{n\ベクトル{a}+m\ベクトル{b}}{m+n}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とすると,線分$\text{AB}$を$m:n$に内分する点は,%
- \[\bunsuu{n\ベクトル{a}+m\ベクトル{b}}{m+n}\]%
+\[\bunsuu{n\ベクトル{a}+m\ベクトル{b}}{m+n}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{内分点の位置ベクトルの証明}}%
{%
\証明開始%
@@ -2994,34 +3393,37 @@
}%
{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とする,線分$\text{AB}$を$m:n$に外分する点は,$\bunsuu{-n\ベクトル{a}+m\ベクトル{b}}{m-n}$}{\relax}%
+ {$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とすると,線分$\text{AB}$を$m:n$に外分する点は,$\bunsuu{-n\ベクトル{a}+m\ベクトル{b}}{m-n}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
- $A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とする,線分$\text{AB}$を$m:n$に外分する点は,%
- \[\bunsuu{-n\ベクトル{a}+m\ベクトル{b}}{m-n}\]%
+ $A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とすると,線分$\text{AB}$を$m:n$に外分する点は,%
+\[\bunsuu{-n\ベクトル{a}+m\ベクトル{b}}{m-n}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{外分点の位置ベクトルの証明}}%
{%
\証明開始%
- $m:n$に外分ということは$m:-n$に内分ということなので,$\bunsuu{-n\ベクトル{a}+m\ベクトル{b}}{m-n}$%
+ $m:n$に外分ということは$m:\Ttyuukakko{-n}$に内分ということなので,$\bunsuu{-n\ベクトル{a}+m\ベクトル{b}}{m-n}$%
\証明終了%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とする,線分$\text{AB}$の中点は,$\bunsuu{\ベクトル{a}+\ベクトル{b}}{2}$}{\relax}%
+ {$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とすると,線分$\text{AB}$の中点は,$\bunsuu{\ベクトル{a}+\ベクトル{b}}{2}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
{%
- $A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とする,線分$\text{AB}$の中点は,%
- \[\bunsuu{\ベクトル{a}+\ベクトル{b}}{2}\]%
+ $A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とすると,線分$\text{AB}$の中点は,%
+\[\bunsuu{\ベクトル{a}+\ベクトル{b}}{2}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}\数式カンマスペース C\Ttyuukakko{\ベクトル{c}}$とする,$\triangle{\text{ABC}}$の重心は,$\bunsuu{\ベクトル{a}+\ベクトル{b}+\ベクトル{c}}{3}$}{\relax}%
+ {$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}\数式カンマスペース C\Ttyuukakko{\ベクトル{c}}$とすると,$\triangle{\text{ABC}}$の重心は,$\bunsuu{\ベクトル{a}+\ベクトル{b}+\ベクトル{c}}{3}$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
{%
- $A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}\数式カンマスペース C\Ttyuukakko{\ベクトル{c}}$とする,$\triangle{\text{ABC}}$の重心は,%
- \[\bunsuu{\ベクトル{a}+\ベクトル{b}+\ベクトル{c}}{3}\]%
+ $A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}\数式カンマスペース C\Ttyuukakko{\ベクトル{c}}$とすると,$\triangle{\text{ABC}}$の重心は,%
+\[\bunsuu{\ベクトル{a}+\ベクトル{b}+\ベクトル{c}}{3}\]%
+
}%
{\relax}%
}%
@@ -3030,36 +3432,45 @@
\NewDocumentCommand{\ベクトル方程式}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$s\数式カンマスペース t$を実数とする。点$A\Ttyuukakko{\ベクトル{a}}$をとおり,$\ベクトル{d}$に平行な直線は,$\ベクトル{p}=\ベクトル{a}+t\ベクトル{b}$}{\relax}%
+ {$s\数式カンマスペース t$を実数とする。点$A\Ttyuukakko{\ベクトル{a}}$をとおり,$\ベクトル{d}$に平行な直線は,$\ベクトル{p}=\ベクトル{a}+t\ベクトル{b}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
$s\数式カンマスペース t$を実数とする。点$A\Ttyuukakko{\ベクトル{a}}$をとおり,$\ベクトル{d}$に平行な直線は,%
- \[\ベクトル{p}=\ベクトル{a}+t\ベクトル{b}\]%
+\[\ベクトル{p}=\ベクトル{a}+t\ベクトル{b}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$s\数式カンマスペース t$を実数とする。二点$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$を通る直線は,$\ベクトル{p}=\Ttyuukakko{1-t}\ベクトル{a}+t\ベクトル{b}\数式カンマスペース\ベクトル{p}=a\ベクトル{a}+t\ベクトル{b}\text{\ (ただし,$s+t=1$)}$}{\relax}%
+ {%
+ $s\数式カンマスペース t$を実数とする。二点$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$を通る直線は,%
+
+ \hfill{$\ベクトル{p}=\Ttyuukakko{1-t}\ベクトル{a}+t\ベクトル{b}\数式カンマスペース\ベクトル{p}=a\ベクトル{a}+t\ベクトル{b}\text{\ (ただし,$s+t=1$)}$}%
+ }%
+ {\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
$s\数式カンマスペース t$を実数とする。二点$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$を通る直線は,%
- \[\ベクトル{p}=\Ttyuukakko{1-t}\ベクトル{a}+t\ベクトル{b}\数式カンマスペース\ベクトル{p}=a\ベクトル{a}+t\ベクトル{b}\text{\ (ただし,$s+t=1$)}\]%
+\[\ベクトル{p}=\Ttyuukakko{1-t}\ベクトル{a}+t\ベクトル{b}\数式カンマスペース\ベクトル{p}=a\ベクトル{a}+t\ベクトル{b}\text{\ (ただし,$s+t=1$)}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
- {点$A\Ttyuukakko{\ベクトル{a}}$を通り,$\ベクトル{n}$に垂直な直線$\ベクトル{p}$について,$\ベクトル{n}\cdot\Ttyuukakko{\ベクトル{p}-\ベクトル{a}}=0$}{\relax}%
+ {点$A\Ttyuukakko{\ベクトル{a}}$を通り,$\ベクトル{n}$に垂直な直線$\ベクトル{p}$について,$\ベクトル{n}\cdot\Ttyuukakko{\ベクトル{p}-\ベクトル{a}}=0$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
{%
点$A\Ttyuukakko{\ベクトル{a}}$を通り,$\ベクトル{n}$に垂直な直線$\ベクトル{p}$について,%
- \[\ベクトル{n}\cdot\Ttyuukakko{\ベクトル{p}-\ベクトル{a}}=0\]%
+\[\ベクトル{n}\cdot\Ttyuukakko{\ベクトル{p}-\ベクトル{a}}=0\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
{中心$C\Ttyuukakko{\ベクトル{c}}$,半径$r$の円は,$\Tzettaiti{\ベクトル{p}-\ベクトル{c}}=r\数式カンマスペース\Ttyuukakko{\ベクトル{p}-\ベクトル{c}}\cdot\Ttyuukakko{\ベクトル{p}-\ベクトル{c}}=r^2$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
{%
中心$C\Ttyuukakko{\ベクトル{c}}$,半径$r$の円は,%
- \[\Tzettaiti{\ベクトル{p}-\ベクトル{c}}=r\]%
+\[\Tzettaiti{\ベクトル{p}-\ベクトル{c}}=r\]%
\[\Ttyuukakko{\ベクトル{p}-\ベクトル{c}}\cdot\Ttyuukakko{\ベクトル{p}-\ベクトル{c}}=r^2\]%
+
}%
{\relax}%
}%
@@ -3068,13 +3479,14 @@
\NewDocumentCommand{\等差数列}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{一般項}\AND\equal{#2}{i}}%
- {初項$a_{1}$,公差$d$のとき,$a_{n}=a_{1}+\Ttyuukakko{n-1}d$}{\relax}%
+ {初項$a_{1}$,公差$d$のとき,$a_{n}=a_{1}+\Ttyuukakko{n-1}d$}{\relax}%
\ifthenelse{\equal{#1}{一般項}\AND\equal{#2}{b}}%
{%
初項$a_{1}$,公差$d$のとき,%
- \[a_{n}=a_{1}+\Ttyuukakko{n-1}d\]%
+\[a_{n}=a_{1}+\Ttyuukakko{n-1}d\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{総和}\AND\equal{#2}{i}}%
{$S_{n}=\bunsuu{n\Ttyuukakko{a_{1}+a_{n}}}{2}$}{\relax}%
\ifthenelse{\equal{#1}{総和}\AND\equal{#2}{b}}%
@@ -3082,9 +3494,11 @@
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
- \[S_{n}=a_{1}+\Ttyuukakko{a_{1}+d}+\Ttyuukakko{a_{1}+2d}+\cdots+\Tdaikakko{a_{1}+\Ttyuukakko{n-1}d}\]%
- \[S_{n}=\Tdaikakko{a_{1}+\Ttyuukakko{n-1}d}+\cdots+a_{1}+\Ttyuukakko{a_{1}+d}+\Ttyuukakko{a_{1}+2d}\]%
- 連立して,$2S=\Ttyuukakko{a_{1}+a_{n}}n$より,\par%
+\[S_{n}=a_{1}+\Ttyuukakko{a_{1}+d}+\Ttyuukakko{a_{1}+2d}+\cdots+\Tdaikakko{a_{1}+\Ttyuukakko{n-1}d}\]%
+ \[S_{n}=\Tdaikakko{a_{1}+\Ttyuukakko{n-1}d}+\cdots+a_{1}+\Ttyuukakko{a_{1}+d}+\Ttyuukakko{a_{1}+2d}\]%
+
+ 連立して,$2S=\Ttyuukakko{a_{1}+a_{n}}n$より,%
+
$S_{n}=\bunsuu{n\Ttyuukakko{a_{1}+a_{n}}}{2}$%
\証明終了%
}%
@@ -3097,35 +3511,43 @@
\ifthenelse{\equal{#1}{一般項}\AND\equal{#2}{i}}%
{$a_{n}=ar^{n-1}$}{\relax}%
\ifthenelse{\equal{#1}{一般項}\AND\equal{#2}{b}}%
- {\[a_{n}=ar^{n-1}\]}{\relax}%
+ {\[a_{n}=ar^{n-1}\]}{\relax}%
\ifthenelse{\equal{#1}{総和}\AND\equal{#2}{i}}%
{%
- $r\neq1$のとき,$S_{n}=\bunsuu{a_{1}\Ttyuukakko{1-r^{n}}}{1-r}$もしくは,$\bunsuu{a_{1}\Ttyuukakko{r^{n}-1}}{r-1}$\par%
+ $r\neq1$のとき,$S_{n}=\bunsuu{a_{1}\Ttyuukakko{1-r^{n}}}{1-r}$もしくは,$\bunsuu{a_{1}\Ttyuukakko{r^{n}-1}}{r-1}$%
+
$r=1$のとき,$S_{n}=na_{1}$%
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{総和}\AND\equal{#2}{b}}%
{%
$r\neq1$のとき,%
- \[S_{n}=\bunsuu{a_{1}\Ttyuukakko{1-r^{n}}}{1-r}\]%
+\[S_{n}=\bunsuu{a_{1}\Ttyuukakko{1-r^{n}}}{1-r}\]%
+
もしくは,%
- \[S_{n}=\bunsuu{a_{1}\Ttyuukakko{r^{n}-1}}{r-1}\]%
+\[S_{n}=\bunsuu{a_{1}\Ttyuukakko{r^{n}-1}}{r-1}\]%
+
$r=1$のとき,%
- \[S_{n}=na_{1}\]%
+\[S_{n}=na_{1}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
- \[S_{n}=a_{1}+ra_{1}+r^2a_{1}+\cdots+r^{n-1}a_{1}\]%
+\[S_{n}=a_{1}+ra_{1}+r^2a_{1}+\cdots+r^{n-1}a_{1}\]%
\[S_{n}r=ra_{1}+r^2a_{2}+r^{3}a_{1}+\cdots+r^{n}\]%
- 連立することで,$S\Ttyuukakko{1-r}=a_{1}-r^{n}a_{1}$となる。\par%
+
+ 連立することで,$S\Ttyuukakko{1-r}=a_{1}-r^{n}a_{1}$となる。%
+
よって,%
- \[S=\bunsuu{a_{1}\Ttyuukakko{1-r^{n}}}{1-r}\]%
+\[S=\bunsuu{a_{1}\Ttyuukakko{1-r^{n}}}{1-r}\]%
+
また,$\bunsuu{-1}{-1}$をかけることで,%
- \[S=\bunsuu{a_{1}\Ttyuukakko{r^{n}-1}}{r-1}\]%
+\[S=\bunsuu{a_{1}\Ttyuukakko{r^{n}-1}}{r-1}\]%
+
以上より,%
- \[S=\bunsuu{a_{1}\Ttyuukakko{1-r^{n}}}{1-r}=\bunsuu{a_{1}\Ttyuukakko{r^{n}-1}}{r-1}\]%
+\[S=\bunsuu{a_{1}\Ttyuukakko{1-r^{n}}}{1-r}=\bunsuu{a_{1}\Ttyuukakko{r^{n}-1}}{r-1}\]%
\証明終了%
}%
{\relax}%
@@ -3135,36 +3557,38 @@
\NewDocumentCommand{\シグマの公式}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$c$は$k$に無関係なとき,$\displaystyle \sum_{k=1}^{n} c=nc$}{\relax}%
+ {$c$は$k$に無関係なとき,$\displaystyle\sum_{k=1}^{n} c=nc$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
$c$は$k$に無関係なとき,%
- \[\displaystyle \sum_{k=1}^{n} c=nc\]%
+\[\displaystyle\sum_{k=1}^{n} c=nc\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$\displaystyle \sum_{k=1}^{n} k=\bunsuu{1}{2}n\Ttyuukakko{n+1}$}{\relax}%
+ {$\displaystyle\sum_{k=1}^{n} k=\bunsuu{1}{2}n\Ttyuukakko{n+1}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
- {\[\displaystyle \sum_{k=1}^{n} k=\bunsuu{1}{2}n\Ttyuukakko{n+1}\]}{\relax}%
+ {\[\displaystyle\sum_{k=1}^{n} k=\bunsuu{1}{2}n\Ttyuukakko{n+1}\]}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
- {$\displaystyle \sum_{k=1}^{n} k^2=\bunsuu{1}{6}n\Ttyuukakko{n+1}\Ttyuukakko{2n+1}$}{\relax}%
+ {$\displaystyle\sum_{k=1}^{n} k^2=\bunsuu{1}{6}n\Ttyuukakko{n+1}\Ttyuukakko{2n+1}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
- {\[\displaystyle \sum_{k=1}^{n} k^2=\bunsuu{1}{6}n\Ttyuukakko{n+1}\Ttyuukakko{2n+1}\]}{\relax}%
+ {\[\displaystyle\sum_{k=1}^{n} k^2=\bunsuu{1}{6}n\Ttyuukakko{n+1}\Ttyuukakko{2n+1}\]}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
- {$\displaystyle \sum_{k=1}^{n} k^{3}=\Tdaikakko{\bunsuu{1}{2}n\Ttyuukakko{n+1}}^2$}{\relax}%
+ {$\displaystyle\sum_{k=1}^{n} k^{3}=\Tdaikakko{\bunsuu{1}{2}n\Ttyuukakko{n+1}}^2$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
- {\[\displaystyle \sum_{k=1}^{n} k^{3}=\Tdaikakko{\bunsuu{1}{2}n\Ttyuukakko{n+1}}^2\]}{\relax}%
+ {\[\displaystyle\sum_{k=1}^{n} k^{3}=\Tdaikakko{\bunsuu{1}{2}n\Ttyuukakko{n+1}}^2\]}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{i}}%
- {$\displaystyle \sum_{k=1}^{n} r^{k-1}=\bunsuu{\Ttyuukakko{1-r^{n}}}{1-r}=\bunsuu{r^{n}-1}{r-1}$}{\relax}%
+ {$\displaystyle\sum_{k=1}^{n} r^{k-1}=\bunsuu{\Ttyuukakko{1-r^{n}}}{1-r}=\bunsuu{r^{n}-1}{r-1}$}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{b}}%
- {\[\displaystyle \sum_{k=1}^{n} r^{k-1}=\bunsuu{\Ttyuukakko{1-r^{n}}}{1-r}=\bunsuu{r^{n}-1}{r-1}\]}{\relax}%
+ {\[\displaystyle\sum_{k=1}^{n} r^{k-1}=\bunsuu{\Ttyuukakko{1-r^{n}}}{1-r}=\bunsuu{r^{n}-1}{r-1}\]}{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
- $\Ttyuukakko{k+1}^{3}=k^{3}+3k^2+3k+1$を用いる。\par%
+ $\Ttyuukakko{k+1}^{3}=k^{3}+3k^2+3k+1$を用いる。%
+
$\Ttyuukakko{k+1}^{3}-k^{3}=3k^2+3k+1$の$k$に$1$から$n$までの自然数を代入したものを足したものは,%
- \[\Ttyuukakko{n+1}^{3}-1=3\displaystyle \sum_{k=1}^{n} k^2+3\displaystyle \sum_{k=1}^{n} k=\bunsuu{1}{2}n\Ttyuukakko{n+1}+n\]%
- \[\Leftrightarrow\displaystyle \sum_{k=1}^{n} k^2=\bunsuu{1}{6}n\Ttyuukakko{n+1}\Ttyuukakko{2n+1}\]
+\[\Ttyuukakko{n+1}^{3}-1=3\displaystyle\sum_{k=1}^{n} k^2+3\displaystyle\sum_{k=1}^{n} k=\bunsuu{1}{2}n\Ttyuukakko{n+1}+n\]%
+\[\Leftrightarrow\displaystyle\sum_{k=1}^{n} k^2=\bunsuu{1}{6}n\Ttyuukakko{n+1}\Ttyuukakko{2n+1}\]
となる。%
\証明終了%
}%
@@ -3179,56 +3603,62 @@
\ifthenelse{\equal{#1}{性質}\AND\equal{#2}{b}}%
{%
$p\数式カンマスペース q$が$k$に無関係な定数のとき,%
- \[\displaystyle\sum_{k=1}^{n}\Ttyuukakko{pa_{k}+qb_{k}}=p\displaystyle\sum_{k=1}^{n}a_{k}+q\displaystyle\sum_{k=1}^{n}a_{k}\]%
+\[\displaystyle\sum_{k=1}^{n}\Ttyuukakko{pa_{k}+qb_{k}}=p\displaystyle\sum_{k=1}^{n}a_{k}+q\displaystyle\sum_{k=1}^{n}a_{k}\]%
+
}%
- {\relax}%
+ {\relax}%
}%
\NewDocumentCommand{\階差数列}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{一般項}\AND\equal{#2}{i}}%
- {数列${a_{n}}$の階差数列を${b_{n}}$とすると,$2\leqq n$のとき,$a_{n}=a_{1}+\displaystyle\sum_{k=1}^{n-1}b_{k}$}{\relax}%
+ {数列${a_{n}}$の階差数列を${b_{n}}$とすると,$2\leqq n$のとき,$a_{n}=a_{1}+\displaystyle\sum_{k=1}^{n-1}b_{k}$}{\relax}%
\ifthenelse{\equal{#1}{一般項}\AND\equal{#2}{b}}%
{%
数列${a_{n}}$の階差数列を${b_{n}}$とすると,$2\leqq n$のとき,%
- \[a_{n}=a_{1}+\displaystyle\sum_{k=1}^{n-1}b_{k}\]%
+\[a_{n}=a_{1}+\displaystyle\sum_{k=1}^{n-1}b_{k}\]%
+
}%
- {\relax}%
+ {\relax}%
}%
\NewDocumentCommand{\漸化式}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{等差型}\AND\equal{#2}{i}}%
- {$a_{n+1}=a_{n}+d$のとき,$a_{n}=a_{1}+\Ttyuukakko{n-1}d$}{\relax}%
+ {$a_{n+1}=a_{n}+d$のとき,$a_{n}=a_{1}+\Ttyuukakko{n-1}d$}{\relax}%
\ifthenelse{\equal{#1}{等差型}\AND\equal{#2}{b}}%
{%
$a_{n+1}=a_{n}+d$のとき,%
- \[a_{n}=a_{1}+\Ttyuukakko{n-1}d\]%
+\[a_{n}=a_{1}+\Ttyuukakko{n-1}d\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{等比型}\AND\equal{#2}{i}}%
- {$a_{n+1}=ra_{n}$のとき,$a_{n}=a_{1}r^{n-1}$}{\relax}%
+ {$a_{n+1}=ra_{n}$のとき,$a_{n}=a_{1}r^{n-1}$}{\relax}%
\ifthenelse{\equal{#1}{等比型}\AND\equal{#2}{b}}%
{%
$a_{n+1}=ra_{n}$のとき,%
- \[a_{n}=a_{1}r^{n-1}\]%
+\[a_{n}=a_{1}r^{n-1}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{階差型}\AND\equal{#2}{i}}%
- {$a_{n+1}-a_{n}=f\Ttyuukakko{n}$のとき,$a_{1}+\displaystyle \sum_{k=1}^{n-1}f\Ttyuukakko{k}$ただし,$2\leqq n$}{\relax}%
+ {$a_{n+1}-a_{n}=f\Ttyuukakko{n}$のとき,$a_{1}+\displaystyle\sum_{k=1}^{n-1}f\Ttyuukakko{k}$(ただし,$n\geqq 2$)}{\relax}%
\ifthenelse{\equal{#1}{階差型}\AND\equal{#2}{b}}%
{%
$a_{n+1}-a_{n}=f\Ttyuukakko{n}$のとき,%
- \[a_{1}+\displaystyle \sum_{k=1}^{n-1}f\Ttyuukakko{k}\text{\ (ただし,$2\leqq n$)}\]%
+\[a_{1}+\displaystyle\sum_{k=1}^{n-1}f\Ttyuukakko{k}\text{\ (ただし,$n\geqq 2$)}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{特性方程式}\AND\equal{#2}{i}}%
- {$a_{n+1}=pa_{n}+q \Ttyuukakko{p\neq0\数式カンマスペース q\neq0}$のとき,$a_{n+1}-c=p\Ttyuukakko{a_{n}-c}$と変形して等差型に(ただし,$c=pc+q$を満たす)。}{\relax}%
+ {$a_{n+1}=pa_{n}+q \Ttyuukakko{p\neq0\数式カンマスペース q\neq0}$のとき,$a_{n+1}-c=p\Ttyuukakko{a_{n}-c}$と変形して等差型に(ただし,$c=pc+q$を満たす)。}{\relax}%
\ifthenelse{\equal{#1}{特性方程式}\AND\equal{#2}{b}}%
{%
$a_{n+1}=pa_{n}+q \Ttyuukakko{p\neq0\数式カンマスペース q\neq0}$のとき,%
- \[a_{n+1}-c=p\Ttyuukakko{a_{n}-c}\]%
+\[a_{n+1}-c=p\Ttyuukakko{a_{n}-c}\]%
+
と変形して等差型に(ただし,$c=pc+q$を満たす)。%
}%
{\relax}%
@@ -3242,65 +3672,68 @@
\NewDocumentCommand{\共役複素数}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
- {$\alpha=a+bi$のとき,共役な複素数$\overline{\alpha}$は$a-bi$}{\relax}%
+ {$\alpha=a+bi$のとき,共役な複素数$\共役{\alpha}$は$a-bi$}{\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
- $\alpha=a+bi$のとき,共役な複素数$\overline{\alpha}$は%
- \[a-bi\]%
+ $\alpha=a+bi$のとき,共役な複素数$\共役{\alpha}$は%
+\[a-bi\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{i}}%
- {$z$が実数かつ,$\overline{z}=z$ならば,$z$が実数。}{\relax}%
+ {$z$が実数かつ,$\共役{z}=z$ならば,$z$が実数。}{\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{b}}%
- {$z$が実数かつ,$\overline{z}=z$ならば,$z$が実数。}{\relax}%
+ {$z$が実数かつ,$\共役{z}=z$ならば,$z$が実数。}{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{i}}%
- {$z$が純虚数ならば,$\overline{z}=-z\数式カンマスペース z\neq0$}{\relax}%
+ {$z$が純虚数ならば,$\共役{z}=-z\数式カンマスペース z\neq0$}{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{b}}%
{%
$z$が純虚数ならば,%
- \[\overline{z}=-z\数式カンマスペース z\neq0\]%
+\[\共役{z}=-z\数式カンマスペース z\neq0\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{i}}%
- {$\overline{z}=-z\数式カンマスペース z\neq0$ならば,$z$が純虚数。 }{\relax}%
+ {$\共役{z}=-z\数式カンマスペース z\neq0$ならば,$z$が純虚数。 }{\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{b}}%
{%
- \[\overline{z}=-z\数式カンマスペース z\neq0\]%
+\[\共役{z}=-z\数式カンマスペース z\neq0\]%
+
ならば,$z$が純虚数。 %
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質D}\AND\equal{#2}{i}}%
- {$\overline{\alpha+\beta}=\overline{\alpha}+\overline{\beta}$}{\relax}%
+ {$\共役{\alpha+\beta}=\共役{\alpha}+\共役{\beta}$}{\relax}%
\ifthenelse{\equal{#1}{性質D}\AND\equal{#2}{b}}%
- {\[\overline{\alpha+\beta}=\overline{\alpha}+\overline{\beta}\]}{\relax}%
+ {\[\共役{\alpha+\beta}=\共役{\alpha}+\共役{\beta}\]}{\relax}%
\ifthenelse{\equal{#1}{性質E}\AND\equal{#2}{i}}%
- {$\overline{\alpha-\beta}=\overline{\alpha}-\overline{\beta}$}{\relax}%
+ {$\共役{\alpha-\beta}=\共役{\alpha}-\共役{\beta}$}{\relax}%
\ifthenelse{\equal{#1}{性質E}\AND\equal{#2}{b}}%
- {\[\overline{\alpha-\beta}=\overline{\alpha}-\overline{\beta}\]}{\relax}%
+ {\[\共役{\alpha-\beta}=\共役{\alpha}-\共役{\beta}\]}{\relax}%
\ifthenelse{\equal{#1}{性質F}\AND\equal{#2}{i}}%
- {$\overline{\alpha\beta}=\overline{\alpha}\overline{\beta}$}{\relax}%
+ {$\共役{\alpha\beta}=\共役{\alpha}\共役{\beta}$}{\relax}%
\ifthenelse{\equal{#1}{性質F}\AND\equal{#2}{b}}%
- {\[\overline{\alpha\beta}=\overline{\alpha}\overline{\beta}\]}{\relax}%
+ {\[\共役{\alpha\beta}=\共役{\alpha}\共役{\beta}\]}{\relax}%
\ifthenelse{\equal{#1}{性質G}\AND\equal{#2}{i}}%
- {$\overline{\Ttyuukakko{\bunsuu{\alpha}{\beta}}}=\bunsuu{\overline{\alpha}}{\overline{\beta}}$}{\relax}%
+ {$\共役{\Ttyuukakko{\bunsuu{\alpha}{\beta}}}=\bunsuu{\共役{\alpha}}{\共役{\beta}}$}{\relax}%
\ifthenelse{\equal{#1}{性質G}\AND\equal{#2}{b}}%
- {\[\overline{\Ttyuukakko{\bunsuu{\alpha}{\beta}}}=\bunsuu{\overline{\alpha}}{\overline{\beta}}\]}{\relax}%
+ {\[\共役{\Ttyuukakko{\bunsuu{\alpha}{\beta}}}=\bunsuu{\共役{\alpha}}{\共役{\beta}}\]}{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
$\alpha=a+bi\数式カンマスペース\beta=c+di$\quad($a\数式カンマスペース b c\数式カンマスペース d$は実数かつ$a\neq0\数式カンマスペース c\neq0$)として,%
\begin{align*}%
- \overline{\alpha+\beta}&=\overline{\Ttyuukakko{a+c}+\Ttyuukakko{b+d}i}&\\%
+ \共役{\alpha+\beta}&=\共役{\Ttyuukakko{a+c}+\Ttyuukakko{b+d}i}&\\%
&=\Ttyuukakko{a+c}-\Ttyuukakko{b+d}i&\\%
&=\Ttyuukakko{a-ci}+\Ttyuukakko{b-di}&\\%
- &=\overline{\alpha}+\overline{\beta}%
+ &=\共役{\alpha}+\共役{\beta}%
\end{align*}%
\begin{align*}%
- \overline{\alpha\beta}&=\overline{\Ttyuukakko{a+bi}\Ttyuukakko{c+di}}&\\%
- &=\overline{\Ttyuukakko{ac-bd}+\Ttyuukakko{ad+bc}i}&\\
+ \共役{\alpha\beta}&=\共役{\Ttyuukakko{a+bi}\Ttyuukakko{c+di}}&\\%
+ &=\共役{\Ttyuukakko{ac-bd}+\Ttyuukakko{ad+bc}i}&\\
&=\Ttyuukakko{ac-bd}-\Ttyuukakko{ad+bc}i&\\%
&=\Ttyuukakko{a-bi}\Ttyuukakko{c-di}&\\%
- &=\overline{\alpha}\overline{\beta}%
+ &=\共役{\alpha}\共役{\beta}%
\end{align*}%
\証明終了%
}%
@@ -3315,17 +3748,18 @@
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
複素数$z=a+bi$に対して,%
- \[\Tzettaiti{z}=\Tzettaiti{a+bi}=\根号{a^2+b^2}\]%
+\[\Tzettaiti{z}=\Tzettaiti{a+bi}=\根号{a^2+b^2}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{i}}%
- {$\Tzettaiti{z}=\Tzettaiti{\overline{z}}=\Tzettaiti{-z}$}{\relax}%
+ {$\Tzettaiti{z}=\Tzettaiti{\共役{z}}=\Tzettaiti{-z}$}{\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{b}}%
- {\[\Tzettaiti{z}=\Tzettaiti{\overline{z}}=\Tzettaiti{-z}\]}{\relax}%
+ {\[\Tzettaiti{z}=\Tzettaiti{\共役{z}}=\Tzettaiti{-z}\]}{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{i}}%
- {$z\overline{z}=\Tzettaiti{z^2}$}{\relax}%
+ {$z\共役{z}=\Tzettaiti{z^2}$}{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{b}}%
- {\[z\overline{z}=\Tzettaiti{z^2}\]}{\relax}%
+ {\[z\共役{z}=\Tzettaiti{z^2}\]}{\relax}%
}%
@@ -3337,27 +3771,32 @@
{%
複素数$\alpha=a+bi$について,%
\[\alpha=r\Ttyuukakko{\cos\theta+i\sin\theta}\text{\ (ただし$z>0$)}\]%
+
また,$r=\Tzettaiti{\alpha}=\根号{a^2+b^2}\数式カンマスペース\cos\theta=\bunsuu{a}{r}\数式カンマスペース\sin\theta=\bunsuu{b}{r}$を極形式という。%
}%
{\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{i}}%
{%
- $\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$を複素数とする。$\alpha=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\beta=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}$のとき,\par%
+ $\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$を複素数とする。$\alpha=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\beta=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}$のとき,%
+
$\alpha\beta=r_{1}r_{2}\Tdaikakko{\cos\Ttyuukakko{\theta_{1}+\theta_{2}}+i\sin\Ttyuukakko{\theta_{1}+\theta_{2}}}$}{\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{b}}%
{%
$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$を複素数とする。$\alpha=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\beta=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}$のとき,%
- \[\alpha\beta=r_{1}r_{2}\Tdaikakko{\cos\Ttyuukakko{\theta_{1}+\theta_{2}}+i\sin\Ttyuukakko{\theta_{1}+\theta_{2}}}\]%
+\[\alpha\beta=r_{1}r_{2}\Tdaikakko{\cos\Ttyuukakko{\theta_{1}+\theta_{2}}+i\sin\Ttyuukakko{\theta_{1}+\theta_{2}}}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{i}}%
{%
- $\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$を複素数とする。$\alpha=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\beta=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}$のとき,\par%
+ $\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$を複素数とする。$\alpha=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\beta=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}$のとき,%
+
$\bunsuu{\alpha}{\beta}=\bunsuu{r_{1}}{r_{2}}\Tdaikakko{\cos\Ttyuukakko{\theta_{1}+\theta_{2}}+i\sin\Ttyuukakko{\theta_{1}+\theta_{2}}}$}{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{b}}%
{%
$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$を複素数とする。$\alpha=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\beta=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}$のとき,%
- \[\bunsuu{\alpha}{\beta}=\bunsuu{r_{1}}{r_{2}}\Tdaikakko{\cos\Ttyuukakko{\theta_{1}+\theta_{2}}+i\sin\Ttyuukakko{\theta_{1}+\theta_{2}}}\]%
+\[\bunsuu{\alpha}{\beta}=\bunsuu{r_{1}}{r_{2}}\Tdaikakko{\cos\Ttyuukakko{\theta_{1}+\theta_{2}}+i\sin\Ttyuukakko{\theta_{1}+\theta_{2}}}\]%
+
}%
{\relax}%
}%
@@ -3368,41 +3807,46 @@
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
{%
複素数$\alpha=a+bi$について,$\alpha=r\Ttyuukakko{\cos\theta+i\sin\theta}$\par
- ただし$z>0$のとき$\theta$を偏角といい,$\mathrm{aug}\alpha$で表す。%
+ ただし$z>0$のとき$\theta$を偏角といい,$\text{aug}\alpha$で表す。%
}%
{\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
複素数$\alpha=a+bi$について,%
- \[\alpha=r\Ttyuukakko{\cos\theta+i\sin\theta}\]%
+\[\alpha=r\Ttyuukakko{\cos\theta+i\sin\theta}\]%
+
ただし$z>0$のとき$\theta$を偏角といい,%
- \[\mathrm{aug}\alpha\]%
+\[\text{aug}\alpha\]%
+
で表す。%
}%
{\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{i}}%
- {$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$を複素数とする。$\alpha=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\beta=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}$のとき,$\theta_{1}=\mathrm{arg}\alpha$また,$\mathrm{arg}\alpha=\theta_{1}+2n\pi$ ($n$は整数)}{\relax}%
+ {$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$を複素数とする。$\alpha=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\beta=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}$のとき,$\theta_{1}=\text{arg}\alpha$また,$\text{arg}\alpha=\theta_{1}+2n\pi$ ($n$は整数)}{\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{b}}%
{%
$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$を複素数とする。$\alpha=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\beta=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}$のとき,%
- \[\theta_{1}=\theta_{1}+2n\pi=\mathrm{arg}\alpha\]%
+\[\theta_{1}=\theta_{1}+2n\pi=\text{arg}\alpha\]%
+
($n$は整数)%
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{i}}%
- {$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$を複素数とする。$\alpha=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\beta=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}$のとき,$\mathrm{arg}z_{1}z_{2}=\mathrm{arg}z_{1}+\mathrm{arg}z_{2}$}{\relax}%
+ {$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$を複素数とする。$\alpha=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\beta=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}$のとき,$\text{arg}z_{1}z_{2}=\text{arg}z_{1}+\text{arg}z_{2}$}{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{b}}%
{%
$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$を複素数とする。$\alpha=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\beta=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}$のとき,%
- \[\mathrm{arg}z_{1}z_{2}=\mathrm{arg}z_{1}+\mathrm{arg}z_{2}\]%
+\[\text{arg}z_{1}z_{2}=\text{arg}z_{1}+\text{arg}z_{2}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{i}}%
- {$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$を複素数とする。$\alpha=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\beta=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}$のとき,$\mathrm{arg}\bunsuu{z_{1}}{z_{2}}=\mathrm{arg}z_{1}-\mathrm{arg}z_{2}$}{\relax}%
+ {$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$を複素数とする。$\alpha=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\beta=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}$のとき,$\text{arg}\bunsuu{z_{1}}{z_{2}}=\text{arg}z_{1}-\text{arg}z_{2}$}{\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{b}}%
{%
$\alpha\数式カンマスペース\beta\数式カンマスペース\gamma$を複素数とする。$\alpha=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\beta=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}$のとき,%
- \[\mathrm{arg}\bunsuu{z_{1}}{z_{2}}=\mathrm{arg}z_{1}-\mathrm{arg}z_{2}\]%
+\[\text{arg}\bunsuu{z_{1}}{z_{2}}=\text{arg}z_{1}-\text{arg}z_{2}\]%
+
}%
{\relax}%
}%
@@ -3415,19 +3859,21 @@
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
$n$が整数のとき,%
- \[\Ttyuukakko{\cos\theta+i\sin\theta}^{n}=\cos n\theta+i\sin n\theta\]%
+\[\Ttyuukakko{\cos\theta+i\sin\theta}^{n}=\cos n\theta+i\sin n\theta\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
複素数%
- \[\alpha_{1}=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\alpha_{2}=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}\ldots\alpha_{n}=r_{n}\Ttyuukakko{\cos\theta_{n}+i\sin\theta_{n}}\]
+\[\alpha_{1}=r_{1}\Ttyuukakko{\cos\theta_{1}+i\sin\theta_{1}}\数式カンマスペース\alpha_{2}=r_{2}\Ttyuukakko{\cos\theta_{2}+i\sin\theta_{2}}\ldots\alpha_{n}=r_{n}\Ttyuukakko{\cos\theta_{n}+i\sin\theta_{n}}\]
に対して,$\alpha_{1}\alpha_{2}\cdots\alpha_{n}$を考えると,三角関数の積和の公式から%
\[\alpha_{1}\alpha_{2}\cdots\alpha_{n}=r_{1}r_{2}\cdots r_{n}\Tdaikakko{\cos\Ttyuukakko{\theta_{1}+\theta_{2}+\cdots+\theta_{n}}+i\sin\Ttyuukakko{\theta_{1}+\theta_{2}+\cdots+\theta_{n}}}\]%
- となる。ここで,$\alpha_{1}=\alpha_{2}=\cdots=\alpha_{n}$のとき,%
- \[\alpha^{n}=r^{n}\Ttyuukakko{\cos\theta+i\sin\theta}^{n}=r^{n}\Ttyuukakko{\cos n\theta+i\sin n\theta}\]%
- \[\Leftrightarrow\Ttyuukakko{\cos\theta+i\sin\theta}^{n}=\cos n\theta+i\sin n\theta\]%
+
+ となる。ここで,$\alpha_{1}=\alpha_{2}=\cdots=\alpha_{n}$のとき,% \[\alpha^{n}=r^{n}\Ttyuukakko{\cos\theta+i\sin\theta}^{n}=r^{n}\Ttyuukakko{\cos n\theta+i\sin n\theta}\]%
+\[\Leftrightarrow\Ttyuukakko{\cos\theta+i\sin\theta}^{n}=\cos n\theta+i\sin n\theta\]%
+
を得る。%
\証明終了%
}%
@@ -3442,28 +3888,31 @@
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{定点$F$ (焦点)と$F$を通らない直線$l$ (準線)があるとき,焦点と準線からの距離の和が一定な点の軌跡。}{\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{i}}%
- {放物線は$y^2=4px$と表せられる。}{\relax}%
+ {放物線は$y^2=4px$と表せられる。}{\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{b}}%
{%
放物線は%
- \[y^2=4px\]%
+\[y^2=4px\]%
+
と表せられる。%
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{i}}%
{放物線の焦点は$F\Ttyuukakko{p\数式カンマスペース 0}$}{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{b}}%
{%
放物線の焦点は%
- \[F\Ttyuukakko{p\数式カンマスペース 0}\]%
+\[F\Ttyuukakko{p\数式カンマスペース 0}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{i}}%
{放物線の準線は$x=-p$}{\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{b}}%
{%
放物線の準線は%
- \[x=-p\]%
+\[x=-p\]%
+
}%
{\relax}%
}%
@@ -3480,24 +3929,27 @@
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{b}}%
{%
楕円は%
- \[\bunsuu{x^2}{a^2}+\bunsuu{y^2}{b^2}=1\]%
+\[\bunsuu{x^2}{a^2}+\bunsuu{y^2}{b^2}=1\]%
+
と表せられる。%
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{i}}%
{楕円の焦点は$F\Ttyuukakko{\根号{a^2-b^2}\数式カンマスペース 0}$と,$F'\Ttyuukakko{\根号{a^2-b^2}\数式カンマスペース 0}$}{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{b}}%
{%
楕円の焦点は%
- \[F\Ttyuukakko{\根号{a^2-b^2}\数式カンマスペース 0} F'\Ttyuukakko{\根号{a^2-b^2}\数式カンマスペース 0}\]%
+\[F\Ttyuukakko{\根号{a^2-b^2}\数式カンマスペース 0} F'\Ttyuukakko{\根号{a^2-b^2}\数式カンマスペース 0}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{i}}%
{楕円の二つの焦点からの距離の和は$2a$である。}{\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{b}}%
{%
楕円の二つの焦点からの距離の和は%
- \[2a\]%
+\[2a\]%
+
}%
{\relax}%
}%
@@ -3514,32 +3966,36 @@
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{b}}%
{%
双曲線は%
- \[\bunsuu{x^2}{a^2}-\bunsuu{y^2}{b^2}=1\]%
+\[\bunsuu{x^2}{a^2}-\bunsuu{y^2}{b^2}=1\]%
+
と表せられる。%
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{i}}%
{双曲線の焦点は$F\Ttyuukakko{\根号{a^2+b^2}\数式カンマスペース 0}$と,$F'\Ttyuukakko{\根号{a^2+b^2}\数式カンマスペース 0}$}{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{b}}%
{%
双曲線の焦点は%
- \[F\Ttyuukakko{\根号{a^2+b^2}\数式カンマスペース 0} F'\Ttyuukakko{\根号{a^2+b^2}\数式カンマスペース 0}\]%
+\[F\Ttyuukakko{\根号{a^2+b^2}\数式カンマスペース 0} F'\Ttyuukakko{\根号{a^2+b^2}\数式カンマスペース 0}\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{i}}%
{双曲線の二つの焦点からの距離の差は$2a$ }{\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{b}}%
{%
双曲線の二つの焦点からの距離の差は%
- \[2a\]%
+\[2a\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{性質D}\AND\equal{#2}{i}}%
{双曲線の漸近線は$\bunsuu{x}{a}-\bunsuu{y}{b}=0\数式カンマスペース\bunsuu{x}{a}+\bunsuu{y}{b}=0$}{\relax}%
\ifthenelse{\equal{#1}{性質D}\AND\equal{#2}{b}}%
{%
双曲線の漸近線は%
- \[\bunsuu{x}{a}-\bunsuu{y}{b}=0\数式カンマスペース\bunsuu{x}{a}+\bunsuu{y}{b}=0\]%
+\[\bunsuu{x}{a}-\bunsuu{y}{b}=0\数式カンマスペース\bunsuu{x}{a}+\bunsuu{y}{b}=0\]%
+
}%
{\relax}%
}%
@@ -3548,11 +4004,12 @@
\NewDocumentCommand{\連続な関数}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {定義域の$x$の値$a$に関して,$\displaystyle \lim_{x \to a}f\Ttyuukakko{x}=f\Ttyuukakko{a}$のとき,$f\Ttyuukakko{x}$は$x=a$で連続。}{\relax}%
+ {定義域の$x$の値$a$に関して,$\displaystyle\lim_{x \to a}f\Ttyuukakko{x}=f\Ttyuukakko{a}$のとき,$f\Ttyuukakko{x}$は$x=a$で連続。}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
定義域の$x$の値$a$に関して,%
- \[\displaystyle \lim_{x \to a}f\Ttyuukakko{x}=f\Ttyuukakko{a}\]%
+\[\displaystyle\lim_{x \to a}f\Ttyuukakko{x}=f\Ttyuukakko{a}\]%
+
のとき,$f\Ttyuukakko{x}$は$x=a$で連続。%
}%
{\relax}%
@@ -3566,7 +4023,8 @@
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
閉区間$[a\数式カンマスペース b]$で連続な関数$f\Ttyuukakko{x}$について,$f\Ttyuukakko{a}\neq f\Ttyuukakko{b}$のとき,$f\Ttyuukakko{a}$と$f\Ttyuukakko{b}$の間の任意の実数$k$について,%
- \[f\Ttyuukakko{c}=k\]%
+\[f\Ttyuukakko{c}=k\]%
+
となる$c$が少なからず一つ存在する。%
}%
{\relax}%
@@ -3580,7 +4038,8 @@
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
関数$f\Ttyuukakko{x}$が閉区間$[a\数式カンマスペース b]$で連続,開区間$\Ttyuukakko{a\数式カンマスペース b}$で微分可能ならば,%
- \[\bunsuu{f\Ttyuukakko{b}-f\Ttyuukakko{a}}{b-a}=f'\Ttyuukakko{c} \Ttyuukakko{a<c<b}\]%
+\[\bunsuu{f\Ttyuukakko{b}-f\Ttyuukakko{a}}{b-a}=f'\Ttyuukakko{c} \Ttyuukakko{a<c<b}\]%
+
を満たす$c$が存在する。%
}%
{\relax}%
@@ -3613,34 +4072,35 @@
{$\Ttyuukakko{x^{\alpha}}'=\alpha x^{\alpha-1}$ ($\alpha$は実数)}{\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式B}\AND\equal{#2}{b}}%
{%
- \[\Ttyuukakko{x^{\alpha}}'=\alpha x^{\alpha-1}\]%
+\[\Ttyuukakko{x^{\alpha}}'=\alpha x^{\alpha-1}\]%
+
$\alpha$は実数%
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式C}\AND\equal{#2}{i}}%
{$\Ttyuukakko{\sin x}'=\cos x$}{\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式C}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{\sin x}'=\cos x\]}{\relax}%
+ {\[\Ttyuukakko{\sin x}'=\cos x\]}{\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式D}\AND\equal{#2}{i}}%
{$\Ttyuukakko{\cos x}'=-\sin x$}{\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式D}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{\cos x}'=-\sin x\]}{\relax}%
+ {\[\Ttyuukakko{\cos x}'=-\sin x\]}{\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式E}\AND\equal{#2}{i}}%
{$\Ttyuukakko{\tan x}'=\bunsuu{1}{\cos^2x}$}{\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式E}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{\tan x}'=\bunsuu{1}{\cos^2x}\]}{\relax}%
+ {\[\Ttyuukakko{\tan x}'=\bunsuu{1}{\cos^2x}\]}{\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式F}\AND\equal{#2}{i}}%
{$\Ttyuukakko{\log\Tzettaiti{x}}'=\bunsuu{1}{x}$}{\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式F}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{\log\Tzettaiti{x}}'=\bunsuu{1}{x}\]}{\relax}%
+ {\[\Ttyuukakko{\log\Tzettaiti{x}}'=\bunsuu{1}{x}\]}{\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式G}\AND\equal{#2}{i}}%
{$\Ttyuukakko{\log_{a}\Tzettaiti{x}}'=\bunsuu{1}{x\log a}$}{\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式G}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{\log_{a}\Tzettaiti{x}}'=\bunsuu{1}{x\log a}\]}{\relax}%
+ {\[\Ttyuukakko{\log_{a}\Tzettaiti{x}}'=\bunsuu{1}{x\log a}\]}{\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式H}\AND\equal{#2}{i}}%
{$\Ttyuukakko{e^{x}}'=e^{x}$}{\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式H}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{e^{x}}'=e^{x}\]}{\relax}%
+ {\[\Ttyuukakko{e^{x}}'=e^{x}\]}{\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式I}\AND\equal{#2}{i}}%
{$\Ttyuukakko{a^{x}}'=a^{x}\log a$}{\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式I}\AND\equal{#2}{b}}%
@@ -3677,13 +4137,15 @@
&=\log e\cdot\bunsuu{1}{x}&\\%
&=\bunsuu{1}{x}
\end{align*}%
- $f\Ttyuukakko{x}=e^{x}$とおく。\par%
+ $f\Ttyuukakko{x}=e^{x}$とおく。%
+
\begin{align*}%
\Ttyuukakko{e^{x}}'&=\displaystyle\lim_{h \to 0} \bunsuu{e^{x+h}-e^{x}}{h}&\\%
&=e^{x}\displaystyle\lim_{h \to 0} \bunsuu{e^{h}-1}{h}%
\end{align*}%
- ここで$\Ttyuukakko{\log x}'=\bunsuu{1}{x}$より,$y=\log x$の$x=1$においての接線の傾きは$1$であり,$y=\log x$と$y=e^{x}$は$y=x$において対称であるので$y=e^{x}$の$x=0$においての接線の傾きも$1$なので,
+ ここで$\Ttyuukakko{\log x}'=\bunsuu{1}{x}$より,$y=\log x$の$x=1$においての接線の傾きは$1$であり,$y=\log x$と$y=e^{x}$は$y=x$において対称であるので$y=e^{x}$の$x=0$においての接線の傾きも$1$なので,%
\[f'\Ttyuukakko{0}\displaystyle\lim_{h \to 0} \bunsuu{e^{h}-1}{h}=1\]%
+
よって,%
\begin{align*}%
\Ttyuukakko{e^{x}}'&=e^{x}\displaystyle\lim_{h \to 0} \bunsuu{e^{h}-1}{h}&\\%
@@ -3703,7 +4165,8 @@
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
曲線$f\Ttyuukakko{x}$上の点$A\Ttyuukakko{a\数式カンマスペース f\Ttyuukakko{a}}$における法線の方程式は,%
- \[y-f\Ttyuukakko{a}=-\bunsuu{1}{f'\Ttyuukakko{a}}\Ttyuukakko{x-a}\]%
+\[y-f\Ttyuukakko{a}=-\bunsuu{1}{f'\Ttyuukakko{a}}\Ttyuukakko{x-a}\]%
+
}%
{\relax}%
}%
@@ -3712,71 +4175,79 @@
\NewDocumentCommand{\不定積分}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
- {$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$とすると,$\displaystyle \int_{}^{} f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C\text{\ (\,$C$は積分定数)}$}{\relax}%
+ {$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$とすると,$\displaystyle\int_{}^{}f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C\text{\ (\,$C$は積分定数)}$}{\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$とすると,%
- \[\displaystyle \int_{}^{} f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C\text{\ (\,$C$は積分定数)}\]%
+\[\displaystyle\int_{}^{}f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C\text{\ (\,$C$は積分定数)}\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{置換積分}\AND\equal{#2}{i}}%
- {$\displaystyle \int_{}^{} f\Ttyuukakko{x}dx=\displaystyle \int_{}^{}f\Ttyuukakko{g\Ttyuukakko{t}}g'\Ttyuukakko{t}dt$ ($x=g\Ttyuukakko{t}$に置換)}{\relax}%
+ {$\displaystyle\int_{}^{}f\Ttyuukakko{x}dx=\displaystyle\int_{}^{}f\Ttyuukakko{g\Ttyuukakko{t}}g'\Ttyuukakko{t}dt$ ($x=g\Ttyuukakko{t}$に置換)}{\relax}%
\ifthenelse{\equal{#1}{置換積分}\AND\equal{#2}{b}}%
{%
- \[\displaystyle \int_{}^{} f\Ttyuukakko{x}dx=\displaystyle \int_{}^{}f\Ttyuukakko{g\Ttyuukakko{t}}g'\Ttyuukakko{t}dt\]%
+\[\displaystyle\int_{}^{}f\Ttyuukakko{x}dx=\displaystyle\int_{}^{}f\Ttyuukakko{g\Ttyuukakko{t}}g'\Ttyuukakko{t}dt\]%
+
($x=g\Ttyuukakko{t}$に置換)%
}%
{\relax}%
\ifthenelse{\equal{#1}{部分積分}\AND\equal{#2}{i}}%
- {$\displaystyle \int_{}^{} f\Ttyuukakko{x}g'\Ttyuukakko{x}dx=f\Ttyuukakko{x}g\Ttyuukakko{x}-\displaystyle \int_{}^{}f'\Ttyuukakko{x}g\Ttyuukakko{x}$}{\relax}%
+ {$\displaystyle\int_{}^{}f\Ttyuukakko{x}g'\Ttyuukakko{x}dx=f\Ttyuukakko{x}g\Ttyuukakko{x}-\displaystyle\int_{}^{}f'\Ttyuukakko{x}g\Ttyuukakko{x}$}{\relax}%
\ifthenelse{\equal{#1}{部分積分}\AND\equal{#2}{b}}%
- {\[\displaystyle \int_{}^{} f\Ttyuukakko{x}g'\Ttyuukakko{x}dx=f\Ttyuukakko{x}g\Ttyuukakko{x}-\displaystyle \int_{}^{}f'\Ttyuukakko{x}g\Ttyuukakko{x}\]}{\relax}%
+ {\[\displaystyle\int_{}^{}f\Ttyuukakko{x}g'\Ttyuukakko{x}dx=f\Ttyuukakko{x}g\Ttyuukakko{x}-\displaystyle\int_{}^{}f'\Ttyuukakko{x}g\Ttyuukakko{x}\]}{\relax}%
\ifthenelse{\equal{#1}{初等関数の積分公式A}\AND\equal{#2}{i}}%
- {$C$は積分定数とする。$\displaystyle \int_{}^{} x^{\alpha}dx=\bunsuu{1}{\alpha+1}x^{\alpha+1}+C$}{\relax}%
+ {$C$は積分定数とする。$\displaystyle\int_{}^{}x^{\alpha}dx=\bunsuu{1}{\alpha+1}x^{\alpha+1}+C$}{\relax}%
\ifthenelse{\equal{#1}{初等関数の積分公式A}\AND\equal{#2}{b}}%
{%
$C$は積分定数とする。%
- \[\displaystyle \int_{}^{} x^{\alpha}dx=\bunsuu{1}{\alpha+1}x^{\alpha+1}+C\]%
+\[\displaystyle\int_{}^{}x^{\alpha}dx=\bunsuu{1}{\alpha+1}x^{\alpha+1}+C\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{初等関数の積分公式B}\AND\equal{#2}{i}}%
- {$C$は積分定数とする。$\displaystyle \int_{}^{} \bunsuu{1}{x}dx=\log\Tzettaiti{x}+C$}{\relax}%
+ {$C$は積分定数とする。$\displaystyle\int_{}^{}\bunsuu{1}{x}dx=\log\Tzettaiti{x}+C$}{\relax}%
\ifthenelse{\equal{#1}{初等関数の積分公式B}\AND\equal{#2}{b}}%
{%
$C$は積分定数とする。%
- \[\displaystyle \int_{}^{} \bunsuu{1}{x}dx=\log\Tzettaiti{x}+C\]%
+\[\displaystyle\int_{}^{}\bunsuu{1}{x}dx=\log\Tzettaiti{x}+C\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{初等関数の積分公式C}\AND\equal{#2}{i}}%
- {$C$は積分定数とする。$\displaystyle \int_{}^{} \sin xdx=-\cos x+C$}{\relax}%
+ {$C$は積分定数とする。$\displaystyle\int_{}^{}\sin xdx=-\cos x+C$}{\relax}%
\ifthenelse{\equal{#1}{初等関数の積分公式C}\AND\equal{#2}{b}}%
{%
$C$は積分定数とする。%
- \[\displaystyle \int_{}^{} \sin xdx=-\cos x+C\]%
+\[\displaystyle\int_{}^{}\sin xdx=-\cos x+C\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{初等関数の積分公式D}\AND\equal{#2}{i}}%
- {$C$は積分定数とする。$\displaystyle \int_{}^{} \cos xdx=\sin x+C$}{\relax}%
+ {$C$は積分定数とする。$\displaystyle\int_{}^{}\cos xdx=\sin x+C$}{\relax}%
\ifthenelse{\equal{#1}{初等関数の積分公式D}\AND\equal{#2}{b}}%
{%
$C$は積分定数とする。%
- \[\displaystyle \int_{}^{} \cos xdx=\sin x+C\]%
+\[\displaystyle\int_{}^{}\cos xdx=\sin x+C\]%
+
}%
{\relax}%
\ifthenelse{\equal{#1}{初等関数の積分公式E}\AND\equal{#2}{i}}%
- {$C$は積分定数とする。$\displaystyle \int_{}^{} e^{x}dx=e^{x}+C$}{\relax}%
+ {$C$は積分定数とする。$\displaystyle\int_{}^{}e^{x}dx=e^{x}+C$}{\relax}%
\ifthenelse{\equal{#1}{初等関数の積分公式E}\AND\equal{#2}{b}}%
{%
$C$は積分定数とする。%
- \[\displaystyle \int_{}^{} e^{x}dx=e^{x}+C\]%
+\[\displaystyle\int_{}^{}e^{x}dx=e^{x}+C\]%
+
}%
- {\relax}%
+ {\relax}%
\ifthenelse{\equal{#1}{初等関数の積分公式F}\AND\equal{#2}{i}}%
- {$C$は積分定数とする。$\displaystyle \int_{}^{} a^{x}dx=\bunsuu{a^{x}}{\log a}+C$}{\relax}%
+ {$C$は積分定数とする。$\displaystyle\int_{}^{}a^{x}dx=\bunsuu{a^{x}}{\log a}+C$}{\relax}%
\ifthenelse{\equal{#1}{初等関数の積分公式F}\AND\equal{#2}{b}}%
{%
$C$は積分定数とする。%
- \[\displaystyle \int_{}^{} a^{x}dx=\bunsuu{a^{x}}{\log a}+C\]%
+\[\displaystyle\int_{}^{}a^{x}dx=\bunsuu{a^{x}}{\log a}+C\]%
+
}%
{\relax}%
}%
@@ -3785,12 +4256,13 @@
\NewDocumentCommand{\定積分}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
- {曲線$y=f\Ttyuukakko{x}$と$x$軸(間は$a$から$b$)に囲まれた部分の面積$S$について,$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$のとき,$S=\displaystyle \int_{b}^{a} f\Ttyuukakko{x}dx=[F\Ttyuukakko{x}]^{b}_{a}=F\Ttyuukakko{b}-F\Ttyuukakko{a}$}{\relax}%
+ {曲線$y=f\Ttyuukakko{x}$と$x$軸(間は$a$から$b$)に囲まれた部分の面積$S$について,$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$のとき,$S=\displaystyle\int_{b}^{a} f\Ttyuukakko{x}dx=[F\Ttyuukakko{x}]^{b}_{a}=F\Ttyuukakko{b}-F\Ttyuukakko{a}$}{\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
曲線$y=f\Ttyuukakko{x}$と$x$軸(間は$a$から$b$)に囲まれた部分の面積$S$について,$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$のとき,%
- \[S=\displaystyle \int_{b}^{a} f\Ttyuukakko{x}dx=[F\Ttyuukakko{x}]^{b}_{a}=F\Ttyuukakko{b}-F\Ttyuukakko{a}\]%
+\[S=\displaystyle\int_{b}^{a} f\Ttyuukakko{x}dx=[F\Ttyuukakko{x}]^{b}_{a}=F\Ttyuukakko{b}-F\Ttyuukakko{a}\]%
+
}%
{\relax}%
}%
@@ -3798,13 +4270,15 @@
\NewDocumentCommand{\区分求積法}{ m O{i} }%
{%
- \ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {$\displaystyle \lim_{n \to \infty} \sum_{k=0}^{n-1}f\Ttyuukakko{x_{k}}\mathit{\Delta}x=\displaystyle \lim_{n \to \infty} \sum_{k=1}^{n}f\Ttyuukakko{x_{k}}\mathit{\Delta}x$ここで,$\mathit{\Delta}x=\bunsuu{b-a}{n}\数式カンマスペース x_{k}=a+k\mathit{\Delta}x$}{\relax}%
+ \ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
+ {$\displaystyle\lim_{n \to \infty} \sum_{k=0}^{n-1}f\Ttyuukakko{x_{k}}\mathit{\Delta}x=\displaystyle\lim_{n \to \infty} \sum_{k=1}^{n}f\Ttyuukakko{x_{k}}\mathit{\Delta}x$ここで,$\mathit{\Delta}x=\bunsuu{b-a}{n}\数式カンマスペース x_{k}=a+k\mathit{\Delta}x$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
- \[\displaystyle \lim_{n \to \infty} \sum_{k=0}^{n-1}f\Ttyuukakko{x_{k}}\mathit{\Delta}x=\displaystyle \lim_{n \to \infty} \sum_{k=1}^{n}f\Ttyuukakko{x_{k}}\mathit{\Delta}x\]%
+\[\displaystyle\lim_{n \to \infty} \sum_{k=0}^{n-1}f\Ttyuukakko{x_{k}}\mathit{\Delta}x=\displaystyle\lim_{n \to \infty} \sum_{k=1}^{n}f\Ttyuukakko{x_{k}}\mathit{\Delta}x\]%
+
ここで,%
- \[\mathit{\Delta}x=\bunsuu{b-a}{n}\数式カンマスペース x_{k}=a+k\mathit{\Delta}x\]%
+\[\mathit{\Delta}x=\bunsuu{b-a}{n}\数式カンマスペース x_{k}=a+k\mathit{\Delta}x\]%
+
}%
{\relax}%
}%
@@ -3813,11 +4287,12 @@
\NewDocumentCommand{\体積の積分}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {曲線$y=f\Ttyuukakko{x}$と$x$軸の間の部分($a\leqq x\leqq b$)を$x$軸の周りに一回転させてできる回転体の体積は,$V=\pi\displaystyle \int_{a}^{b} \Tdaikakko{f\Ttyuukakko{x}}^2dx$}{\relax}%
+ {曲線$y=f\Ttyuukakko{x}$と$x$軸の間の部分($a\leqq x\leqq b$)を$x$軸の周りに一回転させてできる回転体の体積は,$V=\pi\displaystyle\int_{a}^{b} \Tdaikakko{f\Ttyuukakko{x}}^2dx$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
曲線$y=f\Ttyuukakko{x}$と$x$軸の間の部分($a\leqq x\leqq b$)を$x$軸の周りに一回転させてできる回転体の体積は,%
- \[V=\pi\displaystyle \int_{a}^{b} \Tdaikakko{f\Ttyuukakko{x}}^2dx\]%
+\[V=\pi\displaystyle\int_{a}^{b} \Tdaikakko{f\Ttyuukakko{x}}^2dx\]%
+
}%
{\relax}%
}% \ No newline at end of file
diff --git a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.tex b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.tex
index 7c68dffbd7..d838416444 100644
--- a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.tex
+++ b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.tex
@@ -1,14 +1,12 @@
\documentclass[fleqn]{ltjsarticle}% !lualatex
+\usepackage{mathformulas,framed}%
\usepackage[hiragino-pron,deluxe,expert,bold]{luatexja-preset}%
-\usepackage{japanese-mathformulas,framed,comment}%
\usepackage[usetype1]{uline--}%
-\title{\LARGE\uline{japanese-mathformulas.sty}\Large\\manual pdf\\(mainly for Japanese, lulatex)}%
+\title{\LARGE\uline{japanese-mathformulas.sty}\Large\\manual pdf\\(mainly for Japanese, Lua\LaTeX)}%
\author{\Large Hugh / Ponkichi}%
\date{\today}
\def\texttt#1{{\gtfamily #1}}
-%\def\auto#1#2{\ascboxB{#2}}
-%\def\auto#1#2{\bf{\u{● #2}}}
\def\auto#1#2{\noindent\leftline{\uline{\textgt{#2}}}}
\makeatletter
@@ -184,7 +182,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{二次式因数分解}
%\begin{description}
\auto{9}{\detokenize{\二次式因数分解{公式A}[i]}}
@@ -222,7 +220,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{平方根}
%\begin{description}
\auto{17}{\detokenize{\平方根{定義}[i]}}
@@ -278,7 +276,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{一次不等式}
%\begin{description}
\auto{29}{\detokenize{\一次不等式{性質A}[i]}}
@@ -311,7 +309,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{集合}
%\begin{description}
\auto{35}{\detokenize{\集合{積集合}[i]}}
@@ -341,7 +339,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{対偶}
%\begin{description}
\auto{41}{\detokenize{\対偶{定理}[i]}}
@@ -361,7 +359,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{背理法}
%\begin{description}
\auto{42}{\detokenize{\背理法}}
@@ -370,7 +368,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{二次関数}
%\begin{description}
\auto{43}{\detokenize{\二次関数{標準形}[i]}}
@@ -409,7 +407,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{二次方程式の解の公式}
%\begin{description}
\auto{51}{\detokenize{\二次方程式の解の公式{公式}[i]}}
@@ -431,7 +429,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
\auto{52}{\detokenize{\三角比の定義{定義A}[i]}}
\三角比の定義{定義A}[i]
@@ -475,7 +473,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{正弦定理}
%\begin{description}
\auto{59}{\detokenize{\正弦定理{公式}[i]}}
@@ -493,7 +491,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{余弦定理}
%\begin{description}
\auto{61}{\detokenize{\余弦定理{公式}[i]}}
@@ -510,24 +508,52 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{三角形の面積}
%\begin{description}
-\auto{63}{\detokenize{\三角形の面積{公式}[i]}}
+\auto{63}{\detokenize{\三角比の三角形の面積公式{公式}[i]}}
+
+\三角比の三角形の面積公式{公式}[i]
+
+\auto{64}{\detokenize{\三角比の三角形の面積公式{公式}[b]}}
+
+\三角比の三角形の面積公式{公式}[b]
+
+\auto{63}{\detokenize{\三角比の三角形の面積公式{証明}}}
+
+\三角比の三角形の面積公式{証明}
+
+\auto{63}{\detokenize{\ヘロンの公式{公式}[i]}}
-\三角形の面積{公式}[i]
+\ヘロンの公式{公式}[i]
-\auto{64}{\detokenize{\三角形の面積{公式}[b]}}
+\auto{63}{\detokenize{\ヘロンの公式{公式}[b]}}
-\三角形の面積{公式}[b]
+\ヘロンの公式{公式}[b]
-\auto{63}{\detokenize{\三角形の面積{証明}}}
+\auto{63}{\detokenize{\ヘロンの公式{証明}}}
-\三角形の面積{証明}
+\ヘロンの公式{証明}
+
+\auto{63}{\detokenize{\外接円の半径と三角形の面積{公式}[i]}}
+
+\外接円の半径と三角形の面積{公式}[i]
+
+\auto{63}{\detokenize{\外接円の半径と三角形の面積{公式}[b]}}
+
+\外接円の半径と三角形の面積{公式}[b]
+
+\auto{63}{\detokenize{\外接円の半径と三角形の面積{証明}}}
+
+\外接円の半径と三角形の面積{証明}
+
+\auto{64}{\detokenize{\三角形の面積公式}}
+
+\三角形の面積公式
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{場合の数と確率}
%\begin{description}
\auto{65}{\detokenize{\場合の数と確率{和集合の要素の個数}[i]}}
@@ -714,9 +740,22 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{図形の性質}
%\begin{description}
+
+\auto{105}{\detokenize{\平行線と線分比の性質{公式A}}}
+
+\平行線と線分比の性質{公式A}
+
+\auto{105}{\detokenize{\平行線と線分比の性質{公式B}}}
+
+\平行線と線分比の性質{公式B}
+
+\auto{105}{\detokenize{\平行線と線分比の性質{証明}}}
+
+\平行線と線分比の性質{証明}
+
\auto{105}{\detokenize{\図形の性質{内心}}}
\図形の性質{内心}
@@ -1939,19 +1978,42 @@ Now, here are the actual examples!
\不定積分の定義{定義}[b]
+\auto{316}{\detokenize{\不定積分の性質{公式A}[i]}}
+
+\不定積分の性質{公式A}[i]
+
+\auto{316}{\detokenize{\不定積分の性質{公式A}[b]}}
+
+\不定積分の性質{公式A}[b]
+
+\auto{316}{\detokenize{\不定積分の性質{公式B}[i]}}
+
+\不定積分の性質{公式B}[i]
+
+\auto{316}{\detokenize{\不定積分の性質{公式B}[b]}}
+
+\不定積分の性質{公式B}[b]
+
+\auto{316}{\detokenize{\不定積分の性質{公式C}[i]}}
+
+\不定積分の性質{公式C}[i]
+
+\auto{316}{\detokenize{\不定積分の性質{公式C}[b]}}
+
+\不定積分の性質{公式C}[b]
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{べき乗関数の不定積分}
%\begin{description}
-\auto{317}{\detokenize{\べき乗関数の不定積分{公式}[i]}}
+%\auto{317}{\detokenize{\べき乗関数の不定積分{公式}[i]}}
-\べき乗関数の不定積分{公式}[i]
+%\べき乗関数の不定積分{公式}[i]
-\auto{318}{\detokenize{\べき乗関数の不定積分{公式}[b]}}
+%\auto{318}{\detokenize{\べき乗関数の不定積分{公式}[b]}}
-\べき乗関数の不定積分{公式}[b]
+%\べき乗関数の不定積分{公式}[b]
%\end{description}
@@ -1962,7 +2024,6 @@ Now, here are the actual examples!
%\auto{319}{\texttt{\textbackslash 不定積分の性質\h{-0.1mm}$\lbrace$\h{公式A}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}
\auto[1]{\不定積分の性質{公式A}[i]
-}
\不定積分の性質{公式A}[i]
@@ -1970,14 +2031,12 @@ Now, here are the actual examples!
%\auto{320}{\texttt{\textbackslash 不定積分の性質\h{-0.1mm}$\lbrace$\h{公式A}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}
\auto[1]{\不定積分の性質{公式A}[b]
-}
\不定積分の性質{公式A}[b]
%\auto{321}{\texttt{\textbackslash 不定積分の性質\h{-0.1mm}$\lbrace$\h{公式B}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}
\auto[1]{\不定積分の性質{公式B}[i]
-}
\不定積分の性質{公式B}[i]
@@ -1985,14 +2044,12 @@ Now, here are the actual examples!
%\auto{322}{\texttt{\textbackslash 不定積分の性質\h{-0.1mm}$\lbrace$\h{公式B}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}
\auto[1]{\不定積分の性質{公式B}[b]
-}
\不定積分の性質{公式B}[b]
%\auto{323}{\texttt{\textbackslash 不定積分の性質\h{-0.1mm}$\lbrace$\h{公式C}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}
\auto[1]{\不定積分の性質{公式C}[i]
-}
\不定積分の性質{公式C}[i]
@@ -2001,7 +2058,6 @@ Now, here are the actual examples!
%\不定積分の性質{公式C}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}
\auto[1]{\不定積分の性質{公式C}[b]
-}
\不定積分の性質{公式C}[b]
@@ -2689,7 +2745,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{複素数の絶対値}
%\begin{description}
\auto{458}{\detokenize{\複素数の絶対値{定義}[i]}}
@@ -2718,7 +2774,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{極形式}
%\begin{description}
\auto{464}{\detokenize{\極形式{定義}[i]}}
@@ -2748,7 +2804,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{偏角}
%\begin{description}
\auto{470}{\detokenize{\偏角{定義}[i]}}
@@ -2842,7 +2898,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{楕円}
%\begin{description}
\auto{488}{\detokenize{\楕円{定義}[i]}}
@@ -2881,7 +2937,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{双曲線}
%\begin{description}
\auto{496}{\detokenize{\双曲線{定義}[i]}}
@@ -2928,7 +2984,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{連続な関数}
%\begin{description}
\auto{506}{\detokenize{\連続な関数{公式}[i]}}
@@ -2941,7 +2997,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{中間値の定理}
%\begin{description}
\auto{508}{\detokenize{\中間値の定理{公式}[i]}}
@@ -2967,7 +3023,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{微分}
%\begin{description}
\auto{512}{\detokenize{\微分{定義}[i]}}
@@ -3084,7 +3140,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{接線の方程式}
%\begin{description}
\auto{538}{\detokenize{\接線の方程式{公式}[i]}}
@@ -3097,7 +3153,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{法線の方程式}
%\begin{description}
\auto{540}{\detokenize{\法線の方程式{公式}[i]}}
@@ -3110,7 +3166,7 @@ Now, here are the actual examples!
%\end{description
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{不定積分}
%\begin{description}
\auto{542}{\detokenize{\不定積分{定義}[i]}}
@@ -3189,7 +3245,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{定積分}
%\begin{description}
\auto{560}{\detokenize{\定積分{定義}[i]}}
@@ -3215,7 +3271,7 @@ Now, here are the actual examples!
%\end{description}
%\end{simplesquarebox}
-
+
%\begin{simplesquarebox}{体積の積分}
%\begin{description}
\auto{564}{\detokenize{\体積の積分{公式}[i]}}