I am using acm template and want < and > bracket. I checked out some posts regarding this question and they have suggested to use \left and \right. But the problem is when I use them, they give me error saying ! Missing delimiter (. inserted). I want to write html code like <html>.

I do not want the elongated '<' which is a delimiter from mathsymbols. I want the simple '<'.

Here is the sample code


% Package to generate and customize Algorithm as per ACM style

% Document starts

% Title portion
\title{Some Title}
\author{Some Name
\affil{Some University}}

$\left$ source $\right$

But if I use $\langle$ and $\rangle$ it doesn't give me any error but gives weird left and right angles.

  • What do you what to achieve? What do you want to do with the brackets?
    – azetina
    Jun 14, 2012 at 20:17
  • I want to write html code like in <html>. I have edited the question as well! Jun 14, 2012 at 20:20
  • \left and \right are macros that act on extensible delimiters, which you haven't specified. You're perhaps interested in $\left\langle\textrm{source}\right\rangle$?
    – Werner
    Jun 14, 2012 at 20:20
  • Remember that a \left must be accompanied by \right command.
    – azetina
    Jun 14, 2012 at 20:22
  • This definition works for me: \newcommand{\braca}[1]{\ifmmode\left\langle{#1}\right\rangle\else$\left\langle{\text{#1}}\right\rangle$\fi}. You can use it as \braca{html} in text mode or, $\braca{x = y ^2}$ in math mode (assuming you are loading amsmath, if you can \textrm{} instead of \text{}). Jun 14, 2012 at 20:24

1 Answer 1


I would suggest creating a command that would represent your HTML tags. Something like \htmltag:

enter image description here

\usepackage{graphicx}% http://ctan.org/pkg/graphicx
There is \htmltag{source} and also \htmltag{img}.

graphicx's \scalebox is used to shrink < and > horizontally (to 60% of its original width) while maintaining its vertical height. You can substitute this for any other symbol (like \langle and \rangle) if you wish, and also modify the .6 horizontal scale parameter or remove the scaling altogether. You don't need to resize the delimiters using \left and \right.

For now the contents is set using \ttfamily. However, depending on the usage, you may wish to put it in an \mbox to avoid breaking at the text block boundary if your tags are comprised of multiple words.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .