KTUG 한국 텍 사용자 그룹

Menu

KTUG :: Q&A 마당 › amsmath 넣으면 ?로 멈추고 r누르면 실행은 되는데 바로 되는방법 없나요?

북이북이 | 2015.02.11 21:01:34 | 메뉴 건너뛰기 쓰기
latex 공부해보려고 2014설치해서 전에 있던거랑 인터넷에서 본거랑 해서 해봤는데..

amsmath를 넣으면 ?가 뜨면서 멈추고 r누르면 실행됩니다.

소스는 다음과 같습니다.

 

\documentclass[paper]{article}


\usepackage[ruled,vlined]{algorithm2e}

\usepackage[bahasai]{babel}

\usepackage[fleqn]{amsmath}


\begin{document}

\begin{algorithm}

\KwData{this text}

\KwOut{how to write algorithm with \LaTeX2e }

\For{ l \in n \ }{test}

initialization\;

\While{not at end of this document}{

read current\;

\eIf{understand}{

go to next section\;

current section becomes this one\;

}{

go back to the beginning of current section\;

}

}

\caption{How to write algorithms}

\end{algorithm}

\end{document}

 

실행시키면

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014/W32TeX) (preloaded format=pdflatex)

restricted \write18 enabled.

entering extended mode

(./algo.tex

LaTeX2e <2014/05/01>

Babel <3.9l> and hyphenation patterns for 79 languages loaded.

(c:/usr/texlive/2014/texmf-dist/tex/latex/base/article.cls

Document Class: article 2014/09/29 v1.4h Standard LaTeX document class

(c:/usr/texlive/2014/texmf-dist/tex/latex/base/size10.clo))

(c:/usr/texlive/2014/texmf-dist/tex/latex/algorithm2e/algorithm2e.sty

(c:/usr/texlive/2014/texmf-dist/tex/latex/base/ifthen.sty)

(c:/usr/texlive/2014/texmf-dist/tex/latex/tools/xspace.sty)

(c:/usr/texlive/2014/texmf-dist/tex/latex/relsize/relsize.sty)

********************************************************

Package `algorithm2e' Release 5.0 -- january 06 2013 --

- algorithm2e-announce@lirmm. fr mailing list for announcement about releases

- algorithm2e-discussion@lirmm. fr mailing list for discussion about package

subscribe by emailing sympa@lirmm. fr with 'subscribe <list> <firstname name>'

- Author: Christophe Fiorio (cfiorio@um2. fr)

********************************************************

) (c:/usr/texlive/2014/texmf-dist/tex/generic/babel/babel.sty

(c:/usr/texlive/2014/texmf-dist/tex/generic/babel-bahasa/bahasai.ldf

(c:/usr/texlive/2014/texmf-dist/tex/generic/babel/babel. def)))

(c:/usr/texlive/2014/texmf-dist/tex/latex/amsmath/amsmath.sty

For additional information on amsmath, use the `?' option.

(c:/usr/texlive/2014/texmf-dist/tex/latex/amsmath/amstext.sty

(c:/usr/texlive/2014/texmf-dist/tex/latex/amsmath/amsgen.sty))

(c:/usr/texlive/2014/texmf-dist/tex/latex/amsmath/amsbsy.sty)

(c:/usr/texlive/2014/texmf-dist/tex/latex/amsmath/amsopn.sty))


LaTeX Warning: Unused global option(s):

[paper].


(./algo.aux)

! Missing $ inserted.

<inserted text>

$

l.11 \For{ l \in n \ }{test}

?

이렇게 뜨고 r 누르면 실행은 됩니다.

그리고 pdf파일에서 end가 생성되지 않는데 왜그러죠? pdf 첨부했습니다.

첨부 [1]

댓글 [3]

댓글 쓰기

목록 삭제

KTUG 한국 텍 사용자 그룹