LyX: Difference between revisions
From charlesreid1
| Line 16: | Line 16: | ||
== Layouts vs. Classes == | |||
== LyX Layouts == | ===LyX Layouts=== | ||
Layouts are ''specific to LyX''! They are '''not''' a LaTeX thing, they are a LyX thing. So, if you see something like <code>file.layout</code>, it is specifically for LyX. | |||
The layout file will instruct LyX as to how to format and display everything. It will control things like fonts, sizes, lines, headers, footers, etc etc etc. Layout files are almost NEVER provided by journals, because journals expect people to use LaTeX - not LyX! | |||
===LaTeX Classes=== | |||
Class files are for any LaTeX document. They do the same thing as a LyX layout file, except they do it for a LaTeX file. So, the class file controls things like fonts, sizes, lines, etc. for the LaTeX document. Class files are almost ALWAYS provided by journals, because journals expect people to use LaTeX when writing journal articles. | |||
===Umm..... what?=== | |||
While this is somewhat stupid and confusing, in addition to being COMPLETELY unclear from any webpage provided by LyX, it is a result of the fact that LyX speaks a "different language" than LaTeX. The way you tell LyX to "make the title bold" is different from the way you tell LaTeX to "make the title bold." | |||
However, there is still hope!!! But only if you have a LaTeX class that you would like to use from LyX (sorry folks, but using a layout in LaTeX is not do-able, you have to convert it by hand or search for an associated LaTeX class somewhere on the internet: try [http://wiki.lyx.org/Layouts/Layouts here]). | |||
== Creating LyX Layouts == | |||
[http://www.troubleshooters.com/linux/lyx/surefire_layout.htm Steve Litt's Sure Fire, No Fail Way to Create Lyx Layouts] | [http://www.troubleshooters.com/linux/lyx/surefire_layout.htm Steve Litt's Sure Fire, No Fail Way to Create Lyx Layouts] | ||
Additionally, brief instructions can be found here: [http://repository.icse.utah.edu/pubs/author_instructions.html ICSE Technical Reports: Author Guide] | Additionally, brief instructions can be found here: [http://repository.icse.utah.edu/pubs/author_instructions.html ICSE Technical Reports: Author Guide] | ||
== Determining where LyX Data Directory is == | == Determining where LyX Data Directory is == | ||
Open LyX, click LyX > About LyX, and look for the "User Directory". This is the directory where all data (bind files, UI files, layouts, etc.) should go. | Open LyX, click LyX > About LyX, and look for the "User Directory". This is the directory where all data (bind files, UI files, layouts, etc.) should go. | ||
== Bind File == | == Bind File == | ||
Revision as of 05:23, 26 January 2011
LyX is a WYSIWYM (What You See Is What You Mean) LaTeX editor. The homepage is at http://www.lyx.org.
Tips and Tricks
Compiling a Document With Multiple Files
As documents grow larger, it is much more convenient to split these documents up into multiple LyX files. These can be combined into a single document by creating a "master" LyX file, which includes each LyX file. This master file typically contains any macros along with the table of contents, includes each chapter or file, any appendices, and finally, the bibliography.
Each chapter can be edited individually, but if macros are defined in the master document, they will be broken if the LyX file for that chapter is opened alone. In order to fix this, open the master document - this should immediately fix the broken macros.
Customizing LyX
Layouts vs. Classes
LyX Layouts
Layouts are specific to LyX! They are not a LaTeX thing, they are a LyX thing. So, if you see something like file.layout, it is specifically for LyX.
The layout file will instruct LyX as to how to format and display everything. It will control things like fonts, sizes, lines, headers, footers, etc etc etc. Layout files are almost NEVER provided by journals, because journals expect people to use LaTeX - not LyX!
LaTeX Classes
Class files are for any LaTeX document. They do the same thing as a LyX layout file, except they do it for a LaTeX file. So, the class file controls things like fonts, sizes, lines, etc. for the LaTeX document. Class files are almost ALWAYS provided by journals, because journals expect people to use LaTeX when writing journal articles.
Umm..... what?
While this is somewhat stupid and confusing, in addition to being COMPLETELY unclear from any webpage provided by LyX, it is a result of the fact that LyX speaks a "different language" than LaTeX. The way you tell LyX to "make the title bold" is different from the way you tell LaTeX to "make the title bold."
However, there is still hope!!! But only if you have a LaTeX class that you would like to use from LyX (sorry folks, but using a layout in LaTeX is not do-able, you have to convert it by hand or search for an associated LaTeX class somewhere on the internet: try here).
Creating LyX Layouts
Steve Litt's Sure Fire, No Fail Way to Create Lyx Layouts
Additionally, brief instructions can be found here: ICSE Technical Reports: Author Guide
Determining where LyX Data Directory is
Open LyX, click LyX > About LyX, and look for the "User Directory". This is the directory where all data (bind files, UI files, layouts, etc.) should go.
Bind File
The bind file, located at /Path/To/LyX/Data/Directory/bind, can be used to define or re-define keyboard shortcuts. Some customizations that I have made in my LyX bind file are included here:
# cmd + shift + M insert numbered formula \bind "C-S-M" "command-sequence math-display; math-number-toggle" # cmd + shift + E = insert non-numbered formula \bind "C-S-E" "command-sequence math-display;" # cmd + shift + n = nomenclature insert \bind "C-S-N" "nomencl-insert" # cmd + shift + r = insert cross-reference \bind "C-S-R" "dialog-show-new-inset ref" # cmd + shift + c = insert citation \bind "C-S-C" "dialog-show-new-inset citation" # cmd + shift + L = insert label \bind "C-S-L" "label-insert" # command-delete + r = delete row \bind "C-Delete R" "tabular-feature delete-row" # command-delete + c = delete column \bind "C-Delete C" "tabular-feature delete-column" # option-N = insert note \bind "M-N" "note-insert" \bind "C-n" "buffer-new" # reassigned... see above #\bind "C-S-N" "buffer-new-template" \bind "C-M-b" "font-boldsymbol" \bind "C-b" "font-bold" \bind "C-e" "font-emph" \bind "C-k" "font-noun" # 'k' for capitals \bind "C-u" "font-underline" \bind "C-S-P" "font-typewriter" # 'P' for program ***** \bind "C-m" "math-mode"