Latex Code to Create Math Matching Game - PhysicsForums

  • Context: LaTeX 
  • Thread starter Thread starter karush
  • Start date Start date
  • Tags Tags
    Game
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
karush
Gold Member
MHB
Messages
3,240
Reaction score
5
https://www.physicsforums.com/attachments/8765

ok I am trying to find out what the latex code is to do this.
whether or not it could be used here I do not know
but trying to see if a cell phone version of it could be created.

I think MHB could be advertised a lot if students could get these on their cell phone with MHB link and logo on it

Just a thot
:cool:
 
Physics news on Phys.org
Well, we can do for instance:
\begin{tikzpicture}[every node/.style={outer sep=1pt}]
%preamble \usepackage{amsmath,amssymb}
\usetikzlibrary{matrix}

\matrix (m) [matrix of math nodes,nodes in empty cells,
column 1/.style={nodes={anchor=east}},
column 2/.style={nodes={circle,draw}},
column 3/.style={nodes={circle,draw}},
column 4/.style={nodes={anchor=west}},
]{
(a+b)^2 &[2mm] &[1cm] &[2mm] \cos(2\theta)\\
(a-b)^2 & & & -\frac{1}{12}\\
\frac{n!}{k!(n-k)!} & & & 1\\
\cos^2\theta-\sin^2\theta & & & a^2+2ab+b^2\\
\cos^2\theta+\sin^2\theta & & & \binom{n}{k}\\
\sum_{n=1}^\infty n & & & a^2-2ab+b^2\\
};

\draw[blue,ultra thick]
(m-3-2) -- (m-5-3)
(m-6-2) -- (m-2-3)
;
\end{tikzpicture}

Click on it to see the latex code.
 
ok, but I think I know that much, that was just a sample output.

need to know how you code this so when 2 of the buttons selected are correct it will draw a line connecting them. if incorrect it will display message.

I've seen language matching apps but they are quite sloppy

how do you do a select button in latex