0

I have attached a screenshot of the algebra worksheet that I am trying to create.

Format I'm trying to create:

enter image description here

In the code below, I have successfully (miracle of miracles) created a 2-column problem set. However, I've been stymied in my efforts to create/draw the 2 cell tables we call "generic rectangles".

If you peruse the file attachment, you'll see an example of the problem set that was originally (and badly) created in Word.

In this example, you'll notice integers colored red and blue. That's what the students write to effect the distribution of a constant located outside the parenthesis containing the binomial. So I need sufficient space around and inside the 2 cell rectangle for students to write the integers.

One last problem...

In my code, for prob #10, I can't figure out how to insert space after "(10)" so that the equation isn't bumping up against the problem number.

Thanks so much for taking time to respond to my query!

PS Because I'm a Latex newbie, there are probably superfluous packages being loaded in the preamble.

\documentclass[12pt]{exam}

%\printanswers % uncomment to print solutions

\usepackage{tasks}    
\usepackage[margin=0.5in]{geometry}

\everymath{\displaystyle}

%\unframedsolutions % uncomment to remove boxes from solutions
\setlength{\parindent}{0pt} % removes paragraph indentation

\pagestyle{headandfoot}
\header{Semester 1 Review \#3: Distribution \& Solving}{}{03/12 - 12/13/19} 

\begin{document}

\makebox[\textwidth]{Name:\enspace\hrulefill}

\vspace{4mm}

\fbox{\fbox{\parbox{7.5 in}{
\textbf {Obj. Q.8.b:} I can use the generic rectangle to distribute the constant. (10 pts. tot.) \\
\newline
Simplify by expanding with repeated multiplication.YOU WILL NOT RECEIVE CREDIT IF YOU SKIP THIS STEP!!! Your answer should only contain positive exponents.}}}

%Use the 'tasks' tool to double column itemize and enumerate
%Credit to: https://tex.stackexchange.com/questions/402222/two-column-enumerated-list
%the first item sets the spacing
\settasks{after-item-skip=8em,
          after-skip=2cm,
          label-width=3ex,
          %change '1' to 'a' if you want letters instead of numbers
          counter-format=(tsk[1]),
          column-sep=2em
          }

\begin{tasks}(2)
\task $6(1-7k)$
\begin{solution}
solution
\end{solution}
\task $5(1-10x)$
\begin{solution}
solution
\end{solution}
\task $-2(-9+5x)$
\begin{solution}
solution
\end{solution}
\task $-(7x-10)$
\begin{solution}
solution
\end{solution}
\task $-5(1+5x)$
\begin{solution}
solution
\end{solution}
\task $2(x-5)$
\begin{solution}
solution
\end{solution}
\task $4-(-5-2p)$
\begin{solution}
solution
\end{solution}
\task $9+9(-6-7n)+8k$
\begin{solution}
solution
\end{solution}
\task $-3(-2+5k)-9(10v+4)$
\begin{solution}
solution
\end{solution}
\task $10(x+7)-10(9x+1)$
\begin{solution}
solution
\end{solution}
\end{tasks}

\pagebreak

\makebox[\textwidth]{Name:\enspace\hrulefill}

\vspace{4mm}

\fbox{\fbox{\parbox{7.5 in}{
\textbf {Obj. Q.8.b:} Use the distributive property to simplify the following expression. YOU MUST USE THE GENERIC RECTANGLES PROVIDED. (10 pts. tot.) \\
\newline
Simplify by expanding with repeated multiplication.YOU WILL NOT RECEIVE CREDIT IF YOU SKIP THIS STEP!!! Your answer should only contain positive exponents.}}}
\vspace{0.5mm}

%Use the 'tasks' tool to double column itemize and enumerate
%Credit to: https://tex.stackexchange.com/questions/402222/two-column-enumerated-list
%the first item sets the spacing

\settasks{after-item-skip=8em,
          after-skip=2cm,
          label-width=3ex,
          %change '1' to 'a' if you want letters instead of numbers
          counter-format=(tsk[1]),
          column-sep=2em
          }

%[counter-format = tsk[R], label-format=\normalfont,  after-  skip=1\medskipamount](3)

\begin{tasks}(2)
\task $3x^4\cdot 4x^3$
\begin{solution}
solution
\end{solution}

\end{tasks}
\end{document}

This image link is shows a couple of minor formatting glitches in Bernard's VERY helpful code submitted as an answer. minor edits requested] (https://drive.google.com/file/d/1ZjkZPnymXd51g6nck6IJ4frJBg7kxDOO/view?usp=sharing)[![enter image description here]2

Siuslaw Math
  • 641
  • 3
  • 8
  • Bernard, thanks so much for the edits! What did I do wrong in copy/pasting the LaTex code? Don't won't to repeat that error.Thanks! – Siuslaw Math Dec 11 '19 at 19:01
  • To highlight a code, you have to insert 4 (I believe) spaces at the beginning of each line. The simplest way to do that is to select the code in the edit window and click on the pair of braces in the toolbar above. – Bernard Dec 11 '19 at 19:07
  • 1
    I've just compiled your code, with difficulties – there's an error message about the \header{Semester 1 …} in the preamble (! You can't use macro parameter character #' in horizontal mode) – Bernard Dec 11 '19 at 19:34
  • I don't understand exactly what your two-cell rectangle is, and where it should go. Can you explain, or post a handmade sketch? – Bernard Dec 11 '19 at 19:57
  • Mr. Bernard, thanks for hanging in there with me on this post. Inside my op, I attached a link to a pdf showing the desired formatting. See here please: https://drive.google.com/file/d/1W4J0bZXlSaDVf_anoDY5z-SNRZFgv4Ls/view?usp=sharing – Siuslaw Math Dec 11 '19 at 21:31
  • 2
    Your link requires permission. Could you post the document as an image? – N. F. Taussig Dec 11 '19 at 21:37
  • Welcome to TeX.SX!! Please don't post external links because if they disappear in the future then your question will difficult to understand and hence of limited use to others. As @N.F.Taussig said, please attach the image to your question instead. –  Dec 11 '19 at 21:47
  • I have removed the unnecessary packages. You seem to be using an old version of the tasks package because counter-format is now depreciated. If you update tasks then you should use label=(\arabic*) instead. For your issue with the (10) I think that you want label-width=4ex. I don't understand the 2-cell rectangles... –  Dec 11 '19 at 22:04
  • Thanks so much for both the edits and the suggestion to post image. Huge help! – Siuslaw Math Dec 12 '19 at 00:14
  • For the enumeration not working: the syntax has changed since version 1.0 of tasks: uou should now use label=\arabic*) (as with enumitem). Spacing between the equation and the table depends on the size of the table. What should be a sensible width for each cell? Other possibility: the table starts on the following line. – Bernard Dec 13 '19 at 10:01
  • Thanks for suggestion. Problem See below. a Really appreciate all your help. %the first item sets the spacing \settasks{% item-indent=1.5em, after-item-skip=8em, before-skip=4ex, after-skip=2cm, label-width=3ex, %3ex label-align=right, label-offset=0.5em, %change '1' to 'a' if you want letters instead of numbers % counter-format=(tsk[1]), label =\arabic), column-sep=2em } % begin emumation code here \begin{enumerate}[label=\arabic.]

    \begin{tasks}(2)

    \task $6(1-7k)$\hfill \genrectangle

    – Siuslaw Math Dec 13 '19 at 22:36

1 Answers1

2

Is this what you want?

\documentclass[12pt]{exam}

%\printanswers % uncomment to print solutions.
% MACROS
%Not sure all of these packages are necessary...but the 'taks package is certainly necessary
\usepackage{amsmath}
\usepackage{cancel}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{pgfplots}
\usepackage{caption} % allows captions in minipage envir (issue w/solutions envir)
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{framed} %box para
\usepackage{tkz-euclide}
\usepackage{multicol}
\usepackage{tasks}
\pgfplotsset{compat=1.10}
%\displaystyle for all $$ math environments use \lim\limits for other environments

\usepackage[margin=0.5in]{geometry}

\everymath{\displaystyle}

\newcommand{\genrectangle}{\smash{\begin{tabular}{|p{20mm}|p{20mm}|}\hline\rule{0pt}{15mm} & \\\hline\end{tabular}}}

%\unframedsolutions % uncomment to remove boxes from solutions
\setlength{\parindent}{0pt} % removes paragraph indentation

\pagestyle{headandfoot}
\def\no{4}
\header{Semester 1 Review \no: Distribution \& Solving}{}{03/12 - 12/13/19}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% -------------------------- DOCUMENT STARTS HERE -------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\makebox[\textwidth]{Name:\enspace\hrulefill}


\vspace{4mm}

\fbox{\fbox{\parbox{7.5 in}{
\textbf {Obj. Q.8.b:} I can use the generic rectangle to distribute the constant. (10 pts. tot.) \\
\newline
Simplify by expanding with repeated multiplication.YOU WILL NOT RECEIVE CREDIT IF YOU SKIP THIS STEP!!! Your answer should only contain positive exponents.}}}


%Use the 'tasks' tool to double column itemize and enumerate
%Credit to: https://tex.stackexchange.com/questions/402222/two-column-enumerated-list
%the first item sets the spacing
\settasks{%
item-indent=1.5em,
after-item-skip=8em,
            before-skip=4ex,
          after-skip=2cm,
          label-width=3ex, %3ex
label-align=right,
label-offset=0.5em,
          %change '1' to 'a' if you want letters instead of numbers
         % counter-format=(tsk[1]),
         label =\arabic*),
          column-sep=2em
          }

\begin{tasks}(2)
\task $6(1-7k)$\hfill \genrectangle
\begin{solution}
solution
\end{solution}
\task $5(1-10x)$\hfill \genrectangle
\begin{solution}
solution
\end{solution}
\task $-2(-9+5x)$\hfill \genrectangle
\begin{solution}
solution
\end{solution}
\task $-(7x-10)$\hfill \genrectangle
\begin{solution}
solution
\end{solution}
\task $-5(1+5x)$\hfill \genrectangle
\begin{solution}
solution
\end{solution}
\task $2(x-5)$\hfill \genrectangle
\begin{solution}
solution
\end{solution}
\task $4-(-5-2p)$\hfill \genrectangle
\begin{solution}
solution
\end{solution}
\task $9+9(-6-7n)+8k$\hfill \genrectangle
\begin{solution}
solution
\end{solution}
\task $-3(-2+5k)-9(10v+4)$\hfill \genrectangle
\begin{solution}
solution
\end{solution}
\task $10(x+7)-10(9x+1)$\hfill \genrectangle
\begin{solution}
solution
\end{solution}
\end{tasks}

\pagebreak

\makebox[\textwidth]{Name:\enspace\hrulefill}

\vspace{4mm}

\fbox{\fbox{\parbox{7.5 in}{
\textbf {Obj. Q.8.b:} Use the distributive property to simplify the following expression. YOU MUST USE THE GENERIC RECTANGLES PROVIDED. (10 pts. tot.) \\
\newline
Simplify by expanding with repeated multiplication.YOU WILL NOT RECEIVE CREDIT IF YOU SKIP THIS STEP!!! Your answer should only contain positive exponents.}}}
\vspace{0.5mm}

%Use the 'tasks' tool to double column itemize and enumerate
%Credit to: https://tex.stackexchange.com/questions/402222/two-column-enumerated-list
%the first item sets the spacing

\settasks{after-item-skip=8em,
          after-skip=2cm,
          label-width=3ex,%
label-align = right,
label-offset = 1em,
item-indent=4em,
          %change '1' to 'a' if you want letters instead of numbers
          %counter-format=(tsk[1]),
           label =\arabic*),
          column-sep=2em
          }

%[counter-format = tsk[R], label-format=\normalfont, after- skip=1\medskipamount](3)

\begin{tasks}(2)
\task $3x^4\cdot 4x^3$
\begin{solution}
solution
\end{solution}

\end{tasks}

\end{document} 

enter image description here

Bernard
  • 271,350
  • Bernard, thanks for your excellent code. very helpful. I edit the op to include (I hope) an image of a couple of minor glitches with your code. The image is inserted at the very end of the original code. – Siuslaw Math Dec 12 '19 at 18:42
  • Actually here is the link to imgur image of desire changes. Is there a better way to post an image in response to Bernard's answer? https://imgur.com/a/392awkU – Siuslaw Math Dec 13 '19 at 04:59