LaTeX Latex Code to Create Math Matching Game - PhysicsForums

  • Thread starter Thread starter karush
  • Start date Start date
  • Tags Tags
    Game
AI Thread Summary
The discussion revolves around creating an interactive feature using LaTeX, specifically focusing on generating a visual output that connects selected buttons based on user input. The initial inquiry seeks LaTeX code to achieve this functionality, with an emphasis on developing a mobile-friendly version that could promote the MHB (Math Help Board) platform. Participants explore the use of TikZ for visual representation and discuss the need for coding logic that would allow for correct selections to be visually connected, while incorrect selections would trigger a message. The conversation highlights the potential for a more polished user experience compared to existing language matching applications.
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
 

Similar threads

Replies
1
Views
2K
Replies
1
Views
3K
Replies
5
Views
2K
Replies
4
Views
4K
Replies
16
Views
4K
Replies
1
Views
4K
Replies
5
Views
3K
Replies
3
Views
1K
Back
Top