0

I want to create three empty boxes aligned like so using latex, so that my students can fill in proton and neutron numbers and the atomic symbol for a radioactive decay worksheet.

Any ideas how I can do this?

enter image description here

2

You could use picture mode or some low level programming.

\documentclass{article}

\newcommand{\particle}[1][1cm]{%
  \begingroup
  \setlength{\fboxsep}{-\fboxrule}%
  \leavevmode
  \vbox to 2.2\dimexpr#1\relax{%
    \hbox{\fbox{\rule{0pt}{#1}\rule{#1}{0pt}}}
    \vfill
    \hbox{\fbox{\rule{0pt}{#1}\rule{#1}{0pt}}}
  }%
  \kern3pt
  \fbox{\rule{0pt}{2.2\dimexpr#1\relax}\rule{1.5\dimexpr#1\relax}{0pt}}%
  \endgroup
}

\begin{document}

X \particle\qquad\particle[.5cm] Y

\end{document}

Adjust the default dimension (1cm) to your liking.

enter image description here

2

Using tikz, it is as easy as this:

\documentclass[12pt,a4paper]{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}[scale=1]
\draw[thick] (0,0)rectangle(1,1) (0,1.2)rectangle(1,2.2) (1.2,0)rectangle(2.7,2.2);
\end{tikzpicture}

\end{document}

enter image description here

You can use this in a newcommand for your convenience to insert it at your document wherever you want. You can also change the option scale=1 as you wish.

0

A simple code with hhline and a tabular environment:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{array, multirow, hhline}

\newcommand{\answerboxes}{%
\begingroup\setlength\doublerulesep{8pt}\setlength\arrayrulewidth{3pt}
\begin{tabular}{|p{2cm}|| p{4cm}|}
\hhline{|-||-|}
\rule{0pt}{2cm} & \multirow{2}{=}{}\\
\hhline{:=:|~|}
\rule{0pt}{2cm} &\\
\hhline{|-||-|}
\end{tabular}\endgroup}%

\begin{document}

\centering\answerboxes

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.