Maketitle latex ошибка

Why do I constantly get this error:
There’s no line here to end. \maketitle

When I learned to use latex I was told to use \maketitle where I want to have my title placed. What is written in the title is defined by \title. Like this:

\documentclass[a4paper,oneside,abstracton]{scrartcl}

\usepackage[utf8]{inputenc}
%\usepackage[latin1]{inputenc}               %Zeichencodierung Text
\usepackage[T1]{fontenc}                     %Schriftsatz Dokument

%%Language settings
\usepackage[english]{babel}                  %ngerman for German
\usepackage{csquotes}                        %[babel,quotes=english]
\usepackage{caption}
\addto\captionsenglish{\renewcommand{\contentsname}{Table of Contents}}
%\renewcommand{\contentsname}{Table of Contents}   % only works when not using babel

%%Paper adjustments
\usepackage{graphicx}
\usepackage{epstopdf}                        %if problems with importing .eps graphics
%\usepackage{a4wide}                         %obsolete and replaced by geometry
\usepackage[a4paper,bottom=3.1cm]{geometry}  %also with command \geometry{options}
\usepackage{changepage}
\usepackage{titling}


\begin{document}

\title{\LARGE Advanced Course \\ [1em] \huge \textbf{Tools}}
\author{Muster1 \hspace{1cm} Muster2}
\date{\\[1em] {Today} \\ [0.8cm] Supervisor Dr. Muster3 \\ [0.5cm] Institut \\ University of Whatsoever}

\clearpage
\maketitle
\thispagestyle{empty}
\renewcommand\abstractname{Abstract}
\renewcommand\tablename{Table}
\newpage

\end{document}

asked Feb 23, 2015 at 14:33

Lucas's user avatar

1

The problem is that you are using \\ (inside \date) when TeX is in vertical mode. TeX has the vertical and the horizontal modes. Horizontal mode is for putting letters into lines and assembling those into paragraphs, vertical mode is for putting those paragraphs and other things onto the page. \\ is a horizontal mode command that breaks the current line inside a paragraph. The error you are getting, no line to end, is exactly right: you have not begun a line, i.e. entered horizontal mode, yet.

Use \vspace{1em} instead of \\[1em] as vspace is a vertical mode macro that will function exactly how you want it to.

David Carlisle's user avatar

answered Feb 23, 2015 at 15:51

Program man's user avatar

Program manProgram man

3083 silver badges10 bronze badges

8

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

.

Выдается ошибка в LaTeX: line 11 I can’t write on file

   `\documentclass[russian,utf8,12pt]{book}
    \usepackage[T2A]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage[russian]{babel}
    % Title Page
    \title {ААА}
    \author{Nick}
    \date{2018}
    \begin{document}
         \maketitle
    \end{document}`

  • latex

задан 28 июн 2018 в 14:14

Николай's user avatar

4

  • попробовал в первом попавшем онлайн редакторе LaTex — все заработало, правда заменил russian/english

    28 июн 2018 в 14:48

  • @KoVadim Спасибо за ответ. Попробовал менять english/russian, все равно выдает ошибку. В тексте ошибок вроде бы нет. Может с установкой что-то не так?

    29 июн 2018 в 6:35

  • может просто папка /tmp или какая там у Вас ОС не доступна на запись

    29 июн 2018 в 7:17

  • @KoVadim Ошибка была из-за установок MiKLaTeX. Установил default pdfLaTeX и ошибка ушла.

    29 июн 2018 в 8:04

I have a paper to submit in an hour, and have an issue with the \maketitle command. The template provided to me does not work, and the instructor has told me to figure it out on my own.

Here is a simplified example:

\documentclass{bioinfo}
\copyrightyear{2014}
\pubyear{2014}

\begin{document}
\firstpage{1}

\title[QTL Analysis]{Evaluation of a QTL Dataset}
\author[Robert R. Gotwals]{Robert R. Gotwals\,\footnote{to whom correspondence should be addressed}}
\address{$^{1}$Department of XXXXXXX, Address XXXX etc.}

\history{Received on XXXXX; revised on XXXXX; accepted on XXXXX}

\maketitle

\begin{abstract}

Here's the abstract. 

\section{Keywords:} first, second, third, fourth

\section{Contact:} \href{cowbell@ncssm.edu}{gotwals@ncssm.edu}
\end{abstract}

\section{Introduction}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. 


\end{document}

The .log file:

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2013.12.9)  28 MAY 2014 20:50

entering extended mode

**document.tex



("C:\Users\chire001\Documents\Jeffrey Files\School\CompBio\Final Project\Docume

nt\document.tex"

LaTeX2e <2011/06/27>

Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar

abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic, 

croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga

lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland

ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,

 lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n

german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman

ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm

an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl

ishmax, welsh, loaded.



("C:\Users\chire001\Documents\Jeffrey Files\School\CompBio\Final Project\Docume

nt\bioinfo.cls"

Document Class: bioinfo 2003/02/08 0.1

("C:\Program Files\MiKTeX 2.9\tex\latex\base\inputenc.sty"

Package: inputenc 2008/03/30 v1.1d Input encoding file

\inpenc@prehook=\toks14

\inpenc@posthook=\toks15

)

("C:\Users\chire001\Documents\Jeffrey Files\School\CompBio\Final Project\Docume

nt\crop.sty"

Package: crop 2001/11/16 v1.6 cropmarks (mf)

\CROP@width=\dimen102

\CROP@height=\dimen103

\CROP@index=\count79

 ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"

Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)



("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty"

Package: trig 1999/03/16 v1.09 sin cos tan (DPC)

)

("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg"

File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive

)

Package graphics Info: Driver file: pdftex.def on input line 91.



("C:\Program Files\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"

File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX



("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty"

Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)

)

("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"

Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)

)

\Gread@gobject=\count80

))

\CROP@offset=\count81

Package crop Info: Local config file crop.cfg used on input line 344.



("C:\Program Files\MiKTeX 2.9\tex\xelatex\xetexconfig\crop.cfg"))

Package crop Info: using pdf(la)tex graphics driver on input line 33.



("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"

Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)



("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty"

Package: keyval 1999/03/16 v1.13 key=value parser (DPC)

\KV@toks@=\toks16

)

\Gin@req@height=\dimen104

\Gin@req@width=\dimen105

)

("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsmath.sty"

Package: amsmath 2013/01/14 v2.14 AMS math features

\@mathmargin=\skip41



For additional information on amsmath, use the `?' option.

("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amstext.sty"

Package: amstext 2000/06/29 v2.01



("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsgen.sty"

File: amsgen.sty 1999/11/30 v2.0

\@emptytoks=\toks17

\ex@=\dimen106

))

("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsbsy.sty"

Package: amsbsy 1999/11/29 v1.2d

\pmbraise@=\dimen107

)

("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsopn.sty"

Package: amsopn 1999/12/14 v2.01 operator names

)

\inf@bad=\count82

LaTeX Info: Redefining \frac on input line 210.

\uproot@=\count83

\leftroot@=\count84

LaTeX Info: Redefining \overline on input line 306.

\classnum@=\count85

\DOTSCASE@=\count86

LaTeX Info: Redefining \ldots on input line 378.

LaTeX Info: Redefining \dots on input line 381.

LaTeX Info: Redefining \cdots on input line 466.

\Mathstrutbox@=\box26

\strutbox@=\box27

\big@size=\dimen108

LaTeX Font Info:    Redeclaring font encoding OML on input line 566.

LaTeX Font Info:    Redeclaring font encoding OMS on input line 567.

\macc@depth=\count87

\c@MaxMatrixCols=\count88

\dotsspace@=\muskip10

\c@parentequation=\count89

\dspbrk@lvl=\count90

\tag@help=\toks18

\row@=\count91

\column@=\count92

\maxfields@=\count93

\andhelp@=\toks19

\eqnshift@=\dimen109

\alignsep@=\dimen110

\tagshift@=\dimen111

\tagwidth@=\dimen112

\totwidth@=\dimen113

\lineht@=\dimen114

\@envbody=\toks20

\multlinegap=\skip42

\multlinetaggap=\skip43

\mathdisplay@stack=\toks21

LaTeX Info: Redefining \[ on input line 2665.

LaTeX Info: Redefining \] on input line 2666.

)

("C:\Program Files\MiKTeX 2.9\tex\latex\tools\array.sty"

Package: array 2008/09/09 v2.4c Tabular extension package (FMi)

\col@sep=\dimen115

\extrarowheight=\dimen116

\NC@list=\toks22

\extratabsurround=\skip44

\backup@length=\skip45

)

("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\color.sty"

Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)



("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\color.cfg"

File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive

)

Package color Info: Driver file: pdftex.def on input line 130.

)

("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty"

Package: amssymb 2013/01/14 v3.01 AMS font symbols



("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty"

Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support

\symAMSa=\mathgroup4

\symAMSb=\mathgroup5

LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'

(Font)                  U/euf/m/n --> U/euf/b/n on input line 106.

))

(C:\Users\chire001\AppData\Roaming\MiKTeX\2.9\tex\latex\sttools\flushend.sty

Package: flushend 2014/04/24 v2.2 Balancing columns in twocolumn mode

\flushend@@lastskip@a=\skip46

\flushend@@lastskip@b=\skip47

\flushend@@lastskip@c=\skip48

\flushend@@penalty@a=\count94

\flushend@@lastkern@a=\dimen117

\var@@temp@spread=\dimen118

\var@@temp@a=\dimen119

\flushend@@page@rule=\dimen120

\flushend@@varbox@a=\box28

\flushend@@varbox@c=\box29

\flushend@@tempbox@a=\box30

\flushend@@tempbox@c=\box31

\@viper=\box32

\hold@viper=\box33

\atColsBreak=\toks23

\atColsEnd=\toks24



(C:\Users\chire001\AppData\Roaming\MiKTeX\2.9\tex\latex\etoolbox\etoolbox.sty

Package: etoolbox 2011/01/03 v2.1 e-TeX tools for LaTeX



("C:\Program Files\MiKTeX 2.9\tex\latex\misc\etex.sty"

Package: etex 1998/03/26 v2.0 eTeX basic definition package (PEB)

\et@xins=\count95

)

\etb@tempcnta=\count96

))

(C:\Users\chire001\AppData\Roaming\MiKTeX\2.9\tex\latex\sttools\stfloats.sty

Package: stfloats 2012/05/29 v1.1 Improve float mechanism and baselineskip sett

ings

\@dblbotnum=\count97

\c@dblbotnumber=\count98

)

("C:\Program Files\MiKTeX 2.9\tex\latex\amscls\amsthm.sty"

Package: amsthm 2004/08/06 v2.20

\thm@style=\toks25

\thm@bodyfont=\toks26

\thm@headfont=\toks27

\thm@notefont=\toks28

\thm@headpunct=\toks29

\thm@preskip=\skip49

\thm@postskip=\skip50

\thm@headsep=\skip51

\dth@everypar=\toks30

)

("C:\Program Files\MiKTeX 2.9\tex\latex\ltxmisc\chngpage.sty"

Package: chngpage 2003/08/10 v1.2 change page layout

\c@cp@cnt=\count99

\c@cp@tempcnt=\count100

)

("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\times.sty"

Package: times 2005/04/12 PSNFSS-v9.2a (SPQR) 

)

\c@section=\count101

\c@subsection=\count102

\c@subsubsection=\count103

\c@paragraph=\count104

\c@subparagraph=\count105

\c@figure=\count106

\c@table=\count107

\dropfromtop=\skip52

\extraspace=\skip53

\aboveskipchk=\skip54

\abovecaptionskip=\skip55

\belowcaptionskip=\skip56

\rotdimen=\dimen121

\tempdime=\dimen122

\temptbox=\box34



(C:\Users\chire001\AppData\Roaming\MiKTeX\2.9\tex\latex\natbib\natbib.sty

Package: natbib 2010/09/13 8.31b (PWD, AO)

\bibhang=\skip57

\bibsep=\skip58

LaTeX Info: Redefining \cite on input line 694.

\c@NAT@ctr=\count108

))

("C:\Users\chire001\Documents\Jeffrey Files\School\CompBio\Final Project\Docume

nt\document.aux")

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 5.

LaTeX Font Info:    ... okay on input line 5.

LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 5.

LaTeX Font Info:    ... okay on input line 5.

LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 5.

LaTeX Font Info:    ... okay on input line 5.

LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 5.

LaTeX Font Info:    ... okay on input line 5.

LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 5.

LaTeX Font Info:    ... okay on input line 5.

LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 5.

LaTeX Font Info:    ... okay on input line 5.

LaTeX Font Info:    Try loading font information for OT1+ptm on input line 5.

 ("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\ot1ptm.fd"

File: ot1ptm.fd 2001/06/04 font definitions for OT1/ptm.

)

(C:\Users\chire001\AppData\Roaming\MiKTeX\2.9\tex\context\base\supp-pdf.mkii

[Loading MPS to PDF converter (version 2006.09.02).]

\scratchcounter=\count109

\scratchdimen=\dimen123

\scratchbox=\box35

\nofMPsegments=\count110

\nofMParguments=\count111

\everyMPshowfont=\toks31

\MPscratchCnt=\count112

\MPscratchDim=\dimen124

\MPnumerator=\count113

\makeMPintoPDFobject=\count114

\everyMPtoPDFconversion=\toks32

)

LaTeX Font Info:    Try loading font information for OT1+phv on input line 14.

 ("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\ot1phv.fd"

File: ot1phv.fd 2001/06/04 scalable font definitions for OT1/phv.

)

LaTeX Font Info:    Font shape `OT1/phv/m/it' in size <9> not available

(Font)              Font shape `OT1/phv/m/sl' tried instead on input line 14.

LaTeX Font Info:    Font shape `OT1/phv/bx/it' in size <9> not available

(Font)              Font shape `OT1/phv/b/it' tried instead on input line 14.

LaTeX Font Info:    Font shape `OT1/phv/b/it' in size <9> not available

(Font)              Font shape `OT1/phv/b/sl' tried instead on input line 14.

LaTeX Font Info:    Font shape `OT1/phv/bx/it' in size <19> not available

(Font)              Font shape `OT1/phv/b/it' tried instead on input line 14.

LaTeX Font Info:    Font shape `OT1/phv/b/it' in size <19> not available

(Font)              Font shape `OT1/phv/b/sl' tried instead on input line 14.

LaTeX Font Info:    Font shape `OT1/phv/m/it' in size <8> not available

(Font)              Font shape `OT1/phv/m/sl' tried instead on input line 14.

LaTeX Font Info:    Font shape `OT1/phv/bx/n' in size <9> not available

(Font)              Font shape `OT1/phv/b/n' tried instead on input line 14.

LaTeX Font Info:    Font shape `OT1/phv/bx/n' in size <16> not available

(Font)              Font shape `OT1/phv/b/n' tried instead on input line 14.

LaTeX Font Info:    Calculating math sizes for size <13> on input line 14.





LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <13> not available

(Font)              size <12> substituted on input line 14.





LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <6.5> not available

(Font)              size <6> substituted on input line 14.





LaTeX Font Warning: Font shape `OML/cmm/m/it' in size <13> not available

(Font)              size <12> substituted on input line 14.





LaTeX Font Warning: Font shape `OML/cmm/m/it' in size <6.5> not available

(Font)              size <6> substituted on input line 14.





LaTeX Font Warning: Font shape `OMS/cmsy/m/n' in size <13> not available

(Font)              size <12> substituted on input line 14.





LaTeX Font Warning: Font shape `OMS/cmsy/m/n' in size <6.5> not available

(Font)              size <6> substituted on input line 14.



LaTeX Font Info:    Try loading font information for U+msa on input line 14.

("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd"

File: umsa.fd 2013/01/14 v3.01 AMS symbols A

)

LaTeX Font Info:    Try loading font information for U+msb on input line 14.



("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd"

File: umsb.fd 2013/01/14 v3.01 AMS symbols B

)

LaTeX Font Info:    Calculating math sizes for size <9.09996> on input line 14.







LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <4.54997> not available

(Font)              size <5> substituted on input line 14.





LaTeX Font Warning: Font shape `OML/cmm/m/it' in size <4.54997> not available

(Font)              size <5> substituted on input line 14.





LaTeX Font Warning: Font shape `OMS/cmsy/m/n' in size <4.54997> not available

(Font)              size <5> substituted on input line 14.





LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <7.5> not available

(Font)              size <7> substituted on input line 14.





LaTeX Font Warning: Font shape `OML/cmm/m/it' in size <7.5> not available

(Font)              size <7> substituted on input line 14.





LaTeX Font Warning: Font shape `OMS/cmsy/m/n' in size <7.5> not available

(Font)              size <7> substituted on input line 14.



! Undefined control sequence.

<argument> ...2}\selectfont \raggedright \@editor 

                                                  \par } \@@par 

l.14 \maketitle



The control sequence at the end of the top line

of your error message was never \def'ed. If you have

misspelled it (e.g., `\hobx'), type `I' and the correct

spelling (e.g., `I\hbox'). Otherwise just continue,

and I'll forget about whatever was undefined.





Underfull \hbox (badness 10000) detected at line 14

[]

 []



LaTeX Font Info:    Font shape `OT1/phv/bx/n' in size <8> not available

(Font)              Font shape `OT1/phv/b/n' tried instead on input line 20.

LaTeX Font Info:    Font shape `OT1/phv/bx/n' in size <10> not available

(Font)              Font shape `OT1/phv/b/n' tried instead on input line 25.

- LAST -

Extra skip:28.55157pt

Left:87.0pt/1.77998pt

Right:58.44843pt/3.00003pt

Output:87.0pt

LaTeX Font Info:    Try loading font information for OMS+phv on input line 29.

("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\omsphv.fd"

File: omsphv.fd 

)

LaTeX Font Info:    Font shape `OMS/phv/m/n' in size <7> not available

(Font)              Font shape `OMS/cmsy/m/n' tried instead on input line 29.

 [1



{C:/Users/chire001/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}





]

("C:\Users\chire001\Documents\Jeffrey Files\School\CompBio\Final Project\Docume

nt\document.aux")



LaTeX Font Warning: Size substitutions with differences

(Font)              up to 1.0pt have occurred.



 ) 

Here is how much of TeX's memory you used:

 3376 strings out of 493921

 42650 string characters out of 3147273

 105221 words of memory out of 3000000

 6603 multiletter control sequences out of 15000+200000

 36737 words of font info for 84 fonts, out of 3000000 for 9000

 845 hyphenation exceptions out of 8191

 37i,11n,28p,856b,294s stack positions out of 5000i,500n,10000p,200000b,50000s

{C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/fontname/8r.enc}<C:/Program File

s/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr7.pfb><C:/Program Files/MiKTeX 2

.9/fonts/type1/public/amsfonts/cm/cmsy6.pfb><C:/Program Files/MiKTeX 2.9/fonts/

type1/public/amsfonts/cm/cmsy7.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/pub

lic/amsfonts/cm/cmsy9.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/urw/helvetic

/uhvb8a.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/urw/helvetic/uhvbo8a.pfb><

C:/Program Files/MiKTeX 2.9/fonts/type1/urw/helvetic/uhvr8a.pfb><C:/Program Fil

es/MiKTeX 2.9/fonts/type1/urw/helvetic/uhvro8a.pfb><C:/Program Files/MiKTeX 2.9

/fonts/type1/urw/times/utmr8a.pfb>

Output written on document.pdf (1 page, 75748 bytes).

PDF statistics:

 43 PDF objects out of 1000 (max. 8388607)

 0 named destinations out of 1000 (max. 500000)

 1 words of extra memory for PDF output out of 10000 (max. 10000000)

The bioinfo document class can be downloaded from http://www.oxfordjournals.org.

Does anyone have any idea of what is going wrong? System is Texmaker (compiler is Miktex) on 64-bit Windows 7. Code also refuses to compile on ShareLaTeX.

Thanks!

LaTeX

Getting Started

  1. Introduction
  2. Installation
  3. Installing Extra Packages
  4. Basics
  5. How to get help

Common Elements

  1. Document Structure
  2. Text Formatting
  3. Paragraph Formatting
  4. Colors
  5. Fonts
  6. List Structures
  7. Special Characters
  8. Internationalization
  9. Rotations
  10. Tables
  11. Title creation
  12. Page Layout
  13. Customizing Page Headers and Footers‎
  14. Importing Graphics
  15. Floats, Figures and Captions
  16. Footnotes and Margin Notes
  17. Hyperlinks
  18. Labels and Cross-referencing
  19. Initials

Mechanics

  1. Errors and Warnings
  2. Lengths
  3. Counters
  4. Boxes
  5. Rules and Struts

Technical Text

  1. Mathematics
  2. Advanced Mathematics
  3. Theorems
  4. Chemical Graphics
  5. Algorithms
  6. Source Code Listings
  7. Linguistics

Special Pages

  1. Indexing
  2. Glossary
  3. Bibliography Management
  4. More Bibliographies

Special Documents

  1. Scientific Reports (Bachelor Report, Master Thesis, Dissertation)
  2. Letters
  3. Presentations
  4. Teacher’s Corner
  5. Curriculum Vitae
  6. Academic Journals (MLA, APA, etc.)

Creating Graphics

  1. Introducing Procedural Graphics
  2. MetaPost
  3. Picture
  4. PGF/TikZ
  5. PSTricks
  6. Xy-pic
  7. Creating 3D graphics

Programming

  1. Macros
  2. Plain TeX
  3. Creating Packages
  4. Creating Package Documentation
  5. Themes

Miscellaneous

  1. Modular Documents
  2. Collaborative Writing of LaTeX Documents
  3. Export To Other Formats

Help and Recommendations

  1. FAQ
  2. Tips and Tricks

Appendices

  1. Authors
  2. Links
  3. Package Reference
  4. Sample LaTeX documents
  5. Index
  6. Command Glossary

edit this box • edit the TOC

LaTeX describes what it is typesetting while it does it. If it encounters something it doesn’t understand or can’t do, it will display a message saying what is wrong. It may also display warnings for less serious conditions.

Don’t panic if you see error messages: it is very common to mistype or misspell commands, forget curly braces, type a forward slash instead of a backslash, or use a special character by mistake. Errors are easily spotted and easily corrected in your editor, and you can then run LaTeX again to check you have fixed everything. Some of the most common errors are described in the next sections.

Error messages[edit | edit source]

The format of an error message is always the same. Error messages begin with an exclamation mark at the start of the line, and give a description of the error, followed by another line starting with the number, which refers to the line-number in your document file which LaTeX was processing when the error was spotted. Here’s an example, showing that the user mistyped the \tableofcontents
command:

! Undefined control sequence.
l.6 \tableofcotnetns

When LaTeX finds an error like this, it displays the error message and pauses. You must type one of the following letters to
continue:

Key Meaning
x Stop immediately and exit the program.
q Carry on quietly as best you can and don’t bother me with any more error messages.
e Stop the program but re-position the text in my editor at the point where you found the error (This only works if you’re using an editor which LaTeX can communicate with).
h Try to give me more help.
i (followed by a correction) means input the correction in place of the error and carry on (This is only a temporary fix to get the file processed. You still have to make that correction in the editor).
r run in non-stop mode. Plow through any errors, unless too many pile up and it fails (100 errors).

Some systems (Emacs is one example) run LaTeX with a «nonstop» switch turned on, so it will always process through to the end of the file, regardless of errors, or until a limit is reached.

Warnings[edit | edit source]

Warnings don’t begin with an exclamation mark: they are just comments by LaTeX about things you might want to look into, such as overlong or underrun lines (often caused by unusual hyphenations, for example), pages running short or long, and other typographical niceties (most of which you can ignore until later).
Unlike other systems, which try to hide unevennesses in the text (usually unsuccessfully) by interfering with the letter spacing, LaTeX takes the view that the author or editor should be able to contribute. While it is certainly possible to set LaTeX’s parameters so that the spacing is sufficiently sloppy that you will almost never get a warning about badly-fitting lines or pages, you will almost certainly just be delaying matters until you start to get complaints from your readers or publishers.

Examples[edit | edit source]

Only a few common error messages are given here: those most likely to be encountered by beginners. If you find another error message not shown here, and it’s not clear what you should do, ask for help.

Most error messages are self-explanatory, but be aware that the place where LaTeX spots and reports an error may be later in the file than the place where it actually occurred. For example if you forget to close a curly brace which encloses, say, italics, LaTeX won’t report this until something else occurs which can’t happen until the curly brace is encountered (e.g. the end of the document!) Some errors can only be righted by humans who can read and understand what the document is supposed to mean or look like.

Newcomers should remember to check the list of special characters: a very large number of errors when you are learning LaTeX are due to accidentally typing a special character when you didn’t mean to. This disappears after a few days as you get used to them.

Too many }’s[edit | edit source]

	
! Too many }'s.
l.6 \date December 2004}

The reason LaTeX thinks there are too many }’s here is that the opening curly brace is missing after the \date control sequence and before the word December, so the closing curly brace is seen as one too many (which it is!). In fact, there are other things which can follow the \date command apart from a date in curly braces, so LaTeX cannot possibly guess that you’ve missed out the opening curly brace until it finds a closing one!

Undefined control sequence[edit | edit source]

! Undefined control sequence.
l.6 \dtae
{December 2004}

In this example, LaTeX is complaining that it has no such command («control sequence») as \dtae. Obviously it’s been mistyped, but only a human can detect that fact: all LaTeX knows is that \dtae is not a command it knows about: it’s undefined. Mistypings are the most common source of errors. Some editors allow common commands and environments to be inserted using drop-down menus or icons, which may be used to avoid these errors.

Not in Mathematics Mode[edit | edit source]

! Missing $ inserted

A character that can only be used in the mathematics mode was inserted in normal text.
If you intended to use mathematics mode, then use $…$ or \begin{math}…\end{math} or use the ‘quick math mode’: \ensuremath{…}.
If you did not intend to use mathematics mode, then perhaps you are trying to use a special character that needs to be entered in a different way; for example _ will be interpreted as a subscript operator in mathematics mode, and you need \_ to get an underscore character.

This can also happen if you use the wrong character encoding, for example using utf8 without «\usepackage[utf8]{inputenc}» or using iso8859-1 without «\usepackage[latin1]{inputenc}», there are several character encoding formats, make sure to pick the right one.

Runaway argument[edit | edit source]

Runaway argument?
{December 2004 \maketitle
! Paragraph ended before \date was complete.
<to be read again>
\par
l.8

In this error, the closing curly brace has been omitted from the date. It’s the opposite of the error of too many }’s, and it results in \maketitle trying to format the title page while LaTeX is still expecting more text for the date! As \maketitle creates new paragraphs on the title page, this is detected and LaTeX complains that the previous paragraph has ended but \date is not yet finished.

Underfull hbox[edit | edit source]

	
Underfull \hbox (badness 1394) in paragraph
at lines 28--30
[][]\LY1/brm/b/n/10 Bull, RJ: \LY1/brm/m/n/10
Ac-count-ing in Busi-
[94]

This is a warning that LaTeX cannot stretch the line wide enough to fit, without making the spacing bigger than its currently permitted maximum. The badness (0-10,000) indicates how severe this is (here you can probably ignore a badness of 1394). It says what lines of your file it was typesetting when it found this, and the number in square brackets is the number of the page onto which the offending line was printed. The codes separated by slashes are the typeface and font style and size used in the line. Ignore them for the moment.

This comes up if you force a linebreak, e.g., \\, and have a return before it. Normally TeX ignores linebreaks, providing full paragraphs to ragged text. In this case it is necessary to pull the linebreak up one line to the end of the previous sentence.

This warning may also appear when inserting images. It can be avoided by using the \textwidth or possibly \linewidth options, e.g. \includegraphics[width=\textwidth]{image_name}

Overfull hbox[edit | edit source]

[101]
Overfull \hbox (9.11617pt too wide) in paragraph
at lines 860--861
[]\LY1/brm/m/n/10 Windows, \LY1/brm/m/it/10 see
\LY1/brm/m/n/10 X Win-

An overfull \hbox means that there is a hyphenation or justification problem: moving the last word on the line to the next line would make the spaces in the line wider than the current limit; keeping the word on the line would make the spaces smaller than the current limit, so the word is left on the line, but with the minimum allowed space between words, and which makes the line go over the edge.

The warning is given so that you can find the line in the code that originates the problem (in this case: 860-861) and fix it. The line on this example is too long by a shade over 9pt. The chosen hyphenation point which minimizes the error is shown at the end of the line (Win-). Line numbers and page numbers are given as before. In this case, 9pt is too much to ignore (over 3mm), and a manual correction needs making (such as a change to the hyphenation), or the flexibility settings need changing.

If the «overfull» word includes a forward slash, such as «input/output«, this should be properly typeset as «input\slash output«. The use of \slash has the same effect as using the «/» character, except that it can form the end of a line (with the following words appearing at the start of the next line). The «/» character is typically used in units, such as «mm/year» character, which should not be broken over multiple lines.

The warning can also be issued when the \end{document} tag was not included or was deleted.

Easily spotting overfull hboxes in the document[edit | edit source]

To easily find the location of overfull hbox in your document, you can make latex add a black bar where a line is too wide:

Missing package[edit | edit source]

! LaTeX Error: File `paralisy.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:

When you use the \usepackage command to request LaTeX to use a certain package, it will look for a file with the specified name and the filetype .sty. In this case the user has mistyped the name of the paralist package, so it’s easy to fix. However, if you get the name right, but the package is not installed on your machine, you will need to download and install it before continuing. If you don’t want to affect the global installation of the machine, you can simply download from Internet the necessary .sty file and put it in the same folder of the document you are compiling.

Package babel Warning: No hyphenation patterns were loaded for the language X[edit | edit source]

Although this is a warning from the Babel package and not from LaTeX, this error is very common and (can) give some strange hyphenation (word breaking) problems in your document. Wrong hyphenation rules can decrease the neatness of your document.

Package babel Warning: No hyphenation patterns were loaded for
(babel)                the language `Latin'
(babel)                I will use the patterns loaded for \language=0 instead.

This can happen after the usage of: (see LaTeX/Internationalization)

\usepackage[latin]{babel}

The solution is not difficult, just install the used language in your LaTeX distribution.

Package babel Error: You haven’t loaded the option X yet.[edit | edit source]

If you previously set the X language, and then decided to switch to Y, you will get this error.
This may seem awkward, as there is obviously no error in your code if you did not change anything.
The answer lies in the .aux file, where babel defined your language.
If you try the compilation a second time, it should work.
If not, delete the .aux file, then everything will work as usual.

No error message, but won’t compile[edit | edit source]

One common cause of (pdf)LaTeX getting stuck is forgetting to include \end{document}

Software that can check your .tex Code[edit | edit source]

There are several programs capable of checking LaTeX source, with the aim of finding errors or highlighting bad practice, and providing more help to (particularly novice) users than the built-in error messages.

  • nag (www.ctan.org/tex-archive/macros/latex/contrib/nag) is a LaTeX package designed to indicate the use of obsolete commands.
  • lacheck (www.ctan.org/tex-archive/support/lacheck) is a consistency checker intended to spot mistakes in code. It is available as source code or compiled for Windows and OS/2
  • chktex (baruch.ev-en.org/proj/chktex/) is a LaTeX semantic checker available as source code for Unix-like systems.

Problems with \maketitle in LaTeX can be caused by missing symbols, incorrect font sizes, incorrect margins, and other issues. One common solution is to make sure the font size is set correctly, and any symbols used in the document are properly defined. Another solution is to ensure the margins are set correctly, as this will ensure the text is properly formatted. Additionally, you may need to manually adjust the font size and margins to get the desired result. Additionally, it is important to make sure all the required packages are loaded correctly and the document is compiled correctly. Finally, you may need to use additional packages to customize the appearance of the title.

Synopsis:

\maketitle

Generate a title. In the standard classes the title appears on a separate page, except in the article class where it is at the top of the first page. (See Document class options, for information about the titlepage document class option.)

This example shows \maketitle appearing in its usual place, immediately after \begin{document}.

\documentclass{article}
\title{Constructing a Nuclear Reactor Using Only Coconuts}
\author{Jonas Grumby\thanks{%
    With the support of a Ginger Grant from the Roy Hinkley Society.} \\
  Skipper, \textit{Minnow}
  \and
  Willy Gilligan\thanks{%
    Thanks to the Mary Ann Summers foundation
    and to Thurston and Lovey Howell.}           \\
  Mate, \textit{Minnow}
  }
\date{1964-Sep-26}
\begin{document}
\maketitle
Just sit right back and you'll hear a tale, a tale of a fateful trip.
That started from this tropic port, aboard this tiny ship. The mate was
a mighty sailin' man, the Skipper brave and sure. Five passengers set
sail that day for a three hour tour. A three hour tour.
  ...

You tell LaTeX the information used to produce the title by making the following declarations. These must come before the \maketitle, either in the preamble or in the document body.

Required. Declare the document author or authors. The argument is a list of authors separated by \and commands. To separate lines within a single author’s entry, for instance to give the author’s institution or address, use a double backslash, \\. If you omit the \author declaration then you get ‘LaTeX Warning: No \author given’.

\date{text}

Optional. Declare text to be the document’s date. The text doesn’t need to be in a date format; it can be any text at all. If you omit \date then LaTeX uses the current date (see \today). To have no date, instead use \date{}.

\thanks{text}

Optional. Produce a footnote. You can use it in the author information for acknowledgements as illustrated above, but you can also use it in the title, or any place a footnote makes sense. It can be any text at all so you can use it for any purpose, such as to print an email address.

\title{text}

Required. Declare text to be the title of the document. Get line breaks inside text with a double backslash, \\. If you omit the \title declaration then you get ‘LaTeX Error: No \title given’.

To make your own title page, see titlepage. You can either create this as a one-off or you can include it as part of a renewed \maketitle command. (Many publishers will provide a class to use in place of article that formats the title according to their house requirements.)

Понравилась статья? Поделить с друзьями:
  • Make ошибка 127
  • Make ошибка 126
  • Maine win64 shipping exe системная ошибка grounded
  • Make maintenance ошибка на ибп
  • Man ошибка 3099