Overwrite unicode-maths \QED

should fix #26Signed-off-by: Adrian C. Hinrichs's avatarAdrian C. Hinrichs <adrian.hinrichs@rwth-aachen.de>
parent db6e6977
......@@ -36,8 +36,8 @@
%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
%% SOFTWARE.
\def\fileversion{v3.1}
\def\filedate{2018/11/10}
\def\fileversion{v3.1a}
\def\filedate{2018/11/29}
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesClass{homeworkassignment}[\filedate\space\fileversion]
\RequirePackage{suffix}
......@@ -68,6 +68,13 @@
\DeclareBoolOption[true]{twocolumn}
\DeclareComplementaryOption{onecolumn}{twocolumn}
\DeclareStringOption[all]{hlines}
\DeclareBoolOption[\boolean{xetex}]{unicode-math}
\ifhwa@unicode-math
\Requirepackage{unicode-math}
\AtBeginDocument{\let\QEDSymbol\QED
\renewcommand{\QED}{\hwa@QED}
}
\fi
\ProcessKeyvalOptions*
\ifhwa@twoside
\PassOptionsToClass{twoside}{article}
......@@ -314,10 +321,11 @@
}
}
\newcommand{\QED}{\begin{flushright}
\newcommand{\hwa@QED}{\begin{flushright}
\textsc{Qed}
\end{flushright}
}
\newcommand{\QED}{\hwa@QED}
\newcommand{\EOP}{\begin{flushright}
\(\square\)
\end{flushright}
......
......@@ -29,8 +29,8 @@
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
% \fi
\def\fileversion{v3.1}
\def\filedate{2018/11/10}
\def\fileversion{v3.1a}
\def\filedate{2018/11/29}
% \iffalse
%<*driver>
\ProvidesFile{homeworkassignment.dtx}
......@@ -249,6 +249,25 @@
% \begin{macrocode}
\DeclareStringOption[all]{hlines}
% \end{macrocode}
% \DescribeMacro{unicode-math} Loads the unicode-math–package and
% overwrites the damn \texttt{\textbackslash QED}–Command unicode–math
% introduces, that creates a filled out box and only works in
% math–mode, but not telling you that it only works in math–mode or
% overwrites an already existing command. Because unicode–math does
% this in \texttt{\AtBeginDocument}, we will also define our QED–macro
% at Begin document, if this option is passed in \ref{imp:QED}
% If XeTeX is used, the default option for this is
% \texttt{true}, otherwise it is false.
% \begin{macrocode}
\DeclareBoolOption[\boolean{xetex}]{unicode-math}
\ifhwa@unicode-math
\Requirepackage{unicode-math}
\AtBeginDocument{\let\QEDSymbol\QED
\renewcommand{\QED}{\hwa@QED}
}
\fi
% \end{macrocode}
%
% Loads article and processes the options
% \begin{macrocode}
\ProcessKeyvalOptions*
......@@ -669,10 +688,11 @@
% respectively. |\qed| is not implemented, to keep compatibility to
% several Math-packages, which define the later.
% \begin{macrocode}
\newcommand{\QED}{\begin{flushright}
\newcommand{\hwa@QED}{\begin{flushright}
\textsc{Qed}
\end{flushright}
}
\newcommand{\QED}{\hwa@QED}
\newcommand{\EOP}{\begin{flushright}
\(\square\)
\end{flushright}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment