I'm 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 Preamble:
\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}
\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.\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>}
.SIunits
package redefines\square
. See the package documentation for how to handle this. (@PhelypeOleinik)\usepackage[applemac]{}
makes no sense. Get rid of it.\usepackage{epsfig}
in any document written after 1994, it's just a legacy wrapper for older documents. No need to specifygraphics