본문에 나타나는 org-latex-export-to-pdf 프리앰블

Aug 19 2020

조직 모드 (또는 내 구성)가 라텍스 문서를 처리하는 방법에 문제가있는 것 같습니다. 내보내려는 샘플 파일은 다음과 같습니다.

\documentclass[12pt, letterpaper, twoside]{article}
\usepackage[utf8]{inputenc}

\begin{document}

\begin{abstract}
This is a simple paragraph at the beginning of the document. A brief introduction to the main subject.
\end{abstract}

In this document some extra packages and parameters
were added. There is an encoding package,
and pagesize and fontsize parameters.

This line will start a second paragraph. And I can
 break\\ the lines \\ and continue on a new line.

\end{document}

보시다시피 모든 프리앰블 항목은 \ begin {document} 이전에 발생하지만 pdf로 내보낼 때 다음 오류가 발생합니다.

l.31 \documentclass
                   [12pt, letterpaper, twoside]{article}

! LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.32 \usepackage
                [utf8]{inputenc}

! LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.34 \begin{document}
                     
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (.//test.tex.aux) )
(\end occurred inside a group at level 1)

### semi simple group (level 1) entered at line 34 (\begingroup)
### bottom level
(see the transcript file for additional information) </home/josh/.texlive2017/t
exmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1000.600pk> </home/josh/.texlive2017/t
exmf-var/fonts/pk/ljfour/jknappen/ec/ecbx1000.600pk> </home/josh/.texlive2017/t
exmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1095.600pk> </home/josh/.texlive2017/t
exmf-var/fonts/pk/ljfour/jknappen/ec/ecbx1440.600pk> </home/josh/.texlive2017/t
exmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1200.600pk> </home/josh/.texlive2017/t
exmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1728.600pk>
Output written on .//test.tex.pdf (1 page, 25588 bytes).
Transcript written on .//test.tex.log.

문서를 PDF로 내보내고 "목차"섹션 아래에 서문이 표시되지만 실제로 문서에 영향을주지는 않습니다. org-latex-export-to-pdf를 사용할 때 비슷한 경험을 한 사람이 있습니까? 아니면 emacs를 통해이 문서를 내보내는 다른 방법을 아는 사람이 있습니까?

미리 감사드립니다!

답변

HafidBoukhoulda Aug 21 2020 at 05:02

이 시도:

#+LATEX_CLASS_OPTIONS: [12pt, letterpaper, twoside]

#+BEGIN_abstract
This is a simple paragraph at the beginning of the document. A brief introduction to the main subject.
#+END_abstract

In this document some extra packages and parameters
were added. There is an encoding package,
and pagesize and fontsize parameters.

This line will start a second paragraph. And I can
 break @@latex:\\@@ the lines @@latex:\\@@ and continue on a new line.