Linux에서 Latex 시작하기 [닫기]
is-latex-worth-learning-today 와 Windows의 많은 사용법에 감명을 받았습니다 .
Linux에서 LaTeX를 어떻게 시작하셨습니까?
어떻게 PDF를 생성하고 OOO Word 프로세서를 포기합니까?
최신 정보:
여기에 주어진 모든 제안에 감사드립니다. Beamer 클래스를 사용하여 멋진 ppt를 만들 수 있습니다 : http://github.com/becomingGuru/gids-django-ppt . 파워 포인트 등을 사용하는 것보다이 방법이 훨씬 더 낫다는 것을 알았습니다.
관심이있는 사용자는 많은 사용자 정의 명령과 해당 프리젠 테이션으로 TEX 파일을 체크 아웃 할 수 있습니다 .
먼저 설치 해야합니다 :
LaTeX를 패키지화하는 배포판을 사용하고 있다면 (거의 모든 것이 할 것입니다) texlive 또는 tetex 를 찾으십시오 . TeX Live는이 두 가지 중 최신 버전이며 현재 대부분의 배포에서 tetex를 대체하고 있습니다.
데비안이나 우분투를 사용하는 경우 :
apt-get install texlive
.. 설치됩니다.
RedHat 또는 CentOS에는 다음이 필요합니다.
yum install tetex
참고 : 루트 권한이 필요하므로 루트 사용자로 로그인하지 않은 경우 su
사용자를 루트로 전환하거나을 사용하여 명령 접두어를 sudo
사용하십시오.
다음으로 텍스트 편집기 가 필요합니다 . 모든 편집자가 할 수 있으므로 편안하게 사용할 수 있습니다. Emacs (및 vim)와 같은 고급 편집기는 많은 기능을 추가하므로 문서 출력을 작성하고 빌드하기 전에 구문이 올바른지 확인하는 데 도움이됩니다.
test.tex라는 파일을 만들고 LaTeX primer 의 예제와 같이 내용을 넣으십시오 .
\documentclass[a4paper,12pt]{article}
\begin{document}
The foundations of the rigorous study of \emph{analysis}
were laid in the nineteenth century, notably by the
mathematicians Cauchy and Weierstrass. Central to the
study of this subject are the formal definitions of
\emph{limits} and \emph{continuity}.
Let $D$ be a subset of $\bf R$ and let
$f \colon D \to \mathbf{R}$ be a real-valued function on
$D$. The function $f$ is said to be \emph{continuous} on
$D$ if, for all $\epsilon > 0$ and for all $x \in D$,
there exists some $\delta > 0$ (which may depend on $x$)
such that if $y \in D$ satisfies
\[ |y - x| < \delta \]
then
\[ |f(y) - f(x)| < \epsilon. \]
One may readily verify that if $f$ and $g$ are continuous
functions on $D$ then the functions $f+g$, $f-g$ and
$f.g$ are continuous. If in addition $g$ is everywhere
non-zero then $f/g$ is continuous.
\end{document}
이 파일을 얻은 후에 는 일부 출력을 생성하기 위해 라텍스 를 실행 해야합니다 (.dvi 파일로 시작하여 다른 많은 형식으로 변환 가능).
latex test.tex
이것은 다음과 같은 많은 출력을 인쇄합니다.
=> latex test.tex
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./test.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur
kish, ukrainian, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size12.clo))
No file test.aux.
[1] (./test.aux) )
Output written on test.dvi (1 page, 1508 bytes).
Transcript written on test.log.
..이 출력 대부분에 대해 걱정하지 마십시오. 중요한 부분은 test.dvi 행에 작성된 출력입니다 .
이제 xdvi로 출력 파일 을 볼 필요가 있습니다 :
xdvi test.dvi &
This will pop up a window with the beautifully formatted output in it. Hit `q' to quit this, or you can leave it open and it will automatically update when the test.dvi file is modified (so whenever you run latex to update the output).
To produce a PDF of this you simply run pdflatex instead of latex:
pdflatex test.tex
..and you'll have a test.pdf file created instead of the test.dvi file.
After this is all working fine, I would suggest going to the the LaTeX primer page and running through the items on there as you need features for documents you want to write.
Future things to consider include:
Use tools such as xfig or dia to create diagrams. These can be easily inserted into your documents in a variety of formats. Note that if you are creating PDFs then you shouldn't use EPS (encapsulated postscript) for images -- use pdf exported from your diagram editor if possible, or you can use the
epstopdf
package to automatically convert from (e)ps to pdf for figures included with\includegraphics
.Start using version control on your documents. This seems excessive at first, but being able to go back and look at earlier versions when you are writing something large can be extremely useful.
Use make to run latex for you. When you start on having bibliographies, images and other more complex uses of latex you'll find that you need to run it over multiple files or multiple times (the first time updates the references, and the second puts references into the document, so they can be out-of-date unless you run latex twice...). Abstracting this into a makefile can save a lot of time and effort.
Use a better editor. Something like Emacs + AUCTeX is highly competent. This is of course a highly subjective subject, so I'll leave it at that (that and that Emacs is clearly the best option :)
To get started with LaTeX on Linux, you're going to need to install a couple of packages:
You're going to need a LaTeX distribution. This is the collection of programs that comprise the (La)TeX computer typesetting system. The standard LaTeX distribution on Unix systems used to be teTeX, but it has been superceded by TeX Live. Most Linux distributions have installation packages for TeX Live--see, for example, the package database entries for Ubuntu and Fedora.
You will probably want to install a LaTeX editor. Standard Linux text editors will work fine; in particular, Emacs has a nice package of (La)TeX editing macros called AUCTeX. Specialized LaTeX editors also exist; of those, Kile (KDE Integrated LaTeX Environment) is particularly nice.
You will probably want a LaTeX tutorial. The classic tutorial is "A (Not So) Short Introduction to LaTeX2e," but nowadays the LaTeX wikibook might be a better choice.
I would recommend start using Lyx, with that you can use Latex just as easy as OOO-Writer. It gives you the possibility to step into Latex deeper by manually adding Latex-Code to your Document. PDF is just one klick away after installatioin. Lyx is cross-plattform.
It depends on your Linux distibution and your preference of editors etc. but I would recommend to start with Kile (a KDE app) as it is easy to learn and installing it should install most of the needed packages for LaTex and PDF generation. Just have a look at the screenshots.
If you use Ubuntu or Debian, I made a tutorial easy to follow: Install LaTeX on Ubuntu or Debian. This tutorial explains how to install LaTeX and how to create your first PDF.
LaTeX comes with most Linux distributions in the form of the teTeX distribution. Find all packages with 'teTeX' in the name and install them.
Most editors such as vim or emacs come with TeX editing modes. You can also get WYSIWIG-ish front-ends (technically WYSIWYM), of which perhaps the best known is LyX.
The best quick intro to LaTeX is Oetiker's 'The not so short intro to LaTeX'
LaTeX works like a compiler. You compile the LaTeX document (which can include other files), which generates a file called a
.dvi
(device independent). This can be post-processed to various formats (including PDF) with various post-processors.To do PDF, use
dvips
and use the flag -PPDF (IIRC - I don't have a makefile to hand) to produce a PS with font rendering set up for conversion to pdf. PDF conversion can then be done withps2pdf
or distiller (if you have this).The best format for including graphics in this environment is
eps
(Encapsulated Postscript) although not all software produces well-behaved postscript. Photographs in jpeg or other formats can be included using various mechanisms.
I would personally use a complete editing package such as:
- TexWorks
- TexStudio
Then I would install "MikTeX" as the compiling package, which allows you to generate a PDF from your document, using the pdfLaTeX
compiler.
yum -y install texlive
was not enough for my centos distro to get the latex command.
This site https://gist.github.com/melvincabatuan/350f86611bc012a5c1c6 contains additional packages. In particular:
yum -y install texlive texlive-latex texlive-xetex
was enough but the author also points out these as well:
yum -y install texlive-collection-latex
yum -y install texlive-collection-latexrecommended
yum -y install texlive-xetex-def
yum -y install texlive-collection-xetex
Only if needed:
yum -y install texlive-collection-latexextra
참고URL : https://stackoverflow.com/questions/1017055/get-started-with-latex-on-linux
'IT' 카테고리의 다른 글
왜 내가 () 또는 new ()를 만들 것입니까? (0) | 2020.05.17 |
---|---|
왜 GCC는 거의 동일한 C 코드에 대해 이렇게 완전히 다른 어셈블리를 생성합니까? (0) | 2020.05.17 |
iOS8에서 [UIScreen mainScreen] .bounds.size가 방향에 따라 달라 집니까? (0) | 2020.05.17 |
CSS를 사용하여 입력 버튼 이미지를 변경하는 방법은 무엇입니까? (0) | 2020.05.17 |
WPF 탐색을위한 Window vs Page vs UserControl? (0) | 2020.05.17 |