Is there a dummy package like Lipsum or Blindtext for Tables and Figures?

I'm not sure how much this adds to the world, but here you go.

The package provides a dummy figure and a dummy table in float environments. The table will always equal the \linewidth so you can use it in different page geometries, as in the twocolumn example below. The figure is really a table, but this didn't seem like a problem if the main concern was to check caption formats and page layout.

I'd like to make this configurable (specify the float position, number of table rows, different figure widths, etc.) but I'll leave that to others if they need more than this provides.


Package sator.sty

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{sator}[2014/11/26 Dummy figures and tables for testing, by Andrew A. Cashner, [email protected]]

\RequirePackage{tabulary,booktabs}

\newcommand{\sator}{Sator arepo tenet opera rotas}
\newcommand{\Sator}{Sator Arepo Tenet Opera Rotas}

% For float labels
\newcounter{fignum}
\newcounter{tabnum}

% Figures
\newcommand{\satorfig}{%
    \stepcounter{fignum}%
    See figure~\ref{fig:\thefignum}.\par
    \begin{figure}
    {\huge\bfseries\hfil%
    \begin{tabular}{|c|c|c|c|c|} \hline
        S & A & T & O & R\\ \hline
        A & R & E & P & O\\ \hline
        T & E & N & E & T\\ \hline
        O & P & E & R & A\\ \hline
        R & O & T & A & S\\ \hline
    \end{tabular}}

    \caption{\sator}
    \label{fig:\thefignum}
    \end{figure}
}

%*******************
% Tables
\newcommand{\tableheader}{No. & Sator Arepo & Tenet Opera & Rotas\\}
\newcommand{\tablerow}[1]{#1 & \sator &  \sator & \sator\\}

\newcommand{\satortab}{%
    \stepcounter{tabnum}%
    See table~\ref{table:\thetabnum}.\par
    \begin{table}
        \caption{\sator}
        \label{table:\thetabnum}

        \begin{tabulary}{\linewidth}{rLLL}
            \toprule
            \tableheader\midrule
            \tablerow{1}
            \tablerow{2}
            \tablerow{3}
            \tablerow{4}
            \bottomrule
        \end{tabulary}
    \end{table}%
}

\endinput

Example use:

\documentclass[twocolumn]{article}
\usepackage{sator}
\usepackage[nopar]{lipsum}

\begin{document}

\section{\Sator}
\lipsum[1-3]

\satorfig

\lipsum[4]

\subsection{\Sator}
\lipsum[5-7]

\satortab

\lipsum[8-9]
\satorfig
\end{document}

enter image description here enter image description here

Tags:

Tables

Floats