macos 및 overleaf로 컴파일할 때 문서 컴파일이 실패하지만 Linux 기반 시스템으로 컴파일할 때 실패합니다.

macos 및 overleaf로 컴파일할 때 문서 컴파일이 실패하지만 Linux 기반 시스템으로 컴파일할 때 실패합니다.

Linux 컴퓨터에서만 퀴즈 문서를 컴파일할 수 없습니다. 내 코드는 다음과 같습니다

%% Language and font encodings
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

%% Sets page size and margins
\usepackage[a4paper,margin=1cm]{geometry}

%% Useful packages
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{paralist}
\setlength\FrameSep{4pt}


\begin{document}
\vspace{5mm}
\begin{center}
\fbox{\fbox{\parbox{2in}{\centering
Quiz 1}}}

\vspace{5mm}

\makebox[\textwidth]{Name:\enspace\hrulefill}
\vspace{5mm}
\makebox[\textwidth]{Section:\enspace\hrulefill}
%questions being here

\begin{questions}
    \question[2]{Sample Question}
    \begin{framed}
        \begin{compactenum}[a.]
        \item option 1.
        \item Option 2.
        \item option 3.
        \item none of the above.
        \end{compactenum}
\end{framed}
\end{questions}
\end{center}
\end{document} 

이 코드는 Mac 시스템뿐만 아니라 overleaf와 같은 온라인 서비스에서도 컴파일되지만 Linux 시스템에서는 실패합니다. 오류 파일은 다음과 같습니다

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
(./newQuizCopy.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/exam/exam.cls
Document Class: exam 2017/12/17 Version 2.603 by Philip Hirschhorn
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)))
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
(/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def)
(/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def
(/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def))))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/utf8x.def))
(/usr/share/texlive/texmf-dist/tex/latex/ucs/ucs.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-global.def))
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def))
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/dvips.def)))
(/usr/share/texlive/texmf-dist/tex/latex/paralist/paralist.sty)

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.


l.15 \setlength\FrameSep{4pt}

그리고 log파일이 표시됩니다

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=latex 2018.10.31)  27 FEB 2019 23:07
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**newQuizCopy.tex
(./newQuizCopy.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/exam/exam.cls
Document Class: exam 2017/12/17 Version 2.603 by Philip Hirschhorn
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
\@extrawidth=\skip43
\@rightmargin=\skip44
\@extrahead=\skip45
\@extrafoot=\skip46
\run@exhd=\skip47
\fp@exhd=\skip48
\run@exft=\skip49
\fp@exft=\skip50
\covrun@exhd=\skip51
\covfp@exhd=\skip52
\covrun@exft=\skip53
\covfp@exft=\skip54
\c@num@coverpages=\count87
\c@latest@ques=\count88
\c@ques@end=\count89
\c@last@object=\count90
\c@incmp@ques=\count91
\c@next@ques=\count92
\c@next@page=\count93
\c@tmp@hlfcntr=\count94
\c@ifpos@cntr=\count95
\c@question=\count96
\c@partno=\count97
\c@subpart=\count98
\c@subsubpart=\count99
\c@choice=\count100
\c@numpoints=\count101
\c@numbonuspoints=\count102
\c@pointsof@thisquestion=\count103
\c@bonuspointsof@thisquestion=\count104
\c@numquestions=\count105
\c@numparts=\count106
\c@numsubparts=\count107
\c@numsubsubparts=\count108
\c@Curr@Page=\count109
\c@@pagepoints=\count110
\c@@pagebonuspoints=\count111
\c@pageof@pagepoints=\count112
\c@pageof@pagebonuspoints=\count113
\c@latest@points=\count114
\c@latest@bonuspoints=\count115
\pageinfo@commands=\toks14
\temp@toks=\toks15
\pagepoint@commands=\toks16
\point@toks=\toks17
\c@ques@object=\count116
\marginpointssep=\skip55
\rightpointsmargin=\skip56
\choice@toks=\toks18
\answerlinelength=\skip57
\answerskip=\skip58
\answerclearance=\skip59
\fillinlinelength=\skip60
\linefillheight=\skip61
\linefillthickness=\skip62
\dottedlinefillheight=\skip63
\gridsize=\skip64
\gridlinewidth=\skip65
\minboxheight=\skip66
\c@@iterator=\count117
\@cellwidth=\skip67
\c@tbl@points=\count118
\c@tbl@bonuspoints=\count119
\c@pq@index=\count120
\c@pq@index@pts=\count121
\c@pq@index@bpts=\count122
\c@num@cols=\count123
\c@num@rows=\count124
\c@current@row=\count125
\c@cols@done=\count126
\exam@box=\box26
\saved@totalleftmargin=\dimen103
\@sollistdepth=\count127
\exam@FrameRule=\dimen104
\exam@FrameSep=\dimen105
)
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
Package: babel 2018/02/14 3.18 The Babel package

(/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def
File: switch.def 2018/02/14 3.18 Babel switching mechanism
)
(/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf
Language: english 2017/06/06 v3.3r English support from the babel system

(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def
File: babel.def 2018/02/14 3.18 Babel common definitions
\babel@savecnt=\count128
\U@D=\dimen106

(/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def)
\bbl@dirlevel=\count129
)
\l@canadian = a dialect from \language\l@american 
\l@australian = a dialect from \language\l@british 
\l@newzealand = a dialect from \language\l@british 
))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2015/03/17 v1.2c Input encoding file
\inpenc@prehook=\toks19
\inpenc@posthook=\toks20

(/usr/share/texlive/texmf-dist/tex/latex/ucs/utf8x.def
File: utf8x.def 2004/10/17 UCS: Input encoding UTF-8
))
(/usr/share/texlive/texmf-dist/tex/latex/ucs/ucs.sty
Package: ucs 2013/05/11 v2.2 UCS: Unicode input support

(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-global.def
File: uni-global.def 2013/05/13 UCS: Unicode global data
)
\uc@secondtry=\count130
\uc@combtoks=\toks21
\uc@combtoksb=\toks22
\uc@temptokena=\toks23
)
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2017/04/05 v2.0i Standard LaTeX package

(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def
File: t1enc.def 2017/04/05 v2.0i Standard LaTeX file
LaTeX Font Info:    Redeclaring font encoding T1 on input line 48.
))
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry

(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks24
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count131
\Gm@cntv=\count132
\c@Gm@tempcnt=\count133
\Gm@bindingoffset=\dimen107
\Gm@wd@mp=\dimen108
\Gm@odd@mp=\dimen109
\Gm@even@mp=\dimen110
\Gm@layoutwidth=\dimen111
\Gm@layoutheight=\dimen112
\Gm@layouthoffset=\dimen113
\Gm@layoutvoffset=\dimen114
\Gm@dimlist=\toks25
)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2017/09/02 v2.17a AMS math features
\@mathmargin=\skip68

For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2000/06/29 v2.01 AMS text

(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks26
\ex@=\dimen115
))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen116
)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 2016/03/08 v2.02 operator names
)
\inf@bad=\count134
LaTeX Info: Redefining \frac on input line 213.
\uproot@=\count135
\leftroot@=\count136
LaTeX Info: Redefining \overline on input line 375.
\classnum@=\count137
\DOTSCASE@=\count138
LaTeX Info: Redefining \ldots on input line 472.
LaTeX Info: Redefining \dots on input line 475.
LaTeX Info: Redefining \cdots on input line 596.
\Mathstrutbox@=\box27
\strutbox@=\box28
\big@size=\dimen117
LaTeX Font Info:    Redeclaring font encoding OML on input line 712.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 713.
\macc@depth=\count139
\c@MaxMatrixCols=\count140
\dotsspace@=\muskip10
\c@parentequation=\count141
\dspbrk@lvl=\count142
\tag@help=\toks27
\row@=\count143
\column@=\count144
\maxfields@=\count145
\andhelp@=\toks28
\eqnshift@=\dimen118
\alignsep@=\dimen119
\tagshift@=\dimen120
\tagwidth@=\dimen121
\totwidth@=\dimen122
\lineht@=\dimen123
\@envbody=\toks29
\multlinegap=\skip69
\multlinetaggap=\skip70
\mathdisplay@stack=\toks30
LaTeX Info: Redefining \[ on input line 2817.
LaTeX Info: Redefining \] on input line 2818.
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)

(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)

(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: dvips.def on input line 99.

(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/dvips.def
File: dvips.def 2017/06/20 v3.1d Graphics/color driver for dvips
))
\Gin@req@height=\dimen124
\Gin@req@width=\dimen125
)
(/usr/share/texlive/texmf-dist/tex/latex/paralist/paralist.sty
Package: paralist 2017/01/22 v2.7 Extended list environments
\pltopsep=\skip71
\plpartopsep=\skip72
\plitemsep=\skip73
\plparsep=\skip74
\pl@lab=\toks31
)

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.15 \setlength\FrameSep{4pt}

? X

Here is how much of TeX's memory you used:
 3770 strings out of 492983
 50639 string characters out of 6134921
 140557 words of memory out of 5000000
 7327 multiletter control sequences out of 15000+600000
 4403 words of font info for 15 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 29i,0n,32p,335b,37s stack positions out of 5000i,500n,10000p,200000b,80000s
No pages of output.

저는 LaTeX를 처음 접하므로 여기서 도와주세요.

답변1

글쎄, 당신은 class 를 사용하고 있는 주어진 코드를 추가하지 않았습니다 exam. 그래서 \documentclass{exam}다음 MWE를 추가했습니다 . 특수 항목을 사용하는 경우 문제 관련 수업 옵션에 대해 exam질문에 추가하세요.

컴파일하면 오류가 반환됩니다.

! Undefined control sequence.
<argument> \FrameSep 

l.17 \setlength\FrameSep{4pt}

framed이는 당신이 프리앰블에서 패키지를 호출하는 것을 놓쳤다는 것을 의미합니다 .

\usepackage{framed} 

다음의 완전한 MWE

\documentclass{exam} % <================================================
%% Language and font encodings
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

%% Sets page size and margins
\usepackage[a4paper,margin=1cm]{geometry}

%% Useful packages
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{paralist}

\usepackage{framed} % <=================================================
\setlength\FrameSep{4pt}


\begin{document}
\vspace{5mm}
\begin{center}
\fbox{\fbox{\parbox{2in}{\centering
Quiz 1}}}

\vspace{5mm}

\makebox[\textwidth]{Name:\enspace\hrulefill}
\vspace{5mm}
\makebox[\textwidth]{Section:\enspace\hrulefill}
%questions being here

\begin{questions}
    \question[2]{Sample Question}
    \begin{framed}
        \begin{compactenum}[a.]
        \item option 1.
        \item Option 2.
        \item option 3.
        \item none of the above.
        \end{compactenum}
\end{framed}
\end{questions}
\end{center}
\end{document} 

결과

결과 PDF

관련 정보