格式错误:2 列数学问题集;使用 TIKz 进行垂直枚举

格式错误:2 列数学问题集;使用 TIKz 进行垂直枚举

我正在尝试为尝试学习分配属性的数学学生创建一个 2 列、垂直枚举的问题集。

使用@Peter Grill 和@Tarass 编写的一些精彩的 Tikz 代码,我得到了显示分布的漂亮箭头。

我正在尝试解决的几个问题:

  1. 垂直列举每个问题(然后逐步解决。

  2. “关闭”解决方案,这样我就可以只向学生分发问题

  3. 在最终解决方案周围画一个框

对于我的 mwe 我只包含了 1 个问题,但每列需要 4 - 5 个问题。

提前感谢你的帮助!

    \documentclass{exam}
\usepackage{amsmath}
\usepackage{enumitem}
\usepackage{multicol}
\usepackage{multicol}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{calc,shapes}
\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}
\newcommand{\DrawBox}[2]{%
  \begin{tikzpicture}[overlay,remember picture]
    \draw[->,shorten >=5pt,shorten <=5pt,out=70,in=130,distance=0.5cm,#1] (MarkA.north) to (MarkC.north);
    \draw[->,shorten >=5pt,shorten <=5pt,out=50,in=140,distance=0.3cm,#2] (MarkA.north) to (MarkB.north);
  \end{tikzpicture}
}
    \newlength{\MyL}

\newcommand{\TkM}[2]{%
    \settowidth{\MyL}{#2}
    #2\hspace{-\MyL}\makebox[\MyL]{\tikzmark{#1}}
    }

\begin{document}
Use distributive property to simplify the expressions below.
 \begin{multicols}{2}
    \begin{enumerate}[label=\arabic*)]
\begin{align*}
%[\TkM{MarkA}{a}(\TkM{MarkB}{b}+\TkM{MarkC}{c})=ab+ac%
%\DrawBox{OrangeRed,distance=0.45cm,in=130,shorten >=3pt,shorten <=3pt}{Cerulean,out=65,in=110,distance=0.3cm,shorten >=3.5pt,shorten <=3pt}\]%
\item
-(2x+5)&=(\TkM{MarkA}{-1})(\TkM{MarkB}{2x}+\TkM{MarkC}{5})
\DrawBox{OrangeRed,distance=0.6cm}{Cerulean,out=60,in=110,distance=0.4cm}\\
       &=(-1)(2x)+(-1)(5)\\
       &=-2x+(-5)\\
       &=-2x-5
       \item
\end{align*}
\end{enumerate}
\end{multicols}
\end{document}

答案1

(1)编号:最好itemize使用问题编号本身。

(2)该命令\noprintanswers 将隐藏明确的解决方案,但会为学生的回答留出空间。此空间可以是空白框、线条或虚线,如示例所示。可以使用可选参数选择其大小。

(3)针对问题所请求的解决方案已构建。

(4) \multicolumn尝试平衡列,因此元素之间可能会出现不必要的空白。为了避免这种情况, \raggedcolumns正在使用。

(5)问题可能放在左下角,而答案则放在右上角。为了将两者放在一起,可以使用小页面(示例中为问题 #3)。

讲师页面

C

学生页面

b

\documentclass[answers]{exam}% changed <<<<<<<<<<<<<<<<<<

 \noprintanswers % without answers <<<<<<<<<<<<<<<<<<<<
   
\usepackage{amsmath}

\usepackage{multicol}
\setlength{\columnseprule}{0pt} % inter column rule width 
\setlength{\columnsep}{15.0pt}  % column separation

\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{calc,shapes}
\newcommand{\tikzmarkx}[1]{\tikz[overlay,remember picture] \node (#1) {};}
\newcommand{\DrawBox}[2]{%
\begin{tikzpicture}[overlay,remember picture]
    \draw[->,shorten >=5pt,shorten <=5pt,out=70,in=130,distance=0.5cm,#1] (MarkA.north) to (MarkC.north);
    \draw[->,shorten >=5pt,shorten <=5pt,out=50,in=140,distance=0.3cm,#2] (MarkA.north) to (MarkB.north);
\end{tikzpicture}
}
\newlength{\MyL}

\newcommand{\TkM}[2]{%
\settowidth{\MyL}{#2}
#2\hspace{-\MyL}\makebox[\MyL]{\tikzmarkx{#1}}
}


\begin{document}
    
\section*{ Use distributive property to simplify the expressions below}
\begin{multicols}{2}
    \raggedcolumns % do not balance the columns to avoid extra vertical space<<<<<<

    \begin{questions}
    
        \question Did you mutter something? % Q 1
        \begin{solutionorlines}[3in]
        The paralogisms of practical
        reason are what first give rise to the architectonic of practical
        reason. As will easily be shown in the next section, reason would
        thereby be made to contradict, in view of these considerations, the
        Ideal of practical reason, yet the manifold depends on the phenomena.
        Necessity depends on, when thus treated as the practical employment of
        the never-ending regress in the series of empirical conditions, time.
        \end{solutionorlines}
    
        %\printanswers % show this answer <<<<<<<<<<<<<<<<<<<<
        \question -(2x+5)        % Q 2
        \begin{solutionorlines}[2in]
            \begin{align*}          
            -(2x+5) &=(\TkM{MarkA}{-1})(\TkM{MarkB}{2x}+\TkM{MarkC}{5})
            \DrawBox{OrangeRed,distance=0.6cm}{Cerulean,out=60,in=110,distance=0.4cm}\\
            &=(-1)(2x)+(-1)(5)\\
            &=-2x+(-5)\\
            &=\fbox{-2x-5}
        \end{align*}
        \end{solutionorlines}       
        \noprintanswers
    
        %The minipage will keep the question and the solution together <<<<<<<<<<<<<<<
        \begin{minipage}{\dimexpr\columnwidth-\leftmargin} % Q 3    
            
        \question (3x+5)
        
        \begin{solutionorbox}[2in]
            \begin{align*}      
                (3x+5) &=(\TkM{MarkA}{1})(\TkM{MarkB}{3x}+\TkM{MarkC}{5})
                \DrawBox{OrangeRed,distance=0.6cm}{Cerulean,out=60,in=110,distance=0.4cm}\\
                &=(3x)+(5)\\
                &=\fbox{3x-5}
            \end{align*}
        \end{solutionorbox}
        \end{minipage}
        
        \question (4x+5)  % Q 4     
        \begin{solutionorbox}[3in]
            \begin{align*}
                (4x+5) &=(\TkM{MarkA}{1})(\TkM{MarkB}{4x}+\TkM{MarkC}{5})
                \DrawBox{OrangeRed,distance=0.6cm}{Cerulean,out=60,in=110,distance=0.4cm}\\
                &=(4x)+(5)\\
                &=\fbox{4x-5}
            \end{align*}
        \end{solutionorbox}
        
        \question -(5x+5)  % Q 5            
        \begin{solutionordottedlines}[1.5in]
            \begin{align*}          
                -(2x+5) &=(\TkM{MarkA}{-1})(\TkM{MarkB}{5x}+\TkM{MarkC}{5})
                \DrawBox{OrangeRed,distance=0.6cm}{Cerulean,out=60,in=110,distance=0.4cm}\\
                &=(-1)(5x)+(-1)(5)\\
                &=-5x+(-5)\\
                &=\fbox{-5x-5}
            \end{align*}
        \end{solutionordottedlines}
    \end{questions}
\end{multicols}

\end{document}

(6) \printanswers并可\noprintanswers用于展示单个示例解决方案来指导学生。例如

    \printanswers % show this answer <<<<<<<<<<<<<<<<<<<<
    \question -(2x+5)        % Q 2
    \begin{solutionorlines}[2in]
        \begin{align*}          
        -(2x+5) &=(\TkM{MarkA}{-1})(\TkM{MarkB}{2x}+\TkM{MarkC}{5})
        \DrawBox{OrangeRed,distance=0.6cm}{Cerulean,out=60,in=110,distance=0.4cm}\\
        &=(-1)(2x)+(-1)(5)\\
        &=-2x+(-5)\\
        &=\fbox{-2x-5}
    \end{align*}
    \end{solutionorlines}       
    \noprintanswers 

将产生

埃

相关内容