Categories:
Compatibility,
MSWord,
Installation,
Installation,
ERT,
FAQ,
Numbering,
FAQ,
FAQ,
Appendix,
Tag me,
label,
equation label,
FAQ,
tip,
page numbering,
appendix,
Miscellaneous << | Page list | >>
One page including all pages with Frequently Asked Questions
This page is intended to help you look at, and search in, all the text
of the frequently asked questions. In order to actually edit the
contents, you will have to go to the corresponding FAQ-page.
Please note that not all pages in the FAQ-group are actually
included below. For example, these pages are not included at the
moment: FAQ.Qt, ImportFromSubdir, FiguresSideBySide,
MultipleAuthors. The PageList should contain a list of all pages
in this group.
Links to the sections below
(from Introduction)
(:sectionedit FAQ.Introduction FAQ.AllPages:)
Introduction and general information
Table of contents
- What is LyX?
- That's fine, but is it useful?
- Where do I start?
- Does LyX run on my computer?
- How much hard disk space does LyX need?
- Is LyX Open Source?
- 6.1 Internet Resources
- Where should I look on the World Wide Web for LyX stuff?
- Where can I get LyX material by FTP?
- What mailing lists are there?
- 9.1 Compatibility with other word/document processors
- Can I read/write LaTeX files?
- Can I read/write Word files?
- Can I read/write HTML files?
- 12.1 Obtaining and compiling LyX
- What do I need for compilation?
- How do I compile it?
- I hate compiling. Where are precompiled binaries?
- Known problems
- Other dependencies
- 17.1 Questions about Evil Red Text
- What is Evil Red Text (aka ERT)?
- How do I enter Evil Red Text?
- The new ERT inset is really inconvenient!
- Is there an alternative?
- Hints about using ERT
- 22.1 Questions related to using LyX
- General questions
- Figure related questions
- Math related questions
- Table related questions
- 26.1 LyX does not display math fonts/greek letters properly
- 26.2 How do I convert LyX files to LaTeX from the command line?
- 26.3 How do I create PDF files from my LyX document?
- 26.4 Why do the fonts in my document look so bad in acroread ?
- 26.5 Why doesn't my latest and greatest version of Ghostscript render EPS inline figures properly?
- 26.6 The menu displays strange characters like ü or ö. What's that?
- 26.7 The spellchecker doesn't recognize accented characters or umlauts
- 26.8 Questions Related to LyX on Windows
- How can I use LyX in Windows?
- 27.1 How to get further assistance
- You still haven't answered my question!
- I want to mail someone about my problem.
- What to put in a request for help.
- 30.1 This is FAQ.Unsorted with new questions and answers.
- How can I start an appendix?
- How can I deactivate (not include) the package
babel? - How can I remove the page number from the first page?
- How can I start page numbering on a different page?
- How are the book margins (inner v.s. outer) related?
- preamble is used in a multipart document?
- is the difference between
input and include? - can I find more LaTeX classes?
- How can I put text over/on top of an image?
- How can I make the whole document ragged right?
- How can I write the symbol for the set of real numbers?
- is the content of the directory
$HOME/.lyx - can I find information about creating LyX layout-files?
- How can I change the apperance of limits in integrals etc?
- How can I get Bibliography, Lists of Figures/Tables and Appendix to appear in the table of contents (TOC)?
- How do I rename the fixed strings like Abstract, Bibliography etc.?
- I'm using Qt and the math fonts look ugly, what can I do?
- math fonts — the LaTeX code is shown instead of the mathematical symbols?
- Where can I find answers and questions about LyX and PDF ?
- What are the units in LyX?
- How can I remove section and subsection numbering in the output?
- How can I remove section and subsection numbering in the output, but still have the sections appear in the table of contents?
- How do I remove the date from below the title?
- How do I avoid hyphenation?
- Is this FAQ supposed to compete with Herbert's pages?
- Where can I find an example of how to structure my thesis as a multipart document?
- Can LyX import files from subdirectories, especially with multipart documents?
- Where can I find information/discussion about notes and comments in LyX ?
- How do I convert a .ps-file to .eps?
- How can I insert two figure floats side-by-side in a one-column article?
- When using a bibliography with a multipart document, I can't cite references in other files
- How do I find out what keyboard shortcuts or keyboard bindings I am using?
- How do I add additional entries to the table of contens (TOC) ?
- How can I get two or more lines of text inside a table cell?
- How do I put four pages (A6 size) onto one page (A4)?
- How do I print A5 booklets?
- How do I reduce the vertical space in itemize and enumerate listings ?
- How can I give an (LaTeX) argument to an item in a list?
- How can I make Acrobat Reader (acroread) update its display?
- How can I make gv/Ghostview automatically update its display?
- Where can I find information about LyX and fonts?
- How does font size correspond to point size?
- How to write two authors for a two column article, with each author centered
- I'm only using sections, but they show as 0.1, 0.2 etc. How can I fix this?
- How to find out the LaTeX definition of a command
- How can I put crop markings on a page?
- Someone wants me to use the paperformat S5 or G5, what's that?
- I have a problem with a missing LaTeX class (.cls) or style (.sty), how can I find out more?
- How can I make a shaded box with a line around it?
- How can I (using latex) change the default font, or fonts in section headers or captions?
- How can I debug layout files more efficiently?
- What are your "Frequently Used Shortcuts" ?
- How can I add a matrix to a math expression without using the math-panel?
- How can I check if LyX uses my fonts?
- How can I remove an equation label?
- How can I stack math symbols? I want one symbol on top of the other.
- How can I change the font-size of my quotations?
- How can I set an unusual font size such as 10.5pt or 13 pt?
- How can I get an empty pagestyle on a page where I have a big float?
- Someone talked about an lfun, what is that?
- How can I change the date format?
- How can I include other documents into a multi-part document so that do NOT start on a new page?
- How can put have text (e.g. itemized list) with a frame around it?
- How can I add a small space?
- How can I restrict float placement to within a region?
- How can change the order of layouts in the drop-down list? Sort layouts alphabetically in style list?
- Where can I find examples of keyboard macros, or command-sequences?
- How can I typeset units? (SI units for instance)
- How can I write an inline formula (inline math) in the style of a display formula (bigger symbols etc?)
- How to configure LaTeX for use with LyX
- What should I think about when posting to the mailing lists?
- Are there more layouts out there?
- Is there an alternative binding for C-Tab?
- How can I create a floating figure with a centered image?
- How can I center an image in a float or a table in a float?
- How do I center an image that's too big horizontally?
- How can I use a caption with a longtable?
- Why are footnotes in tables not working?
- Why is the default paper size letter?
- How can I add "invisible" vertical and/or horizontal distances
- How can I set the starting number for a chapter or a section?
- How can I set the number for an enumerated list?
- How can I set the starting number of an enumerated list?
- How can I change the type of counter used in an enumerated list?
- How can I pack all my files that are included in a LyX document ?
- How can I write a Gantt chart, i.e. a timeline table with some horizontal bars?
- How can I add a tag/comment/note etc to a display equation?
- What does blue underlined text mean? text underlined in blue
- How can I set the length of automatic line wrapping when exporting as ascii file?
- How can I add a figure to a page/letter head?
- How can I specify the name of a theorem, definition etc?
- does the filename of the exported .tex/ps/pdf differ from the filename of my .lyx-file?
- How can I add options for Babel in Format-->Document-->Preamble
- How do I get
enumerate to number all examples in a text sequentially?- 124.1 Categories
- 124.2 Unanswered questions
- I've got TeXinfo document source. How can I convert this into LyX format ?
- How do I complete a word?
- How do I submit a patch against a
.lyx file? - How do I let other people i18n my lyx document without them having to play directly with the source/structure of the document?
- How do I use Latin numbering for the first pages (content, list of figures,...)
- I would like to use lyx in a console window (with text "GUI" like ncurses) when there is no X-Server available for some reasons. Is that possible?
§ What is LyX?
LyX is a program that provides a more modern approach to writing documents with a computer, an approach that breaks with the obsolete tradition of the "typewriter concept." It is designed for authors who want professional output quickly with a minimum of effort 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 her writing.
LyX provides an "almost-WYSIWYG" view of the document. "Almost" means that the line- and page-breaks are not displayed exactly as they will appear in the printed document. However, that's not really necessary, since LyX uses a separate typesetter program (called LaTeX) to perform the final formatting of your text. While LyX contains everything it needs to be a comfortable user interface, the typesetting program contains everything necessary to format text, and do so very, very well.
So, line- and page-breaks aren't your problem anymore. Remembering which number to use for the next subsection isn't your problem anymore. Recalling what font you used for all of your section headings isn't your problem anymore. You tell LyX (and LaTeX) what kind of document you're editing and what type of paragraph this-or-that text is, the computer can typeset it accordingly. Of course you can also still do some low-level formatting for fine-tuning. However, the proper way with LyX is to tell the computer what the text is, not what it should look like. So, we like to say that LyX gives you WYSIWYM editing (What You See Is What You Mean).
§That's fine, but is it useful?
Absolutely. The following type of documents have been produced with LyX:
- Memos
- Letters
- Dissertations (260 pages in a single document, longer using include files)
- Lecture notes (133 pages, 27 figures on a 33 MHz 486 machine!)
- Seminar notebooks (500+ pages)
- Conference proceedings (Proceedings of the Second Continental Workshop on the Geoid in Europe, (Finnish Geodetic Institute Report 98:4), 292 pages)
- Software Documentation (the LyX User Guide is about 120 pages)
- Books
- see [2] for an example on PostgreSQL
- Donnay, J-P., Barnsley, M.J., and Longley, P.A., eds., 2001, Remote Sensing and Urban Analysis (Taylor and Francis: London).
- Herbert Voss: Praktische Kryptologie mit Java 286 pages, lots of equations, tables, figures. ISBN 3-8311-1458-7
- Yann Collette and Patrick Siarry, Optimisation multiobjectifs, 2002, Eyrolles
- Johann Dréo and Alain Pétrowsky and Eric Taillard and Patrick Siarry, Métaheuristiques pour l'optimisation difficile, 2003, Eyrolles
- Papers published in the following refereed journals:
- Astronomy & Astrophysics (Suetterlin, P. 1998, A&A, 333, 305; Suetterlin, P. & Wiehr, E. 1998, A&A, 336, 367)
- Astronomical Journal (Ressler, M. E. & Barsony, M. 2001, AJ, 121, 1098)
- Novels (400+ page novel due out in September 2000; an 836 page novel is currently with an agent)
- Scripts for plays and movies
- Business proposals for > $1 M (US)
§Where do I start?
The website [3] is the first place to go for anything related to LyX. News, examples, downloads, and lots of other stuff is available there. After you have installed LyX and started it the first time, read the Tutorial (Help->Tutorial). Yes, I really mean that.
Another basic introductory guide may be found at [4]
§Does LyX run on my computer?
There are two versions of LyX: The Qt- and the XForms-version.
You can run LyX-Qt under KDE or as Qt-application. LyX-Qt is also available as a native Windows program.
For LyX-XForms you need to have the X-Window system (x-server). LyX-XForms OS/2 and Win32 ports exist, but you need to have an Xserver installed and running on these systems.
LyX is known to run on the following platforms:
- Linux: e.g. RedHat, SUSE, Mandrake
- Windows
- SparcLinux
- Sun Solaris
- Tru64 Unix
- HP-UX
- OSF1 flore V4.0 1091 alpha
§How much hard disk space does LyX need?
The LyX binary consumes about 2.0 MB of disk space, while the supporting files occupy another 12.6 MB (9.1 MB of which is consumed by the docs! You can delete the languages you don't care about to save some space). Of course, you do need to have a LaTeX-compiler, e.g. teTeX or MikTeX, installed. This consumes about 115 MB, as well as ghostscript, which is another 10 MB!
§Is LyX Open Source?
Yes. LyX is distributed under the GNU GPL, with an explicit exception
for versions of the XForms library earlier than 1.0.
XForms 1.x is also open source, released under the GNU LGPL.
from Internet)
(:sectionedit FAQ.Internet FAQ.AllPages:)
§Internet Resources
§ Where should I look on the World Wide Web for LyX stuff?
§ Where can I get LyX material by FTP?
§ What mailing lists are there?
- lyx-announce@lists.lyx.org (very low volume), for announcements related to LyX
- lyx-users@lists.lyx.org (medium volume), for general usage issues
- lyx-devel@lists.lyx.org (high volume), for development and debugging issues
- lyx-docs@lists.lyx.org (excruciatingly low volume), for documentation issues
Generally, you would send email to lyx-foo-subscribe@lists.lyx.org to subscribe to these lists or to lyx-foo-unsubscribe@lists.lyx.org to unsubscribe, where "foo" is one of "announce", "users", "devel", or "docs"; definitely see [5] for the full details.
Are the mailing lists archived anywhere?
Yes. :-)
Okay, wise guy! Where are they archived?
(from Compatibility)
(:sectionedit FAQ.Compatibility FAQ.AllPages:)
§Compatibility with other word/document processors
Don't forget to check Herbert's pages about converters.
§ Can I read/write LaTeX files?
Yes. LyX outputs LaTeX files that are either machine or human friendly. The reLyX program that comes with LyX does a decent job of converting LaTeX into LyX. It's not perfect, but it will usually get at least 95% of the job done for you.
A guide on how to import LaTeX documents from Scientific Word/Scientific Workplace is here: ImportingFromSWP
Compatibility
§ Can I read/write Word files?
Not trivially. People have had some level of success with the following sequence: LyX->LaTeX->RTF->Word, and vice versa. However, Word is inherently not a markup language like LyX and LaTeX, so conversions are usually difficult and almost meaningless.
The available converters and half-measures change rapidly. Remember to search the user's mail list, for instance at [11].
However, here are a few suggestions which were sent in:
- word2x produces LaTeX, HTML and plain text output. The LaTeX is importable in principle (and is rather clean) but I often prefer plain text and add the formatting back in. (This requires that you have knowledge on the original formatting). On last writing did not yet handle Office 2000 Word.
- wvware (found at http://wvware.sourceforge.net/, or the abisource CVS repository for the latest). This was previously called msWordView. Very good, only tends to produce visually formatted LaTeX/HTML. Is however highly configurable: a config file wvLaTeX.xml guides the translation process. Handles also the newest Office formats.
- Writer2LaTeX, a tool that converts OpenOffice (sxw, odt, etc.) files to LaTeX files, is also worth a try. Since late 2006 it has been built into OpenOffice under File -> Export; thus OpenOffice, NeoOffice etc. can operate as a Word-->OO-->Latex converter - if perhaps a somewhat bloated one! The preferences in writer2latex.xml are easily adjusted, whether it is used with OO or not; see the user's manual at the Writer2LaTeX site. For the opposite way, LyX/LaTeX->sxw, there's TeX4ht, which does a pretty good job.
- Ted This is the editor to use when someone sends you an RTF file created by Word. Fine product. Mail yourself the converted version (plain text or HTML).
- Daniel Goldin suggests using: antiword file.doc > file.txt. Then import text file into lyx and do the rest by hand. I've found that wv often turns windows tables to gibberish. Antiword produces nice text and keeps the paragraph formatting.
- Paul Johnson <pauljohn@ku.edu> notes that Abiword (the free word processor) has LaTeX export. Try that!
- Paul Johnson notes that the MS Word addon program word2tex can be purchased (or downloaded in demo format) from http://www.adeptscience.co.uk/products/utilities/word2tex/. This works very well for most test cases. Documents that include math display equations may need a lot of hand-editing after conversion.
- As word format is difficult to handle, an option is to use a MSWord macro that will probably be best to understand the Word document structure. Try the (still beta) Word2Lyx Macro?
Finally, when all else fails, use any word processor (WordPerfect, StarOffice, ...) which understands Word. Then export as the file as plain text and add the formatting by hand in LyX. For me personally, at least, it's faster doing this than cleaning up attempts at a conversion, though it is certainly unsatisfactory if you need to go back and forth a lot.
MSWord
§ Can I read/write HTML files?
You can output HTML files using the "tth" converter program, amongst others. There may be a HTML->LaTeX program available which allows you to convert the other direction.
(from Obtaining)
(:sectionedit FAQ.Obtaining FAQ.AllPages:)
§Obtaining and compiling LyX
§ What do I need for compilation?
- LyX source code: lyx-1.x.x.tar.gz
- QT library: (using the latest version available is recommended) xforms is
no longer used.
- A modern C++ compiler. If you are using gcc, LyX requires at least version 2.95.2. The development version LyX 1.4-cvs requires a modern STL library. You can either use gcc 3.x, or if you have to use gcc 2.95, you can build LyX with http://www.stlport.org/
Installation
§ How do I compile it?
- ./configure
- make
- make install (usually as root, though you don't have to be if you add flags to the configure command)
See the INSTALL file for more details.
§ I hate compiling. Where are precompiled binaries?
For Windows, see the Windows pages on this wiki.
Linux users should first check if LyX comes with their distribution. Look here.
Debian, Ubuntu and Ark Linux users can simply apt-get install lyx.
Most of the above packages are available as precompiled binaries. LyX binaries may be obtained from [12] or [13].
Installation
§ Known problems
§ Other dependencies
Except compilation dependencies you need other packages to have LyX working properly. Look here.
(from ERT)
(:sectionedit FAQ.ERT FAQ.AllPages:)
§Questions about Evil Red Text
§What is Evil Red Text (aka ERT)?
The acronym ERT (Evil Red Text) refers to raw LaTeX commands inserted into the body of your LyX document. In historical versions of LyX, ERT appeared in the user interface alongside regular text as red characters.
"ERT" was coined on the developers mailing list by Larry Marso, who advocated an embedded raw LaTeX inset to hide raw LaTeX, and thus, to present a cleaner LyX user interface for complex documents. (see "A Brief History of ERT", LDN, March 15, 2000).
Finally, several years later, an ERT inset was included.
With its long history of popular usage by the LyX community, the term "ERT" seems to have stuck as a description of raw LaTeX.
§How do I enter Evil Red Text?
Aesthetic arguments aside, many of the answers in this FAQ require that you use ERT, so whenever we say "insert the following LaTeX code", do the following
- Click the TeX toolbar button or select Insert->TeX.
- Type the command as it is written in the normal way
§The new ERT inset is really inconvenient!
A lot of people have been complaining about the ERT inset introduced in version 1.2.0. However, since there is little hope of to see the old LaTeX font return from the grave (it was really a hack), here are a couple of things to ponder:
- You can collapse the ERT like any other floats by using Edit->Open/Close float (bound to C-i by default)
- You can also set it to "inlined" by using the properties dialog obtained by right-clicking anywhere in the inset
§Is there an alternative?
LaTeX commands can also be inserted in the "LaTeX Preamble", a form in LyX that is inserted verbatim into the LaTeX file which is generated during processing. This is especially useful for including nonstandard LaTeX packages, defining global shortcuts to be used within the document, etc.
§Hints about using ERT
- As they told us on the users mailing list, relative paths (e.g. to graphics files) in ERT may cause problems. (Depending on where Lyx will process the main file, e.g. whether in a temp directory or not, I guess.)
ERT
(from Using)
(:sectionedit FAQ.Using FAQ.AllPages:)
§Questions related to using LyX
In this section, we attempt to address the truly most frequently asked questions. For a broader range of not-so-frequently asked questions and many "how do I?" topics, see Herbert Voss' spectacular collection at [14] (this page no longer exists; it appears to have been replaced at [15], but this seems LaTeX, not LyX specific). You are doing yourself a large disservice if you don't check there before sending a message to the mailing lists!
§ General questions
§ How do I get rid of the date under the title?
The simplest solution is to open the menu Layout->Preamble and add the line
\date{ }
in the preamble window.
(Note: In version 1.4.2, the preamble window can be found in Document->Settings...->LaTeX Preamble.)
How do I change the spacing in an Itemize/Enumerate/Description list environment?
For individual lists, you'll have to do this by hand: for example, for one particular list, you can add the following LaTeX code at the beginning of the list:
\setlength{\itemsep}{0mm}
If you want to change the appearance of lists globally, look here
Equation numbering doesn't work. Help?
To number an equation, use Insert -> Math -> Display formula (Shift+Ctrl+M). Make sure you are not using inline formulas. Place the equation on a paragraph of its own, and then insert a label (Insert -> Label) inside the blue box of the equation.
How do I number equations by section?
Add the following two lines to your LaTeX preamble:
\@addtoreset{equation}{section}
\renewcommand{\theequation}{\thesection.\arabic{equation}}
How do I number equations globally?
Try the Covington package, or define your own counter in LaTeX.
Is it possible to do this for figures and tables as well?
Replace the phrase \theequation with \thetable or \thefigure and then replace equation with table or figure. Don't forget to adapt the \@addtoreset command, too.
How do I change to footnote numbers to symbols (star, dagger, etc.)?
Add \renewcommand{\thefootnote}{\fnsymbol{footnote}} to your LaTeX preamble.
How do I kill widows and orphans?
Okay, we are not playing Duke Nukem here! To eliminate widows and orphans (first line from a paragraph at the bottom of the page and the last line from a paragraph at the top of the page), add the following to the LaTeX preamble:
\widowpenalty=10000
\clubpenalty=10000
and perhaps
\raggedbottom
How do I get a formatted list which starts with e.g. 1. a)?
If you want a list which looks like
1. a) First alternative
b) Second alternative
c) Third alternative
then try the following
1. {}
a) First alternative
b) Second alternative
c) Third
where {} is in ERT (i.e. a placeholder not generating output. Specifically, set the style to "enumerate", enter the brackets in ERT, change the environment depth, and add the three elements. LyX will auto-label the entries.
How do I count words in LyX?
LyX 1.4: Select Tools->Word Count to count the words of the whole document or of a given selection.
LyX < 1.4:
Run a spellcheck; it will display the total number of words checked. Make sure the cursor is at the top of the document when you start the spellchecker so that everything is counted.
Alternative 1 (in *nix): Export as text and run 'wc'. You can do this in one step by exporting as 'custom' (text-format) and piping the result to 'wc'. I think you use File->Export->Custom, but I'm not able to check this right now. /Christian
Alternative 2: See http://www.ctan.org/tex-archive/macros/latex/contrib/wordcount/ where you can find a shell-script that counts the words in a .tex-file. In principle, you should be able to define a special export format which calls this script on an exported .tex-file.
How do I insert a fixed amount of horizontal space?
LaTeX offers a range of predefined horizontal spaces: \enspace (1/2 em), \thinspace (1/6 em), \negthinspace (-1/6 em), \quad (1 em), \qquad (2 em), etc. An "em" is roughly the width of the letter "m" in the current font.
LyX 1.4 supports all these natively. You can insert them via the minibuffer, i.e. with the shortcut M-x space-insert <spacetype>, where <spacetype> is the LaTeX command without the backslash.
With LyX < 1.4, you have to insert the LaTeX commands with ERT.
For customized lengths, LaTeX has the \hspace command, which takes any valid TeX length as its argument; units can be mm (millimeters), cm (centimeters), in (inches), pt (points = 1/72 inch), em (width of letter "m"), or ex (height of letter "x"). Examples: \hspace{1in}, \hspace{2.5em}, etc. This is not yet supported natively by LyX. You have to use ERT.
How can I make citations show up as [1,2,3,6] or [1-3,6] rather than [1][2][3][6]?
Insert \usepackage{cite} into the LaTeX preamble. Most LaTeX distributions should have this package included. LyX supports this package, if you insert multiple citations separated by commas into the citation dialog, e. g. [Smalley_JCP,Jarrold_Sci], instead of just one citation after the other: [Smalley_JCP] [Jarrold_Sci].
How do I change the colour of the output of sections, subsections etc.?
How to colour a document: (add this to the preamble of your document)
\usepackage{color}
\let\mySection\section
\renewcommand\section[1]{%
\textcolor{green}{\mySection{#1}}%
This particular one would colour all sections green in the output, just replace the \section with \subsection or any other type and you can change the colour.
This tip was orginally given to me on the LyX Users group by Herbert Voss.
How do I get a superscript/subscript in the text?
From LyX-1.3.x onwards there should be the menu item
Insert->Special character->Superscript.
In older versions, insert an in-line math formula, enter it and insert
a superscript inset (by typing the "hat" symbol, possibly followed by
a blank) and then type the text of your superscript.
Unfortunately there is only a math super/subscript, to be used also in non-math text.
N.B.: for text superscripts, you should use ERT and \textsuperscript{text}, because the math superscript does not look good in normal text. Some document classes (e.g. KOMA) also have a \textsubscript. If yours doesn't, you can define one in the preamble:
\DeclareRobustCommand*\textsubscript[1]{%
\@textsubscript{\selectfont#1}}
\newcommand{\@textsubscript}[1]{%
{\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
§Figure related questions
What is the difference between a "figure" and a "figure float"?
This is an example of less-than-ideal terminology. "Figure" is what I would really call a "graphic"; it basically means insert a picture file. "Figure float" is more what one means by a figure in a paper: it includes the graphic, the caption, the figure label, etc. You should almost always insert a figure float first, then put a figure inside that.
Tables work in the same manner. Put a table float in first, then insert the table within that.
How do I get LyX to put the figure exactly where I want it?
Select Layout->Document. In the Float Placement box, type "!htp". This tells LaTeX to try really hard to put the figure here first, then the top of a page, then on a page by itself. This is a global setting: all figure will then obey this rule set.
If you want to control how each figure behaves, right-click in the figure float and you will get a dialog allowing to control the figure behavior.
What does "Too many unprocessed floats" mean?
LaTeX can handle only a limited number of floating elements floating at a given time. For example, if Figure 4 can't be fit in a good location (using the default rules of top of the page, then bottom, then a page of its own) and Figure 5 comes along, they will both continue to float toward the end of the document until a good location can be found. If nothing good turns up, they will just be placed at the end of the document. If there are too many of these, LaTeX overruns a counter and emits the "too many unprocessed floats" error. This is not a bug in LaTeX, this is simply too many figures with too little text :-)
The easiest way to work around this is to insert a \clearpage command somewhere in the document where a pagebreak would be appropriate. While a pagebreak would simply start a new page, \clearpage processes all remaining floats, then begins a new page. This may lead to an unsightly stack of figures in the middle of your document; you may need to use several \clearpages to make things balance nicely.
§Math related questions
How do I put normal text inside a mathematical equation?
Type "M-m m" while inside the equation to enter "math text mode".
How do I make a cube root (or higher)?
Type "M-m r" to insert a nifty "root box". Use the cursor keys to navigate the entry boxes.
§Table related questions
How do I put a multiline text in a table cell?
There are several ways, and the one you should use depends on what you need to do exactly.
- Select a width to the column, and then you can use ctrl+enter (line break) in that column.
- Like above, but select a width only to a single cell in the column, by clicking the "multi column" button for that cell and then setting the width.
- Write the text in two more more consecutive vertical cells. You can disable the lines between the cells by making the cells multi-column, and then disable the lines you don't need.
FAQ Numbering
(from Running)
(:sectionedit FAQ.Running FAQ.AllPages:)
Questions Related to Running LyX
§ LyX does not display math fonts/greek letters properly
See Qt.
§ How do I convert LyX files to LaTeX from the command line?
File export was vastly improved in version 1.1.6. Simply say
lyx --export latex <yourfile>.lyx
and that is all you need to do.
If you have an older version of LyX, you can use the same syntax if you are running X, because it will cause LyX windows to pop up onto your screen. If you have the Xvfb command available, you can resort to a deeper level of subterfuge (under bash):
(Xvfb :1 -once -terminate &); rm <file>.tex; lyx -display :1 --export latex <file>.lyx
Under csh/tcsh it is simply:
Xvfb :1 -once -terminate &; rm <file>.tex; lyx -display :1 --export latex <file>.lyx
This should work anywhere, whether or not X is actually running.
§ How do I create PDF files from my LyX document?
Read Section 5.3.6 of the Extended Features manual.
§ Why do the fonts in my document look so bad in acroread ?
The problem and the solution are also discussed in Section 5.3.6 of the Extended Features manual.
§ Why doesn't my latest and greatest version of Ghostscript render EPS inline figures properly?
[Note: this only applies to versions of LyX older than 1.2.0, since the graphics rendering code has been rewritten in this version]
A couple of users reported that they couldn't get recent Ghostscript versions to display inline figures in LyX. It transpires that this is a Ghostscript bug.
This bug appears to affect Ghostscript 6.22 and upwards. After applying the above mentioned patch, rendering in Lyx works fine again. GNU Ghostscript 6.53 and above include this fix.
§The menu displays strange characters like ü or ö. What's that?
Problem: You are running LyX (up to 1.4.x) on system which uses the unicode encoding. However, LyX cannot deal with this new encoding internally (this will change with version 1.5.0). As of LyX 1.4.0, LyX automatically switches to the appropriate encoding (except for the spellchecker, see below). A prerequisite for this to work, however, is that you have installed those old encodings (like latin1, for instance), besides unicode. If you haven't, you get the above error.
Solution: Install the appropriate encoding. The procedure depends on which distribution you are using.
- For debian/(k)ubuntu, follow the recipe given here:
§The spellchecker doesn't recognize accented characters or umlauts
Problem: See above. Additionally, the automatic switch to the appropriate encoding does not work for the spellchecker.
Solution: Start LyX from the command line with the correct encoding. For German, this would be
de_DE lyx
(Category: FAQ)
(from Windows)
(:sectionedit FAQ.Windows FAQ.AllPages:)
§Questions Related to LyX on Windows
§How can I use LyX in Windows?
Go to the Windows pages on this wiki where you'll find pages describing how to install the latest and greatest version of LyX on Windows.
(from FurtherHelp)
(:sectionedit FAQ.FurtherHelp FAQ.AllPages:)
§How to get further assistance
§ You still haven't answered my question!
Then RTFM, especially the Tutorial. The documentation really is quite good. (Besides, I helped write parts of it :-)
If you think your problem may be LaTeX related, then look in LaTeX, A Document Preparation System, 2nd Ed. by Leslie Lamport (1994).
There are also numerous example files included with LyX. Try File->Open->Examples.
Furthermore, for LaTeX related questions, there is an excellent newsgroup comp.text.tex, which is archived ([16]). There are also numerous LaTeX FAQ's and other resources on the web (e.g. http://faq.tug.org). For LyX related questions, a search in the lyx-users or lyx-devel mail archieves is often helpful, also remember that google is your friend (TM).
BTW, did I mention Herbert's excellent LyX Tips pages?
§ I want to mail someone about my problem.
Send email to the LyX Users list lyx-users@lists.lyx.org. If LyX is actually crashing or otherwise non-functional, then try the developers' list at lyx-devel@lists.lyx.org.
§ What to put in a request for help.
Include your version of LyX and a description of what you are trying to do, along with evidence that you've actually read the docs.
If LyX has crashed, include the version of LyX, the operating system, the frontend (xforms, qt), the version of the frontend toolkit* (if it seems to be a screen drawing problem), and a precise description of the events that lead to the crash. The easier it is for the developers to reproduce your crash, the more likely it will get fixed. If you're brave and like to hack, use gdb to generate a backtrace and include the results with your mail. If you have no clue what I'm talking about, just describe what you did as completely as you can.
- typing lyx --version in a terminal will give you most of these informations.
FAQ
(from Formalia)
-include:FAQ.Formalia? =]
(from Unsorted)
(:sectionedit FAQ.Unsorted FAQ.AllPages:)
§This is FAQ.Unsorted with new questions and answers.
This page contains questions that have not been sorted into categories yet. Since this page is getting a bit big, please add new unsorted questions to FAQ.Unsorted1.
§§ How can I start an appendix?
I want the chapters/sections after a point to be appendices, how can I do this?
Appendix
Simple, put the cursor on the first chapter/section you want to be an appendix and select: Document→Start Appendix Here.
§§ How can I deactivate (not include) the package babel?
The package babel is automatically included by LyX, but by
deselecting Edit→Preferences→Language→Use babel
it will not be included. Alternatively, you can change the
setting Edit→Preferences→Language→Language package
to do something else, e.g. \usepackage{betababel}.
§§ How can I remove the page number from the first page?
Add \thispagestyle{empty} in the beginning, see no page number on first page for an example.
§How can I start page numbering on a different page?
Add \setcounter{page}{-1} or whatever you need in the preamble and suppress negative page numbers with \thispagestyle{empty} on those pages. If you need to suppress page numbers on several pages, e.g. in case of a TOC with more than one page, you might want to start with \pagestyle{empty} and start numbering again with \pagestyle{plain} or \pagestyle{fancy} depending on what kind of pagestyle you wanted to use in your document.
§§ How are the book margins (inner v.s. outer) related?
Or, "why are the outer margins bigger than the inner margins?". Herbert's explains that the inner margins together should have the same size as one outer margin, e.g.
| 4cm |xxxxxxxxxxxx|2cm|2cm|xxxxxxxxxxxx| 4cm |
Note: Using the KOMA book class, the binding correction is set using the variable BCOR.
§§Which preamble is used in a multipart document?
In general, for a multipart document, only the preamble from the
master document will be used when you compile it. Only when/if you
compile a slave document separately will the preamble of that document
be used.
§§What is the difference between input and include?
With both input and include you can include a child document (e.g. a chapter of your book).
However, they differ in some respects, have some advantages and disadvantages:
- Differences
include starts a new page, input does not. This might be an advantage in some cases, a disadvantage in others.
- Advantages of
include
- you can use the command \includeonly{file1,file2,...} in the preamble to let LyX only output selected child documents, while keeping the correct page numbers and references. However, you need to output the whole thing once for this to work correctly.
- Advantages of
input
- you can input a document into and inputted document. An included document cannot contain another included document.
§§Where can I find more LaTeX classes?
By far the largest collection of LaTeX classes and tools is to be found on the Comprehensive TeX Archive Network (CTAN).
The TeXLive distribution features all classes available from CTAN, see LatexTips:texlive.
§§ How can I put text over/on top of an image?
See LatexTips:misc/overwrite#picture and PS-tricks.
§§ How can I make the whole document ragged right?
From LyxUsersPost:14677: Quick'n dirty — use \raggedright, and if you want it for a limited area, begin the area with \raggedright{ and end it with }.
A more elegant solution (better quality and also hyphenation): \usepackage{ragged2e} in preamble and \RaggedRight (with capitals) at the beginning of the document.
§§ How can I write the symbol for the set of real numbers?
In math mode, write \mathbb to get 'blackboard' font and then type 'R'. Or use the Math panel and look at the Symbols→Miscellanous.
§§What is the content of the directory $HOME/.lyx
See LyX.UserDir
§§Where can I find information about creating LyX layout-files?
See creating layouts.
§§ How can I change the apperance of limits in integrals etc?
For a detailed explanation (but in German), go read Uwe's Mathebefehle fur LyX section 10.2 Grenzen. Here's a quick summary from a LyxUsersPost:13907 by Uwe:
M-m l (or Alt-M l or Edit→Math→Change Limits Type) toggle between the two commands \limits and \nolimits.
(You can write the example in the following way:
\int \limits _b ^a
For integrals the limits are always set beside the operator (nolimits-mode). For sums the limits are set beside the operator in inline formulas and over/under them (limits-mode) in dislay-style formulas. So M-m l has nothing to do with inline ore display-style mode.
§How can I get Bibliography, Lists of Figures/Tables and Appendix to appear in the table of contents (TOC)?
- If you use a KOMA class: use the document option
liststotoc
- Else: use the package
tocbibind from CTAN:/, i.e. \usepackage{tocbibind}
- If you use \usepackage[nottoc]{tocbibind} instead, the toc will not show up in the toc.
- See LatexTips:index (look for TOC-related tips, e.g. LatexTips:tocloft/TOC)
§§ How do I rename the fixed strings like Abstract, Bibliography etc.?
Those names are stored in macros by LaTeX, and you have to redefine the macro. For instance, Abstract ist stored in \abstractname, Bibliography in \bibname, and References (which is used in the article classes instead of Bibliography), in \refname (see the TUG FAQ for a list of all macros).
So, to redefine Abstract, add to the preamble:
\renewcommand\abstractname{Executive Summary}
However, if you are using babel (which you do most likely if you write in a language other than English, and sometimes even if you write in English), this will not work. So if the above fails, add the following to the preamble:
\AtBeginDocument{%
\addto\captions<your language>{%
\renewcommand{\abstractname}{In nuce}%
}}
Note that you have to substitute <your language> with the name of your language, e.g. for French \captionsfrench.
§I'm using Qt and the math fonts look ugly, what can I do?
See Qt
§§Missing math fonts — the LaTeX code is shown instead of the mathematical symbols?
From LyxUsersPost:14548: try installing the package latex-xft-fonts. It's available from e.g. LyxFtp:contrib
§Where can I find answers and questions about LyX and PDF ?
See PDF
§What are the units in LyX?
See Units.
§How can I remove section and subsection numbering in the output?
Solution: Use the stared versions of the environments, i.e. Chapter*, Section*, Subsection*. Note: They will not appear in the table of contents with this solution.
§How can I remove section and subsection numbering in the output, but still have the sections appear in the table of contents?
If you want to get rid of the numbering completely, go to Document→Settings→Numbering & TOC and drag the slider "Numbering" to the left
If you just want to insert some unnumbered sections next to numbered sections to the TOC, either:
- use a class that supports unnumbered TOCed sections, such as KOMA-Script (Addchap, Addsec), or
- use a Section* and add below in ERT \addcontentsline{toc}{section}{Section Name}
also cf. this FAQ entry
§How do I remove the date from below the title?
Add \date{} to the preamble or just on the same line as the title. See also Herbert's page
§§ How do I avoid hyphenation?
Solution: Set the language to something like Welsh for the relevant text. This prevents hyphenation as long as you don't have Welsh hyphenation installed.
Solution: Set \hyphenpenalty=10000.
This can be done for only one paragraph: write \hyphenpenalty=10000 before the paragraph, and \hyphenpenalty=50 after it.
It is also possible to disable hyphenation for specific words: \hyphenation{foo} will disable hyphenation for the word foo.
Solution: Quoting mail by Herbert:
- for single words: \mbox{hyphenation}
or with package hyphenat and \nohyphens{ blah ...}
- for a paragraph: \begin{sloppy} ... \end{sloppy}
- for the whole doc: \exhyphenpenalty=10000\hyphenpenalty=10000
§Is this FAQ supposed to compete with Herbert's pages?
No. I (Christian) think of this as a complement. Herbert's Tips and tricks are pages with information that are structured and sorted. Here you can add stuff more loosely. Hopefully any good stuff in these pages will be moved/copied to Herbert's pages and can then be replaced by a simple link here.
§Where can I find an example of how to structure my thesis as a multipart document?
This example illustrates how you can structure your thesis as a multipart document.
§Can LyX import files from subdirectories, especially with multipart documents?
See import from subdir.
§Where can I find information/discussion about notes and comments in LyX ?
See these notes on notes :-) Feel free to copy the notes to some wiki page.
§How do I convert a .ps-file to .eps?
Dekel Tsur: Perhaps the best option is to use ps2eps (it is better than ps2epsi which comes with ghostscript).
§How can I insert two figure floats side-by-side in a one-column article?
See figures side by side.
§When using a bibliography with a multipart document, I can't cite references in other files
Copy the bibliography inset to all separate documents, but change it's environment into a comment! This way when you work on a separate document LyX finds the .bib-files and you can easily insert references, but you will not actually get a bibliography in the view.
Since the bibliography resides within a comment, it is not used by Latex and you get references such as [?] instead of [1]. One solution is to use the comment-package to only include the comments when you print the document separately: Add the following to the preamble:
\usepackage{comment}
\includecomment{comment}
of the separate document.
§How do I find out what keyboard shortcuts or keyboard bindings I am using?
You can look in your .bind-files, or use lyx-bindings-script to generate a list of your current bindings. The [http://www.md.kth.se/~chr/lyx/lyx-bindings/#examples examples] shows you the key-bindings for some of the standard .bind-files (such as the [http://www.md.kth.se/~chr/lyx/lyx-bindings/math.pdf math]-bindings).
§How do I add additional entries to the table of contens (TOC) ?
This is answered in Herbert's pages, but a typo was reported. The correct line should read:
\addcontentsline{toc}{chapter}{ABSTRACT}
which will add 'ABSTRACT' to the table of contents. This line should be added as ERT to the "page" of the document that you want to appear listed in the table of contents.
§How can I get two or more lines of text inside a table cell?
Robin Turner: If you make the column fixed width, you can insert extra lines using Ctl-Enter. It's a pain, I know, but I think it's a LaTeX thing rather than a LyX thing.
§How do I put four pages (A6 size) onto one page (A4)?
Herbert says: try
psnup -nup4 input_file.ps | lpr
§How do I print A5 booklets?
Konni says: try
psbook input.ps | psnup -2 -l -m0 | lpr
However, having A5 input, for me it only works with (needs psutils by the way):
psbook input.ps | psnup -Pa5 -2 | lpr
and if you need a pdf you can use (needs ghostscript):
psbook input.ps | psnup -Pa5 -2 | ps2pdf - output.pdf
§How do I reduce the vertical space in itemize and enumerate listings ?
- A very comfortable solution to configure any space in itemize, enumeration and description lists is provided by the package enumitem. Read its docs for details.
- Dekel says: To reduce the length in all enumerate lists, add the following to the preamble.
\let\oldenumerate=\enumerate
\def\enumerate{\oldenumerate%
\setlength{\itemsep}{0pt}\setlength{\parsep}{0pt}}%
The same can be done for itemize lists.
§§ How can I give an (LaTeX) argument to an item in a list?
How can I add a parameter to the (implicit) \item command
that's associated with each element in a list (enumerated or
itemized)?
Just add the argument in ERT at the beginning of the line. E.g. if you want the equivalent of \item[argument], just write [argument] at the beginning of the item line.
§How can I make Acrobat Reader (acroread) update its display?
This problem is with Acrobat Reader that doesn't detect that the file has changed.
Dekel says: There is an cumbersome way to manually force update in acrobat reader: after you update the pdf file in LyX, go the acrobat reader and type Ctrl+w and then ctrl+<left arrow>
Under Windows it's not possible to edit a file while it is displayed in Acrobat. It's better to use Ghostview as pdf-viewer when editing documents, because then you will see the changes immediately.
But wait! there is a solution...
See: http://wiki.lyx.org/Windows/LyXWinTips#pdfwiew
§ How can I make gv/Ghostview automatically update its display?
Set the resource (in for instance $HOME/.Xdefaults or $HOME/.gv) to:
GV.watchFile: True
or change the option Watch File under the menu "State".
§ Where can I find information about LyX and fonts?
See for instance Robin's document [bilkent.edu.tr] and list of [http://www.bilkent.edu.tr/~robin/fontsamples2.tex font samples] [bilkent.edu.tr]. (These documents are in .lyx and .tex-format respectively). Then you have the page about change font using latex.
§§ How does font size correspond to point size?
The font sizes available in Format→Character→Size are called Normal, Large etc. Normal corresponds to the document font size (which you set in Layout→Document). See LatexTips:fonts/fonts#table and also change font using latex.
§How to write two authors for a two column article, with each author centered
See multiple authors.
§I'm only using sections, but they show as 0.1, 0.2 etc. How can I fix this?
On Mon, 13 Jan 2003, Underachiever wrote:
I've written a document using the default Layout > Document > Report.
I've just been told to section and paragraph number the whole thing.Unfortunately, when I change my section types from 'Section*' to 'Section' the numbering starts at 0.1
I can correct this by having Chapters, but I don't have any chapters.Can anyone here suggest a way roundt his? Reading the FAQs suggests Section number depth, but this isn't happening for me. Could someone hand me a cluestick?
Answer: You just have to set the counter for chapters. For instance, add this in ERT:
\setcounter{chapter}{1}
to the beginning of your document. (The preamble ought to work too).
§How to find out the LaTeX definition of a command
See redefining list of figures for an example of how you can find out the definition of a latex command
§How can I put crop markings on a page?
Try the crop-package, i.e. add something like:
\usepackage[cam]{crop}
or
\usepackage[cam, a4center]{crop}
to get it centered on the page, which is useful if you're printing on both pages.
§Someone wants me to use the paperformat S5 or G5, what's that?
- G5: 169 x 239 mm (This is an ISO-standard)
- S5: 165 x 242 mm (This is also called statsformat (in Swedish), it.s a special government format used in Sweden)
See also the small wiki on paper sizes.
§I have a problem with a missing LaTeX class (.cls) or style (.sty), how can I find out more?
Try one of the following commands to get more information (the examples assume you're trying to locate the class cv)
- kpsewhich cv.cls
- locate cv.cls
- dpkg -S cv.cls