10

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

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

3 Answers 3

4

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

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

Rendering

12

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
  • +1 for not taking a sledgehammer to crack a nut, but staying flexible.
    – TeXnician
    Feb 10, 2017 at 10:15
8

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}
1
  • +1. If in doubt, use TikZ.
    – ScumCoder
    Jan 23, 2022 at 14:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .