Configure fails

2009-05-15 Thread Dominik Waßenhoven
Dear LyX users,

if I try to re-configure LyX, it fails. The following is shown when I
start LyX with '-dbg lyxrc':

,--
¦ File .../configure.py, line 11, in module 
¦   import sys, os, re, shutil, glob
¦ ImportError: No module named os
`

The module os (os.py) is in 'C:\Programme\Python\Lib', and I put this
directory in the path prefix as well (additional to
'C:\Programme\Python' which was there already), but it did not work
either.

Any suggestions?

Regards,
Dominik.-



Re: Can language support be disabled?

2009-05-15 Thread Helge Hafting

James C. Sutherland wrote:


On May 12, 2009, at 2:50 PM, Uwe Stöhr wrote:


James C. Sutherland schrieb:

Is there a way of disabling Language Support in LyX?  Every time 
that I paste text between documents I get blue underlining of the 
text and have to reset the language to get rid of it.


Then the document language of both LyX documents is not the same. So 
have a look at the document settings and correct the language there 
(and save the right one as the default language that is used for new 
documents).


regards Uwe


I deduced this.  However, I really don't want to have any notion of the 
language my documents are written in.  So to repeat my original 
question, can I just turn off all of this language business altogether?


LyX is not supposed to annoy you with lots of language switching - 
_unless_ you actually work with documents in several languages.


The fix for your problems is not to disable language support, but to 
ensure that all your documents are in the same language. (In your case, 
I guess that will be the same variety of English.) Existing documents 
can be fixed by setting them all to the same language, and then use 
select all and revert any language settings using the edit-textstyle 
dialog. Also, when setting document language to your preference 
(american english?), save this as a default, so you won't ever need to 
set the language for new documents. If LyX still causes language 
trouble, report what happens so it can be fixed.


LyX cannot produce its nice-looking output without knowing the language. 
The good-looking straight margins require some hyphenation, but 
hyphenation conventions vary a lot between languages. You definitely 
want that to match the language in use, or you could get hyphenation so 
stupid that a 12-year old word-user will see it is wrong. In short, the 
writing will seem unprofessional.


LyX will sometimes add its own text, such as the word chapter or 
index or phrases like on page 23 or Table of contents. Clearly, it 
is necessary to know what language to use for such text. English is just 
one of many options here.


And then there is all sorts of typographic conventions. English writing 
have some conventions for spacing, such as more space after a period 
that ends a sentence. And the spacing between headings and the text that 
follows. These conventions are different for other languages. Again, 
getting this wrong will usually make your documents look amateurish.


Helge Hafting


Re: Using counters

2009-05-15 Thread Helge Hafting

obregonma...@gmail.com wrote:

Hi everyone-

I've gone through the docs, wikis and examples, and I need a helping hand.

I want to have a counter (experiment) that uses roman numerals and is 
sequential throughout the chapters. I figure that a module is the right way 
about this, so I have a module with the following counter:

Counter experimentCounter
LabelString  \Roman{experimentCounter}
Within  
End

Now, what I want is a section heading  that would look like:

3.2label expt:reading-ability Experiment I: Effect of reading ability

and then later on:

3.6   label expt:age-predictor Experiment II: Age as a predictor

and then ...

4.2   label expt:reading-aids Experiment III: Reading aids



How can I use my experimentCounter in a section title, as well as assign a label to this experiment item (NOT the section number)? I imagine that it would require an ERT ... but with what LaTeX command? 



Sure, this can be done with some ERT.
But if you're making a module anyway, why not implement this too in the 
module?


Basically, you create a new experiment-section that contains all the 
stuff from a regular section ( copy it out of stdsections.inc, or use
CopyStyle Section and take it from there.) And then you add the 
necessary latex code, once. Instead of having to add it as ERT to

every experiment in your text.

So when you start a new experiment, you use experiment-section instead
of a regular section. I am not sure if you can get LyX to display the 
experiment counter in the edit window, as incrementing two counters at 
once is a bit unusual. But it should definitely work for output!


As for the actual latex code needed to increment and display the 
counter, I don't have time to look that up right now. Look for

examples on the net, or borrow one of the recommended latex books at
a library.

Helge Hafting



Re: Configure fails

2009-05-15 Thread Dominik Waßenhoven
Dominik »Ingrid« Waßenhoven wrote:

 Dear LyX users,
 
 if I try to re-configure LyX, it fails.

Sorry, I forgot to mention:

- Windows XP SP3
- LyX 1.6.2, installed with Uwe's Alt-Installer

Regards,
Dominik.-



Re: Can language support be disabled?

2009-05-15 Thread Guenter Milde
On 2009-05-15, Helge Hafting wrote:
 James C. Sutherland wrote:
 On May 12, 2009, at 2:50 PM, Uwe Stöhr wrote:
 James C. Sutherland schrieb:

...
 ... Existing documents can be fixed by setting them all to the same
 language, and then use select all and revert any language settings
 using the edit-textstyle dialog. 
...
 If LyX still causes language trouble, report what happens so it can be
 fixed.

This method will not change the language of any inset. You will have to
mark the text in insets individually and apply the language switch.

Recurse for every inset inside an inset.

Repeat for every inset.

:-(

Workaround: do the global change and edit the LyX source with a text
editor (removing the remaining language switches).

Günter



convert figures to pdf

2009-05-15 Thread Wolfgang Engelmann
Dear LyX users,

I try to run pdflatex on a terminal to get an aux file (and to run the tex 
file without lyx, because I have difficulties with it under lyx).
Apparently all the figures have to be in pdf format. How would I get them from 
running lyx, preferentially in the same directory as the present figures 
(mostly in eps and jpg). If I have to do it separately, how is it done? 
I tried 
convert *.jpg *.pdf, but that puts me all the files in a big file *.pdf. I 
would, however, like to have them separately. I tried to understand the man 
of convert and the explanation on the site, but its like trying to find a 
needle in the haystack.

Wolfgang


Re: convert figures to pdf

2009-05-15 Thread I Wayan Warmada


--- On Fri, 5/15/09, Wolfgang Engelmann engelm...@uni-tuebingen.de wrote:

 I try to run pdflatex on a terminal to get an aux file (and
 to run the tex file without lyx, because I have difficulties
 with it under lyx).
 Apparently all the figures have to be in pdf format. How
 would I get them from running lyx, preferentially in the same
 directory as the present figures (mostly in eps and jpg). If 
 I have to do it separately, how is it done?

As I remember, pdflatex jpeg file format but not eps or ps format.
try to use program epstopdf to convert eps to pdf format. Or if you have ps 
file, you can convert it to eps with ps2epsi then epstopdf. epstopdf produce 
small file normally.

 I tried convert *.jpg *.pdf, but that puts me all the files in 
 a big file *.pdf.

you need to set the resolution of the *.jpg. Sometimes digital camera produce 
to high resolution image, which is actually not needed by the document (pdf). 
Setting the resolution and size of pictures will reduce the size of *.pdf as 
well as *.jpg.

Wayan
---
Department of Geology
Gadjah Mada University,
Yogyakarta, Indonesia


  


Re: convert figures to pdf

2009-05-15 Thread Uwe Stöhr

Wolfgang Engelmann schrieb:

I try to run pdflatex on a terminal to get an aux file (and to run the tex 
file without lyx, because I have difficulties with it under lyx).

Apparently all the figures have to be in pdf format.


No pdflatex can embed PNG, JPG/JPEG, and PDF (perhaps also GIF).
But LyX does the conversion to these formats automatically for you in the background. So view your 
file in LyX (even when it might fail) as PDF and you can take the converted images from the temp 
folder LyX created.


regards Uwe


Re: Configure fails

2009-05-15 Thread Uwe Stöhr

Dominik Waßenhoven schrieb:


if I try to re-configure LyX, it fails. The following is shown when I
start LyX with '-dbg lyxrc':

,--
¦ File .../configure.py, line 11, in module 
¦   import sys, os, re, shutil, glob

¦ ImportError: No module named os
`

The module os (os.py) is in 'C:\Programme\Python\Lib', and I put this
directory in the path prefix as well (additional to
'C:\Programme\Python' which was there already), but it did not work
either.


Sounds like a Python config problem. You have installed Python manually, so I guess that you need 
Python for other programs than LyX too, right? Do the other programs work for you?

Python is by default installed in
C:\Programme\Python26
not
C:\Programme\Python
what Python version are you using?

When you open LyX and use the menu Tools-Reconfigure, does this work?

regards Uwe


Re: Using counters

2009-05-15 Thread obregonmateo


On Friday 15 May 2009, Helge Hafting wrote:
 obregonma...@gmail.com wrote:
  I've gone through the docs, wikis and examples, and I need a helping hand.
  
  I want to have a counter (experiment) that uses roman numerals and is 
  sequential throughout the chapters. I figure that a module is the right way 
  about this, so I have a module with the following counter:
  
  Counter experimentCounter
  LabelString  \Roman{experimentCounter}
  Within
  End
  
  Now, what I want is a section heading  that would look like:
  
  3.2label expt:reading-ability Experiment I: Effect of reading ability
  
  and then later on:
  
  3.6   label expt:age-predictor Experiment II: Age as a predictor
  
  and then ...
  
  4.2   label expt:reading-aids Experiment III: Reading aids
  
  
  
  How can I use my experimentCounter in a section title, as well as assign 
  a label to this experiment item (NOT the section number)? I imagine that it 
  would require an ERT ... but with what LaTeX command? 
  
 
 Basically, you create a new experiment-section that contains all the 
 stuff from a regular section ( copy it out of stdsections.inc, or use
 CopyStyle Section and take it from there.) And then you add the 
 necessary latex code, once. Instead of having to add it as ERT to
 every experiment in your text.
 
 So when you start a new experiment, you use experiment-section instead
 of a regular section. I am not sure if you can get LyX to display the 
 experiment counter in the edit window, as incrementing two counters at 
 once is a bit unusual. But it should definitely work for output!

I can get LyX to display a modified section very nicely, but I cannot get latex 
to show me a modified experiment-section.

 As for the actual latex code needed to increment and display the 
 counter, I don't have time to look that up right now. Look for
 examples on the net, or borrow one of the recommended latex books at
 a library.

I am at a loss for the latex commands. I don't want to start learning the 
complexities of LaTeX macro writings just to modify a section title. I looked 
at the sectsty.sty and titlesec.sty documentation and found them not to be of 
help. One changes all sections and the other you have to know a lot of LaTex. I 
simply want something like this, so that I have both the normal section counter 
and my special experimentCounter counter:

Counter experimentCounter
LabelString  \Roman{experimentCounter}
Within
End

Style Experiment
CopyStyle Section
LatexName experiment-section
LabelType Counter
LabelString   Experiment \theexperimentCounter.
LabelCounter  section, experimentCounter
Font
Series  Italic
SizeLarge
EndFont
Preamble
\newcommand{\experiment-section}[1]{%
\section{Experiment \theexperimentCounter. #1}}
EndPreamble
End

But, latex gives errors that I don't understand. 


Re: Configure fails

2009-05-15 Thread Dominik Waßenhoven
Uwe Stöhr wrote:

 Sounds like a Python config problem. You have installed Python manually, so I 
 guess that you need 
 Python for other programs than LyX too, right? Do the other programs work for 
 you?

I cannot recall why I installed it manually, and I don't use it on a
regular basis. 

 Python is by default installed in
 C:\Programme\Python26
 not
 C:\Programme\Python
 what Python version are you using?

2.5.1
 
 When you open LyX and use the menu Tools-Reconfigure, does this work?
That's exactly what does not work. And the error message I gave before
was shown when using LyX with debugging. The popup in LyX says:
,--
¦ Die Systemkonfiguration ist fehlgeschlagen.
¦ Eine Standardtextklasse wird verwendet, aber LyX ist möglicherweise
¦ nicht in der Lage, korrekt zu arbeiten.
¦ Bitte rekonfigurieren Sie nochmals, wenn nötig.
`

But that's not very helfpul |c:

The strange thing is, that it had worked before. I remember now that I
changed something in the Preferences-Paths-Path prefix. There were
links to directories that don't exist any longer, some with '1.6.0beta4'
in it IIRC. I altered them, if I recall it right, to '1.6.2', which is
the correct path. I should also mention that I used your update
installer.

If you need any further data, just let me know.

Regards,
Dominik.-



Re: Using counters

2009-05-15 Thread Guenter Milde
On 2009-05-15, obregonma...@gmail.com wrote:
 On Friday 15 May 2009, Helge Hafting wrote:
 obregonma...@gmail.com wrote:

  I want to have a counter (experiment) that uses roman numerals and
  is sequential throughout the chapters. I figure that a module is the
  right way about this, so I have a module with the following counter:
  
  Counter experimentCounter
 LabelString  \Roman{experimentCounter}
 Within
  End
  
  Now, what I want is a section heading  that would look like:
  
  3.2label expt:reading-ability Experiment I: Effect of reading ability
  
  and then later on:
  
  3.6   label expt:age-predictor Experiment II: Age as a predictor
  
  and then ...
  
  4.2   label expt:reading-aids Experiment III: Reading aids
  
  
  
  How can I use my experimentCounter in a section title, as well as
  assign a label to this experiment item (NOT the section number)? I
  imagine that it would require an ERT ... but with what LaTeX
  command? 


 Basically, you create a new experiment-section [...] And then you add
 the necessary latex code, once. Instead of having to add it as ERT to
 every experiment in your text.

 I can get LyX to display a modified section very nicely, but I cannot
 get latex to show me a modified experiment-section.

...

 I am at a loss for the latex commands. I don't want to start learning
 the complexities of LaTeX macro writings just to modify a section
 title. 

In this case you might consider typing the Experiment number by hand...

 I simply want something like this, so that I have both the normal
 section counter and my special experimentCounter counter:

 Counter experimentCounter
   LabelString  \Roman{experimentCounter}
   Within
 End

This sets up the Counter for LyX only, you need to set up a LaTex
counter as well.

AddToPreamble
\newcounter{experiment}
\setcounter{experiment}{0}
EndPreamble


 Style Experiment
 CopyStyle Section
   LatexName experiment-section
 LabelType Counter
 LabelString   Experiment \theexperimentCounter.
 LabelCountersection, experimentCounter
   Font
   Series  Italic
   SizeLarge
   EndFont
 Preamble
   \newcommand{\experiment-section}[1]{%
   \section{Experiment \theexperimentCounter. #1}}
   EndPreamble
 End

 But, latex gives errors that I don't understand.

But only if you post them here, we can help!

1. LaTeX macro names with hyphens are not strictly forbidden but only
   accessible with the \csname ... \endcsname construct.
   
   Use e.g. \experimentSection
   
2. As already said, you need to set up the counter for LaTeX as well.

3. You need to increment the counter in LaTeX
   
4. You need to convert the counter to Roman in LaTeX

Maybe this works, but it is untested:
 
 \newcommand{\experimentSection}[1]{%
\stepcounter{experiment}
\section{Experiment \Roman{experiment}. #1}%
 }
   
Günter



Re: scrbook and width of float

2009-05-15 Thread Johannes Knaus


Am 14.05.2009 um 21:06 schrieb Uwe Stöhr:

Tables cannot be broken horizontally when they are too wide,  
therefore your float is too wide. So you have to assure that the  
table fits the width. I corrected your example see attached.


So, if I understand the whole thing right, if I insert a figure, I can  
set it to 100% col but if I insert a table I can only set the width- 
percentages for each table column not for the whole table. Is that  
right? So if I have a table with let's say 10 columns, I have to set  
each column to 10% of the textwidth? Or is there an easier way?





When you are using figure floats, set the figure width to max. 100  
col% and the float will respect the text column width.







- you are using in your preamble many LaTeX-packages. Do you really  
need all of them? If not it is more safe to use only the packages  
one really needs.


Yes, I really need most of them. But some of them I only left them %ed  
inside the preamble, for my personal reference ;-)


- you have a table within a figure float, but probably only an  
oversight


No, but this is maybe a more general thing. I use tables in my example  
to properly set the stars in a vertical line above each other. I  
didn't know better. In a WYSWYG-Software I would use tabstops to get  
this formatting. But there is no easy way to achieve this in Lyx/ 
Latex, or – well – this may be my oversight.
I use figure floats because these really are – seen from their content  
– figures and not tables.
Do you have an idea how I can get the same formatting without using  
tables?


- figure captions are usually below the image while table captions  
are above the table


Yes, I changed this, as I thought it would be nicer to have all float  
captions above. Or is there a deeper typesetter's-sense of having them  
below for figures?


Thanks a lot for your help and comments, Uwe.

Best regards,
Johannes


--

Sometimes I lie awake at night, and ask, Where have I gone wrong?
Then a voice says to me, This is going to take more than one  
night. (Charlie Brown)





Re: Configure fails

2009-05-15 Thread Guenter Milde
On 2009-05-15, Dominik Waßenhoven wrote:
 Uwe Stöhr wrote:

 Sounds like a Python config problem. You have installed Python
 manually, so I guess that you need Python for other programs than LyX
 too, right? Do the other programs work for you?

 I cannot recall why I installed it manually, and I don't use it on a
 regular basis. 

Could you try from the command line::

  DOS-PROMPT#: python
  Python 2.5.4 (r254:67916, Feb 17 2009, 20:16:45) 
  [GCC 4.3.3] on linux2
  Type help, copyright, credits or license for more information.
   import os

?

 The strange thing is, that it had worked before. I remember now that I
 changed something in the Preferences-Paths-Path prefix. There were
 links to directories that don't exist any longer, some with '1.6.0beta4'
 in it IIRC. I altered them, if I recall it right, to '1.6.2', which is
 the correct path. I should also mention that I used your update
 installer.

You problem is not the PATH (for binaries) but the PYTHONPATH (for
Python modules).

(But I dont know whether you can set it from LyX, nor how to do this
in Windows.)

Günter



Re: convert figures to pdf

2009-05-15 Thread Guenter Milde
On 2009-05-15, Uwe Stöhr wrote:
 Wolfgang Engelmann schrieb:

 I try to run pdflatex on a terminal to get an aux file (and to run the tex 
 file without lyx, because I have difficulties with it under lyx).
 Apparently all the figures have to be in pdf format.

 No, pdflatex can embed PNG, JPG/JPEG, and PDF (perhaps also GIF). But
 LyX does the conversion to these formats automatically for you in the
 background. So view your file in LyX (even when it might fail) as PDF
 and you can take the converted images from the temp folder LyX created.

Or do FileExportLaTeX (pdflatex). If I remember right, this should
convert the images as well.

Günter




Re: Configure fails

2009-05-15 Thread Dominik Waßenhoven
Guenter Milde schrieb:
 Could you try from the command line::
 
   DOS-PROMPT#: python
   Python 2.5.4 (r254:67916, Feb 17 2009, 20:16:45) 
   [GCC 4.3.3] on linux2
   Type help, copyright, credits or license for more information.
import os
 
 ?

What should happen? There is no message or anything that says, if the
command was executed or not.
,--
¦  import os
¦ 
`

 You problem is not the PATH (for binaries) but the PYTHONPATH (for
 Python modules).
 
 (But I dont know whether you can set it from LyX, nor how to do this
 in Windows.)

Okay, thanks so far.

Gruß,
Dominik.-



Re: Configure fails

2009-05-15 Thread Dominik Waßenhoven
Guenter Milde wrote:

 You problem is not the PATH (for binaries) but the PYTHONPATH (for
 Python modules).

This seems not to be the problem, either. I tried the following:

,--
¦ python
¦ Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
¦ (Intel)] on win32
¦ Type help, copyright, credits or license for more information.
¦ import sys
¦ sys.path
¦ ['', 'C:\\WINDOWS\\system32\\python25.zip',
¦ 'C:\\Programme\\Python\\DLLs', 'C:\\Programme\\Python\\lib',
¦ 'C:\\Programme\\Python\\lib\\plat-win',
¦ ''C:\\Programme\\Python\\lib\\lib-tk', 'C:\\Programme\\Python',
¦ 'C:\\Programme\\Python\\lib\\site-packages']
`

So, the directory 'C:\Programme\Pyhton\Lib' is in the PYTHONPATH (except
it has to be case sensitive).

Regards,
Dominik.-



Re: Using counters

2009-05-15 Thread obregonmateo
We're getting close!

On Friday 15 May 2009, Guenter Milde wrote:
 On 2009-05-15, obregonma...@gmail.com wrote:
  On Friday 15 May 2009, Helge Hafting wrote:
  obregonma...@gmail.com wrote:
 
   I want to have a counter (experiment) that uses roman numerals and
   is sequential throughout the chapters. I figure that a module is the
   right way about this, so I have a module with the following counter:

   3.2label expt:reading-ability Experiment I: Effect of reading 
   ability
 
  I am at a loss for the latex commands. I don't want to start learning
  the complexities of LaTeX macro writings just to modify a section
  title. 
 
 In this case you might consider typing the Experiment number by hand...

I have considered this ... but I'm convinced that there is a better way, as I 
have 10 experiment to report and refer to throughout my long document.

  Counter experimentCounter
  LabelString  \Roman{experimentCounter}
  Within
  End
 
 This sets up the Counter for LyX only, you need to set up a LaTex
 counter as well.

Ah! That explains a lot. 

 AddToPreamble
 \newcounter{experiment}
   \setcounter{experiment}{0}
 EndPreamble

Progress. :)

 Maybe this works, but it is untested:
  
  \newcommand{\experimentSection}[1]{%
 \stepcounter{experiment}
 \section{Experiment \Roman{experiment}. #1}%
  }

Yes, the correct section label is generated by latex. And, I've modified the 
LyX Experiment style to show me something workable too (\theexperimentCounter 
below just gives me ?? in the document).

Style Experiment
CopyStyle Section
LatexName experimentSection
LabelType Counter
LabelString   \thesection  Experiment \theexperimentCounter.
LabelCounter  section
Font
Shape   Italic
SizeLarge
EndFont
Preamble
\newcommand{\experimentSection}[1]{%
\stepcounter{experiment}
\section{\textit{Experiment \Roman{experiment}. #1}}%
 }
EndPreamble
End

Now, I need a way to create a label in LyX that refers to value of the 
experiment counter. This way, I can refer to the different experiments in 
text by label (and page, etc).

Thanks Guenter for your help so far. I hope you have a solution for this 
question too.

Mateo.


Re: Configure fails

2009-05-15 Thread Dominik Waßenhoven
Dominik »Ingrid« Waßenhoven wrote:

 Guenter Milde wrote:
 
 You problem is not the PATH (for binaries) but the PYTHONPATH (for
 Python modules).
 
 This seems not to be the problem, either. I tried the following:

Okay, further experiments brought me to the solution: I tried to import
'os' in the python that was in the LyX\bin directory (python 2.6.1), and
it failed. I then renamed the python.exe in this directory to something
else. Thus, my manually installed Python 2.5.1 is used, finds 'os' to
import it and the re-configure of LyX works again.

Should I update to Python 2.6.1 or is 2.5.1 sufficient?

Thanks to all for your help,
Dominik.-

P.S.: Strange though, that it worked earlier, also with Python 2.5.1
installed...



Re: scrbook and width of float

2009-05-15 Thread Uwe Stöhr

Johannes Knaus schrieb:

So, if I understand the whole thing right, if I insert a figure, I can 
set it to 100% col but if I insert a table I can only set the 
width-percentages for each table column not for the whole table. Is that 
right?


Yes.

So if I have a table with let's say 10 columns, I have to set 
each column to 10% of the textwidth? Or is there an easier way?


Yes, but it might be that the lines between the columns also need some space. I don't know an easier 
way, because other methods will only scale the table down so that the character size in the table 
cells is inconsistent with the rest of the document.


For more detailed infos about tables, have a look at the EmbeddedObjects manual. There you also find 
some more details concerning floats and their placement in general.



- you have a table within a figure float, but probably only an oversight


No, but this is maybe a more general thing. I use tables in my example 
to properly set the stars in a vertical line above each other. I didn't 
know better. In a WYSWYG-Software I would use tabstops to get this 
formatting. But there is no easy way to achieve this in Lyx/Latex, or – 
well – this may be my oversight.
I use figure floats because these really are – seen from their content – 
figures and not tables.

Do you have an idea how I can get the same formatting without using tables?


I cannot follow you. What stars do you mean? Why do you need stars in a float and what is your 
desired output (do you have a screenshot or PDF from your WYSIWYG program)?


Yes, I changed this, as I thought it would be nicer to have all float 
captions above. Or is there a deeper typesetter's-sense of having them 
below for figures?


Its the common placement. There might be a deeper sense, but I don't know. But when you open a book 
of your choice, you will see that figure captions are always below the image, while table captions 
are above the table.


regards Uwe


Re: Configure fails

2009-05-15 Thread Uwe Stöhr

Dominik Waßenhoven schrieb:

Sounds like a Python config problem. You have installed Python manually, so I guess that you need 
Python for other programs than LyX too, right? Do the other programs work for you?


I cannot recall why I installed it manually, and I don't use it on a
regular basis. 


OK, then I recommend to uninstall Python. Afterwards uninstall LyX and reinstall it again using my 
installer (that sets up Python in a condensed form especially for LyX).



When you open LyX and use the menu Tools-Reconfigure, does this work?



That's exactly what does not work.


OK, I thought you only called configure.py via the console. So the only solution I see is to repair 
your Python installation be reinstalling, see above.



The strange thing is, that it had worked before. I remember now that I
changed something in the Preferences-Paths-Path prefix. There were
links to directories that don't exist any longer, some with '1.6.0beta4'
in it IIRC. I altered them, if I recall it right, to '1.6.2', which is
the correct path. I should also mention that I used your update
installer.


The beta version of LyX 1.6.0 were buggy and also my installers for these versions had some bugs. So 
this might be the problem. This wouldn't be a surprise, since beta versions are for testing and 
finding bugs.


regards Uwe


Re: scrbook and width of float

2009-05-15 Thread Johannes Knaus
No, but this is maybe a more general thing. I use tables in my  
example to properly set the stars in a vertical line above each  
other. I didn't know better. In a WYSWYG-Software I would use  
tabstops to get this formatting. But there is no easy way to  
achieve this in Lyx/Latex, or – well – this may be my oversight.
I use figure floats because these really are – seen from their  
content – figures and not tables.
Do you have an idea how I can get the same formatting without using  
tables?


I cannot follow you. What stars do you mean? Why do you need stars  
in a float and what is your desired output (do you have a screenshot  
or PDF from your WYSIWYG program)?


Well, the stars (*) in the LyX-file I posted. Here's a screenshot  
taken from OpenOffice with the tabstop solution:
inline: OOo.png


Regards,
Johannes

Re: two questions about figures

2009-05-15 Thread Yago

You can try to use ERT code like this:

\begin{figure}[H]  % You will need to use the package float for the 
use of option H

\centering
\includegraphics[width=xx, or width=xx\textwidth or scale=xx]{your graphic 
file}

\caption{your caption} % You will need the package ccaption for that
\label{your label}
\end{figure}

To wrap your figure, put this just before the first letter of a paragraph:

\begin{wrapfigure}{r (right) or l (left)}{box width}   % You need the 
package wrapfig for that.
\includegraphics[width=xx, or width=xx\textwidth or scale=xx]{your graphic 
file}

\caption{your caption} % You will need the package ccaption for that
\label{your label}
\end{wrapfigure}

You can also to wrap your figure with the package picins. In this .pdf you 
have the package documentation:


http://www.ifi.uio.no/it/latex-links/picins.pdf

In all cases you need the package graphicx in your preamble.
- Original Message - 
From: Marcelo Acuña mv...@yahoo.com.ar
To: lyx-users@lists.lyx.org; Olivier Ripoll 
durocortorum73-gm...@yahoo.fr

Sent: Friday, May 15, 2009 2:40 AM
Subject: Re: two questions about figures




 Hello,
 I put figures in floats.

 1) When I insert a figure into a float I can see
a box with words: Float: Figure, then this change to: Float:
Figure*.
 What is the difference between
Figure and Figure*?

 2) The floats have standard setting plus span
column choosed. Figures have standard setting plus % of text
width.
 When I run Latex, two first
figures are displayed near the section where are defined,
the next figures are displayed 50 pages after, at the end of
the chapter. How I can correct
this?

Have you tried to change the float placement setting to
here if possible or here definitely ?
Check the user manual, section 4.6.3 and the
Documents-Settings-Float Placement options.

Best regards,

Olivier


I try it, but Here if possible and Here definitely are disabled.
Marcelo


 

¡Viví la mejor experiencia en la web!
Descargá gratis el nuevo Internet Explorer 8
http://downloads.yahoo.com/ieak8/?l=ar 



Re: scrbook and width of float

2009-05-15 Thread Uwe Stöhr

Johannes Knaus schrieb:

I cannot follow you. What stars do you mean? Why do you need stars in 
a float and what is your desired output (do you have a screenshot or 
PDF from your WYSIWYG program)?


Well, the stars (*) in the LyX-file I posted. Here's a screenshot taken 
from OpenOffice with the tabstop solution:


So you need the stars to form an image? If so, I would create an image using e.g. Inkscape, 
Illustrator, or whatever. Then include it as image.

Without an creating an image, your actual solution is the best that comes into 
my mind.

regards Uwe


Re: frozen lyx are more frequents

2009-05-15 Thread Marcelo Acuña

  With frozen lyx I mean that lyx not respond anymore
 except for F2 key
  for save the document. With 1.6.1 I encountered this
 bug after 3 or 4
  hours of work. Now, I have this problem in 1 hour
 (but, with 1.6.2 I
  changed Linux from opensuse 11.1 to debian lenny 5.0.
 I don´t konw if
  maybe a difference)
 
 What desktop are you using? I'm also facing some annoying
 problems with 
 window focus on KDE 4 (KDE 4.2.3 here).

 I think that isn´t a focus problem.
 All rest of linux remains work without problem.
 If I move the cursor to the bottom of screen, panel pop up, then, when I move 
the cursor up, panel is hidden, but lyx screen aren´t redraw.
 Only F2 work, title bar change (modified is deleted in title bar), I close 
lyx, run again, and go to work until next frozen.
 Regards
Marcelo


  

¡Viví la mejor experiencia en la web!
Descargá gratis el nuevo Internet Explorer 8
http://downloads.yahoo.com/ieak8/?l=ar


Re: .tex to LyX (attached file)

2009-05-15 Thread rgheck

daniel pereira wrote:

Hello,

I tried to import the attached .tex file into LyX (File  Import  
LaTeX (plain). When trying to generate the PDF, I am getting a 
Undefined Control Sequence error for every ERT on the text.


 Many thanks for any advice,

This is not a valid LaTeX file, for one thing, since it has no header. 
The ERT error is probably due to that, as the \latex macro they are 
using seems not to be defined. Another problem is that the file contains 
some weird characters after the sort short, and the tex2lyx importer 
seems to be choking on them.


rh




.tex to LyX (attached file)

2009-05-15 Thread daniel pereira

Hello,

I tried to import the attached .tex file into LyX (File  Import   
LaTeX (plain). When trying to generate the PDF, I am getting a  
Undefined Control Sequence error for every ERT on the text.


 Many thanks for any advice,




chapter1.tex
Description: Binary data


Configure fails

2009-05-15 Thread Dominik Waßenhoven
Dear LyX users,

if I try to re-configure LyX, it fails. The following is shown when I
start LyX with '-dbg lyxrc':

,--
¦ File .../configure.py, line 11, in module 
¦   import sys, os, re, shutil, glob
¦ ImportError: No module named os
`

The module os (os.py) is in 'C:\Programme\Python\Lib', and I put this
directory in the path prefix as well (additional to
'C:\Programme\Python' which was there already), but it did not work
either.

Any suggestions?

Regards,
Dominik.-



Re: Can language support be disabled?

2009-05-15 Thread Helge Hafting

James C. Sutherland wrote:


On May 12, 2009, at 2:50 PM, Uwe Stöhr wrote:


James C. Sutherland schrieb:

Is there a way of disabling Language Support in LyX?  Every time 
that I paste text between documents I get blue underlining of the 
text and have to reset the language to get rid of it.


Then the document language of both LyX documents is not the same. So 
have a look at the document settings and correct the language there 
(and save the right one as the default language that is used for new 
documents).


regards Uwe


I deduced this.  However, I really don't want to have any notion of the 
language my documents are written in.  So to repeat my original 
question, can I just turn off all of this language business altogether?


LyX is not supposed to annoy you with lots of language switching - 
_unless_ you actually work with documents in several languages.


The fix for your problems is not to disable language support, but to 
ensure that all your documents are in the same language. (In your case, 
I guess that will be the same variety of English.) Existing documents 
can be fixed by setting them all to the same language, and then use 
select all and revert any language settings using the edit-textstyle 
dialog. Also, when setting document language to your preference 
(american english?), save this as a default, so you won't ever need to 
set the language for new documents. If LyX still causes language 
trouble, report what happens so it can be fixed.


LyX cannot produce its nice-looking output without knowing the language. 
The good-looking straight margins require some hyphenation, but 
hyphenation conventions vary a lot between languages. You definitely 
want that to match the language in use, or you could get hyphenation so 
stupid that a 12-year old word-user will see it is wrong. In short, the 
writing will seem unprofessional.


LyX will sometimes add its own text, such as the word chapter or 
index or phrases like on page 23 or Table of contents. Clearly, it 
is necessary to know what language to use for such text. English is just 
one of many options here.


And then there is all sorts of typographic conventions. English writing 
have some conventions for spacing, such as more space after a period 
that ends a sentence. And the spacing between headings and the text that 
follows. These conventions are different for other languages. Again, 
getting this wrong will usually make your documents look amateurish.


Helge Hafting


Re: Using counters

2009-05-15 Thread Helge Hafting

obregonma...@gmail.com wrote:

Hi everyone-

I've gone through the docs, wikis and examples, and I need a helping hand.

I want to have a counter (experiment) that uses roman numerals and is 
sequential throughout the chapters. I figure that a module is the right way 
about this, so I have a module with the following counter:

Counter experimentCounter
LabelString  \Roman{experimentCounter}
Within  
End

Now, what I want is a section heading  that would look like:

3.2label expt:reading-ability Experiment I: Effect of reading ability

and then later on:

3.6   label expt:age-predictor Experiment II: Age as a predictor

and then ...

4.2   label expt:reading-aids Experiment III: Reading aids



How can I use my experimentCounter in a section title, as well as assign a label to this experiment item (NOT the section number)? I imagine that it would require an ERT ... but with what LaTeX command? 



Sure, this can be done with some ERT.
But if you're making a module anyway, why not implement this too in the 
module?


Basically, you create a new experiment-section that contains all the 
stuff from a regular section ( copy it out of stdsections.inc, or use
CopyStyle Section and take it from there.) And then you add the 
necessary latex code, once. Instead of having to add it as ERT to

every experiment in your text.

So when you start a new experiment, you use experiment-section instead
of a regular section. I am not sure if you can get LyX to display the 
experiment counter in the edit window, as incrementing two counters at 
once is a bit unusual. But it should definitely work for output!


As for the actual latex code needed to increment and display the 
counter, I don't have time to look that up right now. Look for

examples on the net, or borrow one of the recommended latex books at
a library.

Helge Hafting



Re: Configure fails

2009-05-15 Thread Dominik Waßenhoven
Dominik »Ingrid« Waßenhoven wrote:

 Dear LyX users,
 
 if I try to re-configure LyX, it fails.

Sorry, I forgot to mention:

- Windows XP SP3
- LyX 1.6.2, installed with Uwe's Alt-Installer

Regards,
Dominik.-



Re: Can language support be disabled?

2009-05-15 Thread Guenter Milde
On 2009-05-15, Helge Hafting wrote:
 James C. Sutherland wrote:
 On May 12, 2009, at 2:50 PM, Uwe Stöhr wrote:
 James C. Sutherland schrieb:

...
 ... Existing documents can be fixed by setting them all to the same
 language, and then use select all and revert any language settings
 using the edit-textstyle dialog. 
...
 If LyX still causes language trouble, report what happens so it can be
 fixed.

This method will not change the language of any inset. You will have to
mark the text in insets individually and apply the language switch.

Recurse for every inset inside an inset.

Repeat for every inset.

:-(

Workaround: do the global change and edit the LyX source with a text
editor (removing the remaining language switches).

Günter



convert figures to pdf

2009-05-15 Thread Wolfgang Engelmann
Dear LyX users,

I try to run pdflatex on a terminal to get an aux file (and to run the tex 
file without lyx, because I have difficulties with it under lyx).
Apparently all the figures have to be in pdf format. How would I get them from 
running lyx, preferentially in the same directory as the present figures 
(mostly in eps and jpg). If I have to do it separately, how is it done? 
I tried 
convert *.jpg *.pdf, but that puts me all the files in a big file *.pdf. I 
would, however, like to have them separately. I tried to understand the man 
of convert and the explanation on the site, but its like trying to find a 
needle in the haystack.

Wolfgang


Re: convert figures to pdf

2009-05-15 Thread I Wayan Warmada


--- On Fri, 5/15/09, Wolfgang Engelmann engelm...@uni-tuebingen.de wrote:

 I try to run pdflatex on a terminal to get an aux file (and
 to run the tex file without lyx, because I have difficulties
 with it under lyx).
 Apparently all the figures have to be in pdf format. How
 would I get them from running lyx, preferentially in the same
 directory as the present figures (mostly in eps and jpg). If 
 I have to do it separately, how is it done?

As I remember, pdflatex jpeg file format but not eps or ps format.
try to use program epstopdf to convert eps to pdf format. Or if you have ps 
file, you can convert it to eps with ps2epsi then epstopdf. epstopdf produce 
small file normally.

 I tried convert *.jpg *.pdf, but that puts me all the files in 
 a big file *.pdf.

you need to set the resolution of the *.jpg. Sometimes digital camera produce 
to high resolution image, which is actually not needed by the document (pdf). 
Setting the resolution and size of pictures will reduce the size of *.pdf as 
well as *.jpg.

Wayan
---
Department of Geology
Gadjah Mada University,
Yogyakarta, Indonesia


  


Re: convert figures to pdf

2009-05-15 Thread Uwe Stöhr

Wolfgang Engelmann schrieb:

I try to run pdflatex on a terminal to get an aux file (and to run the tex 
file without lyx, because I have difficulties with it under lyx).

Apparently all the figures have to be in pdf format.


No pdflatex can embed PNG, JPG/JPEG, and PDF (perhaps also GIF).
But LyX does the conversion to these formats automatically for you in the background. So view your 
file in LyX (even when it might fail) as PDF and you can take the converted images from the temp 
folder LyX created.


regards Uwe


Re: Configure fails

2009-05-15 Thread Uwe Stöhr

Dominik Waßenhoven schrieb:


if I try to re-configure LyX, it fails. The following is shown when I
start LyX with '-dbg lyxrc':

,--
¦ File .../configure.py, line 11, in module 
¦   import sys, os, re, shutil, glob

¦ ImportError: No module named os
`

The module os (os.py) is in 'C:\Programme\Python\Lib', and I put this
directory in the path prefix as well (additional to
'C:\Programme\Python' which was there already), but it did not work
either.


Sounds like a Python config problem. You have installed Python manually, so I guess that you need 
Python for other programs than LyX too, right? Do the other programs work for you?

Python is by default installed in
C:\Programme\Python26
not
C:\Programme\Python
what Python version are you using?

When you open LyX and use the menu Tools-Reconfigure, does this work?

regards Uwe


Re: Using counters

2009-05-15 Thread obregonmateo


On Friday 15 May 2009, Helge Hafting wrote:
 obregonma...@gmail.com wrote:
  I've gone through the docs, wikis and examples, and I need a helping hand.
  
  I want to have a counter (experiment) that uses roman numerals and is 
  sequential throughout the chapters. I figure that a module is the right way 
  about this, so I have a module with the following counter:
  
  Counter experimentCounter
  LabelString  \Roman{experimentCounter}
  Within
  End
  
  Now, what I want is a section heading  that would look like:
  
  3.2label expt:reading-ability Experiment I: Effect of reading ability
  
  and then later on:
  
  3.6   label expt:age-predictor Experiment II: Age as a predictor
  
  and then ...
  
  4.2   label expt:reading-aids Experiment III: Reading aids
  
  
  
  How can I use my experimentCounter in a section title, as well as assign 
  a label to this experiment item (NOT the section number)? I imagine that it 
  would require an ERT ... but with what LaTeX command? 
  
 
 Basically, you create a new experiment-section that contains all the 
 stuff from a regular section ( copy it out of stdsections.inc, or use
 CopyStyle Section and take it from there.) And then you add the 
 necessary latex code, once. Instead of having to add it as ERT to
 every experiment in your text.
 
 So when you start a new experiment, you use experiment-section instead
 of a regular section. I am not sure if you can get LyX to display the 
 experiment counter in the edit window, as incrementing two counters at 
 once is a bit unusual. But it should definitely work for output!

I can get LyX to display a modified section very nicely, but I cannot get latex 
to show me a modified experiment-section.

 As for the actual latex code needed to increment and display the 
 counter, I don't have time to look that up right now. Look for
 examples on the net, or borrow one of the recommended latex books at
 a library.

I am at a loss for the latex commands. I don't want to start learning the 
complexities of LaTeX macro writings just to modify a section title. I looked 
at the sectsty.sty and titlesec.sty documentation and found them not to be of 
help. One changes all sections and the other you have to know a lot of LaTex. I 
simply want something like this, so that I have both the normal section counter 
and my special experimentCounter counter:

Counter experimentCounter
LabelString  \Roman{experimentCounter}
Within
End

Style Experiment
CopyStyle Section
LatexName experiment-section
LabelType Counter
LabelString   Experiment \theexperimentCounter.
LabelCounter  section, experimentCounter
Font
Series  Italic
SizeLarge
EndFont
Preamble
\newcommand{\experiment-section}[1]{%
\section{Experiment \theexperimentCounter. #1}}
EndPreamble
End

But, latex gives errors that I don't understand. 


Re: Configure fails

2009-05-15 Thread Dominik Waßenhoven
Uwe Stöhr wrote:

 Sounds like a Python config problem. You have installed Python manually, so I 
 guess that you need 
 Python for other programs than LyX too, right? Do the other programs work for 
 you?

I cannot recall why I installed it manually, and I don't use it on a
regular basis. 

 Python is by default installed in
 C:\Programme\Python26
 not
 C:\Programme\Python
 what Python version are you using?

2.5.1
 
 When you open LyX and use the menu Tools-Reconfigure, does this work?
That's exactly what does not work. And the error message I gave before
was shown when using LyX with debugging. The popup in LyX says:
,--
¦ Die Systemkonfiguration ist fehlgeschlagen.
¦ Eine Standardtextklasse wird verwendet, aber LyX ist möglicherweise
¦ nicht in der Lage, korrekt zu arbeiten.
¦ Bitte rekonfigurieren Sie nochmals, wenn nötig.
`

But that's not very helfpul |c:

The strange thing is, that it had worked before. I remember now that I
changed something in the Preferences-Paths-Path prefix. There were
links to directories that don't exist any longer, some with '1.6.0beta4'
in it IIRC. I altered them, if I recall it right, to '1.6.2', which is
the correct path. I should also mention that I used your update
installer.

If you need any further data, just let me know.

Regards,
Dominik.-



Re: Using counters

2009-05-15 Thread Guenter Milde
On 2009-05-15, obregonma...@gmail.com wrote:
 On Friday 15 May 2009, Helge Hafting wrote:
 obregonma...@gmail.com wrote:

  I want to have a counter (experiment) that uses roman numerals and
  is sequential throughout the chapters. I figure that a module is the
  right way about this, so I have a module with the following counter:
  
  Counter experimentCounter
 LabelString  \Roman{experimentCounter}
 Within
  End
  
  Now, what I want is a section heading  that would look like:
  
  3.2label expt:reading-ability Experiment I: Effect of reading ability
  
  and then later on:
  
  3.6   label expt:age-predictor Experiment II: Age as a predictor
  
  and then ...
  
  4.2   label expt:reading-aids Experiment III: Reading aids
  
  
  
  How can I use my experimentCounter in a section title, as well as
  assign a label to this experiment item (NOT the section number)? I
  imagine that it would require an ERT ... but with what LaTeX
  command? 


 Basically, you create a new experiment-section [...] And then you add
 the necessary latex code, once. Instead of having to add it as ERT to
 every experiment in your text.

 I can get LyX to display a modified section very nicely, but I cannot
 get latex to show me a modified experiment-section.

...

 I am at a loss for the latex commands. I don't want to start learning
 the complexities of LaTeX macro writings just to modify a section
 title. 

In this case you might consider typing the Experiment number by hand...

 I simply want something like this, so that I have both the normal
 section counter and my special experimentCounter counter:

 Counter experimentCounter
   LabelString  \Roman{experimentCounter}
   Within
 End

This sets up the Counter for LyX only, you need to set up a LaTex
counter as well.

AddToPreamble
\newcounter{experiment}
\setcounter{experiment}{0}
EndPreamble


 Style Experiment
 CopyStyle Section
   LatexName experiment-section
 LabelType Counter
 LabelString   Experiment \theexperimentCounter.
 LabelCountersection, experimentCounter
   Font
   Series  Italic
   SizeLarge
   EndFont
 Preamble
   \newcommand{\experiment-section}[1]{%
   \section{Experiment \theexperimentCounter. #1}}
   EndPreamble
 End

 But, latex gives errors that I don't understand.

But only if you post them here, we can help!

1. LaTeX macro names with hyphens are not strictly forbidden but only
   accessible with the \csname ... \endcsname construct.
   
   Use e.g. \experimentSection
   
2. As already said, you need to set up the counter for LaTeX as well.

3. You need to increment the counter in LaTeX
   
4. You need to convert the counter to Roman in LaTeX

Maybe this works, but it is untested:
 
 \newcommand{\experimentSection}[1]{%
\stepcounter{experiment}
\section{Experiment \Roman{experiment}. #1}%
 }
   
Günter



Re: scrbook and width of float

2009-05-15 Thread Johannes Knaus


Am 14.05.2009 um 21:06 schrieb Uwe Stöhr:

Tables cannot be broken horizontally when they are too wide,  
therefore your float is too wide. So you have to assure that the  
table fits the width. I corrected your example see attached.


So, if I understand the whole thing right, if I insert a figure, I can  
set it to 100% col but if I insert a table I can only set the width- 
percentages for each table column not for the whole table. Is that  
right? So if I have a table with let's say 10 columns, I have to set  
each column to 10% of the textwidth? Or is there an easier way?





When you are using figure floats, set the figure width to max. 100  
col% and the float will respect the text column width.







- you are using in your preamble many LaTeX-packages. Do you really  
need all of them? If not it is more safe to use only the packages  
one really needs.


Yes, I really need most of them. But some of them I only left them %ed  
inside the preamble, for my personal reference ;-)


- you have a table within a figure float, but probably only an  
oversight


No, but this is maybe a more general thing. I use tables in my example  
to properly set the stars in a vertical line above each other. I  
didn't know better. In a WYSWYG-Software I would use tabstops to get  
this formatting. But there is no easy way to achieve this in Lyx/ 
Latex, or – well – this may be my oversight.
I use figure floats because these really are – seen from their content  
– figures and not tables.
Do you have an idea how I can get the same formatting without using  
tables?


- figure captions are usually below the image while table captions  
are above the table


Yes, I changed this, as I thought it would be nicer to have all float  
captions above. Or is there a deeper typesetter's-sense of having them  
below for figures?


Thanks a lot for your help and comments, Uwe.

Best regards,
Johannes


--

Sometimes I lie awake at night, and ask, Where have I gone wrong?
Then a voice says to me, This is going to take more than one  
night. (Charlie Brown)





Re: Configure fails

2009-05-15 Thread Guenter Milde
On 2009-05-15, Dominik Waßenhoven wrote:
 Uwe Stöhr wrote:

 Sounds like a Python config problem. You have installed Python
 manually, so I guess that you need Python for other programs than LyX
 too, right? Do the other programs work for you?

 I cannot recall why I installed it manually, and I don't use it on a
 regular basis. 

Could you try from the command line::

  DOS-PROMPT#: python
  Python 2.5.4 (r254:67916, Feb 17 2009, 20:16:45) 
  [GCC 4.3.3] on linux2
  Type help, copyright, credits or license for more information.
   import os

?

 The strange thing is, that it had worked before. I remember now that I
 changed something in the Preferences-Paths-Path prefix. There were
 links to directories that don't exist any longer, some with '1.6.0beta4'
 in it IIRC. I altered them, if I recall it right, to '1.6.2', which is
 the correct path. I should also mention that I used your update
 installer.

You problem is not the PATH (for binaries) but the PYTHONPATH (for
Python modules).

(But I dont know whether you can set it from LyX, nor how to do this
in Windows.)

Günter



Re: convert figures to pdf

2009-05-15 Thread Guenter Milde
On 2009-05-15, Uwe Stöhr wrote:
 Wolfgang Engelmann schrieb:

 I try to run pdflatex on a terminal to get an aux file (and to run the tex 
 file without lyx, because I have difficulties with it under lyx).
 Apparently all the figures have to be in pdf format.

 No, pdflatex can embed PNG, JPG/JPEG, and PDF (perhaps also GIF). But
 LyX does the conversion to these formats automatically for you in the
 background. So view your file in LyX (even when it might fail) as PDF
 and you can take the converted images from the temp folder LyX created.

Or do FileExportLaTeX (pdflatex). If I remember right, this should
convert the images as well.

Günter




Re: Configure fails

2009-05-15 Thread Dominik Waßenhoven
Guenter Milde schrieb:
 Could you try from the command line::
 
   DOS-PROMPT#: python
   Python 2.5.4 (r254:67916, Feb 17 2009, 20:16:45) 
   [GCC 4.3.3] on linux2
   Type help, copyright, credits or license for more information.
import os
 
 ?

What should happen? There is no message or anything that says, if the
command was executed or not.
,--
¦  import os
¦ 
`

 You problem is not the PATH (for binaries) but the PYTHONPATH (for
 Python modules).
 
 (But I dont know whether you can set it from LyX, nor how to do this
 in Windows.)

Okay, thanks so far.

Gruß,
Dominik.-



Re: Configure fails

2009-05-15 Thread Dominik Waßenhoven
Guenter Milde wrote:

 You problem is not the PATH (for binaries) but the PYTHONPATH (for
 Python modules).

This seems not to be the problem, either. I tried the following:

,--
¦ python
¦ Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
¦ (Intel)] on win32
¦ Type help, copyright, credits or license for more information.
¦ import sys
¦ sys.path
¦ ['', 'C:\\WINDOWS\\system32\\python25.zip',
¦ 'C:\\Programme\\Python\\DLLs', 'C:\\Programme\\Python\\lib',
¦ 'C:\\Programme\\Python\\lib\\plat-win',
¦ ''C:\\Programme\\Python\\lib\\lib-tk', 'C:\\Programme\\Python',
¦ 'C:\\Programme\\Python\\lib\\site-packages']
`

So, the directory 'C:\Programme\Pyhton\Lib' is in the PYTHONPATH (except
it has to be case sensitive).

Regards,
Dominik.-



Re: Using counters

2009-05-15 Thread obregonmateo
We're getting close!

On Friday 15 May 2009, Guenter Milde wrote:
 On 2009-05-15, obregonma...@gmail.com wrote:
  On Friday 15 May 2009, Helge Hafting wrote:
  obregonma...@gmail.com wrote:
 
   I want to have a counter (experiment) that uses roman numerals and
   is sequential throughout the chapters. I figure that a module is the
   right way about this, so I have a module with the following counter:

   3.2label expt:reading-ability Experiment I: Effect of reading 
   ability
 
  I am at a loss for the latex commands. I don't want to start learning
  the complexities of LaTeX macro writings just to modify a section
  title. 
 
 In this case you might consider typing the Experiment number by hand...

I have considered this ... but I'm convinced that there is a better way, as I 
have 10 experiment to report and refer to throughout my long document.

  Counter experimentCounter
  LabelString  \Roman{experimentCounter}
  Within
  End
 
 This sets up the Counter for LyX only, you need to set up a LaTex
 counter as well.

Ah! That explains a lot. 

 AddToPreamble
 \newcounter{experiment}
   \setcounter{experiment}{0}
 EndPreamble

Progress. :)

 Maybe this works, but it is untested:
  
  \newcommand{\experimentSection}[1]{%
 \stepcounter{experiment}
 \section{Experiment \Roman{experiment}. #1}%
  }

Yes, the correct section label is generated by latex. And, I've modified the 
LyX Experiment style to show me something workable too (\theexperimentCounter 
below just gives me ?? in the document).

Style Experiment
CopyStyle Section
LatexName experimentSection
LabelType Counter
LabelString   \thesection  Experiment \theexperimentCounter.
LabelCounter  section
Font
Shape   Italic
SizeLarge
EndFont
Preamble
\newcommand{\experimentSection}[1]{%
\stepcounter{experiment}
\section{\textit{Experiment \Roman{experiment}. #1}}%
 }
EndPreamble
End

Now, I need a way to create a label in LyX that refers to value of the 
experiment counter. This way, I can refer to the different experiments in 
text by label (and page, etc).

Thanks Guenter for your help so far. I hope you have a solution for this 
question too.

Mateo.


Re: Configure fails

2009-05-15 Thread Dominik Waßenhoven
Dominik »Ingrid« Waßenhoven wrote:

 Guenter Milde wrote:
 
 You problem is not the PATH (for binaries) but the PYTHONPATH (for
 Python modules).
 
 This seems not to be the problem, either. I tried the following:

Okay, further experiments brought me to the solution: I tried to import
'os' in the python that was in the LyX\bin directory (python 2.6.1), and
it failed. I then renamed the python.exe in this directory to something
else. Thus, my manually installed Python 2.5.1 is used, finds 'os' to
import it and the re-configure of LyX works again.

Should I update to Python 2.6.1 or is 2.5.1 sufficient?

Thanks to all for your help,
Dominik.-

P.S.: Strange though, that it worked earlier, also with Python 2.5.1
installed...



Re: scrbook and width of float

2009-05-15 Thread Uwe Stöhr

Johannes Knaus schrieb:

So, if I understand the whole thing right, if I insert a figure, I can 
set it to 100% col but if I insert a table I can only set the 
width-percentages for each table column not for the whole table. Is that 
right?


Yes.

So if I have a table with let's say 10 columns, I have to set 
each column to 10% of the textwidth? Or is there an easier way?


Yes, but it might be that the lines between the columns also need some space. I don't know an easier 
way, because other methods will only scale the table down so that the character size in the table 
cells is inconsistent with the rest of the document.


For more detailed infos about tables, have a look at the EmbeddedObjects manual. There you also find 
some more details concerning floats and their placement in general.



- you have a table within a figure float, but probably only an oversight


No, but this is maybe a more general thing. I use tables in my example 
to properly set the stars in a vertical line above each other. I didn't 
know better. In a WYSWYG-Software I would use tabstops to get this 
formatting. But there is no easy way to achieve this in Lyx/Latex, or – 
well – this may be my oversight.
I use figure floats because these really are – seen from their content – 
figures and not tables.

Do you have an idea how I can get the same formatting without using tables?


I cannot follow you. What stars do you mean? Why do you need stars in a float and what is your 
desired output (do you have a screenshot or PDF from your WYSIWYG program)?


Yes, I changed this, as I thought it would be nicer to have all float 
captions above. Or is there a deeper typesetter's-sense of having them 
below for figures?


Its the common placement. There might be a deeper sense, but I don't know. But when you open a book 
of your choice, you will see that figure captions are always below the image, while table captions 
are above the table.


regards Uwe


Re: Configure fails

2009-05-15 Thread Uwe Stöhr

Dominik Waßenhoven schrieb:

Sounds like a Python config problem. You have installed Python manually, so I guess that you need 
Python for other programs than LyX too, right? Do the other programs work for you?


I cannot recall why I installed it manually, and I don't use it on a
regular basis. 


OK, then I recommend to uninstall Python. Afterwards uninstall LyX and reinstall it again using my 
installer (that sets up Python in a condensed form especially for LyX).



When you open LyX and use the menu Tools-Reconfigure, does this work?



That's exactly what does not work.


OK, I thought you only called configure.py via the console. So the only solution I see is to repair 
your Python installation be reinstalling, see above.



The strange thing is, that it had worked before. I remember now that I
changed something in the Preferences-Paths-Path prefix. There were
links to directories that don't exist any longer, some with '1.6.0beta4'
in it IIRC. I altered them, if I recall it right, to '1.6.2', which is
the correct path. I should also mention that I used your update
installer.


The beta version of LyX 1.6.0 were buggy and also my installers for these versions had some bugs. So 
this might be the problem. This wouldn't be a surprise, since beta versions are for testing and 
finding bugs.


regards Uwe


Re: scrbook and width of float

2009-05-15 Thread Johannes Knaus
No, but this is maybe a more general thing. I use tables in my  
example to properly set the stars in a vertical line above each  
other. I didn't know better. In a WYSWYG-Software I would use  
tabstops to get this formatting. But there is no easy way to  
achieve this in Lyx/Latex, or – well – this may be my oversight.
I use figure floats because these really are – seen from their  
content – figures and not tables.
Do you have an idea how I can get the same formatting without using  
tables?


I cannot follow you. What stars do you mean? Why do you need stars  
in a float and what is your desired output (do you have a screenshot  
or PDF from your WYSIWYG program)?


Well, the stars (*) in the LyX-file I posted. Here's a screenshot  
taken from OpenOffice with the tabstop solution:
inline: OOo.png


Regards,
Johannes

Re: two questions about figures

2009-05-15 Thread Yago

You can try to use ERT code like this:

\begin{figure}[H]  % You will need to use the package float for the 
use of option H

\centering
\includegraphics[width=xx, or width=xx\textwidth or scale=xx]{your graphic 
file}

\caption{your caption} % You will need the package ccaption for that
\label{your label}
\end{figure}

To wrap your figure, put this just before the first letter of a paragraph:

\begin{wrapfigure}{r (right) or l (left)}{box width}   % You need the 
package wrapfig for that.
\includegraphics[width=xx, or width=xx\textwidth or scale=xx]{your graphic 
file}

\caption{your caption} % You will need the package ccaption for that
\label{your label}
\end{wrapfigure}

You can also to wrap your figure with the package picins. In this .pdf you 
have the package documentation:


http://www.ifi.uio.no/it/latex-links/picins.pdf

In all cases you need the package graphicx in your preamble.
- Original Message - 
From: Marcelo Acuña mv...@yahoo.com.ar
To: lyx-users@lists.lyx.org; Olivier Ripoll 
durocortorum73-gm...@yahoo.fr

Sent: Friday, May 15, 2009 2:40 AM
Subject: Re: two questions about figures




 Hello,
 I put figures in floats.

 1) When I insert a figure into a float I can see
a box with words: Float: Figure, then this change to: Float:
Figure*.
 What is the difference between
Figure and Figure*?

 2) The floats have standard setting plus span
column choosed. Figures have standard setting plus % of text
width.
 When I run Latex, two first
figures are displayed near the section where are defined,
the next figures are displayed 50 pages after, at the end of
the chapter. How I can correct
this?

Have you tried to change the float placement setting to
here if possible or here definitely ?
Check the user manual, section 4.6.3 and the
Documents-Settings-Float Placement options.

Best regards,

Olivier


I try it, but Here if possible and Here definitely are disabled.
Marcelo


 

¡Viví la mejor experiencia en la web!
Descargá gratis el nuevo Internet Explorer 8
http://downloads.yahoo.com/ieak8/?l=ar 



Re: scrbook and width of float

2009-05-15 Thread Uwe Stöhr

Johannes Knaus schrieb:

I cannot follow you. What stars do you mean? Why do you need stars in 
a float and what is your desired output (do you have a screenshot or 
PDF from your WYSIWYG program)?


Well, the stars (*) in the LyX-file I posted. Here's a screenshot taken 
from OpenOffice with the tabstop solution:


So you need the stars to form an image? If so, I would create an image using e.g. Inkscape, 
Illustrator, or whatever. Then include it as image.

Without an creating an image, your actual solution is the best that comes into 
my mind.

regards Uwe


Re: frozen lyx are more frequents

2009-05-15 Thread Marcelo Acuña

  With frozen lyx I mean that lyx not respond anymore
 except for F2 key
  for save the document. With 1.6.1 I encountered this
 bug after 3 or 4
  hours of work. Now, I have this problem in 1 hour
 (but, with 1.6.2 I
  changed Linux from opensuse 11.1 to debian lenny 5.0.
 I don´t konw if
  maybe a difference)
 
 What desktop are you using? I'm also facing some annoying
 problems with 
 window focus on KDE 4 (KDE 4.2.3 here).

 I think that isn´t a focus problem.
 All rest of linux remains work without problem.
 If I move the cursor to the bottom of screen, panel pop up, then, when I move 
the cursor up, panel is hidden, but lyx screen aren´t redraw.
 Only F2 work, title bar change (modified is deleted in title bar), I close 
lyx, run again, and go to work until next frozen.
 Regards
Marcelo


  

¡Viví la mejor experiencia en la web!
Descargá gratis el nuevo Internet Explorer 8
http://downloads.yahoo.com/ieak8/?l=ar


Re: .tex to LyX (attached file)

2009-05-15 Thread rgheck

daniel pereira wrote:

Hello,

I tried to import the attached .tex file into LyX (File  Import  
LaTeX (plain). When trying to generate the PDF, I am getting a 
Undefined Control Sequence error for every ERT on the text.


 Many thanks for any advice,

This is not a valid LaTeX file, for one thing, since it has no header. 
The ERT error is probably due to that, as the \latex macro they are 
using seems not to be defined. Another problem is that the file contains 
some weird characters after the sort short, and the tex2lyx importer 
seems to be choking on them.


rh




.tex to LyX (attached file)

2009-05-15 Thread daniel pereira

Hello,

I tried to import the attached .tex file into LyX (File  Import   
LaTeX (plain). When trying to generate the PDF, I am getting a  
Undefined Control Sequence error for every ERT on the text.


 Many thanks for any advice,




chapter1.tex
Description: Binary data


Configure fails

2009-05-15 Thread Dominik Waßenhoven
Dear LyX users,

if I try to re-configure LyX, it fails. The following is shown when I
start LyX with '-dbg lyxrc':

,--
¦ File ".../configure.py", line 11, in  
¦   import sys, os, re, shutil, glob
¦ ImportError: No module named os
`

The module os (os.py) is in 'C:\Programme\Python\Lib', and I put this
directory in the path prefix as well (additional to
'C:\Programme\Python' which was there already), but it did not work
either.

Any suggestions?

Regards,
Dominik.-



Re: Can language support be disabled?

2009-05-15 Thread Helge Hafting

James C. Sutherland wrote:


On May 12, 2009, at 2:50 PM, Uwe Stöhr wrote:


James C. Sutherland schrieb:

Is there a way of disabling "Language Support" in LyX?  Every time 
that I paste text between documents I get blue underlining of the 
text and have to "reset" the language to get rid of it.


Then the document language of both LyX documents is not the same. So 
have a look at the document settings and correct the language there 
(and save the right one as the default language that is used for new 
documents).


regards Uwe


I deduced this.  However, I really don't want to have any notion of the 
"language" my documents are written in.  So to repeat my original 
question, can I just turn off all of this language business altogether?


LyX is not supposed to annoy you with lots of language switching - 
_unless_ you actually work with documents in several languages.


The fix for your problems is not to disable language support, but to 
ensure that all your documents are in the same language. (In your case, 
I guess that will be the same variety of English.) Existing documents 
can be fixed by setting them all to the same language, and then use 
"select all" and revert any language settings using the edit->textstyle 
dialog. Also, when setting document language to your preference 
(american english?), save this as a default, so you won't ever need to 
set the language for new documents. If LyX still causes language 
trouble, report what happens so it can be fixed.


LyX cannot produce its nice-looking output without knowing the language. 
The good-looking straight margins require some hyphenation, but 
hyphenation conventions vary a lot between languages. You definitely 
want that to match the language in use, or you could get hyphenation so 
stupid that a 12-year old word-user will see it is wrong. In short, the 
writing will seem unprofessional.


LyX will sometimes add its own text, such as the word "chapter" or 
"index" or phrases like "on page 23" or "Table of contents". Clearly, it 
is necessary to know what language to use for such text. English is just 
one of many options here.


And then there is all sorts of typographic conventions. English writing 
have some conventions for spacing, such as more space after a period 
that ends a sentence. And the spacing between headings and the text that 
follows. These conventions are different for other languages. Again, 
getting this wrong will usually make your documents look amateurish.


Helge Hafting


Re: Using counters

2009-05-15 Thread Helge Hafting

obregonma...@gmail.com wrote:

Hi everyone-

I've gone through the docs, wikis and examples, and I need a helping hand.

I want to have a counter (experiment) that uses roman numerals and is 
sequential throughout the chapters. I figure that a module is the right way 
about this, so I have a module with the following counter:

Counter experimentCounter
LabelString  "\Roman{experimentCounter}"
Within   ""   
End

Now, what I want is a section heading  that would look like:

3.2 Experiment I: Effect of reading ability

and then later on:

3.6Experiment II: Age as a predictor

and then ...

4.2Experiment III: Reading aids



How can I use my "experimentCounter" in a section title, as well as assign a label to this experiment item (NOT the section number)? I imagine that it would require an ERT ... but with what LaTeX command? 



Sure, this can be done with some ERT.
But if you're making a module anyway, why not implement this too in the 
module?


Basically, you create a new "experiment-section" that contains all the 
stuff from a regular "section" ( copy it out of stdsections.inc, or use
"CopyStyle Section" and take it from there.) And then you add the 
necessary latex code, once. Instead of having to add it as ERT to

every experiment in your text.

So when you start a new experiment, you use "experiment-section" instead
of a regular section. I am not sure if you can get LyX to display the 
experiment counter in the edit window, as incrementing two counters at 
once is a bit unusual. But it should definitely work for output!


As for the actual latex code needed to increment and display the 
counter, I don't have time to look that up right now. Look for

examples on the net, or borrow one of the recommended latex books at
a library.

Helge Hafting



Re: Configure fails

2009-05-15 Thread Dominik Waßenhoven
Dominik »Ingrid« Waßenhoven wrote:

> Dear LyX users,
> 
> if I try to re-configure LyX, it fails.

Sorry, I forgot to mention:

- Windows XP SP3
- LyX 1.6.2, installed with Uwe's Alt-Installer

Regards,
Dominik.-



Re: Can language support be disabled?

2009-05-15 Thread Guenter Milde
On 2009-05-15, Helge Hafting wrote:
> James C. Sutherland wrote:
>> On May 12, 2009, at 2:50 PM, Uwe Stöhr wrote:
>>> James C. Sutherland schrieb:

...
> ... Existing documents can be fixed by setting them all to the same
> language, and then use "select all" and revert any language settings
> using the edit->textstyle dialog. 
...
> If LyX still causes language trouble, report what happens so it can be
> fixed.

This method will not change the language of any inset. You will have to
mark the text in insets individually and apply the language switch.

Recurse for every inset inside an inset.

Repeat for every inset.

:-(

Workaround: do the global change and edit the LyX source with a text
editor (removing the remaining language switches).

Günter



convert figures to pdf

2009-05-15 Thread Wolfgang Engelmann
Dear LyX users,

I try to run pdflatex on a terminal to get an aux file (and to run the tex 
file without lyx, because I have difficulties with it under lyx).
Apparently all the figures have to be in pdf format. How would I get them from 
running lyx, preferentially in the same directory as the present figures 
(mostly in eps and jpg). If I have to do it separately, how is it done? 
I tried 
convert *.jpg *.pdf, but that puts me all the files in a big file *.pdf. I 
would, however, like to have them separately. I tried to understand the man 
of convert and the explanation on the site, but its like trying to find a 
needle in the haystack.

Wolfgang


Re: convert figures to pdf

2009-05-15 Thread I Wayan Warmada


--- On Fri, 5/15/09, Wolfgang Engelmann  wrote:

> I try to run pdflatex on a terminal to get an aux file (and
> to run the tex file without lyx, because I have difficulties
> with it under lyx).
> Apparently all the figures have to be in pdf format. How
> would I get them from running lyx, preferentially in the same
> directory as the present figures (mostly in eps and jpg). If 
> I have to do it separately, how is it done?

As I remember, pdflatex jpeg file format but not eps or ps format.
try to use program epstopdf to convert eps to pdf format. Or if you have ps 
file, you can convert it to eps with ps2epsi then epstopdf. "epstopdf" produce 
small file normally.

> I tried convert *.jpg *.pdf, but that puts me all the files in 
> a big file *.pdf.

you need to set the resolution of the *.jpg. Sometimes digital camera produce 
to high resolution image, which is actually not needed by the document (pdf). 
Setting the resolution and size of pictures will reduce the size of *.pdf as 
well as *.jpg.

Wayan
---
Department of Geology
Gadjah Mada University,
Yogyakarta, Indonesia


  


Re: convert figures to pdf

2009-05-15 Thread Uwe Stöhr

Wolfgang Engelmann schrieb:

I try to run pdflatex on a terminal to get an aux file (and to run the tex 
file without lyx, because I have difficulties with it under lyx).

Apparently all the figures have to be in pdf format.


No pdflatex can embed PNG, JPG/JPEG, and PDF (perhaps also GIF).
But LyX does the conversion to these formats automatically for you in the background. So view your 
file in LyX (even when it might fail) as PDF and you can take the converted images from the temp 
folder LyX created.


regards Uwe


Re: Configure fails

2009-05-15 Thread Uwe Stöhr

Dominik Waßenhoven schrieb:


if I try to re-configure LyX, it fails. The following is shown when I
start LyX with '-dbg lyxrc':

,--
¦ File ".../configure.py", line 11, in  
¦   import sys, os, re, shutil, glob

¦ ImportError: No module named os
`

The module os (os.py) is in 'C:\Programme\Python\Lib', and I put this
directory in the path prefix as well (additional to
'C:\Programme\Python' which was there already), but it did not work
either.


Sounds like a Python config problem. You have installed Python manually, so I guess that you need 
Python for other programs than LyX too, right? Do the other programs work for you?

Python is by default installed in
C:\Programme\Python26
not
C:\Programme\Python
what Python version are you using?

When you open LyX and use the menu Tools->Reconfigure, does this work?

regards Uwe


Re: Using counters

2009-05-15 Thread obregonmateo


On Friday 15 May 2009, Helge Hafting wrote:
> obregonma...@gmail.com wrote:
> > I've gone through the docs, wikis and examples, and I need a helping hand.
> > 
> > I want to have a counter (experiment) that uses roman numerals and is 
> > sequential throughout the chapters. I figure that a module is the right way 
> > about this, so I have a module with the following counter:
> > 
> > Counter experimentCounter
> > LabelString  "\Roman{experimentCounter}"
> > Within   "" 
> > End
> > 
> > Now, what I want is a section heading  that would look like:
> > 
> > 3.2 Experiment I: Effect of reading ability
> > 
> > and then later on:
> > 
> > 3.6Experiment II: Age as a predictor
> > 
> > and then ...
> > 
> > 4.2Experiment III: Reading aids
> > 
> > 
> > 
> > How can I use my "experimentCounter" in a section title, as well as assign 
> > a label to this experiment item (NOT the section number)? I imagine that it 
> > would require an ERT ... but with what LaTeX command? 
> > 
> 
> Basically, you create a new "experiment-section" that contains all the 
> stuff from a regular "section" ( copy it out of stdsections.inc, or use
> "CopyStyle Section" and take it from there.) And then you add the 
> necessary latex code, once. Instead of having to add it as ERT to
> every experiment in your text.
> 
> So when you start a new experiment, you use "experiment-section" instead
> of a regular section. I am not sure if you can get LyX to display the 
> experiment counter in the edit window, as incrementing two counters at 
> once is a bit unusual. But it should definitely work for output!

I can get LyX to display a modified section very nicely, but I cannot get latex 
to show me a modified experiment-section.

> As for the actual latex code needed to increment and display the 
> counter, I don't have time to look that up right now. Look for
> examples on the net, or borrow one of the recommended latex books at
> a library.

I am at a loss for the latex commands. I don't want to start learning the 
complexities of LaTeX macro writings just to modify a section title. I looked 
at the sectsty.sty and titlesec.sty documentation and found them not to be of 
help. One changes all sections and the other you have to know a lot of LaTex. I 
simply want something like this, so that I have both the normal section counter 
and my special experimentCounter counter:

Counter experimentCounter
LabelString  "\Roman{experimentCounter}"
Within   "" 
End

Style Experiment
CopyStyle Section
LatexName experiment-section
LabelType Counter
LabelString   "Experiment \theexperimentCounter."
LabelCounter  section, experimentCounter
Font
Series  Italic
SizeLarge
EndFont
Preamble
\newcommand{\experiment-section}[1]{%
\section{Experiment \theexperimentCounter. #1}}
EndPreamble
End

But, latex gives errors that I don't understand. 


Re: Configure fails

2009-05-15 Thread Dominik Waßenhoven
Uwe Stöhr wrote:

> Sounds like a Python config problem. You have installed Python manually, so I 
> guess that you need 
> Python for other programs than LyX too, right? Do the other programs work for 
> you?

I cannot recall why I installed it manually, and I don't use it on a
regular basis. 

> Python is by default installed in
> C:\Programme\Python26
> not
> C:\Programme\Python
> what Python version are you using?

2.5.1
 
> When you open LyX and use the menu Tools->Reconfigure, does this work?
That's exactly what does not work. And the error message I gave before
was shown when using LyX with debugging. The popup in LyX says:
,--
¦ Die Systemkonfiguration ist fehlgeschlagen.
¦ Eine Standardtextklasse wird verwendet, aber LyX ist möglicherweise
¦ nicht in der Lage, korrekt zu arbeiten.
¦ Bitte rekonfigurieren Sie nochmals, wenn nötig.
`

But that's not very helfpul |c:

The strange thing is, that it had worked before. I remember now that I
changed something in the Preferences->Paths->Path prefix. There were
links to directories that don't exist any longer, some with '1.6.0beta4'
in it IIRC. I altered them, if I recall it right, to '1.6.2', which is
the correct path. I should also mention that I used your update
installer.

If you need any further data, just let me know.

Regards,
Dominik.-



Re: Using counters

2009-05-15 Thread Guenter Milde
On 2009-05-15, obregonma...@gmail.com wrote:
> On Friday 15 May 2009, Helge Hafting wrote:
>> obregonma...@gmail.com wrote:

>> > I want to have a counter (experiment) that uses roman numerals and
>> > is sequential throughout the chapters. I figure that a module is the
>> > right way about this, so I have a module with the following counter:
>> > 
>> > Counter experimentCounter
>> >LabelString  "\Roman{experimentCounter}"
>> >Within   "" 
>> > End
>> > 
>> > Now, what I want is a section heading  that would look like:
>> > 
>> > 3.2 Experiment I: Effect of reading ability
>> > 
>> > and then later on:
>> > 
>> > 3.6Experiment II: Age as a predictor
>> > 
>> > and then ...
>> > 
>> > 4.2Experiment III: Reading aids
>> > 
>> > 
>> > 
>> > How can I use my "experimentCounter" in a section title, as well as
>> > assign a label to this experiment item (NOT the section number)? I
>> > imagine that it would require an ERT ... but with what LaTeX
>> > command? 


>> Basically, you create a new "experiment-section" [...] And then you add
>> the necessary latex code, once. Instead of having to add it as ERT to
>> every experiment in your text.

> I can get LyX to display a modified section very nicely, but I cannot
> get latex to show me a modified experiment-section.

...

> I am at a loss for the latex commands. I don't want to start learning
> the complexities of LaTeX macro writings just to modify a section
> title. 

In this case you might consider typing the Experiment number by hand...

> I simply want something like this, so that I have both the normal
> section counter and my special experimentCounter counter:

> Counter experimentCounter
>   LabelString  "\Roman{experimentCounter}"
>   Within   "" 
> End

This sets up the Counter for LyX only, you need to set up a LaTex
counter as well.

AddToPreamble
\newcounter{experiment}
\setcounter{experiment}{0}
EndPreamble


> Style Experiment
> CopyStyle Section
>   LatexName experiment-section
> LabelType Counter
> LabelString   "Experiment \theexperimentCounter."
> LabelCountersection, experimentCounter
>   Font
>   Series  Italic
>   SizeLarge
>   EndFont
> Preamble
>   \newcommand{\experiment-section}[1]{%
>   \section{Experiment \theexperimentCounter. #1}}
>   EndPreamble
> End

> But, latex gives errors that I don't understand.

But only if you post them here, we can help!

1. LaTeX macro names with hyphens are not strictly forbidden but only
   accessible with the \csname ... \endcsname construct.
   
   Use e.g. \experimentSection
   
2. As already said, you need to set up the counter for LaTeX as well.

3. You need to increment the counter in LaTeX
   
4. You need to convert the counter to Roman in LaTeX

Maybe this works, but it is untested:
 
 \newcommand{\experimentSection}[1]{%
\stepcounter{experiment}
\section{Experiment \Roman{experiment}. #1}%
 }
   
Günter



Re: scrbook and width of float

2009-05-15 Thread Johannes Knaus


Am 14.05.2009 um 21:06 schrieb Uwe Stöhr:

Tables cannot be broken horizontally when they are too wide,  
therefore your float is too wide. So you have to assure that the  
table fits the width. I corrected your example see attached.


So, if I understand the whole thing right, if I insert a figure, I can  
set it to 100% col but if I insert a table I can only set the width- 
percentages for each table column not for the whole table. Is that  
right? So if I have a table with let's say 10 columns, I have to set  
each column to 10% of the textwidth? Or is there an easier way?





When you are using figure floats, set the figure width to max. 100  
col% and the float will respect the text column width.







- you are using in your preamble many LaTeX-packages. Do you really  
need all of them? If not it is more safe to use only the packages  
one really needs.


Yes, I really need most of them. But some of them I only left them %ed  
inside the preamble, for my personal reference ;-)


- you have a table within a figure float, but probably only an  
oversight


No, but this is maybe a more general thing. I use tables in my example  
to properly set the stars in a vertical line above each other. I  
didn't know better. In a WYSWYG-Software I would use tabstops to get  
this formatting. But there is no easy way to achieve this in Lyx/ 
Latex, or – well – this may be my oversight.
I use figure floats because these really are – seen from their content  
– figures and not tables.
Do you have an idea how I can get the same formatting without using  
tables?


- figure captions are usually below the image while table captions  
are above the table


Yes, I changed this, as I thought it would be nicer to have all float  
captions above. Or is there a deeper typesetter's-sense of having them  
below for figures?


Thanks a lot for your help and comments, Uwe.

Best regards,
Johannes


--

Sometimes I lie awake at night, and ask, "Where have I gone wrong?"
Then a voice says to me, "This is going to take more than one  
night." (Charlie Brown)





Re: Configure fails

2009-05-15 Thread Guenter Milde
On 2009-05-15, Dominik Waßenhoven wrote:
> Uwe Stöhr wrote:

>> Sounds like a Python config problem. You have installed Python
>> manually, so I guess that you need Python for other programs than LyX
>> too, right? Do the other programs work for you?

> I cannot recall why I installed it manually, and I don't use it on a
> regular basis. 

Could you try from the command line::

  DOS-PROMPT#: python
  Python 2.5.4 (r254:67916, Feb 17 2009, 20:16:45) 
  [GCC 4.3.3] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import os

?

> The strange thing is, that it had worked before. I remember now that I
> changed something in the Preferences->Paths->Path prefix. There were
> links to directories that don't exist any longer, some with '1.6.0beta4'
> in it IIRC. I altered them, if I recall it right, to '1.6.2', which is
> the correct path. I should also mention that I used your update
> installer.

You problem is not the PATH (for binaries) but the PYTHONPATH (for
Python modules).

(But I dont know whether you can set it from LyX, nor how to do this
in Windows.)

Günter



Re: convert figures to pdf

2009-05-15 Thread Guenter Milde
On 2009-05-15, Uwe Stöhr wrote:
> Wolfgang Engelmann schrieb:

>> I try to run pdflatex on a terminal to get an aux file (and to run the tex 
>> file without lyx, because I have difficulties with it under lyx).
>> Apparently all the figures have to be in pdf format.

> No, pdflatex can embed PNG, JPG/JPEG, and PDF (perhaps also GIF). But
> LyX does the conversion to these formats automatically for you in the
> background. So view your file in LyX (even when it might fail) as PDF
> and you can take the converted images from the temp folder LyX created.

Or do File>Export>LaTeX (pdflatex). If I remember right, this should
convert the images as well.

Günter




Re: Configure fails

2009-05-15 Thread Dominik Waßenhoven
Guenter Milde schrieb:
> Could you try from the command line::
> 
>   DOS-PROMPT#: python
>   Python 2.5.4 (r254:67916, Feb 17 2009, 20:16:45) 
>   [GCC 4.3.3] on linux2
>   Type "help", "copyright", "credits" or "license" for more information.
>   >>> import os
> 
> ?

What should happen? There is no message or anything that says, if the
command was executed or not.
,--
¦ >>> import os
¦ >>>
`

> You problem is not the PATH (for binaries) but the PYTHONPATH (for
> Python modules).
> 
> (But I dont know whether you can set it from LyX, nor how to do this
> in Windows.)

Okay, thanks so far.

Gruß,
Dominik.-



Re: Configure fails

2009-05-15 Thread Dominik Waßenhoven
Guenter Milde wrote:

> You problem is not the PATH (for binaries) but the PYTHONPATH (for
> Python modules).

This seems not to be the problem, either. I tried the following:

,--
¦ >python
¦ Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
¦ (Intel)] on win32
¦ Type "help", "copyright", "credits" or "license" for more information.
¦ >>>import sys
¦ >>>sys.path
¦ ['', 'C:\\WINDOWS\\system32\\python25.zip',
¦ 'C:\\Programme\\Python\\DLLs', 'C:\\Programme\\Python\\lib',
¦ 'C:\\Programme\\Python\\lib\\plat-win',
¦ ''C:\\Programme\\Python\\lib\\lib-tk', 'C:\\Programme\\Python',
¦ 'C:\\Programme\\Python\\lib\\site-packages']
`

So, the directory 'C:\Programme\Pyhton\Lib' is in the PYTHONPATH (except
it has to be case sensitive).

Regards,
Dominik.-



Re: Using counters

2009-05-15 Thread obregonmateo
We're getting close!

On Friday 15 May 2009, Guenter Milde wrote:
> On 2009-05-15, obregonma...@gmail.com wrote:
> > On Friday 15 May 2009, Helge Hafting wrote:
> >> obregonma...@gmail.com wrote:
> 
> >> > I want to have a counter (experiment) that uses roman numerals and
> >> > is sequential throughout the chapters. I figure that a module is the
> >> > right way about this, so I have a module with the following counter:

> >> > 3.2 Experiment I: Effect of reading 
> >> > ability
> 
> > I am at a loss for the latex commands. I don't want to start learning
> > the complexities of LaTeX macro writings just to modify a section
> > title. 
> 
> In this case you might consider typing the Experiment number by hand...

I have considered this ... but I'm convinced that there is a better way, as I 
have 10 experiment to report and refer to throughout my long document.

> > Counter experimentCounter
> > LabelString  "\Roman{experimentCounter}"
> > Within   "" 
> > End
> 
> This sets up the Counter for LyX only, you need to set up a LaTex
> counter as well.

Ah! That explains a lot. 

> AddToPreamble
> \newcounter{experiment}
>   \setcounter{experiment}{0}
> EndPreamble

Progress. :)

> Maybe this works, but it is untested:
>  
>  \newcommand{\experimentSection}[1]{%
> \stepcounter{experiment}
> \section{Experiment \Roman{experiment}. #1}%
>  }

Yes, the correct section label is generated by latex. And, I've modified the 
LyX Experiment style to show me something workable too ("\theexperimentCounter" 
below just gives me "??" in the document).

Style Experiment
CopyStyle Section
LatexName experimentSection
LabelType Counter
LabelString   "\thesection  Experiment \theexperimentCounter."
LabelCounter  section
Font
Shape   Italic
SizeLarge
EndFont
Preamble
\newcommand{\experimentSection}[1]{%
\stepcounter{experiment}
\section{\textit{Experiment \Roman{experiment}. #1}}%
 }
EndPreamble
End

Now, I need a way to create a label in LyX that refers to value of the 
"experiment" counter. This way, I can refer to the different experiments in 
text by label (and page, etc).

Thanks Guenter for your help so far. I hope you have a solution for this 
question too.

Mateo.


Re: Configure fails

2009-05-15 Thread Dominik Waßenhoven
Dominik »Ingrid« Waßenhoven wrote:

> Guenter Milde wrote:
> 
>> You problem is not the PATH (for binaries) but the PYTHONPATH (for
>> Python modules).
> 
> This seems not to be the problem, either. I tried the following:

Okay, further experiments brought me to the solution: I tried to import
'os' in the python that was in the LyX\bin directory (python 2.6.1), and
it failed. I then renamed the python.exe in this directory to something
else. Thus, my manually installed Python 2.5.1 is used, finds 'os' to
import it and the re-configure of LyX works again.

Should I update to Python 2.6.1 or is 2.5.1 sufficient?

Thanks to all for your help,
Dominik.-

P.S.: Strange though, that it worked earlier, also with Python 2.5.1
installed...



Re: scrbook and width of float

2009-05-15 Thread Uwe Stöhr

Johannes Knaus schrieb:

So, if I understand the whole thing right, if I insert a figure, I can 
set it to 100% col but if I insert a table I can only set the 
width-percentages for each table column not for the whole table. Is that 
right?


Yes.

So if I have a table with let's say 10 columns, I have to set 
each column to 10% of the textwidth? Or is there an easier way?


Yes, but it might be that the lines between the columns also need some space. I don't know an easier 
way, because other methods will only scale the table down so that the character size in the table 
cells is inconsistent with the rest of the document.


For more detailed infos about tables, have a look at the EmbeddedObjects manual. There you also find 
some more details concerning floats and their placement in general.



- you have a table within a figure float, but probably only an oversight


No, but this is maybe a more general thing. I use tables in my example 
to properly set the stars in a vertical line above each other. I didn't 
know better. In a WYSWYG-Software I would use tabstops to get this 
formatting. But there is no easy way to achieve this in Lyx/Latex, or – 
well – this may be my oversight.
I use figure floats because these really are – seen from their content – 
figures and not tables.

Do you have an idea how I can get the same formatting without using tables?


I cannot follow you. What stars do you mean? Why do you need stars in a float and what is your 
desired output (do you have a screenshot or PDF from your WYSIWYG program)?


Yes, I changed this, as I thought it would be nicer to have all float 
captions above. Or is there a deeper typesetter's-sense of having them 
below for figures?


Its the common placement. There might be a deeper sense, but I don't know. But when you open a book 
of your choice, you will see that figure captions are always below the image, while table captions 
are above the table.


regards Uwe


Re: Configure fails

2009-05-15 Thread Uwe Stöhr

Dominik Waßenhoven schrieb:

Sounds like a Python config problem. You have installed Python manually, so I guess that you need 
Python for other programs than LyX too, right? Do the other programs work for you?


I cannot recall why I installed it manually, and I don't use it on a
regular basis. 


OK, then I recommend to uninstall Python. Afterwards uninstall LyX and reinstall it again using my 
installer (that sets up Python in a condensed form especially for LyX).



When you open LyX and use the menu Tools->Reconfigure, does this work?

>

That's exactly what does not work.


OK, I thought you only called configure.py via the console. So the only solution I see is to repair 
your Python installation be reinstalling, see above.



The strange thing is, that it had worked before. I remember now that I
changed something in the Preferences->Paths->Path prefix. There were
links to directories that don't exist any longer, some with '1.6.0beta4'
in it IIRC. I altered them, if I recall it right, to '1.6.2', which is
the correct path. I should also mention that I used your update
installer.


The beta version of LyX 1.6.0 were buggy and also my installers for these versions had some bugs. So 
this might be the problem. This wouldn't be a surprise, since beta versions are for testing and 
finding bugs.


regards Uwe


Re: scrbook and width of float

2009-05-15 Thread Johannes Knaus
No, but this is maybe a more general thing. I use tables in my  
example to properly set the stars in a vertical line above each  
other. I didn't know better. In a WYSWYG-Software I would use  
tabstops to get this formatting. But there is no easy way to  
achieve this in Lyx/Latex, or – well – this may be my oversight.
I use figure floats because these really are – seen from their  
content – figures and not tables.
Do you have an idea how I can get the same formatting without using  
tables?


I cannot follow you. What stars do you mean? Why do you need stars  
in a float and what is your desired output (do you have a screenshot  
or PDF from your WYSIWYG program)?


Well, the stars (*) in the LyX-file I posted. Here's a screenshot  
taken from OpenOffice with the tabstop solution:
<>


Regards,
Johannes

Re: two questions about figures

2009-05-15 Thread Yago

You can try to use ERT code like this:

\begin{figure}[H]  % You will need to use the package "float" for the 
use of option H

\centering
\includegraphics[width=xx, or width=xx\textwidth or scale=xx]{your graphic 
file}

\caption{your caption} % You will need the package "ccaption" for that
\label{your label}
\end{figure}

To wrap your figure, put this just before the first letter of a paragraph:

\begin{wrapfigure}{r (right) or l (left)}{box width}   % You need the 
package "wrapfig" for that.
\includegraphics[width=xx, or width=xx\textwidth or scale=xx]{your graphic 
file}

\caption{your caption} % You will need the package "ccaption" for that
\label{your label}
\end{wrapfigure}

You can also to wrap your figure with the package "picins". In this .pdf you 
have the package documentation:


http://www.ifi.uio.no/it/latex-links/picins.pdf

In all cases you need the package "graphicx" in your preamble.
- Original Message - 
From: "Marcelo Acuña" 
To: ; "Olivier Ripoll" 


Sent: Friday, May 15, 2009 2:40 AM
Subject: Re: two questions about figures




> Hello,
> I put figures in floats.
>
> 1) When I insert a figure into a float I can see
a box with words: Float: Figure, then this change to: Float:
Figure*.
> What is the difference between
Figure and Figure*?
>
> 2) The floats have standard setting plus span
column choosed. Figures have standard setting plus % of text
width.
> When I run Latex, two first
figures are displayed near the section where are defined,
the next figures are displayed 50 pages after, at the end of
the chapter. How I can correct
this?

Have you tried to change the "float placement" setting to
"here if possible" or "here definitely" ?
Check the user manual, section 4.6.3 and the
"Documents->Settings->Float Placement" options.

Best regards,

Olivier


I try it, but Here if possible and Here definitely are disabled.
Marcelo


 

¡Viví la mejor experiencia en la web!
Descargá gratis el nuevo Internet Explorer 8
http://downloads.yahoo.com/ieak8/?l=ar 



Re: scrbook and width of float

2009-05-15 Thread Uwe Stöhr

Johannes Knaus schrieb:

I cannot follow you. What stars do you mean? Why do you need stars in 
a float and what is your desired output (do you have a screenshot or 
PDF from your WYSIWYG program)?


Well, the stars (*) in the LyX-file I posted. Here's a screenshot taken 
from OpenOffice with the tabstop solution:


So you need the stars to form an image? If so, I would create an image using e.g. Inkscape, 
Illustrator, or whatever. Then include it as image.

Without an creating an image, your actual solution is the best that comes into 
my mind.

regards Uwe


Re: frozen lyx are more frequents

2009-05-15 Thread Marcelo Acuña

> > With "frozen lyx" I mean that lyx not respond anymore
> except for F2 key
> > for save the document. With 1.6.1 I encountered this
> bug after 3 or 4
> > hours of work. Now, I have this problem in 1 hour
> (but, with 1.6.2 I
> > changed Linux from opensuse 11.1 to debian lenny 5.0.
> I don´t konw if
> > maybe a difference)
> 
> What desktop are you using? I'm also facing some annoying
> problems with 
> window focus on KDE 4 (KDE 4.2.3 here).

 I think that isn´t a focus problem.
 All rest of linux remains work without problem.
 If I move the cursor to the bottom of screen, panel pop up, then, when I move 
the cursor up, panel is hidden, but lyx screen aren´t redraw.
 Only F2 work, title bar change (modified is deleted in title bar), I close 
lyx, run again, and go to work until next frozen.
 Regards
Marcelo


  

¡Viví la mejor experiencia en la web!
Descargá gratis el nuevo Internet Explorer 8
http://downloads.yahoo.com/ieak8/?l=ar


Re: .tex to LyX (attached file)

2009-05-15 Thread rgheck

daniel pereira wrote:

Hello,

I tried to import the attached .tex file into LyX (File > Import > 
LaTeX (plain). When trying to generate the PDF, I am getting a 
"Undefined Control Sequence" error for every ERT on the text.


 Many thanks for any advice,

This is not a valid LaTeX file, for one thing, since it has no header. 
The ERT error is probably due to that, as the \latex macro they are 
using seems not to be defined. Another problem is that the file contains 
some weird characters after the sort "short", and the tex2lyx importer 
seems to be choking on them.


rh




.tex to LyX (attached file)

2009-05-15 Thread daniel pereira

Hello,

I tried to import the attached .tex file into LyX (File > Import >  
LaTeX (plain). When trying to generate the PDF, I am getting a  
"Undefined Control Sequence" error for every ERT on the text.


 Many thanks for any advice,




chapter1.tex
Description: Binary data