0

im trying to add a square to my latex document. I'm trying to do this using the $ \square $ command. However in my latex document i get the error.

Missing } inserted

If i type $ \square{} $, there's no error, but it looks like the output of $()^2$. Does anyone know how to solve this? Here's my Preambel:

\documentclass[a4paper,12pt,numbers=noenddot]{scrreprt} 
\usepackage[applemac]{}
\usepackage[T1]{fontenc}
\usepackage{fancyhdr}
\usepackage[dvips]{graphics}
\usepackage[dvips]{graphicx}
\usepackage{color}
\usepackage{longtable}
\usepackage{supertabular}
\usepackage{lscape}
\usepackage{afterpage}
\usepackage{setspace}
\usepackage{calc}
\usepackage{verbatim}
\usepackage{latexsym}
\usepackage{float,rotating}
\usepackage[justification=raggedright,singlelinecheck=false]{caption}
\usepackage{placeins}
\usepackage[ngerman]{babel}
\usepackage{bibgerm}
\usepackage{textcomp}
\usepackage{epsfig}
\usepackage{floatfig}
\usepackage{wrapfig}
\usepackage{psfrag}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{wasysym}
\usepackage[amssymb,thinspace]{SIunits}
\usepackage{enumerate}
\usepackage[version=3]{mhchem}
\usepackage{remreset}
\usepackage{stmaryrd} 
\usepackage{dcolumn}
\usepackage{multirow}
\usepackage{footnpag}
\usepackage{booktabs} 

\usepackage[numbers,sort]{natbib}
\usepackage{listings}
\usepackage{hyph}
\usepackage{boxit}

\begin{document}
$\square$
\end{document}
  • 2
    Welcome to TEX.SE! Please provide a full minimal working example which reproduces the issue, possibly starting with \documentclass{...} and ending with \end{document}. In this way we can copy-paste the code and look at the problem without resorting to wild guesses about what you are doing. – campa Aug 16 at 11:42
  • 4
    From your description, I'd say that \square{X} is supposed to produce "X²", so the command is said to have an "argument", which in this case was "X". If you do only $\square$, the command never sees the argument it was expecting and then produces some error. So the correct usage is \square{<stuff-to-be-squared>}. – Phelype Oleinik Aug 16 at 11:46
  • 4
    The SIunits package redefines \square. See the package documentation for how to handle this. (@PhelypeOleinik) – Harald Hanche-Olsen Aug 16 at 11:55
  • 5
    An unrelated piece of advice, though: You seem to be using way too many packages. Perhaps you inherited this preamble from somewhere. Recommended practice is only to use packages that you know you will need. This leads to fewer problems overall. The line \usepackage[applemac]{} makes no sense. Get rid of it. – Harald Hanche-Olsen Aug 16 at 12:02
  • 4
    you should not be loading \usepackage{epsfig} in any document written after 1994, it's just a legacy wrapper for older documents. No need to specify graphics – David Carlisle Aug 16 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.