I could also title this thread: "How to delete extra pages that are created against my will?"
Hello again,
I'm stumped.
I've been reading a guide for creating a book in lyx, and for the first page it says to insert the latex code (the ERT - red box), \frontmatter. This apparently takes away the folios (page numbers) because page numbers are normally not in the frontmatter of books.
When I insert the above latex code at the beggining of the document and then hit Ctrl+R to preview the pdf, it shows a first page blank, and the second page with my book's title.
Now, if I go enter the same command, \frontmatter into the latex preamble, then there is no extra page, and does exactly what I want.
Why?
LyX ⇒ Difference between Latex preamble and inserting ERT
-
- Posts: 128
- Joined: Wed Jul 04, 2012 5:34 pm
Difference between Latex preamble and inserting ERT
FYI:
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
NEW: TikZ book now 40% off at Amazon.com for a short time.

Re: Difference between Latex preamble and inserting ERT
good question, i was wondering about something similar too!
-
- Posts: 128
- Joined: Wed Jul 04, 2012 5:34 pm
Re: Difference between Latex preamble and inserting ERT
hahaha...it's so touchy, I'm worried I might run into some formatting issue like this during the middle of the book, and then not know why it happened or how to fix it.
FYI:
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Re: Difference between Latex preamble and inserting ERT
It's hard to generalize the difference between LaTeX preamble and inserting ERT. In general, I would guess that if you put a command in the preamble it will apply to the whole document and if you put it in ERT it might apply more locally. That said, there are many things you can put in ERT that apply globally.
As far as not knowing how to fix an error, this is why it's important to backup regularly. LyX supports version control and it's also nice that a .lyx file is just a plain text file so you should never break your content.
On a similar note, I've wondered if a "revert to last good compile" would be useful.
As far as not knowing how to fix an error, this is why it's important to backup regularly. LyX supports version control and it's also nice that a .lyx file is just a plain text file so you should never break your content.
On a similar note, I've wondered if a "revert to last good compile" would be useful.
-
- Posts: 128
- Joined: Wed Jul 04, 2012 5:34 pm
Re: Difference between Latex preamble and inserting ERT
HHHhhhAHAHAHAHA another touchy thing I noticed is that lyx recognizes the ERT as a line of text instead of something in the background.
When I enter ERT in the first line of a page say before a chapter heading I can either write the chapter title on the same line as the ERT or press return and write the chapter title on the next line.
On the same line as the ERT, I go to select "Chapter" from the drop down menu and voila the ERT, and also the last line of text on the previous page suddenly turn into the Chapter title.
When I instead press return and write the chapter heading below the ERT, lyx thinks I'm on the second paragraph of the page and thus automatically indents whatever text I write. (I know this is a quick fix in paragraph settings) but still...what were they thinking?!
Does that extra line after the ERT result in the Chapter title being further down the page than on the other chapter pages where there is no ERT?
When I enter ERT in the first line of a page say before a chapter heading I can either write the chapter title on the same line as the ERT or press return and write the chapter title on the next line.
On the same line as the ERT, I go to select "Chapter" from the drop down menu and voila the ERT, and also the last line of text on the previous page suddenly turn into the Chapter title.
When I instead press return and write the chapter heading below the ERT, lyx thinks I'm on the second paragraph of the page and thus automatically indents whatever text I write. (I know this is a quick fix in paragraph settings) but still...what were they thinking?!
Does that extra line after the ERT result in the Chapter title being further down the page than on the other chapter pages where there is no ERT?
FYI:
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class