From 357c7ab0237cecbd51c6ab243708bcef60586ae7 Mon Sep 17 00:00:00 2001 From: John R Hudson Date: Fri, 16 Dec 2022 10:22:39 +0000 Subject: [PATCH] Create new Chapter 4 Modules and move Multiple text columns section into it --- lib/doc/Additional.lyx | 20022 ++++++++++++++++++++------------------- 1 file changed, 10014 insertions(+), 10008 deletions(-) diff --git a/lib/doc/Additional.lyx b/lib/doc/Additional.lyx index e3f0a51210..fa282c7bb8 100644 --- a/lib/doc/Additional.lyx +++ b/lib/doc/Additional.lyx @@ -12167,313 +12167,375 @@ INSERT — cut to close-up of \end_layout \begin_layout Chapter -Supplemental Tools + +\change_inserted 564990737 1671185876 +Modules \end_layout \begin_layout Section -Customizing Bibliographies with Bib\SpecialChar TeX - or Biblatex +Multiple Text Columns \end_layout \begin_layout Standard -The most basic information about how to use Bib\SpecialChar TeX - or +This feature is independent of the option \family sans -Biblatex +Two-column document +\family default + in the document settings under +\family sans +Text Layout \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 + If you want to have 2 +\begin_inset space ~ +\end_inset -\begin_layout Subsection -Alternative Citation Styles +columns for the whole document, it is recommended to use the +\family sans +Two-column document +\family default + option. + For all other cases use this feature. \end_layout \begin_layout Standard -Standard Bib\SpecialChar TeX - uses numbers (e. -\begin_inset space \thinspace{} -\end_inset +To use multiple text columns in your document, you have to load the module + +\family sans +Multiple Columns +\family default + (menu +\family sans +Document\SpecialChar menuseparator +Settings\SpecialChar menuseparator +Modules +\family default +) and must have the \SpecialChar LaTeX +-package +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +multicol +\end_layout -g. -\begin_inset space \space{} \end_inset + installed. +\end_layout -\begin_inset Quotes eld -\end_inset +\begin_layout Standard +Footnotes within multiple columns will be placed at the bottom of the page + and not under each column. + Within the different columns you can use everything, with the limitation + that for floats you need to use the float option +\family sans +Span columns +\family default +. +\end_layout -[12] -\begin_inset Quotes erd -\end_inset +\begin_layout Subsection +Basics +\end_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{} +\begin_layout Standard +If you want to have 2 +\begin_inset space ~ \end_inset -g. -\begin_inset space \space{} +columns in your text, insert a multicolumn inset via the menu +\family sans +Insert\SpecialChar menuseparator +Custom +\begin_inset space ~ \end_inset - -\begin_inset Quotes eld +Insets\SpecialChar menuseparator +Multiple +\begin_inset space ~ \end_inset -Knuth 1984a -\begin_inset Quotes erd +Columns +\family default + where the columns should start. + Write all text that should be printed in 2 +\begin_inset space ~ \end_inset -). - \SpecialChar LyX - supports three packages that provide this style, -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -biblatex +columns into this inset. \end_layout -\end_inset - -, -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -natbib +\begin_layout Standard +Here is an example: \end_layout -\end_inset - -, and -\begin_inset Flex Code -status collapsed +\begin_layout Standard +\noindent +\begin_inset Flex Multiple Columns +status open \begin_layout Plain Layout -jurabib -\end_layout +\noindent + +\series bold +\size small +The Adventure of the Empty House +\series default +\begin_inset Newline newline \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 +by Sir Arthur Conan Doyle +\end_layout \begin_layout Plain Layout -natbib + +\size small +It was in the spring of the year 1894 that all London was interested, and + the fashionable world dismayed, by the murder of the Honourable Ronald + Adair under most unusual and inexplicable circumstances. + The public has already learned those particulars of the crime which came + out in the police investigation, but a good deal was suppressed upon that + occasion, since the case for the prosecution was so overwhelmingly strong + that it was not necessary to bring forward all the facts. + Only now, at the end of nearly ten years, am I allowed to supply those + missing links which make up the whole of that remarkable chain. + The crime was of interest in itself, but that interest was as nothing to + me compared to the inconceivable sequel, which afforded me the greatest + shock and surprise of any event in my adventurous life. + Even now, after this long interval, I find myself thrilling as I think + of it, and feeling once more that sudden flood of joy, amazement, and increduli +ty which utterly submerged my mind. + Let me say to that public, which has shown some interest in those glimpses + which I have occasionally given them of the thoughts and actions of a very + remarkable man, that they are not to blame me if I have not shared my knowledge + with them, for I should have considered it my first duty to do so, had + I not been barred by a positive prohibition from his own lips, which was + only withdrawn upon the third of last month. \end_layout \end_inset -, then the established -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -natbib \end_layout +\begin_layout Standard +To get 3 or more columns, set the cursor into the multicolumn inset and + use the menu +\family sans +Insert\SpecialChar menuseparator +Number +\begin_inset space ~ \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 +of +\begin_inset space ~ +\end_inset -\begin_layout Plain Layout -jurabib -\end_layout +Columns +\family default +. + The number of the desired columns is written into that inset (for 3 +\begin_inset space ~ +\end_inset +columns write +\begin_inset Quotes eld \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 +3 +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -biblatex -\end_layout +). +\begin_inset Newline newline +\end_inset +Here is an example with 3 +\begin_inset space ~ \end_inset -, which exceeds all other packages in terms of features, but is also quite - heavy and more resource-hungry. +columns: \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 +\begin_inset Flex Multiple Columns +status open \begin_layout Plain Layout -Document\SpecialChar menuseparator -Settings -\end_layout - -\end_inset - and select under -\begin_inset Flex Noun -status collapsed +\size footnotesize +\begin_inset Argument 1 +status open \begin_layout Plain Layout -Bibliography + +3 \end_layout \end_inset - the -\begin_inset Flex Noun -status collapsed - -\begin_layout Plain Layout -Style Format +It can be imagined that my close intimacy with Sherlock Holmes had interested + me deeply in crime, and that after his disappearance I never failed to + read with care the various problems which came before the public. + And I even attempted, more than once, for my own private satisfaction, + to employ his methods in their solution, though with indifferent success. + There was none, however, which appealed to me like this tragedy of Ronald + Adair. + As I read the evidence at the inquest, which led up to a verdict of willful + murder against some person or persons unknown, I realized more clearly + than I had ever done the loss which the community had sustained by the + death of Sherlock Holmes. + There were points about this strange business which would, I was sure, + have specially appealed to him, and the efforts of the police would have + been supplemented, or more probably anticipated, by the trained observation + and the alert mind of the first criminal agent in Europe. + All day, as I drove upon my round, I turned over the case in my mind and + found no explanation which appeared to me to be adequate. + At the risk of telling a twice-told tale, I will recapitulate the facts + as they were known to the public at the conclusion of the inquest. \end_layout \end_inset - -\begin_inset Flex Noun -status collapsed -\begin_layout Plain Layout -Basic (BibTeX) \end_layout +\begin_layout Standard +You can have up to 10 +\begin_inset space ~ \end_inset -, -\begin_inset Flex Noun -status collapsed - -\begin_layout Plain Layout -Biblatex +columns if you want to, but that might not be very pleasant for the readers + of your document. \end_layout +\begin_layout Standard +\begin_inset Newpage newpage \end_inset -, -\begin_inset Flex Noun -status collapsed -\begin_layout Plain Layout -Biblatex (Natbib mode) \end_layout -\end_inset - -, -\begin_inset Flex Noun -status collapsed - -\begin_layout Plain Layout -Natbib (BibTeX) +\begin_layout Subsection +Columns inside Columns \end_layout -\end_inset +\begin_layout Standard +You can also have columns inside columns: +\end_layout - or -\begin_inset Flex Noun -status collapsed +\begin_layout Standard +\begin_inset Flex Multiple Columns +status open \begin_layout Plain Layout -Jurabib (BibTeX) + +\size footnotesize +The Honourable Ronald Adair was the second son of the Earl of Maynooth, + at that time governor of one of the Australian colonies. + Adair's mother had returned from Australia to undergo the operation for + cataract, and she, her son Ronald, and her daughter Hilda were living together + at 427 Park Lane. \end_layout -\end_inset +\begin_layout Plain Layout +\begin_inset Flex Multiple Columns +status open - (see sec. +\begin_layout Plain Layout + +\size footnotesize +The youth moved in the best society \begin_inset space ~ \end_inset -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 +– had, so far as was known, no enemies and no particular vices. + He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement + had been broken off by mutual consent some months before, and there was + no sign that it had left any very profound feeling behind it. + For the rest {sic} the man's life moved in a narrow and conventional circle, + for his habits were quiet and his nature unemotional. + Yet it was upon this easy-going young aristocrat that death came, in most + strange and unexpected form, between the hours of ten and eleven-twenty + on the night of March 30, 1894. +\end_layout -Knuth 1984 -\begin_inset Quotes erd \end_inset -, -\begin_inset Quotes eld -\end_inset -Knuth (1984) -\begin_inset Quotes erd -\end_inset +\end_layout -, -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout -Knuth, 1984 -\begin_inset Quotes erd +\size footnotesize +Ronald Adair was fond of cards +\begin_inset space ~ \end_inset -, -\begin_inset Quotes eld +– playing continually, but never for such stakes as would hurt him. + He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs. + It was shown that, after dinner on the day of his death, he had played + a rubber of whist at the latter club. + He had also played there in the afternoon. + +\size default + +\size footnotesize +The evidence of those who had played with him +\begin_inset space ~ \end_inset -1984 -\begin_inset Quotes erd +– Mr. + Murray, Sir John Hardy, and Colonel Moran +\begin_inset space ~ \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 +– showed that the game was whist, and that there was a fairly equal fall + of the cards. + Adair might have lost five pounds, but not more. + His fortune was a considerable one, and such a loss could not in any way + affect him. + He had played nearly every day at one club or other, but he was a cautious + player, and usually rose a winner. + It came out in evidence that, in partnership with Colonel Moran, he had + actually won as much as four hundred and twenty pounds in a sitting, some + weeks before, from Godfrey Milner and Lord Balmoral. + So much for his recent history as it came out at the inquest. +\end_layout -\begin_layout Plain Layout -See -\begin_inset Flex URL -status open +\end_inset -\begin_layout Plain Layout -ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/ \end_layout -\end_inset - +\begin_layout Subsection +Advanced Examples +\end_layout +\begin_layout Standard +The examples in this section show some more special features of multiple + columns. \end_layout +\begin_layout Standard +For more features of multiple columns, have a look at the +\begin_inset CommandInset href +LatexCommand href +name "documentation" +target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf" +literal "false" + \end_inset - for + of the \SpecialChar LaTeX +-package \begin_inset Flex Code status collapsed \begin_layout Plain Layout -natbib +multicol \end_layout \end_inset @@ -12481,1521 +12543,1215 @@ natbib . \end_layout -\begin_layout Subsection -Subdivided Bibliographies +\begin_layout Subsubsection +Preface \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 +To add a preface text for multiple columns, set the cursor into the multicolumn + inset and use the menu +\family sans +Insert\SpecialChar menuseparator +Preface +\family default +. + Write your preface text into that inset. +\begin_inset Newline newline \end_inset -must have -\begin_inset Quotes erd +This is an example with some preface text: +\end_layout + +\begin_layout Standard +\begin_inset VSpace bigskip \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 \begin_layout Standard -\SpecialChar LyX - provides native support for one of these packages, -\family typewriter -bibtopic -\family default -. -\begin_inset Foot -status collapsed +\begin_inset Flex Multiple Columns +status open \begin_layout Plain Layout -Available from -\begin_inset Flex URL +\begin_inset Argument 2 status open \begin_layout Plain Layout +And the story continues and continues and continues and continues\SpecialChar ldots -ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/ \end_layout \end_inset +\size small +On the evening of the crime, he returned from the club exactly at ten. + His mother and sister were out spending the evening with a relation. + The servant deposed that she heard him enter the front room on the second + floor, generally used as his sitting-room. + She had lit a fire there, and as it smoked she had opened the window. + No sound was heard from the room until eleven-twenty, the hour of the return + of Lady Maynooth and her daughter. + Desiring to say good-night, she attempted to enter her son's room. + The door was locked on the inside, and no answer could be got to their + cries and knocking. + Help was obtained, and the door forced. + The unfortunate young man was found lying near the table. + His head had been horribly mutilated by an expanding revolver bullet, but + no weapon of any sort was to be found in the room. \end_layout \end_inset - 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 -Sources -\begin_inset Quotes erd -\end_inset +\end_layout - and -\begin_inset Quotes eld -\end_inset - -Scientific works -\begin_inset Quotes erd -\end_inset +\begin_layout Standard +You can also use a section heading as the preface if you use a section command + as \SpecialChar TeX + Code. + For example the command +\end_layout -, you first need to create two bibliographic databases, e. -\begin_inset space \thinspace{} -\end_inset +\begin_layout LyX-Code -g. -\begin_inset space \space{} -\end_inset +\backslash +subsection{subsection title} +\end_layout +\begin_layout Standard +creates a subsection. + In this example the preface is a subsubsection: +\end_layout -\begin_inset Flex Code -status collapsed +\begin_layout Standard +\begin_inset Flex Multiple Columns +status open \begin_layout Plain Layout -sources.bib -\end_layout - -\end_inset +\begin_inset Argument 2 +status open - and -\begin_inset Flex Code +\begin_layout Plain Layout +\begin_inset ERT status collapsed \begin_layout Plain Layout -scientific.bib -\end_layout - -\end_inset - -. - -\end_layout -\begin_layout Standard -Go to -\begin_inset Flex Noun -status collapsed -\begin_layout Plain Layout -Document\SpecialChar menuseparator -Settings +\backslash +subsubsection{ \end_layout \end_inset - and check under -\begin_inset Flex Noun +This is a subsubsection heading as a preface +\begin_inset ERT status collapsed \begin_layout Plain Layout -Bibliography + +} \end_layout \end_inset - the option -\begin_inset Flex Noun -status collapsed -\begin_layout Plain Layout -Subdivided bibliography \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_layout Plain Layout -sources.bib +\size small +A minute examination of the circumstances served only to make the case more + complex. + In the first place, no reason could be given why the young man should have + fastened the door upon the inside. + There was the possibility that the murderer had done this, and had afterwards + escaped by the window. + The drop was at least twenty feet, however, and a bed of crocuses in full + bloom lay beneath. + Neither the flowers nor the earth showed any sign of having been disturbed, + nor were there any marks upon the narrow strip of grass which separated + the house from the road. + Apparently, therefore, it was the young man himself who had fastened the + door. + But how did he come by his death? No one could have climbed up to the window + without leaving traces. + Suppose a man had fired through the window, he would indeed be a remarkable + shot who could with a revolver inflict so deadly a wound. + Again, Park Lane is a frequented thoroughfare; there is a cab stand within + a hundred yards of the house. + No one had heard a shot. \end_layout \end_inset - and a second one for the database -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -scientific.bib \end_layout +\begin_layout Standard +If there is less vertical space than 6 +\begin_inset space ~ \end_inset -. - 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 +text lines is left on the page at the beginning of the multiple columns, + a page break will be inserted before the multiple columns. + Depending on the number of lines of the preface text, you might want to + change this space. + This is done by setting the cursor into the mulitcolumn inset behind the + preface (if there is any) and using the menu +\family sans +Insert\SpecialChar menuseparator +Space +\begin_inset space ~ \end_inset -all cited references -\begin_inset Quotes erd +Before +\begin_inset space ~ \end_inset - of the specified database(s) (which is the default), -\begin_inset Quotes eld +Page +\begin_inset space ~ \end_inset -all uncited references -\begin_inset Quotes erd +Break +\family default +. + Insert into that inset the amount of space like e. +\begin_inset space \thinspace{} \end_inset - or even -\begin_inset Quotes eld +g. +\begin_inset space \space{} \end_inset -all references -\begin_inset Quotes erd -\end_inset -. - This might be useful if you would like to separate your bibliography into - three sections: \begin_inset Quotes eld \end_inset -Cited sources +5cm \begin_inset Quotes erd \end_inset -, -\begin_inset Quotes eld +. +\begin_inset Newline newline \end_inset -Uncited sources -\begin_inset Quotes erd +In this example the space is set to 7 +\begin_inset space ~ \end_inset -, and -\begin_inset Quotes eld -\end_inset +text lines by using +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +7 +\backslash +baselineskip +\end_layout -Scientific works -\begin_inset Quotes erd \end_inset -. - The titles for the sections can be added as ordinary sections or subsections. - Since + (where the command \begin_inset Flex Code status collapsed \begin_layout Plain Layout -bibtopic + +\backslash +baselineskip \end_layout \end_inset - removes the bibliography title, you have to manually re-add that, too (as - a chapter* or section*, for instance). + needs to be inserted as \SpecialChar TeX + code): \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_inset Flex Multiple Columns +status open \begin_layout Plain Layout -Subdivided bibliography -\end_layout - -\end_inset +\begin_inset Argument 3 +status open - 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 +\begin_layout Plain Layout +7 +\begin_inset ERT status collapsed \begin_layout Plain Layout -keywords + + +\backslash +baselineskip \end_layout \end_inset - entry option and then filter bibliography sections by keyword (by adding - -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -keyword=mykeyword \end_layout \end_inset - to the -\begin_inset Flex Noun -status collapsed -\begin_layout Plain Layout -Options +\size small +On the evening of the crime, he returned from the club exactly at ten. + His mother and sister were out spending the evening with a relation. + The servant deposed that she heard him enter the front room on the second + floor, generally used as his sitting-room. + She had lit a fire there, and as it smoked she had opened the window. + No sound was heard from the room until eleven-twenty, the hour of the return + of Lady Maynooth and her daughter. + Desiring to say good-night, she attempted to enter her son's room. + The door was locked on the inside, and no answer could be got to their + cries and knocking. + Help was obtained, and the door forced. + The unfortunate young man was found lying near the table. + His head had been horribly mutilated by an expanding revolver bullet, but + no weapon of any sort was to be found in the room. \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 -\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. - -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -type=book +\begin_layout Subsubsection +Surrounding Space \end_layout -\end_inset - - or +\begin_layout Standard +The amount of space before and after multiple columns can be changed by + changing the length \begin_inset Flex Code status collapsed \begin_layout Plain Layout -nottype=collection -\end_layout - -\end_inset - - to the mentioned -\begin_inset Flex Noun -status collapsed -\begin_layout Plain Layout -Options +\backslash +multicolsep \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 - - to which you can assign individual entries. - Please refer to the Biblatex manual, section -\emph on -Subdivided Bibliographies -\emph default -, for details. +. + For example the command \end_layout -\begin_layout Subsection -Multiple Bibliographies -\begin_inset CommandInset label -LatexCommand label -name "subsec:Multiple-Bibliographies" - -\end_inset - +\begin_layout LyX-Code +\backslash +setlength{ +\backslash +multicolsep}{3cm} \end_layout \begin_layout Standard -Multiple bibliographies, e. +in \SpecialChar TeX + Code changes its value to 3 \begin_inset space \thinspace{} \end_inset -g. -\begin_inset space \space{} +cm. + The change must be made before the multiple columns' start. + The predefined value is 13 +\begin_inset space \thinspace{} \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 +pt. +\end_layout + +\begin_layout Standard +For this example +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Document\SpecialChar menuseparator -Settings\SpecialChar menuseparator -Bibliography + +\backslash +multicolsep \end_layout \end_inset - and select the relevant unit (e. + was set to 2.5 \begin_inset space \thinspace{} \end_inset -g., -\begin_inset Quotes eld -\end_inset - -per section -\begin_inset Quotes erd -\end_inset +cm: +\end_layout -) in the -\begin_inset Flex Noun -status collapsed +\begin_layout Standard +\begin_inset ERT +status open \begin_layout Plain Layout -Multiple Bibliographies + + +\backslash +setlength{ +\backslash +multicolsep}{2.5cm} \end_layout \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_inset Flex Multiple Columns +status open \begin_layout Plain Layout -chapterbib + +\size small +All day I turned these facts over in my mind, endeavouring to hit upon some + theory which could reconcile them all, and to find that line of least resistanc +e which my poor friend had declared to be the starting-point of every investigat +ion. + I confess that I made little progress. + In the evening I strolled across the Park, and found myself about six o'clock + at the Oxford Street end of Park Lane. + A group of loafers upon the pavements, all staring up at a particular window, + directed me to the house which I had come to see. + A tall, thin man with coloured glasses, whom I strongly suspected of being + a plain-clothes detective, was pointing out some theory of his own, while + the others crowded round to listen to what he said. + I got as near him as I could, but his observations seemed to me to be absurd, + so I withdrew again in some disgust. + As I did so I struck against an elderly, deformed man, who had been behind + me, and I knocked down several books which he was carrying. \end_layout \end_inset - 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 +\begin_layout Standard +\begin_inset Note Greyedout +status open -per child document -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout - and do -\emph on -not -\emph default - check -\begin_inset Flex Noun +\series bold +Note: +\series default + The values you set with +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Sectioned Bibliography + +\backslash +setlength \end_layout \end_inset -. - In all other cases, -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -bibtopic + will be used for all following multiple columns until you change them again. \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 -\begin_layout Plain Layout -\SpecialChar TeX - Code \end_layout -\end_inset +\begin_layout Standard +\begin_inset ERT +status collapsed - (see section -\begin_inset space ~ -\end_inset +\begin_layout Plain Layout -\begin_inset CommandInset ref -LatexCommand ref -reference "sec:Inserting-TeX-Code" +\backslash +setlength{ +\backslash +multicolsep}{13pt} +\end_layout \end_inset -), is to use the -\begin_inset Flex Code + +\begin_inset Note Note status collapsed \begin_layout Plain Layout -bibunits +go back to the default \end_layout \end_inset - package. + \end_layout +\begin_layout Standard +\begin_inset Newpage newpage \end_inset - If -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -bibtopic \end_layout -\end_inset +\begin_layout Subsubsection +Column Breaks +\end_layout - is used, \SpecialChar LyX - encloses the specified units in +\begin_layout Standard +A column break can be forced by inserting the command \begin_inset Flex Code status collapsed \begin_layout Plain Layout -bibtopic + +\backslash +columnbreak{} \end_layout \end_inset -'s -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout + as \SpecialChar TeX + Code to that position in the text where the column should be broken. + Note that this leads in most cases to whitespace in the text. +\begin_inset Newline newline +\end_inset -\backslash -begin{btUnit} +Here is an example: \end_layout -\end_inset - - and -\begin_inset Flex Code -status collapsed +\begin_layout Standard +\begin_inset Flex Multiple Columns +status open \begin_layout Plain Layout -\backslash -end{btUnit} -\end_layout +\size small +\begin_inset Quotes eld +\end_inset +You're surprised to see me, sir, +\begin_inset Quotes erd \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 + said he, in a strange, croaking voice. +\end_layout \begin_layout Plain Layout -btUnit + +\size small +I acknowledged that I was. \end_layout +\begin_layout Plain Layout + +\size small +\begin_inset Quotes eld \end_inset -. - So citations outside a defined unit (e. -\begin_inset space \thinspace{} +Well, I've a conscience, sir, and when I chanced to see you go into this + house, as I came hobbling after you, I thought to myself, I'll just step + in and see that kind gentleman, and tell him that if I was a bit gruff + in my manner there was not any harm meant, and that I am much obliged to + him for picking up my books. +\begin_inset Quotes erd \end_inset -g., before the first section if you use + +\end_layout + +\begin_layout Plain Layout + +\size small \begin_inset Quotes eld \end_inset -by section +You make too much of a trifle, \begin_inset Quotes erd \end_inset -) will appear as + said I. + \begin_inset Quotes eld \end_inset -??? +May I ask how you knew who I was? \begin_inset Quotes erd \end_inset -. - You can also create your own units by entering -\begin_inset Flex Code + AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED. +\begin_inset ERT status collapsed \begin_layout Plain Layout + \backslash -begin{btUnit} +columnbreak{} \end_layout \end_inset - and -\begin_inset Flex Code -status collapsed + +\end_layout \begin_layout Plain Layout -\backslash -end{btUnit} -\end_layout +\size small +\begin_inset Quotes eld +\end_inset +Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for + you'll find my little bookshop at the corner of Church Street, and very + happy to see you, I am sure. + Maybe you collect yourself, sir. + Here's +\noun on +British +\begin_inset space ~ \end_inset - as \SpecialChar TeX - code (for instance to work around the mentioned limitation). - Note, though, that -\begin_inset Flex Code -status collapsed +Birds +\noun default +, and +\noun on +Catullus +\noun default +, and +\noun on +The Holy War +\noun default -\begin_layout Plain Layout -btUnit -\end_layout +\begin_inset space ~ +\end_inset +– a bargain, every one of them. + With five volumes you could just fill that gap on that second shelf. + It looks untidy, does it not, sir? +\begin_inset Quotes erd \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 - 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 - -g. - -\begin_inset Quotes eld -\end_inset -Miller 2014b -\begin_inset Quotes erd -\end_inset +\end_layout - if two works of this author from 2014 are in the database, even if only - one is cited). +\begin_layout Subsubsection +Column Separation \end_layout \begin_layout Standard -If you use -\family sans -Biblatex -\family default -, the +The width of the columns is automatically calculated, but you can modify + the space between the columns. + This is done by changing the length \begin_inset Flex Code status collapsed \begin_layout Plain Layout -refsection + +\backslash +columnsep \end_layout \end_inset - option is used instead. - If you need specific units, you can start them with the \SpecialChar TeX - code +. + Its predefined value is 10 +\begin_inset space \thinspace{} +\end_inset + +pt. + Here is an example where \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash -newrefsection +columnsep \end_layout \end_inset - or -\begin_inset Flex Code -status collapsed + is set to 3 +\begin_inset space \thinspace{} +\end_inset + +cm: +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open \begin_layout Plain Layout + \backslash -newrefsegment +setlength{ +\backslash +columnsep}{3cm} \end_layout \end_inset -, respectively. - If you also want to control the end of the unit, use the environment -\begin_inset Flex Code -status collapsed + +\end_layout + +\begin_layout Standard +\begin_inset Flex Multiple Columns +status open \begin_layout Plain Layout -\backslash -begin{refsection} +\size small +My observations of No. +\begin_inset space \space{} +\end_inset + +427 Park Lane did little to clear up the problem in which I was interested. + The house was separated from the street by a low wall and railing, the + whole not more than five feet high. + It was perfectly easy, therefore, for anyone to get into the garden, but + the window was entirely inaccessible, since there was no water pipe or + anything which could help the most active man to climb it. + More puzzled than ever, I retraced my steps to Kensington. + I had not been in my study five minutes when the maid entered to say that + a person desired to see me. + To my astonishment it was none other than my strange old book collector, + his sharp, wizened face peering out from a frame of white hair, and his + precious volumes, a dozen of them at least, wedged under his right arm. \end_layout \end_inset - \SpecialChar ldots - -\begin_inset Flex Code + +\end_layout + +\begin_layout Standard +\begin_inset ERT status collapsed \begin_layout Plain Layout + \backslash -end{refsection} +setlength{ +\backslash +columnsep}{10pt} \end_layout \end_inset - instead. - Note, though, that -\begin_inset Flex Code + +\begin_inset Note Note status collapsed \begin_layout Plain Layout -refsection +go back to the default \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 - -g., at the end of the document). - Select -\begin_inset Quotes eld -\end_inset -all reference units -\begin_inset Quotes erd -\end_inset +\end_layout - 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 +\begin_layout Subsubsection +Vertical Lines \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 - - 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 +Between the columns a rule with a width of the length \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash -begin{document} +columnseprule \end_layout \end_inset - line as well as the -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout - -\backslash -end{document} -\end_layout + is placed. + If this rule width is set to 0 +\begin_inset space \thinspace{} +\end_inset +pt (this is the default), the rule is suppressed. + In the following example the rule is 2 +\begin_inset space \thinspace{} \end_inset - line must be deleted) or else errors will be generated when you try to - make a DVI file. +pt wide: \end_layout \begin_layout Standard -\SpecialChar LyX - allows you to include files quite easily with -\begin_inset Flex Noun -status collapsed +\begin_inset ERT +status open \begin_layout Plain Layout -Insert\SpecialChar menuseparator -Child -\begin_inset space ~ -\end_inset -Document + +\backslash +setlength{ +\backslash +columnseprule}{2pt} \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. - + \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 +\begin_inset Flex Multiple Columns +status open -include -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout -, +\size small \begin_inset Quotes eld \end_inset -input +You're surprised to see me, sir, \begin_inset Quotes erd \end_inset -, and -\begin_inset Quotes eld -\end_inset + said he, in a strange, croaking voice. +\end_layout -verbatim -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout -. - The methods -\begin_inset Quotes eld -\end_inset +\size small +I acknowledged that I was. +\end_layout -include -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout - and +\size small \begin_inset Quotes eld \end_inset -input +Well, I've a conscience, sir, and when I chanced to see you go into this + house, as I came hobbling after you, I thought to myself, I'll just step + in and see that kind gentleman, and tell him that if I was a bit gruff + in my manner there was not any harm meant, and that I am much obliged to + him for picking up my books. \begin_inset Quotes erd \end_inset - are similar in many ways, but there are also some notable differences: + \end_layout -\begin_layout Enumerate -Files that are +\begin_layout Plain Layout + +\size small \begin_inset Quotes eld \end_inset -included +You make too much of a trifle, \begin_inset Quotes erd \end_inset - are typeset beginning on a new page, while files that are + said I. + \begin_inset Quotes eld \end_inset -inputted +May I ask how you knew who I was? \begin_inset Quotes erd \end_inset - are typeset starting on the current page. -\end_layout -\begin_layout Enumerate -\begin_inset Quotes eld -\end_inset +\end_layout -Included -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout - files cannot themselves +\size small \begin_inset Quotes eld \end_inset -include -\begin_inset Quotes erd -\end_inset - - further files ( -\begin_inset Quotes eld +Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for + you'll find my little bookshop at the corner of Church Street, and very + happy to see you, I am sure. + Maybe you collect yourself, sir. + Here's +\noun on +British +\begin_inset space ~ \end_inset -grandchilds -\begin_inset Quotes erd -\end_inset +Birds +\noun default +, and +\noun on +Catullus +\noun default +, and +\noun on +The Holy War +\noun default -). - With -\begin_inset Quotes eld +\begin_inset space ~ \end_inset -input +– a bargain, every one of them. + With five volumes you could just fill that gap on that second shelf. + It looks untidy, does it not, sir? \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 +\end_layout -Include -\begin_inset Quotes erd \end_inset - allow for the output of only selected -\begin_inset Quotes eld -\end_inset -included -\begin_inset Quotes erd -\end_inset +\end_layout - files, while maintaining the actual counters (pagination etc.) and references - (please refer to the section -\emph on -Child -\begin_inset space ~ +\begin_layout Standard +\begin_inset VSpace defskip \end_inset -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 +The rule can be colored by redefining the command +\begin_inset Flex Code +status collapsed -include -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout - is the preferred method for chapters that are outsourced to child documents, - while -\begin_inset Quotes eld -\end_inset +\backslash +columnseprulecolor +\end_layout -input -\begin_inset Quotes erd \end_inset - is more suitable for arbitrary file inheritance. +. + This is done by inserting the command \end_layout -\begin_layout Standard -A -\begin_inset Quotes eld -\end_inset - -verbatim -\begin_inset Quotes erd -\end_inset +\begin_layout LyX-Code - included file allows you to include a file typeset exactly as it appears - in the file, i. -\begin_inset space \thinspace{} -\end_inset - -e. -\begin_inset space \space{} -\end_inset +\backslash +renewcommand{ +\backslash +columnseprulecolor}{ +\backslash +color{red}} +\end_layout -in +\begin_layout Standard +as \SpecialChar TeX + Code before the multicolumn inset. + Replace \begin_inset Flex Code status collapsed \begin_layout Plain Layout -verbatim +red \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 -status collapsed - -\begin_layout Plain Layout -Mark -\begin_inset space ~ -\end_inset - -spaces -\begin_inset space ~ -\end_inset - -in + in this command by a color of your choice. + You can use all pre- and self-defined colors. + See the +\emph on +EmbeddedObjects +\emph default + manual, section +\emph on +Colored \begin_inset space ~ \end_inset -output +Tables +\emph default + for more information about pre- and self-defined colors. + To go back to the default color insert the command \end_layout -\end_inset +\begin_layout LyX-Code - checkbox typesets a mark to unambiguously define the presence of a space. - +\backslash +renewcommand{ +\backslash +columnseprulecolor}{ +\backslash +normalcolor} \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 +Here is the example with a cyan rule and 1 +\begin_inset space \thinspace{} +\end_inset -\begin_layout Subsection -Cross-References Between Files +cm column separation: \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" +\begin_inset ERT status open \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]] -\end_layout - -\end_inset +\backslash +setlength{ +\backslash +columnsep}{1cm} \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 +\begin_layout Plain Layout -buffer -\begin_inset Quotes erd -\end_inset - to use. +\backslash +renewcommand{ +\backslash +columnseprulecolor}{ +\backslash +color{cyan}} \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 -\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. \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 +\begin_inset Flex Multiple Columns +status open -g. - called +\begin_layout Plain Layout + +\size small \begin_inset Quotes eld \end_inset -Childonly +You're surprised to see me, sir, \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. + said he, in a strange, croaking voice. \end_layout -\begin_layout Standard -If you need multiple bibliographies (e. -\begin_inset space \thinspace{} -\end_inset +\begin_layout Plain Layout -g., one per child in the -\emph on -main document -\emph default -), please refer to sec. -\begin_inset space ~ -\end_inset +\size small +I acknowledged that I was. +\end_layout +\begin_layout Plain Layout -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:Multiple-Bibliographies" +\size small +\begin_inset Quotes eld +\end_inset +Well, I've a conscience, sir, and when I chanced to see you go into this + house, as I came hobbling after you, I thought to myself, I'll just step + in and see that kind gentleman, and tell him that if I was a bit gruff + in my manner there was not any harm meant, and that I am much obliged to + him for picking up my books. +\begin_inset Quotes erd \end_inset -. -\end_layout -\begin_layout Section -\SpecialChar LyX - Archives \end_layout -\begin_layout Standard -Users sometimes need to be able to +\begin_layout Plain Layout + +\size small \begin_inset Quotes eld \end_inset -bundle +You make too much of a trifle, \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 + said I. + +\begin_inset Quotes eld +\end_inset +May I ask how you knew who I was? +\begin_inset Quotes erd \end_inset -) that automates this process. - To use it, you must have either the -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -zipfile \end_layout -\end_inset - - or -\begin_inset Flex Code -status collapsed - \begin_layout Plain Layout -tarfile -\end_layout +\size small +\begin_inset Quotes eld \end_inset - python modules installed on your system. - By default, the script prefers the -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -gzip -\end_layout - +Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for + you'll find my little bookshop at the corner of Church Street, and very + happy to see you, I am sure. + Maybe you collect yourself, sir. + Here's +\noun on +British +\begin_inset space ~ \end_inset --compressed -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -tar -\end_layout +Birds +\noun default +, and +\noun on +Catullus +\noun default +, and +\noun on +The Holy War +\noun default +\begin_inset space ~ \end_inset - format on Unix-like systems and the -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -zip -\end_layout - +– a bargain, every one of them. + With five volumes you could just fill that gap on that second shelf. + It looks untidy, does it not, sir? +\begin_inset Quotes erd \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 -status collapsed -\begin_layout Plain Layout -File\SpecialChar menuseparator -Export \end_layout \end_inset -. + \end_layout \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 +\begin_inset ERT status collapsed \begin_layout Plain Layout --t -\end_layout - -\end_inset - (for the -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -tar +\backslash +setlength{ +\backslash +columnseprule}{0pt} \end_layout -\end_inset - - format) or -\begin_inset Flex Code -status collapsed - \begin_layout Plain Layout --z -\end_layout - -\end_inset - (for the -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -zip +\backslash +renewcommand{ +\backslash +columnseprulecolor}{ +\backslash +normalcolor} \end_layout \end_inset - format) switch to the -\begin_inset Flex Code + +\begin_inset Note Note status collapsed \begin_layout Plain Layout -\SpecialChar LyX -\SpecialChar menuseparator -\SpecialChar LyX - Archive +go back to the default \end_layout \end_inset - converter in -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -Tools\SpecialChar menuseparator -Preferences\SpecialChar menuseparator -File Handling\SpecialChar menuseparator -Converters \end_layout -\end_inset - -. - (Make sure you add the switch after the script name, not before it.) +\begin_layout Chapter +Supplemental Tools \end_layout \begin_layout Section -Fancy Headers and Footers +Customizing Bibliographies with Bib\SpecialChar TeX + or Biblatex \end_layout \begin_layout Standard -The default page layout is rather plain; for an -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -article -\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 - -\begin_inset Quotes eld -\end_inset - -fancy -\begin_inset Quotes erd -\end_inset - -, as mentioned in the +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 -User Guide +Bibliography databases +\emph default + of the +\emph on +User's 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. + The following subsections explain special bibliography features supported + by \SpecialChar LyX +. \end_layout -\begin_layout Standard -For more information on fancy headers, see the -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -fancyhdr +\begin_layout Subsection +Alternative Citation Styles \end_layout +\begin_layout Standard +Standard Bib\SpecialChar TeX + uses numbers (e. +\begin_inset space \thinspace{} \end_inset - package documentation. - ( -\begin_inset Flex URL -status collapsed - -\begin_layout Plain Layout - -https://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html -\end_layout - +g. +\begin_inset space \space{} \end_inset -) -\end_layout -\begin_layout Standard -The page header is divided into three fields, not surprisingly labeled \begin_inset Quotes eld \end_inset -left +[12] \begin_inset Quotes erd \end_inset -, -\begin_inset Quotes eld +) 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 -center -\begin_inset Quotes erd +g. +\begin_inset space \space{} \end_inset -, and + \begin_inset Quotes eld \end_inset -right +Knuth 1984a \begin_inset Quotes erd \end_inset -. - The footer is also divided into these three fields. - The \SpecialChar LaTeX - commands to set these fields in the simplest manner are +). + \SpecialChar LyX + supports three packages that provide this style, \begin_inset Flex Code status collapsed \begin_layout Plain Layout - -\backslash -lhead +biblatex \end_layout \end_inset @@ -14005,367 +13761,342 @@ lhead status collapsed \begin_layout Plain Layout - -\backslash -chead +natbib \end_layout \end_inset -, +, and \begin_inset Flex Code status collapsed \begin_layout Plain Layout - -\backslash -rhead +jurabib \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_layout Plain Layout - -\backslash -lfoot +natbib \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 +, then the established +\begin_inset Flex Code +status collapsed -\begin_layout Standard +\begin_layout Plain Layout +natbib +\end_layout -\family typewriter +\end_inset -\backslash -lhead{John Q. - DocWriter} -\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 - -\begin_layout Standard - -\family typewriter + 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 -\backslash -cfoot{} +\begin_layout Plain Layout +jurabib \end_layout -\begin_layout Standard -Let's get really fancy: lets put the section number with the word -\begin_inset Quotes eld -\end_inset - -Section -\begin_inset Quotes erd -\end_inset - - (e. -\begin_inset space \thinspace{} \end_inset -g. -\begin_inset space \space{} -\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 -Section 3) in the upper left, the page number (e. -\begin_inset space \thinspace{} -\end_inset +\begin_layout Plain Layout +biblatex +\end_layout -g. -\begin_inset space \space{} \end_inset -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: +, which exceeds all other packages in terms of features, but is also quite + heavy and more resource-hungry. \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 -\family typewriter - -\backslash -lhead{Section -\backslash -thesection} +\begin_layout Plain Layout +Document\SpecialChar menuseparator +Settings \end_layout -\begin_layout Standard +\end_inset -\family typewriter + and select under +\begin_inset Flex Noun +status collapsed -\backslash -chead{} +\begin_layout Plain Layout +Bibliography \end_layout -\begin_layout Standard +\end_inset -\family typewriter + the +\begin_inset Flex Noun +status collapsed -\backslash -rhead{Page -\backslash -thepage} +\begin_layout Plain Layout +Style Format \end_layout -\begin_layout Standard +\end_inset -\family typewriter + +\begin_inset Flex Noun +status collapsed -\backslash -lfoot{John Q. - DocWriter} +\begin_layout Plain Layout +Basic (BibTeX) \end_layout -\begin_layout Standard +\end_inset -\family typewriter +, +\begin_inset Flex Noun +status collapsed -\backslash -cfoot{} +\begin_layout Plain Layout +Biblatex \end_layout -\begin_layout Standard - -\family typewriter - -\backslash -rfoot{ -\backslash -today} -\end_layout +\end_inset -\begin_layout Standard -The commands -\begin_inset Flex Code +, +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout - -\backslash -thesection +Biblatex (Natbib mode) \end_layout \end_inset - and -\begin_inset Flex Code +, +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout - -\backslash -thepage +Natbib (BibTeX) \end_layout \end_inset - access \SpecialChar LaTeX -'s section and page counters, and so print out the current section - and page number. - -\begin_inset Flex Code + or +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout - -\backslash -today +Jurabib (BibTeX) \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 - -\family default -like -\begin_inset Flex Code -status collapsed + (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 -\backslash -renewcommand{ -\backslash -headrulewidth}{0.4pt} -\end_layout +Knuth 1984 +\begin_inset Quotes erd +\end_inset +, +\begin_inset Quotes eld \end_inset - and -\begin_inset Flex Code -status collapsed +Knuth (1984) +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout +, +\begin_inset Quotes eld +\end_inset -\backslash -renewcommand{ -\backslash -footrulewidth}{0.4pt} -\end_layout +Knuth, 1984 +\begin_inset Quotes erd +\end_inset +, +\begin_inset Quotes eld \end_inset - to set the thicknesses. -\end_layout +1984 +\begin_inset Quotes erd +\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 + 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 -\backslash -thispagestyle{empty} +\begin_layout Plain Layout + +ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/ \end_layout \end_inset -, -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -\backslash -thispagestyle{plain} \end_layout \end_inset -, and + for \begin_inset Flex Code status collapsed \begin_layout Plain Layout - -\backslash -thispagestyle{fancy} +natbib \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 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 -\family typewriter +must have +\begin_inset Quotes erd +\end_inset -\backslash -lhead{ -\backslash -resizebox{1in}{!}{ -\backslash -includegraphics{logo.eps}}} +. + 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 \begin_layout Standard -\noindent -(you may need to preface this with -\begin_inset Flex Code +\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 -\backslash -usepackage{graphics} +\begin_layout Plain Layout + +ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/ \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" +\end_inset + + 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 +Sources +\begin_inset Quotes erd \end_inset + and +\begin_inset Quotes eld +\end_inset -\end_layout +Scientific works +\begin_inset Quotes erd +\end_inset -\begin_layout Standard -by -\noun on - Allan Rae -\end_layout +, you first need to create two bibliographic databases, e. +\begin_inset space \thinspace{} +\end_inset -\begin_layout Subsection -Introduction -\end_layout +g. +\begin_inset space \space{} +\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 + +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Well, actually you can but you'll have to do it by hand. +sources.bib \end_layout \end_inset + and +\begin_inset Flex Code +status collapsed +\begin_layout Plain Layout +scientific.bib \end_layout -\begin_layout Subsection -How it looks +\end_inset + +. + \end_layout \begin_layout Standard -Open the dialog by selecting the +Go to \begin_inset Flex Noun status collapsed @@ -14376,9835 +14107,9360 @@ Settings \end_inset - menu item and then select the + and check under \begin_inset Flex Noun status collapsed \begin_layout Plain Layout -Bullets +Bibliography \end_layout \end_inset - tab. -\end_layout - -\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. - -\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 + the option +\begin_inset Flex Noun +status collapsed +\begin_layout Plain Layout +Subdivided bibliography \end_layout -\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 +\end_inset -\begin_layout Standard -\align center -\begin_inset Tabular - - - - - - -\begin_inset Text +. + 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_layout Plain Layout - -\family roman -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -Button +sources.bib \end_layout \end_inset - - -\begin_inset Text -\begin_layout Plain Layout + and a second one for the database +\begin_inset Flex Code +status collapsed -\family roman -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -Packages Required +\begin_layout Plain Layout +scientific.bib \end_layout \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout +. + 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 -\family sans -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -Standard -\end_layout +all cited references +\begin_inset Quotes erd +\end_inset + of the specified database(s) (which is the default), +\begin_inset Quotes eld \end_inset - - -\begin_inset Text -\begin_layout Plain Layout +all uncited references +\begin_inset Quotes erd +\end_inset -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -base \SpecialChar LaTeX + or even +\begin_inset Quotes eld +\end_inset -\end_layout +all references +\begin_inset Quotes erd +\end_inset +. + This might be useful if you would like to separate your bibliography into + three sections: +\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 +Cited sources +\begin_inset Quotes erd +\end_inset +, +\begin_inset Quotes eld \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 +Uncited sources +\begin_inset Quotes erd \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 +, and +\begin_inset Quotes eld +\end_inset +Scientific works +\begin_inset Quotes erd \end_inset - - -\begin_inset Text -\begin_layout Plain Layout +. + The titles for the sections can be added as ordinary sections or subsections. + Since +\begin_inset Flex Code +status collapsed -\family typewriter -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -pifont.sty +\begin_layout Plain Layout +bibtopic \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 + removes the bibliography title, you have to manually re-add that, too (as + a chapter* or section*, for instance). \end_layout -\end_inset - - -\begin_inset Text +\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 - -\family typewriter -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -pifont.sty +Subdivided bibliography \end_layout \end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout + option is disabled if you use \family sans -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -Ding3 +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 - - -\begin_inset Text -\begin_layout Plain Layout + entry option and then filter bibliography sections by keyword (by adding + +\begin_inset Flex Code +status collapsed -\family typewriter -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -pifont.sty +\begin_layout Plain Layout +keyword=mykeyword \end_layout \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout + to the +\begin_inset Flex Noun +status collapsed -\family sans -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -Ding4 +\begin_layout Plain Layout +Options \end_layout \end_inset - - -\begin_inset Text -\begin_layout Plain Layout + field of the dialog that opens if you left-click on the +\begin_inset Flex Noun +status collapsed -\family typewriter -\series medium -\shape up -\size normal -\emph off -\bar no -\noun off -\color none -pifont.sty +\begin_layout Plain Layout +Biblatex Generated Bibliography \end_layout \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. + +\begin_inset Flex Code +status collapsed +\begin_layout Plain Layout +type=book \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 +\end_inset + + or +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -\SpecialChar LyX - doesn't restrict your use since you may be editing locally and exporting - elsewhere. +nottype=collection \end_layout \end_inset + to the mentioned +\begin_inset Flex Noun +status collapsed +\begin_layout Plain Layout +Options \end_layout -\begin_layout Subsection -How to use it -\end_layout +\end_inset -\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 + field, or you can create so-called +\begin_inset Quotes eld +\end_inset -\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 +Bibliography Categories +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -If you + to which you can assign individual entries. + Please refer to the Biblatex manual, section \emph on -really +Subdivided Bibliographies \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 details. \end_layout -\begin_layout Plain Layout -\begin_inset ERT -status open +\begin_layout Subsection +Multiple Bibliographies +\begin_inset CommandInset label +LatexCommand label +name "subsec:Multiple-Bibliographies" -\begin_layout Plain Layout +\end_inset -\backslash -let -\backslash -savelabelitemi= -\backslash -labelitemi \end_layout +\begin_layout Standard +Multiple bibliographies, e. +\begin_inset space \thinspace{} \end_inset +g. +\begin_inset space \space{} +\end_inset -\end_layout - -\begin_layout Plain Layout -\begin_inset ERT -status open +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 - - -\backslash -renewcommand -\backslash -labelitemi[0]{ -\backslash -small -\backslash -( -\backslash -sharp -\backslash -)} +Document\SpecialChar menuseparator +Settings\SpecialChar menuseparator +Bibliography \end_layout \end_inset + and select the relevant unit (e. +\begin_inset space \thinspace{} +\end_inset -\end_layout +g., +\begin_inset Quotes eld +\end_inset -\begin_layout Itemize -Use the \SpecialChar LaTeX - command -\begin_inset Flex Code +per section +\begin_inset Quotes erd +\end_inset + +) in the +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout - -\backslash -renewcommand{}{} +Multiple Bibliographies \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 + combo box. + Then add a Bib(la)\SpecialChar TeX + bibliography to each unit (e. +\begin_inset space \thinspace{} +\end_inset -\backslash -labelitem -\family default - command. +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 Itemize -\begin_inset Argument item:1 -status open - -\begin_layout Plain Layout -\begin_inset ERT -status open +\begin_layout Standard +If you use Bib\SpecialChar TeX +, either the +\begin_inset Flex Code +status collapsed \begin_layout Plain Layout - - -\backslash -( -\backslash -star -\backslash -) +chapterbib \end_layout \end_inset + or the +\begin_inset Flex Code +status collapsed +\begin_layout Plain Layout +bibtopic \end_layout \end_inset - Specify each individual entry by starting each item with the bullet shape - enclosed in a + package is used to create multiple bibliographies. + The former package is used if you select \begin_inset Quotes eld \end_inset -Custom Item +per child document \begin_inset Quotes erd \end_inset - inset (available at -\family sans -Insert\SpecialChar menuseparator -Custom Item -\family default -) and set as + and do +\emph on +not +\emph default + check \begin_inset Flex Noun status collapsed \begin_layout Plain Layout -\SpecialChar TeX - Code +Sectioned Bibliography \end_layout \end_inset . - For example, this item was started with + In all other cases, \begin_inset Flex Code status collapsed \begin_layout Plain Layout - -\backslash -( -\backslash -star -\backslash -) +bibtopic \end_layout \end_inset -. -\end_layout + is used. +\begin_inset Foot +status collapsed \begin_layout Plain Layout -\begin_inset ERT -status open +An alternative approach, if you are willing to use some +\begin_inset Flex Noun +status collapsed \begin_layout Plain Layout - - -\backslash -renewcommand -\backslash -labelitemi[0]{ -\backslash -savelabelitemi} +\SpecialChar TeX + Code \end_layout +\end_inset + + (see section +\begin_inset space ~ \end_inset -\end_layout +\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 -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: +bibunits \end_layout -\begin_layout LyX-Code +\end_inset -\backslash -renewcommand -\backslash -labelitemi[0]{ -\backslash -savelabelitemi} + package. \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 + If +\begin_inset Flex Code +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. +bibtopic \end_layout \end_inset - These fall into two large groups: there are converters that use \SpecialChar LaTeX - as an - intermediate format, such as + is used, \SpecialChar LyX + encloses the specified units in \begin_inset Flex Code status collapsed \begin_layout Plain Layout -htlatex +bibtopic \end_layout \end_inset -, +'s \begin_inset Flex Code status collapsed \begin_layout Plain Layout -html2latex + +\backslash +begin{btUnit} \end_layout \end_inset -, and + and \begin_inset Flex Code status collapsed \begin_layout Plain Layout -plastex + +\backslash +end{btUnit} \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, + 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 -e\SpecialChar LyX -er +btUnit \end_layout \end_inset . - All of these have different advantages and disadvantages. - -\end_layout + So citations outside a defined unit (e. +\begin_inset space \thinspace{} +\end_inset -\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 +g., before the first section if you use +\begin_inset Quotes eld +\end_inset + +by section +\begin_inset Quotes erd +\end_inset + +) will appear as +\begin_inset Quotes eld +\end_inset + +??? +\begin_inset Quotes erd +\end_inset + +. + You can also create your own units by entering \begin_inset Flex Code status collapsed \begin_layout Plain Layout -aux + +\backslash +begin{btUnit} \end_layout \end_inset - files, counters, and references, and can often make use of the + and \begin_inset Flex Code status collapsed \begin_layout Plain Layout -bbl + +\backslash +end{btUnit} \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 + 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 -htlatex +btUnit \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 +s cannot be nested. + A second limitation is that \begin_inset Flex Code status collapsed \begin_layout Plain Layout -e\SpecialChar LyX -er +bibtopic \end_layout \end_inset - ( -\begin_inset CommandInset href -LatexCommand href -name "http://pinchito.es/elyxer/" -target "http://pinchito.es/elyxer/" -literal "false" + 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 + +g. + +\begin_inset Quotes eld +\end_inset +Miller 2014b +\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 + 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 \begin_layout Plain Layout -htlatex +refsection \end_layout \end_inset -; this reflects the limitations of HTML. -\begin_inset Foot -status collapsed - -\begin_layout Plain Layout -That said, + 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 -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 +newrefsection \end_layout \end_inset - More importantly (as of version 1.1.1, at least), + or \begin_inset Flex Code status collapsed \begin_layout Plain Layout -e\SpecialChar LyX -er + +\backslash +newrefsegment \end_layout \end_inset - has limited support for math macros and no support for user-defined paragraph - or character styles. - These limitations make +, 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 -e\SpecialChar LyX -er -\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. +\backslash +begin{refsection} \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 -. -\begin_inset Foot + \SpecialChar ldots + +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -The file + +\backslash +end{refsection} +\end_layout + +\end_inset + + instead. + Note, though, that \begin_inset Flex Code status collapsed \begin_layout Plain Layout -development/HTML/HTML.notes +refsection \end_layout \end_inset -, 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" - +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 -, 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 - -. -\end_layout - -\end_inset - - Still, the developers have chosen this approach because it has several - potential advantages over the other two. -\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 - -\end_inset - - 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 - -Chapter 1 -\begin_inset Quotes erd -\end_inset - - or +g., at the end of the document). + Select \begin_inset Quotes eld \end_inset - -\lang ngerman -Kapitel -\lang english - 1 +all reference units \begin_inset Quotes erd \end_inset -, depending upon the language in effect at the time. - + 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 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. - +\begin_layout Section +Multipart Documents \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. +\begin_layout Subsection +General Operation \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 -\end_layout +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 Standard -\SpecialChar LyX - offers four choices for how math is rendered. - These have various advantages and disadvantages: -\end_layout +master +\begin_inset Quotes erd +\end_inset -\begin_layout Itemize -MathML -\begin_inset Newline newline + 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 -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 +e. +\begin_inset space \space{} \end_inset -If \SpecialChar LyX - is unable to render a formula as MathML—for example, if the formula - uses the +everything up to and including the \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 +begin{document} \end_layout -\begin_layout Itemize -HTML -\begin_inset Newline newline \end_inset -As mentioned above, + line as well as the \begin_inset Flex Code status collapsed \begin_layout Plain Layout -elyxer + +\backslash +end{document} \end_layout \end_inset - outputs math as HTML, styled by CSS. -\begin_inset Foot -status collapsed + line must be deleted) or else errors will be generated when you try to + make a DVI file. +\end_layout -\begin_layout Plain Layout +\begin_layout Standard \SpecialChar LyX - has borrowed some of the CSS for its HTML output from -\begin_inset Flex Code + allows you to include files quite easily with +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout -elyxer +Insert\SpecialChar menuseparator +Child +\begin_inset space ~ +\end_inset + +Document \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. + \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 - 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 +include +\begin_inset Quotes erd \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 -xymatrix -\end_layout +, +\begin_inset Quotes eld +\end_inset +input +\begin_inset Quotes erd \end_inset - package or ERT—then it will instead output the formula as an image. - -\end_layout +, and +\begin_inset Quotes eld +\end_inset -\begin_layout Itemize -Images -\begin_inset Newline newline +verbatim +\begin_inset Quotes erd \end_inset -Like -\begin_inset Flex Code -status collapsed +. + The methods +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout -htlatex -\end_layout +include +\begin_inset Quotes erd +\end_inset + and +\begin_inset Quotes eld \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 +input +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -Instant preview does -\emph on -not -\emph default -have to be on for images to be output, however. + are similar in many ways, but there are also some notable differences: \end_layout +\begin_layout Enumerate +Files that are +\begin_inset Quotes eld \end_inset - 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 +included +\begin_inset Quotes erd \end_inset -The size of the images can be controlled by setting the + are typeset beginning on a new page, while files that are \begin_inset Quotes eld \end_inset -Math Images Scaling +inputted \begin_inset Quotes erd \end_inset - parameter under -\begin_inset Flex Noun -status collapsed - -\begin_layout Plain Layout -Document\SpecialChar menuseparator -Settings\SpecialChar menuseparator -Formats + are typeset starting on the current page. \end_layout +\begin_layout Enumerate +\begin_inset Quotes eld \end_inset -. -\begin_inset Foot -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 +Included +\begin_inset Quotes erd +\end_inset + files cannot themselves +\begin_inset Quotes eld \end_inset +include +\begin_inset Quotes erd +\end_inset -\begin_inset Newline newline + further files ( +\begin_inset Quotes eld \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 -. -\end_layout +grandchilds +\begin_inset Quotes erd +\end_inset -\begin_layout Itemize -\SpecialChar LaTeX +). + With +\begin_inset Quotes eld +\end_inset -\begin_inset Newline newline +input +\begin_inset Quotes erd \end_inset -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" +, on the other hand, infinite sub-inputting is possible. +\end_layout +\begin_layout Enumerate +\begin_inset Quotes eld \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 +Include +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -span -\end_layout + allow for the output of only selected +\begin_inset Quotes eld +\end_inset +included +\begin_inset Quotes erd \end_inset - (for inline formulas) or -\begin_inset Flex Code -status collapsed + files, while maintaining the actual counters (pagination etc.) and references + (please refer to the section +\emph on +Child +\begin_inset space ~ +\end_inset -\begin_layout Plain Layout -div +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 - (for displayed formulas) with -\begin_inset Flex Code -status collapsed +include +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -class='math' -\end_layout + 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 -, as is required for jsMath. + is more suitable for arbitrary file inheritance. \end_layout \begin_layout Standard -One of these output methods must be selected under -\begin_inset Flex Noun +A +\begin_inset Quotes eld +\end_inset + +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 + +e. +\begin_inset space \space{} +\end_inset + +in +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Document\SpecialChar menuseparator -Settings\SpecialChar menuseparator -Formats +verbatim \end_layout \end_inset -. - By default, \SpecialChar LyX - outputs MathML. - This is a document-wide setting, therefore. -\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 + 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 -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$ +Mark +\begin_inset space ~ \end_inset -. -\end_layout - +spaces +\begin_inset space ~ \end_inset +in +\begin_inset space ~ +\end_inset +output \end_layout -\begin_layout Section -Bibliography and Citations -\end_layout +\end_inset -\begin_layout Standard -XHTML output fully supports bibliographies and citations. + checkbox typesets a mark to unambiguously define the presence of a space. \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. +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 -\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. +\begin_layout Subsection +Cross-References Between Files \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: +\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 +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 -\begin_layout Quote -Jason Stanley, -\begin_inset Quotes eld \end_inset -Context and Logical Form -\begin_inset Quotes erd -\end_inset -, 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_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 -Semantics in Context +buffer \begin_inset Quotes erd \end_inset -, in -\emph on -Language in Context: Selected Essays -\emph default - (Oxford: Oxford University Press, 2007), pp. - 201–30. + to use. \end_layout -\begin_layout Standard -This should be fixed before long. +\begin_layout Subsection +Bibliography Lists in all Subdocuments \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. +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 Section -Indexes +\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. \end_layout \begin_layout Standard -\SpecialChar LyX - will happily export indexes as XHTML, but with certain limitations at the - moment. +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 +\begin_inset Quotes eld +\end_inset + +Childonly +\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 -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 +If you need multiple bibliographies (e. +\begin_inset space \thinspace{} +\end_inset + +g., one per child in the \emph on -User's Guide +main document \emph default -. -\begin_inset Foot -status collapsed +), please refer to sec. +\begin_inset space ~ +\end_inset -\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_inset CommandInset ref +LatexCommand ref +reference "subsec:Multiple-Bibliographies" \end_inset - 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_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 -, 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 + 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 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. +\begin_layout Plain Layout +lyxpak.py \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 +) that automates this process. + To use it, you must have either the +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +zipfile +\end_layout -\begin_inset Quotes erd \end_inset - construct, it is just dropped, and the rest is treated as an ordinary index - entry. -\end_layout + or +\begin_inset Flex Code +status collapsed -\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. +\begin_layout Plain Layout +tarfile \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 -entry|textbf -\begin_inset Quotes erd -\end_inset + python modules installed on your system. + By default, the script prefers the +\begin_inset Flex Code +status collapsed -. - Indeed, if \SpecialChar LyX - finds a pipe symbol, `|', in an entry, it will delete it and - everything that follows it. +\begin_layout Plain Layout +gzip \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_layout Section -Nomenclature and Glossary -\end_layout +-compressed +\begin_inset Flex Code +status collapsed -\begin_layout Standard -There is at present no support for glossaries. - Adding it would be fairly trivial, and welcome. +\begin_layout Plain Layout +tar \end_layout -\begin_layout Chapter +\end_inset -\change_inserted 1075283030 1616534180 -DocBook Output + format on Unix-like systems and the +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +zip \end_layout -\begin_layout Standard +\end_inset -\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. + 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 -\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 -Customization -\emph default -manual for the details. +\begin_layout Plain Layout +File\SpecialChar menuseparator +Export \end_layout -\begin_layout Standard +\end_inset -\change_inserted 1075283030 1616534475 -Most \SpecialChar LyX - features are supported with DocBook, like math output. +. \end_layout -\begin_layout Itemize +\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 -\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. +\begin_layout Plain Layout +-t \end_layout -\begin_layout Itemize - -\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 +\end_inset -\begin_layout Itemize + (for the +\begin_inset Flex Code +status collapsed -\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. +\begin_layout Plain Layout +tar \end_layout -\begin_layout Itemize - -\change_inserted 1075283030 1616534884 -Glossaries are implemented. -\end_layout +\end_inset -\begin_layout Standard + format) or +\begin_inset Flex Code +status collapsed -\change_inserted 1075283030 1616534894 -Two major parameters can be set at the document level. +\begin_layout Plain Layout +-z \end_layout -\begin_layout Itemize +\end_inset -\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. + (for the +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +zip \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: + format) switch to the +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +\SpecialChar LyX +\SpecialChar menuseparator +\SpecialChar LyX + Archive \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) + converter in +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +Tools\SpecialChar menuseparator +Preferences\SpecialChar menuseparator +File Handling\SpecialChar menuseparator +Converters \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 +. + (Make sure you add the switch after the script name, not before it.) \end_layout -\begin_layout Itemize - -\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 +\begin_layout Section +Fancy Headers and Footers \end_layout \begin_layout Standard +The default page layout is rather plain; for an +\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 - -\end_layout - -\end_deeper -\begin_layout Chapter -The \SpecialChar LyX - Server +\begin_layout Plain Layout +article \end_layout -\begin_layout Section -Introduction -\end_layout +\end_inset -\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 + 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 -push +fancy \begin_inset Quotes erd \end_inset - citations to \SpecialChar LyX +, as mentioned in the +\emph on +User Guide +\emph default . -\end_layout - -\begin_layout Section -Starting the \SpecialChar LyX - Server -\begin_inset CommandInset label -LatexCommand label -name "sec:Starting-the-Server" - -\end_inset - - + 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 -The \SpecialChar LyX - server works through the use of a pair of named pipes. - These are usually located in +For more information on fancy headers, see the \begin_inset Flex Code status collapsed \begin_layout Plain Layout -UserDir +fancyhdr \end_layout \end_inset -, (except on Windows, where -\emph on -local -\emph default - named pipes are special objects located in -\begin_inset Flex Code + package documentation. + ( +\begin_inset Flex URL status collapsed \begin_layout Plain Layout -\backslash - -\backslash -. -\backslash -pipe +https://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html \end_layout \end_inset -) and have the names -\begin_inset Quotes eld -\end_inset - - -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -lyxpipe.in +) \end_layout +\begin_layout Standard +The page header is divided into three fields, not surprisingly labeled +\begin_inset Quotes eld \end_inset - +left \begin_inset Quotes erd \end_inset - and +, \begin_inset Quotes eld \end_inset - -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -lyxpipe.out -\end_layout - +center +\begin_inset Quotes erd \end_inset +, and +\begin_inset Quotes eld +\end_inset +right \begin_inset Quotes erd \end_inset . - External programs write into + 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 -lyxpipe.in + +\backslash +lhead \end_layout \end_inset - and read back data from +, \begin_inset Flex Code status collapsed \begin_layout Plain Layout -lyxpipe.out -\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 +\backslash +chead \end_layout \end_inset - dialog, for example +, \begin_inset Flex Code status collapsed \begin_layout Plain Layout -"/home/myhome/lyxpipe" + +\backslash +rhead \end_layout \end_inset -, or +, \begin_inset Flex Code status collapsed \begin_layout Plain Layout -" -\backslash \backslash -. -\backslash -pipe -\backslash -lyxpipe" +lfoot \end_layout \end_inset - on Windows (where any working path instead of lyxpipe can be used, for - example -\begin_inset Flex Code -status collapsed +, 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 Plain Layout -" -\backslash +\begin_layout Standard + +\family typewriter \backslash -. -\backslash -pipe -\backslash -my -\backslash -lyx -\backslash -pipe" +lhead{John Q. + DocWriter} \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 - would also work). - You -\emph on -must -\emph default - configure this manually in order for the server to start. +g.: \end_layout \begin_layout Standard -\SpecialChar LyX - will add the ' -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -.in +\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 -' and ' -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -.out -\end_layout - +Section +\begin_inset Quotes erd \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 + (e. +\begin_inset space \thinspace{} \end_inset -stale -\begin_inset Quotes erd +g. +\begin_inset space \space{} \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 -. - On Windows, pipes are deleted by the OS on program termination or crash, - so -\begin_inset Quotes eld +Section 3) in the upper left, the page number (e. +\begin_inset space \thinspace{} \end_inset -stale -\begin_inset Quotes erd +g. +\begin_inset space \space{} \end_inset - pipes should not be possible. +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 -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 Plain Layout -preferences +\family typewriter + +\backslash +lhead{Section +\backslash +thesection} \end_layout -\end_inset +\begin_layout Standard - file, for each process. +\family typewriter + +\backslash +chead{} \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 -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -lyx -dbg lyxserver +\family typewriter + +\backslash +rhead{Page +\backslash +thepage} \end_layout -\end_inset +\begin_layout Standard -. +\family typewriter + +\backslash +lfoot{John Q. + DocWriter} \end_layout \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 -development/lyxserver/server_monitor.cpp +\family typewriter + +\backslash +cfoot{} \end_layout -\end_inset +\begin_layout Standard -. +\family typewriter + +\backslash +rfoot{ +\backslash +today} \end_layout \begin_layout Standard -Another useful tool is the command-line based client found in +The commands \begin_inset Flex Code status collapsed \begin_layout Plain Layout -src/client/lyxclient + +\backslash +thesection \end_layout \end_inset -. -\end_layout - -\begin_layout Section -Normal communication -\end_layout + and +\begin_inset Flex Code +status collapsed -\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 Plain Layout -\begin_layout Quote -LYXCMD: -\emph on -clientname -\emph default -: -\emph on -function -\emph default -: -\emph on -argument +\backslash +thepage \end_layout -\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 +\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 + 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 Description -argument is an optional argument which is meaningful only to some functions - (for instance, the -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout + +\backslash +today +\end_layout -self-insert -\begin_inset Quotes erd \end_inset - LFUN will insert the argument as text at the cursor position). + simply prints out today's date. \end_layout \begin_layout Standard -The answer from \SpecialChar LyX - will arrive in the output pipe and be of the form -\end_layout +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 Quote -INFO: -\emph on -clientname -\emph default -: -\emph on -function -\emph default -: -\emph on -data +\begin_layout Plain Layout + +\backslash +renewcommand{ +\backslash +headrulewidth}{0.4pt} \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 + and +\begin_inset Flex Code +status collapsed -, 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 +\begin_layout Plain Layout -\begin_layout Standard -In case of errors, the response from \SpecialChar LyX - will have this form +\backslash +renewcommand{ +\backslash +footrulewidth}{0.4pt} \end_layout -\begin_layout Quote -ERROR: -\emph on -clientname -\emph default -: -\emph on -function -\emph default -: -\emph on -error message -\end_layout +\end_inset -\begin_layout Standard -where the -\emph on -error message -\emph default - should contain an explanation of why the command failed. + to set the thicknesses. \end_layout \begin_layout Standard -Examples: +You can switch the header/footer settings on and off for individual pages + using commands like +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +thispagestyle{empty} \end_layout -\begin_layout LyX-Code -echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in -\begin_inset Newline newline \end_inset -echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in -\begin_inset Newline newline -\end_inset +, +\begin_inset Flex Code +status collapsed -read a <~/.lyxpipe.out -\begin_inset Newline newline -\end_inset +\begin_layout Plain Layout -echo $a +\backslash +thispagestyle{plain} \end_layout -\begin_layout Subsection -AppleScript (Mac OS X) -\end_layout +\end_inset -\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 +, and +\begin_inset Flex Code +status collapsed -\begin_layout Standard -Example: -\end_layout +\begin_layout Plain Layout -\begin_layout LyX-Code -tell application "\SpecialChar LyX -" +\backslash +thispagestyle{fancy} \end_layout -\begin_layout LyX-Code - try -\end_layout +\end_inset -\begin_layout LyX-Code - -- Stores the current file name into f +. + 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 LyX-Code - set f to (run "server-get-filename" with argument "") +\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 LyX-Code - on error the error_message number the error_number -\end_layout +\begin_layout Standard -\begin_layout LyX-Code - display dialog "Error: " & the error_number & ". - " ¬ -\end_layout +\family typewriter -\begin_layout LyX-Code - & the error_message buttons {"OK"} default button 1 +\backslash +lhead{ +\backslash +resizebox{1in}{!}{ +\backslash +includegraphics{logo.eps}}} \end_layout -\begin_layout LyX-Code - end try +\begin_layout Standard +\noindent +(you may need to preface this with +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +usepackage{graphics} \end_layout -\begin_layout LyX-Code -end tell +\end_inset + + if you don't include graphics elsewhere in your document). \end_layout \begin_layout Section -Notification -\end_layout +Itemize Bullet Selection +\begin_inset CommandInset label +LatexCommand label +name "sec:bullet" -\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 -\begin_layout Quote -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -NOTIFY: +\begin_layout Standard +by +\noun on + Allan Rae \end_layout -\end_inset - - -\emph on -key-sequence +\begin_layout Subsection +Introduction \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. +\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 +Well, actually you can but you'll have to do it by hand. \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_inset Quotes eld \end_inset -notify -\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 -. \end_layout -\begin_layout Section -The simple \SpecialChar LyX - Server Protocol +\begin_layout Subsection +How it looks \end_layout \begin_layout Standard -\SpecialChar LyX - implements a simple protocol that can be used for session management. - All messages are of the form -\end_layout +Open the dialog by selecting the +\begin_inset Flex Noun +status collapsed -\begin_layout Quote -LYXSRV: -\emph on -clientname -\emph default -: -\emph on -protocol message +\begin_layout Plain Layout +Document\SpecialChar menuseparator +Settings \end_layout -\begin_layout Standard -where -\emph on -protocol message -\emph default - can be -\begin_inset Quotes eld -\end_inset - -hello -\begin_inset Quotes erd \end_inset - or -\begin_inset Quotes eld -\end_inset + menu item and then select the +\begin_inset Flex Noun +status collapsed -bye -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout +Bullets +\end_layout -. - If -\begin_inset Quotes eld \end_inset -hello -\begin_inset Quotes erd -\end_inset + tab. +\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 +\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. -bye -\begin_inset Quotes erd -\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 - sent from \SpecialChar LyX - will inform clients that \SpecialChar LyX - is closing. \end_layout -\begin_layout Section -Reverse DVI/PDF search +\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 \begin_layout Standard -Some DVI/PDF viewers -\begin_inset Foot -status collapsed +\align center +\begin_inset Tabular + + + + + + +\begin_inset Text \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. + +\family roman +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +Button \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_inset Text \begin_layout Plain Layout -lyxclient + +\family roman +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +Packages Required \end_layout \end_inset + + + + +\begin_inset Text - 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 Plain Layout -\begin_layout Subsection -Automatic setup -\begin_inset CommandInset label -LatexCommand label -name "subsec:rev-search" +\family sans +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +Standard +\end_layout \end_inset + + +\begin_inset Text +\begin_layout Plain Layout + +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +base \SpecialChar LaTeX \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 - -. - Alternatively, you can also enable the feature by checking -\family sans -Synchronize with Output -\family default - in -\begin_inset Flex Noun -status collapsed + + + + +\begin_inset Text \begin_layout Plain Layout -Document\SpecialChar menuseparator -Settings\SpecialChar menuseparator -Formats + +\family sans +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +Maths \end_layout \end_inset - -. - 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_inset Text \begin_layout Plain Layout -View/Update + +\family typewriter +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +amssymb.sty \end_layout \end_inset + + + + +\begin_inset Text - Toolbar. +\begin_layout Plain Layout + +\family sans +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +Ding1 \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 +\end_inset + + +\begin_inset Text \begin_layout Plain Layout -Document\SpecialChar menuseparator -Settings\SpecialChar menuseparator -Output\SpecialChar menuseparator -Synchronize with Output + +\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 +Ding2 \end_layout -\begin_layout Standard -Note that the method -\begin_inset Flex Code -status collapsed +\end_inset + + +\begin_inset Text \begin_layout Plain Layout -\backslash -synctex=1 +\family typewriter +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +pifont.sty \end_layout \end_inset - - enables gzip compression. - If your viewer does not support it, you should instead use -\begin_inset Flex Code -status collapsed + + + + +\begin_inset Text \begin_layout Plain Layout -\backslash -synctex=-1 +\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 -\begin_layout Standard -Please also note that including the -\begin_inset Flex Code -status collapsed +\end_inset + + + + +\begin_inset Text \begin_layout Plain Layout -srcltx + +\family sans +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +Ding4 \end_layout \end_inset - - package or -\begin_inset Flex Code -status collapsed + + +\begin_inset Text \begin_layout Plain Layout -src-specials + +\family typewriter +\series medium +\shape up +\size normal +\emph off +\bar no +\noun off +\color none +pifont.sty \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 +\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 -srcltx +\SpecialChar LyX + doesn't restrict your use since you may be editing locally and exporting + elsewhere. \end_layout \end_inset - package or -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -src-specials \end_layout -\end_inset +\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 -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 +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 -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:configuring-viewers" + +\backslash +let +\backslash +savelabelitemi= +\backslash +labelitemi +\end_layout \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 +\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 -\begin_layout Standard -\SpecialChar LaTeX - provides several different methods for reverse search. - Some are built-in in the +\end_inset + + +\end_layout + +\begin_layout Itemize +Use the \SpecialChar LaTeX + command \begin_inset Flex Code status collapsed \begin_layout Plain Layout -latex/pdflatex + +\backslash +renewcommand{}{} \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. + 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_layout Subsubsection* -Built-in DVI-search via src-specials (DVI only) +\begin_deeper +\begin_layout LyX-Code + +\backslash +let +\backslash +savelabelitemi= +\backslash +labelitemi \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 -status collapsed +\begin_layout LyX-Code -\begin_layout Plain Layout -La -\family sans -TeX +\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 - (plain)->DVI + command. \end_layout -\end_inset +\begin_layout Itemize +\begin_inset Argument item:1 +status open - or -\begin_inset Flex Noun -status collapsed +\begin_layout Plain Layout +\begin_inset ERT +status open \begin_layout Plain Layout -La -\family sans -TeX -\family default - (plain)->DraftDVI + + +\backslash +( +\backslash +star +\backslash +) \end_layout \end_inset - converter in -\begin_inset Flex Noun -status collapsed -\begin_layout Plain Layout -Preferences\SpecialChar menuseparator -File Handling\SpecialChar menuseparator -Converters \end_layout \end_inset - to -\begin_inset Flex Code + 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 -latex -src-specials $$i +\SpecialChar TeX + Code \end_layout \end_inset . - 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) -\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 - -\begin_layout Itemize + For example, this item was started with \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash -usepackage{pdfsync} +( +\backslash +star +\backslash +) \end_layout \end_inset - for reverse PDF search, +. \end_layout -\begin_layout Itemize -\begin_inset Flex Code -status collapsed +\begin_layout Plain Layout +\begin_inset ERT +status open \begin_layout Plain Layout + \backslash -usepackage[active]{srcltx} +renewcommand +\backslash +labelitemi[0]{ +\backslash +savelabelitemi} \end_layout \end_inset - 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 +\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 -usepackage{ifpdf} -\begin_inset Newline newline -\end_inset - - +renewcommand \backslash -ifpdf -\begin_inset Newline newline -\end_inset - - -\backslash -usepackage{pdfsync} -\begin_inset Newline newline -\end_inset - - +labelitemi[0]{ \backslash -else -\begin_inset Newline newline -\end_inset +savelabelitemi} +\end_layout - -\backslash -usepackage[active]{srcltx} -\begin_inset Newline newline \end_inset -\backslash -fi -\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 - -\begin_layout Standard -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* -Built-in reverse search via Sync\SpecialChar TeX - (DVI and PDF) +\begin_layout Chapter +\SpecialChar LyX + and the World Wide Web \end_layout \begin_layout Standard -Recent versions of -\begin_inset Flex Code +\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 -(pdf)latex +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 - 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 + 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 -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). +htlatex \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 +, +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -La -\family sans -TeX -\family default - (plain) -> DVI +html2latex \end_layout \end_inset - or -\begin_inset Flex Noun +, and +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -La -\family sans -TeX -\family default - (plain) -> DraftDVI +plastex \end_layout \end_inset - converter in -\begin_inset Flex Noun +, 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 -Preferences\SpecialChar menuseparator -File Handling\SpecialChar menuseparator -Converters +e\SpecialChar LyX +er \end_layout \end_inset - to +. + 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 -latex -synctex=1 $$i +aux \end_layout \end_inset -, and for PDF output, change the -\begin_inset Flex Noun + files, counters, and references, and can often make use of the +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -La -\family sans -TeX -\family default - (pdflatex) -> PDF (pdflatex) +bbl \end_layout \end_inset - converter to + 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 status collapsed \begin_layout Plain Layout -pdflatex -synctex=1 $$i +htlatex \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 +, 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 Plain Layout -Note that the option +\begin_layout Standard +Alex Fernandez's \begin_inset Flex Code status collapsed \begin_layout Plain Layout --synctex=1 +e\SpecialChar LyX +er \end_layout \end_inset - option enables gzip compression. - If your viewer does not support it, you should instead use + ( +\begin_inset CommandInset href +LatexCommand href +name "http://pinchito.es/elyxer/" +target "http://pinchito.es/elyxer/" +literal "false" + +\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 \begin_inset Flex Code status collapsed \begin_layout Plain Layout --synctex=-1 +htlatex \end_layout \end_inset -. -\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 -\begin_layout Subsection -Configuring and using specific viewers -\begin_inset CommandInset label -LatexCommand label -name "subsec:configuring-viewers" - \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. \end_layout -\begin_layout Subsubsection* -Xdvi (all platforms) -\end_layout +\end_inset -\begin_layout Standard -If you use + More importantly (as of version 1.1.1, at least), \begin_inset Flex Code status collapsed \begin_layout Plain Layout -xdvi +e\SpecialChar LyX +er \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 + 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 -lyxclient +e\SpecialChar LyX +er \end_layout \end_inset - program. - Just setup your document as described above (reverse search is triggered - by Ctrl-click or Alt-click on Mac OSX, respectively). + 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 -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 -Preferences\SpecialChar menuseparator -File Handling\SpecialChar menuseparator -File formats -\end_layout +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 - to +. \begin_inset Foot status collapsed \begin_layout Plain Layout -On Mac OSX you have to use +The file \begin_inset Flex Code status collapsed \begin_layout Plain Layout -DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l" +development/HTML/HTML.notes \end_layout \end_inset - -\end_layout +, 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 - -\begin_inset Flex Code -status collapsed +, 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" -\begin_layout Plain Layout -xdvi -editor "lyxeditor.sh %f %l" +\end_inset + +. \end_layout \end_inset -, where -\begin_inset Flex Code + Still, the developers have chosen this approach because it has several + potential advantages over the other two. +\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 -lyxeditor.sh +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 - is a suitable script. - For example, a minimal shell script is the following one: -\end_layout - -\begin_layout LyX-Code -#!/bin/sh -\begin_inset Newline newline + 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 -LYXPIPE="/path/to/lyxpipe" -\begin_inset Newline newline +Chapter 1 +\begin_inset Quotes erd \end_inset -COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2" -\begin_inset Newline newline + or +\begin_inset Quotes eld \end_inset -echo "$COMMAND" > "${LYXPIPE}".in || exit -\begin_inset Newline newline + +\lang ngerman +Kapitel +\lang english + 1 +\begin_inset Quotes erd \end_inset -read TMP < "${LYXPIPE}".out || exit +, depending upon the language in effect at the time. + \end_layout \begin_layout Standard -where -\begin_inset Flex Code -status collapsed +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 Plain Layout -/path/to/lyxpipe +\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 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 +\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 + +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 - is the LyXServer pipe path specified in -\begin_inset Flex Noun +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 -Preferences\SpecialChar menuseparator -Paths +xymatrix \end_layout \end_inset -. -\begin_inset Foot -status collapsed + package or ERT—then it will instead output the formula as an image. + +\end_layout -\begin_layout Plain Layout -In the +\begin_layout Itemize +HTML +\begin_inset Newline newline +\end_inset + +As mentioned above, \begin_inset Flex Code status collapsed \begin_layout Plain Layout -development/tools +elyxer \end_layout \end_inset - folder of a source distribution you can find a + 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 -lyxeditor +elyxer \end_layout \end_inset - script which is able to locate the -\emph on -lyxpipe -\emph default - based on your preferences. +. \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 -\end_layout - -\begin_layout Subsubsection* -MacDviX (Mac OSX) -\end_layout - -\begin_layout Standard -At the end of +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 -/Applications/MacDviX_Folder/calleditor.script +xymatrix \end_layout \end_inset -, add the following lines: + package or ERT—then it will instead output the formula as an image. + \end_layout -\begin_layout LyX-Code -/Applications/LyX.app/Contents/MacOS/lyxeditor "$2" $1 +\begin_layout Itemize +Images \begin_inset Newline newline \end_inset -exit 1 -\end_layout +Like +\begin_inset Flex Code +status collapsed -\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). +\begin_layout Plain Layout +htlatex \end_layout -\begin_layout Subsubsection* -Skim (Mac OSX) -\end_layout +\end_inset -\begin_layout Standard -Enter -\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 -open -a Skim.app $$i +Instant preview does +\emph on +not +\emph default +have to be on for images to be output, however. \end_layout \end_inset - to the viewer setting in -\begin_inset Flex Noun -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 -Preferences\SpecialChar menuseparator -File Handling\SpecialChar menuseparator -File formats\SpecialChar menuseparator -PDF (pdflatex) -\end_layout +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 -, and then in + parameter under \begin_inset Flex Noun status collapsed \begin_layout Plain Layout -Skim\SpecialChar menuseparator -Preferences\SpecialChar menuseparator -Sync +Document\SpecialChar menuseparator +Settings\SpecialChar menuseparator +Formats \end_layout \end_inset - choose -\begin_inset Flex Noun +. +\begin_inset Foot status collapsed \begin_layout Plain Layout -custom +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 - preset and enter command -\begin_inset Flex Noun -status collapsed - -\begin_layout Plain Layout -/Applications/\SpecialChar LyX -.app/Contents/MacOS/lyxeditor -\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 . \end_layout -\begin_layout Standard -Reverse search is triggered by COMMAND-SHIFT-click -\end_layout +\begin_layout Itemize +\SpecialChar LaTeX -\begin_layout Subsubsection* -Evince (GNOME) -\end_layout +\begin_inset Newline newline +\end_inset -\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 +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 -target "https://wiki.lyx.org/LyX/SyncTeX" +name "jsMath" +target "http://www.math.union.edu/~dpvc/jsMath/" literal "false" \end_inset - for details. -\end_layout - -\begin_layout Subsubsection* -Okular (KDE) -\end_layout - -\begin_layout Standard -Go to -\begin_inset Flex Noun +, 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 -Settings\SpecialChar menuseparator -Configure Okular\SpecialChar menuseparator -Editor +span \end_layout \end_inset - and select LyX -\begin_inset Quotes erd -\end_inset - - as editor. - This inserts the appropriate command ( + (for inline formulas) or \begin_inset Flex Code status collapsed \begin_layout Plain Layout -lyxclient -g %f %l +div \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 -\end_inset + (for displayed formulas) with +\begin_inset Flex Code +status collapsed -Browse -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout +class='math' +\end_layout - mode (i. -\begin_inset space \thinspace{} \end_inset -e., the hand symbol is clicked). -\change_unchanged - -\end_layout - -\begin_layout Subsubsection* -Qpdfview (Unix) +, as is required for jsMath. \end_layout \begin_layout Standard -Qpdfview supports Sync\SpecialChar TeX - since version 0.3.5. - Go to +One of these output methods must be selected under \begin_inset Flex Noun status collapsed \begin_layout Plain Layout -Edit\SpecialChar menuseparator +Document\SpecialChar menuseparator Settings\SpecialChar menuseparator -Behavior +Formats \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 +. + By default, \SpecialChar LyX + outputs MathML. + This is a document-wide setting, therefore. +\end_layout - item and add the command -\begin_inset Flex Code +\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 status collapsed \begin_layout Plain Layout -lyxclient -g %1 %2 +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 + +. \end_layout \end_inset -. + \end_layout -\begin_layout Standard -Reverse search is triggered by double-click or, in more recent versions, - by context menu. +\begin_layout Section +Bibliography and Citations \end_layout -\begin_layout Subsubsection* -YAP (Windows) +\begin_layout Standard +XHTML output fully supports bibliographies and citations. + \end_layout \begin_layout Standard -Launch yap, choose its -\begin_inset Flex Noun -status collapsed +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 Plain Layout -View\SpecialChar menuseparator -Options +\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 -\end_inset +\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: +\end_layout - menu and select the +\begin_layout Quote +Jason Stanley, \begin_inset Quotes eld \end_inset -Inverse DVI Search +Context and Logical Form \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 +, in +\emph on +Language in Context: Selected Essays +\emph default + (Oxford: Oxford University Press, 2007), pp. + 30–68. +\end_layout - (or any other name you like) in the +\begin_layout Quote +Jason Stanley, \begin_inset Quotes eld \end_inset -Name: +Semantics in Context \begin_inset Quotes erd \end_inset - field. - Now click on the button labeled -\begin_inset Quotes eld -\end_inset - -\SpecialChar ldots +, in +\emph on +Language in Context: Selected Essays +\emph default + (Oxford: Oxford University Press, 2007), pp. + 201–30. +\end_layout -\begin_inset Quotes erd -\end_inset +\begin_layout Standard +This should be fixed before long. +\end_layout - to open a file dialog and navigate to the directory containing the batch - file -\begin_inset Flex Code -status collapsed +\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 -\begin_layout Plain Layout -lyxeditor.bat +\begin_layout Section +Indexes \end_layout -\end_inset +\begin_layout Standard +\SpecialChar LyX + will happily export indexes as XHTML, but with certain limitations at the + moment. +\end_layout - (see below). - Select -\begin_inset Flex Code +\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 Plain Layout -lyxeditor.bat +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 - and then specify the program arguments as -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -%f %l + 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 -. - The -\begin_inset Flex Code -status collapsed + ! +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -lyxeditor.bat +, 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 -\end_inset - - wrapper is used for communicating with \SpecialChar LyX - through the -\emph on -lyxpipe -\emph default - and is as follows: +\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 LyX-Code -@echo off -\begin_inset Newline newline +\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 -echo LYXCMD:revdvi:server-goto-file-row:%~1 %2> -\backslash +|see\SpecialChar ldots -\backslash -. -\backslash -pipe -\backslash -lyxpipe.in -\begin_inset Newline newline +\begin_inset Quotes erd \end_inset -type -\backslash - -\backslash -. -\backslash -pipe -\backslash -lyxpipe.out + construct, it is just dropped, and the rest is treated as an ordinary index + entry. \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 +\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 Plain 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 -\backslash +entry|textbf +\begin_inset Quotes erd +\end_inset -\backslash . -\backslash -pipe -\backslash -lyxpipe + Indeed, if \SpecialChar LyX + finds a pipe symbol, `|', in an entry, it will delete it and + everything that follows it. \end_layout -\end_inset +\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 -, otherwise change the -\begin_inset Flex Code -status collapsed +\begin_layout Section +Nomenclature and Glossary +\end_layout -\begin_layout Plain Layout -lyxeditor.bat +\begin_layout Standard +There is at present no support for glossaries. + Adding it would be fairly trivial, and welcome. \end_layout -\end_inset +\begin_layout Chapter - wrapper accordingly. +\change_inserted 1075283030 1616534180 +DocBook Output \end_layout \begin_layout Standard -In yap, reverse search is triggered by double-click. -\end_layout -\begin_layout Subsubsection* -SumatraPDF (Windows) +\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 -In order to use SumatraPDF for inverse search, enter -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -SumatraPDF -inverse-search "lyxeditor.bat "%f" %l" +\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 +Customization +\emph default +manual for the details. \end_layout -\end_inset - - in the viewer setting in -\begin_inset Flex Noun -status collapsed +\begin_layout Standard -\begin_layout Plain Layout -Preferences\SpecialChar menuseparator -File Handling\SpecialChar menuseparator -File formats\SpecialChar menuseparator -PDF (pdflatex) +\change_inserted 1075283030 1616534475 +Most \SpecialChar LyX + features are supported with DocBook, like math output. \end_layout -\end_inset - -, where -\begin_inset Flex Code -status collapsed +\begin_layout Itemize -\begin_layout Plain Layout -lyxeditor.bat +\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 -\end_inset +\begin_layout Itemize - is the previous wrapper. - If SumatraPDF.exe is not in your command PATH, use its full file name. +\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 -\begin_layout Standard -Reverse search is triggered by double-click. +\begin_layout Itemize + +\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 Subsubsection* -YAP (Cygwin) +\begin_layout Itemize + +\change_inserted 1075283030 1616534884 +Glossaries are implemented. \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 -\begin_layout Plain Layout -View\SpecialChar menuseparator -Options +\change_inserted 1075283030 1616534894 +Two major parameters can be set at the document level. \end_layout -\end_inset +\begin_layout Itemize - menu and select the -\begin_inset Quotes eld -\end_inset +\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 -Inverse DVI Search -\begin_inset Quotes erd -\end_inset +\begin_layout Itemize - tab. - Click on the -\begin_inset Quotes eld -\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: +\end_layout -New\SpecialChar ldots +\begin_deeper +\begin_layout Itemize -\begin_inset Quotes erd -\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 - button and, in the window that opens, enter -\begin_inset Quotes eld -\end_inset +\begin_layout Itemize -\SpecialChar LyX - Editor -\begin_inset Quotes erd -\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 +\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_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 +\end_layout - field. - Now click on the button labeled -\begin_inset Quotes eld -\end_inset +\begin_layout Standard -\SpecialChar ldots +\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_inset Quotes erd -\end_inset +\end_layout - to open a file dialog and navigate to the directory containing the -\begin_inset Flex Code -status collapsed +\end_deeper +\begin_layout Chapter +The \SpecialChar LyX + Server +\end_layout -\begin_layout Plain Layout -lyxeditor.exe +\begin_layout Section +Introduction \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 - program (which is installed by default on Cygwin along with the \SpecialChar LyX - executable). - Select -\begin_inset Flex Code -status collapsed +push +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -lyxeditor.exe + 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 - and then specify the program arguments as + +\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 status collapsed \begin_layout Plain Layout --g %f %l +UserDir \end_layout \end_inset -. - 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 +, (except on Windows, where \emph on -lyxpipe +local \emph default -, omit the + named pipes are special objects located in \begin_inset Flex Code status collapsed \begin_layout Plain Layout --g -\end_layout -\end_inset +\backslash - option and be sure to specify the \SpecialChar LyX -Server pipe path in the \SpecialChar LyX - preferences. +\backslash +. +\backslash +pipe \end_layout -\begin_layout Standard -In yap, reverse search is triggered by double-click. -\end_layout +\end_inset + +) and have the names +\begin_inset Quotes eld +\end_inset -\begin_layout Subsubsection* -SumatraPDF (Cygwin) -\end_layout -\begin_layout Standard -In order to use SumatraPDF for inverse search, enter \begin_inset Flex Code status collapsed \begin_layout Plain Layout -SumatraPDF -inverse-search "lyxeditor -g %f %l" +lyxpipe.in \end_layout \end_inset - 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_inset Quotes erd +\end_inset + and +\begin_inset Quotes eld \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 +lyxpipe.out \end_layout \end_inset - enables communication via the -\emph on -lyxsocket -\emph default + +\begin_inset Quotes erd +\end_inset + . - Again, omit the + External programs write into \begin_inset Flex Code status collapsed \begin_layout Plain Layout --g +lyxpipe.in \end_layout \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 + and read back data from +\begin_inset Flex Code +status collapsed -\begin_layout Section -Forward search +\begin_layout Plain Layout +lyxpipe.out \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 + The stem of the pipe names can be defined in the \begin_inset Flex Noun status collapsed \begin_layout Plain Layout -Navigate\SpecialChar menuseparator -Forward search +Tools\SpecialChar menuseparator +Preferences \end_layout \end_inset - (or select -\begin_inset Flex Noun + dialog, for example +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Forward search +"/home/myhome/lyxpipe" \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. -\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" +, or +\begin_inset Flex Code +status collapsed -\end_inset +\begin_layout Plain Layout +" +\backslash +\backslash . +\backslash +pipe +\backslash +lyxpipe" \end_layout -\begin_layout Standard -Additionally, you need to configure \SpecialChar LyX - for using your viewers in -\begin_inset Flex Noun +\end_inset + + on Windows (where any working path instead of lyxpipe can be used, for + example +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Tools\SpecialChar menuseparator -Preferences\SpecialChar menuseparator -Output\SpecialChar menuseparator -General +" +\backslash + +\backslash +. +\backslash +pipe +\backslash +my +\backslash +lyx +\backslash +pipe" \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: + would also work). + You +\emph on +must +\emph default + configure this manually in order for the server to start. \end_layout -\begin_layout Itemize -\noindent +\begin_layout Standard +\SpecialChar LyX + will add the ' \begin_inset Flex Code status collapsed \begin_layout Plain Layout -$$n +.in \end_layout \end_inset -: row number -\end_layout - -\begin_layout Itemize -\noindent +' and ' \begin_inset Flex Code status collapsed \begin_layout Plain Layout -$$t +.out \end_layout \end_inset -: name of the (temporary) exported .tex file (without path) -\end_layout +' 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 -\begin_layout Itemize -\noindent -\begin_inset Flex Code -status collapsed +stale +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout -$$f -\end_layout + 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 -: name of the (temporary) exported .tex file (including path) + pipes should not be possible. \end_layout -\begin_layout Itemize -\noindent +\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 \begin_inset Flex Code status collapsed \begin_layout Plain Layout -$$o +preferences \end_layout \end_inset -: name of the exported output file (either dvi or pdf, depending on which - one exists in the temporary directory) + file, for each process. \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 +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 -okular --unique +lyx -dbg lyxserver \end_layout \end_inset - in -\begin_inset Flex Noun +. +\end_layout + +\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 -Tools\SpecialChar menuseparator -Preferences\SpecialChar menuseparator -File Handling\SpecialChar menuseparator -File -\begin_inset space ~ -\end_inset - -Formats +development/lyxserver/server_monitor.cpp \end_layout \end_inset - +. \end_layout -\end_inset - -, qpdfview, and SumatraPDF -\begin_inset Foot +\begin_layout Standard +Another useful tool is the command-line based client found in +\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" +src/client/lyxclient +\end_layout \end_inset - +. \end_layout -\end_inset +\begin_layout Section +Normal communication +\end_layout -. - Others, such as evince -\begin_inset Foot -status collapsed +\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 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. +\begin_layout Quote +LYXCMD: +\emph on +clientname +\emph default +: +\emph on +function +\emph default +: +\emph on +argument \end_layout -\end_inset +\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 -, 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 +\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 -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_layout Description +argument is an optional argument which is meaningful only to some functions + (for instance, the \begin_inset Quotes eld \end_inset -near +self-insert \begin_inset Quotes erd \end_inset -. - This latter functionality is provided by an external call of synctex (see - the predefined example configurations). - + LFUN will insert the argument as text at the cursor position). \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 +The answer from \SpecialChar LyX + will arrive in the output pipe and be of the form +\end_layout -e., which format is already there in the temporary directory) and chooses - the appropriate configuration for the respective format. +\begin_layout Quote +INFO: +\emph on +clientname +\emph default +: +\emph on +function +\emph default +: +\emph on +data \end_layout -\begin_layout Chapter +\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 -\change_deleted 564990737 1671097409 -Special Document Classes -\change_unchanged +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. \end_layout -\begin_layout Section +\begin_layout Standard +In case of errors, the response from \SpecialChar LyX + will have this form +\end_layout -\change_deleted 564990737 1669742044 -A&A Paper +\begin_layout Quote +ERROR: +\emph on +clientname +\emph default +: +\emph on +function +\emph default +: +\emph on +error message \end_layout \begin_layout Standard - -\change_deleted 564990737 1669742044 -by -\noun on -Peter Sütterlin +where the +\emph on +error message +\emph default + should contain an explanation of why the command failed. \end_layout -\begin_layout Subsection - -\change_deleted 564990737 1669742044 -Introduction +\begin_layout Standard +Examples: \end_layout -\begin_layout Standard +\begin_layout LyX-Code +echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in +\begin_inset Newline newline +\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 -status collapsed +echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in +\begin_inset Newline newline +\end_inset -\begin_layout Plain Layout +read a <~/.lyxpipe.out +\begin_inset Newline newline +\end_inset -https://www.aanda.org/ +echo $a \end_layout -\end_inset +\begin_layout Subsection +AppleScript (Mac OS X) +\end_layout -) using Version 5.01 of the document class -\family typewriter -aa.cls -\family default -. - This package can be downloaded from the ftp site +\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 +Example: +\end_layout -\change_deleted 564990737 1669742044 -\begin_inset VSpace medskip -\end_inset +\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 Standard -\align center +\begin_layout LyX-Code + set f to (run "server-get-filename" with argument "") +\end_layout -\change_deleted 564990737 1669742044 -\begin_inset Flex URL -status collapsed +\begin_layout LyX-Code + on error the error_message number the error_number +\end_layout -\begin_layout Plain Layout +\begin_layout LyX-Code + display dialog "Error: " & the error_number & ". + " ¬ +\end_layout -ftp://ftp.edpsciences.org/pub/aa/readme.html +\begin_layout LyX-Code + & the error_message buttons {"OK"} default button 1 \end_layout -\end_inset +\begin_layout LyX-Code + end try +\end_layout +\begin_layout LyX-Code +end tell +\end_layout +\begin_layout Section +Notification \end_layout \begin_layout Standard - -\change_deleted 564990737 1669742044 -\begin_inset VSpace medskip +\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 -\begin_layout Standard +\begin_layout Quote +\begin_inset Flex Code +status collapsed -\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. - +\begin_layout Plain Layout +NOTIFY: \end_layout -\begin_layout Standard +\end_inset -\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 -. -\end_layout - -\begin_layout Subsection -\change_deleted 564990737 1669742044 -Getting started +\emph on +key-sequence \end_layout \begin_layout Standard - -\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 Itemize - -\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). +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 Itemize +\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 -\change_deleted 564990737 1669742044 -Don't change the option -\family sans -Page -\begin_inset space ~ +notify +\begin_inset Quotes erd \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. + 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 -\begin_layout Subsection - -\change_deleted 564990737 1669742044 -The header block +\begin_layout Section +The simple \SpecialChar LyX + Server Protocol \end_layout \begin_layout Standard +\SpecialChar LyX + implements a simple protocol that can be used for session management. + All messages are of the form +\end_layout -\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 Quote +LYXSRV: +\emph on +clientname +\emph default +: +\emph on +protocol message \end_layout -\begin_layout Itemize +\begin_layout Standard +where +\emph on +protocol message +\emph default + can be +\begin_inset Quotes eld +\end_inset -\change_deleted 564990737 1669742044 +hello +\begin_inset Quotes erd +\end_inset -\family sans -Title -\family default -: [required] -\end_layout + or +\begin_inset Quotes eld +\end_inset -\begin_layout Itemize +bye +\begin_inset Quotes erd +\end_inset -\change_deleted 564990737 1669742044 +. + If +\begin_inset Quotes eld +\end_inset -\family sans -Subtitle -\family default -: [optional] -\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_deleted 564990737 1669742044 +bye +\begin_inset Quotes erd +\end_inset -\family sans -Author -\family default -: [required] + sent from \SpecialChar LyX + will inform clients that \SpecialChar LyX + is closing. \end_layout -\begin_layout Itemize +\begin_layout Section +Reverse DVI/PDF search +\end_layout -\change_deleted 564990737 1669742044 +\begin_layout Standard +Some DVI/PDF viewers +\begin_inset Foot +status collapsed -\family sans -Address -\family default -: [required] +\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. \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 + 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 -\family sans -Offprints -\family default -: [optional] if more than one author: whom to contact for offprint requests. +\begin_layout Plain Layout +lyxclient \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669742044 +\end_inset -\family sans -Mail -\family default -: [optional] mail address for contacts. + 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 Itemize +\begin_layout Subsection +Automatic setup +\begin_inset CommandInset label +LatexCommand label +name "subsec:rev-search" + +\end_inset -\change_deleted 564990737 1669742044 -\family sans -Date -\family default -: [required]. - Suggested format is -\family typewriter -Received: ; Accepted \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 -\change_deleted 564990737 1669742044 -There is no need to issue the -\family typewriter - -\backslash -maketitle +. + Alternatively, you can also enable the feature by checking +\family sans +Synchronize with Output \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 - -\begin_layout Standard + in +\begin_inset Flex Noun +status collapsed -\change_deleted 564990737 1669742044 -If you want to place footnotes in the header block, e. -\begin_inset space \thinspace{} -\end_inset +\begin_layout Plain Layout +Document\SpecialChar menuseparator +Settings\SpecialChar menuseparator +Formats +\end_layout -g. -\begin_inset space \space{} \end_inset -to state your present address, just use the standard footnote via the menu - -\family sans -Insert\SpecialChar menuseparator -Footnote. - -\family default - \SpecialChar LyX - will automagically use the term -\family typewriter +. + 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 -\backslash -thanks{} -\family default - in that case. +\begin_layout Plain Layout +View/Update \end_layout -\begin_layout Standard +\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: + Toolbar. \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669742044 +\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 -\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 +Document\SpecialChar menuseparator +Settings\SpecialChar menuseparator +Output\SpecialChar menuseparator +Synchronize with Output \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669742044 +\end_inset -\family sans -Email -\family default - to supply an email address for fast contact. +. \end_layout \begin_layout Standard +Note that the method +\begin_inset Flex Code +status collapsed -\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 - -\begin_layout Itemize - -\change_deleted 564990737 1669742044 - -\family typewriter +\begin_layout Plain Layout \backslash -and -\family default - to separate different names for more than one author and institute, respectivel -y. +synctex=1 \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. - -\end_layout + enables gzip compression. + If your viewer does not support it, you should instead use +\begin_inset Flex Code +status collapsed -\begin_layout Subsection +\begin_layout Plain Layout -\change_deleted 564990737 1669742044 -The abstract +\backslash +synctex=-1 \end_layout -\begin_layout Standard +\end_inset -\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. -\end_layout - -\begin_layout Subsection - -\change_deleted 564990737 1669742044 -Supported environments \end_layout \begin_layout Standard +Please also note that including the +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1669742044 -The A&A paper layout supports the following environments for structuring - your text: +\begin_layout Plain Layout +srcltx \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 + package or +\begin_inset Flex Code +status collapsed -\family sans -Standard +\begin_layout Plain Layout +src-specials \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 + 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 -\family sans -Section +\begin_layout Plain Layout +srcltx \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 + package or +\begin_inset Flex Code +status collapsed -\family sans -Subsection +\begin_layout Plain Layout +src-specials \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669742044 +\end_inset -\family sans -Subsubsection +. + \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669742044 +\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 -\family sans -Itemize -\end_layout -\begin_layout Itemize +\begin_inset CommandInset ref +LatexCommand ref +reference "subsec:configuring-viewers" -\change_deleted 564990737 1669742044 +\end_inset -\family sans -Enumerate +, where the necessary configuration steps in your viewer – needed both with + the automatic and the manual setup – are described. \end_layout -\begin_layout Itemize +\begin_layout Subsection +Manual setup +\end_layout -\change_deleted 564990737 1669742044 +\begin_layout Standard +\SpecialChar LaTeX + provides several different methods for reverse search. + Some are built-in in the +\begin_inset Flex Code +status collapsed -\family sans -Description +\begin_layout Plain Layout +latex/pdflatex \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669742044 +\end_inset -\family sans -Caption + 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 Itemize +\begin_layout Subsubsection* +Built-in DVI-search via src-specials (DVI only) +\end_layout -\change_deleted 564990737 1669742044 +\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 +status collapsed +\begin_layout Plain Layout +La \family sans -Abstract +TeX +\family default + (plain)->DVI \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 + or +\begin_inset Flex Noun +status collapsed +\begin_layout Plain Layout +La \family sans -Acknowledgment +TeX +\family default + (plain)->DraftDVI \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669742044 + converter in +\begin_inset Flex Noun +status collapsed -\family sans -Bibliography +\begin_layout Plain Layout +Preferences\SpecialChar menuseparator +File Handling\SpecialChar menuseparator +Converters \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669742044 +\end_inset -\family sans -\SpecialChar LaTeX + to +\begin_inset Flex Code +status collapsed +\begin_layout Plain Layout +latex -src-specials $$i \end_layout -\begin_layout Subsection +\end_inset -\change_deleted 564990737 1669742044 -Commands not supported by \SpecialChar LyX +. + 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) \end_layout \begin_layout Standard - -\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: +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 \begin_layout Itemize +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1669742044 - -\family typewriter +\begin_layout Plain Layout \backslash -and +usepackage{pdfsync} \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669742044 - -\family typewriter +\end_inset -\backslash -authorrunning + for reverse PDF search, \end_layout \begin_layout Itemize +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1669742044 - -\family typewriter +\begin_layout Plain Layout \backslash -object{} +usepackage[active]{srcltx} \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669742044 - -\family typewriter +\end_inset -\backslash -titlerunning{} + for reverse DVI search. \end_layout \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! +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 Subsection +\begin_layout LyX-Code -\change_deleted 564990737 1669742044 -Figure and Table Floats -\end_layout +\backslash +usepackage{ifpdf} +\begin_inset Newline newline +\end_inset -\begin_layout Standard -\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 ~ +\backslash +ifpdf +\begin_inset Newline newline \end_inset -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 ~ + +\backslash +usepackage{pdfsync} +\begin_inset Newline newline \end_inset -Settings. -\end_layout - -\begin_layout Standard - -\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 -Insert\SpecialChar menuseparator -Float\SpecialChar menuseparator -Figure -\family default -, then right click in the figure and select -\family sans -Span -\begin_inset space ~ +\backslash +else +\begin_inset Newline newline \end_inset -columns -\family default -. -\end_layout + +\backslash +usepackage[active]{srcltx} +\begin_inset Newline newline +\end_inset -\begin_layout Enumerate -\change_deleted 564990737 1669742044 -Enter your caption text. +\backslash +fi \end_layout -\begin_layout Enumerate - -\change_deleted 564990737 1669742044 -Press -\family sans -Return -\family default - to move the cursor above the caption. +\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 Enumerate +\begin_layout Standard +Note that PDFSync might affect the output layout of your document. + It is therefore advised to disable PDFsync for final documents. +\end_layout -\change_deleted 564990737 1669742044 -Insert your figure +\begin_layout Subsubsection* +Built-in reverse search via Sync\SpecialChar TeX + (DVI and PDF) \end_layout -\begin_layout Enumerate +\begin_layout Standard +Recent versions of +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1669742044 -Position the cursor behind the figure and insert a horizontal fill: -\family sans -Insert\SpecialChar menuseparator -Special -\begin_inset space ~ -\end_inset +\begin_layout Plain Layout +(pdf)latex +\end_layout -Character\SpecialChar menuseparator -Horizontal -\begin_inset space ~ \end_inset -Fill -\family default -. -\end_layout + have built-in support for both PDF and DVI reverse search. + This so-called +\emph on +Sync\SpecialChar TeX -\begin_layout Enumerate - -\change_deleted 564990737 1669742044 -Switch to \SpecialChar LaTeX - mode: -\family sans -M-c -\begin_inset space ~ -\end_inset +\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 -t -\family default -. +\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 Enumerate - -\change_deleted 564990737 1669742044 -Enter -\family typewriter - -\backslash -parbox[b]{55mm}{ -\family default -. - -\series bold -Do not close the brace! +\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). \end_layout -\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 -M-c -\begin_inset space ~ \end_inset -t -\family default - -\family typewriter -} -\family default -. -\end_layout - -\begin_layout Standard - -\change_deleted 564990737 1669742044 -Also, refer to the figures in the example paper. -\end_layout - -\begin_layout Subsection - -\change_deleted 564990737 1669742044 -Referee layout + 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 +status collapsed -\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 +\begin_layout Plain Layout +La \family sans -Document\SpecialChar menuseparator -Settings -\family default - dialog. - Just enter the string -\family typewriter -referee +TeX \family default - there. + (plain) -> DVI \end_layout -\begin_layout Subsection - -\change_deleted 564990737 1669742044 -The example paper -\end_layout +\end_inset -\begin_layout Standard + or +\begin_inset Flex Noun +status collapsed -\change_deleted 564990737 1669742044 -The +\begin_layout Plain Layout +La \family sans -Examples +TeX \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. + (plain) -> DraftDVI \end_layout -\begin_layout Section - -\change_deleted 564990737 1671097429 -Dinbrief -\end_layout +\end_inset -\begin_layout Standard + converter in +\begin_inset Flex Noun +status collapsed -\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 -\family typewriter -.../lyx/share/templates -\family default - for you to use as a starting point. +\begin_layout Plain Layout +Preferences\SpecialChar menuseparator +File Handling\SpecialChar menuseparator +Converters \end_layout -\begin_layout Section - -\change_deleted 564990737 1671097429 -Elsevier Journals -\end_layout +\end_inset -\begin_layout Standard + to +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1671097429 -See the \SpecialChar LyX - template file -\family typewriter -elsarticle.lyx -\family default -. - It contains all infos you need. +\begin_layout Plain Layout +latex -synctex=1 $$i \end_layout -\begin_layout Section - -\change_deleted 564990737 1669755802 -ijmpc and ijmpd -\end_layout +\end_inset -\begin_layout Standard +, and for PDF output, change the +\begin_inset Flex Noun +status collapsed -\change_deleted 564990737 1669755802 -by -\noun on -Panayotis Papasotiriou +\begin_layout Plain Layout +La +\family sans +TeX +\family default + (pdflatex) -> PDF (pdflatex) \end_layout -\begin_layout Subsection +\end_inset -\change_deleted 564990737 1669755802 -Overview + converter to +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +pdflatex -synctex=1 $$i \end_layout -\begin_layout Standard +\end_inset -\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 + 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 . - 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 +\begin_inset Foot status collapsed \begin_layout Plain Layout +Note that the option +\begin_inset Flex Code +status collapsed -http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml +\begin_layout Plain Layout +-synctex=1 \end_layout \end_inset - and -\begin_inset Flex URL + 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 - -http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml +-synctex=-1 \end_layout \end_inset . - Both packages are modified versions of the standard -\begin_inset Quotes eld -\end_inset +\end_layout -article -\begin_inset Quotes erd \end_inset - 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 +Configuring and using specific viewers +\begin_inset CommandInset label +LatexCommand label +name "subsec:configuring-viewers" -\change_deleted 564990737 1669755802 -Writing a paper -\end_layout +\end_inset -\begin_layout Standard -\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 -New from -\family default - -\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 -<> -\family default -) with your text. - You should keep in mind the following remarks. \end_layout -\begin_layout Enumerate - -\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. +\begin_layout Subsubsection* +Xdvi (all platforms) \end_layout -\begin_layout Enumerate +\begin_layout Standard +If you use +\begin_inset Flex Code +status collapsed -\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 +\begin_layout Plain Layout +xdvi +\end_layout - -\family sans -\SpecialChar menuseparator -Language -\family default -, and select -\begin_inset Quotes eld \end_inset -None -\begin_inset Quotes erd -\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 - as -\family sans -Language Package -\family default -. +\begin_layout Plain Layout +lyxclient \end_layout -\begin_layout Enumerate - -\change_deleted 564990737 1669755802 -The -\begin_inset Quotes eld -\end_inset - -Keywords -\begin_inset Quotes erd \end_inset - style must be used to define keywords. + 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 Enumerate +\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 -\change_deleted 564990737 1669755802 -The ijmpc package provides a style named -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout +Preferences\SpecialChar menuseparator +File Handling\SpecialChar menuseparator +File formats +\end_layout -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 + to +\begin_inset Foot +status collapsed -\begin_layout Enumerate +\begin_layout Plain Layout +On Mac OSX you have to use +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1669755802 -Several new environments are available: -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout +DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l" +\end_layout -Definition -\begin_inset Quotes erd \end_inset -, -\begin_inset Quotes eld -\end_inset -Step -\begin_inset Quotes erd -\end_inset +\end_layout -, -\begin_inset Quotes eld \end_inset -Example -\begin_inset Quotes erd -\end_inset + +\begin_inset Flex Code +status collapsed -, -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout +xdvi -editor "lyxeditor.sh %f %l" +\end_layout -Remark -\begin_inset Quotes erd \end_inset -, -\begin_inset Quotes eld -\end_inset +, where +\begin_inset Flex Code +status collapsed -Notation -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout +lyxeditor.sh +\end_layout -, -\begin_inset Quotes eld \end_inset -Theorem -\begin_inset Quotes erd -\end_inset + is a suitable script. + For example, a minimal shell script is the following one: +\end_layout -, -\begin_inset Quotes eld +\begin_layout LyX-Code +#!/bin/sh +\begin_inset Newline newline \end_inset -Proof -\begin_inset Quotes erd +LYXPIPE="/path/to/lyxpipe" +\begin_inset Newline newline \end_inset -, -\begin_inset Quotes eld +COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2" +\begin_inset Newline newline \end_inset -Corollary -\begin_inset Quotes erd +echo "$COMMAND" > "${LYXPIPE}".in || exit +\begin_inset Newline newline \end_inset -, -\begin_inset Quotes eld -\end_inset +read TMP < "${LYXPIPE}".out || exit +\end_layout -Lemma -\begin_inset Quotes erd -\end_inset +\begin_layout Standard +where +\begin_inset Flex Code +status collapsed -, -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout +/path/to/lyxpipe +\end_layout -Proposition -\begin_inset Quotes erd \end_inset -, -\begin_inset Quotes eld -\end_inset + is the LyXServer pipe path specified in +\begin_inset Flex Noun +status collapsed -Prop -\begin_inset Quotes erd -\end_inset +\begin_layout Plain Layout +Preferences\SpecialChar menuseparator +Paths +\end_layout -, -\begin_inset Quotes eld \end_inset -Question -\begin_inset Quotes erd -\end_inset +. +\begin_inset Foot +status collapsed -, -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout +In the +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +development/tools +\end_layout -Claim -\begin_inset Quotes erd \end_inset -, and -\begin_inset Quotes eld + folder of a source distribution you can find a +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +lyxeditor +\end_layout + \end_inset -Conjecture -\begin_inset Quotes erd + script which is able to locate the +\emph on +lyxpipe +\emph default + based on your preferences. +\end_layout + \end_inset -. - 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 +\begin_layout Subsubsection* +MacDviX (Mac OSX) +\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 +\begin_layout Standard +At the end of +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +/Applications/MacDviX_Folder/calleditor.script +\end_layout -g. -\begin_inset space \space{} \end_inset +, add the following lines: +\end_layout -\begin_inset Quotes eld +\begin_layout LyX-Code +/Applications/LyX.app/Contents/MacOS/lyxeditor "$2" $1 +\begin_inset Newline newline \end_inset -See Ref. -\begin_inset space \space{} -\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 -\family typewriter +\begin_layout Subsubsection* +Skim (Mac OSX) +\end_layout -\backslash -refcite{key} -\family default +\begin_layout Standard +Enter +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +open -a Skim.app $$i +\end_layout -\begin_inset Quotes erd \end_inset -. + 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 Enumerate +\end_inset + +, and then in +\begin_inset Flex Noun +status collapsed + +\begin_layout Plain Layout +Skim\SpecialChar menuseparator +Preferences\SpecialChar menuseparator +Sync +\end_layout -\change_deleted 564990737 1669755802 -There is no -\begin_inset Quotes eld \end_inset -Acknowledgments -\begin_inset Quotes erd + choose +\begin_inset Flex Noun +status collapsed + +\begin_layout Plain Layout +custom +\end_layout + \end_inset - section in both packages. - To put acknowledgments, just use the -\begin_inset Quotes eld + preset and enter command +\begin_inset Flex Noun +status collapsed + +\begin_layout Plain Layout +/Applications/\SpecialChar LyX +.app/Contents/MacOS/lyxeditor +\end_layout + \end_inset -Section* -\begin_inset Quotes erd +. +\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" + \end_inset - environment. + for details. \end_layout -\begin_layout Enumerate +\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 -\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 -Appendices Section + and select LyX \begin_inset Quotes erd \end_inset - 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 + as editor. + This inserts the appropriate command ( +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +lyxclient -g %f %l +\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 \end_inset -Appendix +Browse \begin_inset Quotes erd \end_inset - 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 + mode (i. +\begin_inset space \thinspace{} \end_inset -Appendix -\begin_inset Quotes erd +e., the hand symbol is clicked). +\change_unchanged + +\end_layout + +\begin_layout Subsubsection* +Qpdfview (Unix) +\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 - environment. - \SpecialChar LyX - will number each appendix with capital letters, as required by both journals. - Note that +, click on the input field of the \begin_inset Quotes eld \end_inset -Appendices Section +Source editor \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 Enumerate + item and add the command +\begin_inset Flex Code +status collapsed -\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 +\begin_layout Plain Layout +lyxclient -g %1 %2 +\end_layout -\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 -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. +. \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 1669755802 -Preparing a paper for submission +\begin_layout Subsubsection* +YAP (Windows) \end_layout \begin_layout Standard - -\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 +Launch yap, choose its +\begin_inset Flex Noun +status collapsed \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. +View\SpecialChar menuseparator +Options \end_layout \end_inset -, then make the following changes to the resulting -\family typewriter -.tex -\family default - file. -\end_layout - -\begin_layout Enumerate + menu and select the +\begin_inset Quotes eld +\end_inset -\change_deleted 564990737 1669755802 -Remove the comment lines before the -\family typewriter +Inverse DVI Search +\begin_inset Quotes erd +\end_inset -\backslash -documentclass -\family default - command. -\end_layout + tab. + Click on the +\begin_inset Quotes eld +\end_inset -\begin_layout Enumerate +New\SpecialChar ldots -\change_deleted 564990737 1669755802 -Remove everything between (and including) the -\family typewriter +\begin_inset Quotes erd +\end_inset -\backslash -makeatletter -\family default - and -\family typewriter + button and, in the window that opens, enter +\begin_inset Quotes eld +\end_inset -\backslash -makeatother -\family default - commands, except for any commands you specifically put into the \SpecialChar LaTeX - preamble. -\end_layout +\SpecialChar LyX + Editor +\begin_inset Quotes erd +\end_inset -\begin_layout Standard + (or any other name you like) in the +\begin_inset Quotes eld +\end_inset -\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 +Name: +\begin_inset Quotes erd +\end_inset -\end_layout + field. + Now click on the button labeled +\begin_inset Quotes eld +\end_inset -\begin_layout Section +\SpecialChar ldots -\change_deleted 564990737 1669801478 -iopart -\end_layout +\begin_inset Quotes erd +\end_inset -\begin_layout Standard + to open a file dialog and navigate to the directory containing the batch + file +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1669801478 -by -\noun on -Uwe Stöhr +\begin_layout Plain Layout +lyxeditor.bat \end_layout -\begin_layout Subsection +\end_inset -\change_deleted 564990737 1669801478 -Overview + (see below). + Select +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +lyxeditor.bat \end_layout -\begin_layout Standard +\end_inset -\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 + and then specify the program arguments as +\begin_inset Flex Code status collapsed \begin_layout Plain Layout - -ftp://ftp.iop.org/pub/journals/latex2e +%f %l \end_layout \end_inset . -\end_layout - -\begin_layout Subsection + The +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1669801478 -Writing a paper +\begin_layout Plain Layout +lyxeditor.bat \end_layout -\begin_layout Standard +\end_inset -\change_deleted 564990737 1669801478 -The easiest way to write a paper is to start with the template + wrapper is used for communicating with \SpecialChar LyX + through the \emph on -IOP-article.lyx +lyxpipe \emph default - that is available via -\family sans -File\SpecialChar menuseparator -New From Template -\family default - The template explains how to use the special text environments. - Here are the most important advices: + and is as follows: \end_layout -\begin_layout Itemize +\begin_layout LyX-Code +@echo off +\begin_inset Newline newline +\end_inset -\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 -! -\end_layout - -\begin_layout Itemize - -\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 - -\change_deleted 564990737 1669801478 - -\family sans -\size normal -Title -\family default - for a Paper -\end_layout +echo LYXCMD:revdvi:server-goto-file-row:%~1 %2> +\backslash -\begin_layout Itemize +\backslash +. +\backslash +pipe +\backslash +lyxpipe.in +\begin_inset Newline newline +\end_inset -\change_deleted 564990737 1669801478 +type +\backslash -\family sans -\size normal -Review -\family default - for a Review +\backslash +. +\backslash +pipe +\backslash +lyxpipe.out \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669801478 - -\family sans -\size normal -Topical -\family default - for a Topical review -\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 -\begin_layout Itemize +\begin_layout Plain Layout -\change_deleted 564990737 1669801478 +\backslash -\family sans -\size normal -Comment -\family default - for a Comment +\backslash +. +\backslash +pipe +\backslash +lyxpipe \end_layout -\begin_layout Itemize +\end_inset -\change_deleted 564990737 1669801478 +, otherwise change the +\begin_inset Flex Code +status collapsed -\family sans -\size normal -Note -\family default - for a Note +\begin_layout Plain Layout +lyxeditor.bat \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669801478 +\end_inset -\family sans -\size normal -Paper -\family default - for a Paper (same as Title) + wrapper accordingly. \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669801478 - -\family sans -\size normal -Prelim -\family default - for a Preliminary communication +\begin_layout Standard +In yap, reverse search is triggered by double-click. \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669801478 - -\family sans -\size normal -Rapid -\family default - for a Rapid communication +\begin_layout Subsubsection* +SumatraPDF (Windows) \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1669801478 +\begin_layout Standard +In order to use SumatraPDF for inverse search, enter +\begin_inset Flex Code +status collapsed -\family sans -\size normal -Letter -\family default - for a Letter to the editor +\begin_layout Plain Layout +SumatraPDF -inverse-search "lyxeditor.bat "%f" %l" \end_layout -\end_deeper -\begin_layout Itemize - -\change_deleted 564990737 1669801478 - -\size normal -All title environments except of -\family sans -Letter -\family default - can have an optional short title. -\end_layout +\end_inset -\begin_layout Itemize + in the viewer setting in +\begin_inset Flex Noun +status collapsed -\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. +\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 1669801478 -For more informations like hints for special table and formula formatting, - look at the IOP author guidelines. -\change_unchanged +, where +\begin_inset Flex Code +status collapsed +\begin_layout Plain Layout +lyxeditor.bat \end_layout -\begin_layout Section +\end_inset -\change_deleted 564990737 1670317155 -Kluwer + 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 1670317155 -by -\noun on -Panayotis Papasotiriou +Reverse search is triggered by double-click. \end_layout -\begin_layout Subsection - -\change_deleted 564990737 1670317155 -Overview +\begin_layout Subsubsection* +YAP (Cygwin) \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 -\emph on -Astrophysics and Space Science -\emph default - and -\emph on -Solar Physics -\emph default -, but there are many others (see a complete list at -\begin_inset Flex URL +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 \begin_layout Plain Layout - -http://www.wkap.nl/jrnllist.htm/JRNLHOME +View\SpecialChar menuseparator +Options \end_layout \end_inset -). - The Kluwer package may be downloaded from the site -\begin_inset Flex URL -status collapsed - -\begin_layout Plain Layout + menu and select the +\begin_inset Quotes eld +\end_inset -http://www.wkap.nl/kaphtml.htm/STYLEFILES -\end_layout +Inverse DVI Search +\begin_inset Quotes erd +\end_inset + tab. + Click on the +\begin_inset Quotes eld \end_inset -. - A complete user guide is contained in that package (but it can also be - downloaded separately). -\end_layout +New\SpecialChar ldots -\begin_layout Standard +\begin_inset Quotes erd +\end_inset -\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 + button and, in the window that opens, enter \begin_inset Quotes eld \end_inset -peculiar +\SpecialChar LyX + Editor \begin_inset Quotes erd \end_inset - commands of the package (see -\begin_inset space ~ + (or any other name you like) in the +\begin_inset Quotes eld \end_inset - -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:kluwer_peculiarities" - +Name: +\begin_inset Quotes erd \end_inset -). - 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 + field. + Now click on the button labeled +\begin_inset Quotes eld +\end_inset -\begin_layout Subsection +\SpecialChar ldots -\change_deleted 564990737 1670317155 -Writing a paper -\end_layout +\begin_inset Quotes erd +\end_inset -\begin_layout Standard + to open a file dialog and navigate to the directory containing the +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1670317155 -The easiest way to write a paper is to start with the Kluwer template file. - Click on -\family sans -File\SpecialChar menuseparator -New from -\family default - -\family sans -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. +\begin_layout Plain Layout +lyxeditor.exe \end_layout -\begin_layout Subsection +\end_inset -\change_deleted 564990737 1670317155 -Preparing a paper for submission -\end_layout + program (which is installed by default on Cygwin along with the \SpecialChar LyX + executable). + Select +\begin_inset Flex Code +status collapsed -\begin_layout Standard +\begin_layout Plain Layout +lyxeditor.exe +\end_layout -\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 + and then specify the program arguments as +\begin_inset Flex Code +status collapsed - it as follows. +\begin_layout Plain Layout +-g %f %l \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 +\end_inset -\family default . - -\end_layout - -\begin_layout Enumerate + 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 -\change_deleted 564990737 1670317155 -Edit the resulting -\family typewriter -.tex -\family default - file with a text editor and make the following changes +\begin_layout Plain Layout +-g \end_layout -\begin_deeper -\begin_layout Enumerate - -\change_deleted 564990737 1670317155 -remove the comment lines before the -\family typewriter +\end_inset -\backslash -documentclass -\family default - command, + option and be sure to specify the \SpecialChar LyX +Server pipe path in the \SpecialChar LyX + preferences. \end_layout -\begin_layout Enumerate - -\change_deleted 564990737 1670317155 -remove everything between (and including) the -\family typewriter - -\backslash -makeatletter -\family default - and -\family typewriter +\begin_layout Standard +In yap, reverse search is triggered by double-click. +\end_layout -\backslash -makeatother -\family default - commands, except for any commands you specifically put into the \SpecialChar LaTeX - preamble. +\begin_layout Subsubsection* +SumatraPDF (Cygwin) \end_layout \begin_layout Standard +In order to use SumatraPDF for inverse search, enter +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1670317155 -Save the resulting -\family typewriter -.tex -\family default - file. +\begin_layout Plain Layout +SumatraPDF -inverse-search "lyxeditor -g %f %l" \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). -\end_layout +\end_inset -\begin_layout Enumerate + in the viewer setting in +\begin_inset Flex Noun +status collapsed -\change_deleted 564990737 1670317155 -View the resulting -\family typewriter -.dvi -\family default - document using, e. -\begin_inset space \thinspace{} -\end_inset +\begin_layout Plain Layout +Preferences\SpecialChar menuseparator +File Handling\SpecialChar menuseparator +File formats\SpecialChar menuseparator +PDF (pdflatex) +\end_layout -g. -\begin_inset space \space{} \end_inset +. + If SumatraPDF.exe is not in your command PATH, use its full posix path. + The +\begin_inset Flex Code +status collapsed -\family sans -xdvi -\family default -, and check if everything is OK (it should, if you didn't make any mistake). +\begin_layout Plain Layout +-g \end_layout -\begin_layout Subsection - -\change_deleted 564990737 1670317155 -\begin_inset Quotes eld \end_inset -Peculiarities -\begin_inset Quotes erd -\end_inset + enables communication via the +\emph on +lyxsocket +\emph default +. + Again, omit the +\begin_inset Flex Code +status collapsed - of the Kluwer package -\begin_inset CommandInset label -LatexCommand label -name "subsec:kluwer_peculiarities" +\begin_layout Plain Layout +-g +\end_layout \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 1670317155 -The Kluwer package has the following +\begin_layout Section +Forward search +\end_layout + +\begin_layout Standard +Forward search is, as the name implies, in a sense the \begin_inset Quotes eld \end_inset -peculiarities +opposite \begin_inset Quotes erd \end_inset -. -\end_layout - -\begin_layout Enumerate - -\change_deleted 564990737 1670317155 -It is possible to write multiple articles in the same \SpecialChar LaTeX - file -\begin_inset Foot + 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 \begin_layout Plain Layout -I can't imagine any good reason to do this. +Navigate\SpecialChar menuseparator +Forward search \end_layout \end_inset -. - Each article must be included in the environment -\begin_inset Quotes eld -\end_inset - -article -\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 - -\backslash -begin{article} -\family default - and, obviously, ends with the command -\family typewriter - -\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 -\begin_inset Quotes erd -\end_inset + (or select +\begin_inset Flex Noun +status collapsed -). +\begin_layout Plain Layout +Forward search \end_layout -\begin_layout Enumerate - -\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 + 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 -title, subtitle, author, institution, running title, running author, abstract - and keywords) must be included in an environment called -\begin_inset Quotes eld -\end_inset +\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" -opening -\begin_inset Quotes erd \end_inset . - 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 +\end_layout -\backslash -begin{opening} -\family default - and -\family typewriter +\begin_layout Standard +Additionally, you need to configure \SpecialChar LyX + for using your viewers in +\begin_inset Flex Noun +status collapsed -\backslash -end{opening} -\family default -). +\begin_layout Plain Layout +Tools\SpecialChar menuseparator +Preferences\SpecialChar menuseparator +Output\SpecialChar menuseparator +General \end_layout -\begin_layout Enumerate - -\change_deleted 564990737 1670317155 -According to the user manual, the label of each bibliography item must be - written as -\family typewriter +\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 . + 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 - -\change_deleted 564990737 1670317155 -The -\family typewriter -kluwer.lyx -\family default - template takes care of all these -\begin_inset Quotes eld -\end_inset - -peculiarities -\begin_inset Quotes erd -\end_inset +\begin_layout Itemize +\noindent +\begin_inset Flex Code +status collapsed -. - If you start a new paper using this template you don't need to do anything - special. - Just +\begin_layout Plain Layout +$$n \end_layout -\begin_layout Enumerate +\end_inset -\change_deleted 564990737 1670317155 -don't delete the \SpecialChar TeX - code included in the template, and +: row number \end_layout -\begin_layout Enumerate +\begin_layout Itemize +\noindent +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1670317155 -copy the example bibliography item included in the template and modify it - as necessary to enter new bibliography items. +\begin_layout Plain Layout +$$t \end_layout -\begin_layout Section +\end_inset -\change_deleted 564990737 1671097446 -Paper +: 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 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. +\begin_layout Plain Layout +$$f \end_layout -\begin_layout Section +\end_inset -\change_deleted 564990737 1671097446 -Springer Journals ( -\family sans -svjour -\family default -) +: name of the (temporary) exported .tex file (including path) \end_layout -\begin_layout Standard +\begin_layout Itemize +\noindent +\begin_inset Flex Code +status collapsed -\change_deleted 564990737 1671097446 -by -\noun on -Martin Vermeer +\begin_layout Plain Layout +$$o \end_layout -\begin_layout Subsection +\end_inset -\change_deleted 564990737 1671097446 -Description +: name of the exported output file (either dvi or pdf, depending on which + one exists in the temporary directory) \end_layout \begin_layout Standard - -\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 +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 +\begin_inset Flex Code +status collapsed -http://www.springer.de/author/tex/help-journals.html +\begin_layout Plain Layout +okular --unique \end_layout \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{} +\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 -g. -\begin_inset space \space{} +Formats +\end_layout + \end_inset -\family typewriter -svjog.layout -\family default - for Journal of Geodesy) can include. \end_layout -\begin_layout Standard +\end_inset -\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 - -\family typewriter -.layout -\family default - file following the outline given in -\family typewriter -svjog.layout -\family default -. - -\end_layout +, qpdfview, and SumatraPDF +\begin_inset Foot +status collapsed -\begin_layout Standard +\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 1671097446 -It is reasonably well tested only for the Journal of Geodesy. - -\family typewriter -svjour -\family default - and -\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 -\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 +\end_inset -\begin_layout Subsection -\change_deleted 564990737 1671097446 -New styles \end_layout -\begin_layout Standard +\end_inset -\change_deleted 564990737 1671097446 -A large number of theorem-like styles — -\family sans -Claim, Conjecture, -\family default - -\family sans -\SpecialChar ldots -Theorem -\family default . + 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 Standard +\end_inset -\change_deleted 564990737 1671097446 +, 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 -\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. + This latter functionality is provided by an external call of synctex (see + the predefined example configurations). + \end_layout -\begin_layout Subsection +\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 1671097446 -Supported journals +e., which format is already there in the temporary directory) and chooses + the appropriate configuration for the respective format. \end_layout -\begin_layout Itemize +\begin_layout Chapter -\change_deleted 564990737 1671097446 +\change_deleted 564990737 1671097409 +Special Document Classes +\change_unchanged -\emph on -Journal of Geodesy -\emph default -: -\family typewriter -svjog.layout -\family default - — Martin Vermeer \end_layout -\begin_layout Itemize - -\change_deleted 564990737 1671097446 +\begin_layout Section -\emph on -Probability Theory and Related Fields -\emph default -: -\family typewriter -svprobth.layout -\family default - — Jean-Marc Lasgouttes +\change_deleted 564990737 1669742044 +A&A Paper \end_layout \begin_layout Standard -\change_deleted 564990737 1671097446 -Add your own, it isn't so hard! +\change_deleted 564990737 1669742044 +by +\noun on +Peter Sütterlin \end_layout \begin_layout Subsection -\change_deleted 564990737 1671097446 -Credits +\change_deleted 564990737 1669742044 +Introduction \end_layout \begin_layout Standard -\change_deleted 564990737 1671097446 -These files are partly based on the older -\family typewriter -ejour2.layout -\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 -\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 +\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 +status collapsed -\begin_layout Subsection +\begin_layout Plain Layout -\change_deleted 564990737 1671097446 -Bugs +https://www.aanda.org/ \end_layout -\begin_layout Standard +\end_inset -\change_deleted 564990737 1671097446 -Probably. - But probably less than in the old hacked-\SpecialChar LaTeX - +) using Version 5.01 of the document class \family typewriter -ejour2 +aa.cls \family default . + This package can be downloaded from the ftp site \end_layout -\begin_layout Chapter -\SpecialChar LyX - Features needing Extra Software -\end_layout - -\begin_layout Section -Checking \SpecialChar TeX +\begin_layout Standard -\end_layout +\change_deleted 564990737 1669742044 +\begin_inset VSpace medskip +\end_inset -\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 -chktex -\family default - program installed -\begin_inset Foot +\align center + +\change_deleted 564990737 1669742044 +\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.edpsciences.org/pub/aa/readme.html \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_layout + +\begin_layout Standard + +\change_deleted 564990737 1669742044 +\begin_inset VSpace medskip \end_inset -\begin_inset CommandInset href -LatexCommand href -target "https://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html" -literal "false" +\end_layout -\end_inset +\begin_layout Standard -. +\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 -The -\family sans -Chk\SpecialChar TeX +\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 - package is a program that was written by -\begin_inset Flex Noun -status collapsed +. + Please refer to the comments in +\family typewriter +\SpecialChar LyX +Dir/layouts/aapaper.layout +\family default +. +\end_layout -\begin_layout Plain Layout -Jens T. -\begin_inset space ~ -\end_inset +\begin_layout Subsection -Berger Thielemann +\change_deleted 564990737 1669742044 +Getting started \end_layout -\end_inset +\begin_layout Standard - 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 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 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 +\begin_layout Itemize +\change_deleted 564990737 1669742044 +Select +\family sans +article (A&A) \family default - catches some common -\emph on -typographic -\emph default - errors, in addition to the syntactical ones. - Specifically, + in the \family sans -Chk\SpecialChar TeX - +Document\SpecialChar menuseparator +Settings \family default - is capable of detecting several common errors, such as + dialog (OK, that one was obvious). \end_layout \begin_layout Itemize -Ellipsis detection: -\begin_inset Newline newline -\end_inset - -Use \SpecialChar ldots - instead of ... -\end_layout -\begin_layout Itemize -No space in front of/after parenthesis: -\begin_inset Newline newline +\change_deleted 564990737 1669742044 +Don't change the option +\family sans +Page +\begin_inset space ~ \end_inset -( wrong spacing ) +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 Itemize -Enforcement of normal space after common abbreviations: -\begin_inset Newline newline -\end_inset +\begin_layout Subsection -e. -\begin_inset space \thinspace{} -\end_inset +\change_deleted 564990737 1669742044 +The header block +\end_layout -g. -\begin_inset space \space{} -\end_inset +\begin_layout Standard -is too wide spacing. +\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 -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 1669742044 + +\family sans +Title +\family default +: [required] \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 1669742044 -\end_inset +\family sans +Subtitle +\family default +: [optional] +\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 1669742044 + +\family sans +Author +\family default +: [required] \end_layout -\end_inset +\begin_layout Itemize - The label is separated too much. +\change_deleted 564990737 1669742044 + +\family sans +Address +\family default +: [required] \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 1669742044 -. +\family sans +Offprints +\family default +: [optional] if more than one author: whom to contact for offprint requests. \end_layout \begin_layout Itemize -Use of -\begin_inset Quotes eld -\end_inset -x -\begin_inset Quotes erd -\end_inset +\change_deleted 564990737 1669742044 - instead of -\begin_inset Formula $\times$ -\end_inset +\family sans +Mail +\family default +: [optional] mail address for contacts. +\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 1669742044 -. +\family sans +Date +\family default +: [required]. + Suggested format is +\family typewriter +Received: ; Accepted \end_layout \begin_layout Standard -and more \SpecialChar ldots - It is an invaluable tool when you are -\begin_inset Quotes eld -\end_inset - -finishing up -\begin_inset Quotes erd -\end_inset - 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 +\change_deleted 564990737 1669742044 +There is no need to issue the +\family typewriter -\begin_layout Subsection -How to use it +\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 \begin_layout Standard -If you have the program installed, usage is as simple as choosing -\family sans -Tools\SpecialChar menuseparator -Check -\begin_inset space ~ -\end_inset - -TeX -\family default -. - This will make \SpecialChar LyX - generate a \SpecialChar LaTeX - file of your document, start -\family sans -Chk\SpecialChar TeX -\family default - to check it, and then make \SpecialChar LyX - insert -\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 -error boxes -\begin_inset Quotes erd +g. +\begin_inset space \space{} \end_inset - with the warnings from +to state your present address, just use the standard footnote via the menu + \family sans -Chk\SpecialChar TeX +Insert\SpecialChar menuseparator +Footnote. \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 + \SpecialChar LyX + will automagically use the term \family typewriter -cua + +\backslash +thanks{} \family default - bind file. - Open the error boxes by clicking on them with the mouse, or use the shortcut - key + in that case. +\end_layout + +\begin_layout Standard + +\change_deleted 564990737 1669742044 +Under \family sans -C-i -\family default - from -\family typewriter -cua +Edit\SpecialChar menuseparator +Text Style \family default - bindings, or the corresponding +, you'll find two insets which are relevant for the titling: +\end_layout + +\begin_layout Itemize + +\change_deleted 564990737 1669742044 + \family sans -C-o -\family default - for the alternate +Institute \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 +to mark corresponding author\SpecialChar breakableslash +institute pairs. + The institutes are numbered sequentially as they appear in the \family sans -Chk\SpecialChar TeX +Address +\family default + field, so you have to put a marker to each author. +\end_layout + +\begin_layout Itemize +\change_deleted 564990737 1669742044 + +\family sans +Email \family default -, and this gap can make some warnings seem arcane or just plain silly. + to supply an email address for fast contact. \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. -\end_layout -\begin_layout Subsection -How to fine tune it +\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 -\begin_layout Standard -Sometimes, you'll find that -\family sans -Chk\SpecialChar TeX +\begin_layout Itemize -\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 +\change_deleted 564990737 1669742044 + +\family typewriter +\backslash +and \family default - to get better along with you. + to separate different names for more than one author and institute, respectivel +y. \end_layout \begin_layout Standard -Although -\family sans -Chk\SpecialChar TeX -\family default +\change_deleted 564990737 1669742044 +The appropriate command has to be entered in \SpecialChar LyX + and marked as \SpecialChar LaTeX + code. + See the examples. -\emph on -is -\emph default - very configurable and extensible, you should not expect to solve all problems - with -\family sans -Chk\SpecialChar TeX +\end_layout -\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 +\begin_layout Subsection -\family default - output -\begin_inset Foot -status collapsed +\change_deleted 564990737 1669742044 +The abstract +\end_layout -\begin_layout Plain Layout -You can inspect the specific output from +\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 -chktex +Keywords \family default - by using -\family sans -Document\SpecialChar menuseparator -\SpecialChar LaTeX +. + Refer to the example paper. +\end_layout -\begin_inset space ~ -\end_inset +\begin_layout Subsection -Log -\family default - right after a -\family sans -chktex -\family default - run. +\change_deleted 564990737 1669742044 +Supported environments \end_layout -\end_inset +\begin_layout Standard - to the internal document structure, some of the warnings will not appear - correctly. - There are two things you can do about this: +\change_deleted 564990737 1669742044 +The A&A paper layout supports the following environments for structuring + your text: \end_layout \begin_layout Itemize -Fine tune the + +\change_deleted 564990737 1669742044 + \family sans -Chk\SpecialChar TeX +Standard +\end_layout -\family default - invocation command line in -\begin_inset Flex Noun -status collapsed +\begin_layout Itemize -\begin_layout Plain Layout -Tools\SpecialChar menuseparator -Preferences\SpecialChar menuseparator -Output\SpecialChar menuseparator -LaTeX\SpecialChar menuseparator -CheckTeX command -\end_layout - -\end_inset +\change_deleted 564990737 1669742044 -, or the global \family sans -Chk\SpecialChar TeX - -\family default - installation configuration file (usually with the file -\family typewriter -chktexrc -\family default -). - See below to learn what warnings can be enabled and disabled on the command - line. +Section \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 -\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 +\change_deleted 564990737 1669742044 -\begin_layout Standard -Here follows the warning messages that can be enabled and disabled in \family sans -Preferences -\family default -. - 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 -". +Subsection \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 -\family typewriter -chktex -\family default -. -\end_layout +\begin_layout Itemize -\begin_layout Enumerate +\change_deleted 564990737 1669742044 -\size small -\emph on -Command terminated with space. +\family sans +Subsubsection \end_layout -\begin_layout Enumerate +\begin_layout Itemize -\size small -Non-breaking space ( -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1669742044 +\family sans +Itemize +\end_layout -\family typewriter -~ -\family default +\begin_layout Itemize -\begin_inset Quotes erd -\end_inset +\change_deleted 564990737 1669742044 -) should have been used. +\family sans +Enumerate \end_layout -\begin_layout Enumerate +\begin_layout Itemize -\size small -\emph on -You should enclose the previous parenthesis with -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1669742044 +\family sans +Description +\end_layout -\family typewriter -{} -\family default +\begin_layout Itemize -\begin_inset Quotes erd -\end_inset +\change_deleted 564990737 1669742044 -. +\family sans +Caption \end_layout -\begin_layout Enumerate - -\size small -Italic correction ( -\begin_inset Quotes eld -\end_inset +\begin_layout Itemize +\change_deleted 564990737 1669742044 -\family typewriter +\family sans +Abstract +\end_layout -\backslash -/ -\family default +\begin_layout Itemize -\begin_inset Quotes erd -\end_inset +\change_deleted 564990737 1669742044 -) found in non-italic buffer. +\family sans +Acknowledgment \end_layout -\begin_layout Enumerate +\begin_layout Itemize -\size small -Italic correction ( -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1669742044 +\family sans +Bibliography +\end_layout -\family typewriter +\begin_layout Itemize -\backslash -/ -\family default +\change_deleted 564990737 1669742044 -\begin_inset Quotes erd -\end_inset +\family sans +\SpecialChar LaTeX -) found more than once. \end_layout -\begin_layout Enumerate +\begin_layout Subsection -\size small -\emph on -No italic correction ( -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1669742044 +Commands not supported by \SpecialChar LyX +\end_layout -\family typewriter +\begin_layout Standard -\backslash -/ +\change_deleted 564990737 1669742044 +Some commands are not yet supported by the +\family sans +paper (A&A) \family default - -\begin_inset Quotes erd -\end_inset - -) found. + 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 - -\size small -Accent command -\begin_inset Quotes eld -\end_inset +\begin_layout Itemize +\change_deleted 564990737 1669742044 \family typewriter -cmd -\family default -\begin_inset Quotes erd -\end_inset +\backslash +and +\end_layout - needs use of -\begin_inset Quotes eld -\end_inset +\begin_layout Itemize +\change_deleted 564990737 1669742044 \family typewriter -cmd -\family default - -\begin_inset Quotes erd -\end_inset - -. -\end_layout -\begin_layout Enumerate - -\size small -Wrong length of dash may have been used. +\backslash +authorrunning \end_layout -\begin_layout Enumerate - -\size small -\emph on -\begin_inset Quotes eld -\end_inset +\begin_layout Itemize +\change_deleted 564990737 1669742044 \family typewriter -%s -\family default -\begin_inset Quotes erd -\end_inset +\backslash +object{} +\end_layout - expected, found -\begin_inset Quotes eld -\end_inset +\begin_layout Itemize +\change_deleted 564990737 1669742044 \family typewriter -%s -\family default -\begin_inset Quotes erd -\end_inset - -. +\backslash +titlerunning{} \end_layout -\begin_layout Enumerate +\begin_layout Standard -\size small -Solo -\begin_inset Quotes eld -\end_inset - - -\family typewriter -%s -\family default - -\begin_inset Quotes erd -\end_inset - - found. +\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 Enumerate +\begin_layout Subsection -\size small -You should use -\begin_inset Quotes eld -\end_inset +\change_deleted 564990737 1669742044 +Figure and Table Floats +\end_layout +\begin_layout Standard -\family typewriter -%s +\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_inset Quotes erd +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 - to achieve an ellipsis. +Settings. \end_layout -\begin_layout Enumerate - -\size small -Inter-word spacing ( -\begin_inset Quotes eld -\end_inset - +\begin_layout Standard -\family typewriter +\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 -\backslash +\begin_layout Enumerate +\change_deleted 564990737 1669742044 +Create a wide figure float: +\family sans +Insert\SpecialChar menuseparator +Float\SpecialChar menuseparator +Figure \family default - -\begin_inset Quotes eld +, then right click in the figure and select +\family sans +Span +\begin_inset space ~ \end_inset -) should perhaps be used. +columns +\family default +. \end_layout \begin_layout Enumerate -\size small -Inter-sentence spacing ( -\begin_inset Quotes eld -\end_inset - +\change_deleted 564990737 1669742044 +Enter your caption text. +\end_layout -\family typewriter +\begin_layout Enumerate -\backslash -@ +\change_deleted 564990737 1669742044 +Press +\family sans +Return \family default - -\begin_inset Quotes erd -\end_inset - -) should perhaps be used. + to move the cursor above the caption. \end_layout \begin_layout Enumerate -\size small -Could not find argument for command. +\change_deleted 564990737 1669742044 +Insert your figure \end_layout \begin_layout Enumerate -\size small -No match found for -\begin_inset Quotes eld +\change_deleted 564990737 1669742044 +Position the cursor behind the figure and insert a horizontal fill: +\family sans +Insert\SpecialChar menuseparator +Special +\begin_inset space ~ \end_inset - -\family typewriter -%s -\family default - -\begin_inset Quotes erd +Character\SpecialChar menuseparator +Horizontal +\begin_inset space ~ \end_inset +Fill +\family default . \end_layout \begin_layout Enumerate -\size small -Math mode still on at end of \SpecialChar LaTeX - file. -\end_layout - -\begin_layout Enumerate - -\size small -Number of -\begin_inset Quotes eld +\change_deleted 564990737 1669742044 +Switch to \SpecialChar LaTeX + mode: +\family sans +M-c +\begin_inset space ~ \end_inset - -\family typewriter -char +t \family default +. +\end_layout -\begin_inset Quotes erd -\end_inset - - doesn't match the number of -\begin_inset Quotes eld -\end_inset - +\begin_layout Enumerate +\change_deleted 564990737 1669742044 +Enter \family typewriter -char -\family default - -\begin_inset Quotes erd -\end_inset +\backslash +parbox[b]{55mm}{ +\family default . + +\series bold +Do not close the brace! \end_layout \begin_layout Enumerate -\size small -You should use either -\family typewriter - -\begin_inset Quotes eld +\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 ~ \end_inset - +t \family default - or + \family typewriter - -\begin_inset Quotes erd -\end_inset - - +} \family default - as an alternative to -\begin_inset Quotes eld -\end_inset +. +\end_layout +\begin_layout Standard -\family typewriter -" -\family default +\change_deleted 564990737 1669742044 +Also, refer to the figures in the example paper. +\end_layout -\begin_inset Quotes erd -\end_inset +\begin_layout Subsection -. +\change_deleted 564990737 1669742044 +Referee layout \end_layout -\begin_layout Enumerate +\begin_layout Standard -\size small -You should use " +\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 -" (ASCII 39) instead of " + 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 -" (ASCII 180). -\end_layout - -\begin_layout Enumerate - -\size small -User-specified pattern found. + there. \end_layout -\begin_layout Enumerate +\begin_layout Subsection -\size small -This command might not be intended. +\change_deleted 564990737 1669742044 +The example paper \end_layout -\begin_layout Enumerate +\begin_layout Standard -\size small -\emph on -Comment displayed. -\end_layout +\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 -\begin_layout Enumerate +\begin_layout Section -\size small -Either -\family typewriter -'' -\backslash -,' +\change_deleted 564990737 1671097429 +Dinbrief +\end_layout + +\begin_layout Standard + +\change_deleted 564990737 1671097429 +The document class +\family sans +dinbrief \family default - or + can be used to type letters according to German conventions. + A template file is included in \family typewriter -' -\backslash -,'' +.../lyx/share/templates \family default - will look better. + for you to use as a starting point. \end_layout -\begin_layout Enumerate +\begin_layout Section -\size small -Delete this space to maintain correct page references. +\change_deleted 564990737 1671097429 +Elsevier Journals \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 +\change_deleted 564990737 1671097429 +See the \SpecialChar LyX + template file \family typewriter -{} +elsarticle.lyx \family default - -\begin_inset Quotes erd -\end_inset - . + It contains all infos you need. \end_layout -\begin_layout Enumerate +\begin_layout Section -\size small -You ought to remove spaces in front of punctuation. +\change_deleted 564990737 1669755802 +ijmpc and ijmpd \end_layout -\begin_layout Enumerate +\begin_layout Standard -\size small -Could not execute \SpecialChar LaTeX - command. +\change_deleted 564990737 1669755802 +by +\noun on +Panayotis Papasotiriou \end_layout -\begin_layout Enumerate - -\size small -Don't use -\family typewriter +\begin_layout Subsection -\backslash -/ -\family default - in front of small punctuation. +\change_deleted 564990737 1669755802 +Overview \end_layout -\begin_layout Enumerate +\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 -\size small -$ -\backslash -times$ +ws-ijmpc.cls \family default - may look prettier here. -\end_layout + 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 Enumerate +\begin_layout Plain Layout -\size small -\emph on -Multiple spaces detected in output. +http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml \end_layout -\begin_layout Enumerate +\end_inset -\size small -This text may be ignored. -\end_layout + and +\begin_inset Flex URL +status collapsed -\begin_layout Enumerate +\begin_layout Plain Layout -\size small -Use -\family typewriter +http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml +\end_layout + +\end_inset +. + Both packages are modified versions of the standard \begin_inset Quotes eld \end_inset +article +\begin_inset Quotes erd +\end_inset -\family default - to begin quotation, not -\family typewriter -' -\family 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 Enumerate +\begin_layout Subsection -\size small -Use +\change_deleted 564990737 1669755802 +Writing a paper +\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 +\family sans +File\SpecialChar menuseparator +New from +\family default + +\family sans +Template +\family default +, then choose the \family typewriter -' +ijmpc.lyx \family default - to end quotation, not + or \family typewriter - -\begin_inset Quotes eld -\end_inset - - +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 +<> +\family default +) with your text. + You should keep in mind the following remarks. \end_layout \begin_layout Enumerate -\size small -Don't mix quotes. +\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 -\size small -You should perhaps use -\begin_inset Quotes eld +\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 - -\family typewriter -cmd + +\family sans +\SpecialChar menuseparator +Language \family default +, and select +\begin_inset Quotes eld +\end_inset +None \begin_inset Quotes erd \end_inset - instead. + as +\family sans +Language Package +\family default +. \end_layout \begin_layout Enumerate -\size small -You should put a space in front of/after parenthesis. -\end_layout +\change_deleted 564990737 1669755802 +The +\begin_inset Quotes eld +\end_inset -\begin_layout Enumerate +Keywords +\begin_inset Quotes erd +\end_inset -\size small -You should avoid spaces in front of/after parenthesis. + style must be used to define keywords. \end_layout \begin_layout Enumerate -\size small -\emph on -You should not use punctuation in front of/after quotes. -\end_layout +\change_deleted 564990737 1669755802 +The ijmpc package provides a style named +\begin_inset Quotes eld +\end_inset -\begin_layout Enumerate +Classification Codes +\begin_inset Quotes erd +\end_inset -\size small -Double space found. +, 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 Enumerate -\size small -You should put punctuation outside inner/inside display math mode. -\end_layout +\change_deleted 564990737 1669755802 +Several new environments are available: +\begin_inset Quotes eld +\end_inset -\begin_layout Enumerate +Definition +\begin_inset Quotes erd +\end_inset -\size small -You ought to not use primitive \SpecialChar TeX - in \SpecialChar LaTeX - code. -\end_layout +, +\begin_inset Quotes eld +\end_inset -\begin_layout Enumerate +Step +\begin_inset Quotes erd +\end_inset -\size small -You should remove spaces in front of +, \begin_inset Quotes eld \end_inset +Example +\begin_inset Quotes erd +\end_inset -\family typewriter -%s -\family default +, +\begin_inset Quotes eld +\end_inset +Remark \begin_inset Quotes erd \end_inset +, +\begin_inset Quotes eld +\end_inset -\end_layout - -\begin_layout Enumerate +Notation +\begin_inset Quotes erd +\end_inset -\size small +, \begin_inset Quotes eld \end_inset +Theorem +\begin_inset Quotes erd +\end_inset -\family typewriter -%s -\family default +, +\begin_inset Quotes eld +\end_inset +Proof \begin_inset Quotes erd \end_inset - is normally not followed by +, \begin_inset Quotes eld \end_inset +Corollary +\begin_inset Quotes erd +\end_inset -\family typewriter -%c -\family default +, +\begin_inset Quotes eld +\end_inset +Lemma \begin_inset Quotes erd \end_inset -. -\end_layout - -\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_inset Quotes eld +\end_inset -\begin_layout Section -Version Control in \SpecialChar LyX +Proposition +\begin_inset Quotes erd +\end_inset -\end_layout +, +\begin_inset Quotes eld +\end_inset -\begin_layout Standard -by -\noun on - Lars Gullik Bjønnes -\noun default -and -\noun on -Pavel Sanda -\end_layout +Prop +\begin_inset Quotes erd +\end_inset -\begin_layout Subsection -Introduction -\end_layout +, +\begin_inset Quotes eld +\end_inset -\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 +Question +\begin_inset Quotes erd +\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_inset Quotes eld +\end_inset -\begin_layout Plain Layout -\begin_inset CommandInset href -LatexCommand href -target "http://svnbook.red-bean.com/" -literal "false" +Claim +\begin_inset Quotes erd +\end_inset +, and +\begin_inset Quotes eld \end_inset +Conjecture +\begin_inset Quotes erd +\end_inset +. + 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 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 -. - In the case of RCS you should read +g. +\begin_inset space \space{} +\end_inset + + \begin_inset Quotes eld \end_inset -rcsintro -\begin_inset Quotes erd +See Ref. +\begin_inset space \space{} \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 + +\backslash +refcite{key} \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 ~ +\begin_inset Quotes erd \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 Enumerate -\begin_layout Plain Layout -vc-command -\end_layout +\change_deleted 564990737 1669755802 +There is no +\begin_inset Quotes eld +\end_inset +Acknowledgments +\begin_inset Quotes erd \end_inset - in the manual -\emph on -\SpecialChar LyX - Functions -\emph default -. + 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 -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. -\end_layout - -\begin_layout Subsection -RCS commands in \SpecialChar LyX - -\end_layout - -\begin_layout Standard -The following sections describe the RCS commands supported by \SpecialChar LyX -. - You can find them in the -\family sans -File\SpecialChar menuseparator -Version -\begin_inset space ~ -\end_inset +\begin_layout Enumerate -Control -\family default - submenu. +\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 - was tested against RCS 5.7/5.8. -\end_layout - -\begin_layout Subsubsection + provides a special environment, called +\begin_inset Quotes eld +\end_inset -\family sans -Register -\end_layout +Appendices Section +\begin_inset Quotes erd +\end_inset -\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 + 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 -\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 ~ +Appendix +\begin_inset Quotes erd \end_inset -Out -\begin_inset space ~ + 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 -For -\begin_inset space ~ +Appendix +\begin_inset Quotes erd \end_inset -Edit -\family default -, before making any changes to it. - A document under revision control has a + environment. + \SpecialChar LyX + will number each appendix with capital letters, as required by both journals. + Note that \begin_inset Quotes eld \end_inset -[RCS: ] +Appendices Section \begin_inset Quotes erd \end_inset - item tagged to the filename in the minibuffer. + +\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 -RCS command that is run: -\end_layout +\begin_layout Enumerate -\begin_layout LyX-Code +\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 +\backslash +tbl{ +\emph on +your table caption +\emph default +}{ +\family default + (sic); you must also the \SpecialChar TeX + code \family typewriter -ci -q -u -i -t-"" -\end_layout +} +\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 -\begin_layout Standard -Read +Document +\family default +). + Details on how to create a table float can be found in the files \family typewriter -man ci +ws-ijmpc.tex \family default - to understand the switches. - + and +\family typewriter +ws-ijmpd.tex +\family default +, included in the corresponding packages. \end_layout -\begin_layout Subsubsection +\begin_layout Subsection -\family sans -Check In Changes +\change_deleted 564990737 1669755802 +Preparing a paper for submission \end_layout \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 -\begin_layout Itemize -RCS command: -\family typewriter -ci -q -u -m"" -\end_layout +\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 -\begin_layout Subsubsection +\family default +) +\begin_inset Foot +status open -\family sans -Check Out For Edit +\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 -\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_layout +\end_inset -\begin_layout Itemize -RCS command: +, then make the following changes to the resulting \family typewriter -co -q -l +.tex +\family default + file. \end_layout -\begin_layout Subsubsection +\begin_layout Enumerate -\family sans -Revert To Repository Version -\end_layout +\change_deleted 564990737 1669755802 +Remove the comment lines before the +\family typewriter -\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. +\backslash +documentclass +\family default + command. \end_layout -\begin_layout Itemize -RCS command: -\family typewriter -co -f -u -\end_layout +\begin_layout Enumerate -\begin_layout Subsubsection +\change_deleted 564990737 1669755802 +Remove everything between (and including) the +\family typewriter -\family sans -Copy -\end_layout +\backslash +makeatletter +\family default + and +\family typewriter -\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 -\family sans -File\SpecialChar menuseparator -Save As +\backslash +makeatother \family default -\SpecialChar ldots -). - Finally, the copy is loaded instead of the original document. + commands, except for any commands you specifically put into the \SpecialChar LaTeX + preamble. \end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -RCS -\begin_inset space ~ -\end_inset - -commands: -\begin_inset space ~ -\end_inset +\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_inset Newline newline -\end_inset +\end_layout -Copy -\begin_inset Flex Code -status collapsed +\begin_layout Section -\begin_layout Plain Layout +\change_deleted 564990737 1669801478 +iopart +\end_layout -\family typewriter -\begin_inset Quotes qld -\end_inset +\begin_layout Standard - -\begin_inset Quotes qld -\end_inset +\change_deleted 564990737 1669801478 +by +\noun on +Uwe Stöhr +\end_layout +\begin_layout Subsection +\change_deleted 564990737 1669801478 +Overview \end_layout -\end_inset +\begin_layout Standard - to -\begin_inset Flex Code +\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 -\begin_inset Quotes qld -\end_inset +ftp://ftp.iop.org/pub/journals/latex2e +\end_layout - -\begin_inset Quotes qld \end_inset - +. \end_layout -\end_inset +\begin_layout Subsection +\change_deleted 564990737 1669801478 +Writing a paper +\end_layout -\begin_inset Newline newline -\end_inset +\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 +\family sans +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_inset Flex Code -status collapsed +\begin_layout Itemize -\begin_layout Plain Layout -ci -q -u -\family typewriter --i -\begin_inset Quotes qld -\end_inset +\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 +! +\end_layout - -\begin_inset Quotes qld -\end_inset +\begin_layout Itemize +\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 -\end_inset +\begin_deeper +\begin_layout Itemize +\change_deleted 564990737 1669801478 +\family sans +\size normal +Title +\family default + for a Paper \end_layout -\begin_layout Subsubsection +\begin_layout Itemize -\family sans -Undo Last Checkin -\end_layout +\change_deleted 564990737 1669801478 -\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. +\family sans +\size normal +Review +\family default + for a Review \end_layout \begin_layout Itemize -RCS command: -\family typewriter -rcs -o -\end_layout -\begin_layout Subsubsection +\change_deleted 564990737 1669801478 \family sans -Show History +\size normal +Topical +\family default + for a Topical review \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 +\begin_layout Itemize + +\change_deleted 564990737 1669801478 + +\family sans +\size normal +Comment \family default - for more info. + for a Comment \end_layout -\begin_layout Subsubsection -Revision info -\end_layout +\begin_layout Itemize -\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 +\change_deleted 564990737 1669801478 + +\family sans +\size normal +Note \family default -. - See -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:VCS-Revision-Information" + for a Note +\end_layout -\end_inset +\begin_layout Itemize - for details. +\change_deleted 564990737 1669801478 + +\family sans +\size normal +Paper +\family default + for a Paper (same as Title) \end_layout -\begin_layout Subsection -CVS commands in \SpecialChar LyX +\begin_layout Itemize -\end_layout +\change_deleted 564990737 1669801478 -\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 +\size normal +Prelim \family default - submenu. - The version control system SVN is more powerful, so please use it instead - of CVS if possible. + for a Preliminary communication \end_layout -\begin_layout Subsubsection +\begin_layout Itemize + +\change_deleted 564990737 1669801478 \family sans -General CVS usage +\size normal +Rapid +\family default + for a Rapid communication \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 - -reserved checkouts -\begin_inset Quotes erd -\end_inset +\begin_layout Itemize -. - 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 +\change_deleted 564990737 1669801478 -\begin_layout Plain Layout -.cvsrc +\family sans +\size normal +Letter +\family default + for a Letter to the editor \end_layout -\end_inset +\end_deeper +\begin_layout Itemize - file and add the line -\begin_inset Flex Code -status collapsed +\change_deleted 564990737 1669801478 -\begin_layout Plain Layout -cvs -r +\size normal +All title environments except of +\family sans +Letter +\family default + can have an optional short title. \end_layout -\end_inset +\begin_layout Itemize - 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. +\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. \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 Plain Layout -Check Out +\change_deleted 564990737 1669801478 +For more informations like hints for special table and formula formatting, + look at the IOP author guidelines. +\change_unchanged + \end_layout -\end_inset +\begin_layout Section - to make your working copy writable if it's readonly. - After doing so the -\begin_inset Flex Noun -status collapsed +\change_deleted 564990737 1670317155 +Kluwer +\end_layout -\begin_layout Plain Layout -Check In +\begin_layout Standard + +\change_deleted 564990737 1670317155 +by +\noun on +Panayotis Papasotiriou \end_layout -\end_inset +\begin_layout Subsection - operation is possible and that makes your working copy readonly again after - transferring your changes to the repository. +\change_deleted 564990737 1670317155 +Overview \end_layout \begin_layout Standard -More information about CVS can be found here + +\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 +Astrophysics and Space Science +\emph default + 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 -http://www.nongnu.org/cvs +http://www.wkap.nl/jrnllist.htm/JRNLHOME \end_layout \end_inset - and here +). + The Kluwer package may be downloaded from the site \begin_inset Flex URL status collapsed \begin_layout Plain Layout -http://ximbiot.com/cvs +http://www.wkap.nl/kaphtml.htm/STYLEFILES \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 -Read -\family typewriter -man cvs -\family default - to understand the sub-commands and the switches mentioned below. -\end_layout -\begin_layout Subsubsection +\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 -\family sans -Register -\end_layout +peculiar +\begin_inset Quotes erd +\end_inset -\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 + commands of the package (see +\begin_inset space ~ +\end_inset -\begin_layout Standard -This command registers in CVS your document -\begin_inset Flex Strong -status collapsed -\begin_layout Plain Layout +\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 -only +Astrophysics and Space Science +\emph default + without any problem. \end_layout -\end_inset +\begin_layout Subsection - 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.) +\change_deleted 564990737 1670317155 +Writing a paper \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 checked in. -\end_layout -\begin_layout Standard -CVS command that is run: +\change_deleted 564990737 1670317155 +The easiest way to write a paper is to start with the Kluwer template file. + Click on +\family sans +File\SpecialChar menuseparator +New from +\family default + +\family sans +Template +\family default +, then choose the \family typewriter -cvs -q add -m"" "" +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 -The term -\family typewriter -"" -\family default - above and for all other CVS commands is an abbreviation for + +\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 -change the current working directory to file location and use the file name - without path component as argument +postprocess \begin_inset Quotes erd \end_inset -. + it as follows. \end_layout -\begin_layout Subsubsection +\begin_layout Enumerate +\change_deleted 564990737 1670317155 +Export your paper as a \SpecialChar LaTeX + file. + To do this, click on \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 - -\end_inset +File\SpecialChar menuseparator +Export\SpecialChar menuseparator +\SpecialChar LaTeX - is undone. +\family default +. + \end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -CVS -\begin_inset space ~ -\end_inset - -command: -\begin_inset space ~ -\end_inset - - -\begin_inset Newline newline -\end_inset - - -\begin_inset Flex Code -status collapsed +\begin_layout Enumerate -\begin_layout Plain Layout -cvs +\change_deleted 564990737 1670317155 +Edit the resulting \family typewriter --q commit -m"" "" +.tex +\family default + file with a text editor and make the following changes \end_layout -\end_inset - - or -\begin_inset Newline newline -\end_inset - - -\begin_inset Flex Code -status collapsed +\begin_deeper +\begin_layout Enumerate -\begin_layout Plain Layout -cvs -q unedit +\change_deleted 564990737 1670317155 +remove the comment lines before the \family typewriter -"" -\end_layout - -\end_inset - +\backslash +documentclass +\family default + command, \end_layout -\begin_layout Subsubsection - -\family sans -Check Out Changes -\end_layout +\begin_layout Enumerate -\begin_layout Standard -When you are sharing a repository with others, you may have to incorporate - their changes into your working copy. -\end_layout +\change_deleted 564990737 1670317155 +remove everything between (and including) the +\family typewriter -\begin_layout Standard -CVS command: +\backslash +makeatletter +\family default + and \family typewriter -cvs -q update "" -\end_layout -\begin_layout Standard -If a readonly checkout is detected the working copy is made writable and - reserved. +\backslash +makeatother +\family default + commands, except for any commands you specifically put into the \SpecialChar LaTeX + preamble. \end_layout \begin_layout Standard -CVS command: -\family typewriter -cvs -q edit "" -\end_layout -\begin_layout Subsubsection - -\family sans -Revert To Repository Version +\change_deleted 564990737 1670317155 +Save the resulting +\family typewriter +.tex +\family default + file. \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. - Firstly the file is deleted, secondly CVS update command is run. -\end_layout +\end_deeper +\begin_layout Enumerate -\begin_layout Standard -CVS command: +\change_deleted 564990737 1670317155 +Run the \family typewriter -cvs -q update "" +.tex +\family default + file through \SpecialChar LaTeX + as many times as necessary (usually up to three). \end_layout -\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 Enumerate -\begin_layout Standard -CVS command: +\change_deleted 564990737 1670317155 +View the resulting \family typewriter -cvs -q unedit "" -\end_layout +.dvi +\family default + document using, e. +\begin_inset space \thinspace{} +\end_inset -\begin_layout Subsubsection +g. +\begin_inset space \space{} +\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 +xdvi \family default -\SpecialChar ldots -). - Finally, the copy is loaded instead of the original document. +, and check if everything is OK (it should, if you didn't make any mistake). \end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -CVS -\begin_inset space ~ +\begin_layout Subsection + +\change_deleted 564990737 1670317155 +\begin_inset Quotes eld \end_inset -commands: -\begin_inset space ~ +Peculiarities +\begin_inset Quotes erd \end_inset + of the Kluwer package +\begin_inset CommandInset label +LatexCommand label +name "subsec:kluwer_peculiarities" -\begin_inset Newline newline \end_inset -Copy -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -"" \end_layout +\begin_layout Standard + +\change_deleted 564990737 1670317155 +The Kluwer package has the following +\begin_inset Quotes eld \end_inset - to -\begin_inset Flex Code +peculiarities +\begin_inset Quotes erd +\end_inset + +. +\end_layout + +\begin_layout Enumerate + +\change_deleted 564990737 1670317155 +It is possible to write multiple articles in the same \SpecialChar LaTeX + file +\begin_inset Foot status collapsed \begin_layout Plain Layout -"" +I can't imagine any good reason to do this. \end_layout \end_inset - -\begin_inset Newline newline +. + Each article must be included in the environment +\begin_inset Quotes eld \end_inset +article +\begin_inset Quotes erd +\end_inset -\begin_inset Flex Code -status collapsed +. + Unfortunately, this environment cannot be omitted, even if you write just + one article. + Therefore, each article starts with the command +\family typewriter -\begin_layout Plain Layout -cvs -q add "" -\end_layout +\backslash +begin{article} +\family default + and, obviously, ends with the command +\family typewriter +\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 +\begin_inset Quotes erd +\end_inset +). \end_layout -\begin_layout Subsubsection +\begin_layout Enumerate -\family sans -Rename -\end_layout - -\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 - -commands: -\begin_inset space ~ +\change_deleted 564990737 1670317155 +Information given at the beginning of the article (i. +\begin_inset space \thinspace{} \end_inset - -\begin_inset Newline newline +e. +\begin_inset space \space{} \end_inset -Rename -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -"" -\end_layout - +title, subtitle, author, institution, running title, running author, abstract + and keywords) must be included in an environment called +\begin_inset Quotes eld \end_inset - to -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -"" -\end_layout - +opening +\begin_inset Quotes erd \end_inset - -\begin_inset Newline newline +. + 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 -\begin_inset Flex Code -status collapsed +\backslash +begin{opening} +\family default + and +\family typewriter -\begin_layout Plain Layout -cvs -q add "" +\backslash +end{opening} +\family default +). \end_layout -\end_inset - - -\begin_inset Newline newline -\end_inset - +\begin_layout Enumerate -\begin_inset Flex Code -status collapsed +\change_deleted 564990737 1670317155 +According to the user manual, the label of each bibliography item must be + written as +\family typewriter -\begin_layout Plain Layout -cvs -q remove "" +\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_layout Standard + +\change_deleted 564990737 1670317155 +The +\family typewriter +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 Subsubsection -Update of the local directory checkout from repository +\begin_layout Enumerate + +\change_deleted 564990737 1670317155 +don't delete the \SpecialChar TeX + code included in the template, and \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 +\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 -\end_inset +\begin_layout Section - 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. +\change_deleted 564990737 1671097446 +Paper \end_layout \begin_layout Standard -The -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -Update local directory from repository +\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 -\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 Section -\begin_layout Plain Layout -<<<<<<< +\change_deleted 564990737 1671097446 +Springer Journals ( +\family sans +svjour +\family default +) \end_layout -\end_inset - - and -\begin_inset Flex Code -status collapsed +\begin_layout Standard -\begin_layout Plain Layout ->>>>>>> +\change_deleted 564990737 1671097446 +by +\noun on +Martin Vermeer \end_layout -\end_inset - - separated by -\begin_inset Flex Code -status collapsed +\begin_layout Subsection -\begin_layout Plain Layout -======= +\change_deleted 564990737 1671097446 +Description \end_layout -\end_inset +\begin_layout Standard -. - 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 +\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_layout Plain Layout -> -\end_layout -\end_inset - - signs. +http://www.springer.de/author/tex/help-journals.html \end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -CVS -\begin_inset space ~ \end_inset -commands: -\begin_inset space ~ +, 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 Newline newline +g. +\begin_inset space \space{} \end_inset -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -cd $path; cvs diff \family typewriter -"." +svjog.layout +\family default + for Journal of Geodesy) can include. \end_layout -\end_inset - - (Ask if changes are detected.) -\begin_inset Newline newline -\end_inset +\begin_layout Standard +\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 + +\family typewriter +.layout +\family default + file following the outline given in +\family typewriter +svjog.layout +\family default +. + +\end_layout -\begin_inset Flex Code -status collapsed +\begin_layout Standard -\begin_layout Plain Layout -cd $path; cvs -q update +\change_deleted 564990737 1671097446 +It is reasonably well tested only for the Journal of Geodesy. + \family typewriter -"." +svjour +\family default + and +\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 +\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 -\end_inset - +\begin_layout Subsection +\change_deleted 564990737 1671097446 +New styles \end_layout \begin_layout Standard -where -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -$path +\change_deleted 564990737 1671097446 +A large number of theorem-like styles — +\family sans +Claim, Conjecture, +\family default + +\family sans +\SpecialChar ldots +Theorem +\family default +. \end_layout -\end_inset +\begin_layout Standard - stands for the path to the document. +\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 Subsubsection +\begin_layout Subsection -\family sans -Show History +\change_deleted 564990737 1671097446 +Supported journals \end_layout -\begin_layout Standard -This shows the complete history of the CVS document. - The output of +\begin_layout Itemize + +\change_deleted 564990737 1671097446 + +\emph on +Journal of Geodesy +\emph default +: \family typewriter -cvs log "" +svjog.layout \family default - is shown in a browser. + — Martin Vermeer \end_layout -\begin_layout Subsubsection -Revision info -\end_layout +\begin_layout Itemize -\begin_layout Standard -\SpecialChar LyX - supports CVS version number, author name, date and time of last commit. - All those are extracted from +\change_deleted 564990737 1671097446 + +\emph on +Probability Theory and Related Fields +\emph default +: \family typewriter -cvs log -r +svprobth.layout \family default -. - See -\begin_inset CommandInset ref -LatexCommand ref -reference "subsec:VCS-Revision-Information" + — Jean-Marc Lasgouttes +\end_layout -\end_inset +\begin_layout Standard - for details. +\change_deleted 564990737 1671097446 +Add your own, it isn't so hard! \end_layout \begin_layout Subsection -SVN commands in \SpecialChar LyX +\change_deleted 564990737 1671097446 +Credits \end_layout \begin_layout Standard -SVN is now partially supported by \SpecialChar LyX -. - You can find the commands in the -\family sans -File\SpecialChar menuseparator -Version -\begin_inset space ~ -\end_inset -Control +\change_deleted 564990737 1671097446 +These files are partly based on the older +\family typewriter +ejour2.layout \family default - submenu. - Please note that if you use password protected access to repository via - ssh, you will be asked in terminal window. +, 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 - 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 - - + layout file mechanism. \end_layout -\begin_layout Subsubsection +\begin_layout Subsection -\family sans -Register +\change_deleted 564990737 1671097446 +Bugs \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 -This command registers in SVN your document ONLY in case you have already - the documents directory under SVN control (in particular +\change_deleted 564990737 1671097446 +Probably. + But probably less than in the old hacked-\SpecialChar LaTeX + \family typewriter -.svn/entries +ejour2 \family default - file exists). - This means you have to checkout the archive by yourself. +. \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 commited. +\begin_layout Chapter +\SpecialChar LyX + Features needing Extra Software \end_layout -\begin_layout Standard -SVN command that is run: -\family typewriter -svn add -q -\begin_inset Quotes qld -\end_inset +\begin_layout Section +Checking \SpecialChar TeX - -\begin_inset Quotes qld -\end_inset +\end_layout +\begin_layout Standard +by +\noun on +Asger Alstrup +\end_layout +\begin_layout Subsection +Introduction \end_layout \begin_layout Standard -Read +If you have the \family typewriter -man svn +chktex \family default - to understand the switches. -\end_layout + program installed +\begin_inset Foot +status collapsed -\begin_layout Subsubsection +\begin_layout Plain Layout -\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, you are asked for a description of the changes. - After that changes are commited. +\family typewriter +chktex +\family default + is not yet available when you are using the \SpecialChar LaTeX + distribution MiK\SpecialChar TeX +. \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 +, you'll find in the +\family sans +Tools +\family default + menu the entry: +\family sans +Check +\begin_inset space ~ \end_inset +TeX +\family default . -\end_layout - + You can get +\family typewriter +chktex +\family default + from CTAN, +\begin_inset Newline newline \end_inset - -\family typewriter -svn commit -q -m"" -\end_layout -\begin_layout Subsubsection +\begin_inset CommandInset href +LatexCommand href +target "https://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html" +literal "false" -\family sans -Check Out For Edit -\end_layout +\end_inset -\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 +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 -Ditto. -\end_layout - +Jens T. +\begin_inset space ~ \end_inset - -\family typewriter -svn update --non-interactive -\begin_inset Quotes qld -\end_inset +Berger Thielemann +\end_layout - -\begin_inset Quotes qld \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 +lint +\family default + for \SpecialChar LaTeX +. \end_layout -\begin_layout Subsubsection +\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 -Revert To Repository Version -\end_layout +Chk\SpecialChar TeX -\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. +\family default + is capable of detecting several common errors, such as \end_layout -\begin_layout Standard -SVN command: -\family typewriter -svn revert -q -\begin_inset Quotes qld -\end_inset - - -\begin_inset Quotes qld +\begin_layout Itemize +Ellipsis detection: +\begin_inset Newline newline \end_inset - +Use \SpecialChar ldots + instead of ... \end_layout -\begin_layout Subsubsection +\begin_layout Itemize +No space in front of/after parenthesis: +\begin_inset Newline newline +\end_inset -\family sans -Copy +( wrong spacing ) \end_layout -\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 Itemize +Enforcement of normal space after common abbreviations: +\begin_inset Newline newline +\end_inset -\begin_layout Labeling -\labelwidthstring 00.00.0000 -SVN -\begin_inset space ~ +e. +\begin_inset space \thinspace{} \end_inset -commands: -\begin_inset space ~ +g. +\begin_inset space \space{} \end_inset +is too wide spacing. +\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. +\end_layout -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -svn copy -q -\family typewriter - -\begin_inset Quotes qld -\end_inset - - -\begin_inset Quotes qld +\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 Quotes qld -\end_inset +\begin_inset CommandInset label +LatexCommand label +name "sec:chktex" - -\begin_inset Quotes qld \end_inset + +\begin_inset Foot +status collapsed +\begin_layout Plain Layout +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" -\begin_inset Flex Code -status collapsed +\end_inset -\begin_layout Plain Layout -svn commit +. \end_layout +\begin_layout Itemize +Use of +\begin_inset Quotes eld \end_inset +x +\begin_inset Quotes erd +\end_inset -\end_layout + instead of +\begin_inset Formula $\times$ +\end_inset -\begin_layout Subsubsection + between numbers: +\begin_inset Newline newline +\end_inset -\family sans -Rename -\end_layout +2x2 looks cheap compared to +\begin_inset Formula $2\times2$ +\end_inset -\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 ~ +\begin_layout Standard +and more \SpecialChar ldots + It is an invaluable tool when you are +\begin_inset Quotes eld \end_inset - -\begin_inset Newline newline +finishing up +\begin_inset Quotes erd \end_inset + 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_inset Flex Code -status collapsed - -\begin_layout Plain Layout -svn move -q -\family typewriter - -\begin_inset Quotes qld -\end_inset +\begin_layout Subsection +How to use it +\end_layout - -\begin_inset Quotes qld +\begin_layout Standard +If you have the program installed, usage is as simple as choosing +\family sans +Tools\SpecialChar menuseparator +Check +\begin_inset space ~ \end_inset - -\begin_inset Quotes qld -\end_inset +TeX +\family default +. + This will make \SpecialChar LyX + generate a \SpecialChar LaTeX + file of your document, start +\family sans +Chk\SpecialChar TeX - -\begin_inset Quotes qld +\family default + to check it, and then make \SpecialChar LyX + insert +\begin_inset Quotes eld \end_inset - -\end_layout - +error boxes +\begin_inset Quotes erd \end_inset + with the warnings from +\family sans +Chk\SpecialChar TeX -\begin_inset Newline newline -\end_inset +\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 +\family default +, and this gap can make some warnings seem arcane or just plain silly. +\end_layout -\begin_inset Flex Code -status collapsed +\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 -\begin_layout Plain Layout -svn commit +\begin_layout Subsection +How to fine tune it \end_layout -\end_inset +\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. \end_layout -\begin_layout Subsubsection -\begin_inset CommandInset label -LatexCommand label -name "subsec:SVN-Repo-Update" +\begin_layout Standard +Although +\family sans +Chk\SpecialChar TeX -\end_inset +\family default + +\emph on +is +\emph default + very configurable and extensible, you should not expect to solve all problems + with +\family sans +Chk\SpecialChar TeX -Update of the local directory checkout from repository +\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 status collapsed \begin_layout Plain Layout -Note that this command will work only with subversion -\begin_inset Formula $\geqq1.5$ -\end_inset +You can inspect the specific output from +\family sans +chktex +\family default + by using +\family sans +Document\SpecialChar menuseparator +\SpecialChar LaTeX +\begin_inset space ~ +\end_inset +Log +\family default + right after a +\family sans +chktex +\family default + run. \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: \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 +\begin_layout Itemize +Fine tune the +\family sans +Chk\SpecialChar TeX + +\family default + invocation command line in +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout -.tex +Tools\SpecialChar menuseparator +Preferences\SpecialChar menuseparator +Output\SpecialChar menuseparator +LaTeX\SpecialChar menuseparator +CheckTeX command \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 +, or the global +\family sans +Chk\SpecialChar TeX -\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. - +\family default + installation configuration file (usually with the file +\family typewriter +chktexrc +\family default +). + See below to learn what warnings can be enabled and disabled on the command + line. \end_layout -\end_inset +\begin_layout Itemize +Export your document as a raw \SpecialChar LaTeX + file using +\family sans +File\SpecialChar menuseparator +Export\SpecialChar menuseparator +\SpecialChar LaTeX -. - 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. - +\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 -\begin_inset Flex Code -status collapsed +Here follows the warning messages that can be enabled and disabled in +\family sans +Preferences +\family default +. + 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 Plain Layout -Update local directory from repository +\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 +chktex +\family default +. \end_layout -\end_inset +\begin_layout Enumerate - 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. +\size small +\emph on +Command terminated with space. \end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -SVN -\begin_inset space ~ +\begin_layout Enumerate + +\size small +Non-breaking space ( +\begin_inset Quotes eld \end_inset -commands: -\begin_inset space ~ + +\family typewriter +~ +\family default + +\begin_inset Quotes erd \end_inset +) should have been used. +\end_layout + +\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 +\family typewriter +{} +\family default -\begin_layout Plain Layout -svn diff $path +\begin_inset Quotes erd +\end_inset + +. \end_layout -\end_inset +\begin_layout Enumerate - (Ask if changes are detected.) -\begin_inset Newline newline +\size small +Italic correction ( +\begin_inset Quotes eld \end_inset -\begin_inset Flex Code -status collapsed +\family typewriter -\begin_layout Plain Layout -svn update --accept mine-full $path -\end_layout +\backslash +/ +\family default +\begin_inset Quotes erd \end_inset - +) found in non-italic buffer. \end_layout -\begin_layout Standard -where -\begin_inset Flex Code -status collapsed +\begin_layout Enumerate -\begin_layout Plain Layout -$path -\end_layout +\size small +Italic correction ( +\begin_inset Quotes eld +\end_inset + + +\family typewriter + +\backslash +/ +\family default +\begin_inset Quotes erd \end_inset - stands for the path to the document. +) found more than once. \end_layout -\begin_layout Subsubsection +\begin_layout Enumerate + +\size small +\emph on +No italic correction ( +\begin_inset Quotes eld +\end_inset -\family sans -Show History -\end_layout -\begin_layout Standard -This shows the complete history of the SVN document. - The output of \family typewriter -svn log -\begin_inset Quotes qld + +\backslash +/ +\family default + +\begin_inset Quotes erd \end_inset - -\begin_inset Quotes qld +) found. +\end_layout + +\begin_layout Enumerate + +\size small +Accent command +\begin_inset Quotes eld \end_inset +\family typewriter +cmd \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" +\begin_inset Quotes erd +\end_inset + needs use of +\begin_inset Quotes eld \end_inset +\family typewriter +cmd +\family default + +\begin_inset Quotes erd +\end_inset + +. \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. +\begin_layout Enumerate + +\size small +Wrong length of dash may have been used. \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 Enumerate +\size small +\emph on +\begin_inset Quotes eld \end_inset -) based on -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -svn:needs-lock -\end_layout +\family typewriter +%s +\family default +\begin_inset Quotes erd \end_inset - file svn property -\begin_inset Foot -status collapsed + expected, found +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout -\begin_inset Flex URL -status open -\begin_layout Plain Layout +\family typewriter +%s +\family default -http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html +\begin_inset Quotes erd +\end_inset + +. \end_layout +\begin_layout Enumerate + +\size small +Solo +\begin_inset Quotes eld \end_inset -\end_layout +\family typewriter +%s +\family default +\begin_inset Quotes erd \end_inset -. - 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 -: + found. \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. -\end_layout - -\begin_layout Itemize -Locked state. - The loaded file is in the -\begin_inset Quotes els -\end_inset +\begin_layout Enumerate -normal -\begin_inset Quotes ers +\size small +You should use +\begin_inset Quotes eld \end_inset - 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 Plain Layout -Don't be puzzled by the fact that you will be asked for commit message anyway. -\end_layout +\family typewriter +%s +\family default +\begin_inset Quotes erd \end_inset - and only the write-lock will be released. + to achieve an ellipsis. \end_layout -\begin_layout Standard -SVN commands: -\end_layout +\begin_layout Enumerate -\begin_layout Labeling -\labelwidthstring 00.00.0000 -Check-in: -\family typewriter - svn commit -q -m"" "" -\begin_inset Newline newline +\size small +Inter-word spacing ( +\begin_inset Quotes eld \end_inset -svn unlock "" -\end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -Check-out: \family typewriter -svn update "" -\begin_inset Newline newline + +\backslash + +\family default + +\begin_inset Quotes eld \end_inset -svn lock "" +) should perhaps be used. \end_layout -\begin_layout Subsubsection - -\family typewriter -\begin_inset CommandInset label -LatexCommand label -name "subsec:Automatical-Locking-Property" +\begin_layout Enumerate +\size small +Inter-sentence spacing ( +\begin_inset Quotes eld \end_inset -\family default -Automatic Locking Property -\end_layout - -\begin_layout Standard -The above mentioned automatic setting of write permissions of the .lyx file - can be set through -\family sans - File\SpecialChar menuseparator -Version -\begin_inset space ~ -\end_inset +\family typewriter -Control\SpecialChar menuseparator -Use Locking Property +\backslash +@ \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). -\end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -SVN -\begin_inset space ~ +\begin_inset Quotes erd \end_inset -commands: +) should perhaps be used. \end_layout -\begin_layout Labeling -\labelwidthstring 00.00.0000 -Set: -\family typewriter - svn propset svn:needs-lock ON "" -\end_layout +\begin_layout Enumerate -\begin_layout Labeling -\labelwidthstring 00.00.0000 -Unset: -\family typewriter -svn propdel svn:needs-lock "" +\size small +Could not find argument for command. \end_layout -\begin_layout Subsubsection -\begin_inset CommandInset label -LatexCommand label -name "subsec:VCS-Revision-Information" +\begin_layout Enumerate +\size small +No match found for +\begin_inset Quotes eld \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 +\family typewriter +%s +\family default -\begin_layout Itemize -\SpecialChar LyX - supports directly: +\begin_inset Quotes erd +\end_inset + +. \end_layout -\begin_deeper -\begin_layout Itemize -tree revision information ( -\begin_inset Flex Code -status collapsed +\begin_layout Enumerate -\begin_layout Plain Layout -vcs-tree-revision +\size small +Math mode still on at end of \SpecialChar LaTeX + file. \end_layout +\begin_layout Enumerate + +\size small +Number of +\begin_inset Quotes eld \end_inset -). - The result is the output of the -\begin_inset Flex Code -status collapsed -\begin_layout Plain Layout -svnversion -\end_layout +\family typewriter +char +\family default +\begin_inset Quotes erd \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 + doesn't match the number of +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout -\series bold -Output -\end_layout +\family typewriter +char +\family default +\begin_inset Quotes erd \end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -\series bold -Meaning +. \end_layout -\end_inset - - - - -\begin_inset Text +\begin_layout Enumerate -\begin_layout Plain Layout -4123:4168 -\end_layout +\size small +You should use either +\family typewriter +\begin_inset Quotes eld \end_inset - - -\begin_inset Text -\begin_layout Plain Layout -mixed revision working copy -\end_layout +\family default + or +\family typewriter + +\begin_inset Quotes erd \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout -4168M -\end_layout +\family default + as an alternative to +\begin_inset Quotes eld \end_inset - - -\begin_inset Text -\begin_layout Plain Layout -modified working copy -\end_layout +\family typewriter +" +\family default + +\begin_inset Quotes erd \end_inset - - - - -\begin_inset Text -\begin_layout Plain Layout -4123S +. \end_layout -\end_inset - - -\begin_inset Text +\begin_layout Enumerate -\begin_layout Plain Layout -switched working copy +\size small +You should use " +\family typewriter +' +\family default +" (ASCII 39) instead of " +\family typewriter +´ +\family default +" (ASCII 180). \end_layout -\end_inset - - - - -\begin_inset Text +\begin_layout Enumerate -\begin_layout Plain Layout -4123P +\size small +User-specified pattern found. \end_layout -\end_inset - - -\begin_inset Text +\begin_layout Enumerate -\begin_layout Plain Layout -partial working copy, from a sparse checkout +\size small +This command might not be intended. \end_layout -\end_inset - - - - -\begin_inset Text +\begin_layout Enumerate -\begin_layout Plain Layout -4123:4168MS +\size small +\emph on +Comment displayed. \end_layout -\end_inset - - -\begin_inset Text +\begin_layout Enumerate -\begin_layout Plain Layout -mixed revision, modified, switched working copy +\size small +Either +\family typewriter +'' +\backslash +,' +\family default + or +\family typewriter +' +\backslash +,'' +\family default + will look better. \end_layout -\end_inset - - - - -\end_inset - +\begin_layout Enumerate +\size small +Delete this space to maintain correct page references. \end_layout -\begin_layout Itemize -file revision information. - The result comes from parsing the output of -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -svn -\begin_inset space ~ -\end_inset +\begin_layout Enumerate -info -\begin_inset space ~ +\size small +\emph on +You might wish to put this between a pair of +\begin_inset Quotes eld \end_inset ---xml -\begin_inset space ~ -\end_inset -file.lyx -\end_layout +\family typewriter +{} +\family default +\begin_inset Quotes erd \end_inset . - Supported flags are: \end_layout -\begin_deeper -\begin_layout Itemize -version number of the last commit ( -\begin_inset Flex Code -status collapsed +\begin_layout Enumerate -\begin_layout Plain Layout -vcs-revision +\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 Itemize -author of the last commit ( -\begin_inset Flex Code -status collapsed +\begin_layout Enumerate -\begin_layout Plain Layout -vcs-author +\size small +Don't use +\family typewriter + +\backslash +/ +\family default + in front of small punctuation. \end_layout -\end_inset +\begin_layout Enumerate -) +\family typewriter +\size small +$ +\backslash +times$ +\family default + may look prettier here. \end_layout -\begin_layout Itemize -date of the last commit ( -\begin_inset Flex Code -status collapsed +\begin_layout Enumerate -\begin_layout Plain Layout -vcs-date +\size small +\emph on +Multiple spaces detected in output. \end_layout -\end_inset +\begin_layout Enumerate -) +\size small +This text may be ignored. \end_layout -\begin_layout Itemize -time of the last commit ( -\begin_inset Flex Code -status collapsed +\begin_layout Enumerate -\begin_layout Plain Layout -vcs-time -\end_layout +\size small +Use +\family typewriter +\begin_inset Quotes eld \end_inset -) + +\family default + to begin quotation, not +\family typewriter +' +\family default +. \end_layout -\end_deeper -\begin_layout Standard -You can obtain this info via InsetInfo ( -\change_inserted 5863208 1564400022 +\begin_layout Enumerate -\lang american -Insert\SpecialChar menuseparator -Field\SpecialChar menuseparator -Version Control Revision -\change_deleted 5863208 1564399852 +\size small +Use +\family typewriter +' +\family default + to end quotation, not +\family typewriter -\lang english -e.g. - -\begin_inset Flex Code -status collapsed +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout -info-insert buffer vcs-date + +\family default +. \end_layout -\end_inset +\begin_layout Enumerate +\size small +Don't mix quotes. +\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 Enumerate -\begin_layout Plain Layout -.svn -\end_layout +\size small +You should perhaps use +\begin_inset Quotes eld +\end_inset + + +\family typewriter +cmd +\family default +\begin_inset Quotes erd \end_inset - directory is available with your document). + instead. \end_layout -\end_deeper -\begin_layout Itemize -Another—a hacking one—possibility is to use svn keywords -\begin_inset Foot -status collapsed +\begin_layout Enumerate -\begin_layout Plain Layout -http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html +\size small +You should put a space in front of/after parenthesis. \end_layout -\end_inset +\begin_layout Enumerate -. - 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 +\size small +You should avoid spaces in front of/after parenthesis. +\end_layout -\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. +\begin_layout Enumerate + +\size small +\emph on +You should not use punctuation in front of/after quotes. \end_layout -\end_inset +\begin_layout Enumerate - tag in your document (e.g. - -\begin_inset Flex Code -status collapsed +\size small +Double space found. +\end_layout -\begin_layout Plain Layout -$Rev$ +\begin_layout Enumerate + +\size small +You should put punctuation outside inner/inside display math mode. +\end_layout + +\begin_layout Enumerate + +\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 -). - 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 +\begin_layout Enumerate + +\size small +\begin_inset Quotes eld \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$ + +\family typewriter +%s +\family default + +\begin_inset Quotes erd \end_inset - become -\begin_inset Formula $Rev:59$ + is normally not followed by +\begin_inset Quotes eld \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. + +\family typewriter +%c +\family default + +\begin_inset Quotes erd +\end_inset + +. \end_layout -\begin_layout Subsection -SVN and Windows Environment +\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 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 Section +Version Control in \SpecialChar LyX + \end_layout -\begin_layout Subsubsection -Preparation +\begin_layout Standard +by +\noun on + Lars Gullik Bjønnes +\noun default +and +\noun on +Pavel Sanda +\end_layout + +\begin_layout Subsection +Introduction \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" +\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 -. - The user may also want to install +\begin_layout Plain Layout \begin_inset CommandInset href LatexCommand href -name "TortoiseSVN" -target "http://tortoisesvn.tigris.org/" +target "http://svnbook.red-bean.com/" 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 -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 +\end_inset + . - 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 + In the case of RCS you should read +\begin_inset Quotes eld +\end_inset + +rcsintro +\begin_inset Quotes erd +\end_inset + + (a man file, read it with \family typewriter -C: -\backslash -new project +man rcsintro \family default -. - For information on using the Subversion client program, run +). + 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 -svn --help +,v \family default -in a DOS shell. +). \end_layout -\begin_layout Enumerate -Locate -\family typewriter -C: -\backslash -new project -\family default -in Windows Explorer, right click it, and select +\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 -TortoiseSVN\SpecialChar menuseparator -Repo-browser +View\SpecialChar menuseparator +Toolbars\SpecialChar menuseparator +Version +\begin_inset space ~ +\end_inset + +Control \family default . - If necessary, adjust the URL for the repository, then click OK. \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 -\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. +\begin_layout Standard +For introducing your own external commands consult +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +vc-command \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. +\end_inset -\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. + in the manual +\emph on +\SpecialChar LyX + Functions +\emph default +. \end_layout -\begin_layout Enumerate -Create or open your document in \SpecialChar LyX - and click +\begin_layout Standard +It is strongly recommended to store documents in uncompressed format if + using version control (uncheck \family sans -File\SpecialChar menuseparator -Version -\begin_inset space ~ -\end_inset - -Control\SpecialChar menuseparator -Register. - +Document\SpecialChar menuseparator +Compressed \family default -Add a log message and click OK to commit the document to version control. + 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 +RCS commands in \SpecialChar LyX + \end_layout \begin_layout Standard -From this point onward, you should have full functionality in the +The following sections describe the RCS commands supported by \SpecialChar LyX +. + You can find them in the \family sans File\SpecialChar menuseparator Version @@ -24213,213 +23469,215 @@ Version 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. + submenu. + \SpecialChar LyX + was tested against RCS 5.7/5.8. \end_layout \begin_layout Subsubsection -SSH tunnel used with SVN under Windows -\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 +\family sans +Register \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_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. -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -svn --version \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 ~ \end_inset -) to create config files, which you will need to change later on. -\end_layout +Out +\begin_inset space ~ +\end_inset -\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 +For +\begin_inset space ~ +\end_inset -\begin_layout Plain Layout -\begin_inset Flex URL -status collapsed +Edit +\family default +, before making any changes to it. + A document under revision control has a +\begin_inset Quotes eld +\end_inset -\begin_layout Plain Layout +[RCS: ] +\begin_inset Quotes erd +\end_inset -http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html + item tagged to the filename in the minibuffer. \end_layout -\end_inset +\begin_layout Standard +RCS command that is run: +\end_layout +\begin_layout LyX-Code +\family typewriter +ci -q -u -i -t-"" \end_layout -\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. +\begin_layout Standard +Read +\family typewriter +man ci +\family default + to understand the switches. + \end_layout -\begin_deeper -\begin_layout Enumerate -Generate keys by -\begin_inset Flex Code -status collapsed +\begin_layout Subsubsection -\begin_layout Plain Layout -puttygen +\family sans +Check In Changes \end_layout -\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 -\end_inset +\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 +\begin_layout Itemize +RCS command: +\family typewriter +ci -q -u -m"" +\end_layout -\emph on -Public key for pasting into OpenSSH authorized_keys file -\emph default -: -\begin_inset Quotes erd -\end_inset +\begin_layout Subsubsection - edit field into the server's -\begin_inset Flex Code -status collapsed +\family sans +Check Out For Edit +\end_layout -\begin_layout Plain Layout -~/.ssh/authorized_keys +\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_layout -\end_inset +\begin_layout Itemize +RCS command: +\family typewriter +co -q -l +\end_layout - / -\begin_inset Flex Code -status collapsed +\begin_layout Subsubsection -\begin_layout Plain Layout -authorized_keys2 +\family sans +Revert To Repository Version \end_layout -\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 - file. +\begin_layout Itemize +RCS command: +\family typewriter +co -f -u \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 +Copy \end_layout -\end_inset - -. - In the SVN config file -\begin_inset Foot -status collapsed +\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 +\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 Plain Layout -Exact path depends on Windows version, usually somewhere around -\begin_inset Flex Code -status collapsed +\begin_layout Labeling +\labelwidthstring 00.00.0000 +RCS +\begin_inset space ~ +\end_inset -\begin_layout Plain Layout -c: -\backslash -Documents and Settings -\backslash -user -\backslash -Application Data -\backslash -Subversion -\backslash -config -\end_layout +commands: +\begin_inset space ~ +\end_inset + +\begin_inset Newline newline \end_inset - / +Copy \begin_inset Flex Code status collapsed \begin_layout Plain Layout -AppData -\backslash -Roaming -\backslash -Subversion -\end_layout +\family typewriter +\begin_inset Quotes qld \end_inset -. -\end_layout - + +\begin_inset Quotes qld \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 \end_inset -. -\begin_inset Foot + to +\begin_inset Flex Code 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 +\family typewriter +\begin_inset Quotes qld +\end_inset + + +\begin_inset Quotes qld \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 @@ -24428,36 +23686,17 @@ g. status collapsed \begin_layout Plain Layout -svn co svn+ssh://user@server/repository_path -\end_layout - +ci -q -u +\family typewriter +-i +\begin_inset Quotes qld \end_inset -. -\end_layout - -\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 -\begin_inset Flex URL -status collapsed + +\begin_inset Quotes qld +\end_inset -\begin_layout Plain Layout -http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html \end_layout \end_inset @@ -24465,48 +23704,74 @@ http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html \end_layout -\end_inset - - how to deal with CR/LF problems when switching .lyx files to the -\begin_inset Flex Code -status collapsed +\begin_layout Subsubsection -\begin_layout Plain Layout -native +\family sans +Undo Last Checkin \end_layout -\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. +\end_layout - mode. -\begin_inset Foot -status collapsed +\begin_layout Itemize +RCS command: +\family typewriter +rcs -o +\end_layout -\begin_layout Plain Layout -For the lazy guys: -\begin_inset Flex Code -status collapsed +\begin_layout Subsubsection -\begin_layout Plain Layout -svn propset svn:eol-style native FILE_NAME +\family sans +Show History \end_layout -\end_inset - +\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 -\end_inset +\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" +\end_inset + for details. \end_layout \begin_layout Subsection -GIT commands in \SpecialChar LyX +CVS commands in \SpecialChar LyX \end_layout \begin_layout Standard -A minimal subset of GIT commands is now supported by \SpecialChar LyX +A subset of CVS operations is supported by \SpecialChar LyX . You can find the commands in the \family sans @@ -24518,85 +23783,136 @@ 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 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 -. + The version control system SVN is more powerful, so please use it instead + of CVS if possible. \end_layout -\end_inset +\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 -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 +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 + +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 -pull +.cvsrc \end_layout \end_inset - and + file and add the line \begin_inset Flex Code status collapsed \begin_layout Plain Layout -push +cvs -r \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 + 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 Plain Layout -pull +Check Out \end_layout \end_inset - and -\begin_inset Flex Code + to make your working copy writable if it's readonly. + After doing so the +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout -push +Check In \end_layout \end_inset - operations with your favourite GIT client. + operation is possible and that makes your working copy readonly again after + transferring your changes to the repository. +\end_layout + +\begin_layout Standard +More information about CVS can be found here +\begin_inset Flex URL +status collapsed + +\begin_layout Plain Layout + +http://www.nongnu.org/cvs +\end_layout + +\end_inset + + and here +\begin_inset Flex URL +status collapsed + +\begin_layout Plain Layout + +http://ximbiot.com/cvs +\end_layout + +\end_inset + +. +\end_layout + +\begin_layout Standard +Read +\family typewriter +man cvs +\family default + to understand the sub-commands and the switches mentioned below. \end_layout \begin_layout Subsubsection @@ -24613,62 +23929,159 @@ 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 GIT your document ONLY in case you have already - the documents directory under GIT control (in particular +This command registers in CVS your document +\begin_inset Flex Strong +status collapsed + +\begin_layout Plain Layout + +\emph on +only +\end_layout + +\end_inset + + in the case you have already the documents directory under CVS control + (in particular \family typewriter -.git/index +CVS/Entries \family default file exists). - This means you have to checkout the archive by yourself. + 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 Standard Then you are asked interactively to supply an initial description of the document. - Don't forget that registered file is not yet committed. + Don't forget that registered file is not yet checked in. \end_layout \begin_layout Standard -GIT command that is run: +CVS command that is run: \family typewriter -git add -\begin_inset Quotes qld +cvs -q add -m"" "" +\end_layout + +\begin_layout Standard +The term +\family typewriter +"" +\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 +. +\end_layout + +\begin_layout Subsubsection +\family sans +Check In Changes \end_layout \begin_layout Standard -Read +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 + +\end_inset + + is undone. +\end_layout + +\begin_layout Labeling +\labelwidthstring 00.00.0000 +CVS +\begin_inset space ~ +\end_inset + +command: +\begin_inset space ~ +\end_inset + + +\begin_inset Newline newline +\end_inset + + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +cvs \family typewriter -man git -\family default - to understand the switches. +-q commit -m"" "" +\end_layout + +\end_inset + + or +\begin_inset Newline newline +\end_inset + + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +cvs -q unedit +\family typewriter +"" +\end_layout + +\end_inset + + \end_layout \begin_layout Subsubsection \family sans -Check In Changes +Check Out Changes \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. +When you are sharing a repository with others, you may have to incorporate + their changes into your working copy. \end_layout \begin_layout Standard -GIT command: +CVS command: \family typewriter -git commit -q -m"" +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_layout Standard +CVS command: +\family typewriter +cvs -q edit "" \end_layout \begin_layout Subsubsection @@ -24681,47 +24094,53 @@ Revert To Repository Version 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 -GIT command: +CVS command: \family typewriter -git checkout -q -\begin_inset Quotes qld -\end_inset - - -\begin_inset Quotes qld -\end_inset +cvs -q update "" +\end_layout +\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 \begin_layout Subsubsection \family sans -Rename +Copy \end_layout \begin_layout Standard -This will rename the current document including the version history. +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 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 + 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 document is reloaded using the new name. + Finally, the copy is loaded instead of the original document. \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 -GIT +CVS \begin_inset space ~ \end_inset @@ -24733,30 +24152,22 @@ commands: \begin_inset Newline newline \end_inset - +Copy \begin_inset Flex Code status collapsed \begin_layout Plain Layout -git mv -\family typewriter - -\begin_inset Quotes qld -\end_inset +"" +\end_layout - -\begin_inset Quotes qld -\end_inset - - -\begin_inset Quotes qld -\end_inset - - -\begin_inset Quotes qld \end_inset + to +\begin_inset Flex Code +status collapsed +\begin_layout Plain Layout +"" \end_layout \end_inset @@ -24770,7 +24181,7 @@ git mv status collapsed \begin_layout Plain Layout -git commit +cvs -q add "" \end_layout \end_inset @@ -24781,107 +24192,86 @@ git commit \begin_layout Subsubsection \family sans -Show History +Rename \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 Quotes qld -\end_inset - - +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 - is shown in a browser. +\SpecialChar ldots +). + Finally, the document is reloaded using the new name. \end_layout -\begin_layout Subsubsection -Version Info -\end_layout +\begin_layout Labeling +\labelwidthstring 00.00.0000 +CVS +\begin_inset space ~ +\end_inset -\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" +commands: +\begin_inset space ~ +\end_inset + +\begin_inset Newline newline \end_inset - for other details. -\end_layout +Rename +\begin_inset Flex Code +status collapsed -\begin_layout Subsection -Further tuning +\begin_layout Plain Layout +"" \end_layout -\begin_layout Standard -With the recent addition of the +\end_inset + + to \begin_inset Flex Code status collapsed \begin_layout Plain Layout -vc-command +"" \end_layout \end_inset - function \SpecialChar LyX - power users are allowed to create their own commands for revision - control. -\end_layout -\begin_layout Standard -As an example you can see how two TortoiseSVN commands could be integrated - directly: -\end_layout +\begin_inset Newline newline +\end_inset + -\begin_layout Description -Commit: \begin_inset Flex Code status collapsed \begin_layout Plain Layout -vc-command DR "." "TortoiseProc /command:commit /path:$$p" +cvs -q add "" \end_layout \end_inset -\end_layout +\begin_inset Newline newline +\end_inset + -\begin_layout Description -Revert: \begin_inset Flex Code status collapsed \begin_layout Plain Layout -vc-command DR "." "TortoiseProc /command:revert /path:$$p" +cvs -q remove "" \end_layout \end_inset @@ -24889,227 +24279,228 @@ vc-command DR "." "TortoiseProc /command:revert /path:$$p" \end_layout -\begin_layout Subsection -Version control and Document comparison +\begin_layout Subsubsection +Update of the local directory checkout from repository \end_layout \begin_layout Standard -One of the typical uses of version control is to inspect the changes between - revisions, usually by creating +Once your documents gets more complex, containing sub-documents and pictures, + including external \begin_inset Flex Code status collapsed \begin_layout Plain Layout -diff +.tex \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 + 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 + +\begin_layout Standard +The \begin_inset Flex Code status collapsed \begin_layout Plain Layout -vc-compare +Update local directory from repository \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 + 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 - or the menu item -\begin_inset Info -type "menu" -arg "vc-compare" \end_inset -, 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 + and +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -0 +>>>>>>> \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 - + separated by \begin_inset Flex Code status collapsed \begin_layout Plain Layout -HEAD~X +======= \end_layout \end_inset . -\end_layout + 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 Section -Literate Programming +\begin_layout Plain Layout +> \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. - -\noun default - (edmar-w-jr@technologist.com) -\end_layout +\end_inset -\begin_layout Subsection -Introduction + signs. \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 +\begin_layout Labeling +\labelwidthstring 00.00.0000 +CVS +\begin_inset space ~ \end_inset -tangling -\begin_inset Quotes erd +commands: +\begin_inset space ~ \end_inset - and -\begin_inset Quotes eld -\end_inset -weaving -\begin_inset Quotes erd +\begin_inset Newline newline \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 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_inset Flex Code +status collapsed -\begin_layout Subsection -Literate Programming +\begin_layout Plain Layout +cd $path; cvs diff +\family typewriter +"." \end_layout -\begin_layout Standard -From the Literate Programming FAQ: +\end_inset + + (Ask if changes are detected.) +\begin_inset Newline newline +\end_inset + + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +cd $path; cvs -q update +\family typewriter +"." \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. - + \end_layout \begin_layout Standard -Another excerpt says: +where +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +$path \end_layout -\begin_layout Quotation +\end_inset -\emph on -How is literate programming different from verbose commenting? + stands for the path to the document. \end_layout -\begin_layout Quotation -There are three distinguishing characteristics. - In order of importance, they are: -\end_layout +\begin_layout Subsubsection -\begin_deeper -\begin_layout Itemize -flexible order of elaboration +\family sans +Show History \end_layout -\begin_layout Itemize -automatic support for browsing +\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 Itemize -typeset documentation, especially diagrams and mathematics +\begin_layout Subsubsection +Revision info \end_layout -\end_deeper \begin_layout Standard -Now that I sparked your curiosity, take a look in the references. +\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" + +\end_inset + + for details. \end_layout -\begin_layout Subsubsection -References +\begin_layout Subsection +SVN commands in \SpecialChar LyX + \end_layout \begin_layout Standard -The complete Literate Programming FAQ can be found at: -\end_layout +SVN is now partially supported by \SpecialChar LyX +. + You can find the commands in the +\family sans +File\SpecialChar menuseparator +Version +\begin_inset space ~ +\end_inset -\begin_layout Quote -Literate Programming FAQ -\begin_inset Flex URL -status open +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" -http://www.literateprogramming.com/lpfaq.pdf +\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 @@ -25117,1482 +24508,1888 @@ http://www.literateprogramming.com/lpfaq.pdf \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 +\begin_layout Subsubsection -tailored -\begin_inset Quotes erd -\end_inset +\family sans +Register +\end_layout - for particular programming languages, while other have general scope. - I selected -\noun on -Noweb -\noun default - for my own use for several reasons: +\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 Itemize -It can generate the documentation either in \SpecialChar LaTeX - or HTML. +\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 Itemize -It has a open architecture, i. -\begin_inset space \thinspace{} -\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. +\end_layout -e. -\begin_inset space \space{} +\begin_layout Standard +SVN command that is run: +\family typewriter +svn add -q +\begin_inset Quotes qld \end_inset -it is easy to plug in new filters -\begin_inset Foot -status collapsed + +\begin_inset Quotes qld +\end_inset -\begin_layout Plain Layout -\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 - - and to perform special processing that you may need. - +\begin_layout Standard +Read +\family typewriter +man svn +\family default + to understand the switches. \end_layout -\begin_layout Itemize -There is a good selection of filters available already (the HTML is one - of them). -\end_layout +\begin_layout Subsubsection -\begin_layout Itemize -It is free. +\family sans +Check In Changes \end_layout \begin_layout Standard -The Noweb web page can be found at: +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 Quote -Noweb home page -\begin_inset Flex URL +\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" -https://www.cs.tufts.edu/~nr/noweb/ +\end_inset + +. \end_layout \end_inset + +\family typewriter +svn commit -q -m"" +\end_layout + +\begin_layout Subsubsection +\family sans +Check Out For Edit \end_layout \begin_layout Standard -Starting from there you can reach many other interesting links and even - some literate program examples. +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 Subsection -\SpecialChar LyX - and Literate Programming with Noweb +\begin_layout Standard +SVN command: +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout +Ditto. \end_layout -\begin_layout Standard -The \SpecialChar LyX - support for Literate Programming is provided by using the generic \SpecialChar LyX +\end_inset - converters mechanism. - This support is provided in a -\begin_inset Quotes eld + +\family typewriter +svn update --non-interactive +\begin_inset Quotes qld \end_inset -Noweb independent -\begin_inset Quotes erd + +\begin_inset Quotes qld \end_inset - way, i. -\begin_inset space \thinspace{} + +\end_layout + +\begin_layout Subsubsection + +\family sans +Revert To Repository Version +\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 Standard +SVN command: +\family typewriter +svn revert -q +\begin_inset Quotes qld \end_inset -e. -\begin_inset space \space{} + +\begin_inset Quotes qld \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. + \end_layout \begin_layout Subsubsection -Generating documents and code (weaving and tangling) -\end_layout -\begin_layout Paragraph -Using the noweb module +\family sans +Copy \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 +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 -Document\SpecialChar menuseparator -Settings +File\SpecialChar menuseparator +Save As \family default - menu to add the -\begin_inset Quotes eld +\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 -noweb -\begin_inset Quotes erd +commands: +\begin_inset space ~ \end_inset - module. - If Noweb is correctly installed, when you click on the -\begin_inset Quotes eld + +\begin_inset Newline newline \end_inset -Modules -\begin_inset Quotes erd + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +svn copy -q +\family typewriter + +\begin_inset Quotes qld \end_inset - link, you will see the -\begin_inset Quotes eld + +\begin_inset Quotes qld \end_inset -noweb -\begin_inset Quotes erd + +\begin_inset Quotes qld +\end_inset + + +\begin_inset Quotes qld \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 +\end_inset + + +\begin_inset Newline newline +\end_inset + + +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Chunk +svn commit \end_layout \end_inset -. - Noweb delimits chunks like this: -\end_layout -\begin_layout LyX-Code -<>= \end_layout -\begin_layout LyX-Code - code -\end_layout +\begin_layout Subsubsection -\begin_layout LyX-Code - more code +\family sans +Rename \end_layout -\begin_layout LyX-Code - even more code +\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 LyX-Code - @ -\end_layout +\begin_layout Labeling +\labelwidthstring 00.00.0000 +SVN +\begin_inset space ~ +\end_inset -\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{} +commands: +\begin_inset space ~ \end_inset -e. -\begin_inset space \space{} + +\begin_inset Newline newline \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 + +\begin_inset Flex Code status collapsed \begin_layout Plain Layout -Chunk -\end_layout +svn move -q +\family typewriter +\begin_inset Quotes qld \end_inset -, that works like a normal text inset but has a free spacing capability. -\end_layout + +\begin_inset Quotes qld +\end_inset -\begin_layout Standard -As a special note, you can also use the -\begin_inset Quotes eld + +\begin_inset Quotes qld \end_inset -%def -\begin_inset Quotes erd + +\begin_inset Quotes qld \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 +\end_inset -\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_inset Newline newline +\end_inset -\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. +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +svn commit \end_layout -\begin_layout Paragraph -Generating the documentation +\end_inset + + \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 +\begin_layout Subsubsection +\begin_inset CommandInset label +LatexCommand label +name "subsec:SVN-Repo-Update" -\begin_layout Standard -To help orientate you, I will now explain what happens inside \SpecialChar LyX -: -\end_layout +\end_inset -\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 +Update of the local directory checkout from repository +\begin_inset Foot +status collapsed -\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 +\begin_layout Plain Layout +Note that this command will work only with subversion +\begin_inset Formula $\geqq1.5$ \end_inset -literate -\begin_inset Quotes erd + +\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 +\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 -Chunk +.tex \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 + 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 -The converters are defined in the -\family sans -Tools\SpecialChar menuseparator -Preferences -\family default - panel, under the -\begin_inset Quotes eld -\end_inset - -Conversion -\begin_inset Quotes erd -\end_inset - - tab. - See section -\emph on -Converters -\emph default - of the -\emph on -Customization -\emph default - manual for general information about converters. +One need to organize the files structure so that all external files are + in the same directory or subdirectories of the document. + \end_layout \end_inset - to generate the \SpecialChar LaTeX - file. +. + 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_deeper \begin_layout Standard -Otherwise it will just skip this step. +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +Update local directory from repository \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 + + 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 Standard -Independence from a particular -\begin_inset Quotes eld +\begin_layout Labeling +\labelwidthstring 00.00.0000 +SVN +\begin_inset space ~ \end_inset -literate tool -\begin_inset Quotes erd +commands: +\begin_inset space ~ \end_inset - is easily achieved by changing the commands that are run by the various - converters. -\end_layout -\begin_layout Paragraph -Generating the code -\end_layout +\begin_inset Newline newline +\end_inset -\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 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_inset Flex Code +status collapsed -\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. +\begin_layout Plain Layout +svn diff $path \end_layout -\begin_layout Standard -The first part, the -\begin_inset Quotes eld \end_inset -Converter -\begin_inset Quotes erd + (Ask if changes are detected.) +\begin_inset Newline newline \end_inset - setting, should be set to -\end_layout -\begin_layout LyX-Code +\begin_inset Flex Code +status collapsed -\family typewriter -build-script $$i -\family default - $$r +\begin_layout Plain Layout +svn update --accept mine-full $path \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 -\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 \begin_layout Standard -This is an implementation of -\begin_inset Quotes eld -\end_inset +where +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +$path +\end_layout -build-script -\begin_inset Quotes erd \end_inset - that you can place in a directory on your path: + stands for the path to the document. \end_layout -\begin_layout LyX-Code +\begin_layout Subsubsection \family sans -#!/bin/sh +Show History \end_layout -\begin_layout LyX-Code +\begin_layout Standard +This shows the complete history of the SVN document. + The output of +\family typewriter +svn log +\begin_inset Quotes qld +\end_inset -\family sans -# -\end_layout + +\begin_inset Quotes qld +\end_inset -\begin_layout LyX-Code -\family sans -notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh +\family default + is shown in a browser. \end_layout -\begin_layout Standard -The next part of the converter setting is the -\begin_inset Quotes eld -\end_inset +\begin_layout Subsubsection +File Locking +\begin_inset CommandInset label +LatexCommand label +name "subsec:SVN-File-Locking" -Flags -\begin_inset Quotes erd \end_inset - which is to be set to + \end_layout -\begin_layout LyX-Code - -\family typewriter -parselog=$$s/scripts/listerrors +\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_layout \begin_layout Standard -This will run any errors that are generated by the -\begin_inset Quotes eld -\end_inset +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" -build-script -\begin_inset Quotes erd \end_inset - process through the -\begin_inset Quotes eld -\end_inset +) based on +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +svn:needs-lock +\end_layout -listerrors -\begin_inset Quotes erd \end_inset - program. -\end_layout + file svn property +\begin_inset Foot +status collapsed -\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 Plain Layout +\begin_inset Flex URL +status open -\begin_layout Paragraph -Build instructions in the document +\begin_layout Plain Layout + +http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html \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 -\end_inset +\end_layout -build-script -\begin_inset Quotes erd \end_inset - above uses the notangle command to look for this chunk (called -\begin_inset Quotes eld -\end_inset +. + 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 -build-script -\begin_inset Quotes erd -\end_inset +\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 -) and runs its contents through -\begin_inset Quotes eld +\begin_layout Itemize +Locked state. + The loaded file is in the +\begin_inset Quotes els \end_inset -sh -\begin_inset Quotes erd +normal +\begin_inset Quotes ers \end_inset -. + 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 Plain Layout +Don't be puzzled by the fact that you will be asked for commit message anyway. \end_layout -\begin_layout Standard -Typically, such a chunk would look something like this: +\end_inset + + and only the write-lock will be released. \end_layout -\begin_layout LyX-Code -<>= +\begin_layout Standard +SVN commands: \end_layout -\begin_layout LyX-Code -#!/bin/sh +\begin_layout Labeling +\labelwidthstring 00.00.0000 +Check-in: +\family typewriter + svn commit -q -m"" "" \begin_inset Newline newline \end_inset -if [ -z "${NOWEB_SOURCE}" ] +svn unlock "" +\end_layout + +\begin_layout Labeling +\labelwidthstring 00.00.0000 +Check-out: +\family typewriter +svn update "" \begin_inset Newline newline \end_inset -then +svn lock "" \end_layout -\begin_layout LyX-Code -NOWEB_SOURCE=myfile.nw -\begin_inset Newline newline -\end_inset +\begin_layout Subsubsection -fi -\begin_inset Newline newline -\end_inset +\family typewriter +\begin_inset CommandInset label +LatexCommand label +name "subsec:Automatical-Locking-Property" -[... - 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 -@ +\family default +Automatic Locking Property \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 +The above mentioned automatic setting of write permissions of the .lyx file + can be set through +\family sans + File\SpecialChar menuseparator +Version +\begin_inset space ~ \end_inset -listerrors -\begin_inset Quotes erd -\end_inset +Control\SpecialChar menuseparator +Use Locking Property +\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). +\end_layout - program for some illustrations of how all of these pieces go together or - in -\emph on -LIBDIR/examples/noweb2lyx.lyx. +\begin_layout Labeling +\labelwidthstring 00.00.0000 +SVN +\begin_inset space ~ +\end_inset -\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. +commands: \end_layout -\begin_layout Subsubsection -Configuring \SpecialChar LyX +\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 -\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 +\begin_layout Subsubsection +\begin_inset CommandInset label +LatexCommand label +name "subsec:VCS-Revision-Information" -File Handling -\begin_inset Quotes erd \end_inset - tab. - The important parts are: +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 + +\begin_deeper +\begin_layout Itemize +tree revision information ( +\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 Flex Code +status collapsed + +\begin_layout Plain Layout +svnversion +\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 Plain Layout + +\series bold +Output +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Meaning +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +4123:4168 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +mixed revision working copy +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +4168M +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +modified working copy +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +4123S +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +switched working copy +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +4123P +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +partial working copy, from a sparse checkout +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +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 Itemize +file revision information. + The result comes from parsing the output of +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +svn +\begin_inset space ~ +\end_inset + +info +\begin_inset space ~ +\end_inset + +--xml +\begin_inset space ~ +\end_inset + +file.lyx +\end_layout + +\end_inset + +. + Supported flags are: +\end_layout + +\begin_deeper +\begin_layout Itemize +version number of the last commit ( +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +vcs-revision +\end_layout + +\end_inset + +) +\end_layout + +\begin_layout Itemize +author of the last commit ( +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +vcs-author +\end_layout + +\end_inset + +) +\end_layout + +\begin_layout Itemize +date of the last commit ( +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +vcs-date +\end_layout + +\end_inset + +) +\end_layout + +\begin_layout Itemize +time of the last commit ( +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +vcs-time +\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. + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +info-insert buffer vcs-date +\end_layout + +\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 + +\end_inset + + directory is available with your document). +\end_layout + +\end_deeper +\begin_layout Itemize +Another—a hacking one—possibility is to use svn keywords +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout +http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html \end_layout -\begin_layout Description -the -\begin_inset space ~ -\end_inset - - -\begin_inset Quotes eld \end_inset -NoWeb -\begin_inset Quotes erd +. + 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 + \end_inset + tag in your document (e.g. + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +$Rev$ +\end_layout -\begin_inset space ~ \end_inset -format Set up via the File Formats tab, this is where the Noweb-specific - pieces are set up. - The -\family sans -GUI Name +). + 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 + + 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 Subsection +SVN and Windows Environment +\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 +\end_layout + +\begin_layout Subsubsection +Preparation +\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" + +\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 + +, 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 +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 - is set to +. + For information on using the Subversion client program, run \family typewriter -NoWeb +svn --help \family default -, the file extension is set to +in a DOS shell. +\end_layout + +\begin_layout Enumerate +Locate \family typewriter -.nw +C: +\backslash +new project +\family default +in Windows Explorer, right click it, and select +\family sans +TortoiseSVN\SpecialChar menuseparator +Repo-browser \family default . - This tells \SpecialChar LyX - to create a file with a + If necessary, adjust the URL for the repository, then click OK. +\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 +\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 + +\begin_layout Enumerate +Once again right click \family typewriter -.nw +C: +\backslash +new project \family default - extension in the first step of the conversion process. +, 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. \end_layout -\begin_layout Description -the +\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 + +\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 +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 +\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 + +\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 -\family sans -Program -\family default +\begin_layout Plain Layout +svn --version +\end_layout -\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). +) to create config files, which you will need to change later on. \end_layout -\begin_layout Description +\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 -\family sans -NoWeb -\family default --> -\family sans -\SpecialChar LaTeX +\begin_layout Plain Layout +\begin_inset Flex URL +status collapsed -\family default - This converter performs the -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout -weaving -\begin_inset Quotes erd -\end_inset +http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html +\end_layout - 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 +\end_layout -\begin_inset Quotes erd \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_layout Description +\begin_deeper +\begin_layout Enumerate +Generate keys by +\begin_inset Flex Code +status collapsed -\family sans -NoWeb -\family default --> -\family sans -Program -\family default - This performs the -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout +puttygen +\end_layout -tangling step -\begin_inset Quotes erd \end_inset . - As stated above, the Converter is set to + 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 -\family typewriter -build-script $$i -\family default - $$r +\emph on +Public key for pasting into OpenSSH authorized_keys file +\emph default +: \begin_inset Quotes erd \end_inset -, with Flags set to -\begin_inset Newline newline -\end_inset + edit field into the server's +\begin_inset Flex Code +status collapsed +\begin_layout Plain Layout +~/.ssh/authorized_keys +\end_layout -\begin_inset Quotes eld \end_inset + / +\begin_inset Flex Code +status collapsed -\family typewriter -parselog=$$s/scripts/listerrors -\family default +\begin_layout Plain Layout +authorized_keys2 +\end_layout -\begin_inset Quotes erd \end_inset -. + file. \end_layout -\begin_layout Subsubsection -Debug extensions +\begin_layout Enumerate +Get the Putty's +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +plink \end_layout -\begin_layout Standard -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 +. + In the SVN config file +\begin_inset Foot +status collapsed -\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. +\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 -\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 -Edit Sources -\begin_inset Quotes erd -\end_inset + / +\begin_inset Flex Code +status collapsed - to: +\begin_layout Plain Layout +AppData +\backslash +Roaming +\backslash +Subversion \end_layout -\begin_layout LyX-Code -echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in -\end_layout +\end_inset -\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 +, section [tunnels], setup ssh command, e.g. + +\begin_inset Flex Code +status collapsed -\begin_inset CommandInset ref -LatexCommand ref -reference "sec:Starting-the-Server" +\begin_layout Plain Layout +ssh=c:/path/plink.exe -i c:/path/private_key.ppk +\end_layout \end_inset - explains how to do that. -\end_layout +. +\begin_inset Foot +status collapsed -\begin_layout Subsubsection -Toolbar extensions +\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 -\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 +\end_inset -\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_layout + +\end_deeper +\begin_layout Enumerate +Checkout the SVN archive, e. +\begin_inset space \thinspace{} \end_inset -Build Program -\begin_inset Quotes erd +g. +\begin_inset Newline newline \end_inset - File menu entry. - -\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 +\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 +svn co svn+ssh://user@server/repository_path \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 Subsubsection +End-of-Line Conversions \end_layout -\begin_layout LyX-Code - Icon "layout Section" -\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 LyX-Code - Icon "layout \SpecialChar LaTeX -" -\end_layout +\begin_layout Plain Layout +\begin_inset Flex URL +status collapsed -\begin_layout LyX-Code - Icon "layout \SpecialChar LyX --Code" -\end_layout +\begin_layout Plain Layout -\begin_layout LyX-Code - Icon "flex.insert Chunk" +http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html \end_layout -\begin_layout LyX-Code - Separator -\end_layout +\end_inset -\begin_layout LyX-Code - Icon "buffer-view" -\end_layout -\begin_layout LyX-Code - Icon "buffer-typeset" \end_layout -\begin_layout LyX-Code - Icon "build-program" -\end_layout +\end_inset -\begin_layout LyX-Code - Separator -\end_layout + how to deal with CR/LF problems when switching .lyx files to the +\begin_inset Flex Code +status collapsed -\begin_layout LyX-Code -. +\begin_layout Plain Layout +native \end_layout -\begin_layout LyX-Code -. -\end_layout +\end_inset -\begin_layout LyX-Code -. -\end_layout + mode. +\begin_inset Foot +status collapsed -\begin_layout LyX-Code -End -\end_layout +\begin_layout Plain Layout +For the lazy guys: +\begin_inset Flex Code +status collapsed -\begin_layout Subsubsection -Colors customization +\begin_layout Plain Layout +svn propset svn:eol-style native FILE_NAME \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. +\end_inset + + \end_layout -\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. +\end_inset + + \end_layout \begin_layout Subsection -\SpecialChar LyX - and knitr/Sweave +GIT commands in \SpecialChar LyX + \end_layout \begin_layout Standard -Support for -\family sans -knitr -\family default - and +A minimal subset of GIT commands is now supported by \SpecialChar LyX +. + You can find the commands in the \family sans -Sweave +File\SpecialChar menuseparator +Version +\begin_inset space ~ +\end_inset + +Control \family default - is documented in the -\emph on -knitr.lyx -\emph default - example file and in the Sweave manual (menu + 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 -Help\SpecialChar menuseparator -Specific Manuals +Tools\SpecialChar menuseparator +Preferences\SpecialChar menuseparator +Paths\SpecialChar menuseparator +PATH prefix \family default -). +. \end_layout -\begin_layout Chapter -Special features +\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 ~ -\end_inset +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 -Objects -\emph default - manual. +\begin_layout Plain Layout +pull \end_layout -\begin_layout Section -Multiple Text Columns -\end_layout +\end_inset + + and +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +push +\end_layout -\begin_layout Standard -This feature is independent of the option -\family sans -Two-column document -\family default - in the document settings under -\family sans -Text Layout -\family default -. - If you want to have 2 -\begin_inset space ~ \end_inset -columns for the whole document, it is recommended to use the -\family sans -Two-column document -\family default - option. - For all other cases use this feature. + 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 + +\begin_layout Plain Layout +pull \end_layout -\begin_layout Standard -To use multiple text columns in your document, you have to load the module - -\family sans -Multiple Columns -\family default - (menu -\family sans -Document\SpecialChar menuseparator -Settings\SpecialChar menuseparator -Modules -\family default -) and must have the \SpecialChar LaTeX --package +\end_inset + + and \begin_inset Flex Code status collapsed \begin_layout Plain Layout -multicol +push \end_layout \end_inset - installed. + operations with your favourite GIT client. +\end_layout + +\begin_layout Subsubsection + +\family sans +Register \end_layout \begin_layout Standard -Footnotes within multiple columns will be placed at the bottom of the page - and not under each column. - Within the different columns you can use everything, with the limitation - that for floats you need to use the float option +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 -Span columns +Register \family default -. + item is not visible. \end_layout -\begin_layout Subsection -Basics +\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. \end_layout \begin_layout Standard -If you want to have 2 -\begin_inset space ~ -\end_inset +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 -columns in your text, insert a multicolumn inset via the menu -\family sans -Insert\SpecialChar menuseparator -Custom -\begin_inset space ~ +\begin_layout Standard +GIT command that is run: +\family typewriter +git add +\begin_inset Quotes qld \end_inset -Insets\SpecialChar menuseparator -Multiple -\begin_inset space ~ + +\begin_inset Quotes qld \end_inset -Columns + +\end_layout + +\begin_layout Standard +Read +\family typewriter +man git \family default - where the columns should start. - Write all text that should be printed in 2 -\begin_inset space ~ -\end_inset + to understand the switches. +\end_layout -columns into this inset. +\begin_layout Subsubsection + +\family sans +Check In Changes \end_layout \begin_layout Standard -Here is an example: +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 Standard -\noindent -\begin_inset Flex Multiple Columns -status open +GIT command: +\family typewriter +git commit -q -m"" +\end_layout -\begin_layout Plain Layout -\noindent +\begin_layout Subsubsection -\series bold -\size small -The Adventure of the Empty House -\series default +\family sans +Revert To Repository Version +\end_layout -\begin_inset Newline newline +\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 +GIT command: +\family typewriter +git checkout -q +\begin_inset Quotes qld \end_inset -by Sir Arthur Conan Doyle -\end_layout + +\begin_inset Quotes qld +\end_inset -\begin_layout Plain Layout -\size small -It was in the spring of the year 1894 that all London was interested, and - the fashionable world dismayed, by the murder of the Honourable Ronald - Adair under most unusual and inexplicable circumstances. - The public has already learned those particulars of the crime which came - out in the police investigation, but a good deal was suppressed upon that - occasion, since the case for the prosecution was so overwhelmingly strong - that it was not necessary to bring forward all the facts. - Only now, at the end of nearly ten years, am I allowed to supply those - missing links which make up the whole of that remarkable chain. - The crime was of interest in itself, but that interest was as nothing to - me compared to the inconceivable sequel, which afforded me the greatest - shock and surprise of any event in my adventurous life. - Even now, after this long interval, I find myself thrilling as I think - of it, and feeling once more that sudden flood of joy, amazement, and increduli -ty which utterly submerged my mind. - Let me say to that public, which has shown some interest in those glimpses - which I have occasionally given them of the thoughts and actions of a very - remarkable man, that they are not to blame me if I have not shared my knowledge - with them, for I should have considered it my first duty to do so, had - I not been barred by a positive prohibition from his own lips, which was - only withdrawn upon the third of last month. \end_layout -\end_inset - +\begin_layout Subsubsection +\family sans +Rename \end_layout \begin_layout Standard -To get 3 or more columns, set the cursor into the multicolumn inset and - use the menu +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 -Insert\SpecialChar menuseparator -Number -\begin_inset space ~ -\end_inset +File\SpecialChar menuseparator +Save As +\family default +\SpecialChar ldots +). + Finally, the document is reloaded using the new name. +\end_layout -of +\begin_layout Labeling +\labelwidthstring 00.00.0000 +GIT \begin_inset space ~ \end_inset -Columns -\family default -. - The number of the desired columns is written into that inset (for 3 +commands: \begin_inset space ~ \end_inset -columns write -\begin_inset Quotes eld -\end_inset - -3 -\begin_inset Quotes erd -\end_inset -). \begin_inset Newline newline \end_inset -Here is an example with 3 -\begin_inset space ~ -\end_inset - -columns: -\end_layout - -\begin_layout Standard -\begin_inset Flex Multiple Columns -status open - -\begin_layout Plain Layout -\size footnotesize -\begin_inset Argument 1 -status open +\begin_inset Flex Code +status collapsed \begin_layout Plain Layout +git mv +\family typewriter -3 -\end_layout +\begin_inset Quotes qld +\end_inset + +\begin_inset Quotes qld \end_inset -It can be imagined that my close intimacy with Sherlock Holmes had interested - me deeply in crime, and that after his disappearance I never failed to - read with care the various problems which came before the public. - And I even attempted, more than once, for my own private satisfaction, - to employ his methods in their solution, though with indifferent success. - There was none, however, which appealed to me like this tragedy of Ronald - Adair. - As I read the evidence at the inquest, which led up to a verdict of willful - murder against some person or persons unknown, I realized more clearly - than I had ever done the loss which the community had sustained by the - death of Sherlock Holmes. - There were points about this strange business which would, I was sure, - have specially appealed to him, and the efforts of the police would have - been supplemented, or more probably anticipated, by the trained observation - and the alert mind of the first criminal agent in Europe. - All day, as I drove upon my round, I turned over the case in my mind and - found no explanation which appeared to me to be adequate. - At the risk of telling a twice-told tale, I will recapitulate the facts - as they were known to the public at the conclusion of the inquest. -\end_layout + +\begin_inset Quotes qld +\end_inset + +\begin_inset Quotes qld \end_inset \end_layout -\begin_layout Standard -You can have up to 10 -\begin_inset space ~ \end_inset -columns if you want to, but that might not be very pleasant for the readers - of your document. -\end_layout -\begin_layout Standard -\begin_inset Newpage newpage +\begin_inset Newline newline \end_inset +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +git commit \end_layout -\begin_layout Subsection -Columns inside Columns +\end_inset + + \end_layout -\begin_layout Standard -You can also have columns inside columns: +\begin_layout Subsubsection + +\family sans +Show History \end_layout \begin_layout Standard -\begin_inset Flex Multiple Columns -status open +This shows the complete history of the GIT document. + The output of +\family typewriter +git log +\begin_inset Quotes qld +\end_inset -\begin_layout Plain Layout + +\begin_inset Quotes qld +\end_inset -\size footnotesize -The Honourable Ronald Adair was the second son of the Earl of Maynooth, - at that time governor of one of the Australian colonies. - Adair's mother had returned from Australia to undergo the operation for - cataract, and she, her son Ronald, and her daughter Hilda were living together - at 427 Park Lane. + +\family default + is shown in a browser. \end_layout -\begin_layout Plain Layout -\begin_inset Flex Multiple Columns -status open +\begin_layout Subsubsection +Version Info +\end_layout -\begin_layout Plain 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" -\size footnotesize -The youth moved in the best society -\begin_inset space ~ \end_inset -– had, so far as was known, no enemies and no particular vices. - He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement - had been broken off by mutual consent some months before, and there was - no sign that it had left any very profound feeling behind it. - For the rest {sic} the man's life moved in a narrow and conventional circle, - for his habits were quiet and his nature unemotional. - Yet it was upon this easy-going young aristocrat that death came, in most - strange and unexpected form, between the hours of ten and eleven-twenty - on the night of March 30, 1894. + for other details. +\end_layout + +\begin_layout Subsection +Further tuning +\end_layout + +\begin_layout Standard +With the recent addition of the +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +vc-command \end_layout \end_inset + function \SpecialChar LyX + power users are allowed to create their own commands for revision + control. +\end_layout +\begin_layout Standard +As an example you can see how two TortoiseSVN commands could be integrated + directly: \end_layout +\begin_layout Description +Commit: +\begin_inset Flex Code +status collapsed + \begin_layout Plain Layout +vc-command DR "." "TortoiseProc /command:commit /path:$$p" +\end_layout -\size footnotesize -Ronald Adair was fond of cards -\begin_inset space ~ \end_inset -– playing continually, but never for such stakes as would hurt him. - He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs. - It was shown that, after dinner on the day of his death, he had played - a rubber of whist at the latter club. - He had also played there in the afternoon. -\size default - -\size footnotesize -The evidence of those who had played with him -\begin_inset space ~ -\end_inset +\end_layout -– Mr. - Murray, Sir John Hardy, and Colonel Moran -\begin_inset space ~ -\end_inset +\begin_layout Description +Revert: +\begin_inset Flex Code +status collapsed -– showed that the game was whist, and that there was a fairly equal fall - of the cards. - Adair might have lost five pounds, but not more. - His fortune was a considerable one, and such a loss could not in any way - affect him. - He had played nearly every day at one club or other, but he was a cautious - player, and usually rose a winner. - It came out in evidence that, in partnership with Colonel Moran, he had - actually won as much as four hundred and twenty pounds in a sitting, some - weeks before, from Godfrey Milner and Lord Balmoral. - So much for his recent history as it came out at the inquest. +\begin_layout Plain Layout +vc-command DR "." "TortoiseProc /command:revert /path:$$p" \end_layout \end_inset @@ -26601,179 +26398,226 @@ The evidence of those who had played with him \end_layout \begin_layout Subsection -Advanced Examples +Version control and Document comparison \end_layout \begin_layout Standard -The examples in this section show some more special features of multiple - columns. -\end_layout +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 Standard -For more features of multiple columns, have a look at the -\begin_inset CommandInset href -LatexCommand href -name "documentation" -target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf" -literal "false" +\begin_layout Plain Layout +diff +\end_layout \end_inset - of the \SpecialChar LaTeX --package + 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_layout Plain Layout -multicol +vc-compare \end_layout \end_inset -. -\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 -Preface + or the menu item +\begin_inset Info +type "menu" +arg "vc-compare" +\end_inset + +, 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 + +\begin_layout Plain Layout +0 \end_layout -\begin_layout Standard -To add a preface text for multiple columns, set the cursor into the multicolumn - inset and use the menu -\family sans -Insert\SpecialChar menuseparator -Preface -\family default -. - Write your preface text into that inset. -\begin_inset Newline newline \end_inset -This is an example with some preface text: +' revisions back means comparison of the edited file with last commited + revision). + \end_layout \begin_layout Standard -\begin_inset VSpace bigskip +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 + +\begin_layout Plain Layout +HEAD~X +\end_layout + \end_inset +. +\end_layout + +\begin_layout Section +Literate Programming +\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. +\noun default + (edmar-w-jr@technologist.com) \end_layout -\begin_layout Standard -\begin_inset Flex Multiple Columns -status open - -\begin_layout Plain Layout -\begin_inset Argument 2 -status open - -\begin_layout Plain Layout -And the story continues and continues and continues and continues\SpecialChar ldots - +\begin_layout Subsection +Introduction \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 -\size small -On the evening of the crime, he returned from the club exactly at ten. - His mother and sister were out spending the evening with a relation. - The servant deposed that she heard him enter the front room on the second - floor, generally used as his sitting-room. - She had lit a fire there, and as it smoked she had opened the window. - No sound was heard from the room until eleven-twenty, the hour of the return - of Lady Maynooth and her daughter. - Desiring to say good-night, she attempted to enter her son's room. - The door was locked on the inside, and no answer could be got to their - cries and knocking. - Help was obtained, and the door forced. - The unfortunate young man was found lying near the table. - His head had been horribly mutilated by an expanding revolver bullet, but - no weapon of any sort was to be found in the room. -\end_layout - + 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 Standard -You can also use a section heading as the preface if you use a section command - as \SpecialChar TeX - Code. - For example the command +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 - -\backslash -subsection{subsection title} +\begin_layout Subsection +Literate Programming \end_layout \begin_layout Standard -creates a subsection. - In this example the preface is a subsubsection: +From the Literate Programming FAQ: \end_layout -\begin_layout Standard -\begin_inset Flex Multiple Columns -status open - -\begin_layout Plain Layout -\begin_inset Argument 2 -status open +\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 -\begin_layout Plain Layout -\begin_inset ERT -status collapsed +E. + Knuth during the development of his \SpecialChar TeX + typesetting software. + +\end_layout -\begin_layout Plain Layout +\begin_layout Standard +Another excerpt says: +\end_layout +\begin_layout Quotation -\backslash -subsubsection{ +\emph on +How is literate programming different from verbose commenting? \end_layout -\end_inset +\begin_layout Quotation +There are three distinguishing characteristics. + In order of importance, they are: +\end_layout -This is a subsubsection heading as a preface -\begin_inset ERT -status collapsed +\begin_deeper +\begin_layout Itemize +flexible order of elaboration +\end_layout -\begin_layout Plain Layout +\begin_layout Itemize +automatic support for browsing +\end_layout -} +\begin_layout Itemize +typeset documentation, especially diagrams and mathematics \end_layout -\end_inset +\end_deeper +\begin_layout Standard +Now that I sparked your curiosity, take a look in the references. +\end_layout +\begin_layout Subsubsection +References +\end_layout +\begin_layout Standard +The complete Literate Programming FAQ can be found at: \end_layout -\end_inset +\begin_layout Quote +Literate Programming FAQ +\begin_inset Flex URL +status open +\begin_layout Plain Layout -\size small -A minute examination of the circumstances served only to make the case more - complex. - In the first place, no reason could be given why the young man should have - fastened the door upon the inside. - There was the possibility that the murderer had done this, and had afterwards - escaped by the window. - The drop was at least twenty feet, however, and a bed of crocuses in full - bloom lay beneath. - Neither the flowers nor the earth showed any sign of having been disturbed, - nor were there any marks upon the narrow strip of grass which separated - the house from the road. - Apparently, therefore, it was the young man himself who had fastened the - door. - But how did he come by his death? No one could have climbed up to the window - without leaving traces. - Suppose a man had fired through the window, he would indeed be a remarkable - shot who could with a revolver inflict so deadly a wound. - Again, Park Lane is a frequented thoroughfare; there is a cab stand within - a hundred yards of the house. - No one had heard a shot. +http://www.literateprogramming.com/lpfaq.pdf \end_layout \end_inset @@ -26782,986 +26626,1148 @@ A minute examination of the circumstances served only to make the case more \end_layout \begin_layout Standard -If there is less vertical space than 6 -\begin_inset space ~ +The FAQ lists 23 (twenty three!) different literate programming tools. + Where some are specialized or +\begin_inset Quotes eld \end_inset -text lines is left on the page at the beginning of the multiple columns, - a page break will be inserted before the multiple columns. - Depending on the number of lines of the preface text, you might want to - change this space. - This is done by setting the cursor into the mulitcolumn inset behind the - preface (if there is any) and using the menu -\family sans -Insert\SpecialChar menuseparator -Space -\begin_inset space ~ +tailored +\begin_inset Quotes erd \end_inset -Before -\begin_inset space ~ -\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 -Page -\begin_inset space ~ -\end_inset +\begin_layout Itemize +It can generate the documentation either in \SpecialChar LaTeX + or HTML. +\end_layout -Break -\family default -. - Insert into that inset the amount of space like e. +\begin_layout Itemize +It has a open architecture, i. \begin_inset space \thinspace{} \end_inset -g. +e. \begin_inset space \space{} \end_inset +it is easy to plug in new filters +\begin_inset Foot +status collapsed -\begin_inset Quotes eld -\end_inset +\begin_layout Plain Layout -5cm -\begin_inset Quotes erd -\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. +\end_layout -. -\begin_inset Newline newline \end_inset -In this example the space is set to 7 -\begin_inset space ~ -\end_inset + and to perform special processing that you may need. + +\end_layout -text lines by using -\begin_inset Flex Code -status collapsed +\begin_layout Itemize +There is a good selection of filters available already (the HTML is one + of them). +\end_layout -\begin_layout Plain Layout -7 -\backslash -baselineskip +\begin_layout Itemize +It is free. \end_layout -\end_inset +\begin_layout Standard +The Noweb web page can be found at: +\end_layout - (where the command -\begin_inset Flex Code +\begin_layout Quote +Noweb home page +\begin_inset Flex URL status collapsed \begin_layout Plain Layout -\backslash -baselineskip +https://www.cs.tufts.edu/~nr/noweb/ \end_layout \end_inset - needs to be inserted as \SpecialChar TeX - code): + \end_layout \begin_layout Standard -\begin_inset Flex Multiple Columns -status open +Starting from there you can reach many other interesting links and even + some literate program examples. +\end_layout -\begin_layout Plain Layout -\begin_inset Argument 3 -status open +\begin_layout Subsection +\SpecialChar LyX + and Literate Programming with Noweb +\end_layout -\begin_layout Plain Layout -7 -\begin_inset ERT -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 +Noweb independent +\begin_inset Quotes erd +\end_inset -\backslash -baselineskip -\end_layout + way, i. +\begin_inset space \thinspace{} +\end_inset +e. +\begin_inset space \space{} \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. +\end_layout + +\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 + module. + If Noweb is correctly installed, when you click on the +\begin_inset Quotes eld +\end_inset -\size small -On the evening of the crime, he returned from the club exactly at ten. - His mother and sister were out spending the evening with a relation. - The servant deposed that she heard him enter the front room on the second - floor, generally used as his sitting-room. - She had lit a fire there, and as it smoked she had opened the window. - No sound was heard from the room until eleven-twenty, the hour of the return - of Lady Maynooth and her daughter. - Desiring to say good-night, she attempted to enter her son's room. - The door was locked on the inside, and no answer could be got to their - cries and knocking. - Help was obtained, and the door forced. - The unfortunate young man was found lying near the table. - His head had been horribly mutilated by an expanding revolver bullet, but - no weapon of any sort was to be found in the room. -\end_layout +Modules +\begin_inset Quotes erd +\end_inset + link, you will see the +\begin_inset Quotes eld \end_inset +noweb +\begin_inset Quotes erd +\end_inset + module in the available list and you can add it to your document. \end_layout -\begin_layout Subsubsection -Surrounding Space +\begin_layout Paragraph +Typing code in \end_layout \begin_layout Standard -The amount of space before and after multiple columns can be changed by - changing the length -\begin_inset Flex Code +\SpecialChar LyX + enables you to write code with a custom inset named +\begin_inset Flex Noun status collapsed \begin_layout Plain Layout - -\backslash -multicolsep +Chunk \end_layout \end_inset . - For example the command + Noweb delimits chunks like this: \end_layout \begin_layout LyX-Code +<>= +\end_layout -\backslash -setlength{ -\backslash -multicolsep}{3cm} +\begin_layout LyX-Code + code +\end_layout + +\begin_layout LyX-Code + more code +\end_layout + +\begin_layout LyX-Code + even more code +\end_layout + +\begin_layout LyX-Code + @ \end_layout \begin_layout Standard -in \SpecialChar TeX - Code changes its value to 3 +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 -cm. - The change must be made before the multiple columns' start. - The predefined value is 13 -\begin_inset space \thinspace{} +e. +\begin_inset space \space{} \end_inset -pt. -\end_layout - -\begin_layout Standard -For this example -\begin_inset Flex Code +\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 - -\backslash -multicolsep +Chunk \end_layout \end_inset - was set to 2.5 -\begin_inset space \thinspace{} -\end_inset - -cm: +, that works like a normal text inset but has a free spacing capability. \end_layout \begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -setlength{ -\backslash -multicolsep}{2.5cm} -\end_layout - +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 Standard -\begin_inset Flex Multiple Columns -status open - -\begin_layout Plain Layout +\begin_layout LyX-Code +<>= +\end_layout -\size small -All day I turned these facts over in my mind, endeavouring to hit upon some - theory which could reconcile them all, and to find that line of least resistanc -e which my poor friend had declared to be the starting-point of every investigat -ion. - I confess that I made little progress. - In the evening I strolled across the Park, and found myself about six o'clock - at the Oxford Street end of Park Lane. - A group of loafers upon the pavements, all staring up at a particular window, - directed me to the house which I had come to see. - A tall, thin man with coloured glasses, whom I strongly suspected of being - a plain-clothes detective, was pointing out some theory of his own, while - the others crowded round to listen to what he said. - I got as near him as I could, but his observations seemed to me to be absurd, - so I withdrew again in some disgust. - As I did so I struck against an elderly, deformed man, who had been behind - me, and I knocked down several books which he was carrying. +\begin_layout LyX-Code +def some_function(args): \end_layout -\end_inset +\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 -\begin_inset Note Greyedout -status open - -\begin_layout Plain Layout - -\series bold -Note: -\series default - The values you set with -\begin_inset Flex Code -status collapsed +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_layout Plain Layout +\begin_layout Paragraph +Generating the documentation +\end_layout -\backslash -setlength +\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 - will be used for all following multiple columns until you change them again. +\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 +literate +\begin_inset Quotes erd +\end_inset + format (defined in the Preferences panel), otherwise the file will have + the usual +\family typewriter +.tex +\family default + extension. \end_layout -\begin_layout Standard -\begin_inset ERT +\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 - - -\backslash -setlength{ -\backslash -multicolsep}{13pt} +Chunk \end_layout \end_inset + inset that, by itself, takes care of the business. +\end_layout -\begin_inset Note Note +\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 -go back to the default -\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 +Conversion +\begin_inset Quotes erd +\end_inset + tab. + See section +\emph on +Converters +\emph default + of the +\emph on +Customization +\emph default + manual for general information about converters. \end_layout -\begin_layout Standard -\begin_inset Newpage newpage \end_inset - -\end_layout - -\begin_layout Subsubsection -Column Breaks + to generate the \SpecialChar LaTeX + file. \end_layout +\begin_deeper \begin_layout Standard -A column break can be forced by inserting the command -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout - -\backslash -columnbreak{} +Otherwise it will just skip this step. \end_layout -\end_inset - - as \SpecialChar TeX - Code to that position in the text where the column should be broken. - Note that this leads in most cases to whitespace in the text. -\begin_inset Newline newline -\end_inset - -Here is an example: +\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 -\begin_inset Flex Multiple Columns -status open - -\begin_layout Plain Layout - -\size small +Independence from a particular \begin_inset Quotes eld \end_inset -You're surprised to see me, sir, +literate tool \begin_inset Quotes erd \end_inset - said he, in a strange, croaking voice. + is easily achieved by changing the commands that are run by the various + converters. \end_layout -\begin_layout Plain Layout +\begin_layout Paragraph +Generating the code +\end_layout -\size small -I acknowledged that I was. +\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 +\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 -Well, I've a conscience, sir, and when I chanced to see you go into this - house, as I came hobbling after you, I thought to myself, I'll just step - in and see that kind gentleman, and tell him that if I was a bit gruff - in my manner there was not any harm meant, and that I am much obliged to - him for picking up my books. +Converter \begin_inset Quotes erd \end_inset - + setting, should be set to \end_layout -\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 -You make too much of a trifle, +build-script \begin_inset Quotes erd \end_inset - said I. + (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 -May I ask how you knew who I was? +build-script \begin_inset Quotes erd \end_inset - AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED. -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout + that you can place in a directory on your path: +\end_layout +\begin_layout LyX-Code -\backslash -columnbreak{} +\family sans +#!/bin/sh \end_layout -\end_inset - +\begin_layout LyX-Code +\family sans +# \end_layout -\begin_layout Plain Layout +\begin_layout LyX-Code -\size small +\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 -Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for - you'll find my little bookshop at the corner of Church Street, and very - happy to see you, I am sure. - Maybe you collect yourself, sir. - Here's -\noun on -British -\begin_inset space ~ +Flags +\begin_inset Quotes erd \end_inset -Birds -\noun default -, and -\noun on -Catullus -\noun default -, and -\noun on -The Holy War -\noun default + which is to be set to +\end_layout -\begin_inset space ~ +\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 -– a bargain, every one of them. - With five volumes you could just fill that gap on that second shelf. - It looks untidy, does it not, sir? +build-script \begin_inset Quotes erd \end_inset + process through the +\begin_inset Quotes eld +\end_inset -\end_layout - +listerrors +\begin_inset Quotes erd \end_inset + program. +\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 +\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 Subsubsection -Column Separation +\begin_layout Paragraph +Build instructions in the document \end_layout \begin_layout Standard -The width of the columns is automatically calculated, but you can modify - the space between the columns. - This is done by changing the length -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout - -\backslash -columnsep -\end_layout +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 -. - Its predefined value is 10 -\begin_inset space \thinspace{} + 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 -pt. - Here is an example where -\begin_inset Flex Code -status collapsed +build-script +\begin_inset Quotes erd +\end_inset -\begin_layout Plain Layout + above uses the notangle command to look for this chunk (called +\begin_inset Quotes eld +\end_inset -\backslash -columnsep -\end_layout +build-script +\begin_inset Quotes erd +\end_inset +) and runs its contents through +\begin_inset Quotes eld \end_inset - is set to 3 -\begin_inset space \thinspace{} +sh +\begin_inset Quotes erd \end_inset -cm: +. \end_layout \begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - +Typically, such a chunk would look something like this: +\end_layout -\backslash -setlength{ -\backslash -columnsep}{3cm} +\begin_layout LyX-Code +<>= \end_layout +\begin_layout LyX-Code +#!/bin/sh +\begin_inset Newline newline \end_inset +if [ -z "${NOWEB_SOURCE}" ] +\begin_inset Newline newline +\end_inset +then \end_layout -\begin_layout Standard -\begin_inset Flex Multiple Columns -status open - -\begin_layout Plain Layout - -\size small -My observations of No. -\begin_inset space \space{} +\begin_layout LyX-Code +NOWEB_SOURCE=myfile.nw +\begin_inset Newline newline \end_inset -427 Park Lane did little to clear up the problem in which I was interested. - The house was separated from the street by a low wall and railing, the - whole not more than five feet high. - It was perfectly easy, therefore, for anyone to get into the garden, but - the window was entirely inaccessible, since there was no water pipe or - anything which could help the most active man to climb it. - More puzzled than ever, I retraced my steps to Kensington. - I had not been in my study five minutes when the maid entered to say that - a person desired to see me. - To my astonishment it was none other than my strange old book collector, - his sharp, wizened face peering out from a frame of white hair, and his - precious volumes, a dozen of them at least, wedged under his right arm. -\end_layout +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 +@ \end_layout \begin_layout Standard -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout - - -\backslash -setlength{ -\backslash -columnsep}{10pt} -\end_layout - +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 - -\begin_inset Note Note -status collapsed - -\begin_layout Plain Layout -go back to the default -\end_layout - +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 Subsubsection -Vertical Lines +Configuring \SpecialChar LyX + \end_layout \begin_layout Standard -Between the columns a rule with a width of the length -\begin_inset Flex Code -status collapsed +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 -\begin_layout Plain Layout +File Handling +\begin_inset Quotes erd +\end_inset -\backslash -columnseprule + tab. + The important parts are: \end_layout +\begin_layout Description +the +\begin_inset space ~ \end_inset - is placed. - If this rule width is set to 0 -\begin_inset space \thinspace{} -\end_inset -pt (this is the default), the rule is suppressed. - In the following example the rule is 2 -\begin_inset space \thinspace{} +\begin_inset Quotes eld \end_inset -pt wide: -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - +NoWeb +\begin_inset Quotes erd +\end_inset -\backslash -setlength{ -\backslash -columnseprule}{2pt} -\end_layout +\begin_inset space ~ \end_inset - +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 Flex Multiple Columns -status open +\begin_layout Description +the +\begin_inset space ~ +\end_inset -\begin_layout Plain Layout -\size small -\begin_inset Quotes eld -\end_inset +\family sans +Program +\family default -You're surprised to see me, sir, -\begin_inset Quotes erd +\begin_inset space ~ \end_inset - said he, in a strange, croaking voice. +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 Plain Layout - -\size small -I acknowledged that I was. -\end_layout +\begin_layout Description -\begin_layout Plain Layout +\family sans +NoWeb +\family default +-> +\family sans +\SpecialChar LaTeX -\size small +\family default + This converter performs the \begin_inset Quotes eld \end_inset -Well, I've a conscience, sir, and when I chanced to see you go into this - house, as I came hobbling after you, I thought to myself, I'll just step - in and see that kind gentleman, and tell him that if I was a bit gruff - in my manner there was not any harm meant, and that I am much obliged to - him for picking up my books. +weaving \begin_inset Quotes erd \end_inset - -\end_layout - -\begin_layout Plain Layout - -\size small + of the literate document. + For Noweb, it is set to \begin_inset Quotes eld \end_inset -You make too much of a trifle, -\begin_inset Quotes erd -\end_inset - said I. - -\begin_inset Quotes eld -\end_inset +\family typewriter +noweave -delay -index $$i > $$o +\family default -May I ask how you knew who I was? \begin_inset Quotes erd \end_inset \end_layout -\begin_layout Plain Layout +\begin_layout Description -\size small +\family sans +NoWeb +\family default +-> +\family sans +Program +\family default + This performs the \begin_inset Quotes eld \end_inset -Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for - you'll find my little bookshop at the corner of Church Street, and very - happy to see you, I am sure. - Maybe you collect yourself, sir. - Here's -\noun on -British -\begin_inset space ~ +tangling step +\begin_inset Quotes erd \end_inset -Birds -\noun default -, and -\noun on -Catullus -\noun default -, and -\noun on -The Holy War -\noun default - -\begin_inset space ~ +. + As stated above, the Converter is set to +\begin_inset Quotes eld \end_inset -– a bargain, every one of them. - With five volumes you could just fill that gap on that second shelf. - It looks untidy, does it not, sir? + +\family typewriter +build-script $$i +\family default + $$r \begin_inset Quotes erd \end_inset - -\end_layout - +, with Flags set to +\begin_inset Newline newline \end_inset -\end_layout - -\begin_layout Standard -\begin_inset VSpace defskip +\begin_inset Quotes eld \end_inset -\end_layout - -\begin_layout Standard -The rule can be colored by redefining the command -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout - -\backslash -columnseprulecolor -\end_layout +\family typewriter +parselog=$$s/scripts/listerrors +\family default +\begin_inset Quotes erd \end_inset . - This is done by inserting the command -\end_layout - -\begin_layout LyX-Code - -\backslash -renewcommand{ -\backslash -columnseprulecolor}{ -\backslash -color{red}} -\end_layout - -\begin_layout Standard -as \SpecialChar TeX - Code before the multicolumn inset. - Replace -\begin_inset Flex Code -status collapsed - -\begin_layout Plain Layout -red -\end_layout - -\end_inset - - in this command by a color of your choice. - You can use all pre- and self-defined colors. - See the -\emph on -EmbeddedObjects -\emph default - manual, section -\emph on -Colored -\begin_inset space ~ -\end_inset - -Tables -\emph default - for more information about pre- and self-defined colors. - To go back to the default color insert the command \end_layout -\begin_layout LyX-Code - -\backslash -renewcommand{ -\backslash -columnseprulecolor}{ -\backslash -normalcolor} +\begin_layout Subsubsection +Debug extensions \end_layout \begin_layout Standard -Here is the example with a cyan rule and 1 -\begin_inset space \thinspace{} +There is also a new function implemented in the \SpecialChar LyX + server, the +\begin_inset Quotes eld \end_inset -cm column separation: +server-goto-file-row" function, to be used with ddd/gdb or other debugger. + \end_layout \begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -setlength{ -\backslash -columnsep}{1cm} -\end_layout - -\begin_layout Plain Layout - - -\backslash -renewcommand{ -\backslash -columnseprulecolor}{ -\backslash -color{cyan}} -\end_layout - -\end_inset - - +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. \end_layout \begin_layout Standard -\begin_inset Flex Multiple Columns -status open - -\begin_layout Plain Layout - -\size small +I take advantage of the newly created \SpecialChar LyX + server function and this ddd feature, + and set \begin_inset Quotes eld \end_inset -You're surprised to see me, sir, +Edit Sources \begin_inset Quotes erd \end_inset - said he, in a strange, croaking voice. + to: \end_layout -\begin_layout Plain Layout +\begin_layout LyX-Code +echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in +\end_layout -\size small -I acknowledged that I was. +\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 Plain 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 + -\size small -\begin_inset Quotes eld -\end_inset +\begin_inset CommandInset ref +LatexCommand ref +reference "sec:Starting-the-Server" -Well, I've a conscience, sir, and when I chanced to see you go into this - house, as I came hobbling after you, I thought to myself, I'll just step - in and see that kind gentleman, and tell him that if I was a bit gruff - in my manner there was not any harm meant, and that I am much obliged to - him for picking up my books. -\begin_inset Quotes erd \end_inset + explains how to do that. +\end_layout +\begin_layout Subsubsection +Toolbar extensions \end_layout -\begin_layout Plain Layout +\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 -\size small +\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 -You make too much of a trifle, +Build Program \begin_inset Quotes erd \end_inset - said I. + File menu entry. -\begin_inset Quotes eld -\end_inset +\end_layout -May I ask how you knew who I was? -\begin_inset Quotes erd -\end_inset +\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 +\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 -\begin_layout Plain Layout +\begin_layout LyX-Code +Toolbar +\end_layout -\size small -\begin_inset Quotes eld -\end_inset +\begin_layout LyX-Code + Layouts +\end_layout -Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for - you'll find my little bookshop at the corner of Church Street, and very - happy to see you, I am sure. - Maybe you collect yourself, sir. - Here's -\noun on -British -\begin_inset space ~ -\end_inset +\begin_layout LyX-Code + Icon "layout Standard" +\end_layout -Birds -\noun default -, and -\noun on -Catullus -\noun default -, and -\noun on -The Holy War -\noun default +\begin_layout LyX-Code + Icon "layout Section" +\end_layout -\begin_inset space ~ -\end_inset +\begin_layout LyX-Code + Icon "layout \SpecialChar LaTeX +" +\end_layout -– a bargain, every one of them. - With five volumes you could just fill that gap on that second shelf. - It looks untidy, does it not, sir? -\begin_inset Quotes erd -\end_inset +\begin_layout LyX-Code + Icon "layout \SpecialChar LyX +-Code" +\end_layout +\begin_layout LyX-Code + Icon "flex.insert Chunk" +\end_layout +\begin_layout LyX-Code + Separator \end_layout -\end_inset +\begin_layout LyX-Code + Icon "buffer-view" +\end_layout +\begin_layout LyX-Code + Icon "buffer-typeset" +\end_layout +\begin_layout LyX-Code + Icon "build-program" \end_layout -\begin_layout Standard -\begin_inset ERT -status collapsed +\begin_layout LyX-Code + Separator +\end_layout -\begin_layout Plain Layout +\begin_layout LyX-Code +. +\end_layout +\begin_layout LyX-Code +. +\end_layout -\backslash -setlength{ -\backslash -columnseprule}{0pt} +\begin_layout LyX-Code +. \end_layout -\begin_layout Plain Layout +\begin_layout LyX-Code +End +\end_layout +\begin_layout Subsubsection +Colors customization +\end_layout -\backslash -renewcommand{ -\backslash -columnseprulecolor}{ -\backslash -normalcolor} +\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. \end_layout -\end_inset +\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. +\end_layout +\begin_layout Subsection +\SpecialChar LyX + and knitr/Sweave +\end_layout -\begin_inset Note Note -status collapsed +\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 +). +\end_layout -\begin_layout Plain Layout -go back to the default +\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 \begin_layout Section -- 2.39.5