Text Formattingsmall square around number

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
abu aasiyah
Posts: 26
Joined: Wed Sep 30, 2009 7:04 pm

small square around number

Post by abu aasiyah »

Hey,

How do I put a small square around a number. I have tried this with a circle. I don't have any latex-code. Otherwise I would have given it.

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

small square around number

Post by localghost »

Take a look at the suggestions to your related request [1]. You can adapt the provided code samples very easy by studying the pgf/tikZ manual.

Code: Select all

\newcommand*\rectangled[1]{%
  \tikz[baseline=(R.base)]\node[draw,rectangle,inner sep=0.5pt](R) {#1};\!
}
Especially for circled numbers you can take a look at the pifont package from the PSNFSS. It gives you special access to the »Zapf Dingbats« font.

[1] View topic: circle around letters


Best regards
Thorsten
Post Reply