6

I am looking for a dotted box as a placeholder for a "normal sized" character.

For example I would like to put it under a function to represent the placeholder, e.g. \sqrt{\dottedbox}. Something like this:

enter image description here

  • 2
    What do you mean with "normal sized"? A capital letter? A letter like "g"? – TeXnician Feb 10 '17 at 9:28
  • @TeXnician Good question. I am not sure. A capital letter sounds good to me. – Daniel Feb 10 '17 at 9:33
  • @TeXnician I have added a small image. Maybe that helps. – Daniel Feb 10 '17 at 9:34
4

The stix package provides a \dottedsquare symbol that could fit.

\documentclass{article}
\usepackage{stix}
\begin{document}                         
     $\dottedsquare\sqrt{\dottedsquare}$
\end{document}

Rendering

8

Not a dotted box, but a dashed box with adapted parameters. Here is a code with dashbox: I defined a \dashedph command with an optional argument (default: capital H). I also suggest a simple \colorph (colorbox place holder):

\documentclass{article}
\usepackage[utf8]{inputenc}%
\usepackage[svgnames]{xcolor}%
\usepackage{dashbox}%
\usepackage{mathtools, amssymb}

\newcommand\dashedph[1][H]{\setlength{\fboxsep}{0pt}\setlength{\dashlength}{2.2pt}\setlength{\dashdash}{1.1pt} \dbox{\phantom{#1}}}

\newcommand\colorph[1][H]{\setlength{\fboxsep}{0.3pt}\setlength{\dashlength}{2.2pt}\setlength{\dashdash}{1.1pt} \colorbox{lightgray!40!Lavender!40!}{\phantom{#1}}}

\begin{document}

\[ \sqrt{\dashedph} \enspace \sqrt{\colorph}\]%

\end{document} 

enter image description here

  • +1 for not taking a sledgehammer to crack a nut, but staying flexible. – TeXnician Feb 10 '17 at 10:15
7

A simple approach (not long tested) is to use tikz. You can adjust the vertical space to your needs by replacing A in \vphantom.

tikz box

\documentclass[a4paper,11pt]{article}

\usepackage{tikz}

\def\dottedbox{\tikz\node[draw=black,dotted] {\vphantom{A}};}


\begin{document}
\dottedbox
$\sqrt{\dottedbox}$

\end{document}

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.