Q&A 마당은 텍 관련 질문/답변을 위해 만들었습니다.

  • 로그인 없이 자유롭게 글을 읽고 쓸 수 있는 철학은 처음과 같이 계속됩니다.
  • 질문 전에 아래를 읽어 보세요. 좋은 질문이 좋은 답을 받을 수 있는 좋은 방법입니다.
    • 질문에 맞는 제목을 붙이세요. 질문의 내용과 관련없는 "고수님", "긴급질문", "도와주세요"와 같은 제목은 답이 잘 올라오지 않습니다. 이 게시판에 올라오는 모든 글은 질문입니다. 굳이 [질문], [Q]를 적으실 필요도 없습니다.
    • 내용을 충실히 적어 주시고, 같은 상황을 재현할 수 있는 최소한의 예제가 같이 있어야 합니다.
    • 최소 예제는 "Minimal working example"을 읽어 보세요.
  • 파일을 첨부하실 때에는 가능한 압축하여 파일 크기를 줄여서 올려주시길 바랍니다.
  • 개인적으로 사용하신 글꼴이 들어 있는 경우, preparefont.sty에 관한 답변을 참조하세요.
  • 스팸 글을 막기 위하여 짧은 시간 내에 다시 글이 등록되는 IP를 막거나, 광고 글을 막기 위하여 금지어로 .com, .net 등을 설정하고 있습니다. 다소간의 불편함이 있으시더라도 양해 바랍니다.
    • 금지어에서 stackexchange, stackoverflow, ctan, overleaf, , github, google.com, gmail.com, .org, .io, sil.org, wiki.com, tistory.com등은 해제하였습니다.
  • MathJax를 이용한 수식조판을 사용하실 수 있습니다. 여기를 참조하세요.
  • 사용하는 편집기는 CKeditor입니다.
    • 편집기에서 [enter]를 누르면 <p> 태그가 들어가고, 문단으로 생각하고 한 줄을 비웁니다.
    • 글줄만 바꾸려면 [shift-enter]를 누르면 <BR> 태그가 들어가므로 용도에 맞게 나누어 쓸 수 있습니다.
    • 수식를 문서내에 삽입하시려면 에디터를 툴바에서 [소스]를 눌러 HTML로 입력할 수 있게 바꾸신 후 <pre> </pre> tag를 사용하셔서 <pre> 여러 줄의 수식 </pre>처럼 입력하시면 좋습니다.
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 첨부했습니다.

번호 제목 글쓴이 날짜 조회 수
공지 Minimal Working Example을 첨부해주세요 [4] nanim 2015.06.23 230241
1312 align 식 간격 [2] file 하늘연 2015.02.22 1355
1311 xetexko에 hangul 옵션을 준 상태에서 수식의 줄간격을 줄이는법 [4] DBR 2015.02.17 1337
1310 안녕하세요 처음 사용하는데 에러가 납니다.. [1] 생초보 2015.02.17 1343
1309 expl3 문법연습중, 한 단어가 안먹는 현상+tikz와 expl3 [2] file 하늘연 2015.02.17 1350
1308 글자아래에 줄임표(....)를 어떻게 만드나요? [1] file 이재철 2015.02.16 1332
1307 ! pdfsync is patching the soul package [5] 궁금이 2015.02.16 1374
1306 amsart.cls에서 title에 한글을 쓰려면 어떻게 해야하는지요? [3] mltsr 2015.02.16 472730
1305 tex 핸드북 책이 있었으면 합니다. [1] tex_초보자 2015.02.13 1349
» amsmath 넣으면 ?로 멈추고 r누르면 실행은 되는데 바로 되는방법 없나요? [3] file 북이북이 2015.02.11 1754
1303 민트리눅스 ktug 사설저장소 연결에러 [5] file 하늘연 2015.02.07 1854
1302 그림 여백..? margin..? [1] 질문요 2015.02.06 1347
1301 tex 편집 화면에서 글씨색 구분관련.. [4] fortune 2015.02.05 3829
1300 MS word의 MathType 수식을 Tex 화일로 옮기기 [3] 한인기 2015.02.05 13406
1299 tabu와 주석 [3] yihoze 2015.02.05 1346
1298 perl.exe 에러 [2] jellybean 2015.02.03 3898
1297 이상한 색인생성. 분류가 원할하게 안됩니다. [9] file 하늘연 2015.02.02 1872
1296 thmtools 인자 인식문제 [3] file 하늘연 2015.01.31 1347
1295 ko.TeXlive 로컬 인스톨의 필요성이 있지 않을까요? [2] 윤성웅 2015.01.31 2119
1294 한글 폰트 깨지는 현상 [2] file 소병욱 2015.01.29 1658
1293 크로스플랫폼 TeX 에디터? [3] 궁금이 2015.01.29 1413



XE Login