Hi Uwe has made an improved version of the LyX User's guide, but IMO we should avoid ERT in the beginning of it (so we don't scare off novices).
I would therefore like to ask for help in how to move the ERT insets in the beginning of the attached example into the preamble. The issues involve: * How to get roman pagenumbering for the first pages, and arabic starting with the first section. * How to add a 'hypertarget' and 'pdfbookmark' to the TOC This is currently being done using ERT insets, but I'd like to do this from the preamble instead. /Christian -- Christian Ridderström http://www.md.kth.se/~chr
#LyX 1.3 created this file. For more info see http://www.lyx.org/ \lyxformat 221 \textclass scrbook \begin_preamble % DO NOT ALTER THIS PREAMBLE!!! % % I've designed this preamble to ensure that the User's Guide prints % out as advertised. If you mess with this preamble, % parts of the User's Guide may not print out as expected. If you % have problems LaTeXing this file, please contact % the documentation team % email: [EMAIL PROTECTED] % assure that the correct language is used \usepackage[english]{babel} % let the index appear in the TOC \usepackage [nottoc]{tocbibind} % provides missing characters, % see note in chapter Character Tables \usepackage{textcomp} % link all cross references and URLs in dvi and pdf output \usepackage[colorlinks=true, bookmarks, bookmarksnumbered, linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels, pdfauthor={LyX Team}, pdftitle={The LyX User's Guide},pdfsubject={LyX}, pdfkeywords={LyX}]{hyperref} % adjust margins \setlength{\oddsidemargin}{-2.27pt} \setlength{\evensidemargin}{-2.27pt} \setlength{\textwidth}{16.1cm} \setlength{\textheight}{23.2cm} % widens the vertical table spacing \renewcommand{\arraystretch}{1.25} % set the separation of table columns \setlength{\tabcolsep}{0.45em} % insertion of 1.5mm additional vertical space between footnotes \let\myFoot\footnote \renewcommand{\footnote}[1]{\myFoot{#1\vspace{1.5mm}}} \end_preamble \language english \inputencoding latin1 \fontscheme default \graphics default \paperfontsize 12 \spacing single \papersize a4paper \paperpackage a4 \use_geometry 0 \use_amsmath 1 \use_natbib 0 \use_numerical_citations 0 \paperorientation portrait \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \defskip medskip \quotes_language english \quotes_times 2 \papercolumns 1 \papersides 2 \paperpagestyle default \layout Standard \begin_inset ERT status Open \layout Standard \backslash pagenumbering{Roman} \end_inset \begin_inset Note collapsed false \layout Standard \series bold \backslash pagenumbering{roman} \series default changes pagenumbering to roman numbers \end_inset \layout Title The LyX User's Guide \layout Author by the LyX Team \begin_inset Foot collapsed true \layout Standard \noindent Principal maintainer of this file is \noun on Mike Ressler \noun default . If you have comments or error corrections, please send them to the LyX Documentation mailing list, <[EMAIL PROTECTED]>. \end_inset \layout Standard \begin_inset ERT status Open \layout Standard \backslash hypertarget{Inhalt}{} \end_inset \begin_inset ERT status Open \layout Standard \backslash pdfbookmark[1]{Contents}{TOC} \end_inset \begin_inset Note collapsed false \layout Standard \series bold \backslash hypertarget \series default and \series bold \backslash pdfbookmark \series default affect, that the Table of Contents appears in pdf as bookmark. \layout Standard More to this commands could be found in the documentation of the LaTeX-package \series bold hyperref \series default . \end_inset \begin_inset Note collapsed false \layout Standard To export this document as pdf, ps oder dvi, the LaTeX-packages \series bold hyperref \series default and \series bold tocbibind \series default have to be installed. \layout Standard These packages are part of all popular LaTeX-distributions. \end_inset \layout Standard \pagebreak_bottom \begin_inset LatexCommand \tableofcontents{} \end_inset \layout Standard \begin_inset ERT status Collapsed \layout Standard \backslash pagenumbering{arabic} \end_inset \layout Chapter Introduction \layout Bibliography \bibitem {lyxcredit} The LyX Team: \begin_inset ERT status Collapsed \layout Standard \backslash href{http://www.lyx.org/cgi-bin/viewcvs.cgi/*checkout*/lyx-devel/lib/CREDITS?rev=HEAD&content-type=text/plain}{ \end_inset \emph on CREDITS \emph default \begin_inset ERT status Collapsed \layout Standard } \end_inset \layout Bibliography \bibitem {latexbook} Leslie Lamport: \emph on LaTeX: A Document Preparation System. \emph default Addison-Wesley, second edition, 1994 \layout Bibliography \bibitem {latexcompanion} Michel Goossens, Frank Mittelbach and Alexander Samarin: \emph on The LaTeX Companion. \emph default Addison-Wesley, 1994 \layout Bibliography \bibitem {latexguide} Kopka and Daly: \emph on A Guide to LaTeX2e \layout Bibliography \bibitem {texbook} Donald E. Knuth. \emph on The TeXbook \the_end