Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interactive Checkbox in Latex

Does anyone know how to do an interactive checkbox in LaTeX that can be crossed when it is clicked? Right now I can get it to work with with a checkbox that glows red when checked like this:

enter image description here

with

\usepackage{hyperref}

\begin{document}
  \begin{Form}
    \CheckBox[name=mycheckbox]{This is a check box:}
  \end{Form}
\end{document}

but I'm not sure how you make it a cross instead of a glow when checked

like image 856
Andrew Avatar asked Aug 05 '26 00:08

Andrew


1 Answers

In theory you can use the checkboxsymbol option to choose which symbol from pifont you want to use - but be aware that not all pdf viewer will display this correctly. The following screenshot was taken with adobe reader.

\documentclass{article}

\usepackage{hyperref}

\begin{document}
  \begin{Form}
    \CheckBox[name=mycheckbox,checkboxsymbol=\ding{53}]{This is a check box:}
  \end{Form}
\end{document}

enter image description here

Mac preview will show the default checkmark instead, other viewers might show nothing at all.

like image 93
samcarter_is_at_topanswers.xyz Avatar answered Aug 08 '26 05:08

samcarter_is_at_topanswers.xyz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!