기본 구조
\documentclass{article} \begin{document} Hello World LaTeX \end{document}
공백 글자 처리
연속되는 여러 개의 공백 글자는 하나의 공백 글자만 있는 것으로 간주합니다. 줄바꿈도 하나의 공백 글자로 간주합니다.
\documentclass{article} \begin{document} Hello World LaTeX \end{document}
단락 처리
줄바꿈만으로는 단락과 단락이 나누어지지 않습니다. 다음을 빌드하면 Hello World와 LaTeX은 같은 줄에 표시됩니다.
\documentclass{article} \begin{document} Hello World LaTeX \end{document}
단락과 단락을 구분하려면 빈 줄이 있어야 합니다.
\documentclass{article} \begin{document} Hello World LaTeX \end{document}
명령어
명령어를 통해서 일반적으로 처리하기 어려운 일들을 손쉽게 할 수 있습니다. 예를 들어 \LaTeX
명령어로 LaTeX 로고를 표시할 수 있습니다.
\documentclass{article} \begin{document} Hello World \LaTeX \end{document}
명령어는 역슬러시(\
)로 시작합니다.
기본적인 명령어는 다음과 같습니다.
\TeX
TeX 로고
\LaTeX
LaTeX 로고
\textbf
진하게
\textit
기울이기
\textbf
명령어를 사용할 때 진하게 하려는 내용을 { 과 } 사이에 써줍니다.
\documentclass{article} \begin{document} \textbf{Hello World} \end{document}
그 안에 다른 명령어를 사용할 수 있습니다.
\documentclass{article} \begin{document} \textbf{\textit{Hello World} \LaTeX} \end{document}
주석
동일한 줄에서 % 다음에 오는 글은 주석으로 처리된다.
% Everything to the right of a % is a remark to you and is ignored by LaTeX. \documentclass{article} % ignored by LaTeX \begin{document} Hello World \end{document}