Sei sulla pagina 1di 93

LyX_Book_Edit-090510 2010/9/5 17:05 page i #1

Scientic Book Writing


Using LYX a Front-end of LATEX
First Edition

Waluyo Adi Siswanto

Written Designed and Edited by: Waluyo Adi Siswanto


First Edition 2010
All rights reserved.
No part of this publication may be reproduced stored in retrieval system or transmitted
in any form or by any means electronic mechanical including photocopying recording
or by any information storage retrieval system without a prior permission from Penerbit
UTHM.

Perpustakaan Negara Malaysia

Data Pengkatalogan-dalam-penerbitan

Siswanto Waluyo Adi


Scientic Book Writing Using LYX a Frontend of LATEX

Contains Index
Bibliography: p.229
ISBN 978-983-xxxx-xx-x
1. LyX / LaTeX I. Title
xxx.xxx

Printed and bound in Malaysia by:


Penerbit UTHM
Universiti Tun Hussein Onn Malaysia
86400 Parit Raja
Batu Pahat
Johor Darul Takzim
Phone: 60-7-4537454/52
Fax: 60-7-4536145
Website: www.uthm.edu.my/pt
email: pt@uthm.edu.my

LyX_Book_Edit-090510 2010/9/5 17:05 page iii #2

LyX_Book_Edit-090510 2010/9/5 17:05 page v #3

Contents
List of Figures
List of Tables
List of Examples

ix
xiii
xv

List of Abbreviations

xix

Acknowledgements

xxi

Preface

xxiii

Step by Step Guidelines


1 Understanding LYX Working Environment
1.1 LYX Installation
1.1.1 Installation LYX in Windows
1.1.2 Installation LYX in Ubuntu
1.2 Working with LYX
1.2.1 File Operations
1.2.2 Edit Operations
1.2.3 View Operations
1.2.4 Insert Operations
1.2.5 Navigate Operations
1.2.6 Document Menu
1.2.7 Tools Menu
1.2.8 Help Menu
1.3 Toolbars in LYX
1.3.1 Standard Toolbar
1.3.2 Extra Toolbar
1.3.3 View / Update Toolbar

1
2
2
4
6
7
12
16
18
27
27
29
32
32
33
34
35
v

vi

Contents

2 Document Preparation
2.1 Document Class Selection
2.2 Document Page Layout and Margin
2.3 Page Number and Page Header

37
37
39
41

3 Writing the Front-matter


3.1 Title Page
3.2 Publisher (Imprint) Page
3.3 Dedication Page
3.4 Table of Contents (TOC, LOF and LOT)
3.4.1 Standard TOC, LOF, LOT
3.4.2 Listing LOF and LOT in TOC
3.5 Nomenclature or Glossary
3.6 Acknowledgements
3.7 Preface
3.8 Customising Chapter Name, LOT, LOF
3.9 Dening clear transition page

45
47
51
56
57
57
57
58
59
60
61
66

4 Writing the Main-matter


4.1 Handling Sections
4.2 Bookmarks and Hyperlinks in PDF output
4.3 Basic Text Editing
4.4 Paragraph setup and control
4.5 Listing Texts
4.6 Label and Cross-Reference
4.7 Handling Mathematical Equations
4.7.1 Inline Formula
4.7.2 Displayed Formula
4.7.3 Multiline formula
4.7.4 Numbered formulas
4.7.5 Formula Cross-referencing
4.8 Figures and Tables
4.8.1 Fixed Tables
4.8.2 Float Tables
4.8.3 Working With Inkscape
4.8.4 Fixed Figures
4.8.5 Float Figures

69
70
74
77
83
88
93
97
98
100
103
105
107
108
109
112
114
119
121

5 Writing the Back-matter


5.1 Bibliography
5.1.1 Using manual method

131
131
131

LyX_Book_Edit-090510 2010/9/5 17:05 page vii #4

Contents

5.2

5.3

5.1.2 Using BibTEX database


5.1.3 Understanding BibTEX Format
5.1.4 Writing BibTEX Database Using JabRef
Bibliography Style Selection
5.2.1 Numerical Styles
5.2.2 Author-year Style
5.2.3 Using Biblatex package
5.2.4 Biblatex Style Examples
Index
5.3.1 Creating Index Entries
5.3.2 Generating Index

vii
134
135
140
143
145
150
157
163
168
170
174

6 Working With LATEX Packages


6.1 Fancy Chapter (fncychap)
6.2 Fancy Header (fancyhdr)
6.3 Visualise Cutting Lines (crop)
6.4 Advance Control of TOC, LOF, LOT (tocloft)
6.5 Drop Capitals (lettrine)
6.6 Writing Arabic Words (arabtex)

177
177
183
187
192
201
203

7 Printing the Manuscript


7.1 Creating PDF File
7.2 Printing PDF File

209
209
210

Appendices
A Document Settings
A.1 Document Class
A.2 Modules
A.3 Fonts
A.4 Text Layout
A.5 Page Layout
A.6 Page Margins
A.7 Language
A.8 Numbering & TOC
A.9 Bibliography
A.10 PDF Properties
A.11 Math Options
A.12 Float Placement
A.13 Bullets

215
215
215
216
216
217
217
217
220
220
220
220
221
221

viii

Contents
A.14 Branches
A.15 LaTeX Preamble

B Users Preference Settings

221
221
225

Bibliography and Index


References

229

Index

231

LyX_Book_Edit-090510 2010/9/5 17:05 page ix #5

List of Figures
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
1.10
1.11
1.12
1.13
1.14
1.15
1.16
1.17
1.18
1.19
1.20
1.21
1.22
1.23

Windows installer
LYX working environment - Windows
LYX The Document Processor - Ubuntu
Uncompressed LYX source code
Ubuntu terminal
Standard LYX working environment
Pull-down menu: File, Edit, View, Insert
Pull-down menu: Navigate, Document, Tools, Help
Import and Export in File operations
Paragraph settings
Text style
LATEX source
Vertical split view
Horizontal split view
Horizontal space
Vertical space
Cross reference
Graphics dialog
Hyperlink dialog
Outline navigation
Spellchecker dialog
Thesaurus dialog
Collection of documentation

2
3
5
6
6
7
8
8
10
13
14
16
18
19
20
20
23
25
26
28
30
31
32

2.1
2.2
2.3

Heading Style
Plain style (without header)
Default Heading Style

41
42
43

3.1
3.2
3.3
3.4

Scaling graphics output


Scaling graphics - screen
Title page
Enable chapter prex

50
51
52
63
ix

List of Figures
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
4.9
4.10
4.11
4.12
4.13
4.14
4.15
4.16
4.17
4.18
4.19
4.20
4.21
4.22

List Part* in TOC


Hyperref dialog
Global font style and size settings
Global line spacing
Label window
Cross-reference window
Table dialog
Standard table styles
Inkscape working window
textext window
LATEX codes in LYX source
Graphical illustration with formula
Clipping dialog
Acceleration data
Two subgures
Two side-by-side subgures
Acceleration data
Acceleration data, image border oval-thin
Acceleration data, image border oval-thick
Acceleration data, image border drop-shadow
Acceleration data, image border double-frame
Acceleration data, border simple-frame-pagebreaks

75
76
84
85
94
95
109
111
114
117
118
119
121
122
125
127
128
128
129
129
130
130

5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
5.10
5.11
5.12
5.13
5.14
5.15
5.16
5.17

Citation window
Manual bibliography
PDF result of manual bibliography
BibTEX bibliography window
JabRef at work
JabRef entry types
JabRef data entry form
JabRef database
Bibliography:plain, Citation:default
Bibliography:plainnat, Citation:Natbib(numerical)
Bibliography:kluwer, Citation:Natbib(numerical)
Bibliography:klunum, Citation:Natbib(numerical)
Bibliography:abbrv-letter, Citation:Natbib(numerical)
Bibliography:elsart-num-sort Citation:Natbib(numerical)
Bibliography:IEEEtran Citation:Natbib(numerical)
Bibliography:unsrt Citation:Natbib(numerical)
Citation selection

132
134
134
135
140
142
143
144
146
146
147
148
149
149
150
151
152

LyX_Book_Edit-090510 2010/9/5 17:05 page xi #6

List of Figures

xi

5.18
5.19
5.20
5.21
5.22
5.23
5.24
5.25
5.26
5.27
5.28
5.29
5.30
5.31
5.32
5.33
5.34
5.35
5.36
5.37

Bibliography:abbrvnat Citation:Natbib(Author-year)
Bibliography:chicago Citation:Natbib(Author-year)
Bibliography:elsart-harv Citation:Natbib(Author-year)
Bibliography:humannat Citation:Natbib(Author-year)
Bibliography:IEEEtranN Citation:Natbib(Author-year)
Bibliography:jurabib Citation:Jurabib
Bibliography:klunamed Citation:Natbib(Author-year)
Bibliography:kluwer Citation:Natbib(Author-year)
Biblatex module in LYX
Biblatex - authoryear style
Biblatex - authortitle style
Biblatex - alphabetic style
Biblatex - numeric style
Biblatex - numeric-comp style
Biblatex - verbose style
Verbose footnote
Simple Index Entry
Group Index Entry
Cross Reference Index Entry
Index output

152
153
154
154
155
156
156
157
159
163
165
166
167
168
169
170
171
172
173
175

6.1
6.2
6.3
6.4
6.5
6.6
6.7
6.8
6.9
6.10
6.11
6.12
6.13
6.14
6.15
6.16
6.17
6.18
6.19

Book (KOMA-Script) default chapter


177
Fancy Chapter - Lenny Style
178
Fancy chapter - Lenny style without line
179
Fancy chapter - Lenny style with redened chapter name 179
Fancy Chapter - Sonny style
180
Fancy Chapter - Glenn style
180
Fancy chapter - Conny style
181
Fancy chapter - Rejne style
181
Fancy chapter -Bjarne style
182
Fancy chapter - Bjornstrup style
183
Default, even page
183
Default, odd page
184
Fancyhdr selectors
185
Fancy header, even page
185
Fancy header, odd page
185
Fancy header, even page chapter info
186
Fancy header, odd page section info
186
Fancyheader, even page without line
186
Fancyheader, odd page without line
186

xii

List of Figures
6.20
6.21
6.22
6.23
6.24
6.25
6.26
6.27
6.28
6.29
6.30

Printed design book on A4 paper


Crop, frame mode
Crop, frame mode and centred with info
Crop, centred cross mode
Crop, centred cam mode
Crop, centred cam mode without info
TOC in book(KOMA-Script)
TOC under tocloft
Additional command to print Lists
TOC under tocloft with lists
TOC under tocloft nodots

188
189
190
192
193
194
195
197
198
199
200

A.1 Document setting dialog - Document Class

216

B.1 Preference window

225

LyX_Book_Edit-090510 2010/9/5 17:05 page xiii #7

List of Tables
1.1

Operations in Edit menu

15

4.1
4.2

Example of a oat table


LATEX code for each formula

113
118

5.1

Biblatex citation and bibliography styles

161

6.1
6.2
6.3

Standard encodings for Arabic consonants


Example Arabic words, Part-A
Example Arabic words, Part B

204
205
206

xiii

LyX_Book_Edit-090510 2010/9/5 17:05 page xv #8

List of Examples
2.1
2.2
2.3
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
3.10
3.11
3.12
3.13
3.14
3.15
3.16
3.17
3.18
3.19
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
4.9

Preparing document for book manuscript


Paper size setting
Designing book size
Title page
Multiple authors
Custumising date in title page
Logo in title page
Publisher/Imprint page
Font style
Font size
Dedication page
TOC, LOF and LOT
List LOF, LOT, Bibliography and Index in TOC
Dening nomenclature
Changing name of nomenclature
Creating acknowledgement page
Creating preface page
Using Chapter name in every chapter
Changing the name of Chapter
Modifying heading name of TOC
Modifying heading names of LOF and LOT
Empty transition page but counted
Dening book sections
Understanding section hyrarchy
Listing * environment in TOC
Dening bookmarks and TOC links
Changing the color of hyperlinks in pdf
Familiarising with Space and Enter
Quick changing bold font
Quick changing emphasis
Quick changing underlining

38
40
40
47
48
49
49
53
55
55
56
57
57
58
59
60
61
62
63
64
65
66
70
71
73
76
77
78
79
80
80
xv

xvi

List of Examples
4.10
4.11
4.12
4.13
4.14
4.15
4.16
4.17
4.18
4.19
4.20
4.21
4.22
4.23
4.24
4.25
4.26
4.27
4.28
4.29
4.30
4.31
4.32
4.33
4.34
4.35
4.36
4.37
4.38
4.39
4.40
5.1
5.2
5.3
5.4
5.5
5.6
5.7
6.1
6.2

Quick changing Sans Serif font


Quick changing typewriter font
Quick changing noun style
Reset foreign language
Global setting of font type and size
Global setting of line spacing
Global setting of depth of indentation
Disable indentation in a paragraph
Global setting of spacing between paragraph
Local setting of vertical space
Using numbered list
Depth control in numbered list
Using itemised list
Using Labelling environment
Using Description environment
Section cross-reference
Writing inline equation
Writing math variables
Writing units in text
Writing displayed formula
Writing multiline formula
Writing numbered formula
Formula label and cross-reference
Creating a xed table
Creating a oat table
Formula in Inkscape
Dening a xed gure
Inserting a oat gure
Float gure with subgures
Float gure with side-by-side subgures
Float gure with border line
Manual bibliography method
Writing BibTeX database in JabRef
Preamble denition for biblatex
Loading biblatex style
Biblatex Bibliography listing
Special character in index
Alphabet group separator
Fancy chapter - Lenny style
Fancy chapter - Lenny style without line

81
81
81
82
83
84
85
85
87
87
89
89
90
91
92
96
98
99
100
101
104
106
107
111
113
117
120
122
123
124
126
133
141
160
160
162
173
174
178
178

LyX_Book_Edit-090510 2010/9/5 17:05 page xvii #9

List of Examples
6.3
6.4
6.5
6.6
6.7
6.8
6.9
6.10
6.11
6.12
6.13
6.14
6.15
6.16
6.17
6.18
6.19
6.20
6.21
6.22
6.23
7.1

Fancy chapter - Lenny style with renamed chapter


Fancy chapter - Sonny style
Fancy chapter - Glenn Style
Fancy chapter - Conny style
Fancy chapter - Rejne style
Fancy chapter - Bjarne style
Fancy chapter - Bjornstrup style
Fancy header, rightmark
Fancy header, rightmark and leftmark
Fancy header, rightmark and leftmark, no line
crop-frame
crop-centered frame
crop-centered cross mode
crop-centered cam mode
Creating List of Example
List of ... in TOC
Customising TOC
Creating dropped capitals
Writing Arabic word
Writing Arabic words
Writing Arabic words with transliteration
Printing pdf le

xvii
179
180
180
181
181
182
182
185
186
186
187
189
191
191
193
196
198
201
206
207
207
210

LyX_Book_Edit-090510 2010/9/5 17:05 page xix #10

List of Abbreviations

ASCII American Standard Code for Information Interchange


CiP

Cataloguing in Publication

CJK

Chinese Japanese Korean

DOI

(doi) Digital Object Identier

DVI

Device Independent

EPS

(eps) Encapsulated Postscript

GIF

(gif) Graphics Interchange Format

GNU It is very common to say GNU Open Source. It is recursive


meaning GNU is Not Unix, or actually Genuinely Not Unix.
GUI

Graphical user Interface

HTML Hyper Text Markup Language


IEEE Institute of Electrical and Electronics Engineers
ISO

International Standard Organisation

JPG

(JPEG or jpeg or JPG or jpg) Joint Photographic Expert Group

LOF

List of Figures

LOT List of Tables


PDF

(pdf) Portable Data Format


xix

PNG (png) Portable Network Graphics


PS

(ps) Postscript

SVG

(svg) Scalable Vector Graphics

TOC Table of Contents


UI

User interface

URL (url) Uniform Resource Locator


UTHM Universiti Tun Hussein Onn Malaysia
WYSIWYG What You See Is What You Get
WYSIWYM What You See Is What You Mean

xx

LyX_Book_Edit-090510 2010/9/5 17:05 page xxi #11

Acknowledgements

ver the years, those that I have met and worked with have urged
me to write a book, to put my experience in using LYX down on
paper, and to share the LYX tricks to write scientic books.
Much of what I have learned over the years came as the result of
being a father to 3 wonderful and delightful children, Mutia, Hanif,
and Yusuf. A tremendous support from my lovely wife Anik is also
dispensable. Their patients and their daily prayers have been motivating me to write this book. My parents, my brothers and sisters all of
whom, in their own ways inspired me to keep on working hard.
Of course thanks to LYX team, especially the developers who have
been working really hard to present a great software that can be used
by anyone for free and available in 25 languages. Thanks to Matthias
Ettrich the rst person who developed LYX. There are so many LYX
people from ve continents helped me directly or indirectly through
electronic conversation in LYX-development and LYX-user mailing list:
Uwe Sthr, Jrgen Spitzmller, Abdelrazak Younes, Pavel
Sanda, Bob Lounsbury, John McCabeDansted, Paul A. Ru
bin, Les Denham, Guenter Milde, Nikos Alexandris, Ingar
Pareliussen, Wolfgang Engelmann, Rich Heck, Julio Rojas,
Manveru, Friedrich Hagedorn, Hubert Christiaen, Anthony
Campbell and LYX contributors listed in LYX credits1
My deepest appreciation goes to Sabily2 operating system developer team who heavily customised Ubuntu3 in an Islamic environment.
This manuscript has been prepared in Sabily operating system. Al-

LYX contributors, http://www.lyx.org/Credits


Sabily is one of Ubuntu distro http://www.sabily.org
3
Free operating system http://www.ubuntu.com/
2

xxi

xxii

Acknowledgements

though the version I used was the old version (Ubuntu Muslim Edition
8.10) but it really helped me during the manuscript preparation. I can
use other useful free software related to scientic writings (Inkscape4
with 5 , Gimp6 , Dia7 , SMath8 and LabPlot9 ) within this wonderful
operating system awlessly.
It cannot be forgotten, all my colleagues at the Department of Engineering Mechanics, Universiti Tun Hussein Onn Malaysia (UTHM)
for their constructive suggestions during the manuscript preparation
stage. The continuous supports from Prof Dr. Sulaiman Hassan,
Dr. Badrul Omar, Dr. Shahruddin Mahzan and
Dr. Ahmad Mujahid Ahmad Zaidi are of important with high appreciation. Without their supports my work would have been most
dicult and would not have been published.
Thanks to the Almighty the Most Benecent the Most Merciful
who has always give me strength and for Him only this peace of work
should be dedicated for.

Scalable Vector Graphics editorhttp://www.inkscape.org/


EX text extension for Inkscapehttp://bitbucket.org/pv/textext/
6
Image manipulation program http://www.gimp.org/
7
Scalable Vector Graphics drawing tool http://projects.gnome.org/dia/
8
Mathematical program http://en.smath.info
9
Data analysis and visualisation program, http://labplot.sourceforge.net/
5 A
LT

LyX_Book_Edit-090510 2010/9/5 17:05 page xxiii #12

Preface

Here, the preface will be written.

xxiii

LyX_Book_Edit-090510 2010/9/5 17:05 page xxv #13

Step by Step Guidelines

xxv

LyX_Book_Edit-090510 2010/9/5 17:05 page 1 #14

Step

Understanding LYX Working


Environment
LYX1 is a free open source software 2 so anyone can redistribute it
and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 of the
License, or any later version3 . LYX is Copyright 1995 by Matthias
Ettrich, 1995-2009 LYX Team, available for various operating systems,
including UNIX, Mac OS X, Windows, and Linux distros (including
Sabily4 ).
LYX is a document processor following the self-coined What You
See Is What You Mean (WYSIWYM) paradigm, as opposed to the
WYSIWYG (What You See Is What You Get) ideas used by most
common word processors. This means that the user only has to care
about the structure and content of the text. This is where LYX diers
from an ordinary word processor. You do not need to concern yourself
with what character goes where. You tell LYX what you are doing and
LYX takes care of the rest, following a set of rules called a style. The
typesetting is done by LATEX5 , an advanced typesetting system, thus
LYX is a front-end of LATEX. Specic knowledge of the LATEX document

2
3
4

The ocial website LYX - a document processor http://www.lyx.org


The source codes can be downloaded from ftp://ftp.lyx.org/pub/lyx/stable
The complete licence is written here http://www.lyx.org/License
Sabily is the new name of Ubuntu Muslim Edition. Sabily is a free, open source
operating system based on the popular Ubuntu. http://www.sabily.com
LATEX is a document preparation system designed by Leslie Lamport in 1985. It
was built up from a typesetting language called TEX, created by Donald Knuth
in 1984.

Step 1. Understanding LYX Working Environment

processing system is not necessary but may improve editing with LYX
signicantly for specialist purposes.
LYX is designed for authors who want professional output quickly
with a minimum of eort without becoming specialists in typesetting.
The job of typesetting is done mostly by the computer, not the author; with LYX, the author can concentrate on the contents of the
manuscript.
LYX is a document preparation system. It excels at letting authors
to create complex technical and scientic books and articles with mathematics with accurate cross-references, bibliographies, and indices. It
provides a modern approach to writing documents with a computer by
using a markup language paradigm, an approach that breaks with the
obsolete tradition of the typewriter concept.

Figure 1.1: Windows installer

1.1 LYX Installation


LYX is available in various operating systems. The installation in two
operating systems, i.e. Microsoft Windows and Ubuntu will be explained.

1.1.1 Installation LYX in Windows


Download the complete installer from the ftp site ftp://ftp.
lyx.org/pub/lyx/bin/1.6.7/, as shown in Figure 1.1. The ftp
site must be typed on your internet browser. The latest version
can be found by searching from ftp://ftp.lyx.org/pub/lyx/
bin/. It is recommended to download the AltInstaller-Complete

LyX_Book_Edit-090510 2010/9/5 17:05 page 3 #15

1.1. LYX Installation

for new installation. This installer installs a full working LATEXenvironment which is required by LYX. ImageMagick, Ghostscript,
Aspell, GSview, JabRef and MikTek are all included. Python
les and Math fonts required by LYX are included in the complete Windows installer.
Install LYX by double click the le from the folder where the
AltInstaller-Complete is saved. Once the installation has
been successfully performed, LYX can be run and its windows
environment will be popped up (Figure 1.2).

Figure 1.2: LYX working environment - Windows


Following LYX installation, you need to update MikTek to the
latest version. This is to make sure that the LATEX distribution
that you are using is the most up-to-date.
For scientic writing, some LATEX packages are need to be installed. Go to MikTek package manager nd these packages:
koma-script, ieee, elsevier, kluwer, natbib, jurabib, caption,
biblatex, fncychap, fancyhdr; then install them. To support
arabic and quranic texts, additional packages arabtex and arabi
will be required.

Step 1. Understanding LYX Working Environment

1.1.2 Installation LYX in Ubuntu


There are various ways to install LYX in Ubuntu. It depends on the
users preference. For a general user that want to use LYX as a writing
tool, the rst option is the safest choice and LYX will be ready and
fully supported by the LATEX engine from texlive distribution. If
user wants to use LYX for specic writings that requires certain LATEX
packages and does not want to install unnecessary packages, the second
option is the most suitable one. If you want to modify the development
source codes and compile them for your own experiments, then you are
suggested to follow the third option.
General Installation from Ubuntu Software Center
From the menu Applications Ubuntu Software Center, then just
search LYX. Once LYX is listed in the dialog, click the Install
button to start the installation process by downloading from the
repository and install it in your system.
You can continue searching texlive-full then install it. All
texlive packages will be installed.
Selective Installation Using Synaptic Package Manager
Open Synaptic Package Manager by following Systems System
tools Synaptic package manager
Search the LYX package and right-click the entry Mark recommended for installation. You will nd a bunch of useful packages
here.
Optional packages are suggested to install. They can be found
in synaptic package manager: qt4-qtcong (allows customising
menu font/size and other parameters in LYX GUI), texlive (metapackage including the most common texlive packages), texliveextra-utils, texlive-fonts-extra, texlive-formats-extra, texlive-genericextra, texlive-latex-extra (here is the wrapg latex package), texlivemath-extra (D. Knuths beautiful Concrete font is here), texlivescience (related to algorithm(ic) packages) and texlive-publishers
which includes essensial classes from international publishers such
as elsevier, kluwer, IEEE and many others.

LyX_Book_Edit-090510 2010/9/5 17:05 page 5 #16

1.1. LYX Installation

Running LYX from Applications Oce LYX. The environment


will appear and look like depicted in Figure 1.3.

Figure 1.3: LYX The Document Processor - Ubuntu

Installation from Source Code


When the installation is intended from the source code. Direct instructions from Ubuntu terminal are required.
Download the compressed source code lyx-1.6.7.tar.gz from ftp:
//ftp.lyx.org/pub/lyx/stable and save it in a folder, for an
example /home/waluyo/Public (Figure1.4a).
Extract the compressed le by right-click on the le and select
extract here (Figure 1.4b). The source codes will be automatically save in /home/waluyo/Public/lyx-1.6.7.
Open the terminal, Applications Accessories Terminal and go to
the folder of the LYX source codes by typing cd /home/waluyo/
Public/lyx-1.6.7 (see Figure 1.5)
Install packages that are required to compile LYX source codes:
automake, autoconf, gcc, g++ libqt4-dev, and libaiksaurus-dev.

Step 1. Understanding LYX Working Environment

a) Compressed le

b) Right-click

Figure 1.4: Uncompressed LYX source code


These packages can be found from Synaptic Package Manager
(System Administration Synaptic Package Manager). When searching tool in Synaptic is used, the keywords for libqt4-dev, and
libaiksaurus-dev can be under libqt4, and libaiksaurus.
When these packages have been installed, compiling LYX from
source can be done by executing the next step.
Compiling LYX source and installing it into the system can be
directly from the terminal (Applications Accessories Terminal)
by entering the following command.
. / c o n f i g u r e withv e r s i o n s u f f i x = 1.6.x
make
sudo make i n s t a l l

Figure 1.5: Ubuntu terminal

1.2 Working with LYX


As a word processor, LYX provides necessary tools for helping users in
preparing a structured manuscript. The standard appearance in LYX
consists of four tool bars (depicted in Figure 1.6): Pull down menu bar ,
Standard toolbar , Extra toolbar and View toolbar .

LyX_Book_Edit-090510 2010/9/5 17:05 page 7 #17

1.2. Working with LYX

Figure 1.6: Standard LYX working environment


There are 8 main pull-down menus which provide comprehensive
tools: File, Edit, View, Insert, Navigate, Document, Tools and Help. The
detail sub-menus in each pull-down menu are shown Figure 1.7 and
Figure 1.8.

1.2.1 File Operations


Under the File menu, basic operations of controlling a document le
starting from opening a new document le to printing it to a printer or
a PostScript le are provided. Standard le operations such as open,
open a recent document, open a template, import from various format
(Figure 1.9a) and export to dierent format other than lyx format
(Figure 1.9b). Converting a lyx document to a pdf format should use
this export sub menu. Close and Exit sub menus are intended for closing
the current working window or exiting LYX, respectively. Some basic
operations under the File menu can be done by clicking the available
in the toolbars.
The detail list of sub-menus under File menu:
New [Ctrl+N ] or
It creates a new document.
New from Template [Ctrl+Shift+N]
This sub-menu prompts user for a template to use. Selecting
a template will automatically set certain layout features for the
document, features a user would otherwise need to change manually.
Open [Ctrl+O] or

Step 1. Understanding LYX Working Environment

Figure 1.7: Pull-down menu: File, Edit, View, Insert

Figure 1.8: Pull-down menu: Navigate, Document, Tools, Help

LyX_Book_Edit-090510 2010/9/5 17:05 page 9 #18

1.2. Working with LYX

An existing document can be selected from the popped up window and will be opened in a new tab.
Open Recent
The sub-menu shows a list of the recently opened les. Click
there on a le to open it.
Close [Ctrl+W]
Closes the current document. If the document has unsaved changes,
a message will appear asking user to save, discard or cancel it.
Save [Ctrl+S] or
Saves the current active document under a working tab.
Save As [Ctrl+Shift+S]
Saves the actual document under a new name to create a copy.
Save All
Saves all opened documents in all working tabs.
Revert to Save
Reloads the actual document from disk. If the document has
been saved, this sub menu will not active. When it is requested,
a conrmation message appears asking user to conrm: Revert
or Cancel it.
Version Control
This is used when more people are working on the same document.
Import
Facilitates import les from LYX-versions, LATEX-les, NoWebles, plain text les, and comma separated, table like, text les
(CSV), as seen in Figure 1.9a. The les will be imported as new
LYX-document.
When Plain Text Join Lines is selected, all lines will be imported
consecutively to one big paragraph. A new paragraph is started
when there is a blank line in the le.

10

Step 1. Understanding LYX Working Environment

a) Import

b) Export

Figure 1.9: Import and Export in File operations


Export
Converts and saves a current document to various le formats
(Figure 1.9b). The resulting les are placed in the directory of
your LYX-le. The menu entries are not the same on all installations. They depend on the programs found by LYX while its
conguration.
The available entries:
CJK LYX

format of the special LYX 1.4.x versions for Chinese,


Japanese, and Korean (CJK); (Since LYX 1.5.0 CJK
support is fully integrated to LYX.)
DVI
DVI-format
HTML
HTML-format (the HTML-converter is a third-party
product and doesnt work in all cases)
HTML (MS Word) HTML-format specialised so that the result
can be imported to MS Word, as consequence of this
formulas will be embedded as bitmap fonts and not
in the format MathML.
LaTeX (pdatex) text le with the LATEX source, additionally all
images used in the document will be converted to
a format that is readable for the pdflatex program
(GIF, JPG, PDF, PNG)

LyX_Book_Edit-090510 2010/9/5 17:05 page 11 #19

1.2. Working with LYX

11

LaTeX (plain) text le with the LATEX source code, additionally


all images used in the document will be converted to
the EPS-format, only this format is readable for the
latex program
LyX 1.y.x LyX-document in a format readable for the LYX versions 1.y.x (y is replaced by the version number)
Open Document Open Document formatted text le, to be opened
with such as OpenOce, KOce, or Abiword. This
conversion is conducted by LATEX software tex4ht.
PDF
PDF-format using the program ps2pdf.
PDF (dvipdfm) PDF-format using the program dvipdfm. The
program dvipdfm produces internally a DVI-le which
is then converted to a PDF-le.
PDF (pdatex) PDF-format using the program pdflatex which
directly produces PDF-les and supports the latest
PDF-le formats.
Plain text text format
Plain text (ps2ascii) text format, the document will rst be converted to Postscript format and then exported as text
using the program ps2ascii.
Postscript PostScript format using the program dvips.
Custom
custom format
Print [Ctrl+P] or
Prints a document in an active working tab to a le in PostScript
format or send it to a printer. The printer will also use the
document in PostScript format. The conversion to PostScript is
done in the background by LYX using the program dvips.
New Window
Open a new LYX window.
Close Window
Closes the active LYX windows. A message will appear to save
all documents or to discard or to cancel it.
Exit [Ctrl+Q]
This submenu exits all running LYX windows. In case there is an
unsaved document, a warning message will appear to respond;
save, discard or cancel it.

12

Step 1. Understanding LYX Working Environment

1.2.2 Edit Operations


Edit main menu facilitates general editing sub menus such as Undo,
Redo, Find and replace, Cut, Copy, Paste and Paste recent.
Undo [Ctrl+Z] or
LYX has multiple levels of undo since the current editing session
started but limited to 100 steps.
Redo [Ctrl+Y] or
When pressing the Undo button is considered too far, then Redo
( ) gets the undo process back as it was before the Undo.
Cut [Ctrl+X] or
After part of the document has been selected (by click-drag of the
mouse button), the selected part is removed from the document
and saved in the memory.
Copy [Ctrl+C] or
After part of the document has been selected (by click-drag of
the mouse button), the selected part is saved in the memory.
Paste [Ctrl+V] or
Automatically paste selected text to the document. Pressing the
middle button of the mouse will do this operation.
Paste Recent
The text saved in the memory can be selected and pasted in to
the document at the current cursor position.
Paste Special
Sub menu Paste special enables user to chose an option how the
saved text will be pasted. It is also possible to paste an image
from a clipboard memory into the lyx document and at the same
time save the image in png or jpeg format.
Select All [Ctrl+A]
Selects the whole document.
Find & Replace [Ctrl+F] or
Once a word or expression has been found, LYX selects it. Hitting
the Replace button replaces the selected text with the contents

LyX_Book_Edit-090510 2010/9/5 17:05 page 13 #20

1.2. Working with LYX

13

of the Replace with eld. Find Next button skips the current
word. Hit Replace All to replace all occurrences of the text in the
document automatically.
The Case sensitive option can be used if it is intended that the
search to consider the case of the search word; searching for
Test will not match the word test. The Match whole words
only option can be used to force LYX to only nd complete words.
Move Paragraph Up [Alt+Up], Move Paragraph Down [Alt+Down]
It shifts the paragraph where the cursor is currently in one paragraph up or down.
Paragraph Settings
When Paragraph Settings sub menu is selected a paragraph dialog appears as seen in Figure 1.10, line spacing and alignment
can be chosen. It only eects the paragraph where the cursor is
in.

Figure 1.10: Paragraph settings

Text Style
It controls the font family, font series, font shape, font colour,
font size and font miscellaneous (see Figure 1.11) of selected text
or characters. The customisation tool for text style can also
be accessed by right click at any text in the document, then
Text Style Customized.
Font family:
Roman family is the default font in LYX
The font can be changed to Sans Serif family

14

Step 1. Understanding LYX Working Environment


Another type is Typewriter family
Font series:
Medium font series is the default setting
User can choose to Bold font like this
Font shape:

Upright shape is the default shape


It can be in Italic font shape
Almost similar with italic shape but it is dierent shape.
This is Slanted
Another shape is Small Caps

Font colour:
No Colour, Black, White, Red
Green, Blue, Cyan, Magenta, Yellow

Figure 1.11: Text style


Font size:

This font size is called Tiny

This type is Smallest

This type is Smaller

This size is Small

The default is in Normal size

This is arge

This font size is arger

This font size is Largest

This font size is Huge

LyX_Book_Edit-090510 2010/9/5 17:05 page 15 #21

1.2. Working with LYX

15

This size is called Huger

Font miscellaneous:
This is emphasis type Emph
This font is Noun
This font is Underbar
Math
The properties of this formula can be changed from this sub
menu.
Table, Rows & Columns, Table Setting
These three sub menus are only active when the cursor is inside
a table. At the same time a toolbar table appears.

Increase List Depth [Alt+Shift+Right],


Decrease List Depth [Alt+Shift+Left]
These menus are only active when the cursor is in an environment
that can be nested
Some of the Edit operations can be done by shortcuts or pressing toolbar buttons. Table 1.1 lists and summarises the toolbar buttons and
shortcuts that can be used.
Table 1.1: Operations in Edit menu
Access
Edit
Edit
Edit
Edit
Edit
Edit
Edit
Edit
Edit

menu
Undo
Redo
Cut
Copy
Paste
Select All
Find & Replace
Move Paragraph Up
Move Paragraph Down

Toolbar button

Shortcut
Ctrl+Z
Ctrl+Y
Ctrl+X
Ctrl+C
Ctrl+V
Ctrl+V
Ctrl+V
Alt+Up
Alt+Down

Edit Text Style


Edit Paragraph Settings

16

Step 1. Understanding LYX Working Environment

1.2.3 View Operations


The menu entries for the viewing formats are not the same on all
installations. It depends on the LATEX programs that are found while
LYX was congured. For viewing the print output, it requires either
DVI or PDF (pdatex). If one of that viewing software is not found,
LATEX installation should be updated or re installed. At the bottom of
the View menu the opened documents are listed.
Open All Insets, Close All Insets
Opens/closes all insets in the active document.
Unfold Math Macros [Ctrl++], Fold Math Macros
Unfolds/folds the current math macro.
View Source
Opens a window showing the source code of the actual document
(Figure 1.12). The LATEX codes where the cursor is in will be
highlighted. If the Complete source is enabled, all codes from the
beginning of the document are all shown, although the appear
code is in relevant line with the cursor position.

Figure 1.12: LATEX source


Update
This sub menu updates the view with your latest changes without
opening a new view window. Depending of the viewer, it can
update DVI ( ), PDF ( ) or Postscript ( ).

LyX_Book_Edit-090510 2010/9/5 17:05 page 17 #22

1.2. Working with LYX

17

DVI or
It views the document in DVI-format.
PDF(pdatex) or
It views the document in pdf format, created by pdatex.
Postscript or
It views the active document in postscript (PS) format.
Split View
This will split LYXs main window vertically (Figure 1.13) or
horizontally (Figure 1.14). This split view can be used to view
documents at the same time to compare them, or to view the
same document, but at dierent positions. The split view can be
requested several times to view for example 3 or more documents
the same time. To return to an unsplit view, use the menu Close
Tab Group.
Close Tab Group
Closes a split view at the active view where the cursor is in.
Fullscreen
Using this menu or pressing F11 removes the menu bar and all
toolbars so that you will see nothing than your text. It furthermore displays LYXs main window fullscreen. To return from
fullscreen to the normal view, press F11, or right-click and turn
o the fullscreen mode in the the appearing context menu.
Toolbars
It enables and disables toolbars. The installation enables by default three toolbars: Standard, Extra and View/Update. Other
toolbars can be activates from Toolbars submenu.
All toolbars and the Command Buer can be turned on and o.
The on state is denoted in the menu with a check mark. The Review, Table, Math Panels, and Math toolbars can be additionally
set to the state automatic that is denoted in the menu with the
sux (auto).
In the on state the toolbar is permanently shown, in the automatic state the toolbar is only shown when the cursor is in a
certain environment or when a certain feature is enabled. That

18

Step 1. Understanding LYX Working Environment


means that the review toolbar will only be shown when change
tracking is activated, the math and table toolbars are only shown
when the cursor is inside a formula or table, respectively.

Figure 1.13: Vertical split view

1.2.4 Insert Operations


There are many additional information rather than text included in
the document. Insert menu provides necessary tools to include gures,
tables, equations and other important objects into the document.
Math
Inserts math equations. In general, there are two types of formula; Inline formulas and Displayed formulas which can be numbered and referenced.
Special Character
Inserts any character that can be output by LATEX
system. Therefore the number of character categories
in this dialog and the available characters depend on
the installed LATEX-packages.
Ordinary Quote: Inserts this quote: , no matter what quote type
selected in the Document Settings dialog under Language.

Symbols:

LyX_Book_Edit-090510 2010/9/5 17:05 page 19 #23

1.2. Working with LYX

19

Figure 1.14: Horizontal split view


Phonetic Symbols: Creates a formula with a so called tipa inset.
Here you can insert commands to create IPA phonetic
symbols. For making use of this feature the LATEXpackage tipa must be installed.
Ellipsis:
Inserts an ellipsis . . .
End of Sentence: Inserts an end of sentence dot.
Single Quote: Inserts this quote:
Protected Hyphen: Inserts a hyphen - that is protected from line
breaks.
Breakable Slash: Inserts a slash / where also a line break can
occur.
Menu Separator: Inserts the menu separator sign
Formatting
Superscript: Inserts an superscript: testab
Subscript: Inserts an subscript: test3x
Protected Space [Ctrl+Space]: Inserts a protected space. It is
used to tell LYX (and LATEX) not to break the line at
that point.
Inter-word Space [Ctrl+Alt+Space]: Inserts an inter-word space.
Thin Space [Ctrl+Shift+Space]: Inserts a thin space. A thin
space is a blank which has half the size of a normal
space (and it is also protected).

20

Step 1. Understanding LYX Working Environment


Horizontal Space: All types of horizontal spacing can be selected
from this submenu (Figure 1.15). The available types
of horizontal spacing; Inter-word space, Thin space,
Negative thin space, Half Quad, Quad, Double Quad,
Horizontal Fill and Custom. When Horizontal Fill is selected, ll pattern is activated and one of the pattern
can be chosen. For the Custom space, a value must
be entered following the chosen unit.

Figure 1.15: Horizontal space


Horizontal Line: Inserts an horizontal line that span the whole
width of the document or column.
Vertical Space: Inserts vertical space. There are several type of
vertical spaces available; DefSkip, SmallSkip, MedSkip, BigSkip, VFill and Custom. VFill is a variable
space, set so that the space is maximal within one
page. Custom are custom spaces in units.

Figure 1.16: Vertical space


Hyphenation Point: Inserts an hyphenation point -. If LATEX fails
to break a word correctly, user can set hyphenation
points manually. These extra hyphenation points are

LyX_Book_Edit-090510 2010/9/5 17:05 page 21 #24

1.2. Working with LYX

21

only recommendations to LATEX. If no hyphenation


is necessary, LATEX will ignore them.
Ligature Break [Ctrl+Shift+L]: Since LATEX knows about ligatures,
the documents will contain them too in the output.
Here are the standard ligatures: , , , and .
If a ligature is required to break, it can be done by
inserting a ligature break.
Ragged Line Break [Ctrl+Return]: Inserts a forced line break. The
environment after the break is similar with the previous line before the break.
Justied Line Break [Ctrl+Shift+Return]: Inserts a forced line break
that furthermore stretches the broken text line to the
page border. This is necessary to avoid fringes in
justied paragraphs due to whitespace introduced by
line breaks.
New Page: Inserts a forced page break.
Page Break: Inserts a forced page break that furthermore stretches
the broken text page to the page border.
Clear Page: Inserts a clear page break.
Clear Double Page: Inserts a clear double page break.
List/TOC
Various lists can be inserted with this menu: Table of Contents,
List of Algorithm, List of Figures, List of Tables, Index List,
Nomenclature, BibTEX bibliography.
Float
To insert oats. A oat is a block of text associated with some
sort of label, which does not have a xed location. It can oat
forward or backward a page or two, to wherever it ts best. As
the oating often destroys the context between the text and the
image/table, every oat can be referenced in the text. Floats are
therefore numbered.
There are types of oats available: Algorithm, Figure (extra tool), Table (extra toolbar button
), Figure Wrap
bar button
Float and Table Wrap Float. The wrap type oat is used when a
gure or a table will be surrounded by text, or the gure/table
only occupies some fraction of column width.
Note

22

Step 1. Understanding LYX Working Environment


To insert notes. There are three types of notes: LyX_Notes,
Comment and Greyed_Out.
LYX Note (toolbar button
appear in the output.

) is for internal notes that will not

Comment does not appear in the output but it appears as LATEXcomment, when the document is exported to LATEX via the menu
File Export LaTeX(pdatex)/(plain.
Greyed Out appears in the output as grey text.
Branch
Inserts branch insets. A branch is a document part that can
be hidden for a certain reason. For example a teacher who is
setting an exam obviously does not want the pupils to see the
answers, but having questions and answers in the same document
will make the life of the markers of that exam much easier.
The denition of the branch must be created in the Document
Settings dialog to Branches. The name of the branch, its activation state and the background colour of the branches inside LYX
can be specied in this dialog.
File
Insert les to include them or its content to the document. The
accepted les are LyX Document, Plain Text, Plain Text-Join Lines,
External Material and Child Document (extra toolbar button ).
Box or
Inserts a minipage box.
Boxes are used to format a block of text. Boxes can be used
to write documents with multiple languages, to frame texts, to
prevent words to be hyphenated, to align text, or to set the
background colour of texts.
Citation or
Inserts a citation. The citation reads the Bibliography that
has been created either using Bibliography environment or from
BibTEX Bibliography database (Insert List/TOC BibTeX Bibliography).
Inserting a citation from Bibliography created by Bibliography
environment outputs numerical reference. If it is intended other

LyX_Book_Edit-090510 2010/9/5 17:05 page 23 #25

1.2. Working with LYX

23

than numerical citations that are used in this document, like


author-year citations, then a bibliography database must be used.
Label or
Inserts a label. The label is used as anchor and name for the
reference.
Label can be used in almost every part of the document, such
as chapter, section, subsection, subsubsection, oat, footnote,
formula, and list in the document. Once a label has been dened
then it can be referred using Insert Cross-Reference or from the
toolbar button .
Cross-Reference or
Inserts a cross-reference. User can reference every part of the
document which has been labelled.

Figure 1.17: Cross reference


Caption
Inserts a caption to oats or longtables. By default, when a oat
is selected the caption is already inside the oat box. A name of
the oat should be entered and a label can be inserted for cross
reference.

24

Step 1. Understanding LYX Working Environment


Index Entry or
Inserts an index entry. A grey box labelled Idx is inserted
containing the text that appears in the index. The word where
the cursor is in or the currently highlighted text is proposed by
LYX as index entry. Index entries are often grouped to oer the
reader a fast search in the index. The exclamation mark
marks the grouping levels up to three levels; every index level is
indented.
Nomenclature Entry or
Inserts a nomenclature entry. Sometimes a list of symbols that
are mentioned in the document need to be compiled with a brief
explanation of them and listed under Nomenclature.
To be able to create nomenclatures, LATEX package nomencl is
required to install.
Table or
Inserts a table. A dialog will appear to select the number of
rows and columns. The default table has lines around any cell
and the rst row appears separated from the rest of the table.
This separation appears due to a double line: The cells of the
rst row have a line below them and the cells of the second row
have a line above them.
Graphics or
Inserts a graphic at the cursor position. A dialog shown in Figure 1.18 will appear to choose the le to load.
This dialog has numerous mostly self-explanatory parameters.
The image can be transformed by setting a rotation angle and a
scaling factor.
URL
Inserts an to link to web pages or email addresses. The URL text
will always be in the style Typewriter. To be able to format the
URL text, use Hyperlinks instead of URL.
Hyperlinks or
Inserts a hyperlink. The appearing dialog (Figure 1.19) has
two elds: Target and Name. The name is the printed text for

LyX_Book_Edit-090510 2010/9/5 17:05 page 25 #26

1.2. Working with LYX

25

Figure 1.18: Graphics dialog


the hyperlink. The hyperlink type can be a weblink like this:
http://www.uthm.edu.my, an email address like this:
was.uthm@gmail.com, or a link to a le.
The hyperlink can be used to start an application in weblink type
by adding the prex run: to the link target.
Hyperlinks will automatically be hyphenated if necessary in the
PDF output, and become clickable in the DVI and PDF-output.
To set the format of the link text, highlight the hyperlink inset
and use the text style dialog.
The link text colour can be changed from the PDF Properties
dialog (menu Document Settings PDF Properties). This is actually part of LATEX-package hyperref.
Footnote or
Inserts a footnote. Once Footnote has been selected, a following
box:
appears. This box is LYXs representation of the
footnote. Clicking (mouse left-button) on the foot label, the
box will be opened and the footnote text can be entered into it.
Clicking on the box label again, will close the box.
A footnote can be created from selected text; simply mark it and
click on the footnote toolbar button.

26

Step 1. Understanding LYX Working Environment

Figure 1.19: Hyperlink dialog


Heres an example footnote6
Marginal Note or
Inserts a marginal note. Marginal notes look and behave just like
footnotes in LYX. When Marginal Note is inserted, a grey box
. This
with a label margin appearing within your text,
box is LYXs representation of the marginal note.
Marginal notes appear at the right side in single-sided documents. In double-sided documents they appear in the outer margin left on even pages, right on odd pages.
Short Title
Inserts a short title. This will insert a box labelled opt (stands
for optional)
. The short title text can be entered into
the box. Some section or chapter titles can get quite long. LATEX
allows user to specify a short title for section headings. This short
title is used in the header and in the actual table of contents. This
also works for captions inside oats.
TeX Code [Ctrl+L] or
Inserts a TeX Code box. An empty box will appear and LATEX
commands can be inserted into the box.
Program Listing
Inserts a program listings box. Programming codes can be listed
here with typewriter font.
6

The footnote will appear in the output as a superscript number at the text
position where the footnote box is placed. The footnote text is placed at the
bottom of the current page. The footnote number is calculated by LYX, the
numbers are consecutive, no matter in which chapter the footnote is in.

LyX_Book_Edit-090510 2010/9/5 17:05 page 27 #27

1.2. Working with LYX

27

Date
Inserts the actual date. The format depends on the date format
of the language that is used for LYXs menus.

1.2.5 Navigate Operations


This menu automatically lists the existing chapters, sections, gures,
tables, etc. of the current document. The document reader will be able
to navigate easily through the document. All the contents can be seen
and go to selected section accurately.
Bookmarks
To create bookmarks, go to the section that will be saved in
the bookmark and use the submenu Save Bookmark 1. For another book mark, go to a specic section that will be saved then
Save Bookmark 2. Now the key bindings Ctrl+1 and Ctrl+2 can
be used to jump between the dened bookmarks. There are up
to 5 bookmarks can be used and deleting the bookmarks is done
by Clear Bookmarks. The saved bookmarks are valid till the document is closed.
Bookmarks can also be used to jump between several opened
documents.
Next Note, Next Change, Next Cross-Reference
Jump to the next note, change, or cross-reference following the
current cursor position.
Go to Label
Only active when the cursor is in front of a cross-reference. Sets
the cursor before the referenced label, the same as if you rightclick on a cross-reference box.

1.2.6 Document Menu


When an author start writing up a manuscript, a type of document
class that will be best suited to the authors expectation. Under this
Document menu, a document track changes can be implemented and
controlled. It is the users decision to enable or to disable the track
changes. Dening when the Appendices start is facilitated under the
Document menu.

28

Step 1. Understanding LYX Working Environment


Change Tracking
When change tracking is activated by selecting the submenu
Track Changes [Ctrl+Shift+E], the review toolbar appears in LYX:.

Changes made in the document will then be highlighted by colours:


Blue text is an addition, red cancelled text is a deletion. You
can change the colour in LYXs preferences dialog under Tools
Preferences Look and feel, Colors.
LaTeX Log
After running LATEX by viewing or exporting a document, this
menu will be enabled. It shows the logle of the used LATEXprogram. Here you can see how LATEX works in the background.
Outline or
Opens the TOC/Outline window (Figure 1.20). This another
tool to navigate the current active document.

Figure 1.20: Outline navigation

Start Appendix Here


This menu will start the appendix of the document at the current
cursor position. This menu sets the document from the current

LyX_Book_Edit-090510 2010/9/5 17:05 page 29 #28

1.2. Working with LYX

29

cursor position to the end as appendix region. The region is


marked with a red borderline.
Every chapter (or section) within the appendix region is treated
as an appendix, numbered with a capital Latin letter. The appendix subsections are numbered with this letter followed by a
dot and the subsection number. All appendix sections can be
referenced as if they were normal sections.
Compressed
Un/compresses the actual document.
Settings
The document settings dialog contains submenus to set properties for the whole document and is called with the menu. Document settings can be saved as default with the Save as Document
Defaults button in the dialog. This will create a template named
default.lyx which is automatically loaded by LYX when you
create a new document without using a template.
The document class is the the rst information appear in the
dialog. This document class is very important since it control the
main setting of the document and its corresponding environment.
The detail explanation of the Document Settings dialog can be
found in Appendix A.

1.2.7 Tools Menu


This menu consists of several useful tools such as spell checker, thesaurus, word and character counts, and TEX information. Users preferences can be found under the Tools menu.
Spellchecker[F7] or
It starts the spell checking beginning from the current cursor position. A dialog (Figure 1.21) will appear showing any incorrect
(or unknown) word found, allowing you to edit and replace it in
a second line. Whenever an unknown word is found, the word is
highlighted and the text scrolled so that it is visible. In the spell
checker dialog, there is also a box showing suggestions for a correction, if any could be found. Clicking on one of the corrections
will copy to the Replace eld, double-click invokes directly the

30

Step 1. Understanding LYX Working Environment


replacement. Unknown but correctly typed words can be added
to the personal dictionary.
External spell checker programs aspell7 , ispell8 , hspell9 can
be specied in LYXs preferences (Language Settings Preferences).
For LYX on Windows, the selection box for the spell checking
program is greyed out in the preferences dialog because only
aspell can be used.

Figure 1.21: Spellchecker dialog


Thesaurus [Shift+F7] or
To start the thesaurus, highlight one word or place the cursor
behind it, and use the menu Tools Thesaurus. A dialog (Figure
1.22) pops up showing related words that you can use as replacement. The shown related words are in many cases not really
7

It can either be used as a library or as an independent spell checker. Its main


feature is that it does a superior job of suggesting possible replacements for a
misspelled word than just about any other spell checker out there for the English
language
Ispell is an interactive spell-checking program for Unix which supports a large
number of European languages
A Hebrew spell checker and linguistic analyzer

LyX_Book_Edit-090510 2010/9/5 17:05 page 31 #29

1.2. Working with LYX

31

related to the word you are currently checking, scrolling in the


shown list might help in some cases to nd related words.

Figure 1.22: Thesaurus dialog


Thesaurus works (current version) when the document language
is in English.
The thesaurus only works for single words, and also only when it
is in the singular form. For example starting the thesaurus with
the word reports leads to no results, while results are shown
for the word report. To avoid this, you can highlight only the
part report of the word reports to get results.
Statistics
Counts the number of words and characters in the actual document or the highlighted document part.
TeX Information
Shows you a list of the document classes and styles installed in
the LATEX-system.
Recongure
It forces LYX to re-inspect the system. It is necessary when some
items are installed locally, e. g. new LATEX classes, and which are
not seen by LYX.
Preferences
The preferences dialog is described in detail in Appendix B.

32

Step 1. Understanding LYX Working Environment

1.2.8 Help Menu


There are a complete collection of documentation for the reference
(Figure 1.23). It can be used by a new user who start learning LYX by
reading the introduction then following the tutorial which guide users
to use LYX. The documentation les is actually the real examples since
they are are prepared in LYX, so it just like other LYX document that
can be exported into pdf.
For more understanding in LYX related references are provided
within this Help menu; Users Guide, Additional Features, Embedded
Objects, Math, Customisation, Shortcuts, and LYX Functions. The menu
LTEX Conguration shows a LYX-document with informations about
the LATEX-packages and classes found by LYX.
Other very specic manuals i.e. Linguistics, X-Y picture, Multicolumn and Braille are also provided.

Figure 1.23: Collection of documentation

1.3 Toolbars in LYX


LYX comes with three Toolbars: Standard Toolbar, Extra Toolbar and
View Toolbar. There are other automatic toolbars that will be shown
in relevant modes. For example when a table is created (Insert Table),
and the cursor position is in the table, the Table Toolbar will be automatically showed up at the bottom of the page. These toolbars can be
forced to appear, View Toolbars, but they will be inactive or greyed
if the position of the cursor is not relevant with the working mode of
the toolbar.

LyX_Book_Edit-090510 2010/9/5 17:05 page 33 #30

1.3. Toolbars in LYX

33

1.3.1 Standard Toolbar


The Standard Toolbar is the basic and most common used by user.

The standard toolbar as shown above contains from left to right


the following buttons:

Toolbar
Button

Menu command

Shortcut

pull-down box for the


paragraph environments
File New

Ctrl+N

File Open

Ctrl+O

File Save

Ctrl+S

File Print

Ctrl+P

Tools Spellchecker

F7

Edit Undo

Ctrl+Z

Edit Redo

Ctrl+Y

Edit Cut

Ctrl+X

Edit Copy

Ctrl+C

Edit Paste

Ctrl+V

Edit Find & Replace

Ctrl+F

Edit Text Style Customized


(Misc Emph)
Edit Text Style Cutomized
(Misc Noun)
Formats text using the
current settings in the Edit
Text Style dialog
Insert Math Inline Formula

34

Step 1. Understanding LYX Working Environment


Toolbar
Button

Menu command

Shortcut

Insert Graphics
Insert Table
Toggle outline window
on/o, Document Outline
Toggle math toolbar on/o
Toggle table toolbar on/o

1.3.2 Extra Toolbar


This extra toolbar contains additional functions: various lists, inserting
oats, images, all types of notes, character and paragraph settings and
thesaurus.

The extra toolbar as shown above contains from left to right the
following buttons:
Toolbar
Button

Menu command
Default
Numbered list
Itemized list
List
Description list
Edit Increase List Depth
Edit Decrease List Depth
Insert Float Figure
Insert Float Table

Shortcut

LyX_Book_Edit-090510 2010/9/5 17:05 page 35 #31

1.3. Toolbars in LYX


Toolbar
Button

35

Menu command

Shortcut

Insert Label
Insert Cross-Reference
Insert Citation
Insert Index Entry
Insert Nomenclature Entry
Insert Footnote
Insert Marginal Note
Insert Note LYX Note
Insert Box
Insert URL
Insert TeX Code

Ctrl+L

Insert Math Macro


Insert File Child Document
Edit Text Style
Edit Paragraph Settings
Tools Thesaurus

Shift+F7

1.3.3 View / Update Toolbar


The view / update toolbar as shown above contains from left to right
the following buttons:

Toolbar
Button

Menu command

Shortcut

View DVI

Ctrl+D

View Update DVI

Ctrl+Shift+D

36

Step 1. Understanding LYX Working Environment


Toolbar
Button

Menu command

Shortcut

View PDF
View Update PDF
View Postscript

Ctrl+T

View Update Postscript

Ctrl+Shift+T

LyX_Book_Edit-090510 2010/9/5 17:05 page 37 #32

Step

Document Preparation
A scientic book should contain a complete and comprehensive information starting from the title until the index which is located at the
end of the book. Table of Contents, List of Figures, List of Tables,
Preface are compulsory in a book and must be cleanly organised as
they will be appear in front part of the book. List of Nomenclatures
is sometimes necessary to provide the summary of symbols or short
names used in the text. It will help readers to nd a quick information
of some uncommon variables. These information provide the outline of
the book and must have accurate link with corresponding pages. All
cross-references within the text must be accurate and correctly linked
to the mentioned pages.
Equations, gures, and tables are very often presented to support
the text explanations. Referring to a specic equation, gure or table
must be accurately pointed to the referred object.
LYX has the functionality to control all mentioned above automatically, so authors do need to worry about the accuracy of the page in
the Table of Contents, Index, and other Lists. Cross-reference within
the text, bibliography, link to equations, gures and tables will be automatically adjusted whenever objects are inserted. Again, authors do
not need to do any modication. LYX will adjust the numbers and
pagination automatically.

2.1 Document Class Selection


A document class will prepare working environments for author. The
author should select one of the LATEX document class that will suit to
37

38

Step 2. Document Preparation

the authors requirement. Although the document class can be changed


at any time, but it will be convenient and easier if it is decided in the
beginning of document preparation.
LYX comes with several document class available. The default
document class is article. This class is a general one for general document. For scientic books, it will be appropriate if the document class
is selected from book classes. There are several book classes: book,
book (AMS), book (Memoir), book (KOMA-Script) and many others.
The book (KOMA-Script) class has various environments including
publisher environments where the author may provide the information
of publishers page in a well-organised typeset. It will be very useful
when the book will be self-published without involving professional
publisher. If a manuscript is submitted to a publisher, usually the
publisher will prepare the publisher page.
This default settings of this class is closer to European publishing
conventions. This document class is also congurable which means
other LATEX packages can be used as additional styles. Other LATEX
packages will only require if the author wants to change the typesetting
style which is not available in book (KOMA-Script) to a non-standard
or in a more fancy style.
Since the completeness of the environments, the book (KOMAScript) class is recommended for the preparation of a scientic book
manuscript. As a real example, this book is also prepared using this
particular KOMA-Script document class.

Example 2.1: Preparing document for book manuscript


Prepare a new le for your book manuscript and save your document
as mybook under Example folder.
Approach:
Since you are preparing a scientic book, you will be using a book (KOMAScript) class.
Start LYX
Open new document, File New
Select document class, Document Settings book (KOMA-Script).

LyX_Book_Edit-090510 2010/9/5 17:05 page 39 #33

2.2. Document Page Layout and Margin

39

Now you have a blank document of book (KOMA-Script) using the default settings. To save the document,
File Save As, then click create folder button , type example
and Enter. This will create a new folder Example
Double click the folder Example and rename the default newfile1
by typing mybook. The new le name is now saved as mybook.lyx
You can now exit LYX, your document has already saved.

2.2 Document Page Layout and Margin


A book is normally is printed in double sided page. In publication
convention, it is very common to say Even page is the Verso page
whereas the Odd page is said as the Recto page. For a normal English
text from left to right, the even and odd pages have special purpose in
books.
The rst page of Table of Contents, List of Figures, List of Tables,
List of Symbols, Index will be always in Odd Recto) page. The rst
page of every chapter is always in Odd Recto) page. In LYX, author
does not need to worry about the book conventions. LYX will take
care all of these automatically and accurately. Whenever a chapter
environment is dened, it will be automatically located in the odd
page. In the case that a new chapter denition fall in an odd page
of the text, an additional transition page at even page will then be
automatically created to make sure that the new chapter is in a new
odd page. This behaviour also automatically applies to other parts of
the book where they must be exactly fall in odd page, such as Table of
Contents, List of Figures, and other Lists including Bibliography and
Index.
When page header is intended to appear in every page of the book,
the odd and even page headers are printed dierently. LYX fortunately
will do it for you automatically following the common conventions.
Customisation of course is always possible in LYX. For the time
being user customisation is not discussed, but later in Chapter 6 the
detail explanation will be provided. The customisation involves LATEX
packages.
Book is printed in a certain size format with margins. The book
(KOMA-Script) document class has margin default settings; top, bottom,
inner, outer, head separator, head height and foot skip.

40

Step 2. Document Preparation

Example 2.2: Paper size setting


Prepare a document in A4 paper size for a book manuscript. All
margins follow the default setting of book (KOMA-Script).
Approach:
The le that will be used for book is mybook.lyx.
Open your previous book document, File Open and
nd mybook.lyx from Example folder.
Alternatively your latest le can be found from File Open Recent
Since LYX will do all automatic type setting for odd and even pages,
what you need to do is dening that your document is a two-sided
document.
Dene double-sided document, Document Settings Page Layout
Paper Format - Format: A4, Page Layout - Enable Two-Sided
Document
For default margin you do not need any alteration
Document Settings Page Margins - Enable Default Margins
Example 2.3: Designing book size
Prepare a document in for a publication. The size of the book follows a
standard 7 in 10 in. The margins are the following: top 2 cm, bottom
1.5 cm, inner 2 cm and outer 1.5 cm. It requires as well a foot skip of
0.7 cm.
After nish setting up your document then save as another le name,
my_manuscript.lyx.
Approach:
In this example the author is requested to follow or is willing to design
the page layout.
Dene double-sided document, Document Settings Page Layout
Paper Format - Format: Custom
Height: 10, and set the unit in
Width: 7, and set the unit in
Page Layout - Enable Two-sided document

LyX_Book_Edit-090510 2010/9/5 17:05 page 41 #34

2.3. Page Number and Page Header

41

For default margin you do not need any alteration


Document Settings Page Margins - Disable Default Margins
Top: 2, and set the unit cm
Bottom: 1.5, and set the unit cm
Inner: 2, and set the unit cm
Outer: 1.5, and set the unit cm
Foot Skip: 0.7, and set the unit cm
To save as another name, File Save As: my_manuscript.lyx then
close this document from File Close.

2.3 Page Number and Page Header


Books are always printed with page numbers and sometimes with additional headings to help readers to indicate the chapter of the document.
It is therefore page numbers (and headings) should be properly setup.
The pagination in LYX is related to the document class applied to
the document and it is controlled under Heading Style shown in Figure
2.1, from Document Settings Page Layout.

Figure 2.1: Heading Style


Illustration of the heading styles when the selected document class
is book (KOMA-Script), are depicted in Figure 2.2 and Figure 2.3 to
represent plain and default, respectively.
In plain heading, no headers are printed, only page numbers appear at the bottom of the outer margin, as seen in Figure 2.2.
When the heading is in default, the page is located at the bottom
of the page of the outer margin. The header will be printed dierently
in even and odd pages. The header of the even page prints the chapter
number and its corresponding title, whereas the odd page writes the
section title and its number, as shown in 2.3. At the beginning of every
chapter no header appears. This default heading is actually based on

Figure 2.2: Plain style (without header)

42
Step 2. Document Preparation

headings style. When headings heading style is selected it prints the


same as that in default heading style.

LyX_Book_Edit-090510 2010/9/5 17:05 page 43 #35

2.3. Page Number and Page Header


43

The style of the header and page number location can be customised. At this stage, however, the modication and customisation
of the numbering styles have not been discussed yet. Detail explanations can be found in Chapter 6.2.

Figure 2.3: Default Heading Style

LyX_Book_Edit-090510 2010/9/5 17:05 page 45 #36

Step

Writing the Frontmatter


A scientic book should contain at least Title Page, Publisher (Imprint)
Page, Table of Contents, List of Figures, List of Tables, Preface (Foreword), Chapters, Appendices, References and the last one is the Index.
The Publisher Page is necessary if a book manuscript is prepared for
self publishing when the author wants to have the ISBN code number
then print the manuscript or as an e-book in pdf format. In case when
the manuscript will be sent to a publisher, usually the publisher will
provide this particular page.
In terms of the style, the components of the book manuscript
from the Title Page to Index, can be classied into three: Front-matter,
Main-matter and Back-matter.
Front-matter is usually numbered in roman numerals (i, ii, iii, iv, etc).
The following sections are considered as part of front-matter. In
normal left-to-right two sided books, every section of the frontmatter must be always in odd page. The publisher page can be
printed in either odd or even page.
Title Page
Publisher Page
Dedication (optional)
Table of Contents
List of Figures
List of Tables
Nomenclature or Glossary (optional)
Acknowledgement (optional)
45

46

Step 3. Writing the Front-matter


Preface

Main-matter Most scientic or non-ction books are divided into chapters, with titles similar in style and length, and equally placed
throughout the manuscript. The arabic page number starts here
(1, 2, 3, etc). All chapters are numbered. Chapter numbers continue in sequence throughout the publication. Appendices can
be considered under main-matter.
When text can be logically divided into sections larger than chapters, the chapters may be grouped in parts. Each part is often
given a title but not always numbered.
For normal books, the beginning of parts and chapters must be
always written in odd page.
The structure of the main is the following:
Part 1 (optional)
1

Chapter 1

1.1

Section 1.1

1.1.1 Subsection 1.1.1


...
Part n (optional)
...
Appendices
A. Appendix A
B. Appendix B
...
Back-matter This is where References or Bibliography and the Index will be documented. Similarly with Front-matter and Mainmatter, the beginning of Bibliography and Index are always in
the right hand side or odd pages.
References (Bibliography)
Index
Dening Front-matter, Main-matter or Back-Matter in LYX is simply an additional LATEX command. Front-matter must be dened
by inserting \frontmatter, while \mainmatter for Main-matter and
\backmatter for Back-Matter.

LyX_Book_Edit-090510 2010/9/5 17:05 page 47 #37

3.1. Title Page

47

3.1 Title Page


A title page will be place in the beginning of the book after the book
cover. It consist the title of the book, the name of the author(s), and
the name of the publisher.
The environments that will be using in creating a title page: Title,
Author and Publishers.
Example 3.1: Title page
Create a title page for a book manuscript:
Title name: The First Line of the Title
Author: your name
Publisher: Penerbit UTHM
Approach:
Open the previous le (my_manuscript.lyx). You can nd your le
from the recent document, File Open Recent, or in general the le can
be found by browsing from then folder, File Open.
Once the document has been opened, then
Front-matter1 must be dened rst:
Insert TeX Code
Type: \frontmatter
Press (the purpose of this is to move the cursor outside of the
box)
Press Enter
Click the paragraph environment box as seen in 1.3.1 and nd
the Title environment under the frontmatter.
Type in: Scientific Book Writing
Now we are going to write the name of the author
Press Enter and set the paragraph environment to Author
Type in: your full name
The last information is the name of the publisher

If \frontmatter is not dened, the page will not be considered as the front part
of the book, the number of the page will not be in roman numbers but arabic.

48

Step 3. Writing the Front-matter


Press Enter and set the paragraph environment to Publishers
Type in: Penerbit UTHM
Save your work File Save or pressing the icon
The result in pdf can be displayed, View PDF(pdatex) or from
the icon . The pdf view can be left open and it can be updated,
View Update PDF(pdatex) or from the icon .

Example 3.2: Multiple authors


In the previous example, you have learnt a how to prepare a simple
title page. Now the title of your book manuscript cannot be typed in
one line but two. The second line: Using LYX a Front-end of LATEX.
Instead of one author, you have now the second author.
Approach:
In LYX, paragraph environment is very important. You have to make
sure that you always use the appropriate environment.
If you have closed your exercise le, you need to open your le,
my_manuscript.lyx
Now you need to edit the title, you want to add another line
and type: Using LyX a Front End of LaTeX
What you used to do in other word processor, at the end
of the rst title, then you press Enter then you type the
second title.
In LYX, if you press Enter the paragraph environment will
change to Standard environment.
What you need to do: move the cursor to the end of the rst title,
then [Ctrl+Enter] and start typing Using LyX a Front End of
LaTeX.
In LYX, if you want to keep the same environment you have
to use either ragged line break [Ctrl+Enter] or justied line
break [Ctrl+Shift+Enter]. This will make sure that the line
after the line break is similar with the previous line.
Do a similar method to add the second author. Move the cursor
to the end of the author then [Ctrl+Enter] then type the name of
the second author.

LyX_Book_Edit-090510 2010/9/5 17:05 page 49 #38

3.1. Title Page

49

In this exercise you have learnt how to used a line break to maintain the same paragraph environment. Of course when you are
working in Standard environment you do not need [Ctrl+Enter]
since the default of the environment is Standard.
You can try to view pdf and you will see the title page of your
book.
Example 3.3: Custumising date in title page
Your pdf output will always show the date when you compile and
convert into pdf view format. Perhaps you do not like this as you did
not command LYX to write any date printed in the title page. You
want to disable the printed date.
Approach:
To disable the date is just like modifying the date with a blank data.
You can see a blank or empty date or change to a specic date.
In your exercise document, you need to access the LATEX preamble, Document Settings: LaTeX preamble
Type \date{} if you want to disable the date You can type any
date inside the brackets, such as \date{10 January 2010}
You can try to modify this simple LATEX command and see the
result (view pdf)
Example 3.4: Logo in title page
Instead the name of the publisher, you can use the publisher logo. Try
to get a picture and replace the name of the publisher.
Approach:
Delete the publishers name, and make sure you are in Publishers
paragraph environment
Find the publisher logo image to replace the name of the publisher. The image format can be any known image format:
Bitmap images
Graphics Interchange Format (GIF, le extension .gif)

50

Step 3. Writing the Front-matter


Portable Network Graphics (PNG, le extension .png)
Joint Photographic Experts Group (JPG, le extension
.jpg or .jpeg)
Scalable images
Scalable Vector Graphics (SVG, le extension .svg)
Encapsulated Postscript (EPS, le extension .eps)
Portable Document Format (PDF, le extension .pdf)
Insert an image; Insert Graphics will pop up a dialog LYX:
Graphics
Select the image le from the dialogs browser
The output size can be adjusted from the scaling percentage.
If you do not have any idea how big is the output size. Once
you accept the le then view pdf.
If you want to adjust the output size, click the image in
LYX, the the graphics dialog will appear again and you can
do scaling to get the perfect size, as shown in Figure 3.1.
Another way, you can set the exact width and length of the
output image.

Figure 3.1: Scaling graphics output

To control the appearance size in your screen, click the tab:


LATEX and LYX options in the graphics dialog, then set the scale
on screen. (see Figure 3.2). This scaling will not give any eect
to the output size. This only controls the size on the screen.

LyX_Book_Edit-090510 2010/9/5 17:05 page 51 #39

3.2. Publisher Imprint) Page

51

Figure 3.2: Scaling graphics - screen


View pdf your document, you will see the output will be similar
to that shown in Figure 3.3.

3.2 Publisher (Imprint) Page


The imprint or publisher page is usually placed on the back of the title
page. Although a publisher page is normally provided by the publisher,
for a self-publishing the author should prepare this page containing a
copyright notication, date of publication, publishing details, ISBN2
and CiP3 Data (if applicable).
The names of your editor, book producer and printing company
also appear on this page. No page number displayed.
In document class book (KOMA-Script), two special environments: Uppertitleback and Lowertitleback can be used to write the
imprint page. The uppertitleback writes the information at the top
of the page while the lowertitleback prints text at the bottom of the
page.
These two special environments will be applicable if the manuscript
is in a book layout, which is two-sided document. In a single sided doc2

The ISBN International Standard Book Number) is a 13-digit previously number that uniquely identies books and book-like products published internationally. Each number identies a unique edition of a publication, from one specic
publisher, allowing for more ecient marketing of products by booksellers, libraries, universities, wholesalers and distributors.
ISBNs are assigned by ISBN group agencies in 166 countries, coordinated by
the International ISBN Agency in London.
3
CiP) is a voluntary free service oered to publishers by the National Library of
Australia to provide a bibliographic record for a book before it is published. The
CiP record is derived from information supplied by the publisher and includes
author/s, title, ISBN and price.

52

Step 3. Writing the Front-matter

Figure 3.3: Title page

LyX_Book_Edit-090510 2010/9/5 17:05 page 53 #40

3.2. Publisher Imprint) Page

53

ument, all information typed in uppertitleback and lowertitleback will


not appear in the pdf output.
Example 3.5: Publisher/Imprint page
You are preparing a non-ction book manuscript that will be selfpublish through www.lulu.com. An imprint page is required and you
want to complete your manuscript in a print-ready document.
Approach:
Basically only Uppertitleback and Lowertitleback environments are utilised
in the imprint page. To maintain the same environment, [Ctrl+Enter]
should be used.
Open your exercise le my_manuscript.lyx
Move the cursor to the end of the publisher environment [Enter]
Change the environment to Uppertitleback and start typing
(from menu Insert Special Character Symbols ...) Penerbit
UTHM [Ctrl+Enter]
First Edition 2010 [Ctrl+Enter]
[Ctrl+Enter]
All right reserved [Ctrl+Enter]
No part of this publication may be reproduced, stored in retrieval
system or transmitted in any form or by any means electronic,
mechanical, including photocopying, recording or by any information storage retrieval system, without a prior permission from
Penerbit UTHM. [Ctrl+Enter]
[Ctrl+Enter]
[Ctrl+Enter]
Type Perpustakaan Negara Malaysia, then go to the menu
Insert Formatting Horizontal space Spacing: Horizontal ll and
conrm it by pressing OK button. Type Data Pengkatalogandalam-penerbitan [Ctrl+Enter]
[Ctrl+Enter]

54

Step 3. Writing the Front-matter


[Ctrl+Enter]
Write your name or Authors [Ctrl+Enter]
Write the title of the book [Ctrl+Enter]
[Ctrl+Enter]
[Ctrl+Enter]
Contain Index [Ctrl+Enter]
[Ctrl+Enter]
ISBN xxx-xxx-xxxx-xx-x [Ctrl+Enter]
[Ctrl+Enter]
1. LYX/LATEX
xxx.xxx [Enter]
Change the environment to lowertitleback
Printed and bound in Malaysia by: [Ctrl+Enter]
[Ctrl+Enter]
Penerbit UTHM [Ctrl+Enter]
Universiti tun Hussein Onn Malaysia (UTHM) [Ctrl+Enter]
86400 Parit Raja [Ctrl+Enter]
Batu Pahat [Ctrl+Enter]
Johor Darul Takzim [Ctrl+Enter]
Phone: xx-xxxxxxxx [Ctrl+Enter]
Fax: xx-xxxxxxxx [Ctrl+Enter]
Website: www.xxxxxxx.xxx [Ctrl+Enter]
Email: xxxxxx@xxxxx.xxx.xx

Save your work and view the pdf output. You will see a neat publisher
page in your manuscript but some information are still inaccurate,
especially those written with x character.

LyX_Book_Edit-090510 2010/9/5 17:05 page 55 #41

3.2. Publisher Imprint) Page

55

Example 3.6: Font style


In this book, the font size of the publisher page is not the same with
the main text. Change the font size so that the publisher page looks
like in this book.
Approach:
The font size used for the publisher page is not the normal size but
smaller. The font size smallest would be t to write the publisher page.
Open the text style dialog: Edit Text Style Customized, or
from the button
You will see the Text Style dialog as shown in Figure 1.11 and
change the font size to smallest.
Mark the text that you want to change the size
Move the cursor to the beginning of the line, i.e. before
Penerbit UTHM
Left Click and Drag the rst and the second lines
Go to the Text Style dialog and Apply.
Now you can see Penerbit UTHM and First Edition
2010 has been changed to smallest font size.
The text style properties is always indicated on the status
bar on the bottom-left of the LYX window. If you want to
know the properties of text, just click on the text area of
concern and see the status bar.
You can continue to change the size of other texts in the publisher
page by marking them [Left Click and Drag] then click Apply
button in the Text Style dialog.
Mark all the text for the publisher page then click OK button in
the Text Style dialog. The dialog will disappear once you click
OK.
Save your work and view the pdf output. Your publisher page
looks nice in dierent font.
Example 3.7: Font size
In this book the ISBN is written in typewriter font. Change yours to
typewriter font style.

56

Step 3. Writing the Front-matter

Approach:
Mark the ISBN: xxx-xxx-xxxx-xx-x
Click

button

Change family: typewriter [OK]

3.3 Dedication Page


Dedication page is an optional page and it is an author preference to
write a dedication. When writing a dedication page for a book, think
about the people who were the most inuential when the book was
being written.
The book (KOMA-Script) class document provides this environment in case the manuscript requires a dedication page from the author. The dedication page is not numbered. It writes the statement in
the middle of the page and centred.
Example 3.8: Dedication page
Write a dedication page where you want to acknowledge to your parents
and the closest family.
Approach:
Move the cursor to the end of the last line of the publisher page
then [Enter]
Select Dedication environment from the environment box below
the File main menu in LYX window
Type in: To my parents, my wife and my children
If you want something fancy, you can change the style of the font
as explained in the previous example.
Save your work and see the pdf. You have created a dedication
page.

LyX_Book_Edit-090510 2010/9/5 17:05 page 57 #42

3.4. Table of Contents TOC, LOF and LOT)

57

3.4 Table of Contents (TOC, LOF and LOT)


3.4.1 Standard TOC, LOF, LOT
Preparing standard Table of Contents (TOC), List of Figures (LOF)
and List of Tables (LOT) in LYX is as easy as 1 2 3. Since we have
selected KOMA-Script typesetting, the standard discussed here is assumed to follow the format dened in KOMA-Script.
Example 3.9: TOC, LOF and LOT
In your book manuscript Table of Contents, List of Figures and List
of Tables are something compulsory. You need to add them in your
document.
Approach:
Place the cursor after the image of the publisher, then do the
following:
Table of Contents: Insert List/TOC Table of Contents
List of Figures: Insert List/TOC List of Figures
List of Tables: Insert List/TOC List of Tables
View the result (pdf). You will see that the beginning of Table of
Contents, List of Figures and List of Tables is always in odd page.
You do not have anything in the list, of course, since you have
not started yet your manuscript. The list will be automatically
written following the contents of your manuscript.

3.4.2 Listing LOF and LOT in TOC


By default, List of Figures (LOF) and List of Tables (LOT) are not
listed in the Table of Contents (TOC).
Usually scientic books list the LOF and LOT in the TOC. Bibliography or References as well as Index should be listed in TOC.
Example 3.10: List LOF, LOT, Bibliography and Index in TOC
In your book, you want to list LOF, LOT, Bibliography and Index in
TOC

58

Step 3. Writing the Front-matter

Approach:
Before you make any modication view pdf and take a look at
the TOC. You do not see List of Figures and List of Tables.
Document Settings Document Class
Write commands in the Class option box:
liststotoc,bibtotoc,idxtotoc
listtotoc is the option command to tell LOF and LOF are
listed in TOC
bibtotoc is the option command to tell Bibliography is
listed in TOC
idxtotoc is the option command to list Index in TOC
Press OK, save your work and view pdf
Now you have List of Figures and List of Tables in your Table
of Contents. You will not see Bibliography and Index since you
do not have them in your document. Whenever you have dened
them, they will be listed automatically in TOC.

3.5 Nomenclature or Glossary


This another optional frontmatter of the book. Sometimes it is necessary to compile a list of symbols that are mentioned in the book
with a brief explanation of them. Nomenclature or Glossary comprises
alphabetically-arranged words used in the book and their denitions.
In LYX inserting Nomenclature of Glossary is as easy as dening
TOC, LOF or LOT.
Example 3.11: Dening nomenclature
Prepare a page (after LOT) where Nomenclature will be located.
Approach:
Create a blank line after LOT
Insert List/TOC Nomenclature
If you view pdf, you will not nd any nomenclature page yet.
This is normal since you do not have any symbol or word dened
for the nomenclature.

LyX_Book_Edit-090510 2010/9/5 17:05 page 59 #43

3.6. Acknowledgements

59

The entry denition of the nomenclature is created from the


menu Insert Nomenclature entry. We will try this when you
have started writing in the main-matter of your manuscript.
Example 3.12: Changing name of nomenclature
As it has been mentioned before. The nomenclature page can be used
for List of Symbols of Glossary. You want to have a nomenclature page
with the headings name is List of Symbols.
Approach:
Open your LATEX preamble from Document Settings
Write the command to change the headings name
\renewcommand{\nomname}{List of Symbols}
The command will alter from its default name Nomenclature
to List of Symbols. If you want to rename to your preferred
name, what you need to do is just rename the List of Symbols
under the brackets.
If you view pdf, you will not see your nomenclature page since
you have not dened entries for that.

3.6 Acknowledgements
A special environment is not provided in Book (KOMA-Script) document class. The environment Addchap can be used to write the acknowledgement page. It will be automatically listed in TOC. The TOC
will consider Addchap as a chapter.
This includes the authors thanks to people who provided support
or help during the writing process or writing career, to any person who
did anything for you or gave you information, and any organisation or
company who assisted you in any way.
Since the acknowledgement page is optional, not every scientic
book has it. Sometimes acknowledgements are part of the preface.
This section can also go at the back of the book if preferred. In this
case, the acknowledgement page is part of back-matter of the book.

60

Step 3. Writing the Front-matter

Example 3.13: Creating acknowledgement page


Write an acknowledgement page for your book. If you do not have
anything in your mind, just try to write two paragraphs and see the
result. This would be the rst two paragraphs that you write in LYX.
Approach:
Create a blank line after the nomenclature by pressing [Enter]
Change the environment to Addchap then type in Acknowledgements [Enter]
The environment is now in a standard writing environment. Now
start typing your own paragraphs or just using the following for
your exercise:
Over the years, those that I have met and worked with have
continuously urged me to write a book, to put my experience
in using LYX down on paper, and to share the LYX tricks
to write scientic books. [Enter]
Much of what I have learned over the years came as the
result of being a father to 3 wonderful and delightful children, Mutia, Hanif, and Yusuf. A tremendous support from
my lovely wife Anik is also dispensable. Their patients and
daily prayers have been motivating me to write this book.
My parents, my brothers and sisters all of whom, in their
own ways inspired me to keep on working hard. Without
them this work would have been most dicult.
Save your work and you can see the print result by viewing pdf.

3.7 Preface
Preface is very common in non-ction books. The preface is written
by the author and usually describes why the book was written, the
approach or the methodology of this book, how the book is organised
and expertise in the books subject matter.
In the case when the acknowledgement page is not separately written, the acknowledgements are present in the beginning of the preface.
There is no special environment for Preface in Book (KOMAScript), Addchap environment can be employed for this purpose and
will be linked automatically in TOC.

LyX_Book_Edit-090510 2010/9/5 17:05 page 61 #44

3.8. Customising Chapter Name, LOT, LOF

61

Example 3.14: Creating preface page


You need to write a preface for your book as an introductory for the
readers to understand general contents of your book.
Approach:
Create a blank line after the last paragraph of the acknowledgements by pressing [Enter]
Change the environment to Addchap and type Preface [Enter]
The environment is now in standard, you can start writing the
preface, write the following for your exercise:
This book has been prepared to assist Apache speakers who
already read and write English to read and write in Apache.
[Enter]
Each lesson includes stories written by native speakers of
Apache. At the back of the book the reader will be rewarded
by being able to read several longer stories which reect the
rich history and traditions of the Apache culture. [Enter]
It is hoped that vernacular speakers will be able to use this
book without a teachers help by carefully following the instructions on each page.
Save your work as dierent name, my_manuscript_2.lyx. You
can see the output from view pdf.
Close your document.

3.8 Customising Chapter Name, LOT, LOF


There are names (Chapter, Table, Figure, References, Bibliography,
List of Figures, List of Tables) that are already dened in the standard LATEX classes, including the book(KOMA-Script). Since LYX uses
babel package as the default language package, the names will be automatically changed to follow the user preference language (from Tools
Preferences Language Settings). The dened names however have been
dened by babel and used as default names.
In English language, for example, below is the list of the default
names and their corresponding LATEX commands, found in book (KOMAScript) document class.

62

Step 3. Writing the Front-matter


\bibname{Bibliography}
\chaptername{Chapter}
\contentsname{Contents}
\figurename{Figure}
\appendixname{Appendix}
\indexname{Index}
\listfigurename{List of Figures}
\listtablename{List of Tables}
\partname{Part}
\tablename{Table}

Sometimes, authors want to use other names which could be dierent from the defaults. In this case customising the names are required.
It should be noted that in book (KOMA-Script), the default setting is
without showing the Chapter name.
Example 3.15: Using Chapter name in every chapter
The default will not show Chapter in front of the title (1 Title of
Chapter 1). Now you want to print (Chapter 1 Title of Chapter 1).
Approach:
Open your exercise document
At the end of your document then change the environment to
Chapter and write the title, for example Chapter Title 1
If you view pdf, it looks like the following style (only number
without any prex Chapter). This is the default setting.

To print the Chapter prex a class optional request should be


written to enable the Chapter prex. From class option, accessible from Document Settings Document Class then write a
command chapterprex in the Custom area. If you have already other dened options, use , to add another option, as
shown in Figure 3.4.
Viewing pdf, now the chapter prex Chapter is now printed
before the chapter number. Chapter is the default in English
language setting.

LyX_Book_Edit-090510 2010/9/5 17:05 page 63 #45

3.8. Customising Chapter Name, LOT, LOF

63

Figure 3.4: Enable chapter prex

Example 3.16: Changing the name of Chapter


For a reason that you are writing a lecture module for your students,
then the name of Chapter is not the appropriate name. You want the
chapter name is Module instead of Chapter.
Approach:
Continuing the previous example
Open LATEX preamble, from Document Settings LaTeX Preamble, and type LATEX commands here:
\AtBeginDocument{
\renewcommand{\chaptername}{Module}
}

If your document uses language rather than default (English)


language, in order to change the predened chapter name, you
need to access the name denition in the language package babel. The command to access is \captions<language>. The
<language> can be replaced by the language name. Assuming
you are using English (UK), the the command will be in a form
\captionsbritish.

64

Step 3. Writing the Front-matter


Type the following commands:
\AtBeginDocument{
\addto\captionsbritish{
\renewcommand{\chaptername}{Module}
}
}

View pdf, you will see that the chapter has been changed. It is
now printed Module, which is what you exactly want.
Example 3.17: Modifying heading name of TOC
You want to have TOC printed as Table of Contents instead of Contents.
Approach:
The KOMA-Script default name of TOC can be changed by calling
LATEX command \contentsname{newTOCname}.
Document Settings LaTeX Preamble, and type LATEX commands here:
Type the following commands:
\AtBeginDocument{
\renewcommand{\contentsname}{Table of Contents}
}

The command above works if you are in default language (English). If you use dierent language, for example English (UK),
then you need to use additional command:
\AtBeginDocument{
\addto\captionsbritish{
\renewcommand{\contentsname}{Table of Contents}
}
}

If you have dened in the previous example, and you want to


apply them altogether. The new denition can be just inserted.
\AtBeginDocument{
\renewcommand{\chaptername}{Module}
\renewcommand{\contentsname}{Table of Contents}
}

or if you are using dierent language setting


\AtBeginDocument{
\addto\captions<languagename>{

LyX_Book_Edit-090510 2010/9/5 17:05 page 65 #46

3.8. Customising Chapter Name, LOT, LOF

65

\renewcommand{\chaptername}{Module}
\renewcommand{\contentsname}{Table of Contents}
}
}

View pdf, you will see that the heading name of TOC has been
changed. It is now printed Table of Contents, which is what you
exactly want.
Example 3.18: Modifying heading names of LOF and LOT
Now you want to change heading names of LOF and LOT as well as
new denitions in the previous examples. The heading name of LOF
is List of Pictures and LOT is Tables.
Approach:
The names of LOF and LOT are associated with LATEX commands
\listfigurename{newLOFname}, and \listtablename{newTOTname},
respectively.
Document Settings LaTeX Preamble
Now you can insert the new commands into the preamble.
\renewcommand{\listfigurename}{List of Picture}
\renewcommand{\listtablename}{Tables}

Now your LATEX preamble is growing and will look like:

\date{}
\AtBeginDocument{
\renewcommand{\chaptername}{Module}
\renewcommand{\contentsname}{Table of Contents}
\renewcommand{\listfigurename}{List of Picture}
\renewcommand{\listtablename}{Tables}
}

View pdf and you can see the heading names of TOC, LOF and
LOT are printed in dierent names following your commands.
For customising other names (\figurename, \tablename,
\appendixname, \indexname, \bibname), you can do similarly
by redening the name under the brackets.

66

Step 3. Writing the Front-matter

3.9 Dening clear transition page


A general book design, two-sided document of book (KOMA-Script)
document class will be selected as already explained in Section 2.2. As
it is expected that every chapter starts at odd page. If the last page
of the previous page falls on odd page, a transition even page will be
generated automatically so the the next chapter will be exactly printed
on an odd page.
Although this transition page does not have any text, but header
and footer as well as page number will be all printed. Some authors do
not want header/footer/page number be printed in the transition page;
the transition page must be clean and empty without any information
printed. Since this transition page is actually a real page, the page
should be counted.
Example 3.19: Empty transition page but counted
The default transition page of two-sided book (KOMA-Script) is not
intended. Instead an empty (blank) page should be automatically generated in any transition page throughout the document. The transition
page should be also counted as a real page.
Approach:
To be able to automatically create a blank transition page globally, additional LATEX commands should be inserted in LATEX
preamble (Document Settings LaTeX Preamble):
\def\cleardoublepage{\clearpage
\if@twoside
\ifodd\c@page
\else
\hbox{}
\thispagestyle{empty}
\newpage
\if@twocolumn
\hbox{}
\newpage
\fi
\fi

LyX_Book_Edit-090510 2010/9/5 17:05 page 67 #47

3.9. Dening clear transition page

67

\fi}

Once the above codes have been written in the preamble, all
transition pages will be blank page but counted.

Potrebbero piacerti anche