README for Document Writers

Creating new master lyx documents.

In Layout/Document...
  Layout tab, Document_class: book
  
In the Master Document...  
  Preamble tab:
	\usepackage[plainpages=false,pdfpagelabels,colorlinks=true,linkcolor=blue]{hyperref}
	\pagenumbering{Roman}
	\let\myTOC\tableofcontents
	\renewcommand\tableofcontents{%
	\myTOC
	\clearpage
	\pagenumbering{arabic}
	}

	\usepackage{fancyhdr}
	\setlength{\headheight}{15pt}
	\pagestyle{fancy}
	\renewcommand{\chaptermark}[1]{\markboth{\chaptername \ \thechapter.\ #1}{}}

	\lhead{\fancyplain{}{EMC V2.3 Manual Name Here}}
	 
	\fancyfoot{}
	\fancyfoot[CE,CO]{\thepage}

In sub documents the Preamble should be empty.

Creating new sub documents use the template.lyx file as the base.

Drawings from QCad
-------------------
Save as .dxf to same directory as the image
Set line thickness to 0.50mm
Export image as 480 x 480 Resolution Auto .png

Images
-------------------

Images must be in the same directory or a subdirectory below the .lyx file
or it adds a local path and that really fouls it up...

A Note on using Lyx
-------------------

By adding a package to the preamble it is possible to include the 
TOC starting page in the TOC itself.  That way it will appear in
the side bar of the PDF readers and allow the user to click back
to where they last were when they clicked on a TOC entry.

That line is \usepackage{tocbibind} and it seems to work fine right
below the line that colors and creates the TOC links.

It is also possible to add other references to the TOC for things 
like sections or chapters that are not numbered (chapter*) by including
and ERT (Evil Red Text) while running the Lyx GUI itself.  An example
this is shown below.  What it does is add the user handbook Foreward
to the TOC when the first line of userforward.lyx has been changed
to an unnumbered chapter.

The line is listed below.  You'd need to change "Forword" for your
own entry's name.  This ERT should be added before the
lines that insert a file or create a new heading you wish to add.
The ERT is Insert/TeX on the lyx menu.

\addcontentsline{toc}{chapter}{\protect\numberline{}Foreword}

This line is optional and adds a page title... 
It also looks like we need to modify the header variable that is 
used for the top of each page to reflect the new info.  This can
be done by placing the following ERT immediately before the item
to be added.

\markboth{Foreword}{Foreword}

Change "Foreword" to the name you wish to show at the top of the page .


Note on common title page common/Document_Header.lyx
---------------------------------------------------

It is possible to use the same include file for all books that use 
this frontmatter file.

What we do is first define a box and include the book's title in
it.  This must be done before Document_Header.lyx is included in 
the new master doc.  This is done with a single ERT that looks like 
this.

   \newsavebox{\titleadd}

   \sbox{\titleadd} {\Huge \bf Getting Started}

Fontsize is chosen with the \Huge but could be smaller using in 
decending order;
   huge
   LARGE
   Large
   large
   
The \bf sets the usage of boldfont.

Replace "Getting Started" with the name chosen for the new book.

There is an ERT added into Document_Header.lyx in the title 
definition that calls up the box created in the master doc.


