catdvi에 어떤 입력을 하든 "프리앰블로 시작하지 않습니다"라는 동일한 오류가 발생합니다.
간결하게 말하면 여기에 전체 프로젝트를 게시하는 대신 예제를 붙여넣겠습니다.
\documentclass[a4paper,12pt]{article}
\begin{document}
This is the first paragraph of a typical document. It is
produced in a `12~point' size. A \emph{point} is a unit
of length used by printers. One point is approximately
$1/72$~inch. In a `12~point' font the height of the
parentheses is 12~points (i.e. about $1/6$~inch) and the
letter~`m' is about 12 points long.
This is the second paragraph of the document. There are
also `10 point' and `11 point' styles available in LaTeX.
The required size is specified in the `documentstyle'
command. If no such size is specified then the 10~point
size is assumed.
\end{document}
무슨 일이 일어나고 있는지 아는 사람 있나요?
수정: 아, 죄송해요. 나는 catdvi가 LaTeX의 표준이라고 생각했습니다. 여기 Wiki 페이지에서 찾았습니다.https://en.m.wikibooks.org/wiki/LaTeX/Export_To_Other_Formats"일반 텍스트로 변환"에서.
답변1
catdvi
dvi
이름이 포함된 대부분의 명령줄 유틸리티는 TeX 파일이 아닌 DVI 파일에서 작동합니다. 따라서 catdvi
(또는 )를 사용하여 TeX 파일에서 텍스트를 추출하려면 먼저 (를 dvi2tty
사용해야 합니다.latex
~ 아니다 pdflatex
) DVI 파일을 생성합니다. 그런 다음 생성된 DVI 파일에서 catdvi
(또는 )을 실행하여 dvi2tty
일반 텍스트로 변환할 수 있습니다.
detex
TeX 파일에서 텍스트를 추출하는 것과 같은 다른 유틸리티가 있습니다 . 그러나 결과는 catdvi
또는 와 다릅니다 dvi2tty
.
pandoc
참고: PDF를 일반 텍스트(예: 또는 ) 로 변환하는 프로그램도 있습니다 pdftotext
.