Go to page:

Search:   Help

Navigation

Groups

LyX documentation

Edit

Shared groups

Links

FAQ /

Unsorted

<< Formalia | Page list | Unsorted 1 >>

This is FAQ.Unsorted with new questions and answers.

Table of contents

  1. How can I start an appendix?
  2. How can I deactivate (not include) the package babel?
  3. How can I remove the page number from the first page?
  4. How can I start page numbering on a different page?
  5. How are the book margins (inner v.s. outer) related?
  6. preamble is used in a multipart document?
  7. is the difference between input and include?
  8. can I find more LaTeX classes?
  9. How can I put text over/on top of an image?
  10. How can I make the whole document ragged right?
  11. How can I write the symbol for the set of real numbers?
  12. is the content of the directory $HOME/.lyx
  13. can I find information about creating LyX layout-files?
  14. How can I change the apperance of limits in integrals etc?
  15. How can I get Bibliography, Lists of Figures/Tables and Appendix to appear in the table of contents (TOC)?
  16. How do I rename the fixed strings like Abstract, Bibliography etc.?
  17. I'm using Qt and the math fonts look ugly, what can I do?
  18. math fonts — the LaTeX code is shown instead of the mathematical symbols?
  19. Where can I find answers and questions about LyX and PDF ?
  20. What are the units in LyX?
  21. How can I remove section and subsection numbering in the output?
  22. How can I remove section and subsection numbering in the output, but still have the sections appear in the table of contents?
  23. How do I remove the date from below the title?
  24. How do I avoid hyphenation?
  25. Is this FAQ supposed to compete with Herbert's pages?
  26. Where can I find an example of how to structure my thesis as a multipart document?
  27. Can LyX import files from subdirectories, especially with multipart documents?
  28. Where can I find information/discussion about notes and comments in LyX ?
  29. How do I convert a .ps-file to .eps?
  30. How can I insert two figure floats side-by-side in a one-column article?
  31. When using a bibliography with a multipart document, I can't cite references in other files
  32. How do I find out what keyboard shortcuts or keyboard bindings I am using?
  33. How do I add additional entries to the table of contens (TOC) ?
  34. How can I get two or more lines of text inside a table cell?
  35. How do I put four pages (A6 size) onto one page (A4)?
  36. How do I print A5 booklets?
  37. How do I reduce the vertical space in itemize and enumerate listings ?
  38. How can I give an (LaTeX) argument to an item in a list?
  39. How can I make Acrobat Reader (acroread) update its display?
  40. How can I make gv/Ghostview automatically update its display?
  41. Where can I find information about LyX and fonts?
  42. How does font size correspond to point size?
  43. How to write two authors for a two column article, with each author centered
  44. I'm only using sections, but they show as 0.1, 0.2 etc. How can I fix this?
  45. How to find out the LaTeX definition of a command
  46. How can I put crop markings on a page?
  47. Someone wants me to use the paperformat S5 or G5, what's that?
  48. I have a problem with a missing LaTeX class (.cls) or style (.sty), how can I find out more?
  49. How can I make a shaded box with a line around it?
  50. How can I (using latex) change the default font, or fonts in section headers or captions?
  51. How can I debug layout files more efficiently?
  52. What are your "Frequently Used Shortcuts" ?
  53. How can I add a matrix to a math expression without using the math-panel?
  54. How can I check if LyX uses my fonts?
  55. How can I remove an equation label?
  56. How can I stack math symbols? I want one symbol on top of the other.
  57. How can I change the font-size of my quotations?
  58. How can I set an unusual font size such as 10.5pt or 13 pt?
  59. How can I get an empty pagestyle on a page where I have a big float?
  60. Someone talked about an lfun, what is that?
  61. How can I change the date format?
  62. How can I include other documents into a multi-part document so that do NOT start on a new page?
  63. How can put have text (e.g. itemized list) with a frame around it?
  64. How can I add a small space?
  65. How can I restrict float placement to within a region?
  66. How can change the order of layouts in the drop-down list? Sort layouts alphabetically in style list?
  67. Where can I find examples of keyboard macros, or command-sequences?
  68. How can I typeset units? (SI units for instance)
  69. How can I write an inline formula (inline math) in the style of a display formula (bigger symbols etc?)
  70. How to configure LaTeX for use with LyX
  71. What should I think about when posting to the mailing lists?
  72. Are there more layouts out there?
  73. Is there an alternative binding for C-Tab?
  74. How can I create a floating figure with a centered image?
  75. How can I center an image in a float or a table in a float?
  76. How do I center an image that's too big horizontally?
  77. How can I use a caption with a longtable?
  78. Why are footnotes in tables not working?
  79. Why is the default paper size letter?
  80. How can I add "invisible" vertical and/or horizontal distances
  81. How can I set the starting number for a chapter or a section?
  82. How can I set the number for an enumerated list?
  83. How can I set the starting number of an enumerated list?
  84. How can I change the type of counter used in an enumerated list?
  85. How can I pack all my files that are included in a LyX document ?
  86. How can I write a Gantt chart, i.e. a timeline table with some horizontal bars?
  87. How can I add a tag/comment/note etc to a display equation?
  88. What does blue underlined text mean? text underlined in blue
  89. How can I set the length of automatic line wrapping when exporting as ascii file?
    1. 89.1  What if I really do not want any line break?
  90. How can I add a figure to a page/letter head?
  91. How can I specify the name of a theorem, definition etc?
  92. does the filename of the exported .tex/ps/pdf differ from the filename of my .lyx-file?
  93. How can I add options for Babel in Format-->Document-->Preamble
  94. How do I get enumerate to number all examples in a text sequentially?

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.

If you feel LaTeX ignores \setcounter{page}{-1}, don't use it in the Preamble. Simply, start the document with an ERT \pagestyle{empty}. On the right page, set another ERT containing \pagestyle{fancy} (if you intend to use this page style) and \setcounter{page}{1} (meaning that this page will be numbered "first").

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

Since "The TOC lists every numbered section automatically", this work around is particularly useful for including sections that are not numbered.

§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 (for Debian)

If you can't find it on your computer, search in CTAN.

§How can I make a shaded box with a line around it?

See shaded box.

§How can I (using latex) change the default font, or fonts in section headers or captions?

See change font using latex

§How can I debug layout files more efficiently?

See debugging layout files

§What are your "Frequently Used Shortcuts" ?

See frequently used shortcuts

§How can I add a matrix to a math expression without using the math-panel?

  • Type in the minibuffer (open it with M-x): math-matrix rows cols
  • Type in the formula: \matrix . Now use the minibuffer as decribed below.
  • For a matrix with parenthesis, replace \matrix by \pmatrix. For a matrix with lines use \vmatrix.

§How can I check if LyX uses my fonts?

Run the command:

 xset q


The font path should include a reference to your ~/.lyx/xfonts or the global share/lyx/xfonts directories.

You can add to the fontpath with a command such as this:

 xset +fp ~/.lyx/xfonts


§How can I remove an equation label?

Enter the math-inset and press M-m n. Pressing M-m n once more will show the equation label again.

But how do I remove the label complete? I'm not allowed to set the label to nothing.

You can try switching the 'display mode' on/off - while inside the equation, select 'Insert -> Math -> Display Formula' twice, or use the corresponding keyboard shortcut (Ctrl+Shift+M). Note that this way the multiline (achieved by Ctrl+Enter) can be lost, but it is still much more convenient than editing the .lyx file by hand (which was suggested before).

Tag me label equation label

§How can I stack math symbols? I want one symbol on top of the other.

Use the LaTeX-command "\overset{symbols above}{symbols below}". Here an example for an "a" over a maltese-symbol:

 \overset{a}{\maltese}


You can enter this command in an ERT-box or in a formula.

§§ How can I change the font-size of my quotations?

Add to the preamble:

\let\oldquote\quote
\renewcommand\quote{\small\oldquote}
\let\oldquotation\quotation
\renewcommand\quotation{\small\oldquotation}

replace \small with your preferred size

§How can I set an unusual font size such as 10.5pt or 13 pt?

See change font using latex

§How can I get an empty pagestyle on a page where I have a big float?

See unfloating figure on empty page

§Someone talked about an lfun, what is that?

This is part of the internal workings of LyX, it stands for LyX function. See the development sections for more information. (these have not been moved to the new site yet, so there is no link here yet. /Christian).

§How can I change the date format?

How do I change the default date format in LyX/LaTeX from 13th February 2003 to February 13, 2003?

Herbert says: LatexTips:titlepage/titlepage#date
Dekel says: Change the language of the document to American.
Christian says: Do NOT use the setting in Edit→Preferences→Outputs→Date format
Dekel then said: It is the format of the date that is inserted with M-x date-insert

§How can I include other documents into a multi-part document so that do NOT start on a new page?

JMarc: Use the option 'input' instead of 'include'.

§How can put have text (e.g. itemized list) with a frame around it?

See framed box (it's a hack, but it works).

§How can I add a small space?

Is there any possibility to insert this small seperating space (i.e. the latex: \,) via keyboard and without ERT?

With LyX 1.4: C-S-<Space>.

With LyX < 1.4: You have to use ERT. To customize the input, however, you can put those two lines in your bind file for \, and \<space>:

\bind "C-M-space" "command-sequence ert-insert ; self-insert \ \; delete-backward ; inset-toggle ;"
\bind "C-S-space" "command-sequence ert-insert ; self-insert \,; inset-toggle ;"

Note: In the file, each bind-command must be on one line, without line breaks.

§How can I restrict float placement to within a region?

Is there an ERT command that can create a "barrier" in a document affectively trapping picture floats (that appear before it) behind it?
I have images that I don't mind floating within a section but only up to a point (i.e. where their location is still in some context within the' section they appear). The usual "Here", "Here definitely" etc. have been tried but with mixed results hence the Question.

Dekel: The placeins package, documentation in the file placeins.sty. Christian: I copied the documentation from placeins.sty to PlaceinsStyDoc

§How can change the order of layouts in the drop-down list? Sort layouts alphabetically in style list?

See layouts change order.

§Where can I find examples of keyboard macros, or command-sequences?

See command sequences

§How can I typeset units? (SI units for instance)

Dekel: Use the package units or SIunits!

§How can I write an inline formula (inline math) in the style of a display formula (bigger symbols etc?)

Andre: Wrap it inside the command: \displaystyle

§How to configure LaTeX for use with LyX

This is incomplete, but see install latex configure. Also try Herbert's pages etc..

§What should I think about when posting to the mailing lists?

See list netiquette

§Are there more layouts out there?

See layouts.

§Is there an alternative binding for C-Tab?

C-Tab is captured by my window manager, but I need it in math-mode to change the alignment points in the equation?
Try the binding below, which maps it to C-equal:

  \bind "~S-C-equal" "tab-insert" 


§How can I create a floating figure with a centered image?

Also see the question below about centering the image.

  1. Menu: Insert→Floats→Figure
  2. Put the cursor at 'Figure#' and press Enter. The cursor is now above the text 'Figure#'.
  3. Menu: Edit→Paragraph Settings (Layout→Paragraph) and select Center in the Alignment box. Press Ok.
  4. Menu: Insert→Graphics and choose the file etc.

The default behaviour used to be that paragraph was centered, but this was changed since it didn't match LaTeX's behaviour. If you don't like this, consider making a keyboard shortcut that centers the current paragraph, or perhaps to do all of the items above. For more details on keyboard shortcuts, see CommandSequences.

§How can I center an image in a float or a table in a float?

Some alternatives:

  • Put the cursor in the paragraph with the image and open the dialog with Paragraph_Settings (Layout→Paragraph) and set the alignment of the paragraph to centered.
  • LyX 1.3.x and older only: According to Herbert, this is not the best choice since you'll get additional space. He suggests adding \centering just before the image in ERT. (See this mail). Note that the bug Herbert describes has been fixed in LyX 1.4.0 and later.

§How do I center an image that's too big horizontally?

Inserting an image that's a little to big horizontally causes the centering mechanism to break down. The left edge gets aligned, and the right edge sticks out even more.
Dekel: Change the paragraph layout to the default (Justified). Add in Latex mode \centerline{ before the image, and } after it.

§How can I use a caption with a longtable?

See Formatting Tables.

§Why are footnotes in tables not working?

See Formatting Tables

§Why is the default paper size letter?

Latex has letter as the default paper size...

§§ How can I add "invisible" vertical and/or horizontal distances

  • \vphantom{\int_a^b} produces a vertical space (0 width) which height is exactly the height of its argument. Assuming that the integral is what forces the ] size, it gives the right result.
  • \hphantom{z+\exp[} does exactly the same but produces an horizontal space.

More tweaking might be needed for this equation, but I think it explains the trick. There is also a \phantom{} which sets both height and width.

§How can I set the starting number for a chapter or a section?

Add \setcounter{chapter}{3} or \setcounter{section}{3} to the preamble to set the number to 3 for chapter or section respectively.

§How can I set the number for an enumerated list?

Matej: The counter is called enumi (enumii, enumiii, enumiv for nested lists). So use for instance \setcounter{enumi}{2} to set the counter.

§§ How can I set the starting number of an enumerated list?

In order to make an enumerated list start with e.g. 5, you can add this ERT as the first thing on the line:

	[5.]\setcounter{enumi}{5}

also see the example, uploads:/Examples/Setting_starting_number_of_enumerated_list.lyx

§§ How can I change the type of counter used in an enumerated list?

To change all enumerated lists from (1), (2), (3),... to (a), (b), (c), write

	\renewcommand\theenumi{(\alph{enumi})}
	\renewcommand\labelenumi{\theenumi}

in the preamble. To only change this for a single list, write instead

	\bgroup
	\renewcommand\theenumi{(\alph{enumi})}
	\renewcommand\labelenumi{\theenumi}

as ERT just in front of the list and write

	\egroup{}

as ERT just after the list.

§How can I pack all my files that are included in a LyX document ?

Try the script described on the page ConvertFilesIntoArchive.

§How can I write a Gantt chart, i.e. a timeline table with some horizontal bars?

Some latex-oriented solutions:

(unknown how well they can work with LyX though).

§How can I add a tag/comment/note etc to a display equation?

Try adding \tag{a comment} in ERT in the equation. (I've not tested this myself since I'm on Windows now).

Note: Make sure to switch on "Use AMS math" in Layout→Document for this to work.

§What does blue underlined text mean? text underlined in blue

Blue underlining means that the text belongs to a different language (this visual cue can be turned off). For instance, a part of a document with default language British English would put text in say Canadian English in blue underline. Also have a look at the menu Preferences→Lang Opts→Language→Mark foreign.

§§ How can I set the length of automatic line wrapping when exporting as ascii file?

Add the following to your file .lyx/preferences (if it doesn't exist, create it):

	\ascii_linelen 1000


where you replace 1000 with whatever line length you desire.

Alternatively, set this using the Preferences dialog (Edit→Preferences) in the Output→Misc tab (Xforms) or Outputs→ASCII pane (Qt).

§What if I really do not want any line break?

Use sed:

 sed ':looop
 $!{
 N
 s/\n/ /
 tloop
 }' your_ASCII_file.txt > a_file_with_a_single_really_long_line.txt


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

(From mail by Paul Medwell): 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).

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

§§Why does the filename of the exported .tex/ps/pdf differ from the filename of my .lyx-file?

If your file is called Prövning.lyx, the name of exported file (.tex/ps/pdf) will be different (probably @@Prvvning.lyx) becase LaTeX can only handle filenames where the letters are 7-bit ASCII. For the actual details in the source, see Angus' explanation [gmane.org].

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

§§ How do I get enumerate to number all examples in a text sequentially?

You can use several packages (such as mdwlist.sty). See this page for more.

Categories

<< Formalia | FAQ.PageList | Unsorted 1 >>

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2008-08-15 14:58 CEST