TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
What do you what to achieve? What do you want to do with the brackets? – azetina Jun 14 '12 at 20:17
I want to write html code like in <html>. I have edited the question as well! – Sadiksha Gautam Jun 14 '12 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 '12 at 20:20
Remember that a \left must be accompanied by \right command. – azetina Jun 14 '12 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{}). – Peter Grill Jun 14 '12 at 20:24
up vote 3 down vote accepted

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.

share|improve this answer
Thank you, that's exactly what I needed! – Sadiksha Gautam Jun 14 '12 at 20:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.