positioning tables inside float

2010-08-28 Thread Graham Smith
I am trying to align a table inside a float, so it sits in the centre of 
the page. I can't see any obvious way of doing this. I thought using the 
center paragraphs might have worked but its greyed out. But that is how 
I thought I had done it in the past


I am using lyx 1.6.5 on Ubuntu 10.04 and lyx 1.6.7 on a Mac running Tiger.

Thanks,

Graham



Re: several problems

2010-08-28 Thread Wolfgang Engelmann
Am Saturday 28 August 2010 01:15:24 schrieb Sandro Portmann:

Since today I am receiving mail from the list again. Good, and thanks for the 
infos re list down.

Wolfgang


Japanese kunten on Lyx?

2010-08-28 Thread Clemente Beghi
Hello,

I have been using Lyx for some time and I really like it.
Mainly I have been using it on Debian/Ubuntu and Windows OSs, on top
of TexLive, in particular XeTex.
I am not so familiar with the Latex code,  so I would insert commands
by hand only for the fine tuning. I use XeTex because it easily allows
me to use whatever font I need without complications, more
specifically the Hiragino.otf (ヒラギノ.otf) used for printing quality
Japanese characters and Times Extended Roman.ttf that I use for its
many diacritical marks .

Recently I would like to put in my files longer sections of ancient
Japanese documents, that have some peculiarities:
vertical text (縦書き), reading marks (訓点, appearing as small characters
either on the left or the right) and interlinear commentaries (割注
namely two thin vertical lines in the space of about one).
How can remain faithful to the original documents and put in my Lyx
file these things so that they properly appear also in the final pdf
document?
Thank you for your help.
All the best,

Clemente


Re: problems with section spacing and getting unstarred sections into toc

2010-08-28 Thread Jürgen Spitzmüller
Bok Young Hoon wrote:
 2. does anyone know how I can get unstarred sections to appear in the table
 of contents?

http://wiki.lyx.org/FAQ/Numbering#unnumbered-toc-sections

Jürgen


Re: Bibliography.lyx auf deutsch nutzen

2010-08-28 Thread Sebastian Rockel
In general for a german language document you should change

 \language english

and

 \quotes_language english

to german (in Lyx [german] try: Dokument - Einstellungen.. - Sprache - 
...).

Sebastian



Am 28.08.2010 um 10:06 schrieb Stephan Schuster:

 Hallo,
 
 eine Frage zu Lyx ist aufgetaucht.
 
 Ich verwende nun Papers um meine PDFs zu verwalten, habe die Papers Library 
 nach BibDesk exportiert und nutze nun BibDesk um zu zitieren.
 Allerdings erscheint mein Literaturverzeichnis nun auf englisch. Sieht dann 
 so aus:
 
 http://img685.imageshack.us/img685/2638/csisd.jpg
 
 Was muss ich ändern?
 
 
 Code:
 
 #LyX 1.6.2 created this file. For more info see http://www.lyx.org/
 \lyxformat 345
 \begin_document
 \begin_header
 \textclass scrreprt
 \begin_preamble
 \usepackage{preamble}
 \end_preamble
 \options twoside,openright,titlepage,fleqn,pointlessnumbers 
 ,headinclude,10pt,a4paper,BCOR5mm,footinclude,clea rdoubleempty
 \use_default_options false
 \language english
 \inputencoding auto
 \font_roman default
 \font_sans default
 \font_typewriter default
 \font_default_family default
 \font_sc false
 \font_osf false
 \font_sf_scale 100
 \font_tt_scale 100
 
 \graphics default
 \paperfontsize 10
 \spacing single
 \use_hyperref false
 \papersize a4paper
 \use_geometry false
 \use_amsmath 1
 \use_esint 0
 \cite_engine natbib_numerical
 \use_bibtopic false
 \paperorientation portrait
 \secnumdepth 3
 \tocdepth 3
 \paragraph_separation indent
 \defskip medskip
 \quotes_language english
 \papercolumns 1
 \papersides 2
 \paperpagestyle default
 \tracking_changes false
 \output_changes false
 \author  
 \end_header
 
 \begin_body
 
 \begin_layout Standard
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 % work-around to have small caps also here in the headline
 \end_layout
 
 \end_inset
 
 
 \end_layout
 
 \begin_layout Standard
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 
 \backslash
 manualmark
 \end_layout
 
 \end_inset
 
 
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 
 \backslash
 markboth{
 \backslash
 spacedlowsmallcaps{
 \backslash
 bibname}}{
 \backslash
 spacedlowsmallcaps{
 \backslash
 bibname}}
 \end_layout
 
 \end_inset
 
 
 \end_layout
 
 \begin_layout Standard
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 % work-around to have small caps also
 \end_layout
 
 \end_inset
 
 
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 
 \backslash
 refstepcounter{dummy}
 \end_layout
 
 \end_inset
 
 
 \end_layout
 
 \begin_layout Standard
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 
 \backslash
 addtocontents{toc}{
 \backslash
 protect
 \backslash
 vspace{
 \backslash
 beforebibskip}}
 \end_layout
 
 \end_inset
 
 
 \end_layout
 
 \begin_layout Standard
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 % to have the bib a bit from the rest in the toc
 \end_layout
 
 \end_inset
 
 
 \end_layout
 
 \begin_layout Standard
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 
 \backslash
 addcontentsline{toc}{chapter}{
 \backslash
 tocEntry{
 \backslash
 bibname}}
 \end_layout
 
 \end_inset
 
 
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 
 \backslash
 bibliographystyle{plainnat}
 \end_layout
 
 \end_inset
 
 
 \end_layout
 
 \begin_layout Standard
 \begin_inset CommandInset label
 LatexCommand label
 name app:bibliography
 
 \end_inset
 
 
 \begin_inset CommandInset bibtex
 LatexCommand bibtex
 bibfiles Bibliography
 options plainnat
 
 \end_inset
 
 
 \end_layout
 
 \end_body
 \end_document
 
 CODE



Re: how to add a caption to a Box inset?

2010-08-28 Thread Jürgen Spitzmüller
Justin Wood wrote:
 Hi all. I've had a look around but can't seem to find an answer to this
 one... I want to create a regular ole framed box (you know, as a
 self-contained area for 'aside' or 'extra info' type content), but I can't
 figure out how to give it a useful automatic identifier. As in, following
 the same naming format that Figure captions do: Box 1, or Box 1.1, etc, and
 have this displayed in the top part of the box somewhere.

You can define a new float in the layout file of you class or (preferably) in 
a new module. The syntax is

Float
Type  box
GuiName   Box
Placement tbp
Extension lob
NumberWithin  none
Style plaintop
ListName  List of Boxes
LaTeXBuiltin  false
End

Then put a box inside this float.

There's also a boxed style which puts the float in the box in the first 
place, but it looks different to what you want (caption outside and below 
box).

HTH,
Jürgen


Re: Japanese kunten on Lyx?

2010-08-28 Thread Koji Yokota
Clemente,

Using platex with document class 'tarticle' or 'tbook' will resolve
the problem for vertical writing. pLaTeX (LaTeX for Japanese) will be
included in forthcoming TeXLive 2010 and currently its preview version
is available from the webpage of TeXLive. It is usable with LyX (they
appear like article (Japanese, vertical writing)).

For kunten and katchu, probably you want to rely on using LaTeX macros
available on net by various users. For these, you need use TeX Codes
within LyX.

Koji

2010年8月25日16:29 Clemente Beghi c.be...@googlemail.com:
 Hello,

 I have been using Lyx for some time and I really like it.
 Mainly I have been using it on Debian/Ubuntu and Windows OSs, on top
 of TexLive, in particular XeTex.
 I am not so familiar with the Latex code,  so I would insert commands
 by hand only for the fine tuning. I use XeTex because it easily allows
 me to use whatever font I need without complications, more
 specifically the Hiragino.otf (ヒラギノ.otf) used for printing quality
 Japanese characters and Times Extended Roman.ttf that I use for its
 many diacritical marks .

 Recently I would like to put in my files longer sections of ancient
 Japanese documents, that have some peculiarities:
 vertical text (縦書き), reading marks (訓点, appearing as small characters
 either on the left or the right) and interlinear commentaries (割注
 namely two thin vertical lines in the space of about one).
 How can remain faithful to the original documents and put in my Lyx
 file these things so that they properly appear also in the final pdf
 document?
 Thank you for your help.
 All the best,

 Clemente



Re: several problems

2010-08-28 Thread Pavel Sanda
Wolfgang Engelmann wrote:
 I added yesterday a xfig created figure to my (koma-script) book and got a 
 crash in lyx. Error message is
 
 lyx QWidget::repaint: Recursive repaint detected
 lyx: SIGSEGV signal caught!
 Sorry, you have found a bug in LyX, hope you have not lost any data.
 Please read the bug-reporting instructions in 'Help-Introduction' and send 
 us 
 a bug report, if necessary. Thanks !
 Bye.  
 
 and if I start with 

the best would be if you are able to produce proper backtrace
( http://wiki.lyx.org/FAQ/FurtherHelp#toc4 ) or give a reproducible example.
in both cases file a bug in the tracker.

 The problem is, that I told lyx to start with the last document opened (just 
 for lazyness; was not a good idea in hindsight), therefore I am not able to 
 do anything with it.

vi ~/.lyx/preferences
there must line with last_document_opened true or something of that type.

pavel


Re: Bibliography.lyx auf deutsch nutzen

2010-08-28 Thread Jürgen Spitzmüller
Stephan Schuster wrote:
 eine Frage zu Lyx ist aufgetaucht.
 
 Ich verwende nun Papers um meine PDFs zu verwalten, habe die Papers Library
 nach BibDesk exportiert und nutze nun BibDesk um zu zitieren. Allerdings
 erscheint mein Literaturverzeichnis nun auf englisch. Sieht dann so aus:
 
 http://img685.imageshack.us/img685/2638/csisd.jpg
 
 Was muss ich ändern?

Use a German bibtex style (bst file) instead of plainnat.

Look here for details:
http://projekte.dante.de/DanteFAQ/LiteraturVerzeichnis#36

Jürgen


Re: positioning tables inside float

2010-08-28 Thread Jürgen Spitzmüller
Graham Smith wrote:
 I am trying to align a table inside a float, so it sits in the centre of 
 the page. I can't see any obvious way of doing this.

Edit  Paragraph Settings  Alignment  Center

 I thought using the 
 center paragraphs might have worked but its greyed out. But that is how 
 I thought I had done it in the past

Are you sure the cursor is _outside_ the table?

Jürgen


Re: positioning tables inside float

2010-08-28 Thread Graham Smith

Jurgen,


Are you sure the cursor is _outside_ the table?


Nope, I'm sure the cursor is _inside_ the table :-(

That would explain why it worked before, but didn't work this time.

Working fine now, many thanks.

Graham






Re: several problems

2010-08-28 Thread Wolfgang Engelmann
Am Saturday 28 August 2010 12:35:59 schrieb Pavel Sanda:
 Wolfgang Engelmann wrote:
  I added yesterday a xfig created figure to my (koma-script) book and got
  a crash in lyx. Error message is
 
  lyx QWidget::repaint: Recursive repaint detected
  lyx: SIGSEGV signal caught!
  Sorry, you have found a bug in LyX, hope you have not lost any data.
  Please read the bug-reporting instructions in 'Help-Introduction' and
  send us a bug report, if necessary. Thanks !
  Bye.
 
  and if I start with

 the best would be if you are able to produce proper backtrace
 ( http://wiki.lyx.org/FAQ/FurtherHelp#toc4 ) or give a reproducible
 example. in both cases file a bug in the tracker.

  The problem is, that I told lyx to start with the last document opened
  (just for lazyness; was not a good idea in hindsight), therefore I am not
  able to do anything with it.

 vi ~/.lyx/preferences
 there must line with last_document_opened true or something of that type.

 pavel

Thanks. I solved it by using an older document, where the setting did not open 
the document at the start of lyx and imported the offending newer docu. The 
error occurred while working on a xfig figure. I will keep my eyes open if 
this happens again and record the error log file. 

Wolfgang


Re: test

2010-08-28 Thread Paul Rubin
Wolfgang Engelmann engelmann at uni-tuebingen.de writes:

 
 sorry, just a test, since I am not receiving mail from the list anymore
 

The list server was down for several days, and has apparently been resurrected.

/Paul





Re: internal references: redefined enumerators

2010-08-28 Thread Paul Rubin
Jannick Asmus jannick.news at gmail.com writes:

 using the re-definition
 
 \renewcommand{\labelenumi}{(\roman{enumi}.)}
 
 in the preamble of my doc (class article koma-script) internal 
 references are not displayed as, e.g., (ii.), but as 2. Can this be 
 amended to have proper internal references?

Answered a few times when the list server was down (despite Einstein's
admonition about repeating the same action and expecting a different outcome)
and eventually by direct mail.  For the sake of posterity, add to the preamble:

\renewcommand{\theenumi}{(\roman{enumi})}

/Paul





Re: Lyxcode too deeply nested

2010-08-28 Thread Paul Rubin
chrima.hercou chrima.hercou at laposte.net writes:
LaTeX (not LyX) limits nesting to four levels for lists, and probably for other
nestable environments as well.

If you are using nesting just to vary indentation level of code lines, I suggest
you abandom the LyXCode environment and switch to the much more flexible
listings environment (Insert  Program Listing), which is documented in section
7 of Help  Embedded Objects.  Among other things, you can use tabs to indent a
program listing.

/Paul



Re: latex source with line breaks

2010-08-28 Thread Paul Rubin
Jannick Asmus jannick.news at gmail.com writes:

 
 copying the latex text from the source window provides the text, but
 with a lot of line breaks. I suspect to make the view in the source
 window more readable.
 
 But how can I get rid of the line breaks when the text goes into another
 editor?
 

Depends on the editor.  If the editor understands control characters (such as
gedit or SciTE, for instance), you can search for all instances of \n\n and
replace them with \n.  (In SciTE, you have to enable the Transform backslash
expressions option and disable regular expressions.)  You may need to repeat
the search-and-replace operation to eliminate triple and quadruple newlines, if
present.  If the editor allows regular expressions containing newlines (SciTE
apparently does not), you can use a regular expression to eliminate all empty
lines in one gulp.

/Paul




Noweb Sweave question: Need help to copy folder from lyx temp back to current document directory.

2010-08-28 Thread Paul Johnson
gmail just sent me a message that this post was not sent through on
Wednesday because it could not contact lyx-users. So I'm trying again.
Sorry if it is a repost.

In Sweave, we process a noweb document first through R to generate the
tex file, and then the usual processing occurs.

Because not all LyX/LaTeX systems have the noweb setup, it is
necessary for me to develop my document with Sweave/Lyx, and then save
the generated files (in a folder plots) and use them in the final
document without invoking Sweave.  I do this with LyX branches. I have
a branch for the Sweave commands that generates the files in plots,
and then I have \includegraphics{} or \input{} as needed.

It mostly works fine, there is just a wrinkle that bothers me. So far,
I have just used brute force to copy the whole plots folder from the
working directory back to the document root with a command inside the
document itself.

copyover, fig=F, echo=T, include=T=
system(rsync -ra plots /home/pauljohn/ps/ps707/Workbook/Workbook-plot)
@

That is OK, except I have to hardcode the document directory.  And
no matter what I do, it seems like I have to process the document
through latex twice. The first time I run the process in LyX, it runs
the document through R Sweave and it makes the plots, but when the
pdflatex run happens,


LaTeX Error: Cannot determine size of grpahic in plots/plot-gss.pdf

After that, I check the plots folder in the document directory and the
files are copied over.  But they are not there fast enough to make
pdflatex happy? Really?

I was thinking there must be some work around in LyX config.  It the
LyX documents, I find info on converters and copiers and  $$p or  $$r.

The converter in .lyx/preferences, I have converters like so:

#
# CONVERTERS SECTION ##
#

\converter literate latex R CMD Sweave $$i 
\converter literate pdflatex R CMD Sweave $$i 
\converter literate r R CMD Stangle $$i 
##

Put the copy on the end of the converter:

\converter literate pdflatex R CMD Sweave $$i  cp -R plots $$r 

I believe it SHOULD work. The plot folder DOES get copied over.
However,  still not fast enough. I still see LaTeX errors:

LaTeX Error: Cannot determine size of graphic in plots/plot-gss.pdf

If I run everything through again, then the document goes get created.

But this is bad because the whole project has to be run through the R
Sweave process two times.

What do you think?

If you tell me how to fix this, I will feel happy.  In return, I will
show you the LyX file that uses Frank Harrell's Sweavel.sty (Sweave
using the listings class), which is nicer looking:

http://pj.freefaculty.org/latex/sweavel-01.pdf

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Error: lyx binary not found

2010-08-28 Thread James Mahon
Hello,

I'm on a Windows 7 platform and I'm using LyX 1.6.7. I'm attempting to run
the command line below:

*lyx -e pdf base.lyx
*
But, I receive the error:

*Error: LyX binary not found

Unable to determine the path to the LyX binary from the command line lyx
*
I don't understand this error, because the I've added the path to my windows
environment variable and the command line recognizes lyx. Any suggestions?

Thanks.


positioning tables inside float

2010-08-28 Thread Graham Smith
I am trying to align a table inside a float, so it sits in the centre of 
the page. I can't see any obvious way of doing this. I thought using the 
center paragraphs might have worked but its greyed out. But that is how 
I thought I had done it in the past


I am using lyx 1.6.5 on Ubuntu 10.04 and lyx 1.6.7 on a Mac running Tiger.

Thanks,

Graham



Re: several problems

2010-08-28 Thread Wolfgang Engelmann
Am Saturday 28 August 2010 01:15:24 schrieb Sandro Portmann:

Since today I am receiving mail from the list again. Good, and thanks for the 
infos re list down.

Wolfgang


Japanese kunten on Lyx?

2010-08-28 Thread Clemente Beghi
Hello,

I have been using Lyx for some time and I really like it.
Mainly I have been using it on Debian/Ubuntu and Windows OSs, on top
of TexLive, in particular XeTex.
I am not so familiar with the Latex code,  so I would insert commands
by hand only for the fine tuning. I use XeTex because it easily allows
me to use whatever font I need without complications, more
specifically the Hiragino.otf (ヒラギノ.otf) used for printing quality
Japanese characters and Times Extended Roman.ttf that I use for its
many diacritical marks .

Recently I would like to put in my files longer sections of ancient
Japanese documents, that have some peculiarities:
vertical text (縦書き), reading marks (訓点, appearing as small characters
either on the left or the right) and interlinear commentaries (割注
namely two thin vertical lines in the space of about one).
How can remain faithful to the original documents and put in my Lyx
file these things so that they properly appear also in the final pdf
document?
Thank you for your help.
All the best,

Clemente


Re: problems with section spacing and getting unstarred sections into toc

2010-08-28 Thread Jürgen Spitzmüller
Bok Young Hoon wrote:
 2. does anyone know how I can get unstarred sections to appear in the table
 of contents?

http://wiki.lyx.org/FAQ/Numbering#unnumbered-toc-sections

Jürgen


Re: Bibliography.lyx auf deutsch nutzen

2010-08-28 Thread Sebastian Rockel
In general for a german language document you should change

 \language english

and

 \quotes_language english

to german (in Lyx [german] try: Dokument - Einstellungen.. - Sprache - 
...).

Sebastian



Am 28.08.2010 um 10:06 schrieb Stephan Schuster:

 Hallo,
 
 eine Frage zu Lyx ist aufgetaucht.
 
 Ich verwende nun Papers um meine PDFs zu verwalten, habe die Papers Library 
 nach BibDesk exportiert und nutze nun BibDesk um zu zitieren.
 Allerdings erscheint mein Literaturverzeichnis nun auf englisch. Sieht dann 
 so aus:
 
 http://img685.imageshack.us/img685/2638/csisd.jpg
 
 Was muss ich ändern?
 
 
 Code:
 
 #LyX 1.6.2 created this file. For more info see http://www.lyx.org/
 \lyxformat 345
 \begin_document
 \begin_header
 \textclass scrreprt
 \begin_preamble
 \usepackage{preamble}
 \end_preamble
 \options twoside,openright,titlepage,fleqn,pointlessnumbers 
 ,headinclude,10pt,a4paper,BCOR5mm,footinclude,clea rdoubleempty
 \use_default_options false
 \language english
 \inputencoding auto
 \font_roman default
 \font_sans default
 \font_typewriter default
 \font_default_family default
 \font_sc false
 \font_osf false
 \font_sf_scale 100
 \font_tt_scale 100
 
 \graphics default
 \paperfontsize 10
 \spacing single
 \use_hyperref false
 \papersize a4paper
 \use_geometry false
 \use_amsmath 1
 \use_esint 0
 \cite_engine natbib_numerical
 \use_bibtopic false
 \paperorientation portrait
 \secnumdepth 3
 \tocdepth 3
 \paragraph_separation indent
 \defskip medskip
 \quotes_language english
 \papercolumns 1
 \papersides 2
 \paperpagestyle default
 \tracking_changes false
 \output_changes false
 \author  
 \end_header
 
 \begin_body
 
 \begin_layout Standard
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 % work-around to have small caps also here in the headline
 \end_layout
 
 \end_inset
 
 
 \end_layout
 
 \begin_layout Standard
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 
 \backslash
 manualmark
 \end_layout
 
 \end_inset
 
 
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 
 \backslash
 markboth{
 \backslash
 spacedlowsmallcaps{
 \backslash
 bibname}}{
 \backslash
 spacedlowsmallcaps{
 \backslash
 bibname}}
 \end_layout
 
 \end_inset
 
 
 \end_layout
 
 \begin_layout Standard
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 % work-around to have small caps also
 \end_layout
 
 \end_inset
 
 
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 
 \backslash
 refstepcounter{dummy}
 \end_layout
 
 \end_inset
 
 
 \end_layout
 
 \begin_layout Standard
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 
 \backslash
 addtocontents{toc}{
 \backslash
 protect
 \backslash
 vspace{
 \backslash
 beforebibskip}}
 \end_layout
 
 \end_inset
 
 
 \end_layout
 
 \begin_layout Standard
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 % to have the bib a bit from the rest in the toc
 \end_layout
 
 \end_inset
 
 
 \end_layout
 
 \begin_layout Standard
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 
 \backslash
 addcontentsline{toc}{chapter}{
 \backslash
 tocEntry{
 \backslash
 bibname}}
 \end_layout
 
 \end_inset
 
 
 \begin_inset ERT
 status open
 
 \begin_layout Plain Layout
 
 
 \backslash
 bibliographystyle{plainnat}
 \end_layout
 
 \end_inset
 
 
 \end_layout
 
 \begin_layout Standard
 \begin_inset CommandInset label
 LatexCommand label
 name app:bibliography
 
 \end_inset
 
 
 \begin_inset CommandInset bibtex
 LatexCommand bibtex
 bibfiles Bibliography
 options plainnat
 
 \end_inset
 
 
 \end_layout
 
 \end_body
 \end_document
 
 CODE



Re: how to add a caption to a Box inset?

2010-08-28 Thread Jürgen Spitzmüller
Justin Wood wrote:
 Hi all. I've had a look around but can't seem to find an answer to this
 one... I want to create a regular ole framed box (you know, as a
 self-contained area for 'aside' or 'extra info' type content), but I can't
 figure out how to give it a useful automatic identifier. As in, following
 the same naming format that Figure captions do: Box 1, or Box 1.1, etc, and
 have this displayed in the top part of the box somewhere.

You can define a new float in the layout file of you class or (preferably) in 
a new module. The syntax is

Float
Type  box
GuiName   Box
Placement tbp
Extension lob
NumberWithin  none
Style plaintop
ListName  List of Boxes
LaTeXBuiltin  false
End

Then put a box inside this float.

There's also a boxed style which puts the float in the box in the first 
place, but it looks different to what you want (caption outside and below 
box).

HTH,
Jürgen


Re: Japanese kunten on Lyx?

2010-08-28 Thread Koji Yokota
Clemente,

Using platex with document class 'tarticle' or 'tbook' will resolve
the problem for vertical writing. pLaTeX (LaTeX for Japanese) will be
included in forthcoming TeXLive 2010 and currently its preview version
is available from the webpage of TeXLive. It is usable with LyX (they
appear like article (Japanese, vertical writing)).

For kunten and katchu, probably you want to rely on using LaTeX macros
available on net by various users. For these, you need use TeX Codes
within LyX.

Koji

2010年8月25日16:29 Clemente Beghi c.be...@googlemail.com:
 Hello,

 I have been using Lyx for some time and I really like it.
 Mainly I have been using it on Debian/Ubuntu and Windows OSs, on top
 of TexLive, in particular XeTex.
 I am not so familiar with the Latex code,  so I would insert commands
 by hand only for the fine tuning. I use XeTex because it easily allows
 me to use whatever font I need without complications, more
 specifically the Hiragino.otf (ヒラギノ.otf) used for printing quality
 Japanese characters and Times Extended Roman.ttf that I use for its
 many diacritical marks .

 Recently I would like to put in my files longer sections of ancient
 Japanese documents, that have some peculiarities:
 vertical text (縦書き), reading marks (訓点, appearing as small characters
 either on the left or the right) and interlinear commentaries (割注
 namely two thin vertical lines in the space of about one).
 How can remain faithful to the original documents and put in my Lyx
 file these things so that they properly appear also in the final pdf
 document?
 Thank you for your help.
 All the best,

 Clemente



Re: several problems

2010-08-28 Thread Pavel Sanda
Wolfgang Engelmann wrote:
 I added yesterday a xfig created figure to my (koma-script) book and got a 
 crash in lyx. Error message is
 
 lyx QWidget::repaint: Recursive repaint detected
 lyx: SIGSEGV signal caught!
 Sorry, you have found a bug in LyX, hope you have not lost any data.
 Please read the bug-reporting instructions in 'Help-Introduction' and send 
 us 
 a bug report, if necessary. Thanks !
 Bye.  
 
 and if I start with 

the best would be if you are able to produce proper backtrace
( http://wiki.lyx.org/FAQ/FurtherHelp#toc4 ) or give a reproducible example.
in both cases file a bug in the tracker.

 The problem is, that I told lyx to start with the last document opened (just 
 for lazyness; was not a good idea in hindsight), therefore I am not able to 
 do anything with it.

vi ~/.lyx/preferences
there must line with last_document_opened true or something of that type.

pavel


Re: Bibliography.lyx auf deutsch nutzen

2010-08-28 Thread Jürgen Spitzmüller
Stephan Schuster wrote:
 eine Frage zu Lyx ist aufgetaucht.
 
 Ich verwende nun Papers um meine PDFs zu verwalten, habe die Papers Library
 nach BibDesk exportiert und nutze nun BibDesk um zu zitieren. Allerdings
 erscheint mein Literaturverzeichnis nun auf englisch. Sieht dann so aus:
 
 http://img685.imageshack.us/img685/2638/csisd.jpg
 
 Was muss ich ändern?

Use a German bibtex style (bst file) instead of plainnat.

Look here for details:
http://projekte.dante.de/DanteFAQ/LiteraturVerzeichnis#36

Jürgen


Re: positioning tables inside float

2010-08-28 Thread Jürgen Spitzmüller
Graham Smith wrote:
 I am trying to align a table inside a float, so it sits in the centre of 
 the page. I can't see any obvious way of doing this.

Edit  Paragraph Settings  Alignment  Center

 I thought using the 
 center paragraphs might have worked but its greyed out. But that is how 
 I thought I had done it in the past

Are you sure the cursor is _outside_ the table?

Jürgen


Re: positioning tables inside float

2010-08-28 Thread Graham Smith

Jurgen,


Are you sure the cursor is _outside_ the table?


Nope, I'm sure the cursor is _inside_ the table :-(

That would explain why it worked before, but didn't work this time.

Working fine now, many thanks.

Graham






Re: several problems

2010-08-28 Thread Wolfgang Engelmann
Am Saturday 28 August 2010 12:35:59 schrieb Pavel Sanda:
 Wolfgang Engelmann wrote:
  I added yesterday a xfig created figure to my (koma-script) book and got
  a crash in lyx. Error message is
 
  lyx QWidget::repaint: Recursive repaint detected
  lyx: SIGSEGV signal caught!
  Sorry, you have found a bug in LyX, hope you have not lost any data.
  Please read the bug-reporting instructions in 'Help-Introduction' and
  send us a bug report, if necessary. Thanks !
  Bye.
 
  and if I start with

 the best would be if you are able to produce proper backtrace
 ( http://wiki.lyx.org/FAQ/FurtherHelp#toc4 ) or give a reproducible
 example. in both cases file a bug in the tracker.

  The problem is, that I told lyx to start with the last document opened
  (just for lazyness; was not a good idea in hindsight), therefore I am not
  able to do anything with it.

 vi ~/.lyx/preferences
 there must line with last_document_opened true or something of that type.

 pavel

Thanks. I solved it by using an older document, where the setting did not open 
the document at the start of lyx and imported the offending newer docu. The 
error occurred while working on a xfig figure. I will keep my eyes open if 
this happens again and record the error log file. 

Wolfgang


Re: test

2010-08-28 Thread Paul Rubin
Wolfgang Engelmann engelmann at uni-tuebingen.de writes:

 
 sorry, just a test, since I am not receiving mail from the list anymore
 

The list server was down for several days, and has apparently been resurrected.

/Paul





Re: internal references: redefined enumerators

2010-08-28 Thread Paul Rubin
Jannick Asmus jannick.news at gmail.com writes:

 using the re-definition
 
 \renewcommand{\labelenumi}{(\roman{enumi}.)}
 
 in the preamble of my doc (class article koma-script) internal 
 references are not displayed as, e.g., (ii.), but as 2. Can this be 
 amended to have proper internal references?

Answered a few times when the list server was down (despite Einstein's
admonition about repeating the same action and expecting a different outcome)
and eventually by direct mail.  For the sake of posterity, add to the preamble:

\renewcommand{\theenumi}{(\roman{enumi})}

/Paul





Re: Lyxcode too deeply nested

2010-08-28 Thread Paul Rubin
chrima.hercou chrima.hercou at laposte.net writes:
LaTeX (not LyX) limits nesting to four levels for lists, and probably for other
nestable environments as well.

If you are using nesting just to vary indentation level of code lines, I suggest
you abandom the LyXCode environment and switch to the much more flexible
listings environment (Insert  Program Listing), which is documented in section
7 of Help  Embedded Objects.  Among other things, you can use tabs to indent a
program listing.

/Paul



Re: latex source with line breaks

2010-08-28 Thread Paul Rubin
Jannick Asmus jannick.news at gmail.com writes:

 
 copying the latex text from the source window provides the text, but
 with a lot of line breaks. I suspect to make the view in the source
 window more readable.
 
 But how can I get rid of the line breaks when the text goes into another
 editor?
 

Depends on the editor.  If the editor understands control characters (such as
gedit or SciTE, for instance), you can search for all instances of \n\n and
replace them with \n.  (In SciTE, you have to enable the Transform backslash
expressions option and disable regular expressions.)  You may need to repeat
the search-and-replace operation to eliminate triple and quadruple newlines, if
present.  If the editor allows regular expressions containing newlines (SciTE
apparently does not), you can use a regular expression to eliminate all empty
lines in one gulp.

/Paul




Noweb Sweave question: Need help to copy folder from lyx temp back to current document directory.

2010-08-28 Thread Paul Johnson
gmail just sent me a message that this post was not sent through on
Wednesday because it could not contact lyx-users. So I'm trying again.
Sorry if it is a repost.

In Sweave, we process a noweb document first through R to generate the
tex file, and then the usual processing occurs.

Because not all LyX/LaTeX systems have the noweb setup, it is
necessary for me to develop my document with Sweave/Lyx, and then save
the generated files (in a folder plots) and use them in the final
document without invoking Sweave.  I do this with LyX branches. I have
a branch for the Sweave commands that generates the files in plots,
and then I have \includegraphics{} or \input{} as needed.

It mostly works fine, there is just a wrinkle that bothers me. So far,
I have just used brute force to copy the whole plots folder from the
working directory back to the document root with a command inside the
document itself.

copyover, fig=F, echo=T, include=T=
system(rsync -ra plots /home/pauljohn/ps/ps707/Workbook/Workbook-plot)
@

That is OK, except I have to hardcode the document directory.  And
no matter what I do, it seems like I have to process the document
through latex twice. The first time I run the process in LyX, it runs
the document through R Sweave and it makes the plots, but when the
pdflatex run happens,


LaTeX Error: Cannot determine size of grpahic in plots/plot-gss.pdf

After that, I check the plots folder in the document directory and the
files are copied over.  But they are not there fast enough to make
pdflatex happy? Really?

I was thinking there must be some work around in LyX config.  It the
LyX documents, I find info on converters and copiers and  $$p or  $$r.

The converter in .lyx/preferences, I have converters like so:

#
# CONVERTERS SECTION ##
#

\converter literate latex R CMD Sweave $$i 
\converter literate pdflatex R CMD Sweave $$i 
\converter literate r R CMD Stangle $$i 
##

Put the copy on the end of the converter:

\converter literate pdflatex R CMD Sweave $$i  cp -R plots $$r 

I believe it SHOULD work. The plot folder DOES get copied over.
However,  still not fast enough. I still see LaTeX errors:

LaTeX Error: Cannot determine size of graphic in plots/plot-gss.pdf

If I run everything through again, then the document goes get created.

But this is bad because the whole project has to be run through the R
Sweave process two times.

What do you think?

If you tell me how to fix this, I will feel happy.  In return, I will
show you the LyX file that uses Frank Harrell's Sweavel.sty (Sweave
using the listings class), which is nicer looking:

http://pj.freefaculty.org/latex/sweavel-01.pdf

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Error: lyx binary not found

2010-08-28 Thread James Mahon
Hello,

I'm on a Windows 7 platform and I'm using LyX 1.6.7. I'm attempting to run
the command line below:

*lyx -e pdf base.lyx
*
But, I receive the error:

*Error: LyX binary not found

Unable to determine the path to the LyX binary from the command line lyx
*
I don't understand this error, because the I've added the path to my windows
environment variable and the command line recognizes lyx. Any suggestions?

Thanks.


positioning tables inside float

2010-08-28 Thread Graham Smith
I am trying to align a table inside a float, so it sits in the centre of 
the page. I can't see any obvious way of doing this. I thought using the 
center paragraphs might have worked but its greyed out. But that is how 
I thought I had done it in the past


I am using lyx 1.6.5 on Ubuntu 10.04 and lyx 1.6.7 on a Mac running Tiger.

Thanks,

Graham



Re: several problems

2010-08-28 Thread Wolfgang Engelmann
Am Saturday 28 August 2010 01:15:24 schrieb Sandro Portmann:

Since today I am receiving mail from the list again. Good, and thanks for the 
infos re list down.

Wolfgang


Japanese kunten on Lyx?

2010-08-28 Thread Clemente Beghi
Hello,

I have been using Lyx for some time and I really like it.
Mainly I have been using it on Debian/Ubuntu and Windows OSs, on top
of TexLive, in particular XeTex.
I am not so familiar with the Latex code,  so I would insert commands
by hand only for the fine tuning. I use XeTex because it easily allows
me to use whatever font I need without complications, more
specifically the Hiragino.otf (ヒラギノ.otf) used for printing quality
Japanese characters and Times Extended Roman.ttf that I use for its
many diacritical marks .

Recently I would like to put in my files longer sections of ancient
Japanese documents, that have some peculiarities:
vertical text (縦書き), reading marks (訓点, appearing as small characters
either on the left or the right) and interlinear commentaries (割注
namely two thin vertical lines in the space of about one).
How can remain faithful to the original documents and put in my Lyx
file these things so that they properly appear also in the final pdf
document?
Thank you for your help.
All the best,

Clemente


Re: problems with section spacing and getting unstarred sections into toc

2010-08-28 Thread Jürgen Spitzmüller
Bok Young Hoon wrote:
> 2. does anyone know how I can get unstarred sections to appear in the table
> of contents?

http://wiki.lyx.org/FAQ/Numbering#unnumbered-toc-sections

Jürgen


Re: Bibliography.lyx auf deutsch nutzen

2010-08-28 Thread Sebastian Rockel
In general for a german language document you should change

> \language english

and

> \quotes_language english

to "german" (in Lyx [german] try: Dokument -> Einstellungen.. -> Sprache -> 
...).

Sebastian



Am 28.08.2010 um 10:06 schrieb Stephan Schuster:

> Hallo,
> 
> eine Frage zu Lyx ist aufgetaucht.
> 
> Ich verwende nun Papers um meine PDFs zu verwalten, habe die Papers Library 
> nach BibDesk exportiert und nutze nun BibDesk um zu zitieren.
> Allerdings erscheint mein Literaturverzeichnis nun auf englisch. Sieht dann 
> so aus:
> 
> http://img685.imageshack.us/img685/2638/csisd.jpg
> 
> Was muss ich ändern?
> 
> 
> Code:
> 
> #LyX 1.6.2 created this file. For more info see http://www.lyx.org/
> \lyxformat 345
> \begin_document
> \begin_header
> \textclass scrreprt
> \begin_preamble
> \usepackage{preamble}
> \end_preamble
> \options twoside,openright,titlepage,fleqn,pointlessnumbers 
> ,headinclude,10pt,a4paper,BCOR5mm,footinclude,clea rdoubleempty
> \use_default_options false
> \language english
> \inputencoding auto
> \font_roman default
> \font_sans default
> \font_typewriter default
> \font_default_family default
> \font_sc false
> \font_osf false
> \font_sf_scale 100
> \font_tt_scale 100
> 
> \graphics default
> \paperfontsize 10
> \spacing single
> \use_hyperref false
> \papersize a4paper
> \use_geometry false
> \use_amsmath 1
> \use_esint 0
> \cite_engine natbib_numerical
> \use_bibtopic false
> \paperorientation portrait
> \secnumdepth 3
> \tocdepth 3
> \paragraph_separation indent
> \defskip medskip
> \quotes_language english
> \papercolumns 1
> \papersides 2
> \paperpagestyle default
> \tracking_changes false
> \output_changes false
> \author "" 
> \end_header
> 
> \begin_body
> 
> \begin_layout Standard
> \begin_inset ERT
> status open
> 
> \begin_layout Plain Layout
> 
> % work-around to have small caps also here in the headline
> \end_layout
> 
> \end_inset
> 
> 
> \end_layout
> 
> \begin_layout Standard
> \begin_inset ERT
> status open
> 
> \begin_layout Plain Layout
> 
> 
> \backslash
> manualmark
> \end_layout
> 
> \end_inset
> 
> 
> \begin_inset ERT
> status open
> 
> \begin_layout Plain Layout
> 
> 
> \backslash
> markboth{
> \backslash
> spacedlowsmallcaps{
> \backslash
> bibname}}{
> \backslash
> spacedlowsmallcaps{
> \backslash
> bibname}}
> \end_layout
> 
> \end_inset
> 
> 
> \end_layout
> 
> \begin_layout Standard
> \begin_inset ERT
> status open
> 
> \begin_layout Plain Layout
> 
> % work-around to have small caps also
> \end_layout
> 
> \end_inset
> 
> 
> \begin_inset ERT
> status open
> 
> \begin_layout Plain Layout
> 
> 
> \backslash
> refstepcounter{dummy}
> \end_layout
> 
> \end_inset
> 
> 
> \end_layout
> 
> \begin_layout Standard
> \begin_inset ERT
> status open
> 
> \begin_layout Plain Layout
> 
> 
> \backslash
> addtocontents{toc}{
> \backslash
> protect
> \backslash
> vspace{
> \backslash
> beforebibskip}}
> \end_layout
> 
> \end_inset
> 
> 
> \end_layout
> 
> \begin_layout Standard
> \begin_inset ERT
> status open
> 
> \begin_layout Plain Layout
> 
> % to have the bib a bit from the rest in the toc
> \end_layout
> 
> \end_inset
> 
> 
> \end_layout
> 
> \begin_layout Standard
> \begin_inset ERT
> status open
> 
> \begin_layout Plain Layout
> 
> 
> \backslash
> addcontentsline{toc}{chapter}{
> \backslash
> tocEntry{
> \backslash
> bibname}}
> \end_layout
> 
> \end_inset
> 
> 
> \begin_inset ERT
> status open
> 
> \begin_layout Plain Layout
> 
> 
> \backslash
> bibliographystyle{plainnat}
> \end_layout
> 
> \end_inset
> 
> 
> \end_layout
> 
> \begin_layout Standard
> \begin_inset CommandInset label
> LatexCommand label
> name "app:bibliography"
> 
> \end_inset
> 
> 
> \begin_inset CommandInset bibtex
> LatexCommand bibtex
> bibfiles "Bibliography"
> options "plainnat"
> 
> \end_inset
> 
> 
> \end_layout
> 
> \end_body
> \end_document
> 
> CODE



Re: how to add a caption to a Box inset?

2010-08-28 Thread Jürgen Spitzmüller
Justin Wood wrote:
> Hi all. I've had a look around but can't seem to find an answer to this
> one... I want to create a regular ole framed box (you know, as a
> self-contained area for 'aside' or 'extra info' type content), but I can't
> figure out how to give it a useful automatic identifier. As in, following
> the same naming format that Figure captions do: Box 1, or Box 1.1, etc, and
> have this displayed in the top part of the box somewhere.

You can define a new float in the layout file of you class or (preferably) in 
a new module. The syntax is

Float
Type  box
GuiName   Box
Placement tbp
Extension lob
NumberWithin  none
Style plaintop
ListName  "List of Boxes"
LaTeXBuiltin  false
End

Then put a box inside this float.

There's also a "boxed" style which puts the float in the box in the first 
place, but it looks different to what you want (caption outside and below 
box).

HTH,
Jürgen


Re: Japanese kunten on Lyx?

2010-08-28 Thread Koji Yokota
Clemente,

Using platex with document class 'tarticle' or 'tbook' will resolve
the problem for vertical writing. pLaTeX (LaTeX for Japanese) will be
included in forthcoming TeXLive 2010 and currently its preview version
is available from the webpage of TeXLive. It is usable with LyX (they
appear like "article (Japanese, vertical writing)").

For kunten and katchu, probably you want to rely on using LaTeX macros
available on net by various users. For these, you need use TeX Codes
within LyX.

Koji

2010年8月25日16:29 Clemente Beghi :
> Hello,
>
> I have been using Lyx for some time and I really like it.
> Mainly I have been using it on Debian/Ubuntu and Windows OSs, on top
> of TexLive, in particular XeTex.
> I am not so familiar with the Latex code,  so I would insert commands
> by hand only for the fine tuning. I use XeTex because it easily allows
> me to use whatever font I need without complications, more
> specifically the Hiragino.otf (ヒラギノ.otf) used for printing quality
> Japanese characters and Times Extended Roman.ttf that I use for its
> many diacritical marks .
>
> Recently I would like to put in my files longer sections of ancient
> Japanese documents, that have some peculiarities:
> vertical text (縦書き), reading marks (訓点, appearing as small characters
> either on the left or the right) and interlinear commentaries (割注
> namely two thin vertical lines in the space of about one).
> How can remain faithful to the original documents and put in my Lyx
> file these things so that they properly appear also in the final pdf
> document?
> Thank you for your help.
> All the best,
>
> Clemente
>


Re: several problems

2010-08-28 Thread Pavel Sanda
Wolfgang Engelmann wrote:
> I added yesterday a xfig created figure to my (koma-script) book and got a 
> crash in lyx. Error message is
> 
> lyx QWidget::repaint: Recursive repaint detected
> lyx: SIGSEGV signal caught!
> Sorry, you have found a bug in LyX, hope you have not lost any data.
> Please read the bug-reporting instructions in 'Help->Introduction' and send 
> us 
> a bug report, if necessary. Thanks !
> Bye.  
> 
> and if I start with 

the best would be if you are able to produce proper backtrace
( http://wiki.lyx.org/FAQ/FurtherHelp#toc4 ) or give a reproducible example.
in both cases file a bug in the tracker.

> The problem is, that I told lyx to start with the last document opened (just 
> for lazyness; was not a good idea in hindsight), therefore I am not able to 
> do anything with it.

vi ~/.lyx/preferences
there must line with "last_document_opened true" or something of that type.

pavel


Re: Bibliography.lyx auf deutsch nutzen

2010-08-28 Thread Jürgen Spitzmüller
Stephan Schuster wrote:
> eine Frage zu Lyx ist aufgetaucht.
> 
> Ich verwende nun Papers um meine PDFs zu verwalten, habe die Papers Library
> nach BibDesk exportiert und nutze nun BibDesk um zu zitieren. Allerdings
> erscheint mein Literaturverzeichnis nun auf englisch. Sieht dann so aus:
> 
> http://img685.imageshack.us/img685/2638/csisd.jpg
> 
> Was muss ich ändern?

Use a German bibtex style ("bst file") instead of plainnat.

Look here for details:
http://projekte.dante.de/DanteFAQ/LiteraturVerzeichnis#36

Jürgen


Re: positioning tables inside float

2010-08-28 Thread Jürgen Spitzmüller
Graham Smith wrote:
> I am trying to align a table inside a float, so it sits in the centre of 
> the page. I can't see any obvious way of doing this.

Edit > Paragraph Settings > Alignment > Center

> I thought using the 
> center paragraphs might have worked but its greyed out. But that is how 
> I thought I had done it in the past

Are you sure the cursor is _outside_ the table?

Jürgen


Re: positioning tables inside float

2010-08-28 Thread Graham Smith

Jurgen,


Are you sure the cursor is _outside_ the table?


Nope, I'm sure the cursor is _inside_ the table :-(

That would explain why it worked before, but didn't work this time.

Working fine now, many thanks.

Graham






Re: several problems

2010-08-28 Thread Wolfgang Engelmann
Am Saturday 28 August 2010 12:35:59 schrieb Pavel Sanda:
> Wolfgang Engelmann wrote:
> > I added yesterday a xfig created figure to my (koma-script) book and got
> > a crash in lyx. Error message is
> >
> > lyx QWidget::repaint: Recursive repaint detected
> > lyx: SIGSEGV signal caught!
> > Sorry, you have found a bug in LyX, hope you have not lost any data.
> > Please read the bug-reporting instructions in 'Help->Introduction' and
> > send us a bug report, if necessary. Thanks !
> > Bye.
> >
> > and if I start with
>
> the best would be if you are able to produce proper backtrace
> ( http://wiki.lyx.org/FAQ/FurtherHelp#toc4 ) or give a reproducible
> example. in both cases file a bug in the tracker.
>
> > The problem is, that I told lyx to start with the last document opened
> > (just for lazyness; was not a good idea in hindsight), therefore I am not
> > able to do anything with it.
>
> vi ~/.lyx/preferences
> there must line with "last_document_opened true" or something of that type.
>
> pavel

Thanks. I solved it by using an older document, where the setting did not open 
the document at the start of lyx and imported the offending newer docu. The 
error occurred while working on a xfig figure. I will keep my eyes open if 
this happens again and record the error log file. 

Wolfgang


Re: test

2010-08-28 Thread Paul Rubin
Wolfgang Engelmann  uni-tuebingen.de> writes:

> 
> sorry, just a test, since I am not receiving mail from the list anymore
> 

The list server was down for several days, and has apparently been resurrected.

/Paul





Re: internal references: redefined enumerators

2010-08-28 Thread Paul Rubin
Jannick Asmus  gmail.com> writes:

> using the re-definition
> 
> \renewcommand{\labelenumi}{(\roman{enumi}.)}
> 
> in the preamble of my doc (class article koma-script) internal 
> references are not displayed as, e.g., (ii.), but as 2. Can this be 
> amended to have proper internal references?

Answered a few times when the list server was down (despite Einstein's
admonition about repeating the same action and expecting a different outcome)
and eventually by direct mail.  For the sake of posterity, add to the preamble:

\renewcommand{\theenumi}{(\roman{enumi})}

/Paul





Re: Lyxcode too deeply nested

2010-08-28 Thread Paul Rubin
chrima.hercou  laposte.net> writes:
LaTeX (not LyX) limits nesting to four levels for lists, and probably for other
nestable environments as well.

If you are using nesting just to vary indentation level of code lines, I suggest
you abandom the LyXCode environment and switch to the much more flexible
listings environment (Insert > Program Listing), which is documented in section
7 of Help > Embedded Objects.  Among other things, you can use tabs to indent a
program listing.

/Paul



Re: latex source with line breaks

2010-08-28 Thread Paul Rubin
Jannick Asmus  gmail.com> writes:

> 
> copying the latex text from the source window provides the text, but
> with a lot of line breaks. I suspect to make the view in the source
> window more readable.
> 
> But how can I get rid of the line breaks when the text goes into another
> editor?
> 

Depends on the editor.  If the editor understands control characters (such as
gedit or SciTE, for instance), you can search for all instances of \n\n and
replace them with \n.  (In SciTE, you have to enable the "Transform backslash
expressions" option and disable regular expressions.)  You may need to repeat
the search-and-replace operation to eliminate triple and quadruple newlines, if
present.  If the editor allows regular expressions containing newlines (SciTE
apparently does not), you can use a regular expression to eliminate all empty
lines in one gulp.

/Paul




Noweb Sweave question: Need help to copy folder from lyx temp back to current document directory.

2010-08-28 Thread Paul Johnson
gmail just sent me a message that this post was not sent through on
Wednesday because it could not contact lyx-users. So I'm trying again.
Sorry if it is a repost.

In Sweave, we process a noweb document first through R to generate the
tex file, and then the usual processing occurs.

Because not all LyX/LaTeX systems have the noweb setup, it is
necessary for me to develop my document with Sweave/Lyx, and then save
the generated files (in a folder "plots") and use them in the final
document without invoking Sweave.  I do this with LyX branches. I have
a branch for the Sweave commands that generates the files in "plots",
and then I have \includegraphics{} or \input{} as needed.

It mostly works fine, there is just a wrinkle that bothers me. So far,
I have just used brute force to copy the whole "plots" folder from the
working directory back to the document root with a command inside the
document itself.

<>=
system("rsync -ra plots /home/pauljohn/ps/ps707/Workbook/Workbook-plot")
@

That is OK, except I have to "hardcode" the document directory.  And
no matter what I do, it seems like I have to process the document
through latex twice. The first time I run the process in LyX, it runs
the document through R Sweave and it makes the plots, but when the
pdflatex run happens,


LaTeX Error: Cannot determine size of grpahic in plots/plot-gss.pdf

After that, I check the plots folder in the document directory and the
files are copied over.  But they are not there "fast enough" to make
pdflatex happy? Really?

I was thinking there must be some work around in LyX config.  It the
LyX documents, I find info on converters and copiers and  $$p or  $$r.

The converter in .lyx/preferences, I have converters like so:

#
# CONVERTERS SECTION ##
#

\converter "literate" "latex" "R CMD Sweave $$i" ""
\converter "literate" "pdflatex" "R CMD Sweave $$i" ""
\converter "literate" "r" "R CMD Stangle $$i" ""
##

Put the copy on the end of the converter:

\converter "literate" "pdflatex" "R CMD Sweave $$i && cp -R plots $$r" ""

I believe it SHOULD work. The plot folder DOES get copied over.
However,  still not fast enough. I still see LaTeX errors:

LaTeX Error: Cannot determine size of graphic in plots/plot-gss.pdf

If I run everything through again, then the document goes get created.

But this is bad because the whole project has to be run through the R
Sweave process two times.

What do you think?

If you tell me how to fix this, I will feel happy.  In return, I will
show you the LyX file that uses Frank Harrell's Sweavel.sty (Sweave
using the listings class), which is nicer looking:

http://pj.freefaculty.org/latex/sweavel-01.pdf

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Error: lyx binary not found

2010-08-28 Thread James Mahon
Hello,

I'm on a Windows 7 platform and I'm using LyX 1.6.7. I'm attempting to run
the command line below:

*lyx -e pdf base.lyx
*
But, I receive the error:

*Error: LyX binary not found

Unable to determine the path to the LyX binary from the command line lyx
*
I don't understand this error, because the I've added the path to my windows
environment variable and the command line recognizes lyx. Any suggestions?

Thanks.