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.