]> git.lyx.org Git - lyx.git/blobdiff - lib/doc/Extended.lyx
Add some doc about direct svn revision number usage.
[lyx.git] / lib / doc / Extended.lyx
index ab1dedc6c0cd5889cb0b6f214b98d7fa6fa42de5..3cf9a5cb7a0965817afb7ef2883d570ae201d976 100644 (file)
@@ -1,5 +1,5 @@
 #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
-\lyxformat 352
+\lyxformat 362
 \begin_document
 \begin_header
 \textclass scrbook
@@ -80,6 +80,8 @@ End
 
 \graphics default
 \default_output_format default
+\bibtex_command default
+\index_command default
 \paperfontsize 12
 \spacing single
 \use_hyperref true
@@ -105,7 +107,6 @@ End
 \use_bibtopic false
 \use_indices false
 \paperorientation portrait
-\backgroundcolor #ffffff
 \secnumdepth 3
 \tocdepth 3
 \paragraph_separation indent
@@ -3113,6 +3114,39 @@ User Guide
  preamble in order to get the desired effects.
 \end_layout
 
+\begin_layout Standard
+For more information on fancy headers, see the 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+fancyhdr
+\end_layout
+
+\end_inset
+
+ package documentation.
+ This can be found in the file 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+fancyhdr.dvi
+\end_layout
+
+\end_inset
+
+, which should have been installed with your LaTeX distribution, or 
+\begin_inset CommandInset href
+LatexCommand href
+name "online"
+target "http://www.ctan.org/tex-archive/macros/latex/contrib/fancyhdr/"
+
+\end_inset
+
+.
+\end_layout
+
 \begin_layout Standard
 The page header is divided into three fields, not surprisingly labeled 
 \begin_inset Quotes eld
@@ -3434,32 +3468,6 @@ thispagestyle{fancy}
  are marked fancy when using the global fancy setting.
 \end_layout
 
-\begin_layout Standard
-There are more complex commands which will let you insert things in the
- upper left on odd numbered pages, etc., but we will refer you to the 
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-fancyhdr
-\end_layout
-
-\end_inset
-
- package documentation for more information.
- (Find the file 
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-fancyhdr.dvi
-\end_layout
-
-\end_inset
-
-.)
-\end_layout
-
 \begin_layout Standard
 As a final example, it is possible to include an image in the header or
  footer.
@@ -4608,83 +4616,298 @@ bye
 \end_layout
 
 \begin_layout Section
-Reverse DVI search
+Reverse DVI/PDF search
 \end_layout
 
 \begin_layout Standard
-Some DVI viewers provide the reverse DVI search feature (also called 
+Some DVI/PDF viewers
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
+ Skim on Mac OSX and SumatraPDF on Windows.
+\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 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 LyX.
+ This is done via the LyX server either by using the named pipe (
+\emph on
+lyxpipe
+\emph default
+), or the UNIX domain socket (
 \emph on
-inverse DVI search
+lyxsocket
 \emph default
-), allowing the cursor in LyX to automatically jump to the point corresponding
- to a given position in the previewed DVI file.
- A program or script will be called by the DVI viewer when initiating a
- reverse DVI search.
- The way the search is triggered depends on the viewer (for example, 
+) that LyX creates in its temporary directory (this is the way the 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-xdvi
+lyxclient
 \end_layout
 
 \end_inset
 
- uses Ctrl-click, whereas 
+ program communicates with LyX).
+ In some cases, you need a helper script that mediates between the viewer
+ and LyX, in others, the viewer can communicate with 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 Subsection
+Enabling reverse search
+\end_layout
+
+\begin_layout Standard
+LaTeX provides several different methods for reverse search.
+ Some are built-in in the 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-yap
+latex/pdflatex
+\end_layout
+
+\end_inset
+
+ program, some are provided by external packages.
+ Your choice depends on whether your LaTeX distribution already provides
+ a given method (the built-in methods are rather new) and whether your viewer
+ can cope with it.
+ The available methods are described in the following.
+\end_layout
+
+\begin_layout Subsubsection*
+Built-in DVI-search via src-specials (DVI only) 
+\end_layout
+
+\begin_layout Standard
+This method provides the DVI file with the necessary information for reverse
+ search.
+ It is available in LaTeX since quite some time (any somewhat recent LaTeX
+ distribution should include it), and it works reliably.
+ To enable it, change the 
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+LaT
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+{}
+\end_layout
+
+\end_inset
+
+eX (plain)->DVI
+\end_layout
+
+\end_inset
+
+ or 
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+LaT
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+{}
+\end_layout
+
+\end_inset
+
+eX (plain)->DraftDVI
+\end_layout
+
+\end_inset
+
+ converter in 
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+Preferences\SpecialChar \menuseparator
+File Handling\SpecialChar \menuseparator
+Converters
 \end_layout
 
 \end_inset
 
- uses double click) but in general the program is called with two arguments,
- a filename and a line number, and, in turn, it should pass this info to
- a running instance of LyX.
- This can be done through the LyX server either by using the named pipe,
- or the unix domain socket that lyx creates in its temporary directory (this
- is the way the 
+ to 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-lyxclient
+latex -src-specials $$i
 \end_layout
 
 \end_inset
 
- program communicates with LyX).
+.
+ If this doesn't work, check if your 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 reverse DVI search feature can be enabled in LyX as follows:
+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 LyX preamble: 
 \end_layout
 
 \begin_layout Itemize
-The DVI file should contain suitable info (src-specials) produced either
- by using appropriate options when calling the LaTeX compiler (method 1),
- or by using the 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-srcltx
+
+\backslash
+usepackage{pdfsync}
 \end_layout
 
 \end_inset
 
- package (method 2).
+ for reverse PDF search,
 \end_layout
 
-\begin_deeper
-\begin_layout Description
-Method
-\begin_inset space ~
+\begin_layout Itemize
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+usepackage[active]{srcltx}
+\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
+\end_layout
+
+\begin_layout LyX-Code
+
+\backslash
+usepackage{ifpdf}
+\begin_inset Newline newline
+\end_inset
+
+
+\backslash
+ifpdf
+\begin_inset Newline newline
+\end_inset
+
+  
+\backslash
+usepackage{pdfsync}
+\begin_inset Newline newline
+\end_inset
+
+
+\backslash
+else
+\begin_inset Newline newline
 \end_inset
 
-1 Change the 
+  
+\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 SyncTeX (DVI and PDF) 
+\end_layout
+
+\begin_layout Standard
+Recent versions of 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+(pdf)latex
+\end_layout
+
+\end_inset
+
+ have built-in support for both PDF and DVI reverse search.
+ This so-called 
+\emph on
+SyncTeX
+\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 TeXLive 2008 or a recent MikTeX distribution in order
+ to use it.
+ Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
+ already provide SyncTeX support.
+\end_layout
+
+\begin_layout Standard
+To enable SyncTeX for DVI output, change the 
 \begin_inset Flex CharStyle:MenuItem
 status collapsed
 
@@ -4700,7 +4923,7 @@ status collapsed
 
 \end_inset
 
-eX (plain)->DVI
+eX (plain) -> DVI
 \end_layout
 
 \end_inset
@@ -4721,7 +4944,7 @@ status collapsed
 
 \end_inset
 
-eX (plain)->DraftDVI
+eX (plain) -> DraftDVI
 \end_layout
 
 \end_inset
@@ -4731,7 +4954,6 @@ eX (plain)->DraftDVI
 status collapsed
 
 \begin_layout Plain Layout
-Tools\SpecialChar \menuseparator
 Preferences\SpecialChar \menuseparator
 File Handling\SpecialChar \menuseparator
 Converters
@@ -4744,7 +4966,17 @@ Converters
 status collapsed
 
 \begin_layout Plain Layout
-latex -
+latex -synctex=1 $$i
+\end_layout
+
+\end_inset
+
+, and for PDF output, change the 
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+LaT
 \begin_inset ERT
 status collapsed
 
@@ -4755,47 +4987,66 @@ status collapsed
 
 \end_inset
 
--src $$i
+eX (pdflatex) -> PDF (pdflatex)
 \end_layout
 
 \end_inset
 
if you use tetex or texlive, or to 
or converter to 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-latex -src-specials $$i
+pdflatex -synctex=1 $$i
 \end_layout
 
 \end_inset
 
- if you use miktex.
+.
+ Check the documentation of your viewer whether the viewer needs to be configure
+d for the use with SyncTeX.
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+The 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+-synctex=1
 \end_layout
 
-\begin_layout Description
-Method
-\begin_inset space ~
 \end_inset
 
-2 As an alternative to redefining the converter (maybe because you use the
- pplatex command instead of latex for producing a DVI file), insert 
+ option enables gzip compression.
+ If your viewer does not support it, you should instead use 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
+-synctex=-1
+\end_layout
 
-\backslash
-usepackage[active]{srcltx}
+\end_inset
+
+.
 \end_layout
 
 \end_inset
 
- in the preamble of the LyX file.
+
 \end_layout
 
-\end_deeper
-\begin_layout Itemize
+\begin_layout Subsection
+Configuring and using specific viewers
+\end_layout
+
+\begin_layout Subsubsection*
+Xdvi (all platforms)
+\end_layout
+
+\begin_layout Standard
 If you use 
 \begin_inset Flex CharStyle:Code
 status collapsed
@@ -4806,8 +5057,9 @@ xdvi
 
 \end_inset
 
-, you don't need to do anything else, as LyX already provides the necessary
- hooks for automatically using the 
+, you don't need to do anything else for performing a reverse DVI search,
+ as LyX already provides the necessary hooks for automatically using the
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -4818,14 +5070,18 @@ lyxclient
 \end_inset
 
  program.
- However, if for whatever reason you want to use the named pipe instead
- of the socket for communicating with lyx, simply change the DVI viewer
- in 
+ Just setup your document as described above (reverse search is triggered
+ by Ctrl-click or Alt-click on Mac OSX, respectively).
+\end_layout
+
+\begin_layout Standard
+However, if for whatever reason you want to use the named pipe instead of
+ the socket for communicating with LyX, simply change the DVI viewer in
 \begin_inset Flex CharStyle:MenuItem
 status collapsed
 
 \begin_layout Plain Layout
-Tools\SpecialChar \menuseparator
 Preferences\SpecialChar \menuseparator
 File Handling\SpecialChar \menuseparator
 File formats
@@ -4833,7 +5089,27 @@ File formats
 
 \end_inset
 
- to 
+ to
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+On Mac OSX you have to use 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -4857,7 +5133,6 @@ lyxeditor.sh
  For example, a minimal shell script is the following one:
 \end_layout
 
-\begin_deeper
 \begin_layout LyX-Code
 #!/bin/sh
 \begin_inset Newline newline
@@ -4889,18 +5164,201 @@ status collapsed
 
 \end_inset
 
- is the LyXServer pipe path specified in
+ is the Ly
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+{}
+\end_layout
+
+\end_inset
+
+XServer pipe path specified in 
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+Preferences\SpecialChar \menuseparator
+Paths
+\end_layout
+
+\end_inset
+
+.
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+In the 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+development/tools
+\end_layout
+
+\end_inset
+
+ folder of a source distribution you can find a 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxeditor
+\end_layout
+
+\end_inset
+
+ script which is able to locate the 
+\emph on
+lyxpipe
+\emph default
+ based on your preferences.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+MacDviX (Mac OSX)
+\end_layout
+
+\begin_layout Standard
+At the end of 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+/Applications/MacDviX_Folder/calleditor.script
+\end_layout
+
+\end_inset
+
+, add the following lines:
+\end_layout
+
+\begin_layout LyX-Code
+/Applications/Ly
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+{}
+\end_layout
+
+\end_inset
+
+X.app/Contents/MacOS/lyxeditor "$2" $1
 \begin_inset Newline newline
 \end_inset
 
+exit 1
+\end_layout
+
+\begin_layout Standard
+Modify the lines accordingly if you install LyX somewhere else than in the
+ Applications folder.
+\end_layout
+
+\begin_layout Standard
+Reverse search is triggered by Alt-click (OPTION-click).
+\end_layout
+
+\begin_layout Subsubsection*
+Skim (Mac OSX)
+\end_layout
+
+\begin_layout Standard
+Enter 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+open -a Skim.app $$i
+\end_layout
+
+\end_inset
 
+ to the viewer setting in 
 \begin_inset Flex CharStyle:MenuItem
 status collapsed
 
 \begin_layout Plain Layout
-Tools\SpecialChar \menuseparator
 Preferences\SpecialChar \menuseparator
-Paths
+File Handling\SpecialChar \menuseparator
+File formats\SpecialChar \menuseparator
+PDF (pdflatex)
+\end_layout
+
+\end_inset
+
+, and then in 
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+Skim\SpecialChar \menuseparator
+Preferences\SpecialChar \menuseparator
+Sync
+\end_layout
+
+\end_inset
+
+ select Ly
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+{}
+\end_layout
+
+\end_inset
+
+X.
+\end_layout
+
+\begin_layout Standard
+Reverse search is triggered by COMMAND-SHIFT-click
+\end_layout
+
+\begin_layout Subsubsection*
+Okular (KDE)
+\end_layout
+
+\begin_layout Standard
+Go to 
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+Settings\SpecialChar \menuseparator
+Configure Okular\SpecialChar \ldots{}
+\SpecialChar \menuseparator
+Editor
+\end_layout
+
+\end_inset
+
+, select 
+\begin_inset Quotes eld
+\end_inset
+
+Custom Text Editor
+\begin_inset Quotes erd
+\end_inset
+
+ and add the command 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxclient -g %f %l
 \end_layout
 
 \end_inset
@@ -4908,11 +5366,16 @@ Paths
 .
 \end_layout
 
-\end_deeper
-\begin_layout Itemize
-If you use the Cygwin version of LyX and yap as a viewer, you should set
- the name of the program that communicates with LyX directly in yap as follows.
- After launching yap, choose its 
+\begin_layout Standard
+Reverse search is triggered by SHIFT-click.
+\end_layout
+
+\begin_layout Subsubsection*
+YAP (Cygwin)
+\end_layout
+
+\begin_layout Standard
+Launch yap, choose its 
 \begin_inset Flex CharStyle:MenuItem
 status collapsed
 
@@ -4923,11 +5386,52 @@ Options
 
 \end_inset
 
- menu and select the "Inverse DVI Search" tab.
- Click on the "New..." button and, in the window which opens, enter "LyX Editor"
- (or any other name you like) in the "Name:" field.
- Now click on the button labeled "..." to open a filedialog and navigate to
- the directory containing the batch file 
+ menu and select the 
+\begin_inset Quotes eld
+\end_inset
+
+Inverse DVI Search
+\begin_inset Quotes erd
+\end_inset
+
+ tab.
+ Click on the 
+\begin_inset Quotes eld
+\end_inset
+
+New\SpecialChar \ldots{}
+
+\begin_inset Quotes erd
+\end_inset
+
+ button and, in the window that opens, enter 
+\begin_inset Quotes eld
+\end_inset
+
+LyX Editor
+\begin_inset Quotes erd
+\end_inset
+
+ (or any other name you like) in the 
+\begin_inset Quotes eld
+\end_inset
+
+Name:
+\begin_inset Quotes erd
+\end_inset
+
+ field.
+ Now click on the button labeled 
+\begin_inset Quotes eld
+\end_inset
+
+\SpecialChar \ldots{}
+
+\begin_inset Quotes erd
+\end_inset
+
+ to open a file dialog and navigate to the directory containing the batch
+ file 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -4979,8 +5483,8 @@ lyxclient
 \end_inset
 
  program.
As yap is a native Windows application, the filename it provides should
- be converted to posix style before being passed to 
Since yap is a native Windows application, the filename it provides should
+ be converted to POSIX style before being passed to 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -5013,7 +5517,6 @@ lyxeditor.bat
  wrapper, which is as follows:
 \end_layout
 
-\begin_deeper
 \begin_layout LyX-Code
 @echo off
 \begin_inset Newline newline
@@ -5023,7 +5526,7 @@ if "%1" == "-g" goto lyxclient
 \begin_inset Newline newline
 \end_inset
 
-bash -c 'lyxeditor.sh $(cygpath "%1") %2'
+bash -c 'lyxeditor.sh $(cygpath -a "%1") %2'
 \begin_inset Newline newline
 \end_inset
 
@@ -5035,7 +5538,7 @@ exit
 \begin_inset Newline newline
 \end_inset
 
-bash -c 'lyxclient %1 $(cygpath "%2") %3'
+bash -c 'lyxclient %1 $(cygpath -a "%2") %3'
 \end_layout
 
 \begin_layout Standard
@@ -5063,11 +5566,146 @@ lyxclient.exe
  in the above batch file.
 \end_layout
 
-\end_deeper
 \begin_layout Standard
-If you did no mistakes, and if src-specials are activated as previously
- described, whenever you Ctrl-click in xdvi, or double click in yap, the
- cursor in LyX should jump to the desired location.
+In yap, reverse search is triggered by double-click.
+\end_layout
+
+\begin_layout Subsubsection*
+SumatraPDF (Cygwin)
+\end_layout
+
+\begin_layout Standard
+In SumatraPDF, you can set the name of the program that communicates with
+ LyX by simply launching SumatraPDF as 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+SumatraPDF -inverse-search "lyxeditor.bat -g %f %l"
+\end_layout
+
+\end_inset
+
+ and then quit.
+ The program will remember the setting and using the 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+-inverse-search
+\end_layout
+
+\end_inset
+
+ option will not be needed from now on
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+It has been reported that SumatraPDF is not able to remember the settings
+ if it is installed in the Program Files system folder.
+ This problem can be avoided by installing it somewhere else, for example
+ in 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+/usr/local/bin
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\end_inset
+
+ (in this way you will be using the lyxsocket; omit the 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+-g
+\end_layout
+
+\end_inset
+
+ option if you want to use the lyxpipe and be sure that the 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxeditor.sh
+\end_layout
+
+\end_inset
+
+ script is in your command PATH).
+ If SumatraPDF is not your default PDF viewer, you should enter 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+SumatraPDF.sh
+\end_layout
+
+\end_inset
+
+ in the viewer setting in 
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+Preferences\SpecialChar \menuseparator
+File Handling\SpecialChar \menuseparator
+File formats\SpecialChar \menuseparator
+PDF (pdflatex)
+\end_layout
+
+\end_inset
+
+, where 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+SumatraPDF.sh
+\end_layout
+
+\end_inset
+
+ is the following script (to be placed in your command PATH, 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+/usr/local/bin
+\end_layout
+
+\end_inset
+
+ being the best choice):
+\end_layout
+
+\begin_layout LyX-Code
+#!/bin/bash
+\begin_inset Newline newline
+\end_inset
+
+cd $(dirname $1)
+\begin_inset Newline newline
+\end_inset
+
+SumatraPDF.exe $(basename $1)
+\end_layout
+
+\begin_layout Standard
+This is needed because SumatraPDF is a native Windows application and does
+ not understand the posix paths used by the Cygwin version of LyX.
+\end_layout
+
+\begin_layout Standard
+Reverse search is triggered by double-click.
 \end_layout
 
 \begin_layout Chapter
@@ -8008,11 +8646,8 @@ clean
 \begin_layout Section
 Foils [aka 
 \family sans
-Foil
+FoilTeX
 \family default
-\noun on
-TeX
-\noun default
 ]
 \begin_inset CommandInset label
 LatexCommand label
@@ -8038,9 +8673,9 @@ This section describes how to use LyX to make slides for overhead projectors.
  There are two document classes that can do this: the default slides class
  and the 
 \family sans
-Foil
+FoilTeX
 \family default
-TeX slides class.
+ slides class.
  This section documents the latter.
 \end_layout
 
@@ -8247,9 +8882,9 @@ serif
 \begin_layout Itemize
 
 \family sans
-Foil
+FoilTeX
 \family default
-TeX supports A4 and Letter paper sizes as well as a special size for working
+ supports A4 and Letter paper sizes as well as a special size for working
  with 35
 \begin_inset space \thinspace{}
 \end_inset
@@ -8275,9 +8910,9 @@ Pagestyle
  setting behaves a bit differently for this class.
  
 \family sans
-Foil
+FoilTeX
 \family default
-TeX provides extensive footer and header capabilities including a user-defined
+ provides extensive footer and header capabilities including a user-defined
  logo.
  See section
 \begin_inset space ~
@@ -8353,13 +8988,13 @@ fancyheadings
 \family default
  package although its use with 
 \family sans
-Foil
+FoilTeX
 \family default
-TeX is discouraged by the writer of the 
+ is discouraged by the writer of the 
 \family sans
-Foil
+FoilTeX
 \family default
-TeX package because of some potential page layout clashes.
+ package because of some potential page layout clashes.
 \end_layout
 
 \end_deeper
@@ -8430,9 +9065,9 @@ foils
  document.
  This option tells 
 \family sans
-Foil
+FoilTeX
 \family default
-TeX to use the dvips driver to rotate those pages that are set as landscape
+ to use the dvips driver to rotate those pages that are set as landscape
  foils.
 \end_layout
 
@@ -8488,9 +9123,9 @@ foils
  class.
  There are several additional environments provided by 
 \family sans
-Foil
+FoilTeX
 \family default
-TeX as well as a couple added by LyX.
+ as well as a couple added by LyX.
  The following environments are shared with other classes:
 \end_layout
 
@@ -8639,9 +9274,9 @@ That is, all the major environments apart from the sectioning environments.
  Since foils are essentially self-contained sections, with a title and body,
  
 \family sans
-Foil
+FoilTeX
 \family default
-TeX provides specific commands for starting new foils and these are:
+ provides specific commands for starting new foils and these are:
 \end_layout
 
 \begin_layout Itemize
@@ -8680,9 +9315,9 @@ and the differences will be explained in the next section.
 Since foils are often used in presenting ideas or new theorems and such
  
 \family sans
-Foil
+FoilTeX
 \family default
-TeX also provides a comprehensive box of goodies for presenting them:
+ also provides a comprehensive box of goodies for presenting them:
 \end_layout
 
 \begin_layout Standard
@@ -8803,10 +9438,10 @@ CrossList
 \begin_layout Standard
 
 \family sans
-Foil
+FoilTeX
 \family default
-TeX provides some powerful header and footer capabilities that are best
set in the preamble although they may be set at any point in a document.
+ provides some powerful header and footer capabilities that are best set
+ in the preamble although they may be set at any point in a document.
  If you want to change these settings in your document the best place to
  do so is at the very top of a foil, i.
 \begin_inset space \thinspace{}
@@ -8921,10 +9556,10 @@ end{multicols}
 \begin_layout Standard
 There are also a few commands provided by 
 \family sans
-Foil
+FoilTeX
 \family default
-TeX that aren't directly supported by LyX but I'll tell you what they do
and how to use them in section
+ that aren't directly supported by LyX but I'll tell you what they do and
+ how to use them in section
 \begin_inset space ~
 \end_inset
 
@@ -9146,11 +9781,11 @@ Figures and Tables
 \begin_layout Standard
 
 \family sans
-Foil
+FoilTeX
 \family default
-TeX redefines the floating tables and figures so that they appear exactly
- where they are in the text rather than pushing them to the top of the page
or to some user specified location.
+ redefines the floating tables and figures so that they appear exactly where
+ they are in the text rather than pushing them to the top of the page or
+ to some user specified location.
  In fact if you change the float placement settings they are simply ignored.
 \end_layout
 
@@ -9186,9 +9821,9 @@ Restriction
 
 -Typeset by 
 \family sans
-Foil
+FoilTeX
 \family default
-TeX-
+-
 \begin_inset Quotes erd
 \end_inset
 
@@ -9241,9 +9876,9 @@ Header
 \begin_layout Subsection
 Unsupported 
 \family sans
-Foil
+FoilTeX
 \family default
-TeX Goodies
+ Goodies
 \begin_inset CommandInset label
 LatexCommand label
 name "sec:unsuppfoils"
@@ -10366,11 +11001,7 @@ Before you submit your paper you must export the LyX document as a LaTeX
 \family sans
 File\SpecialChar \menuseparator
 Export\SpecialChar \menuseparator
-La
-\family default
-T
-\family sans
-eX
+LaTeX
 \family default
 )
 \begin_inset Foot
@@ -11725,9 +12356,9 @@ scrmacros.inc
 \family default
 .
  This is thought of as a place to define your own types.
- Copy s
+ Copy scrmacros
 \family typewriter
-crmacros.inc
+.inc
 \family default
  in your personal layout directory and edit the file!
 \end_layout
@@ -13562,11 +14193,7 @@ draft
 
 goes in the 
 \family sans
-La
-\family default
-T
-\family sans
-eX
+LaTeX
 \begin_inset space ~
 \end_inset
 
@@ -13959,9 +14586,9 @@ g.: does not display the number for theorem-like layouts, just #.
 \begin_layout Section
 Slides [aka 
 \noun on
-Sli
+SliTeX
 \noun default
-TeX]
+]
 \begin_inset CommandInset label
 LatexCommand label
 name "sec:slitex"
@@ -13988,9 +14615,9 @@ This section describes how to use LyX to make slides for overhead projectors.
  There are two document classes that can do this: the default slides class
  and the 
 \family sans
-Foil
+FoilTeX
 \family default
-TeX slides class.
+ slides class.
  This section documents the former.
 \end_layout
 
@@ -14097,9 +14724,9 @@ or so I've been told repeatedly by its advocates.
 \begin_layout Standard
 This class is the LaTeX2e improvement of the old 
 \noun on
-Sli
+SliTeX
 \noun default
-TeX package.
+ package.
  Every LaTeX2e distribution includes this class [which I'll just refer to
  as 
 \begin_inset Quotes eld
@@ -15548,9 +16175,9 @@ native
 
  support for time markers, a 
 \noun on
-Sli
+SliTeX
 \noun default
-TeX feature.
+ feature.
  So, you'll have to resort to using the LaTeX codes.
 \end_layout
 
@@ -15960,9 +16587,9 @@ One final thing: I created this class to support the LaTeX2e
 
 
 \noun on
-Sli
+SliTeX
 \noun default
-TeX emulation
+ emulation
 \begin_inset Quotes erd
 \end_inset
 
@@ -17769,7 +18396,15 @@ The file exchange through various revision control systems brings the problem
 
 \begin_layout Standard
 SVN has two mechanisms to provide such kind of mutual exclusivity for file
- access - locks and automatical setting of write permissions based on 
+ access - locks and automatical setting of write permissions (see sec.
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "subsec:Automatical-Locking-Property"
+
+\end_inset
+
+) based on 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -17781,7 +18416,7 @@ svn:needs-lock
 
  file svn property
 \begin_inset Foot
-status collapsed
+status open
 
 \begin_layout Plain Layout
 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
@@ -17857,6 +18492,182 @@ svn update "<file-name>"
 svn lock "<file-name>"
 \end_layout
 
+\begin_layout Subsubsection
+
+\family typewriter
+\begin_inset CommandInset label
+LatexCommand label
+name "subsec:Automatical-Locking-Property"
+
+\end_inset
+
+
+\family default
+Automatical Locking Property
+\end_layout
+
+\begin_layout Standard
+The above mentioned automatical setting of write permissions of the .lyx
+ file can be set through
+\family sans
+\bar under
+ F
+\bar default
+ile\SpecialChar \menuseparator
+
+\bar under
+V
+\bar default
+ersion
+\begin_inset space ~
+\end_inset
+
+Control\SpecialChar \menuseparator
+
+\bar under
+T
+\bar default
+oggle 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
+
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+SVN
+\begin_inset space ~
+\end_inset
+
+commands:
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+Set:
+\family typewriter
+ svn propset svn:needs-lock ON "<file-name>"
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+Unset: 
+\family typewriter
+svn propdel svn:needs-lock "<file-name>"
+\end_layout
+
+\begin_layout Subsubsection
+Revision Information in Documents
+\end_layout
+
+\begin_layout Standard
+Currently there is no way how to provide such kind of information directly
+ from LyX.
+ There are possibilities how to activate it with the help of svn features,
+ but each has its own drawbacks.
+\end_layout
+
+\begin_layout Standard
+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
+
+\end_inset
+
+.
+ In short -- you set file keywords property (e.g.
+\family sans
+svn propset svn:keywords 'Rev' file.lyx
+\family default
+) and then paste keyword ERT
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+This is an easy way how to ensure that LyX won't break the line in the middle
+ of keyword tag.
+\end_layout
+
+\end_inset
+
+ tag in your document (e.g.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+$Rev$
+\end_layout
+
+\end_inset
+
+).
+ This way svn client will automatically substitute revision number (e.g.
+\begin_inset ERT
+status open
+
+\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 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 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 LyX to support it directly .
+\end_layout
+
+\begin_layout Standard
+The second possibility would be to write your own external-material template
+ which calls either 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+svnversion
+\end_layout
+
+\end_inset
+
+ utility or parses the output of 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+svn info file.lyx
+\end_layout
+
+\end_inset
+
+ command and returns the result back, when typeseting the document.
+\end_layout
+
 \begin_layout Subsection
 SVN and Windows Environment
 \end_layout