I think I have seen this done before, but I am not sure. Is there a way to build a fake figure in LaTeX? I would like to do this while the other figures in the document render correctly.

Ideally, I would like to have a white box with large text in it, and with a black frame around it. It would be great to be able to control the height and width of this box.


%% Code to make a fake text box

I am loading TikZ in the document, so I can use solutions that may require it.


A simple way to do this is to use \fbox{Dummy} with a \resizebox{<width>}{<height>}{<content>}. Maybe playcing the \fbox on the outside.

It is even easier and more flexible with my adjustbox package, e.g.:

\adjustbox{margin=1em,width=.9\textwidth,set height=10cm,frame,center}{Dummy}




    \adjustbox{margin=1em,width=\textwidth,set height=4cm,set depth=4cm,frame,center}{Dummy}




| improve this answer | |
  • 2
    If multi-line text is required add e.g. a minipage=<width> or similar key at the very beginning. – Martin Scharrer Mar 29 '12 at 18:28
  • @AndrewSwann: Yes, thanks. My mistake. Fixed now. – Martin Scharrer Oct 8 '18 at 8:48

Another way could be using a \fbox to frame a \parbox (using the second optional argument you can control the height):


  \fbox{\parbox[t][#1][c]{#2}{\centering\huge #3}}}


\FramedBox{4cm}{4cm}{Some text}

\FramedBox{2cm}{8cm}{Some text}


enter image description here

| improve this answer | |

Here's a way: an \fbox containing invisible rules as high and wide as specified

\newcommand{\fakebox}[2]{% #1 = width, #2 = height


The initial setting will add no additional width or height due to the borders.

Adding a word is not difficult: I would never use a large word, just a small one in a corner to make clear that this is only a placeholder

\newcommand{\fakebox}[2]{% #1 = width, #2 = height
  {\fboxsep=-\fboxrule\fbox{\makebox[0pt][r]{\kern2\fboxrule\tiny dummy}%
| improve this answer | |
  • There is a \phantombox{<width>}{<height>}{<depth} macro provided by adjustbox, which could be placed in a \frame or \fbox. You can also reduce the dimensions to compensate for the frame rule width and separation. – Martin Scharrer Mar 29 '12 at 18:03

My approach is very similar to my solution for this https://tex.stackexchange.com/a/44199/10570 . It uses the picins package.



    \pictureBox{8cm}{5cm}{Here is the text.}
    \caption{My placholder}
| improve this answer | |

An other very simple solution may be to use the \missingfigure command of the todonotes package. You can adjust the width and height of the figure with the figwidthand figheight parameters : \missingfigure[figwidth=6cm]{Testing a long text string} You can also change the color of the background with the figheightparameter.

| improve this answer | |

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.