jueves, 18 de febrero de 2016

Dibujar checkbox con LaTeX


\documentclass[12pt,a4paper,oneside]{article} % Font size, paper size, one or two-sided pages.
\usepackage[utf8]{inputenc} % Input encoding.
\usepackage[spanish,es-noshorthands]{babel} % Language support.
\usepackage{ifthen} % If-then-else, for optional content.
\usepackage{amssymb} % Required for checkboxes.



\newcommand{\checkbox}[2]{\ifthenelse{\equal{#1}{c}}
{\makebox[0pt][l]{$\square$}\raisebox{.15ex}{\hspace{0.1em}$\checkmark$} }
{\makebox[0pt][l]{$\square$}\raisebox{.15ex}{} \hspace{1em}}
} % End newcommand


\begin{document}
\noindent
\checkbox{c} \textbf{Opción 1} \checkbox{c} \textbf{Opción 4}\\
\checkbox{ } \textbf{Opción 2} \\
\checkbox{c} \textbf{Opción 3} \\
\end{document}

No hay comentarios:

Publicar un comentario