2012-07-18 64 views
1

我在乳胶以下伪如何把圆括弧中乳胶伪

\begin{algorithm} 
\begin{algorithmic} 
..... 
\State i = (i + 1) \% CAPACITY 
..... 
\end{algorithmic} 
\end{algorithm} 

然而,当我编译此,轮支架不会出现了,而不是让i = (i + 1) % QCAPACITY,我得到i = i + 1 % QCAPACITY。我怎么解决这个问题?

+0

这应该被迁移到http://tex.stackexchange.com – moooeeeep 2012-07-18 09:07:01

+0

你试过'\左(i + 1 \右)\%CAPACITY'吗? – 2012-07-18 09:23:28

回答

2

你确定你的代码是正确的吗?我已将此代码粘贴到ScribTeX中,并且我理解了它的正确性。

\documentclass[12pt]{article} 
\usepackage{amsmath} 

\begin{document} 

\begin{algorithm} 
\begin{algorithmic} 

\State i = (i + 1) \% CAPACITY 

\end{algorithmic} 
\end{algorithm} 

\end{document}​