]> git.lyx.org Git - lyx.git/blobdiff - lib/doc/Extended.lyx
an example for the sweave module, prepared by Gregor Gorjanc
[lyx.git] / lib / doc / Extended.lyx
index d9d7cc896f0905d0fea5707da594d78cddf0491b..e1925635aa4d5eabee9028639955a8daf4305034 100644 (file)
@@ -1,5 +1,5 @@
-#LyX 1.6.1 created this file. For more info see http://www.lyx.org/
-\lyxformat 345
+#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
+\lyxformat 357
 \begin_document
 \begin_header
 \textclass scrbook
@@ -72,12 +72,14 @@ End
 \font_sans default
 \font_typewriter default
 \font_default_family default
+\use_xetex false
 \font_sc false
 \font_osf false
 \font_sf_scale 100
 \font_tt_scale 100
 
 \graphics default
+\default_output_format default
 \paperfontsize 12
 \spacing single
 \use_hyperref true
@@ -101,7 +103,9 @@ End
 \use_esint 0
 \cite_engine basic
 \use_bibtopic false
+\use_indices false
 \paperorientation portrait
+\backgroundcolor #ffffff
 \secnumdepth 3
 \tocdepth 3
 \paragraph_separation indent
@@ -3109,6 +3113,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
@@ -3430,32 +3467,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.
@@ -3582,7 +3593,7 @@ The six panels are divided up by the packages they require.
 \align center
 \begin_inset Tabular
 <lyxtabular version="3" rows="7" columns="2">
-<features>
+<features tabularvalignment="middle">
 <column alignment="center" valignment="top" width="0pt">
 <column alignment="center" valignment="top" width="0pt">
 <row>
@@ -4124,9 +4135,9 @@ push
 \begin_layout Standard
 Please note that, at present, 
 \emph on
-the server does not work on Windows
+the server does not work natively on Windows
 \emph default
-.
+
 \begin_inset Foot
 status collapsed
 
@@ -4138,7 +4149,7 @@ There is no reason it cannot do so.
 
 \end_inset
 
-
+ but it does work with Cygwin versions of LyX.
 \end_layout
 
 \begin_layout Section
@@ -4268,7 +4279,7 @@ status collapsed
 ' to create the pipes.
  If one of the pipes already exists, LyX will assume that another LyX process
  is already running and will not start the server.
- This means that if LyX crashes, or if for some other reason, a 
+ If for some other reason, an unused 
 \begin_inset Quotes eld
 \end_inset
 
@@ -4276,10 +4287,10 @@ stale
 \begin_inset Quotes erd
 \end_inset
 
- pipe is left in existence when LyX closes, then LyX will not start the
server.
- (This is bug 641.) You will need to delete the pipes manually and then restart
- LyX.
+ pipe is left in existence when LyX closes, then LyX will try to delete
it.
+ If this fails for some reason, you will need to delete the pipes manually
and then restart LyX.
 \end_layout
 
 \begin_layout Standard
@@ -4315,41 +4326,27 @@ lyx -dbg lyxserver
 \end_layout
 
 \begin_layout Standard
-Other than this, there are a few points to consider:
-\end_layout
-
-\begin_layout Itemize
-Both server and clients must run on UNIX or OS/2 machines.
- Communications between LyX on UNIX and clients on OS/2 or vice versa is
- not possible right now.
-\end_layout
-
-\begin_layout Itemize
-On OS/2, only one client can connect to LyXServer at a time.
-\end_layout
-
-\begin_layout Itemize
-On OS/2, clients must open the input pipe with 
+You can find a complete example client written in C in the source distribution
+ as 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-O_WRONLY
+development/lyxserver/server_monitor.c
 \end_layout
 
 \end_inset
 
- mode.
+.
 \end_layout
 
 \begin_layout Standard
-You can find a complete example client written in C in the source distribution
- as 
+Another useful tool is command-line based client you will find in 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-development/lyxserver/server_monitor.c
+src/client/lyxclient
 \end_layout
 
 \end_inset
@@ -4483,9 +4480,9 @@ Examples:
 
 \begin_layout LyX-Code
 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
-\end_layout
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout LyX-Code
 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
 \begin_inset Newline newline
 \end_inset
@@ -4617,6 +4614,448 @@ bye
  sent from LyX will inform clients that LyX is closing.
 \end_layout
 
+\begin_layout Section
+Reverse DVI search
+\end_layout
+
+\begin_layout Standard
+Some DVI viewers provide the reverse DVI search feature (also called 
+\emph on
+inverse DVI search
+\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, 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+xdvi
+\end_layout
+
+\end_inset
+
+ uses Ctrl-click, whereas 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+yap
+\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 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxclient
+\end_layout
+
+\end_inset
+
+ program communicates with LyX).
+\end_layout
+
+\begin_layout Standard
+The reverse DVI search feature can be enabled in LyX as follows:
+\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
+\end_layout
+
+\end_inset
+
+ package (method 2).
+\end_layout
+
+\begin_deeper
+\begin_layout Description
+Method
+\begin_inset space ~
+\end_inset
+
+1 If you use recent texlive or miktex distributions, 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
+Tools\SpecialChar \menuseparator
+Preferences\SpecialChar \menuseparator
+File Handling\SpecialChar \menuseparator
+Converters
+\end_layout
+
+\end_inset
+
+ to 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+latex -src-specials $$i
+\end_layout
+
+\end_inset
+
+, otherwise check what is the appropriate option for your TeX engine.
+\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 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+usepackage[active]{srcltx}
+\end_layout
+
+\end_inset
+
+ in the preamble of the LyX file.
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+If you use 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+xdvi
+\end_layout
+
+\end_inset
+
+, you don't need to do anything else, as LyX already provides the necessary
+ hooks for automatically using the 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxclient
+\end_layout
+
+\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 
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+Tools\SpecialChar \menuseparator
+Preferences\SpecialChar \menuseparator
+File Handling\SpecialChar \menuseparator
+File formats
+\end_layout
+
+\end_inset
+
+ to 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+xdvi -editor 'lyxeditor.sh %f %l'
+\end_layout
+
+\end_inset
+
+, where 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxeditor.sh
+\end_layout
+
+\end_inset
+
+ is a suitable script.
+ For example, a minimal shell script is the following one:
+\end_layout
+
+\begin_deeper
+\begin_layout LyX-Code
+#!/bin/sh
+\begin_inset Newline newline
+\end_inset
+
+LYXPIPE="/path/to/lyxpipe"
+\begin_inset Newline newline
+\end_inset
+
+COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
+\begin_inset Newline newline
+\end_inset
+
+echo "$COMMAND" > "${LYXPIPE}".in || exit
+\begin_inset Newline newline
+\end_inset
+
+read < "${LYXPIPE}".out || exit
+\end_layout
+
+\begin_layout Standard
+where 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+/path/to/lyxpipe
+\end_layout
+
+\end_inset
+
+ is the LyXServer pipe path specified in
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+Tools\SpecialChar \menuseparator
+Preferences\SpecialChar \menuseparator
+Paths
+\end_layout
+
+\end_inset
+
+.
+\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_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+View\SpecialChar \menuseparator
+Options
+\end_layout
+
+\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 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxeditor.bat
+\end_layout
+
+\end_inset
+
+ (see below).
+ Select 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxeditor.bat
+\end_layout
+
+\end_inset
+
+ and then specify the program arguments as 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+%f %l
+\end_layout
+
+\end_inset
+
+ if you want to use the shell script above, or as 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+-g %f %l
+\end_layout
+
+\end_inset
+
+ if you want to use the 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxclient
+\end_layout
+
+\end_inset
+
+ program.
+ As 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
+
+\begin_layout Plain Layout
+lyxeditor.sh
+\end_layout
+
+\end_inset
+
+ or 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxclient
+\end_layout
+
+\end_inset
+
+, and this is the purpose of the 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxeditor.bat
+\end_layout
+
+\end_inset
+
+ wrapper, which is as follows:
+\end_layout
+
+\begin_deeper
+\begin_layout LyX-Code
+@echo off
+\begin_inset Newline newline
+\end_inset
+
+if "%1" == "-g" goto lyxclient
+\begin_inset Newline newline
+\end_inset
+
+bash -c 'lyxeditor.sh $(cygpath "%1") %2'
+\begin_inset Newline newline
+\end_inset
+
+exit
+\begin_inset Newline newline
+\end_inset
+
+:lyxclient
+\begin_inset Newline newline
+\end_inset
+
+bash -c 'lyxclient %1 $(cygpath "%2") %3'
+\end_layout
+
+\begin_layout Standard
+You have to make sure that both 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxeditor.sh
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxclient.exe
+\end_layout
+
+\end_inset
+
+ are in the command PATH, otherwise you have to use their full posix path
+ 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.
+\end_layout
+
 \begin_layout Chapter
 Special Document Classes
 \end_layout
@@ -17326,7 +17765,17 @@ svn:needs-lock
 
 \end_inset
 
- file svn property.
+ file svn property
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
+\end_layout
+
+\end_inset
+
+.
  In a case this property is detected for a given document 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.
@@ -17599,7 +18048,7 @@ Commit:
 status collapsed
 
 \begin_layout Plain Layout
-vc-command DS "." "TortoiseProc /command:commit /path:$$p"
+vc-command DR "." "TortoiseProc /command:commit /path:$$p"
 \end_layout
 
 \end_inset