Search:   Help

Navigation

Groups

LyX documentation

Edit

Shared groups

Links

FAQ /

Unsorted

Categories: FAQ
<< | Page list | >>

This is FAQ.Unsorted with new questions and answers.

This page contains questions that have not been sorted into categories yet. Please help sorting them and try to add new questions immediately to categorized pages instead of this unsorted page!

§1.  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}.

§2.  What is the content of the directory $HOME/.lyx

See LyX.UserDir

§3.  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.

§4.  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.

§5.  How to configure LaTeX for use with LyX

This is incomplete, but see install latex configure.

§6.  How can I add a figure to a page/letter head?

First step, try adding just text to header/footer by writing the following in the preamble:

\lhead{This is the lefthand of the header}
\chead{Centre of header}
\rfoot{Right hand corner of footer}

Note that you must use the fancy page layout (pagestyle) under Document Settings.

Second step, try adding a image instead of just text, e.g.:

\lhead{\includegraphics{temp_graphic.eps}}

If there are no other images in the document, you'll have to add \usepackage{graphicx} as well.

Third step, to avoid loading the graphic code within each and every page: use savebox/usebox. Define it first:

\newsavebox{\mygraphic}
\savebox{\mygraphic}{\includegraphics{temp_graphic.eps}}

then use it:

\lhead{\usebox{\mygraphic}}

Fourth step, to make it work both with latex and pdflatex: remove the suffix from the file name

\savebox{\mygraphic}{includegraphics{temp_graphic}

and make sure that temp_graphic.pdf, temp_graphic.png or temp_graphic.jpg (depending upon the vector- or bitmap- nature of the graphic) is available with temp_graphic.eps.

Angus: This doesn't seem to work with the standard letter class, but it works with KOMA-script letter class (with an image in the 'Name' field).

§7.  How can I specify the name of a theorem, definition etc?

In LaTeX, you can write e.g.

\begin{theorem}[aName]
...
\end{theorem}

but how do you do this in LyX?
Easy, just add [aName] (in ERT) at the beginning of your theorem-text. Amir Seginer created this example LyX-file

§8.  How can I add options for Babel in Format-->Document-->Preamble

When creating the LaTeX file, LyX loads the babel package after reading the preamble. But Babel options have to be inserted after the loading of the package and generally before the start of the document (\begin{document}). You can obtain the right positioning of the options by enclosing them in \AtBeginDocument{}. For example, if you are using the frenchb language option and want footnotes formatted the French way add in your preamble :
\AtBeginDocument{
\AddThinSpaceBeforeFootnotes
\FrenchFootnotes
}

§9.  How do I count words in LyX?

LyX 1.4: Select Tools->Statistics... to count the words of the whole document or of a given selection. Note that this will the contents of footnotes.

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.

§10.  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.

FAQ

<< Units | FAQ.PageList | Unanswered questions >>

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2012-12-06 23:24 UTC