I have two matching documents with notes for two different classes. The document class, preamble, etc. are all the same. In one file, when I export it, the TOC centers the Part headings, in the other, the Part headings are Left justified. I want them to be Left justified, but do not understand what coding I may have unintentionally inserted into LyX that would cause the Part headings to center-justify in the TOC. Can somebody help me with this? How do I keep my file from center-justifying the Part headings in the TOC?

I'm using LyX 2.0.6. on Mac OS X Yosemite 10.10.3. I can post screen shots should this be helpful.

UPDATE 1: %% LyX 2.0.6 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing.

\setmainfont[Mapping=tex-text]{Gentium Basic}
\setsansfont[Mapping=tex-text]{Linux Libertine}
 breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Because html converters don't know tabularnewline

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.






\date{February 11-14; May 5-9, 2014\pagebreak{}\tableofcontents{}\pagebreak{}}


\part{Introductory Matters}

  • 1
    Welcome to TeX.SX! I think you should show us at least some bits of the code and the LyX configuration file. – user31729 Apr 27 '15 at 18:34
  • Happy to do so! I'm new to this, so let me know if this is what you're asking for. I've added the code for from a Tex file I exported up to the point of the first Part heading in my question above. – Jacob Young Apr 27 '15 at 20:05

I seriously hope this is faulty introduced by the user and not code generated by LyX.

You cannot just call \tableofcontents inside the date field.


\title{LyX is strange}
%\date{February 11-14; May 5-9, 2014\pagebreak{}\tableofcontents{}\pagebreak{}}% This is rubbish, sorry
\date{In 2014}


\part{Introductory Matters}
| improve this answer | |
  • @Jacob If the table of contents was inserted in the date, then that would generate that code. To fix this in LyX, change "date" to "standard". – scottkosty Jul 22 '16 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.