From: John R Hudson Date: Sat, 17 Dec 2022 09:47:11 +0000 (+0000) Subject: Move Non-standard Paragraph Shapes into new Chapter 4 Modules of Additional.lyx and... X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=19ceef7f862b8743ceed9650a92120d282d8664f;p=features.git Move Non-standard Paragraph Shapes into new Chapter 4 Modules of Additional.lyx and rename Custom Paragraph Shapes --- diff --git a/lib/doc/Additional.lyx b/lib/doc/Additional.lyx index fa282c7bb8..df12f11cc7 100644 --- a/lib/doc/Additional.lyx +++ b/lib/doc/Additional.lyx @@ -13674,2755 +13674,2721 @@ go back to the default \end_layout -\begin_layout Chapter -Supplemental Tools +\begin_layout Section + +\change_inserted 564990737 1671270380 +Paragraph Styles \end_layout -\begin_layout Section -Customizing Bibliographies with Bib\SpecialChar TeX - or Biblatex +\begin_layout Subsection + +\change_inserted 564990737 1671270398 +Custom +\change_deleted 564990737 1671270396 +Non-standard +\change_unchanged + Paragraph Shapes \end_layout \begin_layout Standard -The most basic information about how to use Bib\SpecialChar TeX - or +\noindent +\SpecialChar LaTeX + as well as any other text processor uses by default rectangular paragraphs. + For special cases like for example posters, invitation cards or poems you + can modify the paragraph shape to one of your choice. + This can be done by using the \SpecialChar LaTeX +-package +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +shapepar +\end_layout + +\end_inset + + which is loaded by using in the document settings the module \family sans -Biblatex +Custom paragraph shapes \family default - with \SpecialChar LyX - is contained in the section -\emph on -Bibliography databases -\emph default - of the -\emph on -User's Guide -\emph default -. - The following subsections explain special bibliography features supported - by \SpecialChar LyX . \end_layout -\begin_layout Subsection -Alternative Citation Styles +\begin_layout Subsubsection +Predefined shapes \end_layout \begin_layout Standard -Standard Bib\SpecialChar TeX - uses numbers (e. -\begin_inset space \thinspace{} -\end_inset - -g. -\begin_inset space \space{} -\end_inset +\series bold +shapepar +\series default + provides the following shapes: +\end_layout -\begin_inset Quotes eld -\end_inset +\begin_layout Standard +\begin_inset Tabular + + + + + + + +\begin_inset Text -[12] -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout -) to refer to a cited work. - However, in many scientific disciplines, other citation styles are in use. - The most common one is the author-year style (e. -\begin_inset space \thinspace{} -\end_inset +\series bold +\size small +Name +\end_layout -g. -\begin_inset space \space{} \end_inset + + +\begin_inset Text +\begin_layout Plain Layout -\begin_inset Quotes eld -\end_inset +\series bold +\size small +Description +\end_layout -Knuth 1984a -\begin_inset Quotes erd \end_inset - -). - \SpecialChar LyX - supports three packages that provide this style, -\begin_inset Flex Code -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -biblatex + +\series bold +\size small +Annotation \end_layout \end_inset - -, -\begin_inset Flex Code -status collapsed + + + + +\begin_inset Text \begin_layout Plain Layout -natbib + +\size small +CDlabel \end_layout \end_inset - -, and -\begin_inset Flex Code -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -jurabib + +\size small +Circle with circular hole (in the size of a CD/DVD) \end_layout \end_inset - -. - Each of these packages has their pros and cons, which cannot be listed - in detail. - If you only want to have simple author-year (or author-numerical) style, - or if you want to use one of the countless style files for -\begin_inset Flex Code -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -natbib + +\size small +Cannot be scaled, take care there is not too much text \end_layout \end_inset - -, then the established -\begin_inset Flex Code -status collapsed + + + + +\begin_inset Text \begin_layout Plain Layout -natbib + +\size small +Circle \end_layout \end_inset - - package is probably your choice. - If you look for specific citation styles common in law studies, you might - consider the -\begin_inset Flex Code -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -jurabib + +\size small +Circle \end_layout \end_inset - - package. - If you want to have full control over the formatting or look for advanced - features such as ibidem, footnote citations, full title citations, advanced - date formats (such as 400 BC) or full localization to other languages than - English, you should definitely consider -\begin_inset Flex Code -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -biblatex + +\size small +Fragile, calculation might fail \end_layout \end_inset + + + + +\begin_inset Text -, which exceeds all other packages in terms of features, but is also quite - heavy and more resource-hungry. +\begin_layout Plain Layout + +\size small +Diamond \end_layout -\begin_layout Standard -The handling of these packages in \SpecialChar LyX - is basically the same. - Go to -\begin_inset Flex Noun -status collapsed +\end_inset + + +\begin_inset Text \begin_layout Plain Layout -Document\SpecialChar menuseparator -Settings -\end_layout +\size small +Rhomboid (symbolizing a +\begin_inset Quotes eld \end_inset - and select under -\begin_inset Flex Noun -status collapsed +diamond +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -Bibliography +) \end_layout \end_inset - - the -\begin_inset Flex Noun -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -Style Format + +\size small +- \end_layout \end_inset - - -\begin_inset Flex Noun -status collapsed + + + + +\begin_inset Text \begin_layout Plain Layout -Basic (BibTeX) + +\size small +Heart \end_layout \end_inset - -, -\begin_inset Flex Noun -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -Biblatex + +\size small +Heart-like shape \end_layout \end_inset - -, -\begin_inset Flex Noun -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -Biblatex (Natbib mode) + +\size small +- \end_layout \end_inset - -, -\begin_inset Flex Noun -status collapsed + + + + +\begin_inset Text \begin_layout Plain Layout -Natbib (BibTeX) + +\size small +Hexagon \end_layout \end_inset - - or -\begin_inset Flex Noun -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -Jurabib (BibTeX) + +\size small +Hexagon \end_layout \end_inset + + +\begin_inset Text - (see sec. -\begin_inset space ~ -\end_inset +\begin_layout Plain Layout -6.5.3 in the User's Guide for more information on these choices). - With all these packages, you will get some extra features in the citation - dialog and you can select the style of the reference ( -\begin_inset Quotes eld -\end_inset +\size small +- +\end_layout -Knuth 1984 -\begin_inset Quotes erd \end_inset + + + + +\begin_inset Text -, -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout -Knuth (1984) -\begin_inset Quotes erd -\end_inset +\size small +Nut +\end_layout -, -\begin_inset Quotes eld \end_inset + + +\begin_inset Text -Knuth, 1984 -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout -, -\begin_inset Quotes eld -\end_inset +\size small +Nut for bolt (hexagon with circular hole) +\end_layout -1984 -\begin_inset Quotes erd \end_inset - - etc.). - Note that either package needs specifically designed style files. - They all ship their own, but there are lots of additional style files, - and there is even an interactive style file builder -\begin_inset Foot -status collapsed - -\begin_layout Plain Layout -See -\begin_inset Flex URL -status open + + +\begin_inset Text \begin_layout Plain Layout -ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/ +\size small +- \end_layout \end_inset + + + + +\begin_inset Text +\begin_layout Plain Layout +\size small +Square \end_layout \end_inset - - for -\begin_inset Flex Code -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -natbib + +\size small +Square \end_layout \end_inset + + +\begin_inset Text -. -\end_layout +\begin_layout Plain Layout -\begin_layout Subsection -Subdivided Bibliographies +\size small +- \end_layout -\begin_layout Standard -Sometimes you might need to divide your bibliography into several sections. - If you are for instance a historian, the possibility to separate sources - and scientific works is most likely a -\begin_inset Quotes eld \end_inset + + + + +\begin_inset Text -must have -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout -. - Unfortunately, Bib\SpecialChar TeX - itself does not allow you to do this. - But with the help of some \SpecialChar LaTeX - packages, Bib\SpecialChar TeX - can be extended to fit your needs. +\size small +Star \end_layout -\begin_layout Standard -\SpecialChar LyX - provides native support for one of these packages, -\family typewriter -bibtopic -\family default -. -\begin_inset Foot -status collapsed - -\begin_layout Plain Layout -Available from -\begin_inset Flex URL -status open +\end_inset + + +\begin_inset Text \begin_layout Plain Layout -ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/ +\size small +Five-point star \end_layout \end_inset + + +\begin_inset Text +\begin_layout Plain Layout +\size small +- \end_layout \end_inset + + + + +\begin_inset Text - The advantage of this package (compared to other packages such as -\family typewriter -multibib -\family default -) is that you don't need to define new citation commands. - Instead, you need to prepare different bibliographic databases which include - the entries for the different sections of the bibliography. - For example: If you want to divide your bibliography into the sections - -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout -Sources -\begin_inset Quotes erd -\end_inset +\size small +Candle +\end_layout - and -\begin_inset Quotes eld \end_inset + + +\begin_inset Text -Scientific works -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout -, you first need to create two bibliographic databases, e. -\begin_inset space \thinspace{} -\end_inset +\size small +Burning candle +\end_layout -g. -\begin_inset space \space{} \end_inset - - -\begin_inset Flex Code -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -sources.bib + +\size small +- \end_layout \end_inset - - and -\begin_inset Flex Code -status collapsed + + + + +\begin_inset Text \begin_layout Plain Layout -scientific.bib + +\size small +Drop down/up \end_layout \end_inset - -. - -\end_layout - -\begin_layout Standard -Go to -\begin_inset Flex Noun -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -Document\SpecialChar menuseparator -Settings + +\size small +Normal/reversed rain drop \end_layout \end_inset - - and check under -\begin_inset Flex Noun -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -Bibliography + +\size small +Fragile, calculation might fail \end_layout \end_inset - - the option -\begin_inset Flex Noun -status collapsed + + + + +\begin_inset Text \begin_layout Plain Layout -Subdivided bibliography + +\size small +\SpecialChar TeX + \end_layout \end_inset - -. - Now you can insert multiple Bib\SpecialChar TeX - bibliographies, one for each section of - your bibliography. - Returning to our example: Insert the Bib\SpecialChar TeX - bibliography -\begin_inset Flex Code -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -sources.bib + +\size small +The \SpecialChar TeX + logo \end_layout \end_inset - - and a second one for the database -\begin_inset Flex Code -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -scientific.bib + +\size small +- \end_layout \end_inset + + + + +\begin_inset Text -. - You are free to use the same or different styles for each section. - Additionally, you can choose if the bibliography section should contain - -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout -all cited references -\begin_inset Quotes erd +\size small +Triangle up/down/ +\begin_inset Newline newline \end_inset - of the specified database(s) (which is the default), -\begin_inset Quotes eld -\end_inset +left/right +\end_layout -all uncited references -\begin_inset Quotes erd \end_inset + + +\begin_inset Text - or even -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout -all references -\begin_inset Quotes erd -\end_inset +\size small +Triangles in different orientations +\end_layout -. - This might be useful if you would like to separate your bibliography into - three sections: -\begin_inset Quotes eld \end_inset + + +\begin_inset Text -Cited sources -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout -, -\begin_inset Quotes eld -\end_inset +\size small +- +\end_layout -Uncited sources -\begin_inset Quotes erd \end_inset + + + -, and -\begin_inset Quotes eld \end_inset -Scientific works -\begin_inset Quotes erd -\end_inset -. - The titles for the sections can be added as ordinary sections or subsections. - Since -\begin_inset Flex Code -status collapsed +\end_layout -\begin_layout Plain Layout -bibtopic +\begin_layout Standard +To use a shape for your paragraph, simply select it in \SpecialChar LyX +'s pull-down box + for environments in the toolbar. \end_layout +\begin_layout Standard +\begin_inset Newpage newpage \end_inset - removes the bibliography title, you have to manually re-add that, too (as - a chapter* or section*, for instance). + \end_layout \begin_layout Standard -With -\family sans -Biblatex -\family default -, the procedure is a bit different. - Since -\family typewriter -bibtopic -\family default - does not work with -\family sans -Biblatex -\family default -, the aforementioned -\begin_inset Flex Noun -status collapsed - -\begin_layout Plain Layout -Subdivided bibliography +Here is an example paragraph in the shape of a nut: \end_layout +\begin_layout Standard +\begin_inset VSpace bigskip \end_inset - option is disabled if you use -\family sans -Biblatex -\family default -. - However, -\family sans -Biblatex -\family default - provides its own means to generate subdivided bibliographies. - You can either add keywords to bibliography entries via the -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -keywords \end_layout -\end_inset - - entry option and then filter bibliography sections by keyword (by adding - -\begin_inset Flex Code -status collapsed +\begin_layout Nut -\begin_layout Plain Layout -keyword=mykeyword +\lang latin +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy + eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam + voluptua. + At vero eos et accusam et justo duo dolores et ea rebum. + Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor + sit amet. + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy + eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam + voluptua. \end_layout +\begin_layout Standard +\begin_inset VSpace bigskip \end_inset - to the -\begin_inset Flex Noun -status collapsed + +\end_layout + +\begin_layout Standard +\begin_inset Note Greyedout +status open \begin_layout Plain Layout -Options + +\series bold +Note +\series default +: +\family sans +shapepar +\family default + paragraphs cannot run over a page break. \end_layout \end_inset - field of the dialog that opens if you left-click on the -\begin_inset Flex Noun -status collapsed -\begin_layout Plain Layout -Biblatex Generated Bibliography \end_layout +\begin_layout Standard +\begin_inset VSpace bigskip \end_inset - button), or you can filter by entry types (such as -\emph on -book -\emph default - or -\emph on -article -\emph default -) by entering e. -\begin_inset space \thinspace{} -\end_inset -g. - +\end_layout + +\begin_layout Standard +The package \begin_inset Flex Code status collapsed \begin_layout Plain Layout -type=book +shapepar \end_layout \end_inset - or -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -nottype=collection + takes care that the shape will always be preserved, no matter how much + text is in the paragraph. + Therefore the paragraph size changes with the amount of contained text. + This can lead to paragraph sizes exceeding the page margins. + To demonstrate the size scaling, here is the same example paragraph but + with twice as much text: \end_layout +\begin_layout Standard +\begin_inset Newpage newpage \end_inset - to the mentioned -\begin_inset Flex Noun -status collapsed -\begin_layout Plain Layout -Options \end_layout -\end_inset - - field, or you can create so-called -\begin_inset Quotes eld -\end_inset - -Bibliography Categories -\begin_inset Quotes erd -\end_inset +\begin_layout Nut - to which you can assign individual entries. - Please refer to the Biblatex manual, section -\emph on -Subdivided Bibliographies -\emph default -, for details. +\lang latin +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy + eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam + voluptua. + At vero eos et accusam et justo duo dolores et ea rebum. + Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor + sit amet. + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy + eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam + voluptua. + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy + eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam + voluptua. + At vero eos et accusam et justo duo dolores et ea rebum. + Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor + sit amet. + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy + eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam + voluptua. \end_layout -\begin_layout Subsection -Multiple Bibliographies -\begin_inset CommandInset label -LatexCommand label -name "subsec:Multiple-Bibliographies" - +\begin_layout Standard +\begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard -Multiple bibliographies, e. -\begin_inset space \thinspace{} +An exception is the shape +\family sans +CDlabel +\family default +. + It cannot be scaled because it must fit the size of a CD/DVD. + Therefore the amount of text that fits into the shape is limited. +\begin_inset Newline newline \end_inset -g. -\begin_inset space \space{} +The +\family sans +drop +\family default + shapes and the +\family sans +circle +\family default + shape are fragile, meaning that the calculation of their size can fail, + depending on the amount of text. + You will then get the \SpecialChar LaTeX + error +\begin_inset Quotes eld \end_inset -a bibliography for each part, chapter, section, subsection or child (sub-documen -t) of the document, are also supported by \SpecialChar LyX -. - In order to enable it, go to -\begin_inset Flex Noun -status collapsed +Arithmetic overflow +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -Document\SpecialChar menuseparator -Settings\SpecialChar menuseparator -Bibliography +. + In this case one can try to remove or add some text; if nothing works one + has to use another shape. \end_layout +\begin_layout Standard +\begin_inset VSpace bigskip \end_inset - and select the relevant unit (e. -\begin_inset space \thinspace{} -\end_inset -g., -\begin_inset Quotes eld -\end_inset +\end_layout -per section -\begin_inset Quotes erd +\begin_layout Standard +For shapes with tips you will maybe see that \SpecialChar LaTeX +'s hyphenation routine fails + for text in the tips. + Therefore it is often necessary to add hyphenation points +\family sans +( +\begin_inset Info +type "shortcut" +arg "specialchar-insert hyphenation" \end_inset -) in the -\begin_inset Flex Noun -status collapsed -\begin_layout Plain Layout -Multiple Bibliographies +\family default +) to the corresponding text parts. \end_layout +\begin_layout Standard +\begin_inset VSpace bigskip \end_inset - combo box. - Then add a Bib(la)\SpecialChar TeX - bibliography to each unit (e. -\begin_inset space \thinspace{} -\end_inset -g., section) of your document. - In the output, a separate bibliography, containing only the references - done in the current unit is generated. \end_layout \begin_layout Standard -If you use Bib\SpecialChar TeX -, either the -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -chapterbib +Shapepar paragraphs are either always centered or placed on the page so + that their left border touches the left page margin. + You can therefore not use the paragraph dialog to align such paragraphs. + A solution is to put the paragraph into a minipage or parbox and align + the box. + The problem is hereby to find the right width for the box. + Because if it is too wide and you center the box, the paragraph is not + centered too because it sticks at the left side of the box. + So you might have to play a bit with the width until it fits. + Here are two heart-shaped paragraphs, the first one is not aligned, the + second one is right-aligned: \end_layout +\begin_layout Standard +\begin_inset Newpage newpage \end_inset - or the -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -bibtopic \end_layout -\end_inset +\begin_layout Heart +\noindent - package is used to create multiple bibliographies. - The former package is used if you select -\begin_inset Quotes eld -\end_inset +\lang latin +Lo\SpecialChar softhyphen +rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy + eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam + voluptua. + At vero eos et accusam et justo duo dolores et ea rebum. + Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor + sit amet. +\end_layout -per child document -\begin_inset Quotes erd +\begin_layout Standard +\begin_inset VSpace bigskip \end_inset - and do -\emph on -not -\emph default - check -\begin_inset Flex Noun -status collapsed -\begin_layout Plain Layout -Sectioned Bibliography \end_layout -\end_inset +\begin_layout Standard +\noindent +\align right +\begin_inset Box Frameless +position "t" +hor_pos "c" +has_inner_box 1 +inner_pos "t" +use_parbox 1 +use_makebox 0 +width "42col%" +special "none" +height "1in" +height_special "totalheight" +thickness "0.4pt" +separation "3pt" +shadowsize "4pt" +framecolor "black" +backgroundcolor "none" +status open -. - In all other cases, -\begin_inset Flex Code -status collapsed +\begin_layout Heart +\noindent -\begin_layout Plain Layout -bibtopic +\lang latin +Lo\SpecialChar softhyphen +rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy + eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam + voluptua. + At vero eos et accusam et justo duo dolores et ea rebum. + Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor + sit amet. \end_layout \end_inset - is used. -\begin_inset Foot -status collapsed -\begin_layout Plain Layout -An alternative approach, if you are willing to use some -\begin_inset Flex Noun -status collapsed +\end_layout -\begin_layout Plain Layout -\SpecialChar TeX - Code +\begin_layout Subsubsection +Custom shapes \end_layout -\end_inset +\begin_layout Standard +You can define any shape you want. + Doing this manually is a lot of work because every coordinate must be specified. + But there is a way to let the computer calculate the coordinates: +\end_layout + +\begin_layout Enumerate +Install the program +\begin_inset CommandInset href +LatexCommand href +name "Jpgfdraw" +target "https://www.ctan.org/tex-archive/graphics/jpgfdraw" +literal "false" - (see section -\begin_inset space ~ \end_inset - -\begin_inset CommandInset ref -LatexCommand ref -reference "sec:Inserting-TeX-Code" - -\end_inset - -), is to use the -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -bibunits +. \end_layout +\begin_layout Enumerate +In +\family sans +Jpgfdraw +\family default + go to the menu +\family sans +TeX/LaTeX\SpecialChar menuseparator +Settings\SpecialChar menuseparator +Set Normal Size +\family default + and select the font size you are using in your document. + For example this document uses the size 12 +\begin_inset space \thinspace{} \end_inset - package. +pt. \end_layout -\end_inset +\begin_layout Enumerate +Draw a shape. +\end_layout - If -\begin_inset Flex Code +\begin_layout Enumerate +Use the menu +\family sans +TeX/LaTeX\SpecialChar menuseparator +Shapepar +\family default + to export the shape to coordinates. + In the appearing dialog use either the outline of your shape for the coordinate +s or the path itself. +\begin_inset Foot status collapsed \begin_layout Plain Layout -bibtopic -\end_layout +For more information see +\begin_inset CommandInset href +LatexCommand href +target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html" +literal "false" \end_inset - is used, \SpecialChar LyX - encloses the specified units in -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -bibtopic \end_layout \end_inset -'s -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -\backslash -begin{btUnit} \end_layout -\end_inset +\begin_layout Standard +The coordinates are written into a \SpecialChar TeX + file. + To use it for your \SpecialChar LyX + document +\end_layout - and -\begin_inset Flex Code -status collapsed +\begin_layout Enumerate +Place the cursor before the first character of your paragraph (or into a + new empty one). +\end_layout -\begin_layout Plain Layout +\begin_layout Enumerate +Open in \SpecialChar LyX + the menu +\family sans +Insert\SpecialChar menuseparator +File\SpecialChar menuseparator +Child +\begin_inset space ~ +\end_inset -\backslash -end{btUnit} +Document +\family default +, select the file and use +\family sans +Input +\family default + as +\family sans +Include Type. \end_layout +\begin_layout Standard +\begin_inset VSpace defskip \end_inset - in order to create the units. - Note that this approach has some limitations. - First, every citation reference has to be inside some -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -btUnit \end_layout -\end_inset +\begin_layout Standard +\begin_inset Note Greyedout +status open -. - So citations outside a defined unit (e. -\begin_inset space \thinspace{} -\end_inset +\begin_layout Plain Layout -g., before the first section if you use -\begin_inset Quotes eld -\end_inset +\series bold +Note +\series default +: The changed shape only applies to the current paragraph; everything is + reset to normal for the next paragraph. + Therefore the shape definition file must be input into every paragraph + with the desired shape. +\end_layout -by section -\begin_inset Quotes erd \end_inset -) will appear as -\begin_inset Quotes eld -\end_inset -??? -\begin_inset Quotes erd +\end_layout + +\begin_layout Standard +\begin_inset VSpace bigskip \end_inset -. - You can also create your own units by entering -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout +\end_layout -\backslash -begin{btUnit} +\begin_layout Standard +Here is an example: \end_layout +\begin_layout Standard +\begin_inset VSpace bigskip \end_inset - and -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -\backslash -end{btUnit} \end_layout +\begin_layout Standard +\begin_inset CommandInset include +LatexCommand input +filename "SpecialParagraphShape.tex" +literal "true" + \end_inset - as \SpecialChar TeX - code (for instance to work around the mentioned limitation). - Note, though, that -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -btUnit +\lang latin +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy + eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam + voluptua. + At vero eos et accusam et justo duo dolores et ea rebum. + Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor + sit amet. + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy + eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam + voluptua. \end_layout +\begin_layout Standard +\begin_inset VSpace bigskip \end_inset -s cannot be nested. - A second limitation is that -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -bibtopic \end_layout -\end_inset +\begin_layout Standard - always processes all references of a bibliography database, even if they - are not cited. - This can result in odd labels (e. -\begin_inset space \thinspace{} -\end_inset +\series bold +A tip: +\series default + to draw complexer shapes in +\family sans +Jpgfdraw +\family default + you can draw the shape in a program of your choice and import the resulting + image to +\family sans +Jpgfdraw +\family default +. + Then you only need to draw a line or spline along the outline of the image. +\end_layout -g. - -\begin_inset Quotes eld +\begin_layout Standard +\begin_inset VSpace bigskip \end_inset -Miller 2014b -\begin_inset Quotes erd -\end_inset - if two works of this author from 2014 are in the database, even if only - one is cited). \end_layout \begin_layout Standard -If you use +The module \family sans -Biblatex +Custom paragraph shapes \family default -, the -\begin_inset Flex Code + also provides the two commands +\family sans +shapepar +\family default + and +\family sans +Shapepar +\family default + which can be used to define custom shapes coordinate by coordinate. +\begin_inset Foot status collapsed \begin_layout Plain Layout -refsection +These commands are internally used for all shapes described here. \end_layout \end_inset - option is used instead. - If you need specific units, you can start them with the \SpecialChar TeX - code + For information how these styles are used and about further customization + possibilities, have a look at the +\begin_inset CommandInset href +LatexCommand href +name "documentation" +target "https://www.ctan.org/tex-archive/macros/latex/contrib/shapepar/shapepar.pdf" +literal "false" + +\end_inset + + of the package \begin_inset Flex Code status collapsed \begin_layout Plain Layout - -\backslash -newrefsection +shapepar \end_layout \end_inset - or -\begin_inset Flex Code -status collapsed +. +\end_layout -\begin_layout Plain Layout +\begin_layout Chapter +Supplemental Tools +\end_layout -\backslash -newrefsegment +\begin_layout Section +Customizing Bibliographies with Bib\SpecialChar TeX + or Biblatex +\end_layout + +\begin_layout Standard +The most basic information about how to use Bib\SpecialChar TeX + or +\family sans +Biblatex +\family default + with \SpecialChar LyX + is contained in the section +\emph on +Bibliography databases +\emph default + of the +\emph on +User's Guide +\emph default +. + The following subsections explain special bibliography features supported + by \SpecialChar LyX +. +\end_layout + +\begin_layout Subsection +Alternative Citation Styles \end_layout +\begin_layout Standard +Standard Bib\SpecialChar TeX + uses numbers (e. +\begin_inset space \thinspace{} \end_inset -, respectively. - If you also want to control the end of the unit, use the environment -\begin_inset Flex Code -status collapsed +g. +\begin_inset space \space{} +\end_inset -\begin_layout Plain Layout -\backslash -begin{refsection} -\end_layout +\begin_inset Quotes eld +\end_inset +[12] +\begin_inset Quotes erd \end_inset - \SpecialChar ldots - +) to refer to a cited work. + However, in many scientific disciplines, other citation styles are in use. + The most common one is the author-year style (e. +\begin_inset space \thinspace{} +\end_inset + +g. +\begin_inset space \space{} +\end_inset + + +\begin_inset Quotes eld +\end_inset + +Knuth 1984a +\begin_inset Quotes erd +\end_inset + +). + \SpecialChar LyX + supports three packages that provide this style, \begin_inset Flex Code status collapsed \begin_layout Plain Layout - -\backslash -end{refsection} +biblatex \end_layout \end_inset - instead. - Note, though, that +, \begin_inset Flex Code status collapsed \begin_layout Plain Layout -refsection +natbib \end_layout \end_inset -s cannot be nested. - In addition to the individual bibliography of the current unit, -\family sans -Biblatex -\family default - also provides an easy way to output all bibliographies, subsequently, at - one place (e. -\begin_inset space \thinspace{} -\end_inset +, and +\begin_inset Flex Code +status collapsed -g., at the end of the document). - Select -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout +jurabib +\end_layout -all reference units -\begin_inset Quotes erd \end_inset - from the Content combo box of the Bib(la)TeX inset dialog in order to achieve - this. - Please refer to the -\family sans -Biblatex -\family default - manual for more information on this topic. -\end_layout - -\begin_layout Section -Multipart Documents -\end_layout +. + Each of these packages has their pros and cons, which cannot be listed + in detail. + If you only want to have simple author-year (or author-numerical) style, + or if you want to use one of the countless style files for +\begin_inset Flex Code +status collapsed -\begin_layout Subsection -General Operation +\begin_layout Plain Layout +natbib \end_layout -\begin_layout Standard -When you are working on a large file with many sections, it is often convenient - to break up the document into several files, or perhaps you have something - where a table may change from time to time, but the preceding text does - not. - In these cases, you should seriously consider using multipart documents. - For example, scientific papers often have five major sections: the introduction -, observations, results, discussion, and conclusion. - Each of these could be its own separate \SpecialChar LyX - file, with one -\begin_inset Quotes eld \end_inset -master -\begin_inset Quotes erd -\end_inset +, then the established +\begin_inset Flex Code +status collapsed - file which contains the title, authors, abstract, references, etc., plus - the five included files. - It is important to note that each of these files is a full \SpecialChar LyX - file which - can be formatted and printed on its own, as well as included in a master - file. - Each of these files must have the same document class, however—don't attempt - to mix book classes with article classes. - You may also include \SpecialChar LaTeX - files; however, these files must not have their own - preamble (i. -\begin_inset space \thinspace{} -\end_inset +\begin_layout Plain Layout +natbib +\end_layout -e. -\begin_inset space \space{} \end_inset -everything up to and including the + package is probably your choice. + If you look for specific citation styles common in law studies, you might + consider the \begin_inset Flex Code status collapsed \begin_layout Plain Layout - -\backslash -begin{document} +jurabib \end_layout \end_inset - line as well as the + package. + If you want to have full control over the formatting or look for advanced + features such as ibidem, footnote citations, full title citations, advanced + date formats (such as 400 BC) or full localization to other languages than + English, you should definitely consider \begin_inset Flex Code status collapsed \begin_layout Plain Layout - -\backslash -end{document} +biblatex \end_layout \end_inset - line must be deleted) or else errors will be generated when you try to - make a DVI file. +, which exceeds all other packages in terms of features, but is also quite + heavy and more resource-hungry. \end_layout \begin_layout Standard -\SpecialChar LyX - allows you to include files quite easily with +The handling of these packages in \SpecialChar LyX + is basically the same. + Go to \begin_inset Flex Noun status collapsed \begin_layout Plain Layout -Insert\SpecialChar menuseparator -Child -\begin_inset space ~ +Document\SpecialChar menuseparator +Settings +\end_layout + \end_inset -Document + and select under +\begin_inset Flex Noun +status collapsed + +\begin_layout Plain Layout +Bibliography \end_layout \end_inset -. - When you click on this selection a small box is inserted into the file - at the current cursor location. - Clicking on the box raises a dialog which allows you to select the file - to be included, and the method of its inclusion. - + the +\begin_inset Flex Noun +status collapsed + +\begin_layout Plain Layout +Style Format \end_layout -\begin_layout Standard -The file selection box should by now be obvious. - The three inclusion methods are -\begin_inset Quotes eld \end_inset -include -\begin_inset Quotes erd -\end_inset + +\begin_inset Flex Noun +status collapsed -, -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout +Basic (BibTeX) +\end_layout -input -\begin_inset Quotes erd \end_inset -, and -\begin_inset Quotes eld -\end_inset +, +\begin_inset Flex Noun +status collapsed + +\begin_layout Plain Layout +Biblatex +\end_layout -verbatim -\begin_inset Quotes erd \end_inset -. - The methods -\begin_inset Quotes eld -\end_inset +, +\begin_inset Flex Noun +status collapsed -include -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout +Biblatex (Natbib mode) +\end_layout - and -\begin_inset Quotes eld \end_inset -input -\begin_inset Quotes erd +, +\begin_inset Flex Noun +status collapsed + +\begin_layout Plain Layout +Natbib (BibTeX) +\end_layout + \end_inset - are similar in many ways, but there are also some notable differences: + or +\begin_inset Flex Noun +status collapsed + +\begin_layout Plain Layout +Jurabib (BibTeX) \end_layout -\begin_layout Enumerate -Files that are -\begin_inset Quotes eld \end_inset -included -\begin_inset Quotes erd + (see sec. +\begin_inset space ~ \end_inset - are typeset beginning on a new page, while files that are +6.5.3 in the User's Guide for more information on these choices). + With all these packages, you will get some extra features in the citation + dialog and you can select the style of the reference ( \begin_inset Quotes eld \end_inset -inputted +Knuth 1984 \begin_inset Quotes erd \end_inset - are typeset starting on the current page. -\end_layout - -\begin_layout Enumerate +, \begin_inset Quotes eld \end_inset -Included +Knuth (1984) \begin_inset Quotes erd \end_inset - files cannot themselves +, \begin_inset Quotes eld \end_inset -include +Knuth, 1984 \begin_inset Quotes erd \end_inset - further files ( +, \begin_inset Quotes eld \end_inset -grandchilds +1984 \begin_inset Quotes erd \end_inset -). - With -\begin_inset Quotes eld -\end_inset + etc.). + Note that either package needs specifically designed style files. + They all ship their own, but there are lots of additional style files, + and there is even an interactive style file builder +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout +See +\begin_inset Flex URL +status open + +\begin_layout Plain Layout + +ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/ +\end_layout -input -\begin_inset Quotes erd \end_inset -, on the other hand, infinite sub-inputting is possible. + \end_layout -\begin_layout Enumerate -\begin_inset Quotes eld \end_inset -Include -\begin_inset Quotes erd + for +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +natbib +\end_layout + \end_inset - allow for the output of only selected +. +\end_layout + +\begin_layout Subsection +Subdivided Bibliographies +\end_layout + +\begin_layout Standard +Sometimes you might need to divide your bibliography into several sections. + If you are for instance a historian, the possibility to separate sources + and scientific works is most likely a \begin_inset Quotes eld \end_inset -included +must have \begin_inset Quotes erd \end_inset - files, while maintaining the actual counters (pagination etc.) and references - (please refer to the section -\emph on -Child -\begin_inset space ~ -\end_inset +. + Unfortunately, Bib\SpecialChar TeX + itself does not allow you to do this. + But with the help of some \SpecialChar LaTeX + packages, Bib\SpecialChar TeX + can be extended to fit your needs. +\end_layout -Documents -\emph default - of the -\emph on -Embedded -\begin_inset space ~ -\end_inset +\begin_layout Standard +\SpecialChar LyX + provides native support for one of these packages, +\family typewriter +bibtopic +\family default +. +\begin_inset Foot +status collapsed -Objects -\emph default - manual for details). +\begin_layout Plain Layout +Available from +\begin_inset Flex URL +status open + +\begin_layout Plain Layout + +ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/ \end_layout -\begin_layout Standard -Hence, -\begin_inset Quotes eld \end_inset -include -\begin_inset Quotes erd + +\end_layout + \end_inset - is the preferred method for chapters that are outsourced to child documents, - while + The advantage of this package (compared to other packages such as +\family typewriter +multibib +\family default +) is that you don't need to define new citation commands. + Instead, you need to prepare different bibliographic databases which include + the entries for the different sections of the bibliography. + For example: If you want to divide your bibliography into the sections + \begin_inset Quotes eld \end_inset -input +Sources \begin_inset Quotes erd \end_inset - is more suitable for arbitrary file inheritance. -\end_layout - -\begin_layout Standard -A + and \begin_inset Quotes eld \end_inset -verbatim +Scientific works \begin_inset Quotes erd \end_inset - included file allows you to include a file typeset exactly as it appears - in the file, i. +, you first need to create two bibliographic databases, e. \begin_inset space \thinspace{} \end_inset -e. +g. \begin_inset space \space{} \end_inset -in + \begin_inset Flex Code status collapsed \begin_layout Plain Layout -verbatim +sources.bib \end_layout \end_inset - mode, with the characters set in a fixed-width typewriter font. - Normally, spaces in this file are invisible, though two consecutive spaces - are conserved, unlike \SpecialChar LyX -'s normal treatment of spaces. - However, setting the -\begin_inset Flex Noun + and +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Mark -\begin_inset space ~ -\end_inset - -spaces -\begin_inset space ~ -\end_inset - -in -\begin_inset space ~ -\end_inset - -output +scientific.bib \end_layout \end_inset - checkbox typesets a mark to unambiguously define the presence of a space. +. \end_layout \begin_layout Standard -Generally, the master file is converted into a full \SpecialChar LaTeX - file before typesetting, - while the included files are converted to \SpecialChar LaTeX - files that do not have all the - preamble information. -\end_layout +Go to +\begin_inset Flex Noun +status collapsed -\begin_layout Subsection -Cross-References Between Files +\begin_layout Plain Layout +Document\SpecialChar menuseparator +Settings \end_layout -\begin_layout Standard -\begin_inset Box Shadowbox -position "t" -hor_pos "c" -has_inner_box 1 -inner_pos "t" -use_parbox 0 -use_makebox 0 -width "100col%" -special "none" -height "1in" -height_special "totalheight" -thickness "0.4pt" -separation "3pt" -shadowsize "4pt" -framecolor "black" -backgroundcolor "none" -status open +\end_inset + + and check under +\begin_inset Flex Noun +status collapsed \begin_layout Plain Layout -This section is somewhat out of date. - Need to describe default master documents and how children are opened when - the master is. - [[FIXME]] +Bibliography \end_layout \end_inset + the option +\begin_inset Flex Noun +status collapsed +\begin_layout Plain Layout +Subdivided bibliography \end_layout -\begin_layout Standard -It is possible to set up cross-references between the different files. - First, open all the files in question: let's call them A and B in a two - file example, where B is included in A. - Let's say you insert a label in A, then want to reference it in B. - Open the cross-reference dialog whilst in document B, and you can select - the -\begin_inset Quotes eld \end_inset -buffer -\begin_inset Quotes erd -\end_inset +. + Now you can insert multiple Bib\SpecialChar TeX + bibliographies, one for each section of + your bibliography. + Returning to our example: Insert the Bib\SpecialChar TeX + bibliography +\begin_inset Flex Code +status collapsed - to use. +\begin_layout Plain Layout +sources.bib \end_layout -\begin_layout Subsection -Bibliography Lists in all Subdocuments -\end_layout +\end_inset -\begin_layout Standard -If you work with child documents, you might want to have only one main bibliogra -phy at the end, but still be able to have a selected bibliography for the - child if you output it on its own. - Here is how to achieve this. -\end_layout + and a second one for the database +\begin_inset Flex Code +status collapsed -\begin_layout Standard -For the main document, you just insert a bibliography inset at the place - where the main bibliography has to appear (within the master file or within - a child). - If the bibliography inset is in the master file, the references will be - inherited by all children, so they are available in the citation dialog - within each child. +\begin_layout Plain Layout +scientific.bib \end_layout -\begin_layout Standard -For child-specific bibliographies, insert bibliography insets within the - child documents, at the place where the bibliography should appear when - the child is compiled separately. - However, the trick is to insert them into a branch ( -\family sans -Insert\SpecialChar menuseparator -Branch\SpecialChar menuseparator -Insert New Branch... -\family default -), e. -\begin_inset space \thinspace{} \end_inset -g. - called +. + You are free to use the same or different styles for each section. + Additionally, you can choose if the bibliography section should contain + \begin_inset Quotes eld \end_inset -Childonly +all cited references \begin_inset Quotes erd \end_inset -. - Within the children, activate the branch ( -\family sans -Document\SpecialChar menuseparator -Settings...\SpecialChar menuseparator -Branches -\family default -). - Within the master, deactivate the branch ( -\family sans -Document\SpecialChar menuseparator -Settings...\SpecialChar menuseparator -Branches -\family default -). - Now the child's bibliography will be ignored by the master, but considered - by the child. -\end_layout - -\begin_layout Standard -If you need multiple bibliographies (e. -\begin_inset space \thinspace{} + of the specified database(s) (which is the default), +\begin_inset Quotes eld \end_inset -g., one per child in the -\emph on -main document -\emph default -), please refer to sec. -\begin_inset space ~ +all uncited references +\begin_inset Quotes erd \end_inset + or even +\begin_inset Quotes eld +\end_inset -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:Multiple-Bibliographies" - +all references +\begin_inset Quotes erd \end_inset . -\end_layout + This might be useful if you would like to separate your bibliography into + three sections: +\begin_inset Quotes eld +\end_inset -\begin_layout Section -\SpecialChar LyX - Archives -\end_layout +Cited sources +\begin_inset Quotes erd +\end_inset -\begin_layout Standard -Users sometimes need to be able to +, \begin_inset Quotes eld \end_inset -bundle +Uncited sources \begin_inset Quotes erd \end_inset - a \SpecialChar LyX - file together with all the images (and other files) on which it depends, - either for sending to a publisher or for sharing with a co-author. - \SpecialChar LyX - includes a Python script ( -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -lyxpak.py -\end_layout +, and +\begin_inset Quotes eld +\end_inset +Scientific works +\begin_inset Quotes erd \end_inset -) that automates this process. - To use it, you must have either the +. + The titles for the sections can be added as ordinary sections or subsections. + Since \begin_inset Flex Code status collapsed \begin_layout Plain Layout -zipfile +bibtopic \end_layout \end_inset - or -\begin_inset Flex Code + removes the bibliography title, you have to manually re-add that, too (as + a chapter* or section*, for instance). +\end_layout + +\begin_layout Standard +With +\family sans +Biblatex +\family default +, the procedure is a bit different. + Since +\family typewriter +bibtopic +\family default + does not work with +\family sans +Biblatex +\family default +, the aforementioned +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout -tarfile +Subdivided bibliography \end_layout \end_inset - python modules installed on your system. - By default, the script prefers the + option is disabled if you use +\family sans +Biblatex +\family default +. + However, +\family sans +Biblatex +\family default + provides its own means to generate subdivided bibliographies. + You can either add keywords to bibliography entries via the \begin_inset Flex Code status collapsed \begin_layout Plain Layout -gzip +keywords \end_layout \end_inset --compressed + entry option and then filter bibliography sections by keyword (by adding + \begin_inset Flex Code status collapsed \begin_layout Plain Layout -tar +keyword=mykeyword \end_layout \end_inset - format on Unix-like systems and the -\begin_inset Flex Code + to the +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout -zip +Options \end_layout \end_inset - format on Windows. -\end_layout - -\begin_layout Standard -\SpecialChar LyX -'s configuration process will set the script up to export a `\SpecialChar LyX - Archive', - and this format will then be available under -\begin_inset Flex Code + field of the dialog that opens if you left-click on the +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout -File\SpecialChar menuseparator -Export +Biblatex Generated Bibliography \end_layout \end_inset -. -\end_layout + button), or you can filter by entry types (such as +\emph on +book +\emph default + or +\emph on +article +\emph default +) by entering e. +\begin_inset space \thinspace{} +\end_inset -\begin_layout Standard -Independently of the platform, the generation of a particular archive format - can be forced by adding either the +g. + \begin_inset Flex Code status collapsed \begin_layout Plain Layout --t +type=book \end_layout \end_inset - (for the + or \begin_inset Flex Code status collapsed \begin_layout Plain Layout -tar +nottype=collection \end_layout \end_inset - format) or -\begin_inset Flex Code + to the mentioned +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout --z +Options \end_layout \end_inset - (for the -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -zip -\end_layout + field, or you can create so-called +\begin_inset Quotes eld +\end_inset + +Bibliography Categories +\begin_inset Quotes erd +\end_inset + + to which you can assign individual entries. + Please refer to the Biblatex manual, section +\emph on +Subdivided Bibliographies +\emph default +, for details. +\end_layout + +\begin_layout Subsection +Multiple Bibliographies +\begin_inset CommandInset label +LatexCommand label +name "subsec:Multiple-Bibliographies" \end_inset - format) switch to the -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -\SpecialChar LyX -\SpecialChar menuseparator -\SpecialChar LyX - Archive \end_layout +\begin_layout Standard +Multiple bibliographies, e. +\begin_inset space \thinspace{} +\end_inset + +g. +\begin_inset space \space{} \end_inset - converter in -\begin_inset Flex Code +a bibliography for each part, chapter, section, subsection or child (sub-documen +t) of the document, are also supported by \SpecialChar LyX +. + In order to enable it, go to +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout -Tools\SpecialChar menuseparator -Preferences\SpecialChar menuseparator -File Handling\SpecialChar menuseparator -Converters +Document\SpecialChar menuseparator +Settings\SpecialChar menuseparator +Bibliography \end_layout \end_inset -. - (Make sure you add the switch after the script name, not before it.) + and select the relevant unit (e. +\begin_inset space \thinspace{} +\end_inset + +g., +\begin_inset Quotes eld +\end_inset + +per section +\begin_inset Quotes erd +\end_inset + +) in the +\begin_inset Flex Noun +status collapsed + +\begin_layout Plain Layout +Multiple Bibliographies \end_layout -\begin_layout Section -Fancy Headers and Footers +\end_inset + + combo box. + Then add a Bib(la)\SpecialChar TeX + bibliography to each unit (e. +\begin_inset space \thinspace{} +\end_inset + +g., section) of your document. + In the output, a separate bibliography, containing only the references + done in the current unit is generated. \end_layout \begin_layout Standard -The default page layout is rather plain; for an +If you use Bib\SpecialChar TeX +, either the \begin_inset Flex Code status collapsed \begin_layout Plain Layout -article +chapterbib \end_layout \end_inset - document class, all you get is a centered page number at the bottom of - the page. - This document uses KOMA-script's book class, so it appears to be a bit - fancier. - But to really put on a show, you need to set the document page style to - + or the +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +bibtopic +\end_layout + +\end_inset + + package is used to create multiple bibliographies. + The former package is used if you select \begin_inset Quotes eld \end_inset -fancy +per child document \begin_inset Quotes erd \end_inset -, as mentioned in the + and do \emph on -User Guide +not \emph default -. - This section describes the \SpecialChar LaTeX - code you need to insert in your \SpecialChar LaTeX - preamble in - order to get the desired effects. -\end_layout - -\begin_layout Standard -For more information on fancy headers, see the -\begin_inset Flex Code + check +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout -fancyhdr +Sectioned Bibliography \end_layout \end_inset - package documentation. - ( -\begin_inset Flex URL +. + In all other cases, +\begin_inset Flex Code status collapsed \begin_layout Plain Layout - -https://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html +bibtopic \end_layout \end_inset -) -\end_layout + is used. +\begin_inset Foot +status collapsed -\begin_layout Standard -The page header is divided into three fields, not surprisingly labeled -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout +An alternative approach, if you are willing to use some +\begin_inset Flex Noun +status collapsed -left -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout +\SpecialChar TeX + Code +\end_layout -, -\begin_inset Quotes eld \end_inset -center -\begin_inset Quotes erd + (see section +\begin_inset space ~ \end_inset -, and -\begin_inset Quotes eld -\end_inset -right -\begin_inset Quotes erd +\begin_inset CommandInset ref +LatexCommand ref +reference "sec:Inserting-TeX-Code" + \end_inset -. - The footer is also divided into these three fields. - The \SpecialChar LaTeX - commands to set these fields in the simplest manner are +), is to use the \begin_inset Flex Code status collapsed \begin_layout Plain Layout +bibunits +\end_layout -\backslash -lhead +\end_inset + + package. \end_layout \end_inset -, + If \begin_inset Flex Code status collapsed \begin_layout Plain Layout - -\backslash -chead +bibtopic \end_layout \end_inset -, + is used, \SpecialChar LyX + encloses the specified units in \begin_inset Flex Code status collapsed \begin_layout Plain Layout - -\backslash -rhead +bibtopic \end_layout \end_inset -, +'s \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash -lfoot +begin{btUnit} \end_layout \end_inset -, etc. - Suppose you wish to put your name in the upper left hand corner of each - page. - Simply insert the following command in the preamble: -\end_layout - -\begin_layout Standard + and +\begin_inset Flex Code +status collapsed -\family typewriter +\begin_layout Plain Layout \backslash -lhead{John Q. - DocWriter} +end{btUnit} \end_layout -\begin_layout Standard -You will now see your name in the upper left. - If a field has a default entry that you would like to get rid of (often - the page number appears in the central footer) simply include a command - with a blank argument, e. -\begin_inset space \thinspace{} \end_inset -g.: -\end_layout + in order to create the units. + Note that this approach has some limitations. + First, every citation reference has to be inside some +\begin_inset Flex Code +status collapsed -\begin_layout Standard +\begin_layout Plain Layout +btUnit +\end_layout -\family typewriter +\end_inset -\backslash -cfoot{} -\end_layout +. + So citations outside a defined unit (e. +\begin_inset space \thinspace{} +\end_inset -\begin_layout Standard -Let's get really fancy: lets put the section number with the word +g., before the first section if you use \begin_inset Quotes eld \end_inset -Section +by section \begin_inset Quotes erd \end_inset - (e. -\begin_inset space \thinspace{} +) will appear as +\begin_inset Quotes eld \end_inset -g. -\begin_inset space \space{} +??? +\begin_inset Quotes erd \end_inset -Section 3) in the upper left, the page number (e. -\begin_inset space \thinspace{} -\end_inset +. + You can also create your own units by entering +\begin_inset Flex Code +status collapsed -g. -\begin_inset space \space{} -\end_inset +\begin_layout Plain Layout -Page 4) in the upper right, your name in the lower left, and the date in - the lower right. - The following commands should now appear in the preamble: +\backslash +begin{btUnit} \end_layout -\begin_layout Standard +\end_inset -\family typewriter + and +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout \backslash -lhead{Section -\backslash -thesection} +end{btUnit} \end_layout -\begin_layout Standard +\end_inset -\family typewriter + as \SpecialChar TeX + code (for instance to work around the mentioned limitation). + Note, though, that +\begin_inset Flex Code +status collapsed -\backslash -chead{} +\begin_layout Plain Layout +btUnit \end_layout -\begin_layout Standard +\end_inset -\family typewriter +s cannot be nested. + A second limitation is that +\begin_inset Flex Code +status collapsed -\backslash -rhead{Page -\backslash -thepage} +\begin_layout Plain Layout +bibtopic \end_layout -\begin_layout Standard - -\family typewriter +\end_inset -\backslash -lfoot{John Q. - DocWriter} -\end_layout + always processes all references of a bibliography database, even if they + are not cited. + This can result in odd labels (e. +\begin_inset space \thinspace{} +\end_inset -\begin_layout Standard +g. + +\begin_inset Quotes eld +\end_inset -\family typewriter +Miller 2014b +\begin_inset Quotes erd +\end_inset -\backslash -cfoot{} + if two works of this author from 2014 are in the database, even if only + one is cited). \end_layout \begin_layout Standard +If you use +\family sans +Biblatex +\family default +, the +\begin_inset Flex Code +status collapsed -\family typewriter - -\backslash -rfoot{ -\backslash -today} +\begin_layout Plain Layout +refsection \end_layout -\begin_layout Standard -The commands +\end_inset + + option is used instead. + If you need specific units, you can start them with the \SpecialChar TeX + code \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash -thesection +newrefsection \end_layout \end_inset - and + or \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash -thepage +newrefsegment \end_layout \end_inset - access \SpecialChar LaTeX -'s section and page counters, and so print out the current section - and page number. - +, respectively. + If you also want to control the end of the unit, use the environment \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash -today +begin{refsection} \end_layout \end_inset - simply prints out today's date. -\end_layout - -\begin_layout Standard -The thicknesses of the horizontal rules drawn beneath the header and above - the footer can also be modified. - If you don't want one of the rules, set its thickness to 0. - The header rule has a default thickness of 0.4pt, the footer rule is 0pt. - Use commands -\family typewriter + \SpecialChar ldots -\family default -like \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash -renewcommand{ -\backslash -headrulewidth}{0.4pt} +end{refsection} \end_layout \end_inset - and + instead. + Note, though, that \begin_inset Flex Code status collapsed \begin_layout Plain Layout - -\backslash -renewcommand{ -\backslash -footrulewidth}{0.4pt} +refsection \end_layout \end_inset - to set the thicknesses. +s cannot be nested. + In addition to the individual bibliography of the current unit, +\family sans +Biblatex +\family default + also provides an easy way to output all bibliographies, subsequently, at + one place (e. +\begin_inset space \thinspace{} +\end_inset + +g., at the end of the document). + Select +\begin_inset Quotes eld +\end_inset + +all reference units +\begin_inset Quotes erd +\end_inset + + from the Content combo box of the Bib(la)TeX inset dialog in order to achieve + this. + Please refer to the +\family sans +Biblatex +\family default + manual for more information on this topic. +\end_layout + +\begin_layout Section +Multipart Documents +\end_layout + +\begin_layout Subsection +General Operation \end_layout \begin_layout Standard -You can switch the header/footer settings on and off for individual pages - using commands like -\begin_inset Flex Code -status collapsed +When you are working on a large file with many sections, it is often convenient + to break up the document into several files, or perhaps you have something + where a table may change from time to time, but the preceding text does + not. + In these cases, you should seriously consider using multipart documents. + For example, scientific papers often have five major sections: the introduction +, observations, results, discussion, and conclusion. + Each of these could be its own separate \SpecialChar LyX + file, with one +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout +master +\begin_inset Quotes erd +\end_inset -\backslash -thispagestyle{empty} -\end_layout + file which contains the title, authors, abstract, references, etc., plus + the five included files. + It is important to note that each of these files is a full \SpecialChar LyX + file which + can be formatted and printed on its own, as well as included in a master + file. + Each of these files must have the same document class, however—don't attempt + to mix book classes with article classes. + You may also include \SpecialChar LaTeX + files; however, these files must not have their own + preamble (i. +\begin_inset space \thinspace{} +\end_inset +e. +\begin_inset space \space{} \end_inset -, +everything up to and including the \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash -thispagestyle{plain} +begin{document} \end_layout \end_inset -, and + line as well as the \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash -thispagestyle{fancy} +end{document} \end_layout \end_inset -. - Simply insert them in the text on the page you want changed and mark them - as \SpecialChar TeX - code. - In fact, title pages are marked as plain by default, while following pages - are marked fancy when using the global fancy setting. -\end_layout - -\begin_layout Standard -As a final example, it is possible to include an image in the header or - footer. - Suppose you want to put a company logo in the upper lefthand corner. - You might try something like -\end_layout - -\begin_layout Standard - -\family typewriter - -\backslash -lhead{ -\backslash -resizebox{1in}{!}{ -\backslash -includegraphics{logo.eps}}} + line must be deleted) or else errors will be generated when you try to + make a DVI file. \end_layout \begin_layout Standard -\noindent -(you may need to preface this with -\begin_inset Flex Code +\SpecialChar LyX + allows you to include files quite easily with +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout +Insert\SpecialChar menuseparator +Child +\begin_inset space ~ +\end_inset -\backslash -usepackage{graphics} +Document \end_layout \end_inset - if you don't include graphics elsewhere in your document). -\end_layout - -\begin_layout Section -Itemize Bullet Selection -\begin_inset CommandInset label -LatexCommand label -name "sec:bullet" +. + When you click on this selection a small box is inserted into the file + at the current cursor location. + Clicking on the box raises a dialog which allows you to select the file + to be included, and the method of its inclusion. + +\end_layout +\begin_layout Standard +The file selection box should by now be obvious. + The three inclusion methods are +\begin_inset Quotes eld \end_inset +include +\begin_inset Quotes erd +\end_inset -\end_layout +, +\begin_inset Quotes eld +\end_inset -\begin_layout Standard -by -\noun on - Allan Rae -\end_layout +input +\begin_inset Quotes erd +\end_inset -\begin_layout Subsection -Introduction -\end_layout +, and +\begin_inset Quotes eld +\end_inset -\begin_layout Standard -\SpecialChar LyX - provides 216 bullet shapes that can be accessed from a simple dialog. - Using this dialog you can easily specify what bullet shape to use at each - level of an itemized list. - These settings are document-wide so you won't be able to specify different - sets of bullets for different paragraphs. -\begin_inset Foot -status collapsed +verbatim +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -Well, actually you can but you'll have to do it by hand. -\end_layout +. + The methods +\begin_inset Quotes eld +\end_inset +include +\begin_inset Quotes erd \end_inset + and +\begin_inset Quotes eld +\end_inset -\end_layout +input +\begin_inset Quotes erd +\end_inset -\begin_layout Subsection -How it looks + are similar in many ways, but there are also some notable differences: \end_layout -\begin_layout Standard -Open the dialog by selecting the -\begin_inset Flex Noun -status collapsed +\begin_layout Enumerate +Files that are +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout -Document\SpecialChar menuseparator -Settings -\end_layout +included +\begin_inset Quotes erd +\end_inset + are typeset beginning on a new page, while files that are +\begin_inset Quotes eld \end_inset - menu item and then select the -\begin_inset Flex Noun -status collapsed +inputted +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -Bullets + are typeset starting on the current page. \end_layout +\begin_layout Enumerate +\begin_inset Quotes eld \end_inset - tab. -\end_layout +Included +\begin_inset Quotes erd +\end_inset -\begin_layout Standard -The dialog provides you with a table of bullet shapes. - A column of buttons on the left of the table provides access to the six - different panels of bullet shapes. - The row of buttons across the top is used to select which bullet depth - you are changing. + files cannot themselves +\begin_inset Quotes eld +\end_inset -\change_deleted 244031559 1603875981 - A text entry under the table shows the currently selected bullet shape's - \SpecialChar LaTeX - equivalent and this can be edited if desired. - If you do modify the text you will also need to specify any needed packages - in the \SpecialChar LaTeX - preamble. -\change_unchanged +include +\begin_inset Quotes erd +\end_inset -\end_layout + further files ( +\begin_inset Quotes eld +\end_inset -\begin_layout Standard -The six panels are divided up by the packages they require. - The following table shows the mappings from button name to \SpecialChar LaTeX - package. -\end_layout +grandchilds +\begin_inset Quotes erd +\end_inset -\begin_layout Standard -\align center -\begin_inset Tabular - - - - - - -\begin_inset Text +). + With +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout +input +\begin_inset Quotes erd +\end_inset -\family roman -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -Button +, on the other hand, infinite sub-inputting is possible. \end_layout +\begin_layout Enumerate +\begin_inset Quotes eld \end_inset - - -\begin_inset Text -\begin_layout Plain Layout +Include +\begin_inset Quotes erd +\end_inset -\family roman -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -Packages Required -\end_layout + allow for the output of only selected +\begin_inset Quotes eld +\end_inset +included +\begin_inset Quotes erd \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout + files, while maintaining the actual counters (pagination etc.) and references + (please refer to the section +\emph on +Child +\begin_inset space ~ +\end_inset -\family sans -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -Standard +Documents +\emph default + of the +\emph on +Embedded +\begin_inset space ~ +\end_inset + +Objects +\emph default + manual for details). \end_layout +\begin_layout Standard +Hence, +\begin_inset Quotes eld \end_inset - - -\begin_inset Text -\begin_layout Plain Layout +include +\begin_inset Quotes erd +\end_inset -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -base \SpecialChar LaTeX + is the preferred method for chapters that are outsourced to child documents, + while +\begin_inset Quotes eld +\end_inset + +input +\begin_inset Quotes erd +\end_inset + is more suitable for arbitrary file inheritance. \end_layout +\begin_layout Standard +A +\begin_inset Quotes eld \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout - -\family sans -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -Maths -\end_layout +verbatim +\begin_inset Quotes erd +\end_inset + included file allows you to include a file typeset exactly as it appears + in the file, i. +\begin_inset space \thinspace{} \end_inset - - -\begin_inset Text - -\begin_layout Plain Layout - -\family typewriter -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -amssymb.sty -\end_layout +e. +\begin_inset space \space{} \end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout - -\family sans -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -Ding1 -\end_layout -\end_inset - - -\begin_inset Text +in +\begin_inset Flex Code +status collapsed \begin_layout Plain Layout - -\family typewriter -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -pifont.sty +verbatim \end_layout \end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout - -\family sans -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -Ding2 -\end_layout -\end_inset - - -\begin_inset Text + mode, with the characters set in a fixed-width typewriter font. + Normally, spaces in this file are invisible, though two consecutive spaces + are conserved, unlike \SpecialChar LyX +'s normal treatment of spaces. + However, setting the +\begin_inset Flex Noun +status collapsed \begin_layout Plain Layout +Mark +\begin_inset space ~ +\end_inset -\family typewriter -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -pifont.sty -\end_layout - +spaces +\begin_inset space ~ \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout +in +\begin_inset space ~ +\end_inset -\family sans -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -Ding3 +output \end_layout \end_inset - - -\begin_inset Text -\begin_layout Plain Layout - -\family typewriter -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -pifont.sty + checkbox typesets a mark to unambiguously define the presence of a space. + \end_layout -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout +\begin_layout Standard +Generally, the master file is converted into a full \SpecialChar LaTeX + file before typesetting, + while the included files are converted to \SpecialChar LaTeX + files that do not have all the + preamble information. +\end_layout -\family sans -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -Ding4 +\begin_layout Subsection +Cross-References Between Files \end_layout -\end_inset - - -\begin_inset Text +\begin_layout Standard +\begin_inset Box Shadowbox +position "t" +hor_pos "c" +has_inner_box 1 +inner_pos "t" +use_parbox 0 +use_makebox 0 +width "100col%" +special "none" +height "1in" +height_special "totalheight" +thickness "0.4pt" +separation "3pt" +shadowsize "4pt" +framecolor "black" +backgroundcolor "none" +status open \begin_layout Plain Layout - -\family typewriter -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -pifont.sty +This section is somewhat out of date. + Need to describe default master documents and how children are opened when + the master is. + [[FIXME]] \end_layout -\end_inset - - - - \end_inset \end_layout \begin_layout Standard -\SpecialChar LyX - doesn't stop you using bullets from packages you don't have. - If you get errors from \SpecialChar LaTeX - when you try to view or print the file, then it - is likely you are missing a package. -\begin_inset Foot -status collapsed - -\begin_layout Plain Layout -\SpecialChar LyX - doesn't restrict your use since you may be editing locally and exporting - elsewhere. -\end_layout - +It is possible to set up cross-references between the different files. + First, open all the files in question: let's call them A and B in a two + file example, where B is included in A. + Let's say you insert a label in A, then want to reference it in B. + Open the cross-reference dialog whilst in document B, and you can select + the +\begin_inset Quotes eld \end_inset +buffer +\begin_inset Quotes erd +\end_inset + to use. \end_layout \begin_layout Subsection -How to use it +Bibliography Lists in all Subdocuments \end_layout \begin_layout Standard -Select which bullet depth you want to change then select the bullet shape - and size. - Any changes will not be visible in \SpecialChar LyX -, but are visible when viewing the document. +If you work with child documents, you might want to have only one main bibliogra +phy at the end, but still be able to have a selected bibliography for the + child if you output it on its own. + Here is how to achieve this. \end_layout \begin_layout Standard -You can reset a bullet shape to the default simply by clicking your right - mouse button on the appropriate bullet depth button. -\begin_inset Foot -status open - -\begin_layout Plain Layout -If you -\emph on -really -\emph default - want to have multiple sets of paragraphs with different sets of bullets - in each, then you're going to have to get your hands dirty with \SpecialChar TeX - code. - The bullet selection dialog can help though because it provides you with - the \SpecialChar LaTeX - code for a wide range of bullet shapes. - To make your own custom paragraphs you have the following options: +For the main document, you just insert a bibliography inset at the place + where the main bibliography has to appear (within the master file or within + a child). + If the bibliography inset is in the master file, the references will be + inherited by all children, so they are available in the citation dialog + within each child. \end_layout -\begin_layout Plain Layout -\begin_inset ERT -status open +\begin_layout Standard +For child-specific bibliographies, insert bibliography insets within the + child documents, at the place where the bibliography should appear when + the child is compiled separately. + However, the trick is to insert them into a branch ( +\family sans +Insert\SpecialChar menuseparator +Branch\SpecialChar menuseparator +Insert New Branch... +\family default +), e. +\begin_inset space \thinspace{} +\end_inset -\begin_layout Plain Layout +g. + called +\begin_inset Quotes eld +\end_inset +Childonly +\begin_inset Quotes erd +\end_inset -\backslash -let -\backslash -savelabelitemi= -\backslash -labelitemi +. + Within the children, activate the branch ( +\family sans +Document\SpecialChar menuseparator +Settings...\SpecialChar menuseparator +Branches +\family default +). + Within the master, deactivate the branch ( +\family sans +Document\SpecialChar menuseparator +Settings...\SpecialChar menuseparator +Branches +\family default +). + Now the child's bibliography will be ignored by the master, but considered + by the child. \end_layout +\begin_layout Standard +If you need multiple bibliographies (e. +\begin_inset space \thinspace{} \end_inset +g., one per child in the +\emph on +main document +\emph default +), please refer to sec. +\begin_inset space ~ +\end_inset -\end_layout -\begin_layout Plain Layout -\begin_inset ERT -status open +\begin_inset CommandInset ref +LatexCommand ref +reference "subsec:Multiple-Bibliographies" -\begin_layout Plain Layout +\end_inset +. +\end_layout -\backslash -renewcommand -\backslash -labelitemi[0]{ -\backslash -small -\backslash -( -\backslash -sharp -\backslash -)} +\begin_layout Section +\SpecialChar LyX + Archives \end_layout +\begin_layout Standard +Users sometimes need to be able to +\begin_inset Quotes eld \end_inset +bundle +\begin_inset Quotes erd +\end_inset -\end_layout - -\begin_layout Itemize -Use the \SpecialChar LaTeX - command + a \SpecialChar LyX + file together with all the images (and other files) on which it depends, + either for sending to a publisher or for sharing with a co-author. + \SpecialChar LyX + includes a Python script ( \begin_inset Flex Code status collapsed \begin_layout Plain Layout - -\backslash -renewcommand{}{} +lyxpak.py \end_layout \end_inset - to specify a new bullet shape for a given depth. - You'll also need to save the current bullet shape so you can restore it - again afterwards. - In this itemized list the following \SpecialChar LaTeX - code was used to change the bullet - used for the first depth. -\end_layout - -\begin_deeper -\begin_layout LyX-Code +) that automates this process. + To use it, you must have either the +\begin_inset Flex Code +status collapsed -\backslash -let -\backslash -savelabelitemi= -\backslash -labelitemi +\begin_layout Plain Layout +zipfile \end_layout -\begin_layout LyX-Code - -\backslash -renewcommand -\backslash -labelitemi[0]{ -\backslash -small -\backslash -( -\backslash -sharp -\backslash -)} -\end_layout +\end_inset -\end_deeper -\begin_layout Itemize -Note that the itemize depth is specified in Roman numerals as part of the - -\family typewriter + or +\begin_inset Flex Code +status collapsed -\backslash -labelitem -\family default - command. +\begin_layout Plain Layout +tarfile \end_layout -\begin_layout Itemize -\begin_inset Argument item:1 -status open +\end_inset -\begin_layout Plain Layout -\begin_inset ERT -status open + python modules installed on your system. + By default, the script prefers the +\begin_inset Flex Code +status collapsed \begin_layout Plain Layout - - -\backslash -( -\backslash -star -\backslash -) +gzip \end_layout \end_inset +-compressed +\begin_inset Flex Code +status collapsed +\begin_layout Plain Layout +tar \end_layout \end_inset - Specify each individual entry by starting each item with the bullet shape - enclosed in a -\begin_inset Quotes eld -\end_inset - -Custom Item -\begin_inset Quotes erd -\end_inset - - inset (available at -\family sans -Insert\SpecialChar menuseparator -Custom Item -\family default -) and set as -\begin_inset Flex Noun + format on Unix-like systems and the +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -\SpecialChar TeX - Code +zip \end_layout \end_inset -. - For example, this item was started with + format on Windows. +\end_layout + +\begin_layout Standard +\SpecialChar LyX +'s configuration process will set the script up to export a `\SpecialChar LyX + Archive', + and this format will then be available under \begin_inset Flex Code status collapsed \begin_layout Plain Layout - -\backslash -( -\backslash -star -\backslash -) +File\SpecialChar menuseparator +Export \end_layout \end_inset @@ -16430,2627 +16396,3014 @@ star . \end_layout -\begin_layout Plain Layout -\begin_inset ERT -status open +\begin_layout Standard +Independently of the platform, the generation of a particular archive format + can be forced by adding either the +\begin_inset Flex Code +status collapsed \begin_layout Plain Layout - - -\backslash -renewcommand -\backslash -labelitemi[0]{ -\backslash -savelabelitemi} +-t \end_layout \end_inset + (for the +\begin_inset Flex Code +status collapsed -\end_layout - -\begin_layout Plain Layout -You'll also need to revert the labelitem back to its previous setting for - the global bullet shape settings to remain in effect. - The way used here was: -\end_layout - -\begin_layout LyX-Code - -\backslash -renewcommand -\backslash -labelitemi[0]{ -\backslash -savelabelitemi} -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Chapter -\SpecialChar LyX - and the World Wide Web -\end_layout - -\begin_layout Standard -\SpecialChar LyX - has long supported the export of documents to various web-friendly formats, - such as HTML. - Before version 2.0, however, HTML export was always accomplished by the - use of external converters. -\begin_inset Foot -status collapsed - -\begin_layout Plain Layout -For details on the use of external converters with \SpecialChar LyX -, see the -\emph on -Converters -\emph default - section of the Customization manual. +\begin_layout Plain Layout +tar \end_layout \end_inset - These fall into two large groups: there are converters that use \SpecialChar LaTeX - as an - intermediate format, such as + format) or \begin_inset Flex Code status collapsed \begin_layout Plain Layout -htlatex +-z \end_layout \end_inset -, + (for the \begin_inset Flex Code status collapsed \begin_layout Plain Layout -html2latex +zip \end_layout \end_inset -, and + format) switch to the \begin_inset Flex Code status collapsed \begin_layout Plain Layout -plastex +\SpecialChar LyX +\SpecialChar menuseparator +\SpecialChar LyX + Archive \end_layout \end_inset -, relying upon \SpecialChar LyX - to produce the \SpecialChar LaTeX -; and there is a converter that works directly - on \SpecialChar LyX - files, + converter in \begin_inset Flex Code status collapsed \begin_layout Plain Layout -e\SpecialChar LyX -er +Tools\SpecialChar menuseparator +Preferences\SpecialChar menuseparator +File Handling\SpecialChar menuseparator +Converters \end_layout \end_inset . - All of these have different advantages and disadvantages. - + (Make sure you add the switch after the script name, not before it.) +\end_layout + +\begin_layout Section +Fancy Headers and Footers \end_layout \begin_layout Standard -The \SpecialChar LaTeX --based converters have the advantage that, in principle, they know everythin -g about the exported document that \SpecialChar LaTeX - does. - Such converters do not care, for example, if a certain block of code was - produced by \SpecialChar LyX - or was Evil Red Text. - These converters know about +The default page layout is rather plain; for an \begin_inset Flex Code status collapsed \begin_layout Plain Layout -aux +article \end_layout \end_inset - files, counters, and references, and can often make use of the + document class, all you get is a centered page number at the bottom of + the page. + This document uses KOMA-script's book class, so it appears to be a bit + fancier. + But to really put on a show, you need to set the document page style to + +\begin_inset Quotes eld +\end_inset + +fancy +\begin_inset Quotes erd +\end_inset + +, as mentioned in the +\emph on +User Guide +\emph default +. + This section describes the \SpecialChar LaTeX + code you need to insert in your \SpecialChar LaTeX + preamble in + order to get the desired effects. +\end_layout + +\begin_layout Standard +For more information on fancy headers, see the \begin_inset Flex Code status collapsed \begin_layout Plain Layout -bbl +fancyhdr \end_layout \end_inset - files generated by Bib\SpecialChar TeX -. - On the other hand, \SpecialChar LaTeX - is a very hard language to parse—it is sometimes said - that only \SpecialChar TeX - itself understands \SpecialChar TeX -—and \SpecialChar LaTeX --based converters will often choke on - what seem to be quite simple constructs; complex ones can throw them completely -, and as of this writing, for example, the -\emph on -Embedded Objects -\emph default - manual will not export with -\begin_inset Flex Code + package documentation. + ( +\begin_inset Flex URL status collapsed \begin_layout Plain Layout -htlatex + +https://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html \end_layout \end_inset -, though the others will. - The other issue concerns how math is handled. - These converters typically convert the formulae into little pictures that - are then linked from the HTML document. - Since these are actually generated by \SpecialChar LaTeX -, they are accurate. - But they do not scale well, and just getting them to look as if they are - actually meant to be in your document—so that the font sizes seem to be - roughly the same—can be a challenge. +) \end_layout \begin_layout Standard -Alex Fernandez's -\begin_inset Flex Code -status collapsed +The page header is divided into three fields, not surprisingly labeled +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout -e\SpecialChar LyX -er -\end_layout +left +\begin_inset Quotes erd +\end_inset +, +\begin_inset Quotes eld \end_inset - ( -\begin_inset CommandInset href -LatexCommand href -name "http://pinchito.es/elyxer/" -target "http://pinchito.es/elyxer/" -literal "false" +center +\begin_inset Quotes erd +\end_inset + +, and +\begin_inset Quotes eld +\end_inset +right +\begin_inset Quotes erd \end_inset -) solves some of these problems. - In particular, the formulae it produces scale perfectly, since it renders - math using a combination of HTML and CSS rather than converting the formulae - to images. - But even moderately complex formula are rendered less well than with +. + The footer is also divided into these three fields. + The \SpecialChar LaTeX + commands to set these fields in the simplest manner are \begin_inset Flex Code status collapsed \begin_layout Plain Layout -htlatex + +\backslash +lhead \end_layout \end_inset -; this reflects the limitations of HTML. -\begin_inset Foot -status collapsed - -\begin_layout Plain Layout -That said, +, \begin_inset Flex Code status collapsed \begin_layout Plain Layout -e\SpecialChar LyX -er -\end_layout -\end_inset - - can also use jsMath and MathJax for equations, but this setting is only - available globally and requires one to have access to a server that runs - the backend. +\backslash +chead \end_layout \end_inset - More importantly (as of version 1.1.1, at least), +, \begin_inset Flex Code status collapsed \begin_layout Plain Layout -e\SpecialChar LyX -er + +\backslash +rhead \end_layout \end_inset - has limited support for math macros and no support for user-defined paragraph - or character styles. - These limitations make +, \begin_inset Flex Code status collapsed \begin_layout Plain Layout -e\SpecialChar LyX -er + +\backslash +lfoot \end_layout \end_inset - unsuitable for many of the documents \SpecialChar LyX - users produce. - In principle, of course, these problems could be solved, but the \SpecialChar LyX - developers - have decided to follow a different path and have made \SpecialChar LyX - itself capable of - writing XHTML, just as it is capable of writing \SpecialChar LaTeX -, DocBook, and plaintext. +, etc. + Suppose you wish to put your name in the upper left hand corner of each + page. + Simply insert the following command in the preamble: \end_layout \begin_layout Standard -As of this writing, XHTML output remains under development and should probably - be regarded as -\begin_inset Quotes eld -\end_inset -experimental -\begin_inset Quotes erd -\end_inset +\family typewriter -. -\begin_inset Foot -status collapsed +\backslash +lhead{John Q. + DocWriter} +\end_layout -\begin_layout Plain Layout -The file -\begin_inset Flex Code -status collapsed +\begin_layout Standard +You will now see your name in the upper left. + If a field has a default entry that you would like to get rid of (often + the page number appears in the central footer) simply include a command + with a blank argument, e. +\begin_inset space \thinspace{} +\end_inset -\begin_layout Plain Layout -development/HTML/HTML.notes +g.: \end_layout -\end_inset +\begin_layout Standard -, which can be found in the \SpecialChar LyX - source tree or -\begin_inset CommandInset href -LatexCommand href -name "accessed online" -target "https://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master" -literal "false" +\family typewriter + +\backslash +cfoot{} +\end_layout +\begin_layout Standard +Let's get really fancy: lets put the section number with the word +\begin_inset Quotes eld \end_inset -, usually contains up-to-date information about the state of XHTML output. - See also the list of XHTML bugs on -\begin_inset CommandInset href -LatexCommand href -name "the bug tracker" -target "https://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1" -literal "false" +Section +\begin_inset Quotes erd +\end_inset + + (e. +\begin_inset space \thinspace{} +\end_inset +g. +\begin_inset space \space{} \end_inset -. -\end_layout +Section 3) in the upper left, the page number (e. +\begin_inset space \thinspace{} +\end_inset +g. +\begin_inset space \space{} \end_inset - Still, the developers have chosen this approach because it has several - potential advantages over the other two. +Page 4) in the upper right, your name in the lower left, and the date in + the lower right. + The following commands should now appear in the preamble: \end_layout \begin_layout Standard -These advantages are primarily due to the fact that the XHTML output routines, - since they are part of \SpecialChar LyX -, know everything \SpecialChar LyX - knows about the document being - exported. -\begin_inset Foot -status collapsed -\begin_layout Plain Layout -Another advantage is that, since these routines are internal to \SpecialChar LyX -, they are - immune to changes in \SpecialChar LyX -'s file format, or to changes in the semantics of - existing insets. -\end_layout +\family typewriter -\end_inset +\backslash +lhead{Section +\backslash +thesection} +\end_layout - So they know about the table of contents (as displayed in the outline), - about the counters associated with different paragraph styles, and about - user-defined styles. - The XHTML output routines know what \SpecialChar LyX - knows about internationalization, - too, so they will output -\begin_inset Quotes eld -\end_inset +\begin_layout Standard -Chapter 1 -\begin_inset Quotes erd -\end_inset +\family typewriter - or -\begin_inset Quotes eld -\end_inset +\backslash +chead{} +\end_layout +\begin_layout Standard -\lang ngerman -Kapitel -\lang english - 1 -\begin_inset Quotes erd -\end_inset +\family typewriter -, depending upon the language in effect at the time. - +\backslash +rhead{Page +\backslash +thepage} \end_layout \begin_layout Standard -Quite generally, the output routines know what \SpecialChar LyX - knows about document layout, - that is, about how the document is to be rendered on screen. - We use this information when we output the document as XHTML. - In particular, \SpecialChar LyX - -\emph on -automatically -\emph default - generates CSS style information corresponding to the layout information - it uses to render the document on screen: if section headings are supposed - to be sans-serif and bold as seen in \SpecialChar LyX -, then (by default) they will be sans-seri -f and bold when viewed in a web browser, too. - And this is true not just for pre-defined styles, like Section, but for - any style, including user-defined styles. - Indeed, the XHTML output routines make no distinction between user-defined - paragraph and -\change_deleted 244031559 1603876931 -character -\change_inserted 244031559 1603876940 -text -\change_unchanged - styles and \SpecialChar LyX -'s own pre-defined styles: in each case, everything \SpecialChar LyX - knows about - the styles is contained in the layout files. - And much the same is true as regards pre-defined textual insets, such as - footnotes, and various custom insets. - -\end_layout -\begin_layout Standard -The result is that XHTML output can be customized and extended in exactly - the same way \SpecialChar LaTeX - output can be customized and extended: through layout files - and modules. - See chapter five of the -\emph on -Customization -\emph default -manual for the details. +\family typewriter + +\backslash +lfoot{John Q. + DocWriter} \end_layout \begin_layout Standard -The remainder of this chapter contains more detailed information on XHTML - output, its limitations, and ways to work around those limitations. -\end_layout -\begin_layout Section -Math Output in XHTML +\family typewriter + +\backslash +cfoot{} \end_layout \begin_layout Standard -\SpecialChar LyX - offers four choices for how math is rendered. - These have various advantages and disadvantages: -\end_layout -\begin_layout Itemize -MathML -\begin_inset Newline newline -\end_inset +\family typewriter -MathML is a dialect of XML designed specifically for mathematics on the - web, and it typically renders very well in browsers that support it. - The disadvantage is that not all browsers support MathML, and support is - not complete even in the Gecko-based browsers, such as Firefox. -\begin_inset Newline newline -\end_inset +\backslash +rfoot{ +\backslash +today} +\end_layout -If \SpecialChar LyX - is unable to render a formula as MathML—for example, if the formula - uses the +\begin_layout Standard +The commands \begin_inset Flex Code status collapsed \begin_layout Plain Layout -xymatrix -\end_layout - -\end_inset - package or ERT—then it will instead output the formula as an image. - +\backslash +thesection \end_layout -\begin_layout Itemize -HTML -\begin_inset Newline newline \end_inset -As mentioned above, + and \begin_inset Flex Code status collapsed \begin_layout Plain Layout -elyxer + +\backslash +thepage \end_layout \end_inset - outputs math as HTML, styled by CSS. -\begin_inset Foot -status collapsed - -\begin_layout Plain Layout -\SpecialChar LyX - has borrowed some of the CSS for its HTML output from + access \SpecialChar LaTeX +'s section and page counters, and so print out the current section + and page number. + \begin_inset Flex Code status collapsed \begin_layout Plain Layout -elyxer -\end_layout - -\end_inset -. +\backslash +today \end_layout \end_inset - For simple formulae, this can work quite well, though with more complicated - formulae it tends to break down. - Still, this method has the advantage that it is very widely supported and - so it may be appropriate for documents that contain only a little, fairly - simple math. -\begin_inset Newline newline -\end_inset + simply prints out today's date. +\end_layout -If Lyx is unable to render a formula as HTML—for example, if the formula - uses the +\begin_layout Standard +The thicknesses of the horizontal rules drawn beneath the header and above + the footer can also be modified. + If you don't want one of the rules, set its thickness to 0. + The header rule has a default thickness of 0.4pt, the footer rule is 0pt. + Use commands +\family typewriter + +\family default +like \begin_inset Flex Code status collapsed \begin_layout Plain Layout -xymatrix + +\backslash +renewcommand{ +\backslash +headrulewidth}{0.4pt} \end_layout \end_inset - package or ERT—then it will instead output the formula as an image. - -\end_layout - -\begin_layout Itemize -Images -\begin_inset Newline newline -\end_inset - -Like + and \begin_inset Flex Code status collapsed \begin_layout Plain Layout -htlatex + +\backslash +renewcommand{ +\backslash +footrulewidth}{0.4pt} \end_layout \end_inset -, \SpecialChar LyX - will output formulae as images, the very same images, in fact, that are - used for instant preview. -\begin_inset Foot -status collapsed - -\begin_layout Plain Layout -Instant preview does -\emph on -not -\emph default -have to be on for images to be output, however. + to set the thicknesses. \end_layout -\end_inset +\begin_layout Standard +You can switch the header/footer settings on and off for individual pages + using commands like +\begin_inset Flex Code +status collapsed - The advantage to this method is that the images are simply generated by - \SpecialChar LaTeX -, so they are very accurate. - The disadvantage, as mentioned earlier, is that these are bitmapped images, - so they do not scale terribly well, and one cannot copy them, etc. -\begin_inset Newline newline -\end_inset +\begin_layout Plain Layout -The size of the images can be controlled by setting the -\begin_inset Quotes eld -\end_inset +\backslash +thispagestyle{empty} +\end_layout -Math Images Scaling -\begin_inset Quotes erd \end_inset - parameter under -\begin_inset Flex Noun +, +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Document\SpecialChar menuseparator -Settings\SpecialChar menuseparator -Formats + +\backslash +thispagestyle{plain} \end_layout \end_inset -. -\begin_inset Foot +, and +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -For those who want to know, this controls the resolution of the image in - dots per inch and is based upon a default of 75 dpi. -\end_layout - -\end_inset +\backslash +thispagestyle{fancy} +\end_layout -\begin_inset Newline newline \end_inset -If \SpecialChar LyX - for some reason fails to create an image for a formula (e.g., if a required - \SpecialChar LaTeX - package is not installed), then it will fall back to outputing the raw - \SpecialChar LaTeX . + Simply insert them in the text on the page you want changed and mark them + as \SpecialChar TeX + code. + In fact, title pages are marked as plain by default, while following pages + are marked fancy when using the global fancy setting. \end_layout -\begin_layout Itemize -\SpecialChar LaTeX +\begin_layout Standard +As a final example, it is possible to include an image in the header or + footer. + Suppose you want to put a company logo in the upper lefthand corner. + You might try something like +\end_layout -\begin_inset Newline newline -\end_inset +\begin_layout Standard -Finally, \SpecialChar LyX - will happily output math as \SpecialChar LaTeX -. - As well as being the output of last resort, this method can be used with - such tools as -\begin_inset CommandInset href -LatexCommand href -name "jsMath" -target "http://www.math.union.edu/~dpvc/jsMath/" -literal "false" +\family typewriter -\end_inset +\backslash +lhead{ +\backslash +resizebox{1in}{!}{ +\backslash +includegraphics{logo.eps}}} +\end_layout -, which uses JavaScript to render \SpecialChar LaTeX - embedded in HTML documents. - \SpecialChar LyX - wraps the \SpecialChar LaTeX - in either a +\begin_layout Standard +\noindent +(you may need to preface this with \begin_inset Flex Code status collapsed \begin_layout Plain Layout -span + +\backslash +usepackage{graphics} \end_layout \end_inset - (for inline formulas) or -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -div + if you don't include graphics elsewhere in your document). \end_layout +\begin_layout Section +Itemize Bullet Selection +\begin_inset CommandInset label +LatexCommand label +name "sec:bullet" + \end_inset - (for displayed formulas) with -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -class='math' \end_layout -\end_inset +\begin_layout Standard +by +\noun on + Allan Rae +\end_layout -, as is required for jsMath. +\begin_layout Subsection +Introduction \end_layout \begin_layout Standard -One of these output methods must be selected under -\begin_inset Flex Noun +\SpecialChar LyX + provides 216 bullet shapes that can be accessed from a simple dialog. + Using this dialog you can easily specify what bullet shape to use at each + level of an itemized list. + These settings are document-wide so you won't be able to specify different + sets of bullets for different paragraphs. +\begin_inset Foot status collapsed \begin_layout Plain Layout -Document\SpecialChar menuseparator -Settings\SpecialChar menuseparator -Formats +Well, actually you can but you'll have to do it by hand. \end_layout \end_inset -. - By default, \SpecialChar LyX - outputs MathML. - This is a document-wide setting, therefore. + +\end_layout + +\begin_layout Subsection +How it looks \end_layout \begin_layout Standard -Eventually, \SpecialChar LyX - will offer the user the option to select an alternate output - method for a particular inset, say, one that isn't being rendered very - well by MathML. -\begin_inset Foot +Open the dialog by selecting the +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout -That said, since \SpecialChar LyX - falls back to images if the inset contains ERT, then one - can force output as an image by putting some harmless ERT into the math, - for example: -\begin_inset Formula $a=b\relax$ -\end_inset - -. +Document\SpecialChar menuseparator +Settings \end_layout \end_inset + menu item and then select the +\begin_inset Flex Noun +status collapsed +\begin_layout Plain Layout +Bullets \end_layout -\begin_layout Section -Bibliography and Citations -\end_layout +\end_inset -\begin_layout Standard -XHTML output fully supports bibliographies and citations. - + tab. \end_layout \begin_layout Standard -Citation labels are generated by the same machinery that generates \SpecialChar LyX -'s on-screen - labels, so the labels will look in the output much as they do in \SpecialChar LyX -, though - better. - If you are using numerical citations, then \SpecialChar LyX - will output numerical labels, - such as [1] or [17], rather than simply showing the citation key in square - brackets, as it does on-screen. - If you are using author-year citations, then \SpecialChar LyX - will add lowercase letters - to the years, just as Bib\SpecialChar TeX - does, if it finds more than one citation for - a given author-year combination. - The labels will be printed with the bibliography entries. - Note that there is, at present, no way to customize the appearance of the - labels, for example, to choose between square brackets and parentheses. -\end_layout +The dialog provides you with a table of bullet shapes. + A column of buttons on the left of the table provides access to the six + different panels of bullet shapes. + The row of buttons across the top is used to select which bullet depth + you are changing. + +\change_deleted 244031559 1603875981 + A text entry under the table shows the currently selected bullet shape's + \SpecialChar LaTeX + equivalent and this can be edited if desired. + If you do modify the text you will also need to specify any needed packages + in the \SpecialChar LaTeX + preamble. +\change_unchanged -\begin_layout Standard -Bibliography output is handled by the same machinery that handles the presentati -on of reference information in the citation dialog, so you will see in the - XHTML output pretty much what you would see if you were to look at a given - entry in the citation dialog. - The formatting can be customized in your layout file or, preferably, in - a module. - See the -\emph on -Customization -\emph default - manual for the details. \end_layout \begin_layout Standard -The main defect at present is that cross-referenced information is printed - with every entry with which it is associated. - So you can see things like this: +The six panels are divided up by the packages they require. + The following table shows the mappings from button name to \SpecialChar LaTeX + package. \end_layout -\begin_layout Quote -Jason Stanley, -\begin_inset Quotes eld -\end_inset +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + + +\begin_inset Text -Context and Logical Form -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout -, in -\emph on -Language in Context: Selected Essays -\emph default - (Oxford: Oxford University Press, 2007), pp. - 30–68. +\family roman +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +Button \end_layout -\begin_layout Quote -Jason Stanley, -\begin_inset Quotes eld -\end_inset - -Semantics in Context -\begin_inset Quotes erd \end_inset + + +\begin_inset Text -, in -\emph on -Language in Context: Selected Essays -\emph default - (Oxford: Oxford University Press, 2007), pp. - 201–30. -\end_layout +\begin_layout Plain Layout -\begin_layout Standard -This should be fixed before long. +\family roman +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +Packages Required \end_layout -\begin_layout Standard -There is no support at present for sectioned bibliographies. - If you have multiple bibliographies, then \SpecialChar LyX - will print the same bibliography - over and over. -\end_layout +\end_inset + + + + +\begin_inset Text -\begin_layout Section -Indexes -\end_layout +\begin_layout Plain Layout -\begin_layout Standard -\SpecialChar LyX - will happily export indexes as XHTML, but with certain limitations at the - moment. +\family sans +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +Standard \end_layout -\begin_layout Standard -Index export will be most reliable when you do not attempt to use the fancy - constructs that are described in the section on indexes in the -\emph on -User's Guide -\emph default -. -\begin_inset Foot -status collapsed +\end_inset + + +\begin_inset Text \begin_layout Plain Layout -The main issue here is that \SpecialChar LyX - itself does not really handle these. - It just lets you enter what you would have to enter in raw \SpecialChar LaTeX -. -\end_layout -\end_inset +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +base \SpecialChar LaTeX - We'll describe how they are handled using the subsection headings from - that section. \end_layout -\begin_layout Itemize -Grouping Index Entries (aka, sub-entries): \SpecialChar LyX - makes an effort to support these, - but the entries must be separated by -\begin_inset Quotes eld -\end_inset - - ! -\begin_inset Quotes erd \end_inset + + + + +\begin_inset Text -, that is, there must be spaces around the exclamation point. - This is because it is otherwise too difficult to check for escaped exclamation - points, ones in math, and so forth. -\end_layout +\begin_layout Plain Layout -\begin_layout Itemize -Page Ranges: There is no support at all for page ranges, since these make - no sense with XHMTL. - Instead, you will just get two index entries, one at either end. +\family sans +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +Maths \end_layout -\begin_layout Itemize -Cross-referencing: There is no support for cross-referencing. - If \SpecialChar LyX - finds an entry containing the -\begin_inset Quotes eld \end_inset + + +\begin_inset Text -|see\SpecialChar ldots +\begin_layout Plain Layout + +\family typewriter +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +amssymb.sty +\end_layout -\begin_inset Quotes erd \end_inset + + + + +\begin_inset Text - construct, it is just dropped, and the rest is treated as an ordinary index - entry. -\end_layout +\begin_layout Plain Layout -\begin_layout Itemize -Index Entry Order: \SpecialChar LyX - does support attempts to fix the sorting order. - It will take what is before the first `@' it finds and use that for sorting, - taking what follows the first `@' to be the actual entry. - At present, \SpecialChar LyX - does not check for escaped `@', so do not try to index email - addresses. +\family sans +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +Ding1 \end_layout -\begin_layout Itemize -Index Entry Layout: You can format entries by using the text style dialog, - or by using any other method available within \SpecialChar LyX - itself. - There is no support for constructs like: -\begin_inset Quotes eld \end_inset + + +\begin_inset Text -entry|textbf -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout -. - Indeed, if \SpecialChar LyX - finds a pipe symbol, `|', in an entry, it will delete it and - everything that follows it. +\family typewriter +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +pifont.sty \end_layout -\begin_layout Itemize -Multiple Indexes: There is no support for multiple indexes. - Rather, all index entries will be printed as one large index. - To avoid our printing several versions of the index, we print only the - main index, so make sure you have one. -\end_layout +\end_inset + + + + +\begin_inset Text -\begin_layout Section -Nomenclature and Glossary -\end_layout +\begin_layout Plain Layout -\begin_layout Standard -There is at present no support for glossaries. - Adding it would be fairly trivial, and welcome. +\family sans +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +Ding2 \end_layout -\begin_layout Chapter +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +pifont.sty +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family sans +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +Ding3 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +pifont.sty +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family sans +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +Ding4 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +pifont.sty +\end_layout + +\end_inset + + + + +\end_inset + -\change_inserted 1075283030 1616534180 -DocBook Output \end_layout \begin_layout Standard +\SpecialChar LyX + doesn't stop you using bullets from packages you don't have. + If you get errors from \SpecialChar LaTeX + when you try to view or print the file, then it + is likely you are missing a package. +\begin_inset Foot +status collapsed -\change_inserted 1075283030 1616534386 -Apart from HTML, \SpecialChar LyX - can generate documents in the DocBook XML vocabulary. - With versions 2.3 and before, only select templates could be used to generate - DocBook documents (only version 4). - Starting with \SpecialChar LyX - 2.4, most \SpecialChar LyX - layouts can generate valid DocBook documents (only - version 5). - This feature is built into \SpecialChar LyX - and does not require the use of external tools. +\begin_layout Plain Layout +\SpecialChar LyX + doesn't restrict your use since you may be editing locally and exporting + elsewhere. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Subsection +How to use it +\end_layout + +\begin_layout Standard +Select which bullet depth you want to change then select the bullet shape + and size. + Any changes will not be visible in \SpecialChar LyX +, but are visible when viewing the document. +\end_layout + +\begin_layout Standard +You can reset a bullet shape to the default simply by clicking your right + mouse button on the appropriate bullet depth button. +\begin_inset Foot +status open + +\begin_layout Plain Layout +If you +\emph on +really +\emph default + want to have multiple sets of paragraphs with different sets of bullets + in each, then you're going to have to get your hands dirty with \SpecialChar TeX + code. + The bullet selection dialog can help though because it provides you with + the \SpecialChar LaTeX + code for a wide range of bullet shapes. + To make your own custom paragraphs you have the following options: +\end_layout + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +let +\backslash +savelabelitemi= +\backslash +labelitemi +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +renewcommand +\backslash +labelitemi[0]{ +\backslash +small +\backslash +( +\backslash +sharp +\backslash +)} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Itemize +Use the \SpecialChar LaTeX + command +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +renewcommand{}{} +\end_layout + +\end_inset + + to specify a new bullet shape for a given depth. + You'll also need to save the current bullet shape so you can restore it + again afterwards. + In this itemized list the following \SpecialChar LaTeX + code was used to change the bullet + used for the first depth. +\end_layout + +\begin_deeper +\begin_layout LyX-Code + +\backslash +let +\backslash +savelabelitemi= +\backslash +labelitemi +\end_layout + +\begin_layout LyX-Code + +\backslash +renewcommand +\backslash +labelitemi[0]{ +\backslash +small +\backslash +( +\backslash +sharp +\backslash +)} +\end_layout + +\end_deeper +\begin_layout Itemize +Note that the itemize depth is specified in Roman numerals as part of the + +\family typewriter + +\backslash +labelitem +\family default + command. +\end_layout + +\begin_layout Itemize +\begin_inset Argument item:1 +status open + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +( +\backslash +star +\backslash +) +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + Specify each individual entry by starting each item with the bullet shape + enclosed in a +\begin_inset Quotes eld +\end_inset + +Custom Item +\begin_inset Quotes erd +\end_inset + + inset (available at +\family sans +Insert\SpecialChar menuseparator +Custom Item +\family default +) and set as +\begin_inset Flex Noun +status collapsed + +\begin_layout Plain Layout +\SpecialChar TeX + Code +\end_layout + +\end_inset + +. + For example, this item was started with +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +( +\backslash +star +\backslash +) +\end_layout + +\end_inset + +. +\end_layout + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +renewcommand +\backslash +labelitemi[0]{ +\backslash +savelabelitemi} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Plain Layout +You'll also need to revert the labelitem back to its previous setting for + the global bullet shape settings to remain in effect. + The way used here was: +\end_layout + +\begin_layout LyX-Code + +\backslash +renewcommand +\backslash +labelitemi[0]{ +\backslash +savelabelitemi} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Chapter +\SpecialChar LyX + and the World Wide Web +\end_layout + +\begin_layout Standard +\SpecialChar LyX + has long supported the export of documents to various web-friendly formats, + such as HTML. + Before version 2.0, however, HTML export was always accomplished by the + use of external converters. +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout +For details on the use of external converters with \SpecialChar LyX +, see the +\emph on +Converters +\emph default + section of the Customization manual. +\end_layout + +\end_inset + + These fall into two large groups: there are converters that use \SpecialChar LaTeX + as an + intermediate format, such as +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +htlatex +\end_layout + +\end_inset + +, +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +html2latex +\end_layout + +\end_inset + +, and +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +plastex +\end_layout + +\end_inset + +, relying upon \SpecialChar LyX + to produce the \SpecialChar LaTeX +; and there is a converter that works directly + on \SpecialChar LyX + files, +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +e\SpecialChar LyX +er +\end_layout + +\end_inset + +. + All of these have different advantages and disadvantages. + +\end_layout + +\begin_layout Standard +The \SpecialChar LaTeX +-based converters have the advantage that, in principle, they know everythin +g about the exported document that \SpecialChar LaTeX + does. + Such converters do not care, for example, if a certain block of code was + produced by \SpecialChar LyX + or was Evil Red Text. + These converters know about +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +aux +\end_layout + +\end_inset + + files, counters, and references, and can often make use of the +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +bbl \end_layout -\begin_layout Standard +\end_inset -\change_inserted 1075283030 1616534437 -The result is that the DocBook output can be customized and extended in - exactly the same way \SpecialChar LaTeX - output can be customized and extended: through layout - files and modules. - See chapter five of the + files generated by Bib\SpecialChar TeX +. + On the other hand, \SpecialChar LaTeX + is a very hard language to parse—it is sometimes said + that only \SpecialChar TeX + itself understands \SpecialChar TeX +—and \SpecialChar LaTeX +-based converters will often choke on + what seem to be quite simple constructs; complex ones can throw them completely +, and as of this writing, for example, the \emph on -Customization +Embedded Objects \emph default -manual for the details. -\end_layout - -\begin_layout Standard + manual will not export with +\begin_inset Flex Code +status collapsed -\change_inserted 1075283030 1616534475 -Most \SpecialChar LyX - features are supported with DocBook, like math output. +\begin_layout Plain Layout +htlatex \end_layout -\begin_layout Itemize +\end_inset -\change_inserted 1075283030 1616534741 -Math output is performed mostly in MathML (the major exception being constructio -ns not supported by \SpecialChar LyX -, i.e. - ERTs). - All formulae are also available in raw \SpecialChar TeX - in the DocBook output for further - processing. +, though the others will. + The other issue concerns how math is handled. + These converters typically convert the formulae into little pictures that + are then linked from the HTML document. + Since these are actually generated by \SpecialChar LaTeX +, they are accurate. + But they do not scale well, and just getting them to look as if they are + actually meant to be in your document—so that the font sizes seem to be + roughly the same—can be a challenge. \end_layout -\begin_layout Itemize +\begin_layout Standard +Alex Fernandez's +\begin_inset Flex Code +status collapsed -\change_inserted 1075283030 1616534852 -Bibliographies and citations are implemented, including with an external - BibTeX file. - Bibliography entries are not prerendered when the detailed information - are available, but rather output with the standard DocBook constructs. - The external DocBook processor is expected to handle the rendering of entries. +\begin_layout Plain Layout +e\SpecialChar LyX +er \end_layout -\begin_layout Itemize +\end_inset -\change_inserted 1075283030 1616534863 -Indexes are supported, including multiple indices. - Grouping (with -\family typewriter -! -\family default -), page ranges, and cross-references ( -\family typewriter -|see -\family default -) are supported, with the exception of the same symbols escaped. - Entry order ( -\family typewriter -@ -\family default -) and layout ( -\family typewriter -|mathbf -\family default -) are not supported. - There is no support for escaping of index entries. -\end_layout + ( +\begin_inset CommandInset href +LatexCommand href +name "http://pinchito.es/elyxer/" +target "http://pinchito.es/elyxer/" +literal "false" -\begin_layout Itemize +\end_inset -\change_inserted 1075283030 1616534884 -Glossaries are implemented. +) solves some of these problems. + In particular, the formulae it produces scale perfectly, since it renders + math using a combination of HTML and CSS rather than converting the formulae + to images. + But even moderately complex formula are rendered less well than with +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +htlatex \end_layout -\begin_layout Standard +\end_inset -\change_inserted 1075283030 1616534894 -Two major parameters can be set at the document level. -\end_layout +; this reflects the limitations of HTML. +\begin_inset Foot +status collapsed -\begin_layout Itemize +\begin_layout Plain Layout +That said, +\begin_inset Flex Code +status collapsed -\change_inserted 1075283030 1616534948 -Format for tables: \SpecialChar LyX - can generate tables either as HTML (default value) or - CALS, depending on the user's requirements. - Most DocBook processors accept both formats. +\begin_layout Plain Layout +e\SpecialChar LyX +er \end_layout -\begin_layout Itemize +\end_inset -\change_inserted 1075283030 1616535006 -MathML prefix: in DocBook, MathML is included within its own name space, - unlike HTML. - The implication is that there must be an indication of the tags belonging - to the MathML standard. - Three choices are offered: + can also use jsMath and MathJax for equations, but this setting is only + available globally and requires one to have access to a server that runs + the backend. \end_layout -\begin_deeper -\begin_layout Itemize +\end_inset -\change_inserted 1075283030 1616535044 -Inline: the MathML name space is defined for each formula (using the -\family typewriter -xmlns -\family default - attribute on each formula) + More importantly (as of version 1.1.1, at least), +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +e\SpecialChar LyX +er \end_layout -\begin_layout Itemize +\end_inset -\change_inserted 1075283030 1616535090 -With the -\family typewriter -m -\family default - prefix (default): the MathML name space is defined at the document level - (using the -\family typewriter -xmlns:m -\family default - attribute on the root element). - Each MathML is prefixed with -\family typewriter -m -\family default -: for instance, -\family typewriter -m:math + has limited support for math macros and no support for user-defined paragraph + or character styles. + These limitations make +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +e\SpecialChar LyX +er \end_layout -\begin_layout Itemize +\end_inset -\change_inserted 1075283030 1616620405 -With the -\family typewriter -mml -\family default - prefix: similar to the -\family typewriter -m -\family default - option, but with -\family typewriter -mml + unsuitable for many of the documents \SpecialChar LyX + users produce. + In principle, of course, these problems could be solved, but the \SpecialChar LyX + developers + have decided to follow a different path and have made \SpecialChar LyX + itself capable of + writing XHTML, just as it is capable of writing \SpecialChar LaTeX +, DocBook, and plaintext. \end_layout \begin_layout Standard +As of this writing, XHTML output remains under development and should probably + be regarded as +\begin_inset Quotes eld +\end_inset -\change_inserted 1075283030 1616620470 -This option is especially useful if you want \SpecialChar LyX - to match your personal style - or to work with buggy software that only accepts one prefix for MathML. -\change_unchanged +experimental +\begin_inset Quotes erd +\end_inset -\end_layout +. +\begin_inset Foot +status collapsed -\end_deeper -\begin_layout Chapter -The \SpecialChar LyX - Server -\end_layout +\begin_layout Plain Layout +The file +\begin_inset Flex Code +status collapsed -\begin_layout Section -Introduction +\begin_layout Plain Layout +development/HTML/HTML.notes \end_layout - -\begin_layout Standard -The `\SpecialChar LyX - server' allows other programs to talk to \SpecialChar LyX -, invoke \SpecialChar LyX - commands, and retrieve - information about the \SpecialChar LyX - internal state. - This is only intended for advanced users, but they should find it useful. - It is by writing to the \SpecialChar LyX - server, for example, that bibliography managers, - such as JabRef, are able to -\begin_inset Quotes eld + \end_inset -push -\begin_inset Quotes erd +, which can be found in the \SpecialChar LyX + source tree or +\begin_inset CommandInset href +LatexCommand href +name "accessed online" +target "https://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master" +literal "false" + +\end_inset + +, usually contains up-to-date information about the state of XHTML output. + See also the list of XHTML bugs on +\begin_inset CommandInset href +LatexCommand href +name "the bug tracker" +target "https://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1" +literal "false" + \end_inset - citations to \SpecialChar LyX . \end_layout -\begin_layout Section -Starting the \SpecialChar LyX - Server -\begin_inset CommandInset label -LatexCommand label -name "sec:Starting-the-Server" - \end_inset - + Still, the developers have chosen this approach because it has several + potential advantages over the other two. \end_layout \begin_layout Standard -The \SpecialChar LyX - server works through the use of a pair of named pipes. - These are usually located in -\begin_inset Flex Code +These advantages are primarily due to the fact that the XHTML output routines, + since they are part of \SpecialChar LyX +, know everything \SpecialChar LyX + knows about the document being + exported. +\begin_inset Foot status collapsed \begin_layout Plain Layout -UserDir +Another advantage is that, since these routines are internal to \SpecialChar LyX +, they are + immune to changes in \SpecialChar LyX +'s file format, or to changes in the semantics of + existing insets. \end_layout \end_inset -, (except on Windows, where -\emph on -local -\emph default - named pipes are special objects located in -\begin_inset Flex Code -status collapsed + So they know about the table of contents (as displayed in the outline), + about the counters associated with different paragraph styles, and about + user-defined styles. + The XHTML output routines know what \SpecialChar LyX + knows about internationalization, + too, so they will output +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout +Chapter 1 +\begin_inset Quotes erd +\end_inset -\backslash + or +\begin_inset Quotes eld +\end_inset -\backslash -. -\backslash -pipe -\end_layout +\lang ngerman +Kapitel +\lang english + 1 +\begin_inset Quotes erd \end_inset -) and have the names -\begin_inset Quotes eld -\end_inset +, depending upon the language in effect at the time. + +\end_layout +\begin_layout Standard +Quite generally, the output routines know what \SpecialChar LyX + knows about document layout, + that is, about how the document is to be rendered on screen. + We use this information when we output the document as XHTML. + In particular, \SpecialChar LyX + +\emph on +automatically +\emph default + generates CSS style information corresponding to the layout information + it uses to render the document on screen: if section headings are supposed + to be sans-serif and bold as seen in \SpecialChar LyX +, then (by default) they will be sans-seri +f and bold when viewed in a web browser, too. + And this is true not just for pre-defined styles, like Section, but for + any style, including user-defined styles. + Indeed, the XHTML output routines make no distinction between user-defined + paragraph and +\change_deleted 244031559 1603876931 +character +\change_inserted 244031559 1603876940 +text +\change_unchanged + styles and \SpecialChar LyX +'s own pre-defined styles: in each case, everything \SpecialChar LyX + knows about + the styles is contained in the layout files. + And much the same is true as regards pre-defined textual insets, such as + footnotes, and various custom insets. + +\end_layout -\begin_inset Flex Code -status collapsed +\begin_layout Standard +The result is that XHTML output can be customized and extended in exactly + the same way \SpecialChar LaTeX + output can be customized and extended: through layout files + and modules. + See chapter five of the +\emph on +Customization +\emph default +manual for the details. +\end_layout -\begin_layout Plain Layout -lyxpipe.in +\begin_layout Standard +The remainder of this chapter contains more detailed information on XHTML + output, its limitations, and ways to work around those limitations. \end_layout -\end_inset +\begin_layout Section +Math Output in XHTML +\end_layout +\begin_layout Standard +\SpecialChar LyX + offers four choices for how math is rendered. + These have various advantages and disadvantages: +\end_layout -\begin_inset Quotes erd +\begin_layout Itemize +MathML +\begin_inset Newline newline \end_inset - and -\begin_inset Quotes eld +MathML is a dialect of XML designed specifically for mathematics on the + web, and it typically renders very well in browsers that support it. + The disadvantage is that not all browsers support MathML, and support is + not complete even in the Gecko-based browsers, such as Firefox. +\begin_inset Newline newline \end_inset - +If \SpecialChar LyX + is unable to render a formula as MathML—for example, if the formula + uses the \begin_inset Flex Code status collapsed \begin_layout Plain Layout -lyxpipe.out +xymatrix \end_layout \end_inset + package or ERT—then it will instead output the formula as an image. + +\end_layout -\begin_inset Quotes erd +\begin_layout Itemize +HTML +\begin_inset Newline newline \end_inset -. - External programs write into +As mentioned above, \begin_inset Flex Code status collapsed \begin_layout Plain Layout -lyxpipe.in +elyxer \end_layout \end_inset - and read back data from + outputs math as HTML, styled by CSS. +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout +\SpecialChar LyX + has borrowed some of the CSS for its HTML output from \begin_inset Flex Code status collapsed \begin_layout Plain Layout -lyxpipe.out +elyxer \end_layout \end_inset . - The stem of the pipe names can be defined in the -\begin_inset Flex Noun -status collapsed - -\begin_layout Plain Layout -Tools\SpecialChar menuseparator -Preferences \end_layout \end_inset - dialog, for example + For simple formulae, this can work quite well, though with more complicated + formulae it tends to break down. + Still, this method has the advantage that it is very widely supported and + so it may be appropriate for documents that contain only a little, fairly + simple math. +\begin_inset Newline newline +\end_inset + +If Lyx is unable to render a formula as HTML—for example, if the formula + uses the \begin_inset Flex Code status collapsed \begin_layout Plain Layout -"/home/myhome/lyxpipe" +xymatrix \end_layout \end_inset -, or + package or ERT—then it will instead output the formula as an image. + +\end_layout + +\begin_layout Itemize +Images +\begin_inset Newline newline +\end_inset + +Like \begin_inset Flex Code status collapsed \begin_layout Plain Layout -" -\backslash - -\backslash -. -\backslash -pipe -\backslash -lyxpipe" +htlatex \end_layout \end_inset - on Windows (where any working path instead of lyxpipe can be used, for - example -\begin_inset Flex Code +, \SpecialChar LyX + will output formulae as images, the very same images, in fact, that are + used for instant preview. +\begin_inset Foot status collapsed \begin_layout Plain Layout -" -\backslash - -\backslash -. -\backslash -pipe -\backslash -my -\backslash -lyx -\backslash -pipe" +Instant preview does +\emph on +not +\emph default +have to be on for images to be output, however. \end_layout \end_inset - would also work). - You -\emph on -must -\emph default - configure this manually in order for the server to start. -\end_layout + The advantage to this method is that the images are simply generated by + \SpecialChar LaTeX +, so they are very accurate. + The disadvantage, as mentioned earlier, is that these are bitmapped images, + so they do not scale terribly well, and one cannot copy them, etc. +\begin_inset Newline newline +\end_inset + +The size of the images can be controlled by setting the +\begin_inset Quotes eld +\end_inset + +Math Images Scaling +\begin_inset Quotes erd +\end_inset -\begin_layout Standard -\SpecialChar LyX - will add the ' -\begin_inset Flex Code + parameter under +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout -.in +Document\SpecialChar menuseparator +Settings\SpecialChar menuseparator +Formats \end_layout \end_inset -' and ' -\begin_inset Flex Code +. +\begin_inset Foot status collapsed \begin_layout Plain Layout -.out +For those who want to know, this controls the resolution of the image in + dots per inch and is based upon a default of 75 dpi. \end_layout \end_inset -' to create the pipes. - If one of the pipes already exists, \SpecialChar LyX - will assume that another \SpecialChar LyX - process - is already running and will not start the server. - On POSIX (Unix like) systems, if for some other reason, an unused -\begin_inset Quotes eld -\end_inset -stale -\begin_inset Quotes erd +\begin_inset Newline newline \end_inset - pipe is left in existence when \SpecialChar LyX - closes, then \SpecialChar LyX - will try to delete it. - If this fails for some reason, you will need to delete the pipes manually - and then restart \SpecialChar LyX +If \SpecialChar LyX + for some reason fails to create an image for a formula (e.g., if a required + \SpecialChar LaTeX + package is not installed), then it will fall back to outputing the raw + \SpecialChar LaTeX . - On Windows, pipes are deleted by the OS on program termination or crash, - so -\begin_inset Quotes eld -\end_inset +\end_layout -stale -\begin_inset Quotes erd +\begin_layout Itemize +\SpecialChar LaTeX + +\begin_inset Newline newline \end_inset - pipes should not be possible. -\end_layout +Finally, \SpecialChar LyX + will happily output math as \SpecialChar LaTeX +. + As well as being the output of last resort, this method can be used with + such tools as +\begin_inset CommandInset href +LatexCommand href +name "jsMath" +target "http://www.math.union.edu/~dpvc/jsMath/" +literal "false" -\begin_layout Standard -To have several \SpecialChar LyX - processes with servers at the same time, you have to use - different configurations, perhaps by using separate user directories, each - with its own +\end_inset + +, which uses JavaScript to render \SpecialChar LaTeX + embedded in HTML documents. + \SpecialChar LyX + wraps the \SpecialChar LaTeX + in either a \begin_inset Flex Code status collapsed \begin_layout Plain Layout -preferences +span \end_layout \end_inset - file, for each process. -\end_layout - -\begin_layout Standard -If you are developing a client program, you might find it useful to enable - debugging information from the \SpecialChar LyX - server. - Do this by starting \SpecialChar LyX - as + (for inline formulas) or \begin_inset Flex Code status collapsed \begin_layout Plain Layout -lyx -dbg lyxserver +div \end_layout \end_inset -. -\end_layout - -\begin_layout Standard -You can find a complete example client written in C++ in the source distribution - as + (for displayed formulas) with \begin_inset Flex Code status collapsed \begin_layout Plain Layout -development/lyxserver/server_monitor.cpp +class='math' \end_layout \end_inset -. +, as is required for jsMath. \end_layout \begin_layout Standard -Another useful tool is the command-line based client found in -\begin_inset Flex Code +One of these output methods must be selected under +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout -src/client/lyxclient +Document\SpecialChar menuseparator +Settings\SpecialChar menuseparator +Formats \end_layout \end_inset . -\end_layout - -\begin_layout Section -Normal communication + By default, \SpecialChar LyX + outputs MathML. + This is a document-wide setting, therefore. \end_layout \begin_layout Standard -To issue a \SpecialChar LyX - call, the client writes a line of ASCII text into the input - pipe. - This line has the following format: -\end_layout - -\begin_layout Quote -LYXCMD: -\emph on -clientname -\emph default -: -\emph on -function -\emph default -: -\emph on -argument -\end_layout +Eventually, \SpecialChar LyX + will offer the user the option to select an alternate output + method for a particular inset, say, one that isn't being rendered very + well by MathML. +\begin_inset Foot +status collapsed -\begin_layout Description -clientname is a name that the client can choose arbitrarily. - Its only use is that \SpecialChar LyX - will echo it if it sends an answer—so a client can - dispatch results from different requesters. -\end_layout +\begin_layout Plain Layout +That said, since \SpecialChar LyX + falls back to images if the inset contains ERT, then one + can force output as an image by putting some harmless ERT into the math, + for example: +\begin_inset Formula $a=b\relax$ +\end_inset -\begin_layout Description -function is the function you want \SpecialChar LyX - to perform. - It is the same as the commands you'd use in the minibuffer. +. \end_layout -\begin_layout Description -argument is an optional argument which is meaningful only to some functions - (for instance, the -\begin_inset Quotes eld -\end_inset - -self-insert -\begin_inset Quotes erd \end_inset - LFUN will insert the argument as text at the cursor position). -\end_layout -\begin_layout Standard -The answer from \SpecialChar LyX - will arrive in the output pipe and be of the form \end_layout -\begin_layout Quote -INFO: -\emph on -clientname -\emph default -: -\emph on -function -\emph default -: -\emph on -data +\begin_layout Section +Bibliography and Citations \end_layout \begin_layout Standard -where -\emph on -clientname -\emph default - and -\emph on -function -\emph default - are just echoed from the command request, while -\emph on -data -\emph default - is more or less useful information filled according to how the command - execution worked out. - Some commands, such as -\begin_inset Quotes eld -\end_inset - -font-state -\begin_inset Quotes erd -\end_inset - -, will return information about the internal state of \SpecialChar LyX -, while other will - return an empty data-response. - This means that the command execution went fine. +XHTML output fully supports bibliographies and citations. + \end_layout \begin_layout Standard -In case of errors, the response from \SpecialChar LyX - will have this form -\end_layout - -\begin_layout Quote -ERROR: -\emph on -clientname -\emph default -: -\emph on -function -\emph default -: -\emph on -error message +Citation labels are generated by the same machinery that generates \SpecialChar LyX +'s on-screen + labels, so the labels will look in the output much as they do in \SpecialChar LyX +, though + better. + If you are using numerical citations, then \SpecialChar LyX + will output numerical labels, + such as [1] or [17], rather than simply showing the citation key in square + brackets, as it does on-screen. + If you are using author-year citations, then \SpecialChar LyX + will add lowercase letters + to the years, just as Bib\SpecialChar TeX + does, if it finds more than one citation for + a given author-year combination. + The labels will be printed with the bibliography entries. + Note that there is, at present, no way to customize the appearance of the + labels, for example, to choose between square brackets and parentheses. \end_layout \begin_layout Standard -where the +Bibliography output is handled by the same machinery that handles the presentati +on of reference information in the citation dialog, so you will see in the + XHTML output pretty much what you would see if you were to look at a given + entry in the citation dialog. + The formatting can be customized in your layout file or, preferably, in + a module. + See the \emph on -error message +Customization \emph default - should contain an explanation of why the command failed. + manual for the details. \end_layout \begin_layout Standard -Examples: +The main defect at present is that cross-referenced information is printed + with every entry with which it is associated. + So you can see things like this: \end_layout -\begin_layout LyX-Code -echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in -\begin_inset Newline newline +\begin_layout Quote +Jason Stanley, +\begin_inset Quotes eld \end_inset -echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in -\begin_inset Newline newline +Context and Logical Form +\begin_inset Quotes erd \end_inset -read a <~/.lyxpipe.out -\begin_inset Newline newline +, in +\emph on +Language in Context: Selected Essays +\emph default + (Oxford: Oxford University Press, 2007), pp. + 30–68. +\end_layout + +\begin_layout Quote +Jason Stanley, +\begin_inset Quotes eld \end_inset -echo $a -\end_layout +Semantics in Context +\begin_inset Quotes erd +\end_inset -\begin_layout Subsection -AppleScript (Mac OS X) +, in +\emph on +Language in Context: Selected Essays +\emph default + (Oxford: Oxford University Press, 2007), pp. + 201–30. \end_layout \begin_layout Standard -Since \SpecialChar LyX - 2.1, \SpecialChar LyX - supports basic interactions with AppleScript for normal communicatio -n through the command run. - This command takes a direct argument (the -\series bold -function -\series default - to perform) and an optional argument. - It either returns the output of the function or triggers an error with - the error message and code. +This should be fixed before long. \end_layout \begin_layout Standard -Example: -\end_layout - -\begin_layout LyX-Code -tell application "\SpecialChar LyX -" -\end_layout - -\begin_layout LyX-Code - try -\end_layout - -\begin_layout LyX-Code - -- Stores the current file name into f -\end_layout - -\begin_layout LyX-Code - set f to (run "server-get-filename" with argument "") +There is no support at present for sectioned bibliographies. + If you have multiple bibliographies, then \SpecialChar LyX + will print the same bibliography + over and over. \end_layout -\begin_layout LyX-Code - on error the error_message number the error_number +\begin_layout Section +Indexes \end_layout -\begin_layout LyX-Code - display dialog "Error: " & the error_number & ". - " ¬ +\begin_layout Standard +\SpecialChar LyX + will happily export indexes as XHTML, but with certain limitations at the + moment. \end_layout -\begin_layout LyX-Code - & the error_message buttons {"OK"} default button 1 -\end_layout +\begin_layout Standard +Index export will be most reliable when you do not attempt to use the fancy + constructs that are described in the section on indexes in the +\emph on +User's Guide +\emph default +. +\begin_inset Foot +status collapsed -\begin_layout LyX-Code - end try +\begin_layout Plain Layout +The main issue here is that \SpecialChar LyX + itself does not really handle these. + It just lets you enter what you would have to enter in raw \SpecialChar LaTeX +. \end_layout -\begin_layout LyX-Code -end tell -\end_layout +\end_inset -\begin_layout Section -Notification + We'll describe how they are handled using the subsection headings from + that section. \end_layout -\begin_layout Standard -\SpecialChar LyX - can notify clients of events going on asynchronously. - Currently it will only do this if the user binds a key sequence with the - function +\begin_layout Itemize +Grouping Index Entries (aka, sub-entries): \SpecialChar LyX + makes an effort to support these, + but the entries must be separated by \begin_inset Quotes eld \end_inset -notify + ! \begin_inset Quotes erd \end_inset -. - The format of the string \SpecialChar LyX - sends is as follows: +, that is, there must be spaces around the exclamation point. + This is because it is otherwise too difficult to check for escaped exclamation + points, ones in math, and so forth. \end_layout -\begin_layout Quote -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -NOTIFY: +\begin_layout Itemize +Page Ranges: There is no support at all for page ranges, since these make + no sense with XHMTL. + Instead, you will just get two index entries, one at either end. \end_layout +\begin_layout Itemize +Cross-referencing: There is no support for cross-referencing. + If \SpecialChar LyX + finds an entry containing the +\begin_inset Quotes eld \end_inset +|see\SpecialChar ldots -\emph on -key-sequence +\begin_inset Quotes erd +\end_inset + + construct, it is just dropped, and the rest is treated as an ordinary index + entry. \end_layout -\begin_layout Standard -where -\emph on -key-sequence -\emph default - is the printed representation of the key sequence that was actually typed - by the user. +\begin_layout Itemize +Index Entry Order: \SpecialChar LyX + does support attempts to fix the sorting order. + It will take what is before the first `@' it finds and use that for sorting, + taking what follows the first `@' to be the actual entry. + At present, \SpecialChar LyX + does not check for escaped `@', so do not try to index email + addresses. \end_layout -\begin_layout Standard -This mechanism can be used to extend \SpecialChar LyX -'s command set and implement macros. - Bind some key sequence to +\begin_layout Itemize +Index Entry Layout: You can format entries by using the text style dialog, + or by using any other method available within \SpecialChar LyX + itself. + There is no support for constructs like: \begin_inset Quotes eld \end_inset -notify +entry|textbf \begin_inset Quotes erd \end_inset . - Then start a client that listens on the output pipe, dispatches the command - according to the sequence, and starts a function that may use \SpecialChar LyX - calls and - \SpecialChar LyX - requests to issue a command or a series of commands to \SpecialChar LyX -. + Indeed, if \SpecialChar LyX + finds a pipe symbol, `|', in an entry, it will delete it and + everything that follows it. +\end_layout + +\begin_layout Itemize +Multiple Indexes: There is no support for multiple indexes. + Rather, all index entries will be printed as one large index. + To avoid our printing several versions of the index, we print only the + main index, so make sure you have one. \end_layout \begin_layout Section -The simple \SpecialChar LyX - Server Protocol +Nomenclature and Glossary \end_layout \begin_layout Standard -\SpecialChar LyX - implements a simple protocol that can be used for session management. - All messages are of the form +There is at present no support for glossaries. + Adding it would be fairly trivial, and welcome. \end_layout -\begin_layout Quote -LYXSRV: -\emph on -clientname -\emph default -: -\emph on -protocol message +\begin_layout Chapter + +\change_inserted 1075283030 1616534180 +DocBook Output \end_layout \begin_layout Standard -where + +\change_inserted 1075283030 1616534386 +Apart from HTML, \SpecialChar LyX + can generate documents in the DocBook XML vocabulary. + With versions 2.3 and before, only select templates could be used to generate + DocBook documents (only version 4). + Starting with \SpecialChar LyX + 2.4, most \SpecialChar LyX + layouts can generate valid DocBook documents (only + version 5). + This feature is built into \SpecialChar LyX + and does not require the use of external tools. +\end_layout + +\begin_layout Standard + +\change_inserted 1075283030 1616534437 +The result is that the DocBook output can be customized and extended in + exactly the same way \SpecialChar LaTeX + output can be customized and extended: through layout + files and modules. + See chapter five of the \emph on -protocol message +Customization \emph default - can be -\begin_inset Quotes eld -\end_inset +manual for the details. +\end_layout -hello -\begin_inset Quotes erd -\end_inset +\begin_layout Standard - or -\begin_inset Quotes eld -\end_inset +\change_inserted 1075283030 1616534475 +Most \SpecialChar LyX + features are supported with DocBook, like math output. +\end_layout -bye -\begin_inset Quotes erd -\end_inset +\begin_layout Itemize -. - If -\begin_inset Quotes eld -\end_inset +\change_inserted 1075283030 1616534741 +Math output is performed mostly in MathML (the major exception being constructio +ns not supported by \SpecialChar LyX +, i.e. + ERTs). + All formulae are also available in raw \SpecialChar TeX + in the DocBook output for further + processing. +\end_layout -hello -\begin_inset Quotes erd -\end_inset +\begin_layout Itemize - is received from a client, \SpecialChar LyX - will report back to inform the client that - it's listening to it's messages, while -\begin_inset Quotes eld -\end_inset +\change_inserted 1075283030 1616534852 +Bibliographies and citations are implemented, including with an external + BibTeX file. + Bibliography entries are not prerendered when the detailed information + are available, but rather output with the standard DocBook constructs. + The external DocBook processor is expected to handle the rendering of entries. +\end_layout -bye -\begin_inset Quotes erd -\end_inset +\begin_layout Itemize - sent from \SpecialChar LyX - will inform clients that \SpecialChar LyX - is closing. +\change_inserted 1075283030 1616534863 +Indexes are supported, including multiple indices. + Grouping (with +\family typewriter +! +\family default +), page ranges, and cross-references ( +\family typewriter +|see +\family default +) are supported, with the exception of the same symbols escaped. + Entry order ( +\family typewriter +@ +\family default +) and layout ( +\family typewriter +|mathbf +\family default +) are not supported. + There is no support for escaping of index entries. \end_layout -\begin_layout Section -Reverse DVI/PDF search +\begin_layout Itemize + +\change_inserted 1075283030 1616534884 +Glossaries are implemented. \end_layout \begin_layout Standard -Some DVI/PDF viewers -\begin_inset Foot -status collapsed -\begin_layout Plain Layout -The following viewers offer the reverse PDF search feature: Okular on KDE/Linux, - Qpdfview on Unix, Skim on Mac OSX and SumatraPDF on Windows. +\change_inserted 1075283030 1616534894 +Two major parameters can be set at the document level. \end_layout -\end_inset - - provide -\emph on -reverse search -\emph default - facility (also called -\emph on -inverse search -\emph default -). - This means that you can tell \SpecialChar LyX - to put the cursor to a specific line in the - document by clicking at the respective position in the DVI/PDF output. - To achieve this, the viewer must be able to communicate with \SpecialChar LyX -. - This is done via the \SpecialChar LyX - server either by using the named pipe ( -\emph on -lyxpipe -\emph default -), or the UNIX domain socket ( -\emph on -lyxsocket -\emph default -) that \SpecialChar LyX - creates in its temporary directory (this is the way the -\begin_inset Flex Code -status collapsed +\begin_layout Itemize -\begin_layout Plain Layout -lyxclient +\change_inserted 1075283030 1616534948 +Format for tables: \SpecialChar LyX + can generate tables either as HTML (default value) or + CALS, depending on the user's requirements. + Most DocBook processors accept both formats. \end_layout -\end_inset +\begin_layout Itemize - program communicates with \SpecialChar LyX -). - In some cases, you need a helper script that mediates between the viewer - and \SpecialChar LyX -, in others, the viewer can communicate with \SpecialChar LyX - directly. - This depends on the selected viewer and on your operating system. - The same applies to the way viewers need to be configured and the way the - reverse search is actually performed. - In what follows, we will thus describe how to setup reverse search for - specific viewers. - Before we turn to this, though, we will explain what needs to be done generally - to enable reverse search in the DVI/PDF output. +\change_inserted 1075283030 1616535006 +MathML prefix: in DocBook, MathML is included within its own name space, + unlike HTML. + The implication is that there must be an indication of the tags belonging + to the MathML standard. + Three choices are offered: \end_layout -\begin_layout Subsection -Automatic setup -\begin_inset CommandInset label -LatexCommand label -name "subsec:rev-search" +\begin_deeper +\begin_layout Itemize -\end_inset +\change_inserted 1075283030 1616535044 +Inline: the MathML name space is defined for each formula (using the +\family typewriter +xmlns +\family default + attribute on each formula) +\end_layout +\begin_layout Itemize +\change_inserted 1075283030 1616535090 +With the +\family typewriter +m +\family default + prefix (default): the MathML name space is defined at the document level + (using the +\family typewriter +xmlns:m +\family default + attribute on the root element). + Each MathML is prefixed with +\family typewriter +m +\family default +: for instance, +\family typewriter +m:math \end_layout -\begin_layout Standard -In most cases \SpecialChar LyX - will do the work for you by pressing the following button - in the toolbar: -\begin_inset Info -type "icon" -arg "buffer-toggle-output-sync" -\end_inset +\begin_layout Itemize -. - Alternatively, you can also enable the feature by checking -\family sans -Synchronize with Output +\change_inserted 1075283030 1616620405 +With the +\family typewriter +mml \family default - in -\begin_inset Flex Noun -status collapsed - -\begin_layout Plain Layout -Document\SpecialChar menuseparator -Settings\SpecialChar menuseparator -Formats + prefix: similar to the +\family typewriter +m +\family default + option, but with +\family typewriter +mml \end_layout -\end_inset +\begin_layout Standard -. - In such a case \SpecialChar LyX - will automatically insert the necessary Sync\SpecialChar TeX - macro (for - PDF) or load the srcltx package (for DVI) respectively. - This option can be easily reached also on -\begin_inset Flex Code -status collapsed +\change_inserted 1075283030 1616620470 +This option is especially useful if you want \SpecialChar LyX + to match your personal style + or to work with buggy software that only accepts one prefix for MathML. +\change_unchanged -\begin_layout Plain Layout -View/Update \end_layout -\end_inset +\end_deeper +\begin_layout Chapter +The \SpecialChar LyX + Server +\end_layout - Toolbar. +\begin_layout Section +Introduction \end_layout \begin_layout Standard -If you need a different setting, you can select or input a custom macro - from the drop down box just below -\begin_inset Flex Noun -status collapsed +The `\SpecialChar LyX + server' allows other programs to talk to \SpecialChar LyX +, invoke \SpecialChar LyX + commands, and retrieve + information about the \SpecialChar LyX + internal state. + This is only intended for advanced users, but they should find it useful. + It is by writing to the \SpecialChar LyX + server, for example, that bibliography managers, + such as JabRef, are able to +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout -Document\SpecialChar menuseparator -Settings\SpecialChar menuseparator -Output\SpecialChar menuseparator -Synchronize with Output +push +\begin_inset Quotes erd +\end_inset + + citations to \SpecialChar LyX +. \end_layout +\begin_layout Section +Starting the \SpecialChar LyX + Server +\begin_inset CommandInset label +LatexCommand label +name "sec:Starting-the-Server" + \end_inset -. + \end_layout \begin_layout Standard -Note that the method +The \SpecialChar LyX + server works through the use of a pair of named pipes. + These are usually located in \begin_inset Flex Code status collapsed \begin_layout Plain Layout - -\backslash -synctex=1 +UserDir \end_layout \end_inset - enables gzip compression. - If your viewer does not support it, you should instead use +, (except on Windows, where +\emph on +local +\emph default + named pipes are special objects located in \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash -synctex=-1 -\end_layout - -\end_inset +\backslash . +\backslash +pipe \end_layout -\begin_layout Standard -Please also note that including the -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -srcltx -\end_layout +\end_inset +) and have the names +\begin_inset Quotes eld \end_inset - package or + \begin_inset Flex Code status collapsed \begin_layout Plain Layout -src-specials +lyxpipe.in \end_layout \end_inset - sometimes has an undesired impact on the typesetting. - Thus, you should switch output synchronization off for the final typesetting - if you use the -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -srcltx -\end_layout +\begin_inset Quotes erd +\end_inset + and +\begin_inset Quotes eld \end_inset - package or + \begin_inset Flex Code status collapsed \begin_layout Plain Layout -src-specials -\end_layout - -\end_inset - -. - +lyxpipe.out \end_layout -\begin_layout Standard -In case you need some more special settings that are not covered by the - automatic settings, read the next section about how to set up output synchroniz -ation manually. - If the automatic setup suits your needs, you can readily jump to section -\begin_inset space ~ \end_inset -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:configuring-viewers" - +\begin_inset Quotes erd \end_inset -, where the necessary configuration steps in your viewer – needed both with - the automatic and the manual setup – are described. -\end_layout - -\begin_layout Subsection -Manual setup -\end_layout - -\begin_layout Standard -\SpecialChar LaTeX - provides several different methods for reverse search. - Some are built-in in the +. + External programs write into \begin_inset Flex Code status collapsed \begin_layout Plain Layout -latex/pdflatex +lyxpipe.in \end_layout \end_inset - program, some are provided by external packages. - Your choice depends on whether your \SpecialChar LaTeX - distribution already provides a given - method (the built-in methods are rather new) and whether your viewer can - cope with it. - The available methods are described in the following. -\end_layout - -\begin_layout Subsubsection* -Built-in DVI-search via src-specials (DVI only) -\end_layout - -\begin_layout Standard -This method provides the DVI file with the necessary information for reverse - search. - It is available in \SpecialChar LaTeX - since quite some time (any somewhat recent \SpecialChar LaTeX - distribution - should include it), and it works reliably. - To enable it, change the -\begin_inset Flex Noun + and read back data from +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -La -\family sans -TeX -\family default - (plain)->DVI +lyxpipe.out \end_layout \end_inset - or +. + The stem of the pipe names can be defined in the \begin_inset Flex Noun status collapsed \begin_layout Plain Layout -La -\family sans -TeX -\family default - (plain)->DraftDVI +Tools\SpecialChar menuseparator +Preferences \end_layout \end_inset - converter in -\begin_inset Flex Noun + dialog, for example +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Preferences\SpecialChar menuseparator -File Handling\SpecialChar menuseparator -Converters +"/home/myhome/lyxpipe" \end_layout \end_inset - to +, or \begin_inset Flex Code status collapsed \begin_layout Plain Layout -latex -src-specials $$i -\end_layout - -\end_inset +" +\backslash +\backslash . - If this doesn't work, check if your \SpecialChar TeX - engine needs different options (the - syntax might differ in some distributions). -\end_layout - -\begin_layout Subsubsection* -External Packages (PDFSync and scrltx) +\backslash +pipe +\backslash +lyxpipe" \end_layout -\begin_layout Standard -The packages -\emph on -pdfsync -\emph default - and -\emph on -scrltx -\emph default - provide reverse search facility for PDF output (via pdflatex) and DVI output, - respectively. - In order to enable it, load the packages in the \SpecialChar LyX - preamble: -\end_layout +\end_inset -\begin_layout Itemize + on Windows (where any working path instead of lyxpipe can be used, for + example \begin_inset Flex Code status collapsed \begin_layout Plain Layout +" +\backslash \backslash -usepackage{pdfsync} +. +\backslash +pipe +\backslash +my +\backslash +lyx +\backslash +pipe" \end_layout \end_inset - for reverse PDF search, + would also work). + You +\emph on +must +\emph default + configure this manually in order for the server to start. \end_layout -\begin_layout Itemize +\begin_layout Standard +\SpecialChar LyX + will add the ' \begin_inset Flex Code status collapsed \begin_layout Plain Layout - -\backslash -usepackage[active]{srcltx} +.in \end_layout \end_inset - for reverse DVI search. -\end_layout +' and ' +\begin_inset Flex Code +status collapsed -\begin_layout Standard -If you want to be able to perform both DVI and PDF reverse searches, you - can also insert in the preamble the following lines +\begin_layout Plain Layout +.out \end_layout -\begin_layout LyX-Code - -\backslash -usepackage{ifpdf} -\begin_inset Newline newline -\end_inset - - -\backslash -ifpdf -\begin_inset Newline newline \end_inset - -\backslash -usepackage{pdfsync} -\begin_inset Newline newline +' to create the pipes. + If one of the pipes already exists, \SpecialChar LyX + will assume that another \SpecialChar LyX + process + is already running and will not start the server. + On POSIX (Unix like) systems, if for some other reason, an unused +\begin_inset Quotes eld \end_inset - -\backslash -else -\begin_inset Newline newline +stale +\begin_inset Quotes erd \end_inset - -\backslash -usepackage[active]{srcltx} -\begin_inset Newline newline + pipe is left in existence when \SpecialChar LyX + closes, then \SpecialChar LyX + will try to delete it. + If this fails for some reason, you will need to delete the pipes manually + and then restart \SpecialChar LyX +. + On Windows, pipes are deleted by the OS on program termination or crash, + so +\begin_inset Quotes eld \end_inset +stale +\begin_inset Quotes erd +\end_inset -\backslash -fi + pipes should not be possible. \end_layout \begin_layout Standard -This way, you can preview the file as either DVI or PDF (pdflatex) and the - right package will be used. -\end_layout +To have several \SpecialChar LyX + processes with servers at the same time, you have to use + different configurations, perhaps by using separate user directories, each + with its own +\begin_inset Flex Code +status collapsed -\begin_layout Standard -Note that PDFSync might affect the output layout of your document. - It is therefore advised to disable PDFsync for final documents. +\begin_layout Plain Layout +preferences \end_layout -\begin_layout Subsubsection* -Built-in reverse search via Sync\SpecialChar TeX - (DVI and PDF) +\end_inset + + file, for each process. \end_layout \begin_layout Standard -Recent versions of +If you are developing a client program, you might find it useful to enable + debugging information from the \SpecialChar LyX + server. + Do this by starting \SpecialChar LyX + as \begin_inset Flex Code status collapsed \begin_layout Plain Layout -(pdf)latex +lyx -dbg lyxserver \end_layout \end_inset - have built-in support for both PDF and DVI reverse search. - This so-called -\emph on -Sync\SpecialChar TeX +. +\end_layout -\emph default - facility is basically the result of the integration of the PDFSync package - to the pdftex program and its merge with the -\emph on -scr-specials -\emph default - approach. - You need at least \SpecialChar TeX -Live 2008 or a recent Mik\SpecialChar TeX - distribution in order to use - it. -\begin_inset Foot +\begin_layout Standard +You can find a complete example client written in C++ in the source distribution + as +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -For some reason, Mik\SpecialChar TeX - does not understand/obey the command \SpecialChar LyX - inserts into - the preamble when you check the "Enable Forward/Reverse Search" button - in the toolbar and does not generate the necessary info. -\end_layout - -\begin_layout Plain Layout -The generation of the required info can be forced by changing the converter - "\SpecialChar LaTeX - (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters - from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding - the -synctex=1 switch). +development/lyxserver/server_monitor.cpp \end_layout \end_inset - Also note that only a few PDF viewers (such as Okular and Qpdfview on Unix, - Skim on the Mac, SumatraPDF on Windows; see the next section for details) - already provide Sync\SpecialChar TeX - support. +. \end_layout \begin_layout Standard -To enable Sync\SpecialChar TeX - for DVI output, change the -\begin_inset Flex Noun +Another useful tool is the command-line based client found in +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -La -\family sans -TeX -\family default - (plain) -> DVI +src/client/lyxclient \end_layout \end_inset - or -\begin_inset Flex Noun -status collapsed +. +\end_layout -\begin_layout Plain Layout -La -\family sans -TeX -\family default - (plain) -> DraftDVI +\begin_layout Section +Normal communication \end_layout -\end_inset +\begin_layout Standard +To issue a \SpecialChar LyX + call, the client writes a line of ASCII text into the input + pipe. + This line has the following format: +\end_layout - converter in -\begin_inset Flex Noun -status collapsed +\begin_layout Quote +LYXCMD: +\emph on +clientname +\emph default +: +\emph on +function +\emph default +: +\emph on +argument +\end_layout -\begin_layout Plain Layout -Preferences\SpecialChar menuseparator -File Handling\SpecialChar menuseparator -Converters +\begin_layout Description +clientname is a name that the client can choose arbitrarily. + Its only use is that \SpecialChar LyX + will echo it if it sends an answer—so a client can + dispatch results from different requesters. +\end_layout + +\begin_layout Description +function is the function you want \SpecialChar LyX + to perform. + It is the same as the commands you'd use in the minibuffer. \end_layout +\begin_layout Description +argument is an optional argument which is meaningful only to some functions + (for instance, the +\begin_inset Quotes eld \end_inset - to -\begin_inset Flex Code -status collapsed +self-insert +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -latex -synctex=1 $$i + LFUN will insert the argument as text at the cursor position). \end_layout -\end_inset - -, and for PDF output, change the -\begin_inset Flex Noun -status collapsed +\begin_layout Standard +The answer from \SpecialChar LyX + will arrive in the output pipe and be of the form +\end_layout -\begin_layout Plain Layout -La -\family sans -TeX -\family default - (pdflatex) -> PDF (pdflatex) +\begin_layout Quote +INFO: +\emph on +clientname +\emph default +: +\emph on +function +\emph default +: +\emph on +data \end_layout +\begin_layout Standard +where +\emph on +clientname +\emph default + and +\emph on +function +\emph default + are just echoed from the command request, while +\emph on +data +\emph default + is more or less useful information filled according to how the command + execution worked out. + Some commands, such as +\begin_inset Quotes eld \end_inset - converter to -\begin_inset Flex Code -status collapsed +font-state +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -pdflatex -synctex=1 $$i +, will return information about the internal state of \SpecialChar LyX +, while other will + return an empty data-response. + This means that the command execution went fine. \end_layout -\end_inset - -. - Should your viewer not be considered in the following description, or in - case of missing success, please check the documentation of your viewer - whether the viewer needs to be configured for the use with Sync\SpecialChar TeX -. -\begin_inset Foot -status collapsed +\begin_layout Standard +In case of errors, the response from \SpecialChar LyX + will have this form +\end_layout -\begin_layout Plain Layout -Note that the option -\begin_inset Flex Code -status collapsed +\begin_layout Quote +ERROR: +\emph on +clientname +\emph default +: +\emph on +function +\emph default +: +\emph on +error message +\end_layout -\begin_layout Plain Layout --synctex=1 +\begin_layout Standard +where the +\emph on +error message +\emph default + should contain an explanation of why the command failed. \end_layout -\end_inset - - option enables gzip compression. - If your viewer does not support it, you should instead use -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout --synctex=-1 +\begin_layout Standard +Examples: \end_layout +\begin_layout LyX-Code +echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in +\begin_inset Newline newline \end_inset -. -\end_layout - +echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in +\begin_inset Newline newline \end_inset +read a <~/.lyxpipe.out +\begin_inset Newline newline +\end_inset +echo $a \end_layout \begin_layout Subsection -Configuring and using specific viewers -\begin_inset CommandInset label -LatexCommand label -name "subsec:configuring-viewers" - -\end_inset - - +AppleScript (Mac OS X) \end_layout -\begin_layout Subsubsection* -Xdvi (all platforms) +\begin_layout Standard +Since \SpecialChar LyX + 2.1, \SpecialChar LyX + supports basic interactions with AppleScript for normal communicatio +n through the command run. + This command takes a direct argument (the +\series bold +function +\series default + to perform) and an optional argument. + It either returns the output of the function or triggers an error with + the error message and code. \end_layout \begin_layout Standard -If you use -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -xdvi +Example: \end_layout -\end_inset - -, you don't need to do anything else for performing a reverse DVI search, - as \SpecialChar LyX - already provides the necessary hooks for automatically using the -\begin_inset Flex Code -status collapsed +\begin_layout LyX-Code +tell application "\SpecialChar LyX +" +\end_layout -\begin_layout Plain Layout -lyxclient +\begin_layout LyX-Code + try \end_layout -\end_inset +\begin_layout LyX-Code + -- Stores the current file name into f +\end_layout - program. - Just setup your document as described above (reverse search is triggered - by Ctrl-click or Alt-click on Mac OSX, respectively). +\begin_layout LyX-Code + set f to (run "server-get-filename" with argument "") \end_layout -\begin_layout Standard -However, if for whatever reason you want to use the named pipe instead of - the socket for communicating with \SpecialChar LyX -, simply change the DVI viewer in -\begin_inset Flex Noun -status collapsed +\begin_layout LyX-Code + on error the error_message number the error_number +\end_layout -\begin_layout Plain Layout -Preferences\SpecialChar menuseparator -File Handling\SpecialChar menuseparator -File formats +\begin_layout LyX-Code + display dialog "Error: " & the error_number & ". + " ¬ \end_layout -\end_inset +\begin_layout LyX-Code + & the error_message buttons {"OK"} default button 1 +\end_layout - to -\begin_inset Foot -status collapsed +\begin_layout LyX-Code + end try +\end_layout -\begin_layout Plain Layout -On Mac OSX you have to use -\begin_inset Flex Code -status collapsed +\begin_layout LyX-Code +end tell +\end_layout -\begin_layout Plain Layout -DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l" +\begin_layout Section +Notification \end_layout +\begin_layout Standard +\SpecialChar LyX + can notify clients of events going on asynchronously. + Currently it will only do this if the user binds a key sequence with the + function +\begin_inset Quotes eld \end_inset +notify +\begin_inset Quotes erd +\end_inset +. + The format of the string \SpecialChar LyX + sends is as follows: \end_layout -\end_inset - - +\begin_layout Quote \begin_inset Flex Code status collapsed \begin_layout Plain Layout -xdvi -editor "lyxeditor.sh %f %l" +NOTIFY: \end_layout \end_inset -, where -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -lyxeditor.sh +\emph on +key-sequence \end_layout -\end_inset - - is a suitable script. - For example, a minimal shell script is the following one: +\begin_layout Standard +where +\emph on +key-sequence +\emph default + is the printed representation of the key sequence that was actually typed + by the user. \end_layout -\begin_layout LyX-Code -#!/bin/sh -\begin_inset Newline newline -\end_inset - -LYXPIPE="/path/to/lyxpipe" -\begin_inset Newline newline +\begin_layout Standard +This mechanism can be used to extend \SpecialChar LyX +'s command set and implement macros. + Bind some key sequence to +\begin_inset Quotes eld \end_inset -COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2" -\begin_inset Newline newline +notify +\begin_inset Quotes erd \end_inset -echo "$COMMAND" > "${LYXPIPE}".in || exit -\begin_inset Newline newline -\end_inset +. + Then start a client that listens on the output pipe, dispatches the command + according to the sequence, and starts a function that may use \SpecialChar LyX + calls and + \SpecialChar LyX + requests to issue a command or a series of commands to \SpecialChar LyX +. +\end_layout -read TMP < "${LYXPIPE}".out || exit +\begin_layout Section +The simple \SpecialChar LyX + Server Protocol \end_layout \begin_layout Standard -where -\begin_inset Flex Code -status collapsed +\SpecialChar LyX + implements a simple protocol that can be used for session management. + All messages are of the form +\end_layout -\begin_layout Plain Layout -/path/to/lyxpipe +\begin_layout Quote +LYXSRV: +\emph on +clientname +\emph default +: +\emph on +protocol message \end_layout +\begin_layout Standard +where +\emph on +protocol message +\emph default + can be +\begin_inset Quotes eld \end_inset - is the LyXServer pipe path specified in -\begin_inset Flex Noun -status collapsed +hello +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -Preferences\SpecialChar menuseparator -Paths -\end_layout + or +\begin_inset Quotes eld +\end_inset +bye +\begin_inset Quotes erd \end_inset . -\begin_inset Foot -status collapsed + If +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout -In the -\begin_inset Flex Code -status collapsed +hello +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -development/tools -\end_layout + is received from a client, \SpecialChar LyX + will report back to inform the client that + it's listening to it's messages, while +\begin_inset Quotes eld +\end_inset +bye +\begin_inset Quotes erd \end_inset - folder of a source distribution you can find a -\begin_inset Flex Code + sent from \SpecialChar LyX + will inform clients that \SpecialChar LyX + is closing. +\end_layout + +\begin_layout Section +Reverse DVI/PDF search +\end_layout + +\begin_layout Standard +Some DVI/PDF viewers +\begin_inset Foot status collapsed \begin_layout Plain Layout -lyxeditor +The following viewers offer the reverse PDF search feature: Okular on KDE/Linux, + Qpdfview on Unix, Skim on Mac OSX and SumatraPDF on Windows. \end_layout \end_inset - script which is able to locate the + provide +\emph on +reverse search +\emph default + facility (also called +\emph on +inverse search +\emph default +). + This means that you can tell \SpecialChar LyX + to put the cursor to a specific line in the + document by clicking at the respective position in the DVI/PDF output. + To achieve this, the viewer must be able to communicate with \SpecialChar LyX +. + This is done via the \SpecialChar LyX + server either by using the named pipe ( \emph on lyxpipe \emph default - based on your preferences. -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsubsection* -MacDviX (Mac OSX) -\end_layout - -\begin_layout Standard -At the end of +), or the UNIX domain socket ( +\emph on +lyxsocket +\emph default +) that \SpecialChar LyX + creates in its temporary directory (this is the way the \begin_inset Flex Code status collapsed \begin_layout Plain Layout -/Applications/MacDviX_Folder/calleditor.script +lyxclient \end_layout \end_inset -, add the following lines: + program communicates with \SpecialChar LyX +). + In some cases, you need a helper script that mediates between the viewer + and \SpecialChar LyX +, in others, the viewer can communicate with \SpecialChar LyX + directly. + This depends on the selected viewer and on your operating system. + The same applies to the way viewers need to be configured and the way the + reverse search is actually performed. + In what follows, we will thus describe how to setup reverse search for + specific viewers. + Before we turn to this, though, we will explain what needs to be done generally + to enable reverse search in the DVI/PDF output. \end_layout -\begin_layout LyX-Code -/Applications/LyX.app/Contents/MacOS/lyxeditor "$2" $1 -\begin_inset Newline newline +\begin_layout Subsection +Automatic setup +\begin_inset CommandInset label +LatexCommand label +name "subsec:rev-search" + \end_inset -exit 1 -\end_layout -\begin_layout Standard -Modify the lines accordingly if you install \SpecialChar LyX - somewhere else than in the - Applications folder. \end_layout \begin_layout Standard -Reverse search is triggered by Alt-click (OPTION-click). -\end_layout - -\begin_layout Subsubsection* -Skim (Mac OSX) -\end_layout +In most cases \SpecialChar LyX + will do the work for you by pressing the following button + in the toolbar: +\begin_inset Info +type "icon" +arg "buffer-toggle-output-sync" +\end_inset -\begin_layout Standard -Enter -\begin_inset Flex Code +. + Alternatively, you can also enable the feature by checking +\family sans +Synchronize with Output +\family default + in +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout -open -a Skim.app $$i +Document\SpecialChar menuseparator +Settings\SpecialChar menuseparator +Formats \end_layout \end_inset - to the viewer setting in -\begin_inset Flex Noun +. + In such a case \SpecialChar LyX + will automatically insert the necessary Sync\SpecialChar TeX + macro (for + PDF) or load the srcltx package (for DVI) respectively. + This option can be easily reached also on +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Preferences\SpecialChar menuseparator -File Handling\SpecialChar menuseparator -File formats\SpecialChar menuseparator -PDF (pdflatex) +View/Update \end_layout \end_inset -, and then in + Toolbar. +\end_layout + +\begin_layout Standard +If you need a different setting, you can select or input a custom macro + from the drop down box just below \begin_inset Flex Noun status collapsed \begin_layout Plain Layout -Skim\SpecialChar menuseparator -Preferences\SpecialChar menuseparator -Sync +Document\SpecialChar menuseparator +Settings\SpecialChar menuseparator +Output\SpecialChar menuseparator +Synchronize with Output \end_layout \end_inset - choose -\begin_inset Flex Noun +. +\end_layout + +\begin_layout Standard +Note that the method +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -custom + +\backslash +synctex=1 \end_layout \end_inset - preset and enter command -\begin_inset Flex Noun + enables gzip compression. + If your viewer does not support it, you should instead use +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -/Applications/\SpecialChar LyX -.app/Contents/MacOS/lyxeditor + +\backslash +synctex=-1 \end_layout \end_inset @@ -19059,2441 +19412,2344 @@ status collapsed \end_layout \begin_layout Standard -Reverse search is triggered by COMMAND-SHIFT-click -\end_layout +Please also note that including the +\begin_inset Flex Code +status collapsed -\begin_layout Subsubsection* -Evince (GNOME) +\begin_layout Plain Layout +srcltx \end_layout -\begin_layout Standard -Reverse search with evince does not work out of the box, but it can be achieved - by means of some third party helper scripts. - Please refer to -\begin_inset CommandInset href -LatexCommand href -target "https://wiki.lyx.org/LyX/SyncTeX" -literal "false" - \end_inset - for details. -\end_layout + package or +\begin_inset Flex Code +status collapsed -\begin_layout Subsubsection* -Okular (KDE) +\begin_layout Plain Layout +src-specials \end_layout -\begin_layout Standard -Go to -\begin_inset Flex Noun +\end_inset + + sometimes has an undesired impact on the typesetting. + Thus, you should switch output synchronization off for the final typesetting + if you use the +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Settings\SpecialChar menuseparator -Configure Okular\SpecialChar menuseparator -Editor +srcltx \end_layout \end_inset - and select LyX -\begin_inset Quotes erd -\end_inset - - as editor. - This inserts the appropriate command ( + package or \begin_inset Flex Code status collapsed \begin_layout Plain Layout -lyxclient -g %f %l +src-specials \end_layout \end_inset -). +. + \end_layout \begin_layout Standard -Reverse search is triggered by SHIFT-click. - -\change_inserted -712698321 1578211026 - Note that this only works if Okular is in -\begin_inset Quotes eld +In case you need some more special settings that are not covered by the + automatic settings, read the next section about how to set up output synchroniz +ation manually. + If the automatic setup suits your needs, you can readily jump to section +\begin_inset space ~ \end_inset -Browse -\begin_inset Quotes erd -\end_inset - mode (i. -\begin_inset space \thinspace{} -\end_inset +\begin_inset CommandInset ref +LatexCommand ref +reference "subsec:configuring-viewers" -e., the hand symbol is clicked). -\change_unchanged +\end_inset +, where the necessary configuration steps in your viewer – needed both with + the automatic and the manual setup – are described. \end_layout -\begin_layout Subsubsection* -Qpdfview (Unix) +\begin_layout Subsection +Manual setup \end_layout \begin_layout Standard -Qpdfview supports Sync\SpecialChar TeX - since version 0.3.5. - Go to -\begin_inset Flex Noun -status collapsed - -\begin_layout Plain Layout -Edit\SpecialChar menuseparator -Settings\SpecialChar menuseparator -Behavior -\end_layout - -\end_inset - -, click on the input field of the -\begin_inset Quotes eld -\end_inset - -Source editor -\begin_inset Quotes erd -\end_inset - - item and add the command +\SpecialChar LaTeX + provides several different methods for reverse search. + Some are built-in in the \begin_inset Flex Code status collapsed \begin_layout Plain Layout -lyxclient -g %1 %2 +latex/pdflatex \end_layout \end_inset -. -\end_layout - -\begin_layout Standard -Reverse search is triggered by double-click or, in more recent versions, - by context menu. + program, some are provided by external packages. + Your choice depends on whether your \SpecialChar LaTeX + distribution already provides a given + method (the built-in methods are rather new) and whether your viewer can + cope with it. + The available methods are described in the following. \end_layout \begin_layout Subsubsection* -YAP (Windows) +Built-in DVI-search via src-specials (DVI only) \end_layout \begin_layout Standard -Launch yap, choose its +This method provides the DVI file with the necessary information for reverse + search. + It is available in \SpecialChar LaTeX + since quite some time (any somewhat recent \SpecialChar LaTeX + distribution + should include it), and it works reliably. + To enable it, change the \begin_inset Flex Noun status collapsed \begin_layout Plain Layout -View\SpecialChar menuseparator -Options +La +\family sans +TeX +\family default + (plain)->DVI \end_layout \end_inset - menu and select the -\begin_inset Quotes eld -\end_inset - -Inverse DVI Search -\begin_inset Quotes erd -\end_inset - - tab. - Click on the -\begin_inset Quotes eld -\end_inset - -New\SpecialChar ldots - -\begin_inset Quotes erd -\end_inset - - button and, in the window that opens, enter -\begin_inset Quotes eld -\end_inset - -\SpecialChar LyX - Editor -\begin_inset Quotes erd -\end_inset + or +\begin_inset Flex Noun +status collapsed - (or any other name you like) in the -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout +La +\family sans +TeX +\family default + (plain)->DraftDVI +\end_layout -Name: -\begin_inset Quotes erd \end_inset - field. - Now click on the button labeled -\begin_inset Quotes eld -\end_inset + converter in +\begin_inset Flex Noun +status collapsed -\SpecialChar ldots +\begin_layout Plain Layout +Preferences\SpecialChar menuseparator +File Handling\SpecialChar menuseparator +Converters +\end_layout -\begin_inset Quotes erd \end_inset - to open a file dialog and navigate to the directory containing the batch - file + to \begin_inset Flex Code status collapsed \begin_layout Plain Layout -lyxeditor.bat +latex -src-specials $$i \end_layout \end_inset - (see below). - Select -\begin_inset Flex Code -status collapsed +. + If this doesn't work, check if your \SpecialChar TeX + engine needs different options (the + syntax might differ in some distributions). +\end_layout -\begin_layout Plain Layout -lyxeditor.bat +\begin_layout Subsubsection* +External Packages (PDFSync and scrltx) \end_layout -\end_inset +\begin_layout Standard +The packages +\emph on +pdfsync +\emph default + and +\emph on +scrltx +\emph default + provide reverse search facility for PDF output (via pdflatex) and DVI output, + respectively. + In order to enable it, load the packages in the \SpecialChar LyX + preamble: +\end_layout - and then specify the program arguments as +\begin_layout Itemize \begin_inset Flex Code status collapsed \begin_layout Plain Layout -%f %l + +\backslash +usepackage{pdfsync} \end_layout \end_inset -. - The + for reverse PDF search, +\end_layout + +\begin_layout Itemize \begin_inset Flex Code status collapsed \begin_layout Plain Layout -lyxeditor.bat + +\backslash +usepackage[active]{srcltx} \end_layout \end_inset - wrapper is used for communicating with \SpecialChar LyX - through the -\emph on -lyxpipe -\emph default - and is as follows: + for reverse DVI search. +\end_layout + +\begin_layout Standard +If you want to be able to perform both DVI and PDF reverse searches, you + can also insert in the preamble the following lines \end_layout \begin_layout LyX-Code -@echo off + +\backslash +usepackage{ifpdf} \begin_inset Newline newline \end_inset -echo LYXCMD:revdvi:server-goto-file-row:%~1 %2> -\backslash \backslash -. -\backslash -pipe -\backslash -lyxpipe.in +ifpdf \begin_inset Newline newline \end_inset -type -\backslash - -\backslash -. -\backslash -pipe + \backslash -lyxpipe.out -\end_layout - -\begin_layout Standard -Make sure that the \SpecialChar LyX -Server pipe path you specified in \SpecialChar LyX - is -\begin_inset Flex Code -status collapsed +usepackage{pdfsync} +\begin_inset Newline newline +\end_inset -\begin_layout Plain Layout \backslash +else +\begin_inset Newline newline +\end_inset + \backslash -. -\backslash -pipe -\backslash -lyxpipe -\end_layout - +usepackage[active]{srcltx} +\begin_inset Newline newline \end_inset -, otherwise change the -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -lyxeditor.bat +\backslash +fi \end_layout -\end_inset - - wrapper accordingly. +\begin_layout Standard +This way, you can preview the file as either DVI or PDF (pdflatex) and the + right package will be used. \end_layout \begin_layout Standard -In yap, reverse search is triggered by double-click. +Note that PDFSync might affect the output layout of your document. + It is therefore advised to disable PDFsync for final documents. \end_layout \begin_layout Subsubsection* -SumatraPDF (Windows) +Built-in reverse search via Sync\SpecialChar TeX + (DVI and PDF) \end_layout \begin_layout Standard -In order to use SumatraPDF for inverse search, enter +Recent versions of \begin_inset Flex Code status collapsed \begin_layout Plain Layout -SumatraPDF -inverse-search "lyxeditor.bat "%f" %l" +(pdf)latex \end_layout \end_inset - in the viewer setting in -\begin_inset Flex Noun + have built-in support for both PDF and DVI reverse search. + This so-called +\emph on +Sync\SpecialChar TeX + +\emph default + facility is basically the result of the integration of the PDFSync package + to the pdftex program and its merge with the +\emph on +scr-specials +\emph default + approach. + You need at least \SpecialChar TeX +Live 2008 or a recent Mik\SpecialChar TeX + distribution in order to use + it. +\begin_inset Foot status collapsed \begin_layout Plain Layout -Preferences\SpecialChar menuseparator -File Handling\SpecialChar menuseparator -File formats\SpecialChar menuseparator -PDF (pdflatex) +For some reason, Mik\SpecialChar TeX + does not understand/obey the command \SpecialChar LyX + inserts into + the preamble when you check the "Enable Forward/Reverse Search" button + in the toolbar and does not generate the necessary info. \end_layout -\end_inset - -, where -\begin_inset Flex Code -status collapsed - \begin_layout Plain Layout -lyxeditor.bat +The generation of the required info can be forced by changing the converter + "\SpecialChar LaTeX + (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters + from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding + the -synctex=1 switch). \end_layout \end_inset - is the previous wrapper. - If SumatraPDF.exe is not in your command PATH, use its full file name. -\end_layout - -\begin_layout Standard -Reverse search is triggered by double-click. -\end_layout - -\begin_layout Subsubsection* -YAP (Cygwin) + Also note that only a few PDF viewers (such as Okular and Qpdfview on Unix, + Skim on the Mac, SumatraPDF on Windows; see the next section for details) + already provide Sync\SpecialChar TeX + support. \end_layout \begin_layout Standard -First of all, make sure that yap is your default DVI viewer in the Windows - environment, then launch it, choose its +To enable Sync\SpecialChar TeX + for DVI output, change the \begin_inset Flex Noun status collapsed \begin_layout Plain Layout -View\SpecialChar menuseparator -Options +La +\family sans +TeX +\family default + (plain) -> DVI \end_layout \end_inset - menu and select the -\begin_inset Quotes eld -\end_inset - -Inverse DVI Search -\begin_inset Quotes erd -\end_inset - - tab. - Click on the -\begin_inset Quotes eld -\end_inset - -New\SpecialChar ldots - -\begin_inset Quotes erd -\end_inset - - button and, in the window that opens, enter -\begin_inset Quotes eld -\end_inset - -\SpecialChar LyX - Editor -\begin_inset Quotes erd -\end_inset + or +\begin_inset Flex Noun +status collapsed - (or any other name you like) in the -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout +La +\family sans +TeX +\family default + (plain) -> DraftDVI +\end_layout -Name: -\begin_inset Quotes erd \end_inset - field. - Now click on the button labeled -\begin_inset Quotes eld -\end_inset + converter in +\begin_inset Flex Noun +status collapsed -\SpecialChar ldots +\begin_layout Plain Layout +Preferences\SpecialChar menuseparator +File Handling\SpecialChar menuseparator +Converters +\end_layout -\begin_inset Quotes erd \end_inset - to open a file dialog and navigate to the directory containing the + to \begin_inset Flex Code status collapsed \begin_layout Plain Layout -lyxeditor.exe +latex -synctex=1 $$i \end_layout \end_inset - program (which is installed by default on Cygwin along with the \SpecialChar LyX - executable). - Select -\begin_inset Flex Code +, and for PDF output, change the +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout -lyxeditor.exe +La +\family sans +TeX +\family default + (pdflatex) -> PDF (pdflatex) \end_layout \end_inset - and then specify the program arguments as + converter to \begin_inset Flex Code status collapsed \begin_layout Plain Layout --g %f %l +pdflatex -synctex=1 $$i \end_layout \end_inset . - In this way, you will be using the -\emph on -lyxsocket -\emph default - for communicating with \SpecialChar LyX + Should your viewer not be considered in the following description, or in + case of missing success, please check the documentation of your viewer + whether the viewer needs to be configured for the use with Sync\SpecialChar TeX . - If, for whatever reason, you want to use the -\emph on -lyxpipe -\emph default -, omit the -\begin_inset Flex Code +\begin_inset Foot status collapsed \begin_layout Plain Layout --g -\end_layout - -\end_inset - - option and be sure to specify the \SpecialChar LyX -Server pipe path in the \SpecialChar LyX - preferences. -\end_layout - -\begin_layout Standard -In yap, reverse search is triggered by double-click. -\end_layout - -\begin_layout Subsubsection* -SumatraPDF (Cygwin) -\end_layout - -\begin_layout Standard -In order to use SumatraPDF for inverse search, enter +Note that the option \begin_inset Flex Code status collapsed \begin_layout Plain Layout -SumatraPDF -inverse-search "lyxeditor -g %f %l" +-synctex=1 \end_layout \end_inset - in the viewer setting in -\begin_inset Flex Noun + option enables gzip compression. + If your viewer does not support it, you should instead use +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Preferences\SpecialChar menuseparator -File Handling\SpecialChar menuseparator -File formats\SpecialChar menuseparator -PDF (pdflatex) +-synctex=-1 \end_layout \end_inset . - If SumatraPDF.exe is not in your command PATH, use its full posix path. - The -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout --g \end_layout \end_inset - enables communication via the -\emph on -lyxsocket -\emph default -. - Again, omit the -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout --g \end_layout +\begin_layout Subsection +Configuring and using specific viewers +\begin_inset CommandInset label +LatexCommand label +name "subsec:configuring-viewers" + \end_inset - option if you want to use the -\emph on -lyxpipe -\emph default -, and be sure to specify the \SpecialChar LyX -Server pipe path in the \SpecialChar LyX - preferences. -\end_layout -\begin_layout Standard -Reverse search is triggered by double-click. \end_layout -\begin_layout Section -Forward search +\begin_layout Subsubsection* +Xdvi (all platforms) \end_layout \begin_layout Standard -Forward search is, as the name implies, in a sense the -\begin_inset Quotes eld -\end_inset - -opposite -\begin_inset Quotes erd -\end_inset - - of reverse search. - It allows you to let the viewer jump to a given position from within \SpecialChar LyX -. - If forward search is set up (as described in what follows), you can put - the cursor anywhere in your \SpecialChar LyX - document, and hit -\begin_inset Flex Noun +If you use +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Navigate\SpecialChar menuseparator -Forward search +xdvi \end_layout \end_inset - (or select -\begin_inset Flex Noun +, you don't need to do anything else for performing a reverse DVI search, + as \SpecialChar LyX + already provides the necessary hooks for automatically using the +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Forward search -\end_layout - -\end_inset - - in the context menu via right mouse click), and then the viewer will jump - to that position as well. - This implies, of course, that your viewer supports this function. +lyxclient \end_layout -\begin_layout Standard -To make forward search possible, you first need to provide the generated - output PDF/DVI file with additional information about the \SpecialChar TeX - sources. - This can be done via the methods described in the section -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:rev-search" - \end_inset -. + program. + Just setup your document as described above (reverse search is triggered + by Ctrl-click or Alt-click on Mac OSX, respectively). \end_layout \begin_layout Standard -Additionally, you need to configure \SpecialChar LyX - for using your viewers in +However, if for whatever reason you want to use the named pipe instead of + the socket for communicating with \SpecialChar LyX +, simply change the DVI viewer in \begin_inset Flex Noun status collapsed \begin_layout Plain Layout -Tools\SpecialChar menuseparator Preferences\SpecialChar menuseparator -Output\SpecialChar menuseparator -General +File Handling\SpecialChar menuseparator +File formats \end_layout \end_inset -. - We provide a range of tested configurations for some viewers, which you - can select from the drop down list. - If none of these configurations suits you, you have to find out and enter - a suitable configuration yourself. - The definition syntax uses the following placeholders: -\end_layout + to +\begin_inset Foot +status collapsed -\begin_layout Itemize -\noindent +\begin_layout Plain Layout +On Mac OSX you have to use \begin_inset Flex Code status collapsed \begin_layout Plain Layout -$$n +DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l" \end_layout \end_inset -: row number + \end_layout -\begin_layout Itemize -\noindent +\end_inset + + \begin_inset Flex Code status collapsed \begin_layout Plain Layout -$$t +xdvi -editor "lyxeditor.sh %f %l" \end_layout \end_inset -: name of the (temporary) exported .tex file (without path) -\end_layout - -\begin_layout Itemize -\noindent +, where \begin_inset Flex Code status collapsed \begin_layout Plain Layout -$$f +lyxeditor.sh \end_layout \end_inset -: name of the (temporary) exported .tex file (including path) + is a suitable script. + For example, a minimal shell script is the following one: \end_layout -\begin_layout Itemize -\noindent -\begin_inset Flex Code -status collapsed +\begin_layout LyX-Code +#!/bin/sh +\begin_inset Newline newline +\end_inset -\begin_layout Plain Layout -$$o -\end_layout +LYXPIPE="/path/to/lyxpipe" +\begin_inset Newline newline +\end_inset +COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2" +\begin_inset Newline newline \end_inset -: name of the exported output file (either dvi or pdf, depending on which - one exists in the temporary directory) +echo "$COMMAND" > "${LYXPIPE}".in || exit +\begin_inset Newline newline +\end_inset + +read TMP < "${LYXPIPE}".out || exit \end_layout \begin_layout Standard -Note that only some of the viewers provide full and usable forward search - functionality out of the box, among them yap, xdvi, okular -\begin_inset Foot -status collapsed - -\begin_layout Plain Layout -You might want to set +where \begin_inset Flex Code status collapsed \begin_layout Plain Layout -okular --unique +/path/to/lyxpipe \end_layout \end_inset - in + is the LyXServer pipe path specified in \begin_inset Flex Noun status collapsed \begin_layout Plain Layout -Tools\SpecialChar menuseparator Preferences\SpecialChar menuseparator -File Handling\SpecialChar menuseparator -File -\begin_inset space ~ -\end_inset - -Formats +Paths \end_layout \end_inset +. +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout +In the +\begin_inset Flex Code +status collapsed +\begin_layout Plain Layout +development/tools \end_layout \end_inset -, qpdfview, and SumatraPDF -\begin_inset Foot + folder of a source distribution you can find a +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -SumatraPDF can also use DDE commands through the external program CMCDDE - — downloadable from -\begin_inset CommandInset href -LatexCommand href -target "http://www.istri.fr/spip/zip/CMCDDE.zip" -literal "false" +lyxeditor +\end_layout \end_inset - + script which is able to locate the +\emph on +lyxpipe +\emph default + based on your preferences. \end_layout \end_inset -. - Others, such as evince -\begin_inset Foot + +\end_layout + +\begin_layout Subsubsection* +MacDviX (Mac OSX) +\end_layout + +\begin_layout Standard +At the end of +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Forward search with evince can be achieved by means of third party helper - scripts. - Please refer to -\begin_inset CommandInset href -LatexCommand href -target "https://wiki.lyx.org/LyX/SyncTeX" -literal "false" +/Applications/MacDviX_Folder/calleditor.script +\end_layout \end_inset - for details. +, add the following lines: \end_layout +\begin_layout LyX-Code +/Applications/LyX.app/Contents/MacOS/lyxeditor "$2" $1 +\begin_inset Newline newline \end_inset -, require some extra tools in order to use forward search. - While many of the widespread PDF viewers (most notably Adobe Reader) do - not support forward search at all, some other viewers – e. -\begin_inset space \thinspace{} -\end_inset +exit 1 +\end_layout -g. - xpdf – allow at least to reload the document and jump to a specific page - of the file, so you can at least navigate -\begin_inset Quotes eld -\end_inset +\begin_layout Standard +Modify the lines accordingly if you install \SpecialChar LyX + somewhere else than in the + Applications folder. +\end_layout -near -\begin_inset Quotes erd -\end_inset +\begin_layout Standard +Reverse search is triggered by Alt-click (OPTION-click). +\end_layout -. - This latter functionality is provided by an external call of synctex (see - the predefined example configurations). - +\begin_layout Subsubsection* +Skim (Mac OSX) \end_layout \begin_layout Standard -Forward search works both with DVI and PDF output. - \SpecialChar LyX - simply checks which preview format you have used before (i. -\begin_inset space \thinspace{} -\end_inset +Enter +\begin_inset Flex Code +status collapsed -e., which format is already there in the temporary directory) and chooses - the appropriate configuration for the respective format. +\begin_layout Plain Layout +open -a Skim.app $$i \end_layout -\begin_layout Chapter +\end_inset -\change_deleted 564990737 1671097409 -Special Document Classes -\change_unchanged + to the viewer setting in +\begin_inset Flex Noun +status collapsed +\begin_layout Plain Layout +Preferences\SpecialChar menuseparator +File Handling\SpecialChar menuseparator +File formats\SpecialChar menuseparator +PDF (pdflatex) \end_layout -\begin_layout Section - -\change_deleted 564990737 1669742044 -A&A Paper -\end_layout +\end_inset -\begin_layout Standard +, and then in +\begin_inset Flex Noun +status collapsed -\change_deleted 564990737 1669742044 -by -\noun on -Peter Sütterlin +\begin_layout Plain Layout +Skim\SpecialChar menuseparator +Preferences\SpecialChar menuseparator +Sync \end_layout -\begin_layout Subsection +\end_inset -\change_deleted 564990737 1669742044 -Introduction + choose +\begin_inset Flex Noun +status collapsed + +\begin_layout Plain Layout +custom \end_layout -\begin_layout Standard +\end_inset -\change_deleted 564990737 1669742044 -This section describes how \SpecialChar LyX - can be used to write articles for submission - to the scientific journal -\emph on -Astronomy and Astrophysics -\emph default - ( -\begin_inset Flex URL + preset and enter command +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout - -https://www.aanda.org/ +/Applications/\SpecialChar LyX +.app/Contents/MacOS/lyxeditor \end_layout \end_inset -) using Version 5.01 of the document class -\family typewriter -aa.cls -\family default . - This package can be downloaded from the ftp site \end_layout \begin_layout Standard +Reverse search is triggered by COMMAND-SHIFT-click +\end_layout + +\begin_layout Subsubsection* +Evince (GNOME) +\end_layout + +\begin_layout Standard +Reverse search with evince does not work out of the box, but it can be achieved + by means of some third party helper scripts. + Please refer to +\begin_inset CommandInset href +LatexCommand href +target "https://wiki.lyx.org/LyX/SyncTeX" +literal "false" -\change_deleted 564990737 1669742044 -\begin_inset VSpace medskip \end_inset + for details. +\end_layout + +\begin_layout Subsubsection* +Okular (KDE) +\end_layout + +\begin_layout Standard +Go to +\begin_inset Flex Noun +status collapsed +\begin_layout Plain Layout +Settings\SpecialChar menuseparator +Configure Okular\SpecialChar menuseparator +Editor \end_layout -\begin_layout Standard -\align center +\end_inset -\change_deleted 564990737 1669742044 -\begin_inset Flex URL + and select LyX +\begin_inset Quotes erd +\end_inset + + as editor. + This inserts the appropriate command ( +\begin_inset Flex Code status collapsed \begin_layout Plain Layout - -ftp://ftp.edpsciences.org/pub/aa/readme.html +lyxclient -g %f %l \end_layout \end_inset - +). \end_layout \begin_layout Standard +Reverse search is triggered by SHIFT-click. -\change_deleted 564990737 1669742044 -\begin_inset VSpace medskip +\change_inserted -712698321 1578211026 + Note that this only works if Okular is in +\begin_inset Quotes eld \end_inset +Browse +\begin_inset Quotes erd +\end_inset -\end_layout + mode (i. +\begin_inset space \thinspace{} +\end_inset -\begin_layout Standard +e., the hand symbol is clicked). +\change_unchanged -\change_deleted 564990737 1669742044 -A manual comes together with that package, and this text is not meant to - replace the original manual but is merely a short guide in how to realize - the correct form of your paper. - \end_layout -\begin_layout Standard - -\change_deleted 564990737 1669742044 -Please note that the publisher of the journal was changed from Springer - to EDP Sciences starting January 1, 2001. - That change involved also some slight changes to the style files, namely - the removal of the thesaurus command. - The \SpecialChar LyX - class aa supports the newest version of these style files, V 5.01. - If you have an older version installed, please upgrade. - For compatibility, the old (version 4) layout has been kept as -\family sans -article (A&A V4) -\family default -. - Please refer to the comments in -\family typewriter -\SpecialChar LyX -Dir/layouts/aapaper.layout -\family default -. +\begin_layout Subsubsection* +Qpdfview (Unix) \end_layout -\begin_layout Subsection +\begin_layout Standard +Qpdfview supports Sync\SpecialChar TeX + since version 0.3.5. + Go to +\begin_inset Flex Noun +status collapsed -\change_deleted 564990737 1669742044 -Getting started +\begin_layout Plain Layout +Edit\SpecialChar menuseparator +Settings\SpecialChar menuseparator +Behavior \end_layout -\begin_layout Standard +\end_inset -\change_deleted 564990737 1669742044 -It is recommended you start from the example template distributed with \SpecialChar LyX -. - If you are not using a template, note the following settings: -\end_layout +, click on the input field of the +\begin_inset Quotes eld +\end_inset -\begin_layout Itemize +Source editor +\begin_inset Quotes erd +\end_inset -\change_deleted 564990737 1669742044 -Select -\family sans -article (A&A) -\family default - in the -\family sans -Document\SpecialChar menuseparator -Settings -\family default - dialog (OK, that one was obvious). -\end_layout + item and add the command +\begin_inset Flex Code +status collapsed -\begin_layout Itemize +\begin_layout Plain Layout +lyxclient -g %1 %2 +\end_layout -\change_deleted 564990737 1669742044 -Don't change the option -\family sans -Page -\begin_inset space ~ \end_inset -style -\family default -: Leave it set to -\family sans -default -\family default . - The whole layout is done by the macros, you shouldn't change anything. \end_layout -\begin_layout Subsection +\begin_layout Standard +Reverse search is triggered by double-click or, in more recent versions, + by context menu. +\end_layout -\change_deleted 564990737 1669742044 -The header block +\begin_layout Subsubsection* +YAP (Windows) \end_layout \begin_layout Standard +Launch yap, choose its +\begin_inset Flex Noun +status collapsed -\change_deleted 564990737 1669742044 -First thing to enter is the header information. - It consists of seven entries, of which some are optional. - They are +\begin_layout Plain Layout +View\SpecialChar menuseparator +Options \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 + menu and select the +\begin_inset Quotes eld +\end_inset -\family sans -Title -\family default -: [required] -\end_layout +Inverse DVI Search +\begin_inset Quotes erd +\end_inset -\begin_layout Itemize + tab. + Click on the +\begin_inset Quotes eld +\end_inset -\change_deleted 564990737 1669742044 +New\SpecialChar ldots -\family sans -Subtitle -\family default -: [optional] -\end_layout +\begin_inset Quotes erd +\end_inset -\begin_layout Itemize + button and, in the window that opens, enter +\begin_inset Quotes eld +\end_inset -\change_deleted 564990737 1669742044 +\SpecialChar LyX + Editor +\begin_inset Quotes erd +\end_inset -\family sans -Author -\family default -: [required] -\end_layout + (or any other name you like) in the +\begin_inset Quotes eld +\end_inset -\begin_layout Itemize +Name: +\begin_inset Quotes erd +\end_inset -\change_deleted 564990737 1669742044 + field. + Now click on the button labeled +\begin_inset Quotes eld +\end_inset -\family sans -Address -\family default -: [required] -\end_layout +\SpecialChar ldots -\begin_layout Itemize +\begin_inset Quotes erd +\end_inset -\change_deleted 564990737 1669742044 + to open a file dialog and navigate to the directory containing the batch + file +\begin_inset Flex Code +status collapsed -\family sans -Offprints -\family default -: [optional] if more than one author: whom to contact for offprint requests. +\begin_layout Plain Layout +lyxeditor.bat \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 + (see below). + Select +\begin_inset Flex Code +status collapsed -\family sans -Mail -\family default -: [optional] mail address for contacts. +\begin_layout Plain Layout +lyxeditor.bat \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 + and then specify the program arguments as +\begin_inset Flex Code +status collapsed -\family sans -Date -\family default -: [required]. - Suggested format is -\family typewriter -Received: ; Accepted +\begin_layout Plain Layout +%f %l \end_layout -\begin_layout Standard - -\change_deleted 564990737 1669742044 -There is no need to issue the -\family typewriter +\end_inset -\backslash -maketitle -\family default - command, this is done automatically by \SpecialChar LyX - when the header is finished. - Although the order of the single header entries doesn't matter it is advised - to keep the above sequence, just to get the best optics and meets the layout - of the real document. -\end_layout +. + The +\begin_inset Flex Code +status collapsed -\begin_layout Standard +\begin_layout Plain Layout +lyxeditor.bat +\end_layout -\change_deleted 564990737 1669742044 -If you want to place footnotes in the header block, e. -\begin_inset space \thinspace{} \end_inset -g. -\begin_inset space \space{} + wrapper is used for communicating with \SpecialChar LyX + through the +\emph on +lyxpipe +\emph default + and is as follows: +\end_layout + +\begin_layout LyX-Code +@echo off +\begin_inset Newline newline \end_inset -to state your present address, just use the standard footnote via the menu - -\family sans -Insert\SpecialChar menuseparator -Footnote. +echo LYXCMD:revdvi:server-goto-file-row:%~1 %2> +\backslash -\family default - \SpecialChar LyX - will automagically use the term -\family typewriter +\backslash +. +\backslash +pipe +\backslash +lyxpipe.in +\begin_inset Newline newline +\end_inset +type \backslash -thanks{} -\family default - in that case. + +\backslash +. +\backslash +pipe +\backslash +lyxpipe.out \end_layout \begin_layout Standard +Make sure that the \SpecialChar LyX +Server pipe path you specified in \SpecialChar LyX + is +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1669742044 -Under -\family sans -Edit\SpecialChar menuseparator -Text Style -\family default -, you'll find two insets which are relevant for the titling: +\begin_layout Plain Layout + +\backslash + +\backslash +. +\backslash +pipe +\backslash +lyxpipe \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 +, otherwise change the +\begin_inset Flex Code +status collapsed -\family sans -Institute -\family typewriter - -\family default -to mark corresponding author\SpecialChar breakableslash -institute pairs. - The institutes are numbered sequentially as they appear in the -\family sans -Address -\family default - field, so you have to put a marker to each author. +\begin_layout Plain Layout +lyxeditor.bat \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669742044 +\end_inset -\family sans -Email -\family default - to supply an email address for fast contact. + wrapper accordingly. \end_layout \begin_layout Standard +In yap, reverse search is triggered by double-click. +\end_layout -\change_deleted 564990737 1669742044 -In addition to these topics, the macros use one additional \SpecialChar LaTeX - command that - has no counterpart in \SpecialChar LyX -: +\begin_layout Subsubsection* +SumatraPDF (Windows) \end_layout -\begin_layout Itemize +\begin_layout Standard +In order to use SumatraPDF for inverse search, enter +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1669742044 +\begin_layout Plain Layout +SumatraPDF -inverse-search "lyxeditor.bat "%f" %l" +\end_layout -\family typewriter +\end_inset -\backslash -and -\family default - to separate different names for more than one author and institute, respectivel -y. + in the viewer setting in +\begin_inset Flex Noun +status collapsed + +\begin_layout Plain Layout +Preferences\SpecialChar menuseparator +File Handling\SpecialChar menuseparator +File formats\SpecialChar menuseparator +PDF (pdflatex) \end_layout -\begin_layout Standard +\end_inset -\change_deleted 564990737 1669742044 -The appropriate command has to be entered in \SpecialChar LyX - and marked as \SpecialChar LaTeX - code. - See the examples. - +, where +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +lyxeditor.bat \end_layout -\begin_layout Subsection +\end_inset -\change_deleted 564990737 1669742044 -The abstract + is the previous wrapper. + If SumatraPDF.exe is not in your command PATH, use its full file name. \end_layout \begin_layout Standard - -\change_deleted 564990737 1669742044 -The abstract should immediately follow the header block. - With version 5 the abstract environment was changed to a command, and there - is now a restriction to only one paragraph. - In addition, it should contain an entry with the keywords. - This is done via the paragraph style -\family sans -Keywords -\family default -. - Refer to the example paper. +Reverse search is triggered by double-click. \end_layout -\begin_layout Subsection - -\change_deleted 564990737 1669742044 -Supported environments +\begin_layout Subsubsection* +YAP (Cygwin) \end_layout \begin_layout Standard +First of all, make sure that yap is your default DVI viewer in the Windows + environment, then launch it, choose its +\begin_inset Flex Noun +status collapsed -\change_deleted 564990737 1669742044 -The A&A paper layout supports the following environments for structuring - your text: +\begin_layout Plain Layout +View\SpecialChar menuseparator +Options \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 + menu and select the +\begin_inset Quotes eld +\end_inset -\family sans -Standard -\end_layout +Inverse DVI Search +\begin_inset Quotes erd +\end_inset -\begin_layout Itemize + tab. + Click on the +\begin_inset Quotes eld +\end_inset -\change_deleted 564990737 1669742044 +New\SpecialChar ldots -\family sans -Section -\end_layout +\begin_inset Quotes erd +\end_inset -\begin_layout Itemize + button and, in the window that opens, enter +\begin_inset Quotes eld +\end_inset -\change_deleted 564990737 1669742044 +\SpecialChar LyX + Editor +\begin_inset Quotes erd +\end_inset -\family sans -Subsection -\end_layout + (or any other name you like) in the +\begin_inset Quotes eld +\end_inset -\begin_layout Itemize +Name: +\begin_inset Quotes erd +\end_inset -\change_deleted 564990737 1669742044 + field. + Now click on the button labeled +\begin_inset Quotes eld +\end_inset -\family sans -Subsubsection +\SpecialChar ldots + +\begin_inset Quotes erd +\end_inset + + to open a file dialog and navigate to the directory containing the +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +lyxeditor.exe \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 + program (which is installed by default on Cygwin along with the \SpecialChar LyX + executable). + Select +\begin_inset Flex Code +status collapsed -\family sans -Itemize +\begin_layout Plain Layout +lyxeditor.exe \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 + and then specify the program arguments as +\begin_inset Flex Code +status collapsed -\family sans -Enumerate +\begin_layout Plain Layout +-g %f %l \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 +. + In this way, you will be using the +\emph on +lyxsocket +\emph default + for communicating with \SpecialChar LyX +. + If, for whatever reason, you want to use the +\emph on +lyxpipe +\emph default +, omit the +\begin_inset Flex Code +status collapsed -\family sans -Description +\begin_layout Plain Layout +-g \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 + option and be sure to specify the \SpecialChar LyX +Server pipe path in the \SpecialChar LyX + preferences. +\end_layout -\family sans -Caption +\begin_layout Standard +In yap, reverse search is triggered by double-click. \end_layout -\begin_layout Itemize +\begin_layout Subsubsection* +SumatraPDF (Cygwin) +\end_layout -\change_deleted 564990737 1669742044 +\begin_layout Standard +In order to use SumatraPDF for inverse search, enter +\begin_inset Flex Code +status collapsed -\family sans -Abstract +\begin_layout Plain Layout +SumatraPDF -inverse-search "lyxeditor -g %f %l" \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 + in the viewer setting in +\begin_inset Flex Noun +status collapsed -\family sans -Acknowledgment +\begin_layout Plain Layout +Preferences\SpecialChar menuseparator +File Handling\SpecialChar menuseparator +File formats\SpecialChar menuseparator +PDF (pdflatex) \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 +. + If SumatraPDF.exe is not in your command PATH, use its full posix path. + The +\begin_inset Flex Code +status collapsed -\family sans -Bibliography +\begin_layout Plain Layout +-g \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669742044 +\end_inset -\family sans -\SpecialChar LaTeX + enables communication via the +\emph on +lyxsocket +\emph default +. + Again, omit the +\begin_inset Flex Code +status collapsed +\begin_layout Plain Layout +-g \end_layout -\begin_layout Subsection - -\change_deleted 564990737 1669742044 -Commands not supported by \SpecialChar LyX +\end_inset + option if you want to use the +\emph on +lyxpipe +\emph default +, and be sure to specify the \SpecialChar LyX +Server pipe path in the \SpecialChar LyX + preferences. \end_layout \begin_layout Standard +Reverse search is triggered by double-click. +\end_layout -\change_deleted 564990737 1669742044 -Some commands are not yet supported by the -\family sans -paper (A&A) -\family default - layout for \SpecialChar LyX -. - Some have already been mentioned. - For the sake of completeness, they are listed all together here: +\begin_layout Section +Forward search \end_layout -\begin_layout Itemize +\begin_layout Standard +Forward search is, as the name implies, in a sense the +\begin_inset Quotes eld +\end_inset -\change_deleted 564990737 1669742044 +opposite +\begin_inset Quotes erd +\end_inset -\family typewriter + of reverse search. + It allows you to let the viewer jump to a given position from within \SpecialChar LyX +. + If forward search is set up (as described in what follows), you can put + the cursor anywhere in your \SpecialChar LyX + document, and hit +\begin_inset Flex Noun +status collapsed -\backslash -and +\begin_layout Plain Layout +Navigate\SpecialChar menuseparator +Forward search \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669742044 +\end_inset -\family typewriter + (or select +\begin_inset Flex Noun +status collapsed -\backslash -authorrunning +\begin_layout Plain Layout +Forward search \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 + in the context menu via right mouse click), and then the viewer will jump + to that position as well. + This implies, of course, that your viewer supports this function. +\end_layout -\family typewriter +\begin_layout Standard +To make forward search possible, you first need to provide the generated + output PDF/DVI file with additional information about the \SpecialChar TeX + sources. + This can be done via the methods described in the section +\begin_inset CommandInset ref +LatexCommand ref +reference "subsec:rev-search" -\backslash -object{} +\end_inset + +. \end_layout -\begin_layout Itemize +\begin_layout Standard +Additionally, you need to configure \SpecialChar LyX + for using your viewers in +\begin_inset Flex Noun +status collapsed -\change_deleted 564990737 1669742044 +\begin_layout Plain Layout +Tools\SpecialChar menuseparator +Preferences\SpecialChar menuseparator +Output\SpecialChar menuseparator +General +\end_layout -\family typewriter +\end_inset -\backslash -titlerunning{} +. + We provide a range of tested configurations for some viewers, which you + can select from the drop down list. + If none of these configurations suits you, you have to find out and enter + a suitable configuration yourself. + The definition syntax uses the following placeholders: \end_layout -\begin_layout Standard +\begin_layout Itemize +\noindent +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1669742044 -If you want to use any of these commands, you have to enter them yourself. - -\series bold -Do not forget to mark them as \SpecialChar LaTeX - code! +\begin_layout Plain Layout +$$n \end_layout -\begin_layout Subsection +\end_inset -\change_deleted 564990737 1669742044 -Figure and Table Floats +: row number \end_layout -\begin_layout Standard +\begin_layout Itemize +\noindent +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1669742044 -\SpecialChar LyX - provides support for the necessary float environments -\family sans -figure, figure*, table -\family default - and -\family sans -table* -\family default -, therefore we won't tell much about it here. - Refer to the -\emph on -User's -\begin_inset space ~ -\end_inset +\begin_layout Plain Layout +$$t +\end_layout -Guide -\emph default -. - Just remember that tables should be left-aligned. - For that, select the table and change the alignment in -\family sans -Edit\SpecialChar menuseparator -Paragraph -\begin_inset space ~ \end_inset -Settings. +: name of the (temporary) exported .tex file (without path) \end_layout -\begin_layout Standard +\begin_layout Itemize +\noindent +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1669742044 -There is only one special thing: the figures with caption besides the figure. - To create such a figure, you have to do the following: +\begin_layout Plain Layout +$$f \end_layout -\begin_layout Enumerate - -\change_deleted 564990737 1669742044 -Create a wide figure float: -\family sans -Insert\SpecialChar menuseparator -Float\SpecialChar menuseparator -Figure -\family default -, then right click in the figure and select -\family sans -Span -\begin_inset space ~ \end_inset -columns -\family default -. +: name of the (temporary) exported .tex file (including path) \end_layout -\begin_layout Enumerate +\begin_layout Itemize +\noindent +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1669742044 -Enter your caption text. +\begin_layout Plain Layout +$$o \end_layout -\begin_layout Enumerate +\end_inset -\change_deleted 564990737 1669742044 -Press -\family sans -Return -\family default - to move the cursor above the caption. +: name of the exported output file (either dvi or pdf, depending on which + one exists in the temporary directory) \end_layout -\begin_layout Enumerate +\begin_layout Standard +Note that only some of the viewers provide full and usable forward search + functionality out of the box, among them yap, xdvi, okular +\begin_inset Foot +status collapsed -\change_deleted 564990737 1669742044 -Insert your figure +\begin_layout Plain Layout +You might want to set +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +okular --unique \end_layout -\begin_layout Enumerate +\end_inset -\change_deleted 564990737 1669742044 -Position the cursor behind the figure and insert a horizontal fill: -\family sans -Insert\SpecialChar menuseparator -Special + in +\begin_inset Flex Noun +status collapsed + +\begin_layout Plain Layout +Tools\SpecialChar menuseparator +Preferences\SpecialChar menuseparator +File Handling\SpecialChar menuseparator +File \begin_inset space ~ \end_inset -Character\SpecialChar menuseparator -Horizontal -\begin_inset space ~ +Formats +\end_layout + \end_inset -Fill -\family default -. + \end_layout -\begin_layout Enumerate +\end_inset + +, qpdfview, and SumatraPDF +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout +SumatraPDF can also use DDE commands through the external program CMCDDE + — downloadable from +\begin_inset CommandInset href +LatexCommand href +target "http://www.istri.fr/spip/zip/CMCDDE.zip" +literal "false" -\change_deleted 564990737 1669742044 -Switch to \SpecialChar LaTeX - mode: -\family sans -M-c -\begin_inset space ~ \end_inset -t -\family default -. -\end_layout -\begin_layout Enumerate +\end_layout -\change_deleted 564990737 1669742044 -Enter -\family typewriter +\end_inset -\backslash -parbox[b]{55mm}{ -\family default . - -\series bold -Do not close the brace! + Others, such as evince +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout +Forward search with evince can be achieved by means of third party helper + scripts. + Please refer to +\begin_inset CommandInset href +LatexCommand href +target "https://wiki.lyx.org/LyX/SyncTeX" +literal "false" + +\end_inset + + for details. \end_layout -\begin_layout Enumerate +\end_inset -\change_deleted 564990737 1669742044 -Position the cursor behind the caption text, switch to \SpecialChar LaTeX - mode and insert - the closing brace: -\family sans -M-c -\begin_inset space ~ +, require some extra tools in order to use forward search. + While many of the widespread PDF viewers (most notably Adobe Reader) do + not support forward search at all, some other viewers – e. +\begin_inset space \thinspace{} +\end_inset + +g. + xpdf – allow at least to reload the document and jump to a specific page + of the file, so you can at least navigate +\begin_inset Quotes eld +\end_inset + +near +\begin_inset Quotes erd \end_inset -t -\family default - -\family typewriter -} -\family default . + This latter functionality is provided by an external call of synctex (see + the predefined example configurations). + \end_layout \begin_layout Standard +Forward search works both with DVI and PDF output. + \SpecialChar LyX + simply checks which preview format you have used before (i. +\begin_inset space \thinspace{} +\end_inset -\change_deleted 564990737 1669742044 -Also, refer to the figures in the example paper. +e., which format is already there in the temporary directory) and chooses + the appropriate configuration for the respective format. \end_layout -\begin_layout Subsection +\begin_layout Chapter + +\change_deleted 564990737 1671097409 +Special Document Classes +\change_unchanged + +\end_layout + +\begin_layout Section \change_deleted 564990737 1669742044 -Referee layout +A&A Paper \end_layout \begin_layout Standard \change_deleted 564990737 1669742044 -For submission, the paper has to be formated in a special double-spacing - layout. - For this purpose, you have to give the option -\family typewriter -referee -\family default - to the document class. - This must be done using the custom class options field in the -\family sans -Document\SpecialChar menuseparator -Settings -\family default - dialog. - Just enter the string -\family typewriter -referee -\family default - there. +by +\noun on +Peter Sütterlin \end_layout \begin_layout Subsection \change_deleted 564990737 1669742044 -The example paper +Introduction \end_layout \begin_layout Standard \change_deleted 564990737 1669742044 -The -\family sans -Examples -\family default - directory contains an example paper written with \SpecialChar LyX -. - It is the example paper from the original macro package, translated to - \SpecialChar LyX -. - Use it for inspiration, and compare the original \SpecialChar LaTeX - code with \SpecialChar LyX - way of writing. -\end_layout +This section describes how \SpecialChar LyX + can be used to write articles for submission + to the scientific journal +\emph on +Astronomy and Astrophysics +\emph default + ( +\begin_inset Flex URL +status collapsed -\begin_layout Section +\begin_layout Plain Layout -\change_deleted 564990737 1671097429 -Dinbrief +https://www.aanda.org/ \end_layout -\begin_layout Standard +\end_inset -\change_deleted 564990737 1671097429 -The document class -\family sans -dinbrief -\family default - can be used to type letters according to German conventions. - A template file is included in +) using Version 5.01 of the document class \family typewriter -.../lyx/share/templates +aa.cls \family default - for you to use as a starting point. +. + This package can be downloaded from the ftp site \end_layout -\begin_layout Section +\begin_layout Standard + +\change_deleted 564990737 1669742044 +\begin_inset VSpace medskip +\end_inset + -\change_deleted 564990737 1671097429 -Elsevier Journals \end_layout \begin_layout Standard +\align center -\change_deleted 564990737 1671097429 -See the \SpecialChar LyX - template file -\family typewriter -elsarticle.lyx -\family default -. - It contains all infos you need. +\change_deleted 564990737 1669742044 +\begin_inset Flex URL +status collapsed + +\begin_layout Plain Layout + +ftp://ftp.edpsciences.org/pub/aa/readme.html \end_layout -\begin_layout Section +\end_inset + -\change_deleted 564990737 1669755802 -ijmpc and ijmpd \end_layout \begin_layout Standard -\change_deleted 564990737 1669755802 -by -\noun on -Panayotis Papasotiriou +\change_deleted 564990737 1669742044 +\begin_inset VSpace medskip +\end_inset + + \end_layout -\begin_layout Subsection +\begin_layout Standard -\change_deleted 564990737 1669755802 -Overview +\change_deleted 564990737 1669742044 +A manual comes together with that package, and this text is not meant to + replace the original manual but is merely a short guide in how to realize + the correct form of your paper. + \end_layout \begin_layout Standard -\change_deleted 564990737 1669755802 -The ijmpc package is a set of macros that facilitates electronic manuscript - submission to the -\emph on -International Journal of Modern Physics C -\emph default -. - Similarly, the ijmpd package is for creating manuscripts to be submitted - to the -\emph on -International Journal of Modern Physics D -\emph default -. - Both journals are published by World Scientific. - The corresponding document classes are named -\family typewriter -ws-ijmpc.cls +\change_deleted 564990737 1669742044 +Please note that the publisher of the journal was changed from Springer + to EDP Sciences starting January 1, 2001. + That change involved also some slight changes to the style files, namely + the removal of the thesaurus command. + The \SpecialChar LyX + class aa supports the newest version of these style files, V 5.01. + If you have an older version installed, please upgrade. + For compatibility, the old (version 4) layout has been kept as +\family sans +article (A&A V4) \family default - and +. + Please refer to the comments in \family typewriter -ws-ijmpd.cls +\SpecialChar LyX +Dir/layouts/aapaper.layout \family default -, respectively. - These files, together with instructions for the authors, can be downloaded - from the sites -\begin_inset Flex URL -status collapsed +. +\end_layout -\begin_layout Plain Layout +\begin_layout Subsection -http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml +\change_deleted 564990737 1669742044 +Getting started \end_layout -\end_inset +\begin_layout Standard - and -\begin_inset Flex URL -status collapsed +\change_deleted 564990737 1669742044 +It is recommended you start from the example template distributed with \SpecialChar LyX +. + If you are not using a template, note the following settings: +\end_layout -\begin_layout Plain Layout +\begin_layout Itemize -http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml +\change_deleted 564990737 1669742044 +Select +\family sans +article (A&A) +\family default + in the +\family sans +Document\SpecialChar menuseparator +Settings +\family default + dialog (OK, that one was obvious). \end_layout -\end_inset - -. - Both packages are modified versions of the standard -\begin_inset Quotes eld -\end_inset +\begin_layout Itemize -article -\begin_inset Quotes erd +\change_deleted 564990737 1669742044 +Don't change the option +\family sans +Page +\begin_inset space ~ \end_inset - package, and they are almost (but not exactly) identical. - Most of their features are supported by \SpecialChar LyX +style +\family default +: Leave it set to +\family sans +default +\family default . - I have used \SpecialChar LyX - successfully to write articles submitted to both journals - without any problem. + The whole layout is done by the macros, you shouldn't change anything. \end_layout \begin_layout Subsection -\change_deleted 564990737 1669755802 -Writing a paper +\change_deleted 564990737 1669742044 +The header block \end_layout \begin_layout Standard -\change_deleted 564990737 1669755802 -As usual, the easiest way to write a paper is to start with a template. - Click on +\change_deleted 564990737 1669742044 +First thing to enter is the header information. + It consists of seven entries, of which some are optional. + They are +\end_layout + +\begin_layout Itemize + +\change_deleted 564990737 1669742044 + \family sans -File\SpecialChar menuseparator -New from +Title \family default - +: [required] +\end_layout + +\begin_layout Itemize + +\change_deleted 564990737 1669742044 + \family sans -Template -\family default -, then choose the -\family typewriter -ijmpc.lyx -\family default - or -\family typewriter -ijmpd.lyx -\family default - template. - This will give an (almost) empty document that includes the most common - fields found in a manuscript. - Simply overwrite the existing text (including the brackets, -\family typewriter -<> +Subtitle \family default -) with your text. - You should keep in mind the following remarks. +: [optional] \end_layout -\begin_layout Enumerate +\begin_layout Itemize -\change_deleted 564990737 1669755802 -\SpecialChar LyX - won't let you change the font size and the page style of the document, - because such modifications are not allowed by both packages. +\change_deleted 564990737 1669742044 + +\family sans +Author +\family default +: [required] \end_layout -\begin_layout Enumerate +\begin_layout Itemize -\change_deleted 564990737 1669755802 -The language of the document should not be changed. - Before previewing your paper, be sure that the babel package is not used. - To do this, click on -\begin_inset Info -type "menu" -arg "dialog-show document" -\end_inset +\change_deleted 564990737 1669742044 - \family sans -\SpecialChar menuseparator -Language +Address \family default -, and select -\begin_inset Quotes eld -\end_inset +: [required] +\end_layout -None -\begin_inset Quotes erd -\end_inset +\begin_layout Itemize + +\change_deleted 564990737 1669742044 - as \family sans -Language Package +Offprints \family default -. +: [optional] if more than one author: whom to contact for offprint requests. \end_layout -\begin_layout Enumerate - -\change_deleted 564990737 1669755802 -The -\begin_inset Quotes eld -\end_inset +\begin_layout Itemize -Keywords -\begin_inset Quotes erd -\end_inset +\change_deleted 564990737 1669742044 - style must be used to define keywords. +\family sans +Mail +\family default +: [optional] mail address for contacts. \end_layout -\begin_layout Enumerate - -\change_deleted 564990737 1669755802 -The ijmpc package provides a style named -\begin_inset Quotes eld -\end_inset +\begin_layout Itemize -Classification Codes -\begin_inset Quotes erd -\end_inset +\change_deleted 564990737 1669742044 -, which can be used to define classification codes, such as PACS numbers. - Note that this facility is not supported by the ijmpd package. +\family sans +Date +\family default +: [required]. + Suggested format is +\family typewriter +Received: ; Accepted \end_layout -\begin_layout Enumerate - -\change_deleted 564990737 1669755802 -Several new environments are available: -\begin_inset Quotes eld -\end_inset +\begin_layout Standard -Definition -\begin_inset Quotes erd -\end_inset +\change_deleted 564990737 1669742044 +There is no need to issue the +\family typewriter -, -\begin_inset Quotes eld -\end_inset +\backslash +maketitle +\family default + command, this is done automatically by \SpecialChar LyX + when the header is finished. + Although the order of the single header entries doesn't matter it is advised + to keep the above sequence, just to get the best optics and meets the layout + of the real document. +\end_layout -Step -\begin_inset Quotes erd -\end_inset +\begin_layout Standard -, -\begin_inset Quotes eld +\change_deleted 564990737 1669742044 +If you want to place footnotes in the header block, e. +\begin_inset space \thinspace{} \end_inset -Example -\begin_inset Quotes erd +g. +\begin_inset space \space{} \end_inset -, -\begin_inset Quotes eld -\end_inset +to state your present address, just use the standard footnote via the menu + +\family sans +Insert\SpecialChar menuseparator +Footnote. -Remark -\begin_inset Quotes erd -\end_inset +\family default + \SpecialChar LyX + will automagically use the term +\family typewriter -, -\begin_inset Quotes eld -\end_inset +\backslash +thanks{} +\family default + in that case. +\end_layout -Notation -\begin_inset Quotes erd -\end_inset +\begin_layout Standard -, -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1669742044 +Under +\family sans +Edit\SpecialChar menuseparator +Text Style +\family default +, you'll find two insets which are relevant for the titling: +\end_layout -Theorem -\begin_inset Quotes erd -\end_inset +\begin_layout Itemize -, -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1669742044 -Proof -\begin_inset Quotes erd -\end_inset +\family sans +Institute +\family typewriter + +\family default +to mark corresponding author\SpecialChar breakableslash +institute pairs. + The institutes are numbered sequentially as they appear in the +\family sans +Address +\family default + field, so you have to put a marker to each author. +\end_layout -, -\begin_inset Quotes eld -\end_inset +\begin_layout Itemize -Corollary -\begin_inset Quotes erd -\end_inset +\change_deleted 564990737 1669742044 -, -\begin_inset Quotes eld -\end_inset +\family sans +Email +\family default + to supply an email address for fast contact. +\end_layout -Lemma -\begin_inset Quotes erd -\end_inset +\begin_layout Standard -, -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1669742044 +In addition to these topics, the macros use one additional \SpecialChar LaTeX + command that + has no counterpart in \SpecialChar LyX +: +\end_layout -Proposition -\begin_inset Quotes erd -\end_inset +\begin_layout Itemize -, -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1669742044 -Prop -\begin_inset Quotes erd -\end_inset +\family typewriter -, -\begin_inset Quotes eld -\end_inset +\backslash +and +\family default + to separate different names for more than one author and institute, respectivel +y. +\end_layout -Question -\begin_inset Quotes erd -\end_inset +\begin_layout Standard -, -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1669742044 +The appropriate command has to be entered in \SpecialChar LyX + and marked as \SpecialChar LaTeX + code. + See the examples. + +\end_layout -Claim -\begin_inset Quotes erd -\end_inset +\begin_layout Subsection -, and -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1669742044 +The abstract +\end_layout -Conjecture -\begin_inset Quotes erd -\end_inset +\begin_layout Standard +\change_deleted 564990737 1669742044 +The abstract should immediately follow the header block. + With version 5 the abstract environment was changed to a command, and there + is now a restriction to only one paragraph. + In addition, it should contain an entry with the keywords. + This is done via the paragraph style +\family sans +Keywords +\family default . - Their use is more or less obvious. - \SpecialChar LyX - supports all these environments; it will use the proper label, text style, - and numbering scheme for each of them. + Refer to the example paper. \end_layout -\begin_layout Enumerate +\begin_layout Subsection -\change_deleted 564990737 1669755802 -Both packages use basic citations; the natbib package should not be used. - In \SpecialChar LyX -, citation references are shown as usual; in the output, citations are - shown as superscripts. - If you want to use a citation as normal text, you should use the -\family typewriter -refcite -\family default - command, e. -\begin_inset space \thinspace{} -\end_inset +\change_deleted 564990737 1669742044 +Supported environments +\end_layout -g. -\begin_inset space \space{} -\end_inset +\begin_layout Standard +\change_deleted 564990737 1669742044 +The A&A paper layout supports the following environments for structuring + your text: +\end_layout -\begin_inset Quotes eld -\end_inset +\begin_layout Itemize -See Ref. -\begin_inset space \space{} -\end_inset +\change_deleted 564990737 1669742044 +\family sans +Standard +\end_layout -\family typewriter +\begin_layout Itemize -\backslash -refcite{key} -\family default +\change_deleted 564990737 1669742044 + +\family sans +Section +\end_layout + +\begin_layout Itemize -\begin_inset Quotes erd -\end_inset +\change_deleted 564990737 1669742044 -. +\family sans +Subsection \end_layout -\begin_layout Enumerate +\begin_layout Itemize -\change_deleted 564990737 1669755802 -There is no -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1669742044 -Acknowledgments -\begin_inset Quotes erd -\end_inset +\family sans +Subsubsection +\end_layout - section in both packages. - To put acknowledgments, just use the -\begin_inset Quotes eld -\end_inset +\begin_layout Itemize -Section* -\begin_inset Quotes erd -\end_inset +\change_deleted 564990737 1669742044 - environment. +\family sans +Itemize \end_layout -\begin_layout Enumerate - -\change_deleted 564990737 1669755802 -Appendices may be added to the paper, -\emph on -after -\emph default - the Acknowledgments and -\shape italic -before -\shape default - the References. - \SpecialChar LyX - provides a special environment, called -\begin_inset Quotes eld -\end_inset +\begin_layout Itemize -Appendices Section -\begin_inset Quotes erd -\end_inset +\change_deleted 564990737 1669742044 - which marks the beginning of the appendices. - This environment should be left blank; it just sends a \SpecialChar LaTeX - command, but nothing - is really printed. - In \SpecialChar LyX -, the word -\begin_inset Quotes eld -\end_inset +\family sans +Enumerate +\end_layout -Appendix -\begin_inset Quotes erd -\end_inset +\begin_layout Itemize - is printed with blue letters, as a signal that all sections after that - point are appendices. - To write an appendix, use the -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1669742044 -Appendix -\begin_inset Quotes erd -\end_inset +\family sans +Description +\end_layout - environment. - \SpecialChar LyX - will number each appendix with capital letters, as required by both journals. - Note that -\begin_inset Quotes eld -\end_inset +\begin_layout Itemize -Appendices Section -\begin_inset Quotes erd -\end_inset +\change_deleted 564990737 1669742044 - -\emph on -must -\emph default - be present before the first appendix; if not, all appendices will be numbered - as normal sections in the output. +\family sans +Caption \end_layout -\begin_layout Enumerate +\begin_layout Itemize -\change_deleted 564990737 1669755802 -The ijmpc and the ijmpd packages use the -\family typewriter -tbl -\family default - command to implement table captions. - As a result, a table created by \SpecialChar LyX - is printed correctly, but its caption - is ignored. - However, you can use some \SpecialChar TeX - code to overcome this problem, so that captions - are printed as expected. - To do so, create a float table as usual, remove the caption, and replace - it with the \SpecialChar TeX - code -\family typewriter +\change_deleted 564990737 1669742044 -\backslash -tbl{ -\emph on -your table caption -\emph default -}{ -\family default - (sic); you must also the \SpecialChar TeX - code -\family typewriter -} -\family default - immediately after the tabular material. - Study the example table included in the template files to see how this - trick is implemented. - Alternatively, If you need table captions, you should implement the whole - table float in a -\family typewriter -.tex -\family default - file, then include this file to the \SpecialChar LyX - document ( \family sans -Insert\SpecialChar menuseparator -File\SpecialChar menuseparator -Child -\begin_inset space ~ -\end_inset +Abstract +\end_layout -Document -\family default -). - Details on how to create a table float can be found in the files -\family typewriter -ws-ijmpc.tex -\family default - and -\family typewriter -ws-ijmpd.tex -\family default -, included in the corresponding packages. +\begin_layout Itemize + +\change_deleted 564990737 1669742044 + +\family sans +Acknowledgment \end_layout -\begin_layout Subsection +\begin_layout Itemize -\change_deleted 564990737 1669755802 -Preparing a paper for submission +\change_deleted 564990737 1669742044 + +\family sans +Bibliography \end_layout -\begin_layout Standard +\begin_layout Itemize + +\change_deleted 564990737 1669742044 -\change_deleted 564990737 1669755802 -Before you submit your paper you must export the \SpecialChar LyX - document as a \SpecialChar LaTeX - file ( \family sans -File\SpecialChar menuseparator -Export\SpecialChar menuseparator \SpecialChar LaTeX -\family default -) -\begin_inset Foot -status open - -\begin_layout Plain Layout -Actually you have the choice between \SpecialChar LaTeX - (plain) and pdflatex. - If you intend to use pdflatex to prepare the paper, you should use the - pdflatex option so that included graphics are converted to PDF format, - ready for use by pdflatex. \end_layout -\end_inset +\begin_layout Subsection -, then make the following changes to the resulting -\family typewriter -.tex -\family default - file. -\end_layout +\change_deleted 564990737 1669742044 +Commands not supported by \SpecialChar LyX -\begin_layout Enumerate +\end_layout -\change_deleted 564990737 1669755802 -Remove the comment lines before the -\family typewriter +\begin_layout Standard -\backslash -documentclass +\change_deleted 564990737 1669742044 +Some commands are not yet supported by the +\family sans +paper (A&A) \family default - command. + layout for \SpecialChar LyX +. + Some have already been mentioned. + For the sake of completeness, they are listed all together here: \end_layout -\begin_layout Enumerate +\begin_layout Itemize -\change_deleted 564990737 1669755802 -Remove everything between (and including) the -\family typewriter +\change_deleted 564990737 1669742044 -\backslash -makeatletter -\family default - and \family typewriter \backslash -makeatother -\family default - commands, except for any commands you specifically put into the \SpecialChar LaTeX - preamble. +and \end_layout -\begin_layout Standard - -\change_deleted 564990737 1669755802 -The modified -\family typewriter -.tex -\family default - file should be saved and processed through \SpecialChar LaTeX - as many times as necessary. - You may also want to check the resulting -\family typewriter -.dvi -\family default - document. -\change_unchanged +\begin_layout Itemize -\end_layout +\change_deleted 564990737 1669742044 -\begin_layout Section +\family typewriter -\change_deleted 564990737 1669801478 -iopart +\backslash +authorrunning \end_layout -\begin_layout Standard +\begin_layout Itemize -\change_deleted 564990737 1669801478 -by -\noun on -Uwe Stöhr -\end_layout +\change_deleted 564990737 1669742044 -\begin_layout Subsection +\family typewriter -\change_deleted 564990737 1669801478 -Overview +\backslash +object{} \end_layout -\begin_layout Standard +\begin_layout Itemize -\change_deleted 564990737 1669801478 -The iopart package provides a document class to create electronic manuscript - submission to the journals published by the Institute of Physics. - Instructions for the authors how to create a paper using the iopart class - can be downloaded together with the iopart package from the site -\begin_inset Flex URL -status collapsed +\change_deleted 564990737 1669742044 -\begin_layout Plain Layout +\family typewriter -ftp://ftp.iop.org/pub/journals/latex2e +\backslash +titlerunning{} \end_layout -\end_inset +\begin_layout Standard -. +\change_deleted 564990737 1669742044 +If you want to use any of these commands, you have to enter them yourself. + +\series bold +Do not forget to mark them as \SpecialChar LaTeX + code! \end_layout \begin_layout Subsection -\change_deleted 564990737 1669801478 -Writing a paper +\change_deleted 564990737 1669742044 +Figure and Table Floats \end_layout \begin_layout Standard -\change_deleted 564990737 1669801478 -The easiest way to write a paper is to start with the template -\emph on -IOP-article.lyx -\emph default - that is available via +\change_deleted 564990737 1669742044 +\SpecialChar LyX + provides support for the necessary float environments \family sans -File\SpecialChar menuseparator -New From Template +figure, figure*, table \family default - The template explains how to use the special text environments. - Here are the most important advices: -\end_layout - -\begin_layout Itemize - -\change_deleted 564990737 1669801478 -To be able to compile your document to a PDF, PS, or DVI, ensure that the - no AMS packages are loaded in + and \family sans -Document\SpecialChar menuseparator -Settings\SpecialChar menuseparator -Math Options +table* \family default -! -\end_layout - -\begin_layout Itemize +, therefore we won't tell much about it here. + Refer to the +\emph on +User's +\begin_inset space ~ +\end_inset -\change_deleted 564990737 1669801478 +Guide +\emph default +. + Just remember that tables should be left-aligned. + For that, select the table and change the alignment in +\family sans +Edit\SpecialChar menuseparator +Paragraph +\begin_inset space ~ +\end_inset -\size normal -The title environment defines the kind of your paper. - So use one of the following environments for the title: +Settings. \end_layout -\begin_deeper -\begin_layout Itemize +\begin_layout Standard -\change_deleted 564990737 1669801478 +\change_deleted 564990737 1669742044 +There is only one special thing: the figures with caption besides the figure. + To create such a figure, you have to do the following: +\end_layout + +\begin_layout Enumerate +\change_deleted 564990737 1669742044 +Create a wide figure float: \family sans -\size normal -Title +Insert\SpecialChar menuseparator +Float\SpecialChar menuseparator +Figure \family default - for a Paper +, then right click in the figure and select +\family sans +Span +\begin_inset space ~ +\end_inset + +columns +\family default +. \end_layout -\begin_layout Itemize +\begin_layout Enumerate -\change_deleted 564990737 1669801478 +\change_deleted 564990737 1669742044 +Enter your caption text. +\end_layout + +\begin_layout Enumerate +\change_deleted 564990737 1669742044 +Press \family sans -\size normal -Review +Return \family default - for a Review + to move the cursor above the caption. \end_layout -\begin_layout Itemize +\begin_layout Enumerate -\change_deleted 564990737 1669801478 +\change_deleted 564990737 1669742044 +Insert your figure +\end_layout + +\begin_layout Enumerate +\change_deleted 564990737 1669742044 +Position the cursor behind the figure and insert a horizontal fill: \family sans -\size normal -Topical +Insert\SpecialChar menuseparator +Special +\begin_inset space ~ +\end_inset + +Character\SpecialChar menuseparator +Horizontal +\begin_inset space ~ +\end_inset + +Fill \family default - for a Topical review +. \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669801478 +\begin_layout Enumerate +\change_deleted 564990737 1669742044 +Switch to \SpecialChar LaTeX + mode: \family sans -\size normal -Comment +M-c +\begin_inset space ~ +\end_inset + +t \family default - for a Comment +. \end_layout -\begin_layout Itemize +\begin_layout Enumerate -\change_deleted 564990737 1669801478 +\change_deleted 564990737 1669742044 +Enter +\family typewriter -\family sans -\size normal -Note +\backslash +parbox[b]{55mm}{ \family default - for a Note +. + +\series bold +Do not close the brace! \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669801478 +\begin_layout Enumerate +\change_deleted 564990737 1669742044 +Position the cursor behind the caption text, switch to \SpecialChar LaTeX + mode and insert + the closing brace: \family sans -\size normal -Paper +M-c +\begin_inset space ~ +\end_inset + +t \family default - for a Paper (same as Title) + +\family typewriter +} +\family default +. \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669801478 +\begin_layout Standard -\family sans -\size normal -Prelim -\family default - for a Preliminary communication +\change_deleted 564990737 1669742044 +Also, refer to the figures in the example paper. \end_layout -\begin_layout Itemize +\begin_layout Subsection -\change_deleted 564990737 1669801478 +\change_deleted 564990737 1669742044 +Referee layout +\end_layout + +\begin_layout Standard +\change_deleted 564990737 1669742044 +For submission, the paper has to be formated in a special double-spacing + layout. + For this purpose, you have to give the option +\family typewriter +referee +\family default + to the document class. + This must be done using the custom class options field in the \family sans -\size normal -Rapid +Document\SpecialChar menuseparator +Settings \family default - for a Rapid communication + dialog. + Just enter the string +\family typewriter +referee +\family default + there. \end_layout -\begin_layout Itemize +\begin_layout Subsection -\change_deleted 564990737 1669801478 +\change_deleted 564990737 1669742044 +The example paper +\end_layout + +\begin_layout Standard +\change_deleted 564990737 1669742044 +The \family sans -\size normal -Letter +Examples \family default - for a Letter to the editor + directory contains an example paper written with \SpecialChar LyX +. + It is the example paper from the original macro package, translated to + \SpecialChar LyX +. + Use it for inspiration, and compare the original \SpecialChar LaTeX + code with \SpecialChar LyX + way of writing. \end_layout -\end_deeper -\begin_layout Itemize +\begin_layout Section -\change_deleted 564990737 1669801478 +\change_deleted 564990737 1671097429 +Dinbrief +\end_layout -\size normal -All title environments except of +\begin_layout Standard + +\change_deleted 564990737 1671097429 +The document class \family sans -Letter +dinbrief \family default - can have an optional short title. + can be used to type letters according to German conventions. + A template file is included in +\family typewriter +.../lyx/share/templates +\family default + for you to use as a starting point. \end_layout -\begin_layout Itemize +\begin_layout Section -\change_deleted 564990737 1669801478 -There is a general title environment -\family sans -Article -\family default - which is not directly supported by \SpecialChar LyX -. - This can be used as \SpecialChar TeX - code when your document doesn't fit into one of the - other title types. +\change_deleted 564990737 1671097429 +Elsevier Journals \end_layout \begin_layout Standard -\change_deleted 564990737 1669801478 -For more informations like hints for special table and formula formatting, - look at the IOP author guidelines. -\change_unchanged - +\change_deleted 564990737 1671097429 +See the \SpecialChar LyX + template file +\family typewriter +elsarticle.lyx +\family default +. + It contains all infos you need. \end_layout \begin_layout Section -\change_deleted 564990737 1670317155 -Kluwer +\change_deleted 564990737 1669755802 +ijmpc and ijmpd \end_layout \begin_layout Standard -\change_deleted 564990737 1670317155 +\change_deleted 564990737 1669755802 by \noun on Panayotis Papasotiriou @@ -21501,96 +21757,85 @@ Panayotis Papasotiriou \begin_layout Subsection -\change_deleted 564990737 1670317155 +\change_deleted 564990737 1669755802 Overview \end_layout \begin_layout Standard -\change_deleted 564990737 1670317155 -The Kluwer package is a set of macros produced by Kluwer Academic Publishers - that facilitates electronic manuscript submission to the journals they - publish. - Most known of them (at least in my domain of interest) are +\change_deleted 564990737 1669755802 +The ijmpc package is a set of macros that facilitates electronic manuscript + submission to the \emph on -Astrophysics and Space Science +International Journal of Modern Physics C \emph default - and +. + Similarly, the ijmpd package is for creating manuscripts to be submitted + to the \emph on -Solar Physics +International Journal of Modern Physics D \emph default -, but there are many others (see a complete list at +. + Both journals are published by World Scientific. + The corresponding document classes are named +\family typewriter +ws-ijmpc.cls +\family default + and +\family typewriter +ws-ijmpd.cls +\family default +, respectively. + These files, together with instructions for the authors, can be downloaded + from the sites \begin_inset Flex URL status collapsed \begin_layout Plain Layout -http://www.wkap.nl/jrnllist.htm/JRNLHOME +http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml \end_layout \end_inset -). - The Kluwer package may be downloaded from the site + and \begin_inset Flex URL status collapsed \begin_layout Plain Layout -http://www.wkap.nl/kaphtml.htm/STYLEFILES +http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml \end_layout \end_inset . - A complete user guide is contained in that package (but it can also be - downloaded separately). -\end_layout - -\begin_layout Standard - -\change_deleted 564990737 1670317155 -\SpecialChar LyX - supports many features of the package but not everything. - However, the \SpecialChar TeX - code needed is reduced to some + Both packages are modified versions of the standard \begin_inset Quotes eld \end_inset -peculiar +article \begin_inset Quotes erd \end_inset - commands of the package (see -\begin_inset space ~ -\end_inset - - -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:kluwer_peculiarities" - -\end_inset - -). - I have recently used \SpecialChar LyX - to write an article submitted to the -\emph on -Astrophysics and Space Science -\emph default + package, and they are almost (but not exactly) identical. + Most of their features are supported by \SpecialChar LyX +. + I have used \SpecialChar LyX + successfully to write articles submitted to both journals without any problem. \end_layout \begin_layout Subsection -\change_deleted 564990737 1670317155 +\change_deleted 564990737 1669755802 Writing a paper \end_layout \begin_layout Standard -\change_deleted 564990737 1670317155 -The easiest way to write a paper is to start with the Kluwer template file. +\change_deleted 564990737 1669755802 +As usual, the easiest way to write a paper is to start with a template. Click on \family sans File\SpecialChar menuseparator @@ -21602,1236 +21847,991 @@ Template \family default , then choose the \family typewriter -kluwer.lyx -\family default - template. - This will give an (almost) empty document that includes the most common - fields found in a manuscript and a short description of their use. - As in most templates, simply overwrite the existing text (including the - brackets, -\family typewriter -<> -\family default -) with the correct information. -\end_layout - -\begin_layout Subsection - -\change_deleted 564990737 1670317155 -Preparing a paper for submission -\end_layout - -\begin_layout Standard - -\change_deleted 564990737 1670317155 -As in the AAS\SpecialChar TeX - package, before you submit your paper to a journal you must - -\begin_inset Quotes eld -\end_inset - -postprocess -\begin_inset Quotes erd -\end_inset - - it as follows. -\end_layout - -\begin_layout Enumerate - -\change_deleted 564990737 1670317155 -Export your paper as a \SpecialChar LaTeX - file. - To do this, click on -\family sans -File\SpecialChar menuseparator -Export\SpecialChar menuseparator -\SpecialChar LaTeX - -\family default -. - -\end_layout - -\begin_layout Enumerate - -\change_deleted 564990737 1670317155 -Edit the resulting -\family typewriter -.tex -\family default - file with a text editor and make the following changes -\end_layout - -\begin_deeper -\begin_layout Enumerate - -\change_deleted 564990737 1670317155 -remove the comment lines before the -\family typewriter - -\backslash -documentclass -\family default - command, -\end_layout - -\begin_layout Enumerate - -\change_deleted 564990737 1670317155 -remove everything between (and including) the -\family typewriter - -\backslash -makeatletter +ijmpc.lyx \family default - and + or \family typewriter - -\backslash -makeatother +ijmpd.lyx \family default - commands, except for any commands you specifically put into the \SpecialChar LaTeX - preamble. -\end_layout - -\begin_layout Standard - -\change_deleted 564990737 1670317155 -Save the resulting + template. + This will give an (almost) empty document that includes the most common + fields found in a manuscript. + Simply overwrite the existing text (including the brackets, \family typewriter -.tex +<> \family default - file. +) with your text. + You should keep in mind the following remarks. \end_layout -\end_deeper \begin_layout Enumerate -\change_deleted 564990737 1670317155 -Run the -\family typewriter -.tex -\family default - file through \SpecialChar LaTeX - as many times as necessary (usually up to three). +\change_deleted 564990737 1669755802 +\SpecialChar LyX + won't let you change the font size and the page style of the document, + because such modifications are not allowed by both packages. \end_layout \begin_layout Enumerate -\change_deleted 564990737 1670317155 -View the resulting -\family typewriter -.dvi -\family default - document using, e. -\begin_inset space \thinspace{} +\change_deleted 564990737 1669755802 +The language of the document should not be changed. + Before previewing your paper, be sure that the babel package is not used. + To do this, click on +\begin_inset Info +type "menu" +arg "dialog-show document" \end_inset -g. -\begin_inset space \space{} + +\family sans +\SpecialChar menuseparator +Language +\family default +, and select +\begin_inset Quotes eld \end_inset +None +\begin_inset Quotes erd +\end_inset + as \family sans -xdvi +Language Package \family default -, and check if everything is OK (it should, if you didn't make any mistake). +. \end_layout -\begin_layout Subsection +\begin_layout Enumerate -\change_deleted 564990737 1670317155 +\change_deleted 564990737 1669755802 +The \begin_inset Quotes eld \end_inset -Peculiarities +Keywords \begin_inset Quotes erd \end_inset - of the Kluwer package -\begin_inset CommandInset label -LatexCommand label -name "subsec:kluwer_peculiarities" + style must be used to define keywords. +\end_layout +\begin_layout Enumerate + +\change_deleted 564990737 1669755802 +The ijmpc package provides a style named +\begin_inset Quotes eld \end_inset +Classification Codes +\begin_inset Quotes erd +\end_inset +, which can be used to define classification codes, such as PACS numbers. + Note that this facility is not supported by the ijmpd package. \end_layout -\begin_layout Standard +\begin_layout Enumerate -\change_deleted 564990737 1670317155 -The Kluwer package has the following +\change_deleted 564990737 1669755802 +Several new environments are available: \begin_inset Quotes eld \end_inset -peculiarities +Definition \begin_inset Quotes erd \end_inset -. -\end_layout - -\begin_layout Enumerate +, +\begin_inset Quotes eld +\end_inset -\change_deleted 564990737 1670317155 -It is possible to write multiple articles in the same \SpecialChar LaTeX - file -\begin_inset Foot -status collapsed +Step +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -I can't imagine any good reason to do this. -\end_layout +, +\begin_inset Quotes eld +\end_inset +Example +\begin_inset Quotes erd \end_inset -. - Each article must be included in the environment +, \begin_inset Quotes eld \end_inset -article +Remark \begin_inset Quotes erd \end_inset -. - Unfortunately, this environment cannot be omitted, even if you write just - one article. - Therefore, each article starts with the command -\family typewriter +, +\begin_inset Quotes eld +\end_inset -\backslash -begin{article} -\family default - and, obviously, ends with the command -\family typewriter +Notation +\begin_inset Quotes erd +\end_inset -\backslash -end{article} -\family default -. - Although this can be implemented in \SpecialChar LyX -, I didn't included it, since it looks - ugly and can confuse the novice user. - Therefore, you need to enter them directly and mark them as \SpecialChar LaTeX - code (the - well-known +, \begin_inset Quotes eld \end_inset -\SpecialChar TeX - code +Theorem \begin_inset Quotes erd \end_inset -). -\end_layout +, +\begin_inset Quotes eld +\end_inset -\begin_layout Enumerate +Proof +\begin_inset Quotes erd +\end_inset -\change_deleted 564990737 1670317155 -Information given at the beginning of the article (i. -\begin_inset space \thinspace{} +, +\begin_inset Quotes eld \end_inset -e. -\begin_inset space \space{} +Corollary +\begin_inset Quotes erd \end_inset -title, subtitle, author, institution, running title, running author, abstract - and keywords) must be included in an environment called +, \begin_inset Quotes eld \end_inset -opening +Lemma \begin_inset Quotes erd \end_inset -. - This is not implemented in \SpecialChar LyX -, so you must enter title, subtitle etc. -\begin_inset space ~ +, +\begin_inset Quotes eld \end_inset -between two \SpecialChar TeX - code lines ( -\family typewriter +Proposition +\begin_inset Quotes erd +\end_inset -\backslash -begin{opening} -\family default - and -\family typewriter +, +\begin_inset Quotes eld +\end_inset -\backslash -end{opening} -\family default -). -\end_layout +Prop +\begin_inset Quotes erd +\end_inset -\begin_layout Enumerate +, +\begin_inset Quotes eld +\end_inset -\change_deleted 564990737 1670317155 -According to the user manual, the label of each bibliography item must be - written as -\family typewriter +Question +\begin_inset Quotes erd +\end_inset -\backslash -protect -\backslash -citeauthoryear{ -\family default -\emph on -author(s) -\family typewriter -\emph default -}{ -\family default -\emph on -year -\family typewriter -\emph default -} -\family default -. -\end_layout +, +\begin_inset Quotes eld +\end_inset -\begin_layout Standard +Claim +\begin_inset Quotes erd +\end_inset -\change_deleted 564990737 1670317155 -The -\family typewriter -kluwer.lyx -\family default - template takes care of all these +, and \begin_inset Quotes eld \end_inset -peculiarities +Conjecture \begin_inset Quotes erd \end_inset . - If you start a new paper using this template you don't need to do anything - special. - Just + Their use is more or less obvious. + \SpecialChar LyX + supports all these environments; it will use the proper label, text style, + and numbering scheme for each of them. \end_layout \begin_layout Enumerate -\change_deleted 564990737 1670317155 -don't delete the \SpecialChar TeX - code included in the template, and -\end_layout +\change_deleted 564990737 1669755802 +Both packages use basic citations; the natbib package should not be used. + In \SpecialChar LyX +, citation references are shown as usual; in the output, citations are + shown as superscripts. + If you want to use a citation as normal text, you should use the +\family typewriter +refcite +\family default + command, e. +\begin_inset space \thinspace{} +\end_inset + +g. +\begin_inset space \space{} +\end_inset -\begin_layout Enumerate -\change_deleted 564990737 1670317155 -copy the example bibliography item included in the template and modify it - as necessary to enter new bibliography items. -\end_layout +\begin_inset Quotes eld +\end_inset -\begin_layout Section +See Ref. +\begin_inset space \space{} +\end_inset -\change_deleted 564990737 1671097446 -Paper -\end_layout -\begin_layout Standard +\family typewriter -\change_deleted 564990737 1671097446 -The document class -\family sans -paper -\family default - provides an alternative to the standard -\family sans -article +\backslash +refcite{key} \family default - class. - It provides similar functionality, but you might prefer this layout with - sans serif sections, headings, and more. -\end_layout -\begin_layout Section +\begin_inset Quotes erd +\end_inset -\change_deleted 564990737 1671097446 -Springer Journals ( -\family sans -svjour -\family default -) +. \end_layout -\begin_layout Standard +\begin_layout Enumerate -\change_deleted 564990737 1671097446 -by -\noun on -Martin Vermeer -\end_layout +\change_deleted 564990737 1669755802 +There is no +\begin_inset Quotes eld +\end_inset -\begin_layout Subsection +Acknowledgments +\begin_inset Quotes erd +\end_inset -\change_deleted 564990737 1671097446 -Description + section in both packages. + To put acknowledgments, just use the +\begin_inset Quotes eld +\end_inset + +Section* +\begin_inset Quotes erd +\end_inset + + environment. \end_layout -\begin_layout Standard +\begin_layout Enumerate -\change_deleted 564990737 1671097446 -These are the layout files for some of the journal formats used by Springer - Verlag and listed on -\begin_inset Flex URL -status collapsed +\change_deleted 564990737 1669755802 +Appendices may be added to the paper, +\emph on +after +\emph default + the Acknowledgments and +\shape italic +before +\shape default + the References. + \SpecialChar LyX + provides a special environment, called +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout +Appendices Section +\begin_inset Quotes erd +\end_inset -http://www.springer.de/author/tex/help-journals.html -\end_layout + which marks the beginning of the appendices. + This environment should be left blank; it just sends a \SpecialChar LaTeX + command, but nothing + is really printed. + In \SpecialChar LyX +, the word +\begin_inset Quotes eld +\end_inset +Appendix +\begin_inset Quotes erd \end_inset -, where you should also go to fetch the class files (yes, these are \SpecialChar LaTeX2e - now!). - It is a modular system: the things common to all journals are implemented - in -\family typewriter -svjour.inc -\family default -, which journal-specific layout files (such as, e. -\begin_inset space \thinspace{} + is printed with blue letters, as a signal that all sections after that + point are appendices. + To write an appendix, use the +\begin_inset Quotes eld \end_inset -g. -\begin_inset space \space{} +Appendix +\begin_inset Quotes erd \end_inset + environment. + \SpecialChar LyX + will number each appendix with capital letters, as required by both journals. + Note that +\begin_inset Quotes eld +\end_inset -\family typewriter -svjog.layout -\family default - for Journal of Geodesy) can include. +Appendices Section +\begin_inset Quotes erd +\end_inset + + +\emph on +must +\emph default + be present before the first appendix; if not, all appendices will be numbered + as normal sections in the output. \end_layout -\begin_layout Standard +\begin_layout Enumerate -\change_deleted 564990737 1671097446 -This means that implementing support for any other Springer journal on this - list is as simple as writing your own -\family typewriter -sv -\family default - +\change_deleted 564990737 1669755802 +The ijmpc and the ijmpd packages use the \family typewriter -.layout +tbl \family default - file following the outline given in + command to implement table captions. + As a result, a table created by \SpecialChar LyX + is printed correctly, but its caption + is ignored. + However, you can use some \SpecialChar TeX + code to overcome this problem, so that captions + are printed as expected. + To do so, create a float table as usual, remove the caption, and replace + it with the \SpecialChar TeX + code \family typewriter -svjog.layout -\family default -. - -\end_layout - -\begin_layout Standard -\change_deleted 564990737 1671097446 -It is reasonably well tested only for the Journal of Geodesy. - -\family typewriter -svjour +\backslash +tbl{ +\emph on +your table caption +\emph default +}{ \family default - and + (sic); you must also the \SpecialChar TeX + code \family typewriter -svjog +} \family default - come with the standard \SpecialChar LyX - distribution. - Install the relevant class file (downloaded from Springer) in a proper - directory, reconfigure \SpecialChar LaTeX - (in the te\SpecialChar TeX - case by running + immediately after the tabular material. + Study the example table included in the template files to see how this + trick is implemented. + Alternatively, If you need table captions, you should implement the whole + table float in a \family typewriter -texhash +.tex \family default -, as root if necessary — doesn't \SpecialChar LyX - take care of this?), reconfigure \SpecialChar LyX - and - it should work. -\end_layout - -\begin_layout Subsection - -\change_deleted 564990737 1671097446 -New styles -\end_layout - -\begin_layout Standard - -\change_deleted 564990737 1671097446 -A large number of theorem-like styles — + file, then include this file to the \SpecialChar LyX + document ( \family sans -Claim, Conjecture, +Insert\SpecialChar menuseparator +File\SpecialChar menuseparator +Child +\begin_inset space ~ +\end_inset + +Document \family default - -\family sans -\SpecialChar ldots -Theorem +). + Details on how to create a table float can be found in the files +\family typewriter +ws-ijmpc.tex \family default -. -\end_layout - -\begin_layout Standard - -\change_deleted 564990737 1671097446 - -\family sans -Headnote, Dedication, Subtitle, Running_\SpecialChar LaTeX -_Title, Author_Running, Institute, - Mail, Offprints, Keywords, Acknowledgements, Acknowledgement + and +\family typewriter +ws-ijmpd.tex \family default -. - See the Springer class file documentation for details. +, included in the corresponding packages. \end_layout \begin_layout Subsection -\change_deleted 564990737 1671097446 -Supported journals +\change_deleted 564990737 1669755802 +Preparing a paper for submission \end_layout -\begin_layout Itemize +\begin_layout Standard -\change_deleted 564990737 1671097446 +\change_deleted 564990737 1669755802 +Before you submit your paper you must export the \SpecialChar LyX + document as a \SpecialChar LaTeX + file ( +\family sans +File\SpecialChar menuseparator +Export\SpecialChar menuseparator +\SpecialChar LaTeX -\emph on -Journal of Geodesy -\emph default -: -\family typewriter -svjog.layout \family default - — Martin Vermeer -\end_layout +) +\begin_inset Foot +status open -\begin_layout Itemize +\begin_layout Plain Layout +Actually you have the choice between \SpecialChar LaTeX + (plain) and pdflatex. + If you intend to use pdflatex to prepare the paper, you should use the + pdflatex option so that included graphics are converted to PDF format, + ready for use by pdflatex. +\end_layout -\change_deleted 564990737 1671097446 +\end_inset -\emph on -Probability Theory and Related Fields -\emph default -: +, then make the following changes to the resulting \family typewriter -svprobth.layout +.tex \family default - — Jean-Marc Lasgouttes + file. \end_layout -\begin_layout Standard - -\change_deleted 564990737 1671097446 -Add your own, it isn't so hard! -\end_layout +\begin_layout Enumerate -\begin_layout Subsection +\change_deleted 564990737 1669755802 +Remove the comment lines before the +\family typewriter -\change_deleted 564990737 1671097446 -Credits +\backslash +documentclass +\family default + command. \end_layout -\begin_layout Standard +\begin_layout Enumerate -\change_deleted 564990737 1671097446 -These files are partly based on the older +\change_deleted 564990737 1669755802 +Remove everything between (and including) the \family typewriter -ejour2.layout + +\backslash +makeatletter \family default -, which was again based on a tinkered-with version of an old \SpecialChar LaTeX - 2.09 style - file from Springer. - All this, and the + and \family typewriter -ejour2 -\family default - layout, are now defunct. - Jean-Marc Lasgouttes helped out big in making me find my way around the - \SpecialChar LyX - layout file mechanism. -\end_layout - -\begin_layout Subsection -\change_deleted 564990737 1671097446 -Bugs +\backslash +makeatother +\family default + commands, except for any commands you specifically put into the \SpecialChar LaTeX + preamble. \end_layout \begin_layout Standard -\change_deleted 564990737 1671097446 -Probably. - But probably less than in the old hacked-\SpecialChar LaTeX - +\change_deleted 564990737 1669755802 +The modified \family typewriter -ejour2 +.tex \family default -. -\end_layout + file should be saved and processed through \SpecialChar LaTeX + as many times as necessary. + You may also want to check the resulting +\family typewriter +.dvi +\family default + document. +\change_unchanged -\begin_layout Chapter -\SpecialChar LyX - Features needing Extra Software \end_layout \begin_layout Section -Checking \SpecialChar TeX +\change_deleted 564990737 1669801478 +iopart \end_layout \begin_layout Standard + +\change_deleted 564990737 1669801478 by \noun on -Asger Alstrup +Uwe Stöhr \end_layout \begin_layout Subsection -Introduction + +\change_deleted 564990737 1669801478 +Overview \end_layout \begin_layout Standard -If you have the -\family typewriter -chktex -\family default - program installed -\begin_inset Foot + +\change_deleted 564990737 1669801478 +The iopart package provides a document class to create electronic manuscript + submission to the journals published by the Institute of Physics. + Instructions for the authors how to create a paper using the iopart class + can be downloaded together with the iopart package from the site +\begin_inset Flex URL status collapsed \begin_layout Plain Layout -\family typewriter -chktex -\family default - is not yet available when you are using the \SpecialChar LaTeX - distribution MiK\SpecialChar TeX -. +ftp://ftp.iop.org/pub/journals/latex2e \end_layout \end_inset -, you'll find in the -\family sans -Tools -\family default - menu the entry: -\family sans -Check -\begin_inset space ~ -\end_inset - -TeX -\family default -. - You can get -\family typewriter -chktex -\family default - from CTAN, -\begin_inset Newline newline -\end_inset - - -\begin_inset CommandInset href -LatexCommand href -target "https://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html" -literal "false" - -\end_inset - . \end_layout -\begin_layout Standard -The -\family sans -Chk\SpecialChar TeX - -\family default - package is a program that was written by -\begin_inset Flex Noun -status collapsed - -\begin_layout Plain Layout -Jens T. -\begin_inset space ~ -\end_inset - -Berger Thielemann -\end_layout - -\end_inset +\begin_layout Subsection - in frustration because some constructs in \SpecialChar LaTeX - are sometimes non-intuitive, - and easy to forget. - The program runs over your \SpecialChar LaTeX - file, checks the integrity of the file, and - flags some common errors. - In other technical words, it is -\family typewriter -lint -\family default - for \SpecialChar LaTeX -. +\change_deleted 564990737 1669801478 +Writing a paper \end_layout \begin_layout Standard -Well, what is a syntax checker doing in \SpecialChar LyX - which is supposed to produce correct - \SpecialChar LaTeX - anyways? The answer is simple: Just as -\family typewriter -Lint -\family default - not only checks the -\emph on -syntax -\emph default - of C programs, but also does -\emph on -semantic -\emph default - checks for type-errors, -\family sans -Chk\SpecialChar TeX -\family default - catches some common +\change_deleted 564990737 1669801478 +The easiest way to write a paper is to start with the template \emph on -typographic +IOP-article.lyx \emph default - errors, in addition to the syntactical ones. - Specifically, + that is available via \family sans -Chk\SpecialChar TeX +File\SpecialChar menuseparator +New From Template +\family default + The template explains how to use the special text environments. + Here are the most important advices: +\end_layout + +\begin_layout Itemize +\change_deleted 564990737 1669801478 +To be able to compile your document to a PDF, PS, or DVI, ensure that the + no AMS packages are loaded in +\family sans +Document\SpecialChar menuseparator +Settings\SpecialChar menuseparator +Math Options \family default - is capable of detecting several common errors, such as +! \end_layout \begin_layout Itemize -Ellipsis detection: -\begin_inset Newline newline -\end_inset -Use \SpecialChar ldots - instead of ... +\change_deleted 564990737 1669801478 + +\size normal +The title environment defines the kind of your paper. + So use one of the following environments for the title: \end_layout +\begin_deeper \begin_layout Itemize -No space in front of/after parenthesis: -\begin_inset Newline newline -\end_inset -( wrong spacing ) +\change_deleted 564990737 1669801478 + +\family sans +\size normal +Title +\family default + for a Paper \end_layout \begin_layout Itemize -Enforcement of normal space after common abbreviations: -\begin_inset Newline newline -\end_inset - -e. -\begin_inset space \thinspace{} -\end_inset -g. -\begin_inset space \space{} -\end_inset +\change_deleted 564990737 1669801478 -is too wide spacing. +\family sans +\size normal +Review +\family default + for a Review \end_layout \begin_layout Itemize -Enforcement of end-of-sentence space when the last sentence ends with a - capital letter: -\begin_inset Newline newline -\end_inset -This is a TEST. - And this is wrong spacing. +\change_deleted 564990737 1669801478 + +\family sans +\size normal +Topical +\family default + for a Topical review \end_layout \begin_layout Itemize -Space in front of labels and similar commands: -\begin_inset Newline newline -\end_inset -The label should stick right up to the text to avoid falling to a wrong - page. - -\begin_inset CommandInset label -LatexCommand label -name "sec:chktex" +\change_deleted 564990737 1669801478 -\end_inset +\family sans +\size normal +Comment +\family default + for a Comment +\end_layout - -\begin_inset Foot -status collapsed +\begin_layout Itemize -\begin_layout Plain Layout -This footnote is in danger of falling off to a wrong page +\change_deleted 564990737 1669801478 + +\family sans +\size normal +Note +\family default + for a Note \end_layout -\end_inset +\begin_layout Itemize - The label is separated too much. +\change_deleted 564990737 1669801478 + +\family sans +\size normal +Paper +\family default + for a Paper (same as Title) \end_layout \begin_layout Itemize -Space in front of references, instead of hard spaces: -\begin_inset Newline newline -\end_inset - -If you have bad luck, the text will break right between the referenced text - and reference number, and that's a pity. - See section -\begin_inset CommandInset ref -LatexCommand ref -reference "sec:chktex" -\end_inset +\change_deleted 564990737 1669801478 -. +\family sans +\size normal +Prelim +\family default + for a Preliminary communication \end_layout \begin_layout Itemize -Use of -\begin_inset Quotes eld -\end_inset -x -\begin_inset Quotes erd -\end_inset +\change_deleted 564990737 1669801478 - instead of -\begin_inset Formula $\times$ -\end_inset +\family sans +\size normal +Rapid +\family default + for a Rapid communication +\end_layout - between numbers: -\begin_inset Newline newline -\end_inset +\begin_layout Itemize -2x2 looks cheap compared to -\begin_inset Formula $2\times2$ -\end_inset +\change_deleted 564990737 1669801478 -. +\family sans +\size normal +Letter +\family default + for a Letter to the editor \end_layout -\begin_layout Standard -and more \SpecialChar ldots - It is an invaluable tool when you are -\begin_inset Quotes eld -\end_inset +\end_deeper +\begin_layout Itemize -finishing up -\begin_inset Quotes erd -\end_inset +\change_deleted 564990737 1669801478 - your document before printing, and you should run it right after the obligatory - spelling check, and before you go fine tuning the typesetting. +\size normal +All title environments except of +\family sans +Letter +\family default + can have an optional short title. \end_layout -\begin_layout Subsection -How to use it -\end_layout +\begin_layout Itemize -\begin_layout Standard -If you have the program installed, usage is as simple as choosing +\change_deleted 564990737 1669801478 +There is a general title environment \family sans -Tools\SpecialChar menuseparator -Check -\begin_inset space ~ -\end_inset - -TeX +Article \family default + which is not directly supported by \SpecialChar LyX . - This will make \SpecialChar LyX - generate a \SpecialChar LaTeX - file of your document, start -\family sans -Chk\SpecialChar TeX + This can be used as \SpecialChar TeX + code when your document doesn't fit into one of the + other title types. +\end_layout -\family default - to check it, and then make \SpecialChar LyX - insert -\begin_inset Quotes eld -\end_inset +\begin_layout Standard -error boxes -\begin_inset Quotes erd -\end_inset +\change_deleted 564990737 1669801478 +For more informations like hints for special table and formula formatting, + look at the IOP author guidelines. +\change_unchanged - with the warnings from -\family sans -Chk\SpecialChar TeX +\end_layout -\family default -, if there were any. - The warnings will be placed close to the point of the mistake, and you - can quickly find them by using the -\family sans -Navigate\SpecialChar menuseparator -Error -\family default - menu item, or the shortcut key -\family sans -C-g -\family default - from the default -\family typewriter -cua -\family default - bind file. - Open the error boxes by clicking on them with the mouse, or use the shortcut - key -\family sans -C-i -\family default - from -\family typewriter -cua -\family default - bindings, or the corresponding -\family sans -C-o -\family default - for the alternate -\family typewriter -emacs -\family default - bind file. - Read the warning and correct the mistake, if it is a mistake. - If you have trouble understanding what the warning is about, you can safely - ignore it. - Remember that there is a hidden layer between the document on screen and - the technical details in invoking -\family sans -Chk\SpecialChar TeX +\begin_layout Section -\family default -, and this gap can make some warnings seem arcane or just plain silly. +\change_deleted 564990737 1670317155 +Kluwer \end_layout \begin_layout Standard -This document is an excellent testing bed for the feature, and it should - provide quite a few warnings for you to fiddle with. - Since computers are only so smart, expect most of the warnings to be false - alarms, though. + +\change_deleted 564990737 1670317155 +by +\noun on +Panayotis Papasotiriou \end_layout \begin_layout Subsection -How to fine tune it -\end_layout - -\begin_layout Standard -Sometimes, you'll find that -\family sans -Chk\SpecialChar TeX -\family default - makes more noise than suits your mood. - Then you can choose not to use it, wait until your mood changes, or try - to customize -\family sans -Chk\SpecialChar TeX - -\family default - to get better along with you. +\change_deleted 564990737 1670317155 +Overview \end_layout \begin_layout Standard -Although -\family sans -Chk\SpecialChar TeX -\family default - +\change_deleted 564990737 1670317155 +The Kluwer package is a set of macros produced by Kluwer Academic Publishers + that facilitates electronic manuscript submission to the journals they + publish. + Most known of them (at least in my domain of interest) are \emph on -is +Astrophysics and Space Science \emph default - very configurable and extensible, you should not expect to solve all problems - with -\family sans -Chk\SpecialChar TeX - -\family default - in \SpecialChar LyX - this way. - Since \SpecialChar LyX - has to generate a somewhat special \SpecialChar LaTeX - file to be able to match the - line numbers from the -\family sans -Chk\SpecialChar TeX - -\family default - output -\begin_inset Foot + and +\emph on +Solar Physics +\emph default +, but there are many others (see a complete list at +\begin_inset Flex URL status collapsed \begin_layout Plain Layout -You can inspect the specific output from -\family sans -chktex -\family default - by using -\family sans -Document\SpecialChar menuseparator -\SpecialChar LaTeX -\begin_inset space ~ +http://www.wkap.nl/jrnllist.htm/JRNLHOME +\end_layout + \end_inset -Log -\family default - right after a -\family sans -chktex -\family default - run. +). + The Kluwer package may be downloaded from the site +\begin_inset Flex URL +status collapsed + +\begin_layout Plain Layout + +http://www.wkap.nl/kaphtml.htm/STYLEFILES \end_layout \end_inset - to the internal document structure, some of the warnings will not appear - correctly. - There are two things you can do about this: +. + A complete user guide is contained in that package (but it can also be + downloaded separately). \end_layout -\begin_layout Itemize -Fine tune the -\family sans -Chk\SpecialChar TeX +\begin_layout Standard -\family default - invocation command line in -\begin_inset Flex Noun -status collapsed +\change_deleted 564990737 1670317155 +\SpecialChar LyX + supports many features of the package but not everything. + However, the \SpecialChar TeX + code needed is reduced to some +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout -Tools\SpecialChar menuseparator -Preferences\SpecialChar menuseparator -Output\SpecialChar menuseparator -LaTeX\SpecialChar menuseparator -CheckTeX command -\end_layout +peculiar +\begin_inset Quotes erd +\end_inset + commands of the package (see +\begin_inset space ~ \end_inset -, or the global -\family sans -Chk\SpecialChar TeX -\family default - installation configuration file (usually with the file -\family typewriter -chktexrc -\family default +\begin_inset CommandInset ref +LatexCommand ref +reference "subsec:kluwer_peculiarities" + +\end_inset + ). - See below to learn what warnings can be enabled and disabled on the command - line. + I have recently used \SpecialChar LyX + to write an article submitted to the +\emph on +Astrophysics and Space Science +\emph default + without any problem. \end_layout -\begin_layout Itemize -Export your document as a raw \SpecialChar LaTeX - file using -\family sans -File\SpecialChar menuseparator -Export\SpecialChar menuseparator -\SpecialChar LaTeX +\begin_layout Subsection -\family default - and run -\family typewriter -chktex -\family default - manually on that. - Invoked in this way, it can be a hassle to find the corresponding place - in the document inside \SpecialChar LyX -, but with a little patience, you should be able - to do it. +\change_deleted 564990737 1670317155 +Writing a paper \end_layout \begin_layout Standard -Here follows the warning messages that can be enabled and disabled in + +\change_deleted 564990737 1670317155 +The easiest way to write a paper is to start with the Kluwer template file. + Click on \family sans -Preferences -\family default -. - Use -\family typewriter --n# +File\SpecialChar menuseparator +New from \family default - to disable a warning, and -\family typewriter --w# + +\family sans +Template \family default - to enable a warning. - The emphasized entries are disabled by default, because the default is - " +, then choose the \family typewriter -chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38 +kluwer.lyx \family default -". -\end_layout - -\begin_layout Standard -Notice that you should only use the options that enable and disable warnings, - because \SpecialChar LyX - relies on some of the other command line parameters to be set - in a specific way to have a chance to communicate with + template. + This will give an (almost) empty document that includes the most common + fields found in a manuscript and a short description of their use. + As in most templates, simply overwrite the existing text (including the + brackets, \family typewriter -chktex +<> \family default -. +) with the correct information. \end_layout -\begin_layout Enumerate +\begin_layout Subsection -\size small -\emph on -Command terminated with space. +\change_deleted 564990737 1670317155 +Preparing a paper for submission \end_layout -\begin_layout Enumerate +\begin_layout Standard -\size small -Non-breaking space ( +\change_deleted 564990737 1670317155 +As in the AAS\SpecialChar TeX + package, before you submit your paper to a journal you must + \begin_inset Quotes eld \end_inset - -\family typewriter -~ -\family default - +postprocess \begin_inset Quotes erd \end_inset -) should have been used. + it as follows. \end_layout \begin_layout Enumerate -\size small -\emph on -You should enclose the previous parenthesis with -\begin_inset Quotes eld -\end_inset - +\change_deleted 564990737 1670317155 +Export your paper as a \SpecialChar LaTeX + file. + To do this, click on +\family sans +File\SpecialChar menuseparator +Export\SpecialChar menuseparator +\SpecialChar LaTeX -\family typewriter -{} \family default - -\begin_inset Quotes erd -\end_inset - . + \end_layout \begin_layout Enumerate -\size small -Italic correction ( -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1670317155 +Edit the resulting +\family typewriter +.tex +\family default + file with a text editor and make the following changes +\end_layout +\begin_deeper +\begin_layout Enumerate +\change_deleted 564990737 1670317155 +remove the comment lines before the \family typewriter \backslash -/ +documentclass \family default - -\begin_inset Quotes erd -\end_inset - -) found in non-italic buffer. + command, \end_layout \begin_layout Enumerate -\size small -Italic correction ( -\begin_inset Quotes eld -\end_inset - +\change_deleted 564990737 1670317155 +remove everything between (and including) the +\family typewriter +\backslash +makeatletter +\family default + and \family typewriter \backslash -/ +makeatother \family default + commands, except for any commands you specifically put into the \SpecialChar LaTeX + preamble. +\end_layout -\begin_inset Quotes erd -\end_inset +\begin_layout Standard -) found more than once. +\change_deleted 564990737 1670317155 +Save the resulting +\family typewriter +.tex +\family default + file. \end_layout +\end_deeper \begin_layout Enumerate -\size small -\emph on -No italic correction ( -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1670317155 +Run the +\family typewriter +.tex +\family default + file through \SpecialChar LaTeX + as many times as necessary (usually up to three). +\end_layout +\begin_layout Enumerate +\change_deleted 564990737 1670317155 +View the resulting \family typewriter - -\backslash -/ +.dvi \family default + document using, e. +\begin_inset space \thinspace{} +\end_inset -\begin_inset Quotes erd +g. +\begin_inset space \space{} \end_inset -) found. + +\family sans +xdvi +\family default +, and check if everything is OK (it should, if you didn't make any mistake). \end_layout -\begin_layout Enumerate +\begin_layout Subsection -\size small -Accent command +\change_deleted 564990737 1670317155 \begin_inset Quotes eld \end_inset - -\family typewriter -cmd -\family default - +Peculiarities \begin_inset Quotes erd \end_inset - needs use of -\begin_inset Quotes eld + of the Kluwer package +\begin_inset CommandInset label +LatexCommand label +name "subsec:kluwer_peculiarities" + \end_inset -\family typewriter -cmd -\family default +\end_layout + +\begin_layout Standard + +\change_deleted 564990737 1670317155 +The Kluwer package has the following +\begin_inset Quotes eld +\end_inset +peculiarities \begin_inset Quotes erd \end_inset @@ -22840,1640 +22840,1692 @@ cmd \begin_layout Enumerate -\size small -Wrong length of dash may have been used. -\end_layout - -\begin_layout Enumerate - -\size small -\emph on -\begin_inset Quotes eld -\end_inset - +\change_deleted 564990737 1670317155 +It is possible to write multiple articles in the same \SpecialChar LaTeX + file +\begin_inset Foot +status collapsed -\family typewriter -%s -\family default +\begin_layout Plain Layout +I can't imagine any good reason to do this. +\end_layout -\begin_inset Quotes erd \end_inset - expected, found +. + Each article must be included in the environment \begin_inset Quotes eld \end_inset - -\family typewriter -%s -\family default - +article \begin_inset Quotes erd \end_inset . -\end_layout + Unfortunately, this environment cannot be omitted, even if you write just + one article. + Therefore, each article starts with the command +\family typewriter -\begin_layout Enumerate +\backslash +begin{article} +\family default + and, obviously, ends with the command +\family typewriter -\size small -Solo +\backslash +end{article} +\family default +. + Although this can be implemented in \SpecialChar LyX +, I didn't included it, since it looks + ugly and can confuse the novice user. + Therefore, you need to enter them directly and mark them as \SpecialChar LaTeX + code (the + well-known \begin_inset Quotes eld \end_inset - -\family typewriter -%s -\family default - +\SpecialChar TeX + code \begin_inset Quotes erd \end_inset - found. +). \end_layout \begin_layout Enumerate -\size small -You should use -\begin_inset Quotes eld +\change_deleted 564990737 1670317155 +Information given at the beginning of the article (i. +\begin_inset space \thinspace{} \end_inset +e. +\begin_inset space \space{} +\end_inset -\family typewriter -%s -\family default +title, subtitle, author, institution, running title, running author, abstract + and keywords) must be included in an environment called +\begin_inset Quotes eld +\end_inset +opening \begin_inset Quotes erd \end_inset - to achieve an ellipsis. -\end_layout - -\begin_layout Enumerate - -\size small -Inter-word spacing ( -\begin_inset Quotes eld +. + This is not implemented in \SpecialChar LyX +, so you must enter title, subtitle etc. +\begin_inset space ~ \end_inset - +between two \SpecialChar TeX + code lines ( \family typewriter \backslash - +begin{opening} \family default - -\begin_inset Quotes eld -\end_inset + and +\family typewriter -) should perhaps be used. +\backslash +end{opening} +\family default +). \end_layout \begin_layout Enumerate -\size small -Inter-sentence spacing ( -\begin_inset Quotes eld -\end_inset - - +\change_deleted 564990737 1670317155 +According to the user manual, the label of each bibliography item must be + written as \family typewriter \backslash -@ +protect +\backslash +citeauthoryear{ \family default - -\begin_inset Quotes erd -\end_inset - -) should perhaps be used. -\end_layout - -\begin_layout Enumerate - -\size small -Could not find argument for command. +\emph on +author(s) +\family typewriter +\emph default +}{ +\family default +\emph on +year +\family typewriter +\emph default +} +\family default +. \end_layout -\begin_layout Enumerate - -\size small -No match found for -\begin_inset Quotes eld -\end_inset - +\begin_layout Standard +\change_deleted 564990737 1670317155 +The \family typewriter -%s +kluwer.lyx \family default + template takes care of all these +\begin_inset Quotes eld +\end_inset +peculiarities \begin_inset Quotes erd \end_inset . + If you start a new paper using this template you don't need to do anything + special. + Just \end_layout \begin_layout Enumerate -\size small -Math mode still on at end of \SpecialChar LaTeX - file. +\change_deleted 564990737 1670317155 +don't delete the \SpecialChar TeX + code included in the template, and \end_layout \begin_layout Enumerate -\size small -Number of -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1670317155 +copy the example bibliography item included in the template and modify it + as necessary to enter new bibliography items. +\end_layout +\begin_layout Section -\family typewriter -char -\family default +\change_deleted 564990737 1671097446 +Paper +\end_layout -\begin_inset Quotes erd -\end_inset +\begin_layout Standard - doesn't match the number of -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1671097446 +The document class +\family sans +paper +\family default + provides an alternative to the standard +\family sans +article +\family default + class. + It provides similar functionality, but you might prefer this layout with + sans serif sections, headings, and more. +\end_layout +\begin_layout Section -\family typewriter -char +\change_deleted 564990737 1671097446 +Springer Journals ( +\family sans +svjour \family default +) +\end_layout -\begin_inset Quotes erd -\end_inset +\begin_layout Standard -. +\change_deleted 564990737 1671097446 +by +\noun on +Martin Vermeer \end_layout -\begin_layout Enumerate - -\size small -You should use either -\family typewriter +\begin_layout Subsection -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1671097446 +Description +\end_layout +\begin_layout Standard -\family default - or -\family typewriter +\change_deleted 564990737 1671097446 +These are the layout files for some of the journal formats used by Springer + Verlag and listed on +\begin_inset Flex URL +status collapsed -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout +http://www.springer.de/author/tex/help-journals.html +\end_layout -\family default - as an alternative to -\begin_inset Quotes eld \end_inset - +, where you should also go to fetch the class files (yes, these are \SpecialChar LaTeX2e + now!). + It is a modular system: the things common to all journals are implemented + in \family typewriter -" +svjour.inc \family default +, which journal-specific layout files (such as, e. +\begin_inset space \thinspace{} +\end_inset -\begin_inset Quotes erd +g. +\begin_inset space \space{} \end_inset -. + +\family typewriter +svjog.layout +\family default + for Journal of Geodesy) can include. \end_layout -\begin_layout Enumerate +\begin_layout Standard -\size small -You should use " +\change_deleted 564990737 1671097446 +This means that implementing support for any other Springer journal on this + list is as simple as writing your own \family typewriter -' +sv \family default -" (ASCII 39) instead of " + \family typewriter -´ +.layout \family default -" (ASCII 180). -\end_layout - -\begin_layout Enumerate - -\size small -User-specified pattern found. -\end_layout - -\begin_layout Enumerate - -\size small -This command might not be intended. -\end_layout - -\begin_layout Enumerate - -\size small -\emph on -Comment displayed. + file following the outline given in +\family typewriter +svjog.layout +\family default +. + \end_layout -\begin_layout Enumerate +\begin_layout Standard -\size small -Either +\change_deleted 564990737 1671097446 +It is reasonably well tested only for the Journal of Geodesy. + \family typewriter -'' -\backslash -,' +svjour \family default - or + and \family typewriter -' -\backslash -,'' +svjog \family default - will look better. + come with the standard \SpecialChar LyX + distribution. + Install the relevant class file (downloaded from Springer) in a proper + directory, reconfigure \SpecialChar LaTeX + (in the te\SpecialChar TeX + case by running +\family typewriter +texhash +\family default +, as root if necessary — doesn't \SpecialChar LyX + take care of this?), reconfigure \SpecialChar LyX + and + it should work. \end_layout -\begin_layout Enumerate +\begin_layout Subsection -\size small -Delete this space to maintain correct page references. +\change_deleted 564990737 1671097446 +New styles \end_layout -\begin_layout Enumerate - -\size small -\emph on -You might wish to put this between a pair of -\begin_inset Quotes eld -\end_inset - +\begin_layout Standard -\family typewriter -{} +\change_deleted 564990737 1671097446 +A large number of theorem-like styles — +\family sans +Claim, Conjecture, +\family default + +\family sans +\SpecialChar ldots +Theorem \family default - -\begin_inset Quotes erd -\end_inset - . \end_layout -\begin_layout Enumerate +\begin_layout Standard -\size small -You ought to remove spaces in front of punctuation. +\change_deleted 564990737 1671097446 + +\family sans +Headnote, Dedication, Subtitle, Running_\SpecialChar LaTeX +_Title, Author_Running, Institute, + Mail, Offprints, Keywords, Acknowledgements, Acknowledgement +\family default +. + See the Springer class file documentation for details. \end_layout -\begin_layout Enumerate +\begin_layout Subsection -\size small -Could not execute \SpecialChar LaTeX - command. +\change_deleted 564990737 1671097446 +Supported journals \end_layout -\begin_layout Enumerate +\begin_layout Itemize -\size small -Don't use -\family typewriter +\change_deleted 564990737 1671097446 -\backslash -/ +\emph on +Journal of Geodesy +\emph default +: +\family typewriter +svjog.layout \family default - in front of small punctuation. + — Martin Vermeer \end_layout -\begin_layout Enumerate +\begin_layout Itemize + +\change_deleted 564990737 1671097446 +\emph on +Probability Theory and Related Fields +\emph default +: \family typewriter -\size small -$ -\backslash -times$ +svprobth.layout \family default - may look prettier here. + — Jean-Marc Lasgouttes \end_layout -\begin_layout Enumerate +\begin_layout Standard -\size small -\emph on -Multiple spaces detected in output. +\change_deleted 564990737 1671097446 +Add your own, it isn't so hard! \end_layout -\begin_layout Enumerate +\begin_layout Subsection -\size small -This text may be ignored. +\change_deleted 564990737 1671097446 +Credits \end_layout -\begin_layout Enumerate +\begin_layout Standard -\size small -Use +\change_deleted 564990737 1671097446 +These files are partly based on the older \family typewriter - -\begin_inset Quotes eld -\end_inset - - +ejour2.layout \family default - to begin quotation, not +, which was again based on a tinkered-with version of an old \SpecialChar LaTeX + 2.09 style + file from Springer. + All this, and the \family typewriter -' +ejour2 \family default -. + layout, are now defunct. + Jean-Marc Lasgouttes helped out big in making me find my way around the + \SpecialChar LyX + layout file mechanism. \end_layout -\begin_layout Enumerate - -\size small -Use -\family typewriter -' -\family default - to end quotation, not -\family typewriter +\begin_layout Subsection -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1671097446 +Bugs +\end_layout +\begin_layout Standard +\change_deleted 564990737 1671097446 +Probably. + But probably less than in the old hacked-\SpecialChar LaTeX + +\family typewriter +ejour2 \family default . \end_layout -\begin_layout Enumerate - -\size small -Don't mix quotes. +\begin_layout Chapter +\SpecialChar LyX + Features needing Extra Software \end_layout -\begin_layout Enumerate +\begin_layout Section +Checking \SpecialChar TeX -\size small -You should perhaps use -\begin_inset Quotes eld -\end_inset +\end_layout + +\begin_layout Standard +by +\noun on +Asger Alstrup +\end_layout +\begin_layout Subsection +Introduction +\end_layout +\begin_layout Standard +If you have the \family typewriter -cmd +chktex \family default + program installed +\begin_inset Foot +status collapsed -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout - instead. +\family typewriter +chktex +\family default + is not yet available when you are using the \SpecialChar LaTeX + distribution MiK\SpecialChar TeX +. \end_layout -\begin_layout Enumerate - -\size small -You should put a space in front of/after parenthesis. -\end_layout +\end_inset -\begin_layout Enumerate +, you'll find in the +\family sans +Tools +\family default + menu the entry: +\family sans +Check +\begin_inset space ~ +\end_inset -\size small -You should avoid spaces in front of/after parenthesis. -\end_layout +TeX +\family default +. + You can get +\family typewriter +chktex +\family default + from CTAN, +\begin_inset Newline newline +\end_inset -\begin_layout Enumerate -\size small -\emph on -You should not use punctuation in front of/after quotes. -\end_layout +\begin_inset CommandInset href +LatexCommand href +target "https://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html" +literal "false" -\begin_layout Enumerate +\end_inset -\size small -Double space found. +. \end_layout -\begin_layout Enumerate +\begin_layout Standard +The +\family sans +Chk\SpecialChar TeX -\size small -You should put punctuation outside inner/inside display math mode. -\end_layout +\family default + package is a program that was written by +\begin_inset Flex Noun +status collapsed -\begin_layout Enumerate +\begin_layout Plain Layout +Jens T. +\begin_inset space ~ +\end_inset -\size small -You ought to not use primitive \SpecialChar TeX - in \SpecialChar LaTeX - code. +Berger Thielemann \end_layout -\begin_layout Enumerate - -\size small -You should remove spaces in front of -\begin_inset Quotes eld \end_inset - + in frustration because some constructs in \SpecialChar LaTeX + are sometimes non-intuitive, + and easy to forget. + The program runs over your \SpecialChar LaTeX + file, checks the integrity of the file, and + flags some common errors. + In other technical words, it is \family typewriter -%s +lint \family default - -\begin_inset Quotes erd -\end_inset - - + for \SpecialChar LaTeX +. \end_layout -\begin_layout Enumerate - -\size small -\begin_inset Quotes eld -\end_inset +\begin_layout Standard +Well, what is a syntax checker doing in \SpecialChar LyX + which is supposed to produce correct + \SpecialChar LaTeX + anyways? The answer is simple: Just as +\family typewriter +Lint +\family default + not only checks the +\emph on +syntax +\emph default + of C programs, but also does +\emph on +semantic +\emph default + checks for type-errors, +\family sans +Chk\SpecialChar TeX +\family default + catches some common +\emph on +typographic +\emph default + errors, in addition to the syntactical ones. + Specifically, +\family sans +Chk\SpecialChar TeX -\family typewriter -%s \family default + is capable of detecting several common errors, such as +\end_layout -\begin_inset Quotes erd +\begin_layout Itemize +Ellipsis detection: +\begin_inset Newline newline \end_inset - is normally not followed by -\begin_inset Quotes eld +Use \SpecialChar ldots + instead of ... +\end_layout + +\begin_layout Itemize +No space in front of/after parenthesis: +\begin_inset Newline newline \end_inset +( wrong spacing ) +\end_layout -\family typewriter -%c -\family default +\begin_layout Itemize +Enforcement of normal space after common abbreviations: +\begin_inset Newline newline +\end_inset -\begin_inset Quotes erd +e. +\begin_inset space \thinspace{} \end_inset -. -\end_layout +g. +\begin_inset space \space{} +\end_inset -\begin_layout Standard -In later versions of \SpecialChar LyX -, we hope to provide a more complete interface to this - tool (and it's smaller cousin -\family typewriter -lacheck -\family default -) to exploit the full power of it. - But it's not exactly useless as it is now: go try it on one of your existing - documents of a certain length and be surprised. +is too wide spacing. \end_layout -\begin_layout Section -Version Control in \SpecialChar LyX +\begin_layout Itemize +Enforcement of end-of-sentence space when the last sentence ends with a + capital letter: +\begin_inset Newline newline +\end_inset +This is a TEST. + And this is wrong spacing. \end_layout -\begin_layout Standard -by -\noun on - Lars Gullik Bjønnes -\noun default -and -\noun on -Pavel Sanda -\end_layout +\begin_layout Itemize +Space in front of labels and similar commands: +\begin_inset Newline newline +\end_inset -\begin_layout Subsection -Introduction -\end_layout +The label should stick right up to the text to avoid falling to a wrong + page. + +\begin_inset CommandInset label +LatexCommand label +name "sec:chktex" -\begin_layout Standard -\SpecialChar LyX - supports some of the most basic RCS/CVS/SVN/GIT commands. - If you need something a bit more sophisticated you will have to do that - manually in a terminal. -\end_layout +\end_inset -\begin_layout Standard -Also note that CVS support is not as good as subversion support, so we advise - using SVN instead. - A good place to start learning Subversion is the SVN Book + \begin_inset Foot status collapsed \begin_layout Plain Layout -\begin_inset CommandInset href -LatexCommand href -target "http://svnbook.red-bean.com/" -literal "false" +This footnote is in danger of falling off to a wrong page +\end_layout \end_inset - + The label is separated too much. \end_layout +\begin_layout Itemize +Space in front of references, instead of hard spaces: +\begin_inset Newline newline +\end_inset + +If you have bad luck, the text will break right between the referenced text + and reference number, and that's a pity. + See section +\begin_inset CommandInset ref +LatexCommand ref +reference "sec:chktex" + \end_inset . - In the case of RCS you should read +\end_layout + +\begin_layout Itemize +Use of \begin_inset Quotes eld \end_inset -rcsintro +x \begin_inset Quotes erd \end_inset - (a man file, read it with -\family typewriter -man rcsintro -\family default -). - This file describes all the basic features of RCS. - You should especially notice the comment about a RCS directory, and the - notion of a master RCS file (the file ending in -\family typewriter -,v -\family default -). -\end_layout + instead of +\begin_inset Formula $\times$ +\end_inset -\begin_layout Standard -Before you begin to use the version control features in \SpecialChar LyX -, you should be - familiar with RCS/CVS/SVN/GIT usage. - The implementation in \SpecialChar LyX - assumes a recent version of the GNU RCS or CVS/SVN - package — no guarantees are made for older versions. - Most of the log messages are not currently displayed after operations — - you can check them in the Messages pane if you are unsure. - Regular users of version control will appreciate the VC toolbar, which - can be enabled via -\family sans -View\SpecialChar menuseparator -Toolbars\SpecialChar menuseparator -Version -\begin_inset space ~ + between numbers: +\begin_inset Newline newline +\end_inset + +2x2 looks cheap compared to +\begin_inset Formula $2\times2$ \end_inset -Control -\family default . \end_layout \begin_layout Standard -For introducing your own external commands consult -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -vc-command -\end_layout - +and more \SpecialChar ldots + It is an invaluable tool when you are +\begin_inset Quotes eld \end_inset - in the manual -\emph on -\SpecialChar LyX - Functions -\emph default -. -\end_layout +finishing up +\begin_inset Quotes erd +\end_inset -\begin_layout Standard -It is strongly recommended to store documents in uncompressed format if - using version control (uncheck -\family sans -Document\SpecialChar menuseparator -Compressed -\family default - if it is checked): Uncompressed LyX documents are text files and therefore - for merging two different versions by version control systems. - Compressed LyX documents are binary files, which cannot be merged by version - control systems. + your document before printing, and you should run it right after the obligatory + spelling check, and before you go fine tuning the typesetting. \end_layout \begin_layout Subsection -RCS commands in \SpecialChar LyX - +How to use it \end_layout \begin_layout Standard -The following sections describe the RCS commands supported by \SpecialChar LyX -. - You can find them in the +If you have the program installed, usage is as simple as choosing \family sans -File\SpecialChar menuseparator -Version +Tools\SpecialChar menuseparator +Check \begin_inset space ~ \end_inset -Control +TeX \family default - submenu. - \SpecialChar LyX - was tested against RCS 5.7/5.8. -\end_layout - -\begin_layout Subsubsection - +. + This will make \SpecialChar LyX + generate a \SpecialChar LaTeX + file of your document, start \family sans -Register -\end_layout +Chk\SpecialChar TeX -\begin_layout Standard -If your document is not under revision control, this is the only item shown - in the menu. - And if it is under revision control, the -\family sans -Register \family default - item is not visible. - -\end_layout - -\begin_layout Standard -This command registers your document with RCS (unless you are under the - directory managed by CVS)\SpecialChar endofsentence - You are asked interactively to supply an initial - description of the document. - The document is now set in Read-Only mode and you have to -\family sans -Check -\begin_inset space ~ + to check it, and then make \SpecialChar LyX + insert +\begin_inset Quotes eld \end_inset -Out -\begin_inset space ~ +error boxes +\begin_inset Quotes erd \end_inset -For -\begin_inset space ~ -\end_inset + with the warnings from +\family sans +Chk\SpecialChar TeX + +\family default +, if there were any. + The warnings will be placed close to the point of the mistake, and you + can quickly find them by using the +\family sans +Navigate\SpecialChar menuseparator +Error +\family default + menu item, or the shortcut key +\family sans +C-g +\family default + from the default +\family typewriter +cua +\family default + bind file. + Open the error boxes by clicking on them with the mouse, or use the shortcut + key +\family sans +C-i +\family default + from +\family typewriter +cua +\family default + bindings, or the corresponding +\family sans +C-o +\family default + for the alternate +\family typewriter +emacs +\family default + bind file. + Read the warning and correct the mistake, if it is a mistake. + If you have trouble understanding what the warning is about, you can safely + ignore it. + Remember that there is a hidden layer between the document on screen and + the technical details in invoking +\family sans +Chk\SpecialChar TeX -Edit \family default -, before making any changes to it. - A document under revision control has a -\begin_inset Quotes eld -\end_inset +, and this gap can make some warnings seem arcane or just plain silly. +\end_layout -[RCS: ] -\begin_inset Quotes erd -\end_inset +\begin_layout Standard +This document is an excellent testing bed for the feature, and it should + provide quite a few warnings for you to fiddle with. + Since computers are only so smart, expect most of the warnings to be false + alarms, though. +\end_layout - item tagged to the filename in the minibuffer. +\begin_layout Subsection +How to fine tune it \end_layout \begin_layout Standard -RCS command that is run: -\end_layout +Sometimes, you'll find that +\family sans +Chk\SpecialChar TeX -\begin_layout LyX-Code +\family default + makes more noise than suits your mood. + Then you can choose not to use it, wait until your mood changes, or try + to customize +\family sans +Chk\SpecialChar TeX -\family typewriter -ci -q -u -i -t-"" +\family default + to get better along with you. \end_layout \begin_layout Standard -Read -\family typewriter -man ci +Although +\family sans +Chk\SpecialChar TeX + \family default - to understand the switches. -\end_layout - -\begin_layout Subsubsection +\emph on +is +\emph default + very configurable and extensible, you should not expect to solve all problems + with +\family sans +Chk\SpecialChar TeX +\family default + in \SpecialChar LyX + this way. + Since \SpecialChar LyX + has to generate a somewhat special \SpecialChar LaTeX + file to be able to match the + line numbers from the \family sans -Check In Changes -\end_layout +Chk\SpecialChar TeX -\begin_layout Standard -When you are finished editing a file, you check in your changes. - When you do this, you are asked for a description of the changes. - This is stored in the history log. - The version number is bumped, your changes are applied to the master RCS - file, the document is unlocked and set to Read-Only mode. -\end_layout +\family default + output +\begin_inset Foot +status collapsed -\begin_layout Itemize -RCS command: -\family typewriter -ci -q -u -m"" -\end_layout +\begin_layout Plain Layout +You can inspect the specific output from +\family sans +chktex +\family default + by using +\family sans +Document\SpecialChar menuseparator +\SpecialChar LaTeX -\begin_layout Subsubsection +\begin_inset space ~ +\end_inset +Log +\family default + right after a \family sans -Check Out For Edit +chktex +\family default + run. \end_layout -\begin_layout Standard -By doing this you lock the document so that only you can edit it. - This will also make the document Read-Write only for you. - You will usually continue editing for a while and when you are finished - you check in your changes. - The status line is changed to reflect that you have locked the file. +\end_inset + + to the internal document structure, some of the warnings will not appear + correctly. + There are two things you can do about this: \end_layout \begin_layout Itemize -RCS command: -\family typewriter -co -q -l -\end_layout +Fine tune the +\family sans +Chk\SpecialChar TeX -\begin_layout Subsubsection +\family default + invocation command line in +\begin_inset Flex Noun +status collapsed -\family sans -Revert To Repository Version +\begin_layout Plain Layout +Tools\SpecialChar menuseparator +Preferences\SpecialChar menuseparator +Output\SpecialChar menuseparator +LaTeX\SpecialChar menuseparator +CheckTeX command \end_layout -\begin_layout Standard -This will discard all changes made to the document since the last check - in. - You get a warning before changes are discarded. -\end_layout +\end_inset -\begin_layout Itemize -RCS command: +, or the global +\family sans +Chk\SpecialChar TeX + +\family default + installation configuration file (usually with the file \family typewriter -co -f -u +chktexrc +\family default +). + See below to learn what warnings can be enabled and disabled on the command + line. \end_layout -\begin_layout Subsubsection - +\begin_layout Itemize +Export your document as a raw \SpecialChar LaTeX + file using \family sans -Copy +File\SpecialChar menuseparator +Export\SpecialChar menuseparator +\SpecialChar LaTeX + +\family default + and run +\family typewriter +chktex +\family default + manually on that. + Invoked in this way, it can be a hassle to find the corresponding place + in the document inside \SpecialChar LyX +, but with a little patience, you should be able + to do it. \end_layout \begin_layout Standard -This will create a copy of the current document. - Since RCS does not support copy operations natively, the version history - is not preserved, and the copy is added as a new file. - It requires a clean document without any changes since the last checkin. - You are asked for a file name and a description of the copy operation. - After that the copy is created, both locally and in the repository. - If the parent directories of the copied and original document differ, all - relative paths of included files of the copy are adjusted (like in +Here follows the warning messages that can be enabled and disabled in \family sans -File\SpecialChar menuseparator -Save As +Preferences \family default -\SpecialChar ldots -). - Finally, the copy is loaded instead of the original document. +. + Use +\family typewriter +-n# +\family default + to disable a warning, and +\family typewriter +-w# +\family default + to enable a warning. + The emphasized entries are disabled by default, because the default is + " +\family typewriter +chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38 +\family default +". \end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -RCS -\begin_inset space ~ -\end_inset - -commands: -\begin_inset space ~ -\end_inset - - -\begin_inset Newline newline -\end_inset - -Copy -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout - +\begin_layout Standard +Notice that you should only use the options that enable and disable warnings, + because \SpecialChar LyX + relies on some of the other command line parameters to be set + in a specific way to have a chance to communicate with \family typewriter -\begin_inset Quotes qld -\end_inset - - -\begin_inset Quotes qld -\end_inset +chktex +\family default +. +\end_layout +\begin_layout Enumerate +\size small +\emph on +Command terminated with space. \end_layout -\end_inset +\begin_layout Enumerate - to -\begin_inset Flex Code -status collapsed +\size small +Non-breaking space ( +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout \family typewriter -\begin_inset Quotes qld -\end_inset +~ +\family default - -\begin_inset Quotes qld +\begin_inset Quotes erd \end_inset - +) should have been used. \end_layout -\end_inset - +\begin_layout Enumerate -\begin_inset Newline newline +\size small +\emph on +You should enclose the previous parenthesis with +\begin_inset Quotes eld \end_inset -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -ci -q -u \family typewriter --i -\begin_inset Quotes qld -\end_inset +{} +\family default - -\begin_inset Quotes qld +\begin_inset Quotes erd \end_inset - +. \end_layout +\begin_layout Enumerate + +\size small +Italic correction ( +\begin_inset Quotes eld \end_inset -\end_layout +\family typewriter -\begin_layout Subsubsection +\backslash +/ +\family default -\family sans -Undo Last Checkin -\end_layout +\begin_inset Quotes erd +\end_inset -\begin_layout Standard -This makes as if the last check in never happened. - No changes are made to the document loaded into \SpecialChar LyX -, but the last version - is removed from the master RCS file. +) found in non-italic buffer. \end_layout -\begin_layout Itemize -RCS command: -\family typewriter -rcs -o -\end_layout +\begin_layout Enumerate -\begin_layout Subsubsection +\size small +Italic correction ( +\begin_inset Quotes eld +\end_inset -\family sans -Show History -\end_layout -\begin_layout Standard -This shows the complete history of the RCS document. - The output of -\family typewriter -rlog -\family default - is shown in a browser. - See \family typewriter -man rlog -\family default - for more info. -\end_layout -\begin_layout Subsubsection -Revision info -\end_layout - -\begin_layout Standard -\SpecialChar LyX - supports RCS version number, author name, date and time of last commit. - All those are extracted from -\family typewriter -rlog -r +\backslash +/ \family default -. - See -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:VCS-Revision-Information" +\begin_inset Quotes erd \end_inset - for details. +) found more than once. \end_layout -\begin_layout Subsection -CVS commands in \SpecialChar LyX - -\end_layout +\begin_layout Enumerate -\begin_layout Standard -A subset of CVS operations is supported by \SpecialChar LyX -. - You can find the commands in the -\family sans -File\SpecialChar menuseparator -Version -\begin_inset space ~ +\size small +\emph on +No italic correction ( +\begin_inset Quotes eld \end_inset -Control + +\family typewriter + +\backslash +/ \family default - submenu. - The version control system SVN is more powerful, so please use it instead - of CVS if possible. -\end_layout -\begin_layout Subsubsection +\begin_inset Quotes erd +\end_inset -\family sans -General CVS usage +) found. \end_layout -\begin_layout Standard -If you start from scratch with CVS you have to create your repository and - checkout the working copy with external tools. - If you're using a client-server setup you may need to login before doing - the first repository checkout. -\end_layout +\begin_layout Enumerate -\begin_layout Standard -If your documents are under revision control and others are using the same - repository problems arise when different changes to the same document at - the same location happen. - Standard CVS repositories don't operate with a file locking mechanism. - This may be surprising, but conflicts only occur if people disagree on - the proper content of the same part of a document. - So, if co-workers are used to communicate regularly, these conflicts occur - rarely. - If they don't communicate they have a fundamental problem anyway. - Nevertheless some people like to work with so called +\size small +Accent command \begin_inset Quotes eld \end_inset -reserved checkouts -\begin_inset Quotes erd -\end_inset -. - If they do so the working copy of all files is readonly when checked out - first and the user starts editing after using a special command to make - the working copy writable. - When the changes are checked in the working copy returns to readonly state. - With \SpecialChar LyX - one has to edit the -\begin_inset Flex Code -status collapsed +\family typewriter +cmd +\family default -\begin_layout Plain Layout -.cvsrc -\end_layout +\begin_inset Quotes erd +\end_inset + needs use of +\begin_inset Quotes eld \end_inset - file and add the line -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -cvs -r -\end_layout +\family typewriter +cmd +\family default +\begin_inset Quotes erd \end_inset - to work with reserved checkouts. - The benefit is the possibility to see who is using a writable copy of some - document. - It's not guaranteed only one user makes a copy writable. +. \end_layout -\begin_layout Standard -\SpecialChar LyX - tries to guess if you're using reserved or non-reserved checkouts. - If your working copy is readonly or it is writable and an additional copy - of your document exists in the CVS/Base sub-directory a reserved otherwise - a non-reserved checkout is assumed. - When a reserved checkout is detected you have to use -\begin_inset Flex Noun -status collapsed +\begin_layout Enumerate -\begin_layout Plain Layout -Check Out +\size small +Wrong length of dash may have been used. \end_layout +\begin_layout Enumerate + +\size small +\emph on +\begin_inset Quotes eld \end_inset - to make your working copy writable if it's readonly. - After doing so the -\begin_inset Flex Noun -status collapsed -\begin_layout Plain Layout -Check In -\end_layout +\family typewriter +%s +\family default +\begin_inset Quotes erd \end_inset - operation is possible and that makes your working copy readonly again after - transferring your changes to the repository. -\end_layout + expected, found +\begin_inset Quotes eld +\end_inset -\begin_layout Standard -More information about CVS can be found here -\begin_inset Flex URL -status collapsed -\begin_layout Plain Layout +\family typewriter +%s +\family default -http://www.nongnu.org/cvs +\begin_inset Quotes erd +\end_inset + +. \end_layout +\begin_layout Enumerate + +\size small +Solo +\begin_inset Quotes eld \end_inset - and here -\begin_inset Flex URL -status collapsed -\begin_layout Plain Layout +\family typewriter +%s +\family default -http://ximbiot.com/cvs +\begin_inset Quotes erd +\end_inset + + found. \end_layout +\begin_layout Enumerate + +\size small +You should use +\begin_inset Quotes eld \end_inset -. -\end_layout -\begin_layout Standard -Read \family typewriter -man cvs +%s \family default - to understand the sub-commands and the switches mentioned below. -\end_layout -\begin_layout Subsubsection +\begin_inset Quotes erd +\end_inset -\family sans -Register + to achieve an ellipsis. \end_layout -\begin_layout Standard -If your document is not under revision control, this is the only item shown - in the menu. - And if it is under revision control, the -\family sans -Register -\family default - item is not visible. - -\end_layout +\begin_layout Enumerate -\begin_layout Standard -This command registers in CVS your document -\begin_inset Flex Strong -status collapsed +\size small +Inter-word spacing ( +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout -\emph on -only -\end_layout +\family typewriter -\end_inset +\backslash - in the case you have already the documents directory under CVS control - (in particular -\family typewriter -CVS/Entries \family default - file exists). - This means you have to create or checkout the archive by yourself using - external tools. - (In case you forget that step \SpecialChar LyX - registers the document with RCS.) -\end_layout + +\begin_inset Quotes eld +\end_inset -\begin_layout Standard -Then you are asked interactively to supply an initial description of the - document. - Don't forget that registered file is not yet checked in. +) should perhaps be used. \end_layout -\begin_layout Standard -CVS command that is run: -\family typewriter -cvs -q add -m"" "" -\end_layout +\begin_layout Enumerate -\begin_layout Standard -The term -\family typewriter -"" -\family default - above and for all other CVS commands is an abbreviation for +\size small +Inter-sentence spacing ( \begin_inset Quotes eld \end_inset -change the current working directory to file location and use the file name - without path component as argument + +\family typewriter + +\backslash +@ +\family default + \begin_inset Quotes erd \end_inset -. +) should perhaps be used. \end_layout -\begin_layout Subsubsection +\begin_layout Enumerate -\family sans -Check In Changes +\size small +Could not find argument for command. \end_layout -\begin_layout Standard -When you are finished editing a file, you commit your changes. - When you do this and you had changed the document, you are asked for a - description of the changes. - After that changes are written to the repository. - In case you didn't change the document and a reserved checkout is detected - the reservation made on -\begin_inset Flex Noun -status collapsed +\begin_layout Enumerate + +\size small +No match found for +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout -Check Out -\end_layout +\family typewriter +%s +\family default + +\begin_inset Quotes erd \end_inset - is undone. +. \end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -CVS -\begin_inset space ~ -\end_inset +\begin_layout Enumerate -command: -\begin_inset space ~ -\end_inset +\size small +Math mode still on at end of \SpecialChar LaTeX + file. +\end_layout +\begin_layout Enumerate -\begin_inset Newline newline +\size small +Number of +\begin_inset Quotes eld \end_inset -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -cvs \family typewriter --q commit -m"" "" -\end_layout +char +\family default +\begin_inset Quotes erd \end_inset - or -\begin_inset Newline newline + doesn't match the number of +\begin_inset Quotes eld \end_inset -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -cvs -q unedit \family typewriter -"" -\end_layout +char +\family default +\begin_inset Quotes erd \end_inset - -\end_layout - -\begin_layout Subsubsection - -\family sans -Check Out Changes +. \end_layout -\begin_layout Standard -When you are sharing a repository with others, you may have to incorporate - their changes into your working copy. -\end_layout +\begin_layout Enumerate -\begin_layout Standard -CVS command: +\size small +You should use either \family typewriter -cvs -q update "" -\end_layout -\begin_layout Standard -If a readonly checkout is detected the working copy is made writable and - reserved. -\end_layout +\begin_inset Quotes eld +\end_inset -\begin_layout Standard -CVS command: -\family typewriter -cvs -q edit "" -\end_layout -\begin_layout Subsubsection +\family default + or +\family typewriter -\family sans -Revert To Repository Version -\end_layout +\begin_inset Quotes erd +\end_inset -\begin_layout Standard -This will discard all changes made to the document since the last check - in. - You get a warning before changes are discarded. - Firstly the file is deleted, secondly CVS update command is run. -\end_layout -\begin_layout Standard -CVS command: -\family typewriter -cvs -q update "" -\end_layout +\family default + as an alternative to +\begin_inset Quotes eld +\end_inset -\begin_layout Standard -If a reserved checkout is detected and the working copy has no changes only - the reservation is undone. -\end_layout -\begin_layout Standard -CVS command: \family typewriter -cvs -q unedit "" -\end_layout +" +\family default -\begin_layout Subsubsection +\begin_inset Quotes erd +\end_inset -\family sans -Copy +. \end_layout -\begin_layout Standard -This will create a copy of the current document. - Since CVS does not support copy operations natively, the version history - is not preserved, and the copy is added as a new file. - It requires a clean document without any changes since the last checkin. - You are asked for a file name and a description of the copy operation. - After that the copy is created, both locally and in the repository. - If the parent directories of the copied and original document differ, all - relative paths of included files of the copy are adjusted (like in -\family sans -File\SpecialChar menuseparator -Save As +\begin_layout Enumerate + +\size small +You should use " +\family typewriter +' \family default -\SpecialChar ldots -). - Finally, the copy is loaded instead of the original document. +" (ASCII 39) instead of " +\family typewriter +´ +\family default +" (ASCII 180). \end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -CVS -\begin_inset space ~ -\end_inset +\begin_layout Enumerate -commands: -\begin_inset space ~ -\end_inset +\size small +User-specified pattern found. +\end_layout +\begin_layout Enumerate -\begin_inset Newline newline -\end_inset +\size small +This command might not be intended. +\end_layout -Copy -\begin_inset Flex Code -status collapsed +\begin_layout Enumerate -\begin_layout Plain Layout -"" +\size small +\emph on +Comment displayed. \end_layout -\end_inset +\begin_layout Enumerate - to -\begin_inset Flex Code -status collapsed +\size small +Either +\family typewriter +'' +\backslash +,' +\family default + or +\family typewriter +' +\backslash +,'' +\family default + will look better. +\end_layout -\begin_layout Plain Layout -"" +\begin_layout Enumerate + +\size small +Delete this space to maintain correct page references. \end_layout +\begin_layout Enumerate + +\size small +\emph on +You might wish to put this between a pair of +\begin_inset Quotes eld \end_inset -\begin_inset Newline newline +\family typewriter +{} +\family default + +\begin_inset Quotes erd \end_inset +. +\end_layout -\begin_inset Flex Code -status collapsed +\begin_layout Enumerate -\begin_layout Plain Layout -cvs -q add "" +\size small +You ought to remove spaces in front of punctuation. \end_layout -\end_inset - +\begin_layout Enumerate +\size small +Could not execute \SpecialChar LaTeX + command. \end_layout -\begin_layout Subsubsection +\begin_layout Enumerate -\family sans -Rename -\end_layout +\size small +Don't use +\family typewriter -\begin_layout Standard -This will rename the current document. - Since CVS does not support rename operations natively, the version history - is not preserved, the renamed document is added as a new file, and the - original document is deleted. - It requires a clean document without any changes since the last checkin. - You are asked for a file name and a description of the rename operation. - After that the document is renamed, both locally and in the repository. - If the parent directories of the new and old file names differ, all relative - paths of included files are adjusted (like in -\family sans -File\SpecialChar menuseparator -Save As +\backslash +/ \family default -\SpecialChar ldots -). - Finally, the document is reloaded using the new name. + in front of small punctuation. \end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -CVS -\begin_inset space ~ -\end_inset +\begin_layout Enumerate -commands: -\begin_inset space ~ -\end_inset +\family typewriter +\size small +$ +\backslash +times$ +\family default + may look prettier here. +\end_layout +\begin_layout Enumerate -\begin_inset Newline newline -\end_inset +\size small +\emph on +Multiple spaces detected in output. +\end_layout -Rename -\begin_inset Flex Code -status collapsed +\begin_layout Enumerate -\begin_layout Plain Layout -"" +\size small +This text may be ignored. \end_layout +\begin_layout Enumerate + +\size small +Use +\family typewriter + +\begin_inset Quotes eld \end_inset - to -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -"" +\family default + to begin quotation, not +\family typewriter +' +\family default +. \end_layout -\end_inset +\begin_layout Enumerate +\size small +Use +\family typewriter +' +\family default + to end quotation, not +\family typewriter -\begin_inset Newline newline +\begin_inset Quotes eld \end_inset -\begin_inset Flex Code -status collapsed +\family default +. +\end_layout -\begin_layout Plain Layout -cvs -q add "" +\begin_layout Enumerate + +\size small +Don't mix quotes. \end_layout +\begin_layout Enumerate + +\size small +You should perhaps use +\begin_inset Quotes eld \end_inset -\begin_inset Newline newline +\family typewriter +cmd +\family default + +\begin_inset Quotes erd \end_inset + instead. +\end_layout -\begin_inset Flex Code -status collapsed +\begin_layout Enumerate -\begin_layout Plain Layout -cvs -q remove "" +\size small +You should put a space in front of/after parenthesis. \end_layout -\end_inset - +\begin_layout Enumerate +\size small +You should avoid spaces in front of/after parenthesis. \end_layout -\begin_layout Subsubsection -Update of the local directory checkout from repository +\begin_layout Enumerate + +\size small +\emph on +You should not use punctuation in front of/after quotes. \end_layout -\begin_layout Standard -Once your documents gets more complex, containing sub-documents and pictures, - including external -\begin_inset Flex Code -status collapsed +\begin_layout Enumerate -\begin_layout Plain Layout -.tex +\size small +Double space found. \end_layout -\end_inset +\begin_layout Enumerate - files and so on using version control becomes more complicated. - \SpecialChar LyX - supports updating the whole tree in which resides the document. - This become especially useful once you cooperate with people which neither - have detailed knowledge about CVS usage nor they have ambition to commit - additional material to the repository. - You have to organize the files structure so that all external files are - in the same directory or subdirectories of the document. - It's good practice anyway to store multipart documents in an extra directory. +\size small +You should put punctuation outside inner/inside display math mode. \end_layout -\begin_layout Standard -The -\begin_inset Flex Code -status collapsed +\begin_layout Enumerate -\begin_layout Plain Layout -Update local directory from repository +\size small +You ought to not use primitive \SpecialChar TeX + in \SpecialChar LaTeX + code. \end_layout +\begin_layout Enumerate + +\size small +You should remove spaces in front of +\begin_inset Quotes eld +\end_inset + + +\family typewriter +%s +\family default + +\begin_inset Quotes erd \end_inset - command updates the whole directory. - If local changes are detected user is warned before update starts. - In case of merge conflicts both versions of the conflicting document parts - are placed in the final document. - You have to review and correct the result of the merge. - You'll find the conflicts enclosed in pairs of -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -<<<<<<< \end_layout +\begin_layout Enumerate + +\size small +\begin_inset Quotes eld \end_inset - and -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout ->>>>>>> -\end_layout +\family typewriter +%s +\family default +\begin_inset Quotes erd \end_inset - separated by -\begin_inset Flex Code -status collapsed + is normally not followed by +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout -======= -\end_layout +\family typewriter +%c +\family default + +\begin_inset Quotes erd \end_inset . - The first part is your version as before the update operation with the - document name prepended. - The second one is the repository version with the version number after - the sequence of -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -> \end_layout -\end_inset - - signs. +\begin_layout Standard +In later versions of \SpecialChar LyX +, we hope to provide a more complete interface to this + tool (and it's smaller cousin +\family typewriter +lacheck +\family default +) to exploit the full power of it. + But it's not exactly useless as it is now: go try it on one of your existing + documents of a certain length and be surprised. \end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -CVS -\begin_inset space ~ -\end_inset +\begin_layout Section +Version Control in \SpecialChar LyX -commands: -\begin_inset space ~ -\end_inset +\end_layout +\begin_layout Standard +by +\noun on + Lars Gullik Bjønnes +\noun default +and +\noun on +Pavel Sanda +\end_layout -\begin_inset Newline newline -\end_inset +\begin_layout Subsection +Introduction +\end_layout +\begin_layout Standard +\SpecialChar LyX + supports some of the most basic RCS/CVS/SVN/GIT commands. + If you need something a bit more sophisticated you will have to do that + manually in a terminal. +\end_layout -\begin_inset Flex Code +\begin_layout Standard +Also note that CVS support is not as good as subversion support, so we advise + using SVN instead. + A good place to start learning Subversion is the SVN Book +\begin_inset Foot status collapsed \begin_layout Plain Layout -cd $path; cvs diff -\family typewriter -"." -\end_layout +\begin_inset CommandInset href +LatexCommand href +target "http://svnbook.red-bean.com/" +literal "false" \end_inset - (Ask if changes are detected.) -\begin_inset Newline newline + +\end_layout + \end_inset +. + In the case of RCS you should read +\begin_inset Quotes eld +\end_inset -\begin_inset Flex Code -status collapsed +rcsintro +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -cd $path; cvs -q update + (a man file, read it with \family typewriter -"." +man rcsintro +\family default +). + This file describes all the basic features of RCS. + You should especially notice the comment about a RCS directory, and the + notion of a master RCS file (the file ending in +\family typewriter +,v +\family default +). \end_layout +\begin_layout Standard +Before you begin to use the version control features in \SpecialChar LyX +, you should be + familiar with RCS/CVS/SVN/GIT usage. + The implementation in \SpecialChar LyX + assumes a recent version of the GNU RCS or CVS/SVN + package — no guarantees are made for older versions. + Most of the log messages are not currently displayed after operations — + you can check them in the Messages pane if you are unsure. + Regular users of version control will appreciate the VC toolbar, which + can be enabled via +\family sans +View\SpecialChar menuseparator +Toolbars\SpecialChar menuseparator +Version +\begin_inset space ~ \end_inset - +Control +\family default +. \end_layout \begin_layout Standard -where +For introducing your own external commands consult \begin_inset Flex Code status collapsed \begin_layout Plain Layout -$path +vc-command \end_layout \end_inset - stands for the path to the document. -\end_layout - -\begin_layout Subsubsection - -\family sans -Show History -\end_layout - -\begin_layout Standard -This shows the complete history of the CVS document. - The output of -\family typewriter -cvs log "" -\family default - is shown in a browser. -\end_layout - -\begin_layout Subsubsection -Revision info + in the manual +\emph on +\SpecialChar LyX + Functions +\emph default +. \end_layout \begin_layout Standard -\SpecialChar LyX - supports CVS version number, author name, date and time of last commit. - All those are extracted from -\family typewriter -cvs log -r +It is strongly recommended to store documents in uncompressed format if + using version control (uncheck +\family sans +Document\SpecialChar menuseparator +Compressed \family default -. - See -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:VCS-Revision-Information" - -\end_inset - - for details. + if it is checked): Uncompressed LyX documents are text files and therefore + for merging two different versions by version control systems. + Compressed LyX documents are binary files, which cannot be merged by version + control systems. \end_layout \begin_layout Subsection -SVN commands in \SpecialChar LyX +RCS commands in \SpecialChar LyX \end_layout \begin_layout Standard -SVN is now partially supported by \SpecialChar LyX +The following sections describe the RCS commands supported by \SpecialChar LyX . - You can find the commands in the + You can find them in the \family sans File\SpecialChar menuseparator Version @@ -24483,29 +24535,8 @@ Version Control \family default submenu. - Please note that if you use password protected access to repository via - ssh, you will be asked in terminal window. \SpecialChar LyX - was tested against SVN 1.5, 1.6, 1.7 and 1.8 -\begin_inset Foot -status collapsed - -\begin_layout Plain Layout -Most of the commands will work with 1.4 too, see -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:SVN-Repo-Update" - -\end_inset - -. - There seems to be currently unresolved permissions problem under SVN 1.8 - with reverting changes when file is locked. -\end_layout - -\end_inset - - + was tested against RCS 5.7/5.8. \end_layout \begin_layout Subsubsection @@ -24522,44 +24553,59 @@ If your document is not under revision control, this is the only item shown Register \family default item is not visible. + \end_layout -\begin_layout Standard -This command registers in SVN your document ONLY in case you have already - the documents directory under SVN control (in particular -\family typewriter -.svn/entries +\begin_layout Standard +This command registers your document with RCS (unless you are under the + directory managed by CVS)\SpecialChar endofsentence + You are asked interactively to supply an initial + description of the document. + The document is now set in Read-Only mode and you have to +\family sans +Check +\begin_inset space ~ +\end_inset + +Out +\begin_inset space ~ +\end_inset + +For +\begin_inset space ~ +\end_inset + +Edit \family default - file exists). - This means you have to checkout the archive by yourself. -\end_layout +, before making any changes to it. + A document under revision control has a +\begin_inset Quotes eld +\end_inset -\begin_layout Standard -Then you are asked interactively to supply an initial description of the - document. - Don't forget that registered file is not yet commited. +[RCS: ] +\begin_inset Quotes erd +\end_inset + + item tagged to the filename in the minibuffer. \end_layout \begin_layout Standard -SVN command that is run: -\family typewriter -svn add -q -\begin_inset Quotes qld -\end_inset - - -\begin_inset Quotes qld -\end_inset +RCS command that is run: +\end_layout +\begin_layout LyX-Code +\family typewriter +ci -q -u -i -t-"" \end_layout \begin_layout Standard Read \family typewriter -man svn +man ci \family default to understand the switches. + \end_layout \begin_layout Subsubsection @@ -24569,33 +24615,17 @@ Check In Changes \end_layout \begin_layout Standard -When you are finished editing a file, you commit your changes. +When you are finished editing a file, you check in your changes. When you do this, you are asked for a description of the changes. - After that changes are commited. -\end_layout - -\begin_layout Standard -SVN command: -\begin_inset Foot -status collapsed - -\begin_layout Plain Layout -In case locking is not enabled. - See Section -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:SVN-File-Locking" - -\end_inset - -. + This is stored in the history log. + The version number is bumped, your changes are applied to the master RCS + file, the document is unlocked and set to Read-Only mode. \end_layout -\end_inset - - +\begin_layout Itemize +RCS command: \family typewriter -svn commit -q -m"" +ci -q -u -m"" \end_layout \begin_layout Subsubsection @@ -24605,33 +24635,17 @@ Check Out For Edit \end_layout \begin_layout Standard -Updates the changes of this file from the repository. - Be sure you understand SVN merging and conflicts resolving before using - this function, because all conflicts has to be resolved manually by you! -\end_layout - -\begin_layout Standard -SVN command: -\begin_inset Foot -status collapsed - -\begin_layout Plain Layout -Ditto. +By doing this you lock the document so that only you can edit it. + This will also make the document Read-Write only for you. + You will usually continue editing for a while and when you are finished + you check in your changes. + The status line is changed to reflect that you have locked the file. \end_layout -\end_inset - - +\begin_layout Itemize +RCS command: \family typewriter -svn update --non-interactive -\begin_inset Quotes qld -\end_inset - - -\begin_inset Quotes qld -\end_inset - - +co -q -l \end_layout \begin_layout Subsubsection @@ -24646,18 +24660,10 @@ This will discard all changes made to the document since the last check You get a warning before changes are discarded. \end_layout -\begin_layout Standard -SVN command: +\begin_layout Itemize +RCS command: \family typewriter -svn revert -q -\begin_inset Quotes qld -\end_inset - - -\begin_inset Quotes qld -\end_inset - - +co -f -u \end_layout \begin_layout Subsubsection @@ -24667,7 +24673,9 @@ Copy \end_layout \begin_layout Standard -This will create a copy of the current document including the version history. +This will create a copy of the current document. + Since RCS does not support copy operations natively, the version history + is not preserved, and the copy is added as a new file. It requires a clean document without any changes since the last checkin. You are asked for a file name and a description of the copy operation. After that the copy is created, both locally and in the repository. @@ -24684,7 +24692,7 @@ Save As \begin_layout Labeling \labelwidthstring 00.00.0000 -SVN +RCS \begin_inset space ~ \end_inset @@ -24696,14 +24704,13 @@ commands: \begin_inset Newline newline \end_inset - +Copy \begin_inset Flex Code status collapsed \begin_layout Plain Layout -svn copy -q -\family typewriter +\family typewriter \begin_inset Quotes qld \end_inset @@ -24711,7 +24718,18 @@ svn copy -q \begin_inset Quotes qld \end_inset - + +\end_layout + +\end_inset + + to +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\family typewriter \begin_inset Quotes qld \end_inset @@ -24733,7 +24751,17 @@ svn copy -q status collapsed \begin_layout Plain Layout -svn commit +ci -q -u +\family typewriter +-i +\begin_inset Quotes qld +\end_inset + + +\begin_inset Quotes qld +\end_inset + + \end_layout \end_inset @@ -24744,286 +24772,348 @@ svn commit \begin_layout Subsubsection \family sans -Rename +Undo Last Checkin \end_layout \begin_layout Standard -This will rename the current document including the version history. - It requires a clean document without any changes since the last checkin. - You are asked for a file name and a description of the rename operation. - After that the document is renamed, both locally and in the repository. - If the parent directories of the new and old file names differ, all relative - paths of included files are adjusted (like in -\family sans -File\SpecialChar menuseparator -Save As -\family default -\SpecialChar ldots -). - Finally, the document is reloaded using the new name. +This makes as if the last check in never happened. + No changes are made to the document loaded into \SpecialChar LyX +, but the last version + is removed from the master RCS file. \end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -SVN -\begin_inset space ~ -\end_inset - -commands: -\begin_inset space ~ -\end_inset +\begin_layout Itemize +RCS command: +\family typewriter +rcs -o +\end_layout +\begin_layout Subsubsection -\begin_inset Newline newline -\end_inset +\family sans +Show History +\end_layout +\begin_layout Standard +This shows the complete history of the RCS document. + The output of +\family typewriter +rlog +\family default + is shown in a browser. + See +\family typewriter +man rlog +\family default + for more info. +\end_layout -\begin_inset Flex Code -status collapsed +\begin_layout Subsubsection +Revision info +\end_layout -\begin_layout Plain Layout -svn move -q +\begin_layout Standard +\SpecialChar LyX + supports RCS version number, author name, date and time of last commit. + All those are extracted from \family typewriter +rlog -r +\family default +. + See +\begin_inset CommandInset ref +LatexCommand ref +reference "subsec:VCS-Revision-Information" -\begin_inset Quotes qld \end_inset - -\begin_inset Quotes qld -\end_inset + for details. +\end_layout - -\begin_inset Quotes qld -\end_inset +\begin_layout Subsection +CVS commands in \SpecialChar LyX - -\begin_inset Quotes qld +\end_layout + +\begin_layout Standard +A subset of CVS operations is supported by \SpecialChar LyX +. + You can find the commands in the +\family sans +File\SpecialChar menuseparator +Version +\begin_inset space ~ \end_inset +Control +\family default + submenu. + The version control system SVN is more powerful, so please use it instead + of CVS if possible. +\end_layout + +\begin_layout Subsubsection + +\family sans +General CVS usage +\end_layout +\begin_layout Standard +If you start from scratch with CVS you have to create your repository and + checkout the working copy with external tools. + If you're using a client-server setup you may need to login before doing + the first repository checkout. \end_layout +\begin_layout Standard +If your documents are under revision control and others are using the same + repository problems arise when different changes to the same document at + the same location happen. + Standard CVS repositories don't operate with a file locking mechanism. + This may be surprising, but conflicts only occur if people disagree on + the proper content of the same part of a document. + So, if co-workers are used to communicate regularly, these conflicts occur + rarely. + If they don't communicate they have a fundamental problem anyway. + Nevertheless some people like to work with so called +\begin_inset Quotes eld \end_inset - -\begin_inset Newline newline +reserved checkouts +\begin_inset Quotes erd \end_inset - +. + If they do so the working copy of all files is readonly when checked out + first and the user starts editing after using a special command to make + the working copy writable. + When the changes are checked in the working copy returns to readonly state. + With \SpecialChar LyX + one has to edit the \begin_inset Flex Code status collapsed \begin_layout Plain Layout -svn commit -\end_layout - -\end_inset - - +.cvsrc \end_layout -\begin_layout Subsubsection -\begin_inset CommandInset label -LatexCommand label -name "subsec:SVN-Repo-Update" - \end_inset -Update of the local directory checkout from repository -\begin_inset Foot + file and add the line +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Note that this command will work only with subversion -\begin_inset Formula $\geqq1.5$ -\end_inset - - +cvs -r \end_layout \end_inset - + to work with reserved checkouts. + The benefit is the possibility to see who is using a writable copy of some + document. + It's not guaranteed only one user makes a copy writable. \end_layout \begin_layout Standard -All the commands above have one shortcoming – they deal with the current - document only. - Once your document contains pictures, includes external -\begin_inset Flex Code +\SpecialChar LyX + tries to guess if you're using reserved or non-reserved checkouts. + If your working copy is readonly or it is writable and an additional copy + of your document exists in the CVS/Base sub-directory a reserved otherwise + a non-reserved checkout is assumed. + When a reserved checkout is detected you have to use +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout -.tex +Check Out \end_layout \end_inset - files and so on administration becomes more complicated. - \SpecialChar LyX - now supports updating the whole tree in which resides the document -\begin_inset Foot + to make your working copy writable if it's readonly. + After doing so the +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout -One need to organize the files structure so that all external files are - in the same directory or subdirectories of the document. - +Check In \end_layout \end_inset -. - This become especially useful once you cooperate with people which neither - know about subversion management nor they have ambition to commit additional - material to the repository. - + operation is possible and that makes your working copy readonly again after + transferring your changes to the repository. \end_layout \begin_layout Standard -\begin_inset Flex Code +More information about CVS can be found here +\begin_inset Flex URL status collapsed \begin_layout Plain Layout -Update local directory from repository -\end_layout - -\end_inset - command updates the whole directory and in case of merge conflicts local - version of the files are left, so no unintended data loss occurs. - If local changes are detected user is warned before update starts. +http://www.nongnu.org/cvs \end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -SVN -\begin_inset space ~ -\end_inset - -commands: -\begin_inset space ~ -\end_inset - - -\begin_inset Newline newline \end_inset - -\begin_inset Flex Code + and here +\begin_inset Flex URL status collapsed \begin_layout Plain Layout -svn diff $path -\end_layout -\end_inset +http://ximbiot.com/cvs +\end_layout - (Ask if changes are detected.) -\begin_inset Newline newline \end_inset +. +\end_layout -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -svn update --accept mine-full $path +\begin_layout Standard +Read +\family typewriter +man cvs +\family default + to understand the sub-commands and the switches mentioned below. \end_layout -\end_inset +\begin_layout Subsubsection +\family sans +Register +\end_layout +\begin_layout Standard +If your document is not under revision control, this is the only item shown + in the menu. + And if it is under revision control, the +\family sans +Register +\family default + item is not visible. + \end_layout \begin_layout Standard -where -\begin_inset Flex Code +This command registers in CVS your document +\begin_inset Flex Strong status collapsed \begin_layout Plain Layout -$path + +\emph on +only \end_layout \end_inset - stands for the path to the document. + in the case you have already the documents directory under CVS control + (in particular +\family typewriter +CVS/Entries +\family default + file exists). + This means you have to create or checkout the archive by yourself using + external tools. + (In case you forget that step \SpecialChar LyX + registers the document with RCS.) \end_layout -\begin_layout Subsubsection +\begin_layout Standard +Then you are asked interactively to supply an initial description of the + document. + Don't forget that registered file is not yet checked in. +\end_layout -\family sans -Show History +\begin_layout Standard +CVS command that is run: +\family typewriter +cvs -q add -m"" "" \end_layout \begin_layout Standard -This shows the complete history of the SVN document. - The output of +The term \family typewriter -svn log -\begin_inset Quotes qld +"" +\family default + above and for all other CVS commands is an abbreviation for +\begin_inset Quotes eld \end_inset - -\begin_inset Quotes qld +change the current working directory to file location and use the file name + without path component as argument +\begin_inset Quotes erd \end_inset - -\family default - is shown in a browser. +. \end_layout \begin_layout Subsubsection -File Locking -\begin_inset CommandInset label -LatexCommand label -name "subsec:SVN-File-Locking" -\end_inset +\family sans +Check In Changes +\end_layout +\begin_layout Standard +When you are finished editing a file, you commit your changes. + When you do this and you had changed the document, you are asked for a + description of the changes. + After that changes are written to the repository. + In case you didn't change the document and a reserved checkout is detected + the reservation made on +\begin_inset Flex Noun +status collapsed +\begin_layout Plain Layout +Check Out \end_layout -\begin_layout Standard -The file exchange through various revision control systems brings the problem - of merge conflicts in case two different users try to edit the same (parts - of) document. - When such a conflict happens it needs manual resolving and one reasonable - alternative is to provide some kind of locking mechanism, which guarantees - that only one user is allowed to edit file at the given time. +\end_inset + + is undone. \end_layout -\begin_layout Standard -SVN has two such mechanisms to provide mutual exclusivity for file access - – locks and automatic setting of write permissions (see sec. - -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:Automatical-Locking-Property" +\begin_layout Labeling +\labelwidthstring 00.00.0000 +CVS +\begin_inset space ~ +\end_inset +command: +\begin_inset space ~ \end_inset -) based on + +\begin_inset Newline newline +\end_inset + + \begin_inset Flex Code status collapsed \begin_layout Plain Layout -svn:needs-lock +cvs +\family typewriter +-q commit -m"" "" \end_layout \end_inset - file svn property -\begin_inset Foot -status collapsed + or +\begin_inset Newline newline +\end_inset + -\begin_layout Plain Layout -\begin_inset Flex URL -status open +\begin_inset Flex Code +status collapsed \begin_layout Plain Layout - -http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html +cvs -q unedit +\family typewriter +"" \end_layout \end_inset @@ -25031,971 +25121,879 @@ http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html \end_layout -\end_inset +\begin_layout Subsubsection -. - If this property is detected for a given document \SpecialChar LyX - starts to use SVN locks - for document editing automatically and the whole check-in/out mechanism - switches to the same regimen as for RCS. - This in particular means there are two different modes of file use in \SpecialChar LyX -: +\family sans +Check Out Changes \end_layout -\begin_layout Itemize -Unlocked state. - The loaded file is in the read-only mode. - For editing on needs to check-out. - -\emph on -Check-out -\emph default - consists of updating from the repository and gaining write lock. - If the lock is not possible to obtain, we remain in unlocked state. +\begin_layout Standard +When you are sharing a repository with others, you may have to incorporate + their changes into your working copy. \end_layout -\begin_layout Itemize -Locked state. - The loaded file is in the -\begin_inset Quotes els -\end_inset - -normal -\begin_inset Quotes ers -\end_inset +\begin_layout Standard +CVS command: +\family typewriter +cvs -q update "" +\end_layout - edit mode. - No other user is allowed to edit the file. - -\emph on -Check-in -\emph default - consists of commiting changes and releasing write-lock. - If no changes have been made to the document, no commit will be produced -\begin_inset Foot -status collapsed +\begin_layout Standard +If a readonly checkout is detected the working copy is made writable and + reserved. +\end_layout -\begin_layout Plain Layout -Don't be puzzled by the fact that you will be asked for commit message anyway. +\begin_layout Standard +CVS command: +\family typewriter +cvs -q edit "" \end_layout -\end_inset +\begin_layout Subsubsection - and only the write-lock will be released. +\family sans +Revert To Repository Version \end_layout \begin_layout Standard -SVN commands: +This will discard all changes made to the document since the last check + in. + You get a warning before changes are discarded. + Firstly the file is deleted, secondly CVS update command is run. \end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -Check-in: +\begin_layout Standard +CVS command: \family typewriter - svn commit -q -m"" "" -\begin_inset Newline newline -\end_inset +cvs -q update "" +\end_layout -svn unlock "" +\begin_layout Standard +If a reserved checkout is detected and the working copy has no changes only + the reservation is undone. \end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -Check-out: +\begin_layout Standard +CVS command: \family typewriter -svn update "" -\begin_inset Newline newline -\end_inset - -svn lock "" +cvs -q unedit "" \end_layout \begin_layout Subsubsection -\family typewriter -\begin_inset CommandInset label -LatexCommand label -name "subsec:Automatical-Locking-Property" - -\end_inset - - -\family default -Automatic Locking Property +\family sans +Copy \end_layout \begin_layout Standard -The above mentioned automatic setting of write permissions of the .lyx file - can be set through +This will create a copy of the current document. + Since CVS does not support copy operations natively, the version history + is not preserved, and the copy is added as a new file. + It requires a clean document without any changes since the last checkin. + You are asked for a file name and a description of the copy operation. + After that the copy is created, both locally and in the repository. + If the parent directories of the copied and original document differ, all + relative paths of included files of the copy are adjusted (like in \family sans - File\SpecialChar menuseparator -Version -\begin_inset space ~ -\end_inset - -Control\SpecialChar menuseparator -Use Locking Property +File\SpecialChar menuseparator +Save As \family default -. - This command is active only when the file is not locked on the svn server - (i.e. - you need to check-out before proceeding). +\SpecialChar ldots +). + Finally, the copy is loaded instead of the original document. \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 -SVN +CVS \begin_inset space ~ \end_inset -commands: -\end_layout - -\begin_layout Labeling -\labelwidthstring 00.00.0000 -Set: -\family typewriter - svn propset svn:needs-lock ON "" -\end_layout - -\begin_layout Labeling -\labelwidthstring 00.00.0000 -Unset: -\family typewriter -svn propdel svn:needs-lock "" -\end_layout +commands: +\begin_inset space ~ +\end_inset -\begin_layout Subsubsection -\begin_inset CommandInset label -LatexCommand label -name "subsec:VCS-Revision-Information" +\begin_inset Newline newline \end_inset -Revision Information in Documents -\end_layout +Copy +\begin_inset Flex Code +status collapsed -\begin_layout Standard -There are more possibilities how to activate revision information in our - document. +\begin_layout Plain Layout +"" \end_layout -\begin_layout Itemize -\SpecialChar LyX - supports directly: -\end_layout +\end_inset -\begin_deeper -\begin_layout Itemize -tree revision information ( + to \begin_inset Flex Code status collapsed \begin_layout Plain Layout -vcs-tree-revision +"" \end_layout \end_inset -). - The result is the output of the + +\begin_inset Newline newline +\end_inset + + \begin_inset Flex Code status collapsed \begin_layout Plain Layout -svnversion +cvs -q add "" \end_layout \end_inset - command, the following table gives you an idea, how to read the results. + \end_layout -\begin_layout Standard -\align center -\begin_inset Tabular - - - - - - -\begin_inset Text +\begin_layout Subsubsection -\begin_layout Plain Layout +\family sans +Rename +\end_layout -\series bold -Output +\begin_layout Standard +This will rename the current document. + Since CVS does not support rename operations natively, the version history + is not preserved, the renamed document is added as a new file, and the + original document is deleted. + It requires a clean document without any changes since the last checkin. + You are asked for a file name and a description of the rename operation. + After that the document is renamed, both locally and in the repository. + If the parent directories of the new and old file names differ, all relative + paths of included files are adjusted (like in +\family sans +File\SpecialChar menuseparator +Save As +\family default +\SpecialChar ldots +). + Finally, the document is reloaded using the new name. \end_layout +\begin_layout Labeling +\labelwidthstring 00.00.0000 +CVS +\begin_inset space ~ \end_inset - - -\begin_inset Text -\begin_layout Plain Layout +commands: +\begin_inset space ~ +\end_inset -\series bold -Meaning -\end_layout -\end_inset - - - - -\begin_inset Text +\begin_inset Newline newline +\end_inset + +Rename +\begin_inset Flex Code +status collapsed \begin_layout Plain Layout -4123:4168 +"" \end_layout \end_inset - - -\begin_inset Text + + to +\begin_inset Flex Code +status collapsed \begin_layout Plain Layout -mixed revision working copy +"" \end_layout \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout -4168M -\end_layout +\begin_inset Newline newline \end_inset - - -\begin_inset Text + + +\begin_inset Flex Code +status collapsed \begin_layout Plain Layout -modified working copy +cvs -q add "" \end_layout \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout -4123S -\end_layout +\begin_inset Newline newline \end_inset - - -\begin_inset Text + + +\begin_inset Flex Code +status collapsed \begin_layout Plain Layout -switched working copy +cvs -q remove "" \end_layout \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout -4123P + \end_layout -\end_inset - - -\begin_inset Text +\begin_layout Subsubsection +Update of the local directory checkout from repository +\end_layout + +\begin_layout Standard +Once your documents gets more complex, containing sub-documents and pictures, + including external +\begin_inset Flex Code +status collapsed \begin_layout Plain Layout -partial working copy, from a sparse checkout +.tex \end_layout \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout -4123:4168MS + files and so on using version control becomes more complicated. + \SpecialChar LyX + supports updating the whole tree in which resides the document. + This become especially useful once you cooperate with people which neither + have detailed knowledge about CVS usage nor they have ambition to commit + additional material to the repository. + You have to organize the files structure so that all external files are + in the same directory or subdirectories of the document. + It's good practice anyway to store multipart documents in an extra directory. \end_layout -\end_inset - - -\begin_inset Text +\begin_layout Standard +The +\begin_inset Flex Code +status collapsed \begin_layout Plain Layout -mixed revision, modified, switched working copy +Update local directory from repository \end_layout -\end_inset - - - - \end_inset + command updates the whole directory. + If local changes are detected user is warned before update starts. + In case of merge conflicts both versions of the conflicting document parts + are placed in the final document. + You have to review and correct the result of the merge. + You'll find the conflicts enclosed in pairs of +\begin_inset Flex Code +status collapsed +\begin_layout Plain Layout +<<<<<<< \end_layout -\begin_layout Itemize -file revision information. - The result comes from parsing the output of +\end_inset + + and \begin_inset Flex Code status collapsed \begin_layout Plain Layout -svn -\begin_inset space ~ -\end_inset +>>>>>>> +\end_layout -info -\begin_inset space ~ \end_inset ---xml -\begin_inset space ~ -\end_inset + separated by +\begin_inset Flex Code +status collapsed -file.lyx +\begin_layout Plain Layout +======= \end_layout \end_inset . - Supported flags are: -\end_layout - -\begin_deeper -\begin_layout Itemize -version number of the last commit ( + The first part is your version as before the update operation with the + document name prepended. + The second one is the repository version with the version number after + the sequence of \begin_inset Flex Code status collapsed \begin_layout Plain Layout -vcs-revision +> \end_layout \end_inset -) + signs. \end_layout -\begin_layout Itemize -author of the last commit ( -\begin_inset Flex Code -status collapsed +\begin_layout Labeling +\labelwidthstring 00.00.0000 +CVS +\begin_inset space ~ +\end_inset -\begin_layout Plain Layout -vcs-author -\end_layout +commands: +\begin_inset space ~ +\end_inset + +\begin_inset Newline newline \end_inset -) -\end_layout -\begin_layout Itemize -date of the last commit ( \begin_inset Flex Code status collapsed \begin_layout Plain Layout -vcs-date +cd $path; cvs diff +\family typewriter +"." \end_layout \end_inset -) -\end_layout + (Ask if changes are detected.) +\begin_inset Newline newline +\end_inset + -\begin_layout Itemize -time of the last commit ( \begin_inset Flex Code status collapsed \begin_layout Plain Layout -vcs-time +cd $path; cvs -q update +\family typewriter +"." \end_layout \end_inset -) + \end_layout -\end_deeper \begin_layout Standard -You can obtain this info via InsetInfo ( -\change_inserted 5863208 1564400022 - -\lang american -Insert\SpecialChar menuseparator -Field\SpecialChar menuseparator -Version Control Revision -\change_deleted 5863208 1564399852 - -\lang english -e.g. - +where \begin_inset Flex Code status collapsed \begin_layout Plain Layout -info-insert buffer vcs-date +$path \end_layout \end_inset + stands for the path to the document. +\end_layout -\change_unchanged -). - The information will be available only when you have the file stored under - svn managment (i.e. - the -\begin_inset Flex Code -status collapsed +\begin_layout Subsubsection -\begin_layout Plain Layout -.svn +\family sans +Show History \end_layout -\end_inset +\begin_layout Standard +This shows the complete history of the CVS document. + The output of +\family typewriter +cvs log "" +\family default + is shown in a browser. +\end_layout - directory is available with your document). +\begin_layout Subsubsection +Revision info \end_layout -\end_deeper -\begin_layout Itemize -Another—a hacking one—possibility is to use svn keywords -\begin_inset Foot -status collapsed +\begin_layout Standard +\SpecialChar LyX + supports CVS version number, author name, date and time of last commit. + All those are extracted from +\family typewriter +cvs log -r +\family default +. + See +\begin_inset CommandInset ref +LatexCommand ref +reference "subsec:VCS-Revision-Information" -\begin_layout Plain Layout -http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html +\end_inset + + for details. \end_layout -\end_inset +\begin_layout Subsection +SVN commands in \SpecialChar LyX + +\end_layout +\begin_layout Standard +SVN is now partially supported by \SpecialChar LyX . - In short – you set file keywords property (e.g. - + You can find the commands in the \family sans -svn propset svn:keywords 'Rev' file.lyx +File\SpecialChar menuseparator +Version +\begin_inset space ~ +\end_inset + +Control \family default -) and then paste keyword \SpecialChar TeX - code + submenu. + Please note that if you use password protected access to repository via + ssh, you will be asked in terminal window. + \SpecialChar LyX + was tested against SVN 1.5, 1.6, 1.7 and 1.8 \begin_inset Foot status collapsed \begin_layout Plain Layout -This is an easy way how to ensure that \SpecialChar LyX - won't break the line in the middle - of keyword tag. -\end_layout +Most of the commands will work with 1.4 too, see +\begin_inset CommandInset ref +LatexCommand ref +reference "subsec:SVN-Repo-Update" \end_inset - tag in your document (e.g. - -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -$Rev$ +. + There seems to be currently unresolved permissions problem under SVN 1.8 + with reverting changes when file is locked. \end_layout \end_inset -). - This way svn client will automatically substitute revision number (e.g. - -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -$Rev: 59 $ \end_layout -\end_inset - -) after each update and commit. - There are more problems with this approach. - Firstly, the '$' character is used in \SpecialChar TeX - world for math equations, so any - occurence of math formula -\begin_inset Formula $Rev$ -\end_inset - - become -\begin_inset Formula $Rev:59$ -\end_inset +\begin_layout Subsubsection - in your \SpecialChar LyX - document. - Similarly for other keywords like Id, Date, Author, etc. - Secondly svn output is dependent on your locales, so its very easy that - svn would produce some problematic strings once Date is used. - Thirdly you get the whole 'Rev: 59' string in your document instead of - the plain number. - Until subversion implements user's custom keywords it will be hard to use - this approach reliably or let \SpecialChar LyX - to support it directly. +\family sans +Register \end_layout -\begin_layout Subsection -SVN and Windows Environment +\begin_layout Standard +If your document is not under revision control, this is the only item shown + in the menu. + And if it is under revision control, the +\family sans +Register +\family default + item is not visible. \end_layout -\begin_layout Quote -My inclination is to say that if the user cannot figure out the command - line operations on their own fairly quickly, they would be well advised - to use TortoiseSVN. - —P. - A. - Rubin +\begin_layout Standard +This command registers in SVN your document ONLY in case you have already + the documents directory under SVN control (in particular +\family typewriter +.svn/entries +\family default + file exists). + This means you have to checkout the archive by yourself. \end_layout -\begin_layout Subsubsection -Preparation +\begin_layout Standard +Then you are asked interactively to supply an initial description of the + document. + Don't forget that registered file is not yet commited. \end_layout \begin_layout Standard -In addition to installing \SpecialChar LyX -, and having access to a Subversion repository, - the user will need to install the Subversion client program. - A Windows installer for the client program is available from -\begin_inset CommandInset href -LatexCommand href -name "CollabNet" -target "http://www.collab.net/nonav/downloads/subversion/" -literal "false" +SVN command that is run: +\family typewriter +svn add -q +\begin_inset Quotes qld +\end_inset + +\begin_inset Quotes qld \end_inset -. - The user may also want to install -\begin_inset CommandInset href -LatexCommand href -name "TortoiseSVN" -target "http://tortoisesvn.tigris.org/" -literal "false" -\end_inset +\end_layout -, which integrates Subversion operations into the context (rightclick) menu - of Windows Explorer. - Operations done outside \SpecialChar LyX - will typically be more convenient using the Explorer - context menu. - Note that TortoiseSVN is not a replacement for the client program, which - is what \SpecialChar LyX - itself will use. +\begin_layout Standard +Read +\family typewriter +man svn +\family default + to understand the switches. \end_layout \begin_layout Subsubsection -Bringing a document under Subversion control + +\family sans +Check In Changes \end_layout \begin_layout Standard -Before a \SpecialChar LyX - document can be brought under version control in Subversion, its - parent directory needs to be under version control. - If the document is being added to a project already in the repository, - this is accomplished by checking the project out to the directory where - the new document will be placed. - If the project itself is not yet under version control (for instance, if - this document starts a new project), the directory must be imported into - the repository. - This is done outside \SpecialChar LyX -. - Both import and checkout are easily accomplished from the Explorer context - menu using TortoiseSVN, or alternatively can be done using the command - line client at a DOS prompt. - The procedure for importing the project using TortoiseSVN is described - below, assuming an existing repository and a new project being started - in -\family typewriter -C: -\backslash -new project -\family default +When you are finished editing a file, you commit your changes. + When you do this, you are asked for a description of the changes. + After that changes are commited. +\end_layout + +\begin_layout Standard +SVN command: +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout +In case locking is not enabled. + See Section +\begin_inset CommandInset ref +LatexCommand ref +reference "subsec:SVN-File-Locking" + +\end_inset + . - For information on using the Subversion client program, run -\family typewriter -svn --help -\family default -in a DOS shell. \end_layout -\begin_layout Enumerate -Locate +\end_inset + + \family typewriter -C: -\backslash -new project -\family default -in Windows Explorer, right click it, and select -\family sans -TortoiseSVN\SpecialChar menuseparator -Repo-browser -\family default -. - If necessary, adjust the URL for the repository, then click OK. +svn commit -q -m"" \end_layout -\begin_layout Enumerate -Right click the level of the repository under which you want to place the - new project folder (typically the top level) and click +\begin_layout Subsubsection + \family sans -Create folder -\family default - Supply a name for the project folder and click OK. - Add a message for the log file if desired, then click OK again. - The new project folder should appear in the repository. - Finally, click OK again to exit the repository browser. +Check Out For Edit \end_layout -\begin_layout Enumerate -Once again right click -\family typewriter -C: -\backslash -new project -\family default -, this time selecting SVN Checkout\SpecialChar ldots - Select the URL of the project folder - you just created in the repository, and set the checkout directory to -\family typewriter -C: -\backslash -new project. - -\family default - Click OK. - You will be warned about a non-empty folder; click OK to proceed. - You should now have a -\family typewriter -.svn -\family default - directory under -\family typewriter -C: -\backslash -new project. +\begin_layout Standard +Updates the changes of this file from the repository. + Be sure you understand SVN merging and conflicts resolving before using + this function, because all conflicts has to be resolved manually by you! +\end_layout + +\begin_layout Standard +SVN command: +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout +Ditto. \end_layout -\begin_layout Enumerate -Create or open your document in \SpecialChar LyX - and click -\family sans -File\SpecialChar menuseparator -Version -\begin_inset space ~ \end_inset -Control\SpecialChar menuseparator -Register. -\family default -Add a log message and click OK to commit the document to version control. -\end_layout +\family typewriter +svn update --non-interactive +\begin_inset Quotes qld +\end_inset -\begin_layout Standard -From this point onward, you should have full functionality in the -\family sans -File\SpecialChar menuseparator -Version -\begin_inset space ~ + +\begin_inset Quotes qld \end_inset -Control -\family default - menu. - You also have the option of checking the document in and out, viewing its - history, etc. - using the TortoiseSVN context menu in Windows Explorer or the Subversion - client program from a command prompt. + \end_layout \begin_layout Subsubsection -SSH tunnel used with SVN under Windows + +\family sans +Revert To Repository Version \end_layout \begin_layout Standard -Compared with Linux setting up an svn client to communicate over ssh under - Windows is a rather troublesome task. - We will at least offer some hints how to setup the client side but prior - knowledge about ssh and the Windows command line is needed, also be prepared - for a great deal of frustration\SpecialChar ldots - +This will discard all changes made to the document since the last check + in. + You get a warning before changes are discarded. \end_layout -\begin_layout Enumerate -Get an svn client for windows, as described in the previous sections. - When it is a fresh install run some svn command (e.g. - -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -svn --version -\end_layout +\begin_layout Standard +SVN command: +\family typewriter +svn revert -q +\begin_inset Quotes qld +\end_inset + +\begin_inset Quotes qld \end_inset -) to create config files, which you will need to change later on. -\end_layout -\begin_layout Enumerate -Choose an ssh client for Windows. - There are several possibilities, we will use the one from Putty tools -\begin_inset Foot -status collapsed +\end_layout -\begin_layout Plain Layout -\begin_inset Flex URL -status collapsed +\begin_layout Subsubsection -\begin_layout Plain Layout +\family sans +Copy +\end_layout -http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html +\begin_layout Standard +This will create a copy of the current document including the version history. + It requires a clean document without any changes since the last checkin. + You are asked for a file name and a description of the copy operation. + After that the copy is created, both locally and in the repository. + If the parent directories of the copied and original document differ, all + relative paths of included files of the copy are adjusted (like in +\family sans +File\SpecialChar menuseparator +Save As +\family default +\SpecialChar ldots +). + Finally, the copy is loaded instead of the original document. \end_layout +\begin_layout Labeling +\labelwidthstring 00.00.0000 +SVN +\begin_inset space ~ \end_inset +commands: +\begin_inset space ~ +\end_inset -\end_layout +\begin_inset Newline newline \end_inset -. - You will need to set the connection up so that the client doesn't ask for - any password from you. - To keep things easy we will use only keys without any additional password - protection etc. -\end_layout -\begin_deeper -\begin_layout Enumerate -Generate keys by \begin_inset Flex Code status collapsed \begin_layout Plain Layout -puttygen -\end_layout +svn copy -q +\family typewriter +\begin_inset Quotes qld \end_inset -. - Save your private .ppk key file and put the public one on the server side. - If the SVN server runs on Linux, note that the format of the public key - is not compatible with Linux openssh and you will need to direcly copy-paste - the key from the -\begin_inset Quotes eld + +\begin_inset Quotes qld \end_inset + +\begin_inset Quotes qld +\end_inset -\emph on -Public key for pasting into OpenSSH authorized_keys file -\emph default -: -\begin_inset Quotes erd + +\begin_inset Quotes qld \end_inset - edit field into the server's -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -~/.ssh/authorized_keys \end_layout \end_inset - / + +\begin_inset Newline newline +\end_inset + + \begin_inset Flex Code status collapsed \begin_layout Plain Layout -authorized_keys2 +svn commit \end_layout \end_inset - file. + \end_layout -\begin_layout Enumerate -Get the Putty's -\begin_inset Flex Code -status collapsed +\begin_layout Subsubsection -\begin_layout Plain Layout -plink +\family sans +Rename +\end_layout + +\begin_layout Standard +This will rename the current document including the version history. + It requires a clean document without any changes since the last checkin. + You are asked for a file name and a description of the rename operation. + After that the document is renamed, both locally and in the repository. + If the parent directories of the new and old file names differ, all relative + paths of included files are adjusted (like in +\family sans +File\SpecialChar menuseparator +Save As +\family default +\SpecialChar ldots +). + Finally, the document is reloaded using the new name. \end_layout +\begin_layout Labeling +\labelwidthstring 00.00.0000 +SVN +\begin_inset space ~ +\end_inset + +commands: +\begin_inset space ~ +\end_inset + + +\begin_inset Newline newline \end_inset -. - In the SVN config file -\begin_inset Foot -status collapsed -\begin_layout Plain Layout -Exact path depends on Windows version, usually somewhere around \begin_inset Flex Code status collapsed \begin_layout Plain Layout -c: -\backslash -Documents and Settings -\backslash -user -\backslash -Application Data -\backslash -Subversion -\backslash -config -\end_layout +svn move -q +\family typewriter +\begin_inset Quotes qld \end_inset - / -\begin_inset Flex Code -status collapsed + +\begin_inset Quotes qld +\end_inset -\begin_layout Plain Layout -AppData -\backslash -Roaming -\backslash -Subversion -\end_layout + +\begin_inset Quotes qld +\end_inset + +\begin_inset Quotes qld \end_inset -. + \end_layout \end_inset -, section [tunnels], setup ssh command, e.g. - + +\begin_inset Newline newline +\end_inset + + \begin_inset Flex Code status collapsed \begin_layout Plain Layout -ssh=c:/path/plink.exe -i c:/path/private_key.ppk +svn commit \end_layout \end_inset -. + +\end_layout + +\begin_layout Subsubsection +\begin_inset CommandInset label +LatexCommand label +name "subsec:SVN-Repo-Update" + +\end_inset + +Update of the local directory checkout from repository \begin_inset Foot status collapsed \begin_layout Plain Layout -It will usually take a lot of time to get exact command right and it depends - on many things. - For example do not have some remote server saved as a default session in - Putty etc. - If things fail, try to connect via plink without SVN first. -\end_layout - +Note that this command will work only with subversion +\begin_inset Formula $\geqq1.5$ \end_inset \end_layout -\end_deeper -\begin_layout Enumerate -Checkout the SVN archive, e. -\begin_inset space \thinspace{} \end_inset -g. -\begin_inset Newline newline -\end_inset +\end_layout +\begin_layout Standard +All the commands above have one shortcoming – they deal with the current + document only. + Once your document contains pictures, includes external \begin_inset Flex Code status collapsed \begin_layout Plain Layout -svn co svn+ssh://user@server/repository_path +.tex \end_layout \end_inset -. + files and so on administration becomes more complicated. + \SpecialChar LyX + now supports updating the whole tree in which resides the document +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout +One need to organize the files structure so that all external files are + in the same directory or subdirectories of the document. + \end_layout -\begin_layout Subsubsection -End-of-Line Conversions +\end_inset + +. + This become especially useful once you cooperate with people which neither + know about subversion management nor they have ambition to commit additional + material to the repository. + \end_layout \begin_layout Standard -When the collaborators are mixing Linux and Windows environments, \SpecialChar LyX - will - use different line endings inside the .lyx files. - This is not a problem as far as \SpecialChar LyX - functionality is concerned, but the commit - diffs will be huge and merge-conflicts prone. - Fortunately SVN itself knows -\begin_inset Foot +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -\begin_inset Flex URL -status collapsed +Update local directory from repository +\end_layout -\begin_layout Plain Layout +\end_inset -http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html + command updates the whole directory and in case of merge conflicts local + version of the files are left, so no unintended data loss occurs. + If local changes are detected user is warned before update starts. \end_layout +\begin_layout Labeling +\labelwidthstring 00.00.0000 +SVN +\begin_inset space ~ \end_inset +commands: +\begin_inset space ~ +\end_inset -\end_layout +\begin_inset Newline newline \end_inset - how to deal with CR/LF problems when switching .lyx files to the + \begin_inset Flex Code status collapsed \begin_layout Plain Layout -native +svn diff $path \end_layout \end_inset - mode. -\begin_inset Foot -status collapsed + (Ask if changes are detected.) +\begin_inset Newline newline +\end_inset + -\begin_layout Plain Layout -For the lazy guys: \begin_inset Flex Code status collapsed \begin_layout Plain Layout -svn propset svn:eol-style native FILE_NAME +svn update --accept mine-full $path \end_layout \end_inset @@ -26003,2824 +26001,2838 @@ svn propset svn:eol-style native FILE_NAME \end_layout -\end_inset +\begin_layout Standard +where +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +$path +\end_layout +\end_inset + stands for the path to the document. \end_layout -\begin_layout Subsection -GIT commands in \SpecialChar LyX +\begin_layout Subsubsection +\family sans +Show History \end_layout \begin_layout Standard -A minimal subset of GIT commands is now supported by \SpecialChar LyX -. - You can find the commands in the -\family sans -File\SpecialChar menuseparator -Version -\begin_inset space ~ +This shows the complete history of the SVN document. + The output of +\family typewriter +svn log +\begin_inset Quotes qld +\end_inset + + +\begin_inset Quotes qld \end_inset -Control -\family default - submenu. - Please note that if you use password protected access to repository via - ssh, you will be asked in terminal window. - \SpecialChar LyX - was tested against GIT 1.7. -\begin_inset Foot -status collapsed -\begin_layout Plain Layout -Windows users please note that you need to ensure that git is on the path. - This can be set from within \SpecialChar LyX - at -\family sans -Tools\SpecialChar menuseparator -Preferences\SpecialChar menuseparator -Paths\SpecialChar menuseparator -PATH prefix \family default -. + is shown in a browser. \end_layout +\begin_layout Subsubsection +File Locking +\begin_inset CommandInset label +LatexCommand label +name "subsec:SVN-File-Locking" + \end_inset \end_layout \begin_layout Standard -One big difference of GIT and the other supported version control systems - is the distributed nature of GIT: With traditional version control systems - there is one central server which hosts the repository. - Users commit their changes to the server, and get updates made by other - users from it. - With GIT, users commit to a local repository. - The local repository can be synchronized with one or more remote repositories - using the -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -pull +The file exchange through various revision control systems brings the problem + of merge conflicts in case two different users try to edit the same (parts + of) document. + When such a conflict happens it needs manual resolving and one reasonable + alternative is to provide some kind of locking mechanism, which guarantees + that only one user is allowed to edit file at the given time. \end_layout +\begin_layout Standard +SVN has two such mechanisms to provide mutual exclusivity for file access + – locks and automatic setting of write permissions (see sec. + +\begin_inset CommandInset ref +LatexCommand ref +reference "subsec:Automatical-Locking-Property" + \end_inset - and +) based on \begin_inset Flex Code status collapsed \begin_layout Plain Layout -push +svn:needs-lock \end_layout \end_inset - GIT commands. - \SpecialChar LyX - does not interact in any way with remote GIT repositories. - It works exclusively with the local repository in a very similar way as - with a central CVS or SVN repository. - If you use remote GIT repositories you need to do the -\begin_inset Flex Code + file svn property +\begin_inset Foot status collapsed \begin_layout Plain Layout -pull -\end_layout - -\end_inset - - and -\begin_inset Flex Code -status collapsed +\begin_inset Flex URL +status open \begin_layout Plain Layout -push + +http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html \end_layout \end_inset - operations with your favourite GIT client. -\end_layout - -\begin_layout Subsubsection -\family sans -Register \end_layout -\begin_layout Standard -If your document is not under revision control, this is the only item shown - in the menu. - And if it is under revision control, the -\family sans -Register -\family default - item is not visible. -\end_layout +\end_inset -\begin_layout Standard -This command registers in GIT your document ONLY in case you have already - the documents directory under GIT control (in particular -\family typewriter -.git/index -\family default - file exists). - This means you have to checkout the archive by yourself. +. + If this property is detected for a given document \SpecialChar LyX + starts to use SVN locks + for document editing automatically and the whole check-in/out mechanism + switches to the same regimen as for RCS. + This in particular means there are two different modes of file use in \SpecialChar LyX +: \end_layout -\begin_layout Standard -Then you are asked interactively to supply an initial description of the - document. - Don't forget that registered file is not yet committed. +\begin_layout Itemize +Unlocked state. + The loaded file is in the read-only mode. + For editing on needs to check-out. + +\emph on +Check-out +\emph default + consists of updating from the repository and gaining write lock. + If the lock is not possible to obtain, we remain in unlocked state. \end_layout -\begin_layout Standard -GIT command that is run: -\family typewriter -git add -\begin_inset Quotes qld -\end_inset - - -\begin_inset Quotes qld +\begin_layout Itemize +Locked state. + The loaded file is in the +\begin_inset Quotes els \end_inset +normal +\begin_inset Quotes ers +\end_inset -\end_layout + edit mode. + No other user is allowed to edit the file. + +\emph on +Check-in +\emph default + consists of commiting changes and releasing write-lock. + If no changes have been made to the document, no commit will be produced +\begin_inset Foot +status collapsed -\begin_layout Standard -Read -\family typewriter -man git -\family default - to understand the switches. +\begin_layout Plain Layout +Don't be puzzled by the fact that you will be asked for commit message anyway. \end_layout -\begin_layout Subsubsection +\end_inset -\family sans -Check In Changes + and only the write-lock will be released. \end_layout \begin_layout Standard -When you are finished editing a file, you commit your changes. - When you do this, you are asked for a description of the changes. - After that changes are committed. +SVN commands: \end_layout -\begin_layout Standard -GIT command: +\begin_layout Labeling +\labelwidthstring 00.00.0000 +Check-in: \family typewriter -git commit -q -m"" + svn commit -q -m"" "" +\begin_inset Newline newline +\end_inset + +svn unlock "" \end_layout -\begin_layout Subsubsection +\begin_layout Labeling +\labelwidthstring 00.00.0000 +Check-out: +\family typewriter +svn update "" +\begin_inset Newline newline +\end_inset -\family sans -Revert To Repository Version +svn lock "" \end_layout -\begin_layout Standard -This will discard all changes made to the document since the last check - in. - You get a warning before changes are discarded. -\end_layout +\begin_layout Subsubsection -\begin_layout Standard -GIT command: \family typewriter -git checkout -q -\begin_inset Quotes qld -\end_inset +\begin_inset CommandInset label +LatexCommand label +name "subsec:Automatical-Locking-Property" - -\begin_inset Quotes qld \end_inset -\end_layout - -\begin_layout Subsubsection - -\family sans -Rename +\family default +Automatic Locking Property \end_layout \begin_layout Standard -This will rename the current document including the version history. - It requires a clean document without any changes since the last checkin. - You are asked for a file name and a description of the rename operation. - After that the document is renamed, both locally and in the repository. - If the parent directories of the new and old file names differ, all relative - paths of included files are adjusted (like in +The above mentioned automatic setting of write permissions of the .lyx file + can be set through \family sans -File\SpecialChar menuseparator -Save As + File\SpecialChar menuseparator +Version +\begin_inset space ~ +\end_inset + +Control\SpecialChar menuseparator +Use Locking Property \family default -\SpecialChar ldots -). - Finally, the document is reloaded using the new name. +. + This command is active only when the file is not locked on the svn server + (i.e. + you need to check-out before proceeding). \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 -GIT -\begin_inset space ~ -\end_inset - -commands: +SVN \begin_inset space ~ \end_inset +commands: +\end_layout -\begin_inset Newline newline -\end_inset - - -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -git mv +\begin_layout Labeling +\labelwidthstring 00.00.0000 +Set: \family typewriter + svn propset svn:needs-lock ON "" +\end_layout -\begin_inset Quotes qld -\end_inset +\begin_layout Labeling +\labelwidthstring 00.00.0000 +Unset: +\family typewriter +svn propdel svn:needs-lock "" +\end_layout - -\begin_inset Quotes qld -\end_inset +\begin_layout Subsubsection +\begin_inset CommandInset label +LatexCommand label +name "subsec:VCS-Revision-Information" - -\begin_inset Quotes qld \end_inset - -\begin_inset Quotes qld -\end_inset +Revision Information in Documents +\end_layout +\begin_layout Standard +There are more possibilities how to activate revision information in our + document. +\end_layout +\begin_layout Itemize +\SpecialChar LyX + supports directly: \end_layout -\end_inset +\begin_deeper +\begin_layout Itemize +tree revision information ( +\begin_inset Flex Code +status collapsed +\begin_layout Plain Layout +vcs-tree-revision +\end_layout -\begin_inset Newline newline \end_inset - +). + The result is the output of the \begin_inset Flex Code status collapsed \begin_layout Plain Layout -git commit +svnversion \end_layout \end_inset - + command, the following table gives you an idea, how to read the results. \end_layout -\begin_layout Subsubsection +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + + +\begin_inset Text -\family sans -Show History +\begin_layout Plain Layout + +\series bold +Output \end_layout -\begin_layout Standard -This shows the complete history of the GIT document. - The output of -\family typewriter -git log -\begin_inset Quotes qld \end_inset + + +\begin_inset Text - -\begin_inset Quotes qld -\end_inset +\begin_layout Plain Layout +\series bold +Meaning +\end_layout -\family default - is shown in a browser. +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +4123:4168 \end_layout -\begin_layout Subsubsection -Version Info +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +mixed revision working copy \end_layout -\begin_layout Standard -\SpecialChar LyX - supports GIT hash number of the last commit to the file, -\change_inserted 1119979965 1564297456 -its abbreviated form, -\change_unchanged -author name, date and time of last commit. - All those are extracted from -\family typewriter -git log -n 1 --pretty=format:%H%n -\change_inserted 1119979965 1564297427 -%h%n -\change_unchanged -%an%n%ai -\family default -. - Tree version information is obtained via -\family typewriter -git describe --abbrev --dirty --long -\family default -. - See -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:VCS-Revision-Information" +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +4168M +\end_layout \end_inset + + +\begin_inset Text - for other details. +\begin_layout Plain Layout +modified working copy \end_layout -\begin_layout Subsection -Further tuning +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +4123S \end_layout -\begin_layout Standard -With the recent addition of the -\begin_inset Flex Code -status collapsed +\end_inset + + +\begin_inset Text \begin_layout Plain Layout -vc-command +switched working copy \end_layout \end_inset + + + + +\begin_inset Text - function \SpecialChar LyX - power users are allowed to create their own commands for revision - control. +\begin_layout Plain Layout +4123P \end_layout -\begin_layout Standard -As an example you can see how two TortoiseSVN commands could be integrated - directly: +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +partial working copy, from a sparse checkout \end_layout -\begin_layout Description -Commit: -\begin_inset Flex Code -status collapsed +\end_inset + + + + +\begin_inset Text \begin_layout Plain Layout -vc-command DR "." "TortoiseProc /command:commit /path:$$p" +4123:4168MS +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +mixed revision, modified, switched working copy \end_layout +\end_inset + + + + \end_inset \end_layout -\begin_layout Description -Revert: +\begin_layout Itemize +file revision information. + The result comes from parsing the output of \begin_inset Flex Code status collapsed \begin_layout Plain Layout -vc-command DR "." "TortoiseProc /command:revert /path:$$p" -\end_layout +svn +\begin_inset space ~ +\end_inset +info +\begin_inset space ~ \end_inset +--xml +\begin_inset space ~ +\end_inset +file.lyx \end_layout -\begin_layout Subsection -Version control and Document comparison +\end_inset + +. + Supported flags are: \end_layout -\begin_layout Standard -One of the typical uses of version control is to inspect the changes between - revisions, usually by creating +\begin_deeper +\begin_layout Itemize +version number of the last commit ( \begin_inset Flex Code status collapsed \begin_layout Plain Layout -diff +vcs-revision \end_layout \end_inset - dumps. - While this is useful for plain text files, it is much less useful in the - case of \SpecialChar LyX - files, which have more a complicated structure. - Hence we provide binding to the Document comparison feature. - There are two ways of calling this feature – either by direct call of +) +\end_layout + +\begin_layout Itemize +author of the last commit ( \begin_inset Flex Code status collapsed \begin_layout Plain Layout -vc-compare +vcs-author \end_layout \end_inset - \SpecialChar LyX - function (for details see \SpecialChar LyX - functions manual) or by the toolbar icon -\begin_inset Info -type "icon" -arg "vc-compare" -\end_inset - - or the menu item -\begin_inset Info -type "menu" -arg "vc-compare" -\end_inset +) +\end_layout -, respectively. - One can either compare two chosen revisions of the document or he can simply - compare the current version of edited text with older revisions (where - ' -\begin_inset Flex Noun +\begin_layout Itemize +date of the last commit ( +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -0 +vcs-date \end_layout \end_inset -' revisions back means comparison of the edited file with last commited - revision). - +) \end_layout -\begin_layout Standard -This feature is supported for SVN and RCS though due to the more complicated - versioning scheme of RCS there is a constraint – when addressing the revisions - in dialog, numbers always point to the last number in RCS revision number, - i.e. - '35' in '1.2.35'. - We don't currently support GIT addressing of revisions, one can just compare - edited document with its revision X steps backs, where X is addressed as - +\begin_layout Itemize +time of the last commit ( \begin_inset Flex Code status collapsed \begin_layout Plain Layout -HEAD~X +vcs-time \end_layout \end_inset -. -\end_layout - -\begin_layout Section -Literate Programming +) \end_layout +\end_deeper \begin_layout Standard -Updated by -\noun on -Kayvan Sylvan -\noun default -(kayvan@sylvan.com) -\noun on -, -\noun default -original documentation written by -\noun on -Edmar Wienskoski Jr. +You can obtain this info via InsetInfo ( +\change_inserted 5863208 1564400022 -\noun default - (edmar-w-jr@technologist.com) -\end_layout +\lang american +Insert\SpecialChar menuseparator +Field\SpecialChar menuseparator +Version Control Revision +\change_deleted 5863208 1564399852 -\begin_layout Subsection -Introduction +\lang english +e.g. + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +info-insert buffer vcs-date \end_layout -\begin_layout Standard -The main purpose of this documentation is to show you how to use \SpecialChar LyX - for literate - programming, where it is assumed that you are familiar with this programming - technique, and know what -\begin_inset Quotes eld \end_inset -tangling -\begin_inset Quotes erd -\end_inset - and -\begin_inset Quotes eld -\end_inset +\change_unchanged +). + The information will be available only when you have the file stored under + svn managment (i.e. + the +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +.svn +\end_layout -weaving -\begin_inset Quotes erd \end_inset - means. - If that is not the case, please follow the web links provided in the following - sections. - There is a lot of good documentation out there covering old development - history to the latest tools tips. + directory is available with your document). \end_layout -\begin_layout Standard -It is also assumed that you are familiar with \SpecialChar LyX - itself to a point that you - are comfortable changing your \SpecialChar LyX - preferences, and X resources file. - If that is not the case please refer to other \SpecialChar LyX - documentation to cover your - specific needs. -\end_layout +\end_deeper +\begin_layout Itemize +Another—a hacking one—possibility is to use svn keywords +\begin_inset Foot +status collapsed -\begin_layout Subsection -Literate Programming +\begin_layout Plain Layout +http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html \end_layout -\begin_layout Standard -From the Literate Programming FAQ: +\end_inset + +. + In short – you set file keywords property (e.g. + +\family sans +svn propset svn:keywords 'Rev' file.lyx +\family default +) and then paste keyword \SpecialChar TeX + code +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout +This is an easy way how to ensure that \SpecialChar LyX + won't break the line in the middle + of keyword tag. \end_layout -\begin_layout Quotation -Literate programming is the combination of documentation and source together - in a fashion suited for reading by human beings. - In fact, literate programs should be enjoyable reading, even inviting! - (Sorry Bob, I couldn't resist!) In general, literate programs combine source - and documentation in a single file. - Literate programming tools then parse the file to produce either readable - documentation or compilable source. - The WEB style of literate programming was created by D. -\begin_inset space \thinspace{} \end_inset -E. - Knuth during the development of his \SpecialChar TeX - typesetting software. + tag in your document (e.g. -\end_layout +\begin_inset Flex Code +status collapsed -\begin_layout Standard -Another excerpt says: +\begin_layout Plain Layout +$Rev$ \end_layout -\begin_layout Quotation +\end_inset -\emph on -How is literate programming different from verbose commenting? -\end_layout +). + This way svn client will automatically substitute revision number (e.g. + +\begin_inset Flex Code +status collapsed -\begin_layout Quotation -There are three distinguishing characteristics. - In order of importance, they are: +\begin_layout Plain Layout +$Rev: 59 $ \end_layout -\begin_deeper -\begin_layout Itemize -flexible order of elaboration -\end_layout +\end_inset -\begin_layout Itemize -automatic support for browsing +) after each update and commit. + There are more problems with this approach. + Firstly, the '$' character is used in \SpecialChar TeX + world for math equations, so any + occurence of math formula +\begin_inset Formula $Rev$ +\end_inset + + become +\begin_inset Formula $Rev:59$ +\end_inset + + in your \SpecialChar LyX + document. + Similarly for other keywords like Id, Date, Author, etc. + Secondly svn output is dependent on your locales, so its very easy that + svn would produce some problematic strings once Date is used. + Thirdly you get the whole 'Rev: 59' string in your document instead of + the plain number. + Until subversion implements user's custom keywords it will be hard to use + this approach reliably or let \SpecialChar LyX + to support it directly. \end_layout -\begin_layout Itemize -typeset documentation, especially diagrams and mathematics +\begin_layout Subsection +SVN and Windows Environment \end_layout -\end_deeper -\begin_layout Standard -Now that I sparked your curiosity, take a look in the references. +\begin_layout Quote +My inclination is to say that if the user cannot figure out the command + line operations on their own fairly quickly, they would be well advised + to use TortoiseSVN. + —P. + A. + Rubin \end_layout \begin_layout Subsubsection -References +Preparation \end_layout \begin_layout Standard -The complete Literate Programming FAQ can be found at: -\end_layout - -\begin_layout Quote -Literate Programming FAQ -\begin_inset Flex URL -status open +In addition to installing \SpecialChar LyX +, and having access to a Subversion repository, + the user will need to install the Subversion client program. + A Windows installer for the client program is available from +\begin_inset CommandInset href +LatexCommand href +name "CollabNet" +target "http://www.collab.net/nonav/downloads/subversion/" +literal "false" -\begin_layout Plain Layout +\end_inset -http://www.literateprogramming.com/lpfaq.pdf -\end_layout +. + The user may also want to install +\begin_inset CommandInset href +LatexCommand href +name "TortoiseSVN" +target "http://tortoisesvn.tigris.org/" +literal "false" \end_inset +, which integrates Subversion operations into the context (rightclick) menu + of Windows Explorer. + Operations done outside \SpecialChar LyX + will typically be more convenient using the Explorer + context menu. + Note that TortoiseSVN is not a replacement for the client program, which + is what \SpecialChar LyX + itself will use. +\end_layout +\begin_layout Subsubsection +Bringing a document under Subversion control \end_layout \begin_layout Standard -The FAQ lists 23 (twenty three!) different literate programming tools. - Where some are specialized or -\begin_inset Quotes eld -\end_inset - -tailored -\begin_inset Quotes erd -\end_inset - - for particular programming languages, while other have general scope. - I selected -\noun on -Noweb -\noun default - for my own use for several reasons: +Before a \SpecialChar LyX + document can be brought under version control in Subversion, its + parent directory needs to be under version control. + If the document is being added to a project already in the repository, + this is accomplished by checking the project out to the directory where + the new document will be placed. + If the project itself is not yet under version control (for instance, if + this document starts a new project), the directory must be imported into + the repository. + This is done outside \SpecialChar LyX +. + Both import and checkout are easily accomplished from the Explorer context + menu using TortoiseSVN, or alternatively can be done using the command + line client at a DOS prompt. + The procedure for importing the project using TortoiseSVN is described + below, assuming an existing repository and a new project being started + in +\family typewriter +C: +\backslash +new project +\family default +. + For information on using the Subversion client program, run +\family typewriter +svn --help +\family default +in a DOS shell. \end_layout -\begin_layout Itemize -It can generate the documentation either in \SpecialChar LaTeX - or HTML. +\begin_layout Enumerate +Locate +\family typewriter +C: +\backslash +new project +\family default +in Windows Explorer, right click it, and select +\family sans +TortoiseSVN\SpecialChar menuseparator +Repo-browser +\family default +. + If necessary, adjust the URL for the repository, then click OK. \end_layout -\begin_layout Itemize -It has a open architecture, i. -\begin_inset space \thinspace{} -\end_inset +\begin_layout Enumerate +Right click the level of the repository under which you want to place the + new project folder (typically the top level) and click +\family sans +Create folder +\family default + Supply a name for the project folder and click OK. + Add a message for the log file if desired, then click OK again. + The new project folder should appear in the repository. + Finally, click OK again to exit the repository browser. +\end_layout -e. -\begin_inset space \space{} -\end_inset +\begin_layout Enumerate +Once again right click +\family typewriter +C: +\backslash +new project +\family default +, this time selecting SVN Checkout\SpecialChar ldots + Select the URL of the project folder + you just created in the repository, and set the checkout directory to +\family typewriter +C: +\backslash +new project. -it is easy to plug in new filters -\begin_inset Foot -status collapsed +\family default + Click OK. + You will be warned about a non-empty folder; click OK to proceed. + You should now have a +\family typewriter +.svn +\family default + directory under +\family typewriter +C: +\backslash +new project. +\end_layout -\begin_layout Plain Layout +\begin_layout Enumerate +Create or open your document in \SpecialChar LyX + and click +\family sans +File\SpecialChar menuseparator +Version +\begin_inset space ~ +\end_inset -\emph on -Filters -\emph default -are programs that read a given data stream and output a manipulated data - stream. - That way, a WEB file (consisting of literate code) can be turned into a - file consisting only of C program code or \SpecialChar LaTeX - code. +Control\SpecialChar menuseparator +Register. + +\family default +Add a log message and click OK to commit the document to version control. \end_layout +\begin_layout Standard +From this point onward, you should have full functionality in the +\family sans +File\SpecialChar menuseparator +Version +\begin_inset space ~ \end_inset - and to perform special processing that you may need. - -\end_layout - -\begin_layout Itemize -There is a good selection of filters available already (the HTML is one - of them). +Control +\family default + menu. + You also have the option of checking the document in and out, viewing its + history, etc. + using the TortoiseSVN context menu in Windows Explorer or the Subversion + client program from a command prompt. \end_layout -\begin_layout Itemize -It is free. +\begin_layout Subsubsection +SSH tunnel used with SVN under Windows \end_layout \begin_layout Standard -The Noweb web page can be found at: +Compared with Linux setting up an svn client to communicate over ssh under + Windows is a rather troublesome task. + We will at least offer some hints how to setup the client side but prior + knowledge about ssh and the Windows command line is needed, also be prepared + for a great deal of frustration\SpecialChar ldots + \end_layout -\begin_layout Quote -Noweb home page -\begin_inset Flex URL +\begin_layout Enumerate +Get an svn client for windows, as described in the previous sections. + When it is a fresh install run some svn command (e.g. + +\begin_inset Flex Code status collapsed \begin_layout Plain Layout - -https://www.cs.tufts.edu/~nr/noweb/ +svn --version \end_layout \end_inset - +) to create config files, which you will need to change later on. \end_layout -\begin_layout Standard -Starting from there you can reach many other interesting links and even - some literate program examples. -\end_layout +\begin_layout Enumerate +Choose an ssh client for Windows. + There are several possibilities, we will use the one from Putty tools +\begin_inset Foot +status collapsed -\begin_layout Subsection -\SpecialChar LyX - and Literate Programming with Noweb -\end_layout +\begin_layout Plain Layout +\begin_inset Flex URL +status collapsed -\begin_layout Standard -The \SpecialChar LyX - support for Literate Programming is provided by using the generic \SpecialChar LyX +\begin_layout Plain Layout - converters mechanism. - This support is provided in a -\begin_inset Quotes eld -\end_inset +http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html +\end_layout -Noweb independent -\begin_inset Quotes erd \end_inset - way, i. -\begin_inset space \thinspace{} -\end_inset -e. -\begin_inset space \space{} +\end_layout + \end_inset -you will be able to use this new \SpecialChar LyX - feature with some other literate programming - tool of your choice by just changing your \SpecialChar LyX - preferences. +. + You will need to set the connection up so that the client doesn't ask for + any password from you. + To keep things easy we will use only keys without any additional password + protection etc. \end_layout -\begin_layout Subsubsection -Generating documents and code (weaving and tangling) -\end_layout +\begin_deeper +\begin_layout Enumerate +Generate keys by +\begin_inset Flex Code +status collapsed -\begin_layout Paragraph -Using the noweb module +\begin_layout Plain Layout +puttygen \end_layout -\begin_layout Standard -If you have installed Noweb and \SpecialChar LyX - successfully, whenever you open a new document, - after you have chosen its document class, use the -\family sans -Document\SpecialChar menuseparator -Settings -\family default - menu to add the -\begin_inset Quotes eld -\end_inset - -noweb -\begin_inset Quotes erd \end_inset - module. - If Noweb is correctly installed, when you click on the +. + Save your private .ppk key file and put the public one on the server side. + If the SVN server runs on Linux, note that the format of the public key + is not compatible with Linux openssh and you will need to direcly copy-paste + the key from the \begin_inset Quotes eld \end_inset -Modules -\begin_inset Quotes erd -\end_inset - - link, you will see the -\begin_inset Quotes eld -\end_inset -noweb +\emph on +Public key for pasting into OpenSSH authorized_keys file +\emph default +: \begin_inset Quotes erd \end_inset - module in the available list and you can add it to your document. -\end_layout - -\begin_layout Paragraph -Typing code in -\end_layout - -\begin_layout Standard -\SpecialChar LyX - enables you to write code with a custom inset named -\begin_inset Flex Noun + edit field into the server's +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Chunk +~/.ssh/authorized_keys \end_layout \end_inset -. - Noweb delimits chunks like this: -\end_layout + / +\begin_inset Flex Code +status collapsed -\begin_layout LyX-Code -<>= +\begin_layout Plain Layout +authorized_keys2 \end_layout -\begin_layout LyX-Code - code -\end_layout +\end_inset -\begin_layout LyX-Code - more code + file. \end_layout -\begin_layout LyX-Code - even more code -\end_layout +\begin_layout Enumerate +Get the Putty's +\begin_inset Flex Code +status collapsed -\begin_layout LyX-Code - @ +\begin_layout Plain Layout +plink \end_layout -\begin_layout Standard -The problem is that whatever is written in between the << and the -\family typewriter -@ -\family default - must be taken literally, i. -\begin_inset space \thinspace{} -\end_inset - -e. -\begin_inset space \space{} \end_inset -\SpecialChar LyX - should be prevented from making any special interpretation of what has - been written. - This is also handled by -\begin_inset Flex Noun +. + In the SVN config file +\begin_inset Foot status collapsed \begin_layout Plain Layout -Chunk -\end_layout - -\end_inset +Exact path depends on Windows version, usually somewhere around +\begin_inset Flex Code +status collapsed -, that works like a normal text inset but has a free spacing capability. +\begin_layout Plain Layout +c: +\backslash +Documents and Settings +\backslash +user +\backslash +Application Data +\backslash +Subversion +\backslash +config \end_layout -\begin_layout Standard -As a special note, you can also use the -\begin_inset Quotes eld -\end_inset - -%def -\begin_inset Quotes erd \end_inset - construct of Noweb in your chunks to add items to Noweb's identifier cross-refe -rence: -\end_layout - -\begin_layout LyX-Code -<>= -\end_layout - -\begin_layout LyX-Code -def some_function(args): -\end_layout - -\begin_layout LyX-Code - "This is the doc string for this function." -\end_layout - -\begin_layout LyX-Code - print "My args: ", args -\end_layout - -\begin_layout LyX-Code -@ %def some_function -\end_layout - -\begin_layout Standard -For an example of this usage and the resulting cross-reference output, look - at the Literate python program in -\emph on -LIBDIR/examples/listerrors.lyx -\emph default - which should make this all clear. -\end_layout + / +\begin_inset Flex Code +status collapsed -\begin_layout Paragraph -Generating the documentation +\begin_layout Plain Layout +AppData +\backslash +Roaming +\backslash +Subversion \end_layout -\begin_layout Standard -At this point you already have a new document file with a proper document - class, and with some code and text on it. - How do I print it? The answer is simple, you select -\family sans -View\SpecialChar menuseparator -DVI, -\family default - etc. - Just like you would do for a plain document. - No special procedure is required. -\end_layout +\end_inset -\begin_layout Standard -To help orientate you, I will now explain what happens inside \SpecialChar LyX -: +. \end_layout -\begin_layout Enumerate -When the -\family sans -Update\SpecialChar menuseparator -DVI -\family default - menu option is chosen, a \SpecialChar LaTeX - file is generated. +\end_inset + +, section [tunnels], setup ssh command, e.g. +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +ssh=c:/path/plink.exe -i c:/path/private_key.ppk \end_layout -\begin_deeper -\begin_layout Standard -If the document is of any literate class the generated file will be named - with an extension name defined by the -\begin_inset Quotes eld \end_inset -literate -\begin_inset Quotes erd +. +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout +It will usually take a lot of time to get exact command right and it depends + on many things. + For example do not have some remote server saved as a default session in + Putty etc. + If things fail, try to connect via plink without SVN first. +\end_layout + \end_inset - format (defined in the Preferences panel), otherwise the file will have - the usual -\family typewriter -.tex -\family default - extension. + \end_layout \end_deeper \begin_layout Enumerate -Note that the only difference so far is in the name of the file, no special - processing is required by \SpecialChar LyX -. - Given that you formatted the code using the -\begin_inset Flex Noun +Checkout the SVN archive, e. +\begin_inset space \thinspace{} +\end_inset + +g. +\begin_inset Newline newline +\end_inset + + +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Chunk +svn co svn+ssh://user@server/repository_path \end_layout \end_inset - inset that, by itself, takes care of the business. +. \end_layout -\begin_layout Enumerate -If the document is of any literate class \SpecialChar LyX - will then use the internal \SpecialChar LyX - to - Noweb converter, followed by the Noweb to \SpecialChar LaTeX - converter +\begin_layout Subsubsection +End-of-Line Conversions +\end_layout + +\begin_layout Standard +When the collaborators are mixing Linux and Windows environments, \SpecialChar LyX + will + use different line endings inside the .lyx files. + This is not a problem as far as \SpecialChar LyX + functionality is concerned, but the commit + diffs will be huge and merge-conflicts prone. + Fortunately SVN itself knows \begin_inset Foot status collapsed \begin_layout Plain Layout -The converters are defined in the -\family sans -Tools\SpecialChar menuseparator -Preferences -\family default - panel, under the -\begin_inset Quotes eld -\end_inset +\begin_inset Flex URL +status collapsed -Conversion -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout - tab. - See section -\emph on -Converters -\emph default - of the -\emph on -Customization -\emph default - manual for general information about converters. +http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html \end_layout \end_inset - to generate the \SpecialChar LaTeX - file. -\end_layout -\begin_deeper -\begin_layout Standard -Otherwise it will just skip this step. \end_layout -\end_deeper -\begin_layout Enumerate -Finally, \SpecialChar LaTeX - is invoked and the regular post processing continues as in a plain - document. +\end_inset + + how to deal with CR/LF problems when switching .lyx files to the +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +native \end_layout -\begin_layout Standard -Independence from a particular -\begin_inset Quotes eld \end_inset -literate tool -\begin_inset Quotes erd -\end_inset + mode. +\begin_inset Foot +status collapsed - is easily achieved by changing the commands that are run by the various - converters. -\end_layout +\begin_layout Plain Layout +For the lazy guys: +\begin_inset Flex Code +status collapsed -\begin_layout Paragraph -Generating the code +\begin_layout Plain Layout +svn propset svn:eol-style native FILE_NAME \end_layout -\begin_layout Standard -When the build menu option is chosen or the corresponding button in the - toolbar is pressed, a \SpecialChar LaTeX - file is generated just like step 1 above. - Next, \SpecialChar LyX - invokes the -\family typewriter -Noweb->Program -\family default - converter. - This converter needs to be defined by the user and is not installed by - default, though the Program format is. - This converter (like any other converter) will have two parts: -\end_layout +\end_inset -\begin_layout Enumerate -The converter program itself. - This program performs the conversion from the one format to the other (in - this case, from the Noweb format to the Program pseudo-format). -\end_layout -\begin_layout Enumerate -The error log parser. - This is a program whose sole purpose is to rewrite error messages in a - format that \SpecialChar LyX - understands. - This makes it possible for \SpecialChar LyX - to place error boxes in the right places in - the file buffer. \end_layout -\begin_layout Standard -The first part, the -\begin_inset Quotes eld \end_inset -Converter -\begin_inset Quotes erd -\end_inset - setting, should be set to \end_layout -\begin_layout LyX-Code +\begin_layout Subsection +GIT commands in \SpecialChar LyX -\family typewriter -build-script $$i -\family default - $$r \end_layout \begin_layout Standard -This basically means that \SpecialChar LyX - will call -\begin_inset Quotes eld -\end_inset - -build-script -\begin_inset Quotes erd +A minimal subset of GIT commands is now supported by \SpecialChar LyX +. + You can find the commands in the +\family sans +File\SpecialChar menuseparator +Version +\begin_inset space ~ \end_inset - (a program or script) with the name of the Noweb file (normally a file - in the \SpecialChar LyX - temp directory) and the directory path of the original \SpecialChar LyX - file. - -\end_layout +Control +\family default + submenu. + Please note that if you use password protected access to repository via + ssh, you will be asked in terminal window. + \SpecialChar LyX + was tested against GIT 1.7. +\begin_inset Foot +status collapsed -\begin_layout Standard -This is an implementation of -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout +Windows users please note that you need to ensure that git is on the path. + This can be set from within \SpecialChar LyX + at +\family sans +Tools\SpecialChar menuseparator +Preferences\SpecialChar menuseparator +Paths\SpecialChar menuseparator +PATH prefix +\family default +. +\end_layout -build-script -\begin_inset Quotes erd \end_inset - that you can place in a directory on your path: -\end_layout - -\begin_layout LyX-Code -\family sans -#!/bin/sh \end_layout -\begin_layout LyX-Code +\begin_layout Standard +One big difference of GIT and the other supported version control systems + is the distributed nature of GIT: With traditional version control systems + there is one central server which hosts the repository. + Users commit their changes to the server, and get updates made by other + users from it. + With GIT, users commit to a local repository. + The local repository can be synchronized with one or more remote repositories + using the +\begin_inset Flex Code +status collapsed -\family sans -# +\begin_layout Plain Layout +pull \end_layout -\begin_layout LyX-Code +\end_inset -\family sans -notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh + and +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +push \end_layout -\begin_layout Standard -The next part of the converter setting is the -\begin_inset Quotes eld \end_inset -Flags -\begin_inset Quotes erd -\end_inset + GIT commands. + \SpecialChar LyX + does not interact in any way with remote GIT repositories. + It works exclusively with the local repository in a very similar way as + with a central CVS or SVN repository. + If you use remote GIT repositories you need to do the +\begin_inset Flex Code +status collapsed - which is to be set to +\begin_layout Plain Layout +pull \end_layout -\begin_layout LyX-Code +\end_inset -\family typewriter -parselog=$$s/scripts/listerrors + and +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +push \end_layout -\begin_layout Standard -This will run any errors that are generated by the -\begin_inset Quotes eld \end_inset -build-script -\begin_inset Quotes erd -\end_inset + operations with your favourite GIT client. +\end_layout - process through the -\begin_inset Quotes eld -\end_inset +\begin_layout Subsubsection -listerrors -\begin_inset Quotes erd -\end_inset +\family sans +Register +\end_layout - program. +\begin_layout Standard +If your document is not under revision control, this is the only item shown + in the menu. + And if it is under revision control, the +\family sans +Register +\family default + item is not visible. \end_layout \begin_layout Standard -The build will normally take place in \SpecialChar LyX -'s temporary directory, so the files - produced by the conversion will be in that directory. - \SpecialChar LyX - will copy out what it regards as the `main' file, but the +This command registers in GIT your document ONLY in case you have already + the documents directory under GIT control (in particular \family typewriter -Noweb->Program +.git/index \family default - conversion may produce several files, and so most of these would then be - deleted when \SpecialChar LyX - was closed. - This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that - the build-script chunk can place the generated files in that location. + file exists). + This means you have to checkout the archive by yourself. \end_layout -\begin_layout Paragraph -Build instructions in the document +\begin_layout Standard +Then you are asked interactively to supply an initial description of the + document. + Don't forget that registered file is not yet committed. \end_layout \begin_layout Standard -The last piece of the integration between \SpecialChar LyX - and noweb is the -\begin_inset Quotes eld -\end_inset - -build-script -\begin_inset Quotes erd -\end_inset - - chunk. - Generally, the instructions for building your program should be embedded - in a chunk of its own. - The noweb-specific -\begin_inset Quotes eld +GIT command that is run: +\family typewriter +git add +\begin_inset Quotes qld \end_inset -build-script -\begin_inset Quotes erd + +\begin_inset Quotes qld \end_inset - above uses the notangle command to look for this chunk (called -\begin_inset Quotes eld -\end_inset -build-script -\begin_inset Quotes erd -\end_inset +\end_layout -) and runs its contents through -\begin_inset Quotes eld -\end_inset +\begin_layout Standard +Read +\family typewriter +man git +\family default + to understand the switches. +\end_layout -sh -\begin_inset Quotes erd -\end_inset +\begin_layout Subsubsection -. +\family sans +Check In Changes \end_layout \begin_layout Standard -Typically, such a chunk would look something like this: +When you are finished editing a file, you commit your changes. + When you do this, you are asked for a description of the changes. + After that changes are committed. \end_layout -\begin_layout LyX-Code -<>= +\begin_layout Standard +GIT command: +\family typewriter +git commit -q -m"" \end_layout -\begin_layout LyX-Code -#!/bin/sh -\begin_inset Newline newline -\end_inset - -if [ -z "${NOWEB_SOURCE}" ] -\begin_inset Newline newline -\end_inset +\begin_layout Subsubsection -then +\family sans +Revert To Repository Version \end_layout -\begin_layout LyX-Code -NOWEB_SOURCE=myfile.nw -\begin_inset Newline newline -\end_inset - -fi -\begin_inset Newline newline -\end_inset - -[... - code to extract files ... - use NOWEB_OUTPUT_DIR here ...] -\begin_inset Newline newline -\end_inset - -[... - code to compile files ...] -\begin_inset Newline newline -\end_inset - -@ +\begin_layout Standard +This will discard all changes made to the document since the last check + in. + You get a warning before changes are discarded. \end_layout \begin_layout Standard -Look in -\emph on -LIBDIR/examples/listerrors.lyx -\emph default - or in -\emph on -LIBDIR/examples/Literate.lyx -\emph default - which implement two versions of the -\begin_inset Quotes eld +GIT command: +\family typewriter +git checkout -q +\begin_inset Quotes qld \end_inset -listerrors -\begin_inset Quotes erd + +\begin_inset Quotes qld \end_inset - program for some illustrations of how all of these pieces go together or - in -\emph on -LIBDIR/examples/noweb2lyx.lyx. -\emph default - Interestingly, these three files show off the language-indepence of the - \SpecialChar LyX - literate programming support since they are written in Python, C and Perl - respectively. \end_layout \begin_layout Subsubsection -Configuring \SpecialChar LyX +\family sans +Rename \end_layout \begin_layout Standard -All the Literate Programming support is configured by the -\family sans -Tools\SpecialChar menuseparator -Preferences -\family default - panel in the -\begin_inset Quotes eld -\end_inset - -File Handling -\begin_inset Quotes erd -\end_inset - - tab. - The important parts are: +This will rename the current document including the version history. + It requires a clean document without any changes since the last checkin. + You are asked for a file name and a description of the rename operation. + After that the document is renamed, both locally and in the repository. + If the parent directories of the new and old file names differ, all relative + paths of included files are adjusted (like in +\family sans +File\SpecialChar menuseparator +Save As +\family default +\SpecialChar ldots +). + Finally, the document is reloaded using the new name. \end_layout -\begin_layout Description -the +\begin_layout Labeling +\labelwidthstring 00.00.0000 +GIT \begin_inset space ~ \end_inset - -\begin_inset Quotes eld +commands: +\begin_inset space ~ \end_inset -NoWeb -\begin_inset Quotes erd + +\begin_inset Newline newline \end_inset -\begin_inset space ~ -\end_inset +\begin_inset Flex Code +status collapsed -format Set up via the File Formats tab, this is where the Noweb-specific - pieces are set up. - The -\family sans -GUI Name -\family default - is set to -\family typewriter -NoWeb -\family default -, the file extension is set to -\family typewriter -.nw -\family default -. - This tells \SpecialChar LyX - to create a file with a +\begin_layout Plain Layout +git mv \family typewriter -.nw -\family default - extension in the first step of the conversion process. -\end_layout -\begin_layout Description -the -\begin_inset space ~ +\begin_inset Quotes qld \end_inset + +\begin_inset Quotes qld +\end_inset -\family sans -Program -\family default - -\begin_inset space ~ + +\begin_inset Quotes qld \end_inset -format This is an empty format whose sole purpose is to be the endpoint - of a conversion (which then allows us to set up a converter for it). -\end_layout + +\begin_inset Quotes qld +\end_inset -\begin_layout Description -\family sans -NoWeb -\family default --> -\family sans -\SpecialChar LaTeX +\end_layout -\family default - This converter performs the -\begin_inset Quotes eld \end_inset -weaving -\begin_inset Quotes erd -\end_inset - of the literate document. - For Noweb, it is set to -\begin_inset Quotes eld +\begin_inset Newline newline \end_inset -\family typewriter -noweave -delay -index $$i > $$o -\family default +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +git commit +\end_layout -\begin_inset Quotes erd \end_inset \end_layout -\begin_layout Description +\begin_layout Subsubsection \family sans -NoWeb -\family default --> -\family sans -Program -\family default - This performs the -\begin_inset Quotes eld -\end_inset - -tangling step -\begin_inset Quotes erd -\end_inset - -. - As stated above, the Converter is set to -\begin_inset Quotes eld -\end_inset - +Show History +\end_layout +\begin_layout Standard +This shows the complete history of the GIT document. + The output of \family typewriter -build-script $$i -\family default - $$r -\begin_inset Quotes erd +git log +\begin_inset Quotes qld \end_inset -, with Flags set to -\begin_inset Newline newline + +\begin_inset Quotes qld \end_inset -\begin_inset Quotes eld -\end_inset +\family default + is shown in a browser. +\end_layout +\begin_layout Subsubsection +Version Info +\end_layout +\begin_layout Standard +\SpecialChar LyX + supports GIT hash number of the last commit to the file, +\change_inserted 1119979965 1564297456 +its abbreviated form, +\change_unchanged +author name, date and time of last commit. + All those are extracted from \family typewriter -parselog=$$s/scripts/listerrors +git log -n 1 --pretty=format:%H%n +\change_inserted 1119979965 1564297427 +%h%n +\change_unchanged +%an%n%ai +\family default +. + Tree version information is obtained via +\family typewriter +git describe --abbrev --dirty --long \family default +. + See +\begin_inset CommandInset ref +LatexCommand ref +reference "subsec:VCS-Revision-Information" -\begin_inset Quotes erd \end_inset -. + for other details. \end_layout -\begin_layout Subsubsection -Debug extensions +\begin_layout Subsection +Further tuning \end_layout \begin_layout Standard -There is also a new function implemented in the \SpecialChar LyX - server, the -\begin_inset Quotes eld +With the recent addition of the +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +vc-command +\end_layout + \end_inset -server-goto-file-row" function, to be used with ddd/gdb or other debugger. - + function \SpecialChar LyX + power users are allowed to create their own commands for revision + control. \end_layout \begin_layout Standard -When debugging code with ddd/gdb, it is possible to invoke a text editor - at the current execution position with a single key stroke. - The default ddd configuration for that is shift-ctrl-V. - It happens that you can define the editor command line invocation in ddd - by accessing the -\family sans -Edit\SpecialChar menuseparator -Preferences\SpecialChar menuseparator -Helpers -\family default - dialog and changing the "Edit Sources" entry. +As an example you can see how two TortoiseSVN commands could be integrated + directly: \end_layout -\begin_layout Standard -I take advantage of the newly created \SpecialChar LyX - server function and this ddd feature, - and set -\begin_inset Quotes eld -\end_inset +\begin_layout Description +Commit: +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +vc-command DR "." "TortoiseProc /command:commit /path:$$p" +\end_layout -Edit Sources -\begin_inset Quotes erd \end_inset - to: + \end_layout -\begin_layout LyX-Code -echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in +\begin_layout Description +Revert: +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +vc-command DR "." "TortoiseProc /command:revert /path:$$p" \end_layout -\begin_layout Standard -With this, whenever you are using ddd and find a point in the program that - you want to edit, you just press shift-ctrl-V (in the ddd window), and - ddd will forward this information to \SpecialChar LyX - through the \SpecialChar LyX - server and then the - \SpecialChar LyX - window will show the same file with the cursor at the same position ddd - was pointing to. - No more guessing or long scrolling to locate a point in the program back - from debugging ! +\end_inset + + +\end_layout + +\begin_layout Subsection +Version control and Document comparison \end_layout \begin_layout Standard -Note however that you must enable the \SpecialChar LyX - server to get this feature working - (it is disabled by default). - Sec. -\begin_inset space ~ +One of the typical uses of version control is to inspect the changes between + revisions, usually by creating +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +diff +\end_layout + \end_inset + dumps. + While this is useful for plain text files, it is much less useful in the + case of \SpecialChar LyX + files, which have more a complicated structure. + Hence we provide binding to the Document comparison feature. + There are two ways of calling this feature – either by direct call of +\begin_inset Flex Code +status collapsed -\begin_inset CommandInset ref -LatexCommand ref -reference "sec:Starting-the-Server" +\begin_layout Plain Layout +vc-compare +\end_layout \end_inset - explains how to do that. -\end_layout + \SpecialChar LyX + function (for details see \SpecialChar LyX + functions manual) or by the toolbar icon +\begin_inset Info +type "icon" +arg "vc-compare" +\end_inset -\begin_layout Subsubsection -Toolbar extensions -\end_layout + or the menu item +\begin_inset Info +type "menu" +arg "vc-compare" +\end_inset -\begin_layout Standard -There are six new buttons that can be added to your \SpecialChar LyX - toolbar. - Four of these buttons are short cuts to layout styles: -\family sans -Standard -\family default -, -\family sans -Section -\family default -, -\family sans -\SpecialChar LaTeX +, respectively. + One can either compare two chosen revisions of the document or he can simply + compare the current version of edited text with older revisions (where + ' +\begin_inset Flex Noun +status collapsed -\family default -, and -\family sans -\SpecialChar LyX --Code -\family default -, one for the custom inset -\family sans -Chunk -\family default -. - The last one is a short cut to the -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout +0 +\end_layout -Build Program -\begin_inset Quotes erd \end_inset - File menu entry. +' revisions back means comparison of the edited file with last commited + revision). \end_layout \begin_layout Standard -\SpecialChar LyX - has a range of buttons that are available for tool bar customization. - In my toolbar I like to combine the six short cuts above with two more: - One for -\family sans -Document -\family default -\SpecialChar menuseparator - -\family sans -Update -\family default -\SpecialChar menuseparator +This feature is supported for SVN and RCS though due to the more complicated + versioning scheme of RCS there is a constraint – when addressing the revisions + in dialog, numbers always point to the last number in RCS revision number, + i.e. + '35' in '1.2.35'. + We don't currently support GIT addressing of revisions, one can just compare + edited document with its revision X steps backs, where X is addressed as + +\begin_inset Flex Code +status collapsed -\family sans -DVI -\family default - and the other for -\family sans -Document\SpecialChar menuseparator -View\SpecialChar menuseparator -DVI -\family default - File menu entries. - Here is how it looks like: +\begin_layout Plain Layout +HEAD~X \end_layout -\begin_layout LyX-Code -Toolbar -\end_layout +\end_inset -\begin_layout LyX-Code - Layouts +. \end_layout -\begin_layout LyX-Code - Icon "layout Standard" +\begin_layout Section +Literate Programming \end_layout -\begin_layout LyX-Code - Icon "layout Section" -\end_layout +\begin_layout Standard +Updated by +\noun on +Kayvan Sylvan +\noun default +(kayvan@sylvan.com) +\noun on +, +\noun default +original documentation written by +\noun on +Edmar Wienskoski Jr. -\begin_layout LyX-Code - Icon "layout \SpecialChar LaTeX -" +\noun default + (edmar-w-jr@technologist.com) \end_layout -\begin_layout LyX-Code - Icon "layout \SpecialChar LyX --Code" +\begin_layout Subsection +Introduction \end_layout -\begin_layout LyX-Code - Icon "flex.insert Chunk" -\end_layout +\begin_layout Standard +The main purpose of this documentation is to show you how to use \SpecialChar LyX + for literate + programming, where it is assumed that you are familiar with this programming + technique, and know what +\begin_inset Quotes eld +\end_inset -\begin_layout LyX-Code - Separator -\end_layout +tangling +\begin_inset Quotes erd +\end_inset -\begin_layout LyX-Code - Icon "buffer-view" + and +\begin_inset Quotes eld +\end_inset + +weaving +\begin_inset Quotes erd +\end_inset + + means. + If that is not the case, please follow the web links provided in the following + sections. + There is a lot of good documentation out there covering old development + history to the latest tools tips. \end_layout -\begin_layout LyX-Code - Icon "buffer-typeset" +\begin_layout Standard +It is also assumed that you are familiar with \SpecialChar LyX + itself to a point that you + are comfortable changing your \SpecialChar LyX + preferences, and X resources file. + If that is not the case please refer to other \SpecialChar LyX + documentation to cover your + specific needs. \end_layout -\begin_layout LyX-Code - Icon "build-program" +\begin_layout Subsection +Literate Programming \end_layout -\begin_layout LyX-Code - Separator +\begin_layout Standard +From the Literate Programming FAQ: \end_layout -\begin_layout LyX-Code -. +\begin_layout Quotation +Literate programming is the combination of documentation and source together + in a fashion suited for reading by human beings. + In fact, literate programs should be enjoyable reading, even inviting! + (Sorry Bob, I couldn't resist!) In general, literate programs combine source + and documentation in a single file. + Literate programming tools then parse the file to produce either readable + documentation or compilable source. + The WEB style of literate programming was created by D. +\begin_inset space \thinspace{} +\end_inset + +E. + Knuth during the development of his \SpecialChar TeX + typesetting software. + \end_layout -\begin_layout LyX-Code -. +\begin_layout Standard +Another excerpt says: \end_layout -\begin_layout LyX-Code -. +\begin_layout Quotation + +\emph on +How is literate programming different from verbose commenting? \end_layout -\begin_layout LyX-Code -End +\begin_layout Quotation +There are three distinguishing characteristics. + In order of importance, they are: \end_layout -\begin_layout Subsubsection -Colors customization +\begin_deeper +\begin_layout Itemize +flexible order of elaboration \end_layout -\begin_layout Standard -There are a number of colors in \SpecialChar LyX - that can be customized in -\family sans -Preferences -\family default -. - One of the things that bothers people is the \SpecialChar LaTeX - font color. - The default color is red, since the chunks uses \SpecialChar LaTeX - font, and there is a lot - of chunks in literate documents, you may get tired of seeing everything - in red. - You can change it by going to the tabs -\family sans -Look&Feel -\family default -, -\family sans -Colors. +\begin_layout Itemize +automatic support for browsing \end_layout +\begin_layout Itemize +typeset documentation, especially diagrams and mathematics +\end_layout + +\end_deeper \begin_layout Standard -The next thing is the visible presence of the newline character in the screen. - You can choose the color of this particular character and make it blend - in the background. - I recommend you choosing a color that is close to the background but not - equal, that way you still can see it is there, but it is not bothering - you anymore. +Now that I sparked your curiosity, take a look in the references. \end_layout -\begin_layout Subsection -\SpecialChar LyX - and knitr/Sweave +\begin_layout Subsubsection +References \end_layout \begin_layout Standard -Support for -\family sans -knitr -\family default - and -\family sans -Sweave -\family default - is documented in the -\emph on -knitr.lyx -\emph default - example file and in the Sweave manual (menu -\family sans -Help\SpecialChar menuseparator -Specific Manuals -\family default -). +The complete Literate Programming FAQ can be found at: \end_layout -\begin_layout Chapter -Special features +\begin_layout Quote +Literate Programming FAQ +\begin_inset Flex URL +status open + +\begin_layout Plain Layout + +http://www.literateprogramming.com/lpfaq.pdf +\end_layout + +\end_inset + + \end_layout \begin_layout Standard -You can do everything with \SpecialChar LyX - that you can do with \SpecialChar LaTeX -. - However, \SpecialChar LyX - cannot support every \SpecialChar LaTeX - feature directly. - But you can always use \SpecialChar TeX - Code. - This chapter shows you some more special things you might want to use. - For other special things you can do with figures, tables, floats, boxes - and notes, have a look at the -\emph on -Embedded -\begin_inset space ~ +The FAQ lists 23 (twenty three!) different literate programming tools. + Where some are specialized or +\begin_inset Quotes eld \end_inset -Objects -\emph default - manual. +tailored +\begin_inset Quotes erd +\end_inset + + for particular programming languages, while other have general scope. + I selected +\noun on +Noweb +\noun default + for my own use for several reasons: \end_layout -\begin_layout Section -Non-standard Paragraph Shapes +\begin_layout Itemize +It can generate the documentation either in \SpecialChar LaTeX + or HTML. \end_layout -\begin_layout Standard -\noindent -\SpecialChar LaTeX - as well as any other text processor uses by default rectangular paragraphs. - For special cases like for example posters, invitation cards or poems you - can modify the paragraph shape to one of your choice. - This can be done by using the \SpecialChar LaTeX --package -\begin_inset Flex Code +\begin_layout Itemize +It has a open architecture, i. +\begin_inset space \thinspace{} +\end_inset + +e. +\begin_inset space \space{} +\end_inset + +it is easy to plug in new filters +\begin_inset Foot status collapsed \begin_layout Plain Layout -shapepar + +\emph on +Filters +\emph default +are programs that read a given data stream and output a manipulated data + stream. + That way, a WEB file (consisting of literate code) can be turned into a + file consisting only of C program code or \SpecialChar LaTeX + code. \end_layout \end_inset - which is loaded by using in the document settings the module -\family sans -Custom paragraph shapes -\family default -. + and to perform special processing that you may need. + \end_layout -\begin_layout Subsection -Predefined shapes +\begin_layout Itemize +There is a good selection of filters available already (the HTML is one + of them). \end_layout -\begin_layout Standard - -\series bold -shapepar -\series default - provides the following shapes: +\begin_layout Itemize +It is free. \end_layout \begin_layout Standard -\begin_inset Tabular - - - - - - - -\begin_inset Text +The Noweb web page can be found at: +\end_layout + +\begin_layout Quote +Noweb home page +\begin_inset Flex URL +status collapsed \begin_layout Plain Layout -\series bold -\size small -Name +https://www.cs.tufts.edu/~nr/noweb/ \end_layout \end_inset - - -\begin_inset Text -\begin_layout Plain Layout -\series bold -\size small -Description \end_layout +\begin_layout Standard +Starting from there you can reach many other interesting links and even + some literate program examples. +\end_layout + +\begin_layout Subsection +\SpecialChar LyX + and Literate Programming with Noweb +\end_layout + +\begin_layout Standard +The \SpecialChar LyX + support for Literate Programming is provided by using the generic \SpecialChar LyX + + converters mechanism. + This support is provided in a +\begin_inset Quotes eld \end_inset - - -\begin_inset Text -\begin_layout Plain Layout +Noweb independent +\begin_inset Quotes erd +\end_inset -\series bold -\size small -Annotation -\end_layout + way, i. +\begin_inset space \thinspace{} +\end_inset +e. +\begin_inset space \space{} \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout +you will be able to use this new \SpecialChar LyX + feature with some other literate programming + tool of your choice by just changing your \SpecialChar LyX + preferences. +\end_layout -\size small -CDlabel +\begin_layout Subsubsection +Generating documents and code (weaving and tangling) +\end_layout + +\begin_layout Paragraph +Using the noweb module \end_layout +\begin_layout Standard +If you have installed Noweb and \SpecialChar LyX + successfully, whenever you open a new document, + after you have chosen its document class, use the +\family sans +Document\SpecialChar menuseparator +Settings +\family default + menu to add the +\begin_inset Quotes eld +\end_inset + +noweb +\begin_inset Quotes erd \end_inset - - -\begin_inset Text -\begin_layout Plain Layout + module. + If Noweb is correctly installed, when you click on the +\begin_inset Quotes eld +\end_inset -\size small -Circle with circular hole (in the size of a CD/DVD) -\end_layout +Modules +\begin_inset Quotes erd +\end_inset + link, you will see the +\begin_inset Quotes eld \end_inset - - -\begin_inset Text -\begin_layout Plain Layout +noweb +\begin_inset Quotes erd +\end_inset -\size small -Cannot be scaled, take care there is not too much text + module in the available list and you can add it to your document. +\end_layout + +\begin_layout Paragraph +Typing code in \end_layout -\end_inset - - - - -\begin_inset Text +\begin_layout Standard +\SpecialChar LyX + enables you to write code with a custom inset named +\begin_inset Flex Noun +status collapsed \begin_layout Plain Layout - -\size small -Circle +Chunk \end_layout \end_inset - - -\begin_inset Text -\begin_layout Plain Layout +. + Noweb delimits chunks like this: +\end_layout -\size small -Circle +\begin_layout LyX-Code +<>= \end_layout -\end_inset - - -\begin_inset Text +\begin_layout LyX-Code + code +\end_layout -\begin_layout Plain Layout +\begin_layout LyX-Code + more code +\end_layout -\size small -Fragile, calculation might fail +\begin_layout LyX-Code + even more code +\end_layout + +\begin_layout LyX-Code + @ \end_layout +\begin_layout Standard +The problem is that whatever is written in between the << and the +\family typewriter +@ +\family default + must be taken literally, i. +\begin_inset space \thinspace{} \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout +e. +\begin_inset space \space{} +\end_inset -\size small -Diamond +\SpecialChar LyX + should be prevented from making any special interpretation of what has + been written. + This is also handled by +\begin_inset Flex Noun +status collapsed + +\begin_layout Plain Layout +Chunk \end_layout \end_inset - - -\begin_inset Text -\begin_layout Plain Layout +, that works like a normal text inset but has a free spacing capability. +\end_layout -\size small -Rhomboid (symbolizing a +\begin_layout Standard +As a special note, you can also use the \begin_inset Quotes eld \end_inset -diamond +%def \begin_inset Quotes erd \end_inset -) + construct of Noweb in your chunks to add items to Noweb's identifier cross-refe +rence: \end_layout -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout - -\size small -- +\begin_layout LyX-Code +<>= \end_layout -\end_inset - - - - -\begin_inset Text +\begin_layout LyX-Code +def some_function(args): +\end_layout -\begin_layout Plain Layout +\begin_layout LyX-Code + "This is the doc string for this function." +\end_layout -\size small -Heart +\begin_layout LyX-Code + print "My args: ", args \end_layout -\end_inset - - -\begin_inset Text +\begin_layout LyX-Code +@ %def some_function +\end_layout -\begin_layout Plain Layout +\begin_layout Standard +For an example of this usage and the resulting cross-reference output, look + at the Literate python program in +\emph on +LIBDIR/examples/listerrors.lyx +\emph default + which should make this all clear. +\end_layout -\size small -Heart-like shape +\begin_layout Paragraph +Generating the documentation \end_layout -\end_inset - - -\begin_inset Text +\begin_layout Standard +At this point you already have a new document file with a proper document + class, and with some code and text on it. + How do I print it? The answer is simple, you select +\family sans +View\SpecialChar menuseparator +DVI, +\family default + etc. + Just like you would do for a plain document. + No special procedure is required. +\end_layout -\begin_layout Plain Layout +\begin_layout Standard +To help orientate you, I will now explain what happens inside \SpecialChar LyX +: +\end_layout -\size small -- +\begin_layout Enumerate +When the +\family sans +Update\SpecialChar menuseparator +DVI +\family default + menu option is chosen, a \SpecialChar LaTeX + file is generated. + \end_layout +\begin_deeper +\begin_layout Standard +If the document is of any literate class the generated file will be named + with an extension name defined by the +\begin_inset Quotes eld \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout +literate +\begin_inset Quotes erd +\end_inset -\size small -Hexagon + format (defined in the Preferences panel), otherwise the file will have + the usual +\family typewriter +.tex +\family default + extension. \end_layout -\end_inset - - -\begin_inset Text +\end_deeper +\begin_layout Enumerate +Note that the only difference so far is in the name of the file, no special + processing is required by \SpecialChar LyX +. + Given that you formatted the code using the +\begin_inset Flex Noun +status collapsed \begin_layout Plain Layout - -\size small -Hexagon +Chunk \end_layout \end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -\size small -- + inset that, by itself, takes care of the business. \end_layout -\end_inset - - - - -\begin_inset Text +\begin_layout Enumerate +If the document is of any literate class \SpecialChar LyX + will then use the internal \SpecialChar LyX + to + Noweb converter, followed by the Noweb to \SpecialChar LaTeX + converter +\begin_inset Foot +status collapsed \begin_layout Plain Layout - -\size small -Nut -\end_layout - +The converters are defined in the +\family sans +Tools\SpecialChar menuseparator +Preferences +\family default + panel, under the +\begin_inset Quotes eld \end_inset - - -\begin_inset Text -\begin_layout Plain Layout +Conversion +\begin_inset Quotes erd +\end_inset -\size small -Nut for bolt (hexagon with circular hole) + tab. + See section +\emph on +Converters +\emph default + of the +\emph on +Customization +\emph default + manual for general information about converters. \end_layout \end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -\size small -- + to generate the \SpecialChar LaTeX + file. \end_layout -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout +\begin_deeper +\begin_layout Standard +Otherwise it will just skip this step. +\end_layout -\size small -Square +\end_deeper +\begin_layout Enumerate +Finally, \SpecialChar LaTeX + is invoked and the regular post processing continues as in a plain + document. \end_layout +\begin_layout Standard +Independence from a particular +\begin_inset Quotes eld \end_inset - - -\begin_inset Text - -\begin_layout Plain Layout - -\size small -Square -\end_layout +literate tool +\begin_inset Quotes erd \end_inset - - -\begin_inset Text -\begin_layout Plain Layout + is easily achieved by changing the commands that are run by the various + converters. +\end_layout -\size small -- +\begin_layout Paragraph +Generating the code \end_layout -\end_inset - - - - -\begin_inset Text +\begin_layout Standard +When the build menu option is chosen or the corresponding button in the + toolbar is pressed, a \SpecialChar LaTeX + file is generated just like step 1 above. + Next, \SpecialChar LyX + invokes the +\family typewriter +Noweb->Program +\family default + converter. + This converter needs to be defined by the user and is not installed by + default, though the Program format is. + This converter (like any other converter) will have two parts: +\end_layout -\begin_layout Plain Layout +\begin_layout Enumerate +The converter program itself. + This program performs the conversion from the one format to the other (in + this case, from the Noweb format to the Program pseudo-format). +\end_layout -\size small -Star +\begin_layout Enumerate +The error log parser. + This is a program whose sole purpose is to rewrite error messages in a + format that \SpecialChar LyX + understands. + This makes it possible for \SpecialChar LyX + to place error boxes in the right places in + the file buffer. \end_layout +\begin_layout Standard +The first part, the +\begin_inset Quotes eld \end_inset - - -\begin_inset Text -\begin_layout Plain Layout +Converter +\begin_inset Quotes erd +\end_inset -\size small -Five-point star + setting, should be set to \end_layout -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout +\begin_layout LyX-Code -\size small -- +\family typewriter +build-script $$i +\family default + $$r \end_layout +\begin_layout Standard +This basically means that \SpecialChar LyX + will call +\begin_inset Quotes eld \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout +build-script +\begin_inset Quotes erd +\end_inset -\size small -Candle + (a program or script) with the name of the Noweb file (normally a file + in the \SpecialChar LyX + temp directory) and the directory path of the original \SpecialChar LyX + file. + \end_layout +\begin_layout Standard +This is an implementation of +\begin_inset Quotes eld \end_inset - - -\begin_inset Text -\begin_layout Plain Layout +build-script +\begin_inset Quotes erd +\end_inset -\size small -Burning candle + that you can place in a directory on your path: \end_layout -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout +\begin_layout LyX-Code -\size small -- +\family sans +#!/bin/sh \end_layout -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout +\begin_layout LyX-Code -\size small -Drop down/up +\family sans +# \end_layout -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout +\begin_layout LyX-Code -\size small -Normal/reversed rain drop +\family sans +notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh \end_layout +\begin_layout Standard +The next part of the converter setting is the +\begin_inset Quotes eld \end_inset - - -\begin_inset Text - -\begin_layout Plain Layout - -\size small -Fragile, calculation might fail -\end_layout +Flags +\begin_inset Quotes erd \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout + which is to be set to +\end_layout -\size small -\SpecialChar TeX +\begin_layout LyX-Code +\family typewriter +parselog=$$s/scripts/listerrors \end_layout +\begin_layout Standard +This will run any errors that are generated by the +\begin_inset Quotes eld \end_inset - - -\begin_inset Text -\begin_layout Plain Layout +build-script +\begin_inset Quotes erd +\end_inset -\size small -The \SpecialChar TeX - logo -\end_layout + process through the +\begin_inset Quotes eld +\end_inset +listerrors +\begin_inset Quotes erd \end_inset - - -\begin_inset Text -\begin_layout Plain Layout + program. +\end_layout -\size small -- +\begin_layout Standard +The build will normally take place in \SpecialChar LyX +'s temporary directory, so the files + produced by the conversion will be in that directory. + \SpecialChar LyX + will copy out what it regards as the `main' file, but the +\family typewriter +Noweb->Program +\family default + conversion may produce several files, and so most of these would then be + deleted when \SpecialChar LyX + was closed. + This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that + the build-script chunk can place the generated files in that location. +\end_layout + +\begin_layout Paragraph +Build instructions in the document \end_layout +\begin_layout Standard +The last piece of the integration between \SpecialChar LyX + and noweb is the +\begin_inset Quotes eld \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout - -\size small -Triangle up/down/ -\begin_inset Newline newline +build-script +\begin_inset Quotes erd \end_inset -left/right -\end_layout - + chunk. + Generally, the instructions for building your program should be embedded + in a chunk of its own. + The noweb-specific +\begin_inset Quotes eld \end_inset - - -\begin_inset Text - -\begin_layout Plain Layout - -\size small -Triangles in different orientations -\end_layout +build-script +\begin_inset Quotes erd \end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -\size small -- -\end_layout + above uses the notangle command to look for this chunk (called +\begin_inset Quotes eld +\end_inset +build-script +\begin_inset Quotes erd \end_inset - - - +) and runs its contents through +\begin_inset Quotes eld \end_inset +sh +\begin_inset Quotes erd +\end_inset +. \end_layout \begin_layout Standard -To use a shape for your paragraph, simply select it in \SpecialChar LyX -'s pull-down box - for environments in the toolbar. +Typically, such a chunk would look something like this: \end_layout -\begin_layout Standard -\begin_inset Newpage newpage -\end_inset +\begin_layout LyX-Code +<>= +\end_layout +\begin_layout LyX-Code +#!/bin/sh +\begin_inset Newline newline +\end_inset -\end_layout +if [ -z "${NOWEB_SOURCE}" ] +\begin_inset Newline newline +\end_inset -\begin_layout Standard -Here is an example paragraph in the shape of a nut: +then \end_layout -\begin_layout Standard -\begin_inset VSpace bigskip +\begin_layout LyX-Code +NOWEB_SOURCE=myfile.nw +\begin_inset Newline newline \end_inset +fi +\begin_inset Newline newline +\end_inset -\end_layout +[... + code to extract files ... + use NOWEB_OUTPUT_DIR here ...] +\begin_inset Newline newline +\end_inset -\begin_layout Nut +[... + code to compile files ...] +\begin_inset Newline newline +\end_inset -\lang latin -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy - eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam - voluptua. - At vero eos et accusam et justo duo dolores et ea rebum. - Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor - sit amet. - Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy - eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam - voluptua. +@ \end_layout \begin_layout Standard -\begin_inset VSpace bigskip +Look in +\emph on +LIBDIR/examples/listerrors.lyx +\emph default + or in +\emph on +LIBDIR/examples/Literate.lyx +\emph default + which implement two versions of the +\begin_inset Quotes eld +\end_inset + +listerrors +\begin_inset Quotes erd \end_inset + program for some illustrations of how all of these pieces go together or + in +\emph on +LIBDIR/examples/noweb2lyx.lyx. +\emph default + Interestingly, these three files show off the language-indepence of the + \SpecialChar LyX + literate programming support since they are written in Python, C and Perl + respectively. \end_layout -\begin_layout Standard -\begin_inset Note Greyedout -status open +\begin_layout Subsubsection +Configuring \SpecialChar LyX -\begin_layout Plain Layout +\end_layout -\series bold -Note -\series default -: +\begin_layout Standard +All the Literate Programming support is configured by the \family sans -shapepar +Tools\SpecialChar menuseparator +Preferences \family default - paragraphs cannot run over a page break. -\end_layout - + panel in the +\begin_inset Quotes eld \end_inset +File Handling +\begin_inset Quotes erd +\end_inset + tab. + The important parts are: \end_layout -\begin_layout Standard -\begin_inset VSpace bigskip +\begin_layout Description +the +\begin_inset space ~ \end_inset -\end_layout +\begin_inset Quotes eld +\end_inset -\begin_layout Standard -The package -\begin_inset Flex Code -status collapsed +NoWeb +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -shapepar -\end_layout +\begin_inset space ~ \end_inset - takes care that the shape will always be preserved, no matter how much - text is in the paragraph. - Therefore the paragraph size changes with the amount of contained text. - This can lead to paragraph sizes exceeding the page margins. - To demonstrate the size scaling, here is the same example paragraph but - with twice as much text: +format Set up via the File Formats tab, this is where the Noweb-specific + pieces are set up. + The +\family sans +GUI Name +\family default + is set to +\family typewriter +NoWeb +\family default +, the file extension is set to +\family typewriter +.nw +\family default +. + This tells \SpecialChar LyX + to create a file with a +\family typewriter +.nw +\family default + extension in the first step of the conversion process. \end_layout -\begin_layout Standard -\begin_inset Newpage newpage +\begin_layout Description +the +\begin_inset space ~ \end_inset -\end_layout - -\begin_layout Nut - -\lang latin -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy - eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam - voluptua. - At vero eos et accusam et justo duo dolores et ea rebum. - Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor - sit amet. - Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy - eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam - voluptua. - Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy - eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam - voluptua. - At vero eos et accusam et justo duo dolores et ea rebum. - Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor - sit amet. - Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy - eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam - voluptua. -\end_layout +\family sans +Program +\family default -\begin_layout Standard -\begin_inset VSpace bigskip +\begin_inset space ~ \end_inset - +format This is an empty format whose sole purpose is to be the endpoint + of a conversion (which then allows us to set up a converter for it). \end_layout -\begin_layout Standard -An exception is the shape -\family sans -CDlabel -\family default -. - It cannot be scaled because it must fit the size of a CD/DVD. - Therefore the amount of text that fits into the shape is limited. -\begin_inset Newline newline -\end_inset +\begin_layout Description -The \family sans -drop +NoWeb \family default - shapes and the +-> \family sans -circle +\SpecialChar LaTeX + \family default - shape are fragile, meaning that the calculation of their size can fail, - depending on the amount of text. - You will then get the \SpecialChar LaTeX - error + This converter performs the \begin_inset Quotes eld \end_inset -Arithmetic overflow +weaving \begin_inset Quotes erd \end_inset -. - In this case one can try to remove or add some text; if nothing works one - has to use another shape. -\end_layout - -\begin_layout Standard -\begin_inset VSpace bigskip -\end_inset - - -\end_layout - -\begin_layout Standard -For shapes with tips you will maybe see that \SpecialChar LaTeX -'s hyphenation routine fails - for text in the tips. - Therefore it is often necessary to add hyphenation points -\family sans -( -\begin_inset Info -type "shortcut" -arg "specialchar-insert hyphenation" + of the literate document. + For Noweb, it is set to +\begin_inset Quotes eld \end_inset +\family typewriter +noweave -delay -index $$i > $$o \family default -) to the corresponding text parts. -\end_layout -\begin_layout Standard -\begin_inset VSpace bigskip +\begin_inset Quotes erd \end_inset \end_layout -\begin_layout Standard -Shapepar paragraphs are either always centered or placed on the page so - that their left border touches the left page margin. - You can therefore not use the paragraph dialog to align such paragraphs. - A solution is to put the paragraph into a minipage or parbox and align - the box. - The problem is hereby to find the right width for the box. - Because if it is too wide and you center the box, the paragraph is not - centered too because it sticks at the left side of the box. - So you might have to play a bit with the width until it fits. - Here are two heart-shaped paragraphs, the first one is not aligned, the - second one is right-aligned: -\end_layout +\begin_layout Description -\begin_layout Standard -\begin_inset Newpage newpage +\family sans +NoWeb +\family default +-> +\family sans +Program +\family default + This performs the +\begin_inset Quotes eld \end_inset +tangling step +\begin_inset Quotes erd +\end_inset -\end_layout - -\begin_layout Heart -\noindent +. + As stated above, the Converter is set to +\begin_inset Quotes eld +\end_inset -\lang latin -Lo\SpecialChar softhyphen -rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy - eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam - voluptua. - At vero eos et accusam et justo duo dolores et ea rebum. - Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor - sit amet. -\end_layout -\begin_layout Standard -\begin_inset VSpace bigskip +\family typewriter +build-script $$i +\family default + $$r +\begin_inset Quotes erd \end_inset +, with Flags set to +\begin_inset Newline newline +\end_inset -\end_layout -\begin_layout Standard -\noindent -\align right -\begin_inset Box Frameless -position "t" -hor_pos "c" -has_inner_box 1 -inner_pos "t" -use_parbox 1 -use_makebox 0 -width "42col%" -special "none" -height "1in" -height_special "totalheight" -thickness "0.4pt" -separation "3pt" -shadowsize "4pt" -framecolor "black" -backgroundcolor "none" -status open +\begin_inset Quotes eld +\end_inset -\begin_layout Heart -\noindent -\lang latin -Lo\SpecialChar softhyphen -rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy - eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam - voluptua. - At vero eos et accusam et justo duo dolores et ea rebum. - Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor - sit amet. -\end_layout +\family typewriter +parselog=$$s/scripts/listerrors +\family default +\begin_inset Quotes erd \end_inset - +. \end_layout -\begin_layout Subsection -Custom shapes +\begin_layout Subsubsection +Debug extensions \end_layout \begin_layout Standard -You can define any shape you want. - Doing this manually is a lot of work because every coordinate must be specified. - But there is a way to let the computer calculate the coordinates: -\end_layout - -\begin_layout Enumerate -Install the program -\begin_inset CommandInset href -LatexCommand href -name "Jpgfdraw" -target "https://www.ctan.org/tex-archive/graphics/jpgfdraw" -literal "false" - +There is also a new function implemented in the \SpecialChar LyX + server, the +\begin_inset Quotes eld \end_inset -. +server-goto-file-row" function, to be used with ddd/gdb or other debugger. + \end_layout -\begin_layout Enumerate -In -\family sans -Jpgfdraw -\family default - go to the menu +\begin_layout Standard +When debugging code with ddd/gdb, it is possible to invoke a text editor + at the current execution position with a single key stroke. + The default ddd configuration for that is shift-ctrl-V. + It happens that you can define the editor command line invocation in ddd + by accessing the \family sans -TeX/LaTeX\SpecialChar menuseparator -Settings\SpecialChar menuseparator -Set Normal Size +Edit\SpecialChar menuseparator +Preferences\SpecialChar menuseparator +Helpers \family default - and select the font size you are using in your document. - For example this document uses the size 12 -\begin_inset space \thinspace{} + dialog and changing the "Edit Sources" entry. +\end_layout + +\begin_layout Standard +I take advantage of the newly created \SpecialChar LyX + server function and this ddd feature, + and set +\begin_inset Quotes eld \end_inset -pt. -\end_layout +Edit Sources +\begin_inset Quotes erd +\end_inset -\begin_layout Enumerate -Draw a shape. + to: \end_layout -\begin_layout Enumerate -Use the menu -\family sans -TeX/LaTeX\SpecialChar menuseparator -Shapepar -\family default - to export the shape to coordinates. - In the appearing dialog use either the outline of your shape for the coordinate -s or the path itself. -\begin_inset Foot -status collapsed +\begin_layout LyX-Code +echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in +\end_layout -\begin_layout Plain Layout -For more information see -\begin_inset CommandInset href -LatexCommand href -target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html" -literal "false" +\begin_layout Standard +With this, whenever you are using ddd and find a point in the program that + you want to edit, you just press shift-ctrl-V (in the ddd window), and + ddd will forward this information to \SpecialChar LyX + through the \SpecialChar LyX + server and then the + \SpecialChar LyX + window will show the same file with the cursor at the same position ddd + was pointing to. + No more guessing or long scrolling to locate a point in the program back + from debugging ! +\end_layout +\begin_layout Standard +Note however that you must enable the \SpecialChar LyX + server to get this feature working + (it is disabled by default). + Sec. +\begin_inset space ~ \end_inset -\end_layout +\begin_inset CommandInset ref +LatexCommand ref +reference "sec:Starting-the-Server" \end_inset - -\end_layout - -\begin_layout Standard -The coordinates are written into a \SpecialChar TeX - file. - To use it for your \SpecialChar LyX - document + explains how to do that. \end_layout -\begin_layout Enumerate -Place the cursor before the first character of your paragraph (or into a - new empty one). +\begin_layout Subsubsection +Toolbar extensions \end_layout -\begin_layout Enumerate -Open in \SpecialChar LyX - the menu +\begin_layout Standard +There are six new buttons that can be added to your \SpecialChar LyX + toolbar. + Four of these buttons are short cuts to layout styles: \family sans -Insert\SpecialChar menuseparator -File\SpecialChar menuseparator -Child -\begin_inset space ~ -\end_inset - -Document +Standard \family default -, select the file and use +, \family sans -Input +Section \family default - as +, \family sans -Include Type. -\end_layout +\SpecialChar LaTeX -\begin_layout Standard -\begin_inset VSpace defskip +\family default +, and +\family sans +\SpecialChar LyX +-Code +\family default +, one for the custom inset +\family sans +Chunk +\family default +. + The last one is a short cut to the +\begin_inset Quotes eld \end_inset +Build Program +\begin_inset Quotes erd +\end_inset + File menu entry. + \end_layout \begin_layout Standard -\begin_inset Note Greyedout -status open +\SpecialChar LyX + has a range of buttons that are available for tool bar customization. + In my toolbar I like to combine the six short cuts above with two more: + One for +\family sans +Document +\family default +\SpecialChar menuseparator -\begin_layout Plain Layout +\family sans +Update +\family default +\SpecialChar menuseparator -\series bold -Note -\series default -: The changed shape only applies to the current paragraph; everything is - reset to normal for the next paragraph. - Therefore the shape definition file must be input into every paragraph - with the desired shape. +\family sans +DVI +\family default + and the other for +\family sans +Document\SpecialChar menuseparator +View\SpecialChar menuseparator +DVI +\family default + File menu entries. + Here is how it looks like: \end_layout -\end_inset +\begin_layout LyX-Code +Toolbar +\end_layout +\begin_layout LyX-Code + Layouts +\end_layout +\begin_layout LyX-Code + Icon "layout Standard" \end_layout -\begin_layout Standard -\begin_inset VSpace bigskip -\end_inset +\begin_layout LyX-Code + Icon "layout Section" +\end_layout +\begin_layout LyX-Code + Icon "layout \SpecialChar LaTeX +" +\end_layout +\begin_layout LyX-Code + Icon "layout \SpecialChar LyX +-Code" \end_layout -\begin_layout Standard -Here is an example: +\begin_layout LyX-Code + Icon "flex.insert Chunk" \end_layout -\begin_layout Standard -\begin_inset VSpace bigskip -\end_inset +\begin_layout LyX-Code + Separator +\end_layout +\begin_layout LyX-Code + Icon "buffer-view" +\end_layout +\begin_layout LyX-Code + Icon "buffer-typeset" \end_layout -\begin_layout Standard -\begin_inset CommandInset include -LatexCommand input -filename "SpecialParagraphShape.tex" -literal "true" +\begin_layout LyX-Code + Icon "build-program" +\end_layout -\end_inset +\begin_layout LyX-Code + Separator +\end_layout +\begin_layout LyX-Code +. +\end_layout -\lang latin -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy - eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam - voluptua. - At vero eos et accusam et justo duo dolores et ea rebum. - Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor - sit amet. - Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy - eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam - voluptua. +\begin_layout LyX-Code +. \end_layout -\begin_layout Standard -\begin_inset VSpace bigskip -\end_inset +\begin_layout LyX-Code +. +\end_layout +\begin_layout LyX-Code +End +\end_layout +\begin_layout Subsubsection +Colors customization \end_layout \begin_layout Standard - -\series bold -A tip: -\series default - to draw complexer shapes in +There are a number of colors in \SpecialChar LyX + that can be customized in \family sans -Jpgfdraw +Preferences \family default - you can draw the shape in a program of your choice and import the resulting - image to +. + One of the things that bothers people is the \SpecialChar LaTeX + font color. + The default color is red, since the chunks uses \SpecialChar LaTeX + font, and there is a lot + of chunks in literate documents, you may get tired of seeing everything + in red. + You can change it by going to the tabs \family sans -Jpgfdraw +Look&Feel \family default -. - Then you only need to draw a line or spline along the outline of the image. +, +\family sans +Colors. \end_layout \begin_layout Standard -\begin_inset VSpace bigskip -\end_inset - +The next thing is the visible presence of the newline character in the screen. + You can choose the color of this particular character and make it blend + in the background. + I recommend you choosing a color that is close to the background but not + equal, that way you still can see it is there, but it is not bothering + you anymore. +\end_layout +\begin_layout Subsection +\SpecialChar LyX + and knitr/Sweave \end_layout \begin_layout Standard -The module +Support for \family sans -Custom paragraph shapes +knitr \family default - also provides the two commands + and \family sans -shapepar +Sweave \family default - and + is documented in the +\emph on +knitr.lyx +\emph default + example file and in the Sweave manual (menu \family sans -Shapepar +Help\SpecialChar menuseparator +Specific Manuals \family default - which can be used to define custom shapes coordinate by coordinate. -\begin_inset Foot -status collapsed - -\begin_layout Plain Layout -These commands are internally used for all shapes described here. +). \end_layout -\end_inset - - For information how these styles are used and about further customization - possibilities, have a look at the -\begin_inset CommandInset href -LatexCommand href -name "documentation" -target "https://www.ctan.org/tex-archive/macros/latex/contrib/shapepar/shapepar.pdf" -literal "false" - -\end_inset - - of the package -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -shapepar +\begin_layout Chapter +Special features \end_layout +\begin_layout Standard +You can do everything with \SpecialChar LyX + that you can do with \SpecialChar LaTeX +. + However, \SpecialChar LyX + cannot support every \SpecialChar LaTeX + feature directly. + But you can always use \SpecialChar TeX + Code. + This chapter shows you some more special things you might want to use. + For other special things you can do with figures, tables, floats, boxes + and notes, have a look at the +\emph on +Embedded +\begin_inset space ~ \end_inset -. +Objects +\emph default + manual. \end_layout \end_body