Re: queries re images

2010-02-01 Thread Guenter Milde
On 2010-01-31, Uwe Stöhr wrote:

 Later I will want to have captions that
 are simply descriptive and don't have Figure X in the front of them. How
 do I turn off the automatic numbering?

 This is tricky because this is quite unusual when tpesetting. Have a
 look in the documentation of the LaTeX-package caption for a
 description how the numbering and label Figure can be suppressed.

How about using a standard paragraph instead of a caption? 

Should be easy:

* delete the empty caption paragraph that is input by default for every
  new float (as most users *do* want it), 
* insert the image, 
* press Enter to get a new paragraph, 
* write your informal caption.

Günter



Re: linux-libertine fonts

2010-02-01 Thread Guenter Milde
On 2010-01-30, Wolfgang Engelmann wrote:

 I have installed the
 ttf-linux-libertine (4.4.1-4)
 family of fonts
 under Debian (using synaptics)
 texhash and reconfigure of LyX
 but can't get it under Documentsettingsfontsserif etc

 what am I missing?

Two things:

* the LaTeX fonts (ttf works only with XeTeX (or some nasty tricks)).

  Install texlive-fonts-extra (the TeXLive2009 version from
  Debian/testing).

* the tip that the GUI font settings are restricted and you must use
  [Default] + code in the LaTeX preamble (in this case
  
 \usepackage{libertine}
  
  ) for many fonts.

Günter




Re: How I can add a new button to the tool bar?

2010-02-01 Thread Olivier Ripoll

Uwe Stöhr wrote:

Am 31.01.2010 23:15, schrieb Marcelo Acuña:

I need to make many changes in the size of the letters, and also to 
put bold or normal, in texts in which I must emphasize certain parts.
  It would help me much to have buttons such as those of emphasized 
and noum.

  How I can add them to the tool bar?


Toggling bold can be done withe the shortcut Ctrl+B. The toolbar 
button named Font (with the small arrow below) can be used to apply 
changes multiple times. It takes the last settings of the text style 
dialog. So when you e.g. have to make 50 words bold, italic, green, 
highlight one word and use the text style dialog to apply the changes.l 
For all further words, highlight them and press the Font button.


In case this method is not what you need, you can add toolbar buttons by 
creating PNG-images (size 24x24 Pixels or smaller).


Hi Uwe,

I think LyX images need to be 20x20, at least on Windows with your 
version, or the result is ugly. I'd love it if LyX used same size as 
original Tango icons (22x22), I wouldn't have had to spend so many hours 
shrinking these icons pixel-per-pixel from 22 to 20.


I think in the case of the bold function, there is already (at least 
in your installer) an icon for it : font-bold.png


Name the image by 
the LyX-function it stands for (e.g. font-bold.png). In the text file 
stdtoolbars.inc add the toolbar button where you like it.

Finally reconfigure LyX.


In other words, Marcelo should add the following line
Item Toggle bold font-bold

in the file stdtoolbars.inc, precisely in the part where the following 
lines are:

Separator
Item Toggle emphasis font-emph
Item Toggle noun font-noun
Item Apply last textstyle-apply

The best would be to copy the original stdtoolbars.inc from the system 
folder (1) to the user LyX ui folder (2) and work on the copy.

More details being given in:
http://wiki.lyx.org/LyX/UserInterface

Best regards,

Olivier

(1) http://wiki.lyx.org/LyX/SystemDir
(2) http://wiki.lyx.org/LyX/UserDir




regards Uwe





Re: How I can add a new button to the tool bar?

2010-02-01 Thread Uwe Stöhr

Olivier Ripoll schrieb:

I think LyX images need to be 20x20, at least on Windows with your 
version, or the result is ugly.


When you have a look at the icons in the images folder, you see that 
there are icons with the size 24x24, 22x22 and 20x20; and all look OK 
for me in the toolbar.


I'd love it if LyX used same size as 
original Tango icons (22x22), I wouldn't have had to spend so many hours 
shrinking these icons pixel-per-pixel from 22 to 20.


I think in the case of the bold function, there is already (at least 
in your installer) an icon for it : font-bold.png


Yes, I therefore chose this as example.

regards Uwe


Re: Lyx - Sweave in MS WIndows XP

2010-02-01 Thread Jlaake

I posted a possible solution to your problem at:

http://yildizoglu.blogspot.com/2009/02/lyx-and-sweave-under-windows-xp.html
-- 
View this message in context: 
http://n2.nabble.com/Lyx-Sweave-in-MS-WIndows-XP-tp4284360p4494574.html
Sent from the LyX - Users mailing list archive at Nabble.com.


Re: How I can add a new button to the tool bar?

2010-02-01 Thread Olivier Ripoll

Uwe Stöhr wrote:

Olivier Ripoll schrieb:

I think LyX images need to be 20x20, at least on Windows with your 
version, or the result is ugly.


When you have a look at the icons in the images folder, you see that 
there are icons with the size 24x24, 22x22 and 20x20; and all look OK 
for me in the toolbar.


They don't for me: See attached picture, esp. the table float and the 
save icons. But since I'm not using those icons anyway... :-)


I'd love it if LyX used same size as original Tango icons (22x22), I 
wouldn't have had to spend so many hours shrinking these icons 
pixel-per-pixel from 22 to 20.


I think in the case of the bold function, there is already (at least 
in your installer) an icon for it : font-bold.png


Yes, I therefore chose this as example.

regards Uwe


Best regards,

Olivier
inline: LyX icon resizing.png

Character spacing in Lyx

2010-02-01 Thread Thomas Hedden
I am using Lyx 1.6.5 on Linux and want to apply, to some text, a character
attribute that is variously referred to as character spacing,
intercharacter spacing, inter-character spacing, or merely spacing,
and possibly other names as well. When used on pairs of characters,
it is also referred to as kerning. This attribute is widely used in
typography,
and is available in both Microsoft Word and in OpenOffice.org Writer.
When applied to some text, for example test text, it could spread the
text out like this t e s t   t e x t. Of course this effect can be imitated
as I did here, by inserting spaces between the letters. But doing this
changes the text. That is, instead of test text, it would then become
t[space]e[space]s[space]t[space][space][space]t[space]e[space]x[space]t.
I find this unacceptable. I have searched in the user interface and the
manual, and cannot find any information about this.
A few cryptic posts I have read refer to a package called soul, but it
does not come up when I query for lyx in the package manager
(using Fedora 11). I have also heard suggestions about writing a Latex
script or something like that.
Does anyone know whether this feature is supported and how to apply
this attribute to text?
Thanks in advance for any suggestions.
Tom


Re: linux-libertine fonts

2010-02-01 Thread Wolfgang Engelmann
Am Monday 01 February 2010 09:46:37 schrieb Guenter Milde:

Thanks for the answers to my question (libertine and unit package)

Wolfgang


Editing equations as latex rather than graphically.

2010-02-01 Thread Tim Hutt
Hi, I've searched but I can't find an answer: Is it possible to edit
the source latex code of equations rather than edit the equations in a
graphical way? I much prefer this method for equations and in my mind
it is one of the things that makes latex superior to for example, MS
Word.

If this isn't a feature I'd suggest something like CTRL-clicking on an
equation (also accessible by right-click-Edit Source) shows you the
source of the equation and lets you edit it.

Cheers,

-Tim


Re: grid image of pdf output

2010-02-01 Thread HL2050

I made another experiment today. I replaced Preview with Acrobat Reader 9.0
as a default on Mac OS Snow Leopard. Then the grid (net-like) image problem
was no longer a problem. 

It appears that LyX on Mac OS Snow Leopard still has compatibility problems
that need to be fixed. 
-- 
View this message in context: 
http://n2.nabble.com/grid-image-of-pdf-output-tp4483939p4496225.html
Sent from the LyX - Users mailing list archive at Nabble.com.


Re: Editing equations as latex rather than graphically.

2010-02-01 Thread rgheck

On 02/01/2010 01:54 PM, Tim Hutt wrote:

Hi, I've searched but I can't find an answer: Is it possible to edit
the source latex code of equations rather than edit the equations in a
graphical way? I much prefer this method for equations and in my mind
it is one of the things that makes latex superior to for example, MS
Word.

   
This is possible. First, you can enter LaTeX code at the keyboard, and 
then LyX will display it as graphical. So just type Ctrl-M to enter 
math mode and then start typing:

2^x + \sqrt 3 = \frac ...
Anything LyX doesn't understand it will display as raw commands.


If this isn't a feature I'd suggest something like CTRL-clicking on an
equation (also accessible by right-click-Edit Source) shows you the
source of the equation and lets you edit it.

   
Try ViewSource if you want to *see* the LaTeX. There is no provision 
for editing it directly. However, if you really want to edit LaTeX, try 
this. Highlight just the *inside* of a math inset. Now exit it and 
paste. You should get the raw LaTeX code. Edit it. Now highlight it and 
hit Ctrl-M again.


The request for roundtrip LaTeX editing is longstanding and difficult 
to implement. But the math case is special and actually wouldn't be that 
hard to do. As the workaround just given shows, LyX can essentially do 
this already. So you might file this special case, of math, as an 
enhancement request here: http://www.lyx.org/trac/wiki/BugTrackerHome.


rh



Re: Editing equations as latex rather than graphically.

2010-02-01 Thread Tim Hutt
On 1 February 2010 19:22, rgheck rgh...@bobjweil.com wrote:
 Try ViewSource if you want to *see* the LaTeX.

Ah yes, I did that in an equation and it is almost exactly what I want
- just need to be able to edit the text. Without looking at the code,
it doesn't look like you'd have to do much to make it editable. I
might have a go some time.

Cheers.


Re: Character spacing in Lyx

2010-02-01 Thread stephen's mailinglist account
On 1 February 2010 17:37, Thomas Hedden tho...@hedden.org wrote:
 I am using Lyx 1.6.5 on Linux and want to apply, to some text, a character
 attribute that is variously referred to as character spacing,
 intercharacter spacing, inter-character spacing, or merely spacing,
 and possibly other names as well. When used on pairs of characters,
 it is also referred to as kerning. This attribute is widely used in
 typography,
 and is available in both Microsoft Word and in OpenOffice.org Writer.
 When applied to some text, for example test text, it could spread the
 text out like this t e s t   t e x t. Of course this effect can be imitated
 as I did here, by inserting spaces between the letters. But doing this
 changes the text. That is, instead of test text, it would then become
 t[space]e[space]s[space]t[space][space][space]t[space]e[space]x[space]t.
 I find this unacceptable. I have searched in the user interface and the
 manual, and cannot find any information about this.
 A few cryptic posts I have read refer to a package called soul, but it
 does not come up when I query for lyx in the package manager
 (using Fedora 11). I have also heard suggestions about writing a Latex
 script or something like that.
 Does anyone know whether this feature is supported and how to apply
 this attribute to text?
 Thanks in advance for any suggestions.
 Tom

My first instinct is to ask why, since the underlying typesetting
engine kerns automatically? To quote one text based on the kerning
pairs defined in the font metrics file

Presumably you are trying to alter what LaTeX does by default.  You
could apparently alter these kerning pairs if that is what you want to
do for the whole document.  For odd cases you can use some ERT
(\kern+1pt) between letters - substitute unit as appropriate.

Otherwise look up documentation for LaTeX packages on CTAN (for
example soul: http://www.ctan.org/tex-archive/macros/latex/contrib/soul/
)


-- 
Stephen


Re: Editing equations as latex rather than graphically.

2010-02-01 Thread rgheck

On 02/01/2010 02:29 PM, Tim Hutt wrote:

On 1 February 2010 19:22, rgheckrgh...@bobjweil.com  wrote:
   

Try ViewSource if you want to *see* the LaTeX.
 

Ah yes, I did that in an equation and it is almost exactly what I want
- just need to be able to edit the text. Without looking at the code,
it doesn't look like you'd have to do much to make it editable. I
might have a go some time.

   
It's harder than you think, in the general case, because *reading* the 
LaTeX back is not trivial. In the math case, however, it isn't so hard, 
and it'd be easier to do it in the editing pane. All you have to do is 
have a special mode where LyX displays the raw LaTeX, which it knows how 
to generate. This would be kind of like the preview mode, where it 
displays a little picture. Switching back to LyX mode would then read 
the LaTeX---LyX knows how to do this in the math case---and display the 
LyX form.


rh



Re: How I can add a new button to the tool bar?

2010-02-01 Thread Uwe Stöhr

Olivier Ripoll schrieb:

When you have a look at the icons in the images folder, you see that 
there are icons with the size 24x24, 22x22 and 20x20; and all look OK 
for me in the toolbar.


They don't for me: See attached picture, esp. the table float and the 
save icons. But since I'm not using those icons anyway... :-)


I cannot see a problem. What do you find ugly?

regards Uwe


Re: Editing equations as latex rather than graphically.

2010-02-01 Thread James C. Sutherland

On Feb 1, 2010, at 12:29 PM, Tim Hutt wrote:

 On 1 February 2010 19:22, rgheck rgh...@bobjweil.com wrote:
 Try ViewSource if you want to *see* the LaTeX.
 
 Ah yes, I did that in an equation and it is almost exactly what I want
 - just need to be able to edit the text. Without looking at the code,
 it doesn't look like you'd have to do much to make it editable. I
 might have a go some time.
 
 Cheers.

Note that another option to see the LaTeX code is to copy the math environment 
into a text editor.  That will give you the raw LaTeX.

James

Re: Editing equations as latex rather than graphically.

2010-02-01 Thread Tommaso Cucinotta

rgheck wrote:

Ah yes, I did that in an equation and it is almost exactly what I want
- just need to be able to edit the text. Without looking at the code,
it doesn't look like you'd have to do much to make it editable. I
might have a go some time.
It's harder than you think, in the general case, because *reading* the 
LaTeX back is not trivial. In the math case, however, it isn't so 
hard, and it'd be easier to do it in the editing pane. All you have to 
do is have a special mode where LyX displays the raw LaTeX, which it 
knows how to generate. This would be kind of like the preview mode, 
where it displays a little picture. Switching back to LyX mode would 
then read the LaTeX---LyX knows how to do this in the math case---and 
display the LyX form.
One question: isn't it possible to handle this case like the other 
external-material objects ?


I mean, imagine you define another kind of external-material object, the 
External Equation type (e.g., a '*.eq' file), imagine you associate a 
text editor to such a type, and imagine you define a set of filters 
which just invoke externally LaTeX for computing the .eps of the file 
for both preview and print purposes. This way, for example, clicking on 
the image of the equation, would pop-up the external text editor on the 
.eq file, and after exiting it would be updated on the screen.

Wouldn't you achieve exactly what this user is looking for ?

   T.


Re: Editing equations as latex rather than graphically.

2010-02-01 Thread rgheck

On 02/01/2010 03:44 PM, Tommaso Cucinotta wrote:

rgheck wrote:

Ah yes, I did that in an equation and it is almost exactly what I want
- just need to be able to edit the text. Without looking at the code,
it doesn't look like you'd have to do much to make it editable. I
might have a go some time.
It's harder than you think, in the general case, because *reading* 
the LaTeX back is not trivial. In the math case, however, it isn't so 
hard, and it'd be easier to do it in the editing pane. All you have 
to do is have a special mode where LyX displays the raw LaTeX, which 
it knows how to generate. This would be kind of like the preview 
mode, where it displays a little picture. Switching back to LyX 
mode would then read the LaTeX---LyX knows how to do this in the math 
case---and display the LyX form.


One question: isn't it possible to handle this case like the other 
external-material objects ?


I mean, imagine you define another kind of external-material object, 
the External Equation type (e.g., a '*.eq' file), imagine you 
associate a text editor to such a type, and imagine you define a set 
of filters which just invoke externally LaTeX for computing the .eps 
of the file for both preview and print purposes. This way, for 
example, clicking on the image of the equation, would pop-up the 
external text editor on the .eq file, and after exiting it would be 
updated on the screen.

Wouldn't you achieve exactly what this user is looking for ?

I think this might be useful in some cases, assuming you just included 
the LaTeX, rather than an image. But my thought was that it should 
actually be fairly easy to switch back and forth between LaTeX mode and 
LyX mode, which many people might like. And then you can do this right 
inside LyX.


Richard



Re: Editing equations as latex rather than graphically.

2010-02-01 Thread Tommaso Cucinotta

rgheck wrote:
One question: isn't it possible to handle this case like the other 
external-material objects ?


I mean, imagine you define another kind of external-material object, 
the External Equation type (e.g., a '*.eq' file), imagine you 
associate a text editor to such a type, and imagine you define a set 
of filters which just invoke externally LaTeX for computing the .eps 
of the file for both preview and print purposes. This way, for 
example, clicking on the image of the equation, would pop-up the 
external text editor on the .eq file, and after exiting it would be 
updated on the screen.

Wouldn't you achieve exactly what this user is looking for ?
In fact, the attached patch achieves such behaviour easily. If you have 
a .eq file with a contents such as:


 \begin{equation}
   U = \frac{C}{T}
 \end{equation}

then you can do Insert-File-External Material-[Equation (LaTeX)], 
then select your .eq file. Now, if you have Instant Preview enabled in 
preferences, you can see the formatted equation on the screen. 
Furthermore, right-click on it and select External Editor and you can 
edit it with emacs.
The difference w.r.t. an ERT block is that you can see the formatted 
result on the screen (but editing through an external editor is not as 
comfortable as a collapsable inset).


Was kind of a learning excercise -- just in case anyone finds such patch 
useful (btw, I find the built-in LyX WYSIWYG/M equation editor 
extraordinary).


   T.

Index: lib/scripts/eq2eps.py
===
--- lib/scripts/eq2eps.py	(revisione 0)
+++ lib/scripts/eq2eps.py	(revisione 0)
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# file eq2eps.py
+# This file is part of LyX, the document processor.
+# Licence details can be found in the file COPYING.
+#
+# \author Angus Leeming
+# \author Bo Peng
+# \author Tommaso Cucinotta
+#
+# Full author contact details are available in file CREDITS
+
+
+# This script converts a LaTeX equation (EQ) to Encapsulated PostScript (EPS).
+
+# Usage:
+#   python eq2eps.py ${base}.eq ${base}.eps
+# This command generates
+#   ${base}.epsthe converted eps file
+
+import os, sys
+
+# We expect two args, the names of the input and output files.
+if len(sys.argv) != 3:
+sys.exit(1)
+
+input, output = sys.argv[1:]
+
+# Fail silently if the file doesn't exist
+if not os.path.isfile(input):
+sys.exit(0)
+
+# Strip the extension from ${input}
+inbase = os.path.splitext(input)[0]
+# Strip the extension from ${output}
+outbase = os.path.splitext(output)[0]
+
+# Generate the EPS file
+print 'latex -jobname=%s \\documentclass{article}\\pagestyle{empty}\\begin{document}\\input{%s}\\end{document}' % (inbase,input)
+if os.system('latex -jobname=%s \\documentclass{article}\\pagestyle{empty}\\begin{document}\\input{%s}\\end{document}' % (inbase,input)) != 0 or \
+  os.system('dvips -E -o %s.eps %s.dvi' % (outbase, inbase)) != 0:
+  print 'eq2eps fails'
+  sys.exit(1)
Index: lib/external_templates
===
--- lib/external_templates	(revisione 33314)
+++ lib/external_templates	(copia locale)
@@ -159,6 +159,35 @@
 TemplateEnd
 
 
+Template Equation-LaTeX
+	GuiName Eq: $$AbsOrRelPathParent$$Basename
+	HelpText
+		A LaTeX Equation
+	HelpTextEnd
+	InputFormat eq
+	FileFilter *.eq
+	AutomaticProduction true
+	Transform Rotate
+	Transform Resize
+	Transform Clip
+	Transform Extra
+	Preview InstantPreview
+	Format LaTeX
+		TransformOption Rotate RotationLatexOption
+		TransformOption Resize ResizeLatexOption
+		TransformOption Clip   ClipLatexOption
+		TransformOption Extra  ExtraOption
+		Option Arg [$$Extra,$$Rotate,$$Resize,$$Clip]
+		Product \\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}
+		UpdateFormat eps
+		UpdateResult $$AbsPath$$Basename.eps
+		Requirement graphicx
+		ReferencedFile latex $$AbsPath$$Basename.eps
+		ReferencedFile dvi   $$AbsPath$$Basename.eps
+	FormatEnd
+TemplateEnd
+
+
 Template ChessDiagram
 	GuiName Chess: $$AbsOrRelPathParent$$Basename
 	HelpText
Index: lib/configure.py
===
--- lib/configure.py	(revisione 33314)
+++ lib/configure.py	(copia locale)
@@ -507,6 +507,7 @@
 \Format sweave RnwSweaveS   %%document
 \Format lilypond   ly LilyPond music 	%%	vector
 \Format latex  texLaTeX (plain) L  	%%	document
+\Format eq eq Equation (LaTeX)  L  	%%	document
 \Format pdflatex   texLaTeX (pdflatex)   	%%	document
 \Format xetex  texLaTeX (XeTeX)  	%%	document
 \Format text   txtPlain texta  	%%	document
@@ -585,6 +586,9 @@
 
 def checkConverterEntries():
 ''' Check all converters (\converter entries) '''
+addToRC(r'''\converter eq epspython -tt $$s/scripts/eq2eps.py $$i $$o	
+''')
+
 checkProg('the pdflatex program', ['pdflatex $$i'],
   

Re: Editing equations as latex rather than graphically.

2010-02-01 Thread rgheck

On 02/01/2010 05:42 PM, Tommaso Cucinotta wrote:

rgheck wrote:
One question: isn't it possible to handle this case like the other 
external-material objects ?


I mean, imagine you define another kind of external-material object, 
the External Equation type (e.g., a '*.eq' file), imagine you 
associate a text editor to such a type, and imagine you define a set 
of filters which just invoke externally LaTeX for computing the .eps 
of the file for both preview and print purposes. This way, for 
example, clicking on the image of the equation, would pop-up the 
external text editor on the .eq file, and after exiting it would be 
updated on the screen.

Wouldn't you achieve exactly what this user is looking for ?
In fact, the attached patch achieves such behaviour easily. If you 
have a .eq file with a contents such as:


 \begin{equation}
   U = \frac{C}{T}
 \end{equation}

then you can do Insert-File-External Material-[Equation (LaTeX)], 
then select your .eq file. Now, if you have Instant Preview enabled 
in preferences, you can see the formatted equation on the screen. 
Furthermore, right-click on it and select External Editor and you 
can edit it with emacs.
The difference w.r.t. an ERT block is that you can see the formatted 
result on the screen (but editing through an external editor is not as 
comfortable as a collapsable inset).


Was kind of a learning excercise -- just in case anyone finds such 
patch useful (btw, I find the built-in LyX WYSIWYG/M equation editor 
extraordinary).


I think you should post this to devel and commit it. In the case of very 
complex equations, which would basically be nothing but ERT, it could be 
very useful. LyX can handle it, of course, but perhaps not with the 
kinds of comments and so forth one might want. I'm sure there are some 
people in this sort of predicament.


I hate to be greedy here, but does this handle math macros defined 
earlier in the document? That would be a good addition, if not. And it 
would, as it happens, allow me to use exactly this script for exporting 
little math images during XHTML output (if someone wanted a given 
equation to be output that way).


Richard



Re: Editing equations as latex rather than graphically.

2010-02-01 Thread Vincent


The difference w.r.t. an ERT block is that you can see the formatted 
result on the screen (but editing through an external editor is not as 
comfortable as a collapsable inset).



Remember I have the InsetPreview in my back pocket :)

I didn't follow the thread further, so I don't know what the question 
is/was, but it seems perfect that with the InsetPreview, you can 
generate a preview of an ERT.


Vincent



Weird error LyX........

2010-02-01 Thread M-L

I've created a letter template and used it and converted it to .pdf
many times in the past with this in the preamble:

%
%% Here you can modify the layout of your letter
%% Have a look at the KOMA script documentation
%% for details. Most commands are commented out
%% here (i.e. we use default settings)
%

%% Load an *.lco style file (see KOMA documentation)
%%\LoadLetterOption{DIN}%  

% vertical position of the address field
\...@addtoplength{toaddrvpos}{2mm}
% space between ref line and letter text
\...@setplength{refaftervskip}{-1cm}
% position from top of page of Sender Name thanks to: Jean-Marie
%Pacquet \...@addtoplength{firstheadvpos}{2cm}

%% THE CLASS OPTIONS
%% Remove preceeding '%' to uncomment an item
\KOMAoptions{%
,headsepline=false%separate the header with a line on page
1 ,footsepline=false% separate the footer with a line on
page 1
%pagenumber=botcenter%   position of the page number (see docu)
%,parskip=false%  Use indent instead of skip (more options cf.
docu) ,fromalign=left%alignment of the address
,fromrule=aftername%separate the address with a line?
,fromphone=false% print sender phone number
%,fromfax=true%  print sender fax number
,fromemail=false%   print sender e-mail address
,fromurl=false%   print sender URL
%,fromlogo=true% print a logo (position depends on fromalign)
%,addrfield=false%print an address field?
%,backaddress=false%  print the back address?
%,subject=afteropening,titled% alternative subject layout and position
%,locfield=narrow%  width of the (extra) location field
,foldmarks=false%  print foldmarks?
%,numericaldate=true%  date layout
%,refline=wide% layout of the refline
}

%% Customize Separators
%\setkomavar{placeseparator}{ -- }
%\setkomavar{backaddressseparator}{ $\cdot$ }
%%\setkomavar{emailseparator}{}
%\setkomavar{enclseparator}{  }
%\setkomavar{faxseparator}{ -- }
%\setkomavar{phoneseparator}{ -- }
%\setkomavar{subjectseparator}{  }

%% Customize fonts
%% Use LaTeX's standard font commands
%% Modify with \setkomafont or \addtokomafont
%% (see KOMA documentation)
%\setkomafont{backaddress}{\rmfamily}
%\setkomafont{descriptionlabel}{}
\setkomafont{fromaddress}{\small}
\setkomafont{fromname}{\bf}
%\setkomafont{pagefoot}{utopia}
%\setkomafont{pagehead}{}
%\setkomafont{pagenumber}{}
%\setkomafont{subject}{}
%\setkomafont{title}{}
\hyphenpenalty=1
\usepackage{xcolor}
\usepackage{hyperref}
\hypersetup{colorlinks=true,urlcolor=blue}
\usepackage[OT1,T1]{fontenc}
\usepackage{times}

But suddenly I get this silly error message:

Package scrkbase Error: Unknown KOMA option `',

 }
  
You have used \KOMAoptions to set `',
but KOMA-Script does not know any option named `'.
See the KOMA-Script manual for more informations about options and
their values.

I can't find it in the document any place at all, and I've loaded the
document with a text editor without being able to find that `',

what is it a ' a ` or a ,

TIA
Charlie
-- 
Registered Linux User:- 329524
***
We need only travel enough to give our intellects an
airing. .Henry David Thoreau

***
Debian GNU/Linux - just the best way to create magic
___


Re: unit package

2010-02-01 Thread Wolfgang Engelmann
Am Saturday 30 January 2010 21:19:01 schrieb Kenward Vaughan:
 math menu--fractions button

A few more questions re typography:

1- how about 20 and 150g? Would one use unit(864m) (example from the math 
menu--fractions button) and keep in the first case (20) the second blue box 
empty, and in the second case fill in 150, first box, g, second box?

2- In the (German) math LyX explanation it is stated under 22 Hints: A. 
Typographische Hinweise (Typo hints)

• Physikalische Einheiten werden immer aufrecht gesetzt: 30 km/h
physical units are always set upright: 30 km/h

Does this apply also for the following:
I am using italics for the legends. If they contain units such as (864m), 
should they still be upright?

3- What is the correct spacing for e.g. 
10:30o'clock (the :)
and for 
Donnerstag, den 31.6., (the . and ,)


Wolfgang


Re: queries re images

2010-02-01 Thread Guenter Milde
On 2010-01-31, Uwe Stöhr wrote:

 Later I will want to have captions that
 are simply descriptive and don't have Figure X in the front of them. How
 do I turn off the automatic numbering?

 This is tricky because this is quite unusual when tpesetting. Have a
 look in the documentation of the LaTeX-package caption for a
 description how the numbering and label Figure can be suppressed.

How about using a standard paragraph instead of a caption? 

Should be easy:

* delete the empty caption paragraph that is input by default for every
  new float (as most users *do* want it), 
* insert the image, 
* press Enter to get a new paragraph, 
* write your informal caption.

Günter



Re: linux-libertine fonts

2010-02-01 Thread Guenter Milde
On 2010-01-30, Wolfgang Engelmann wrote:

 I have installed the
 ttf-linux-libertine (4.4.1-4)
 family of fonts
 under Debian (using synaptics)
 texhash and reconfigure of LyX
 but can't get it under Documentsettingsfontsserif etc

 what am I missing?

Two things:

* the LaTeX fonts (ttf works only with XeTeX (or some nasty tricks)).

  Install texlive-fonts-extra (the TeXLive2009 version from
  Debian/testing).

* the tip that the GUI font settings are restricted and you must use
  [Default] + code in the LaTeX preamble (in this case
  
 \usepackage{libertine}
  
  ) for many fonts.

Günter




Re: How I can add a new button to the tool bar?

2010-02-01 Thread Olivier Ripoll

Uwe Stöhr wrote:

Am 31.01.2010 23:15, schrieb Marcelo Acuña:

I need to make many changes in the size of the letters, and also to 
put bold or normal, in texts in which I must emphasize certain parts.
  It would help me much to have buttons such as those of emphasized 
and noum.

  How I can add them to the tool bar?


Toggling bold can be done withe the shortcut Ctrl+B. The toolbar 
button named Font (with the small arrow below) can be used to apply 
changes multiple times. It takes the last settings of the text style 
dialog. So when you e.g. have to make 50 words bold, italic, green, 
highlight one word and use the text style dialog to apply the changes.l 
For all further words, highlight them and press the Font button.


In case this method is not what you need, you can add toolbar buttons by 
creating PNG-images (size 24x24 Pixels or smaller).


Hi Uwe,

I think LyX images need to be 20x20, at least on Windows with your 
version, or the result is ugly. I'd love it if LyX used same size as 
original Tango icons (22x22), I wouldn't have had to spend so many hours 
shrinking these icons pixel-per-pixel from 22 to 20.


I think in the case of the bold function, there is already (at least 
in your installer) an icon for it : font-bold.png


Name the image by 
the LyX-function it stands for (e.g. font-bold.png). In the text file 
stdtoolbars.inc add the toolbar button where you like it.

Finally reconfigure LyX.


In other words, Marcelo should add the following line
Item Toggle bold font-bold

in the file stdtoolbars.inc, precisely in the part where the following 
lines are:

Separator
Item Toggle emphasis font-emph
Item Toggle noun font-noun
Item Apply last textstyle-apply

The best would be to copy the original stdtoolbars.inc from the system 
folder (1) to the user LyX ui folder (2) and work on the copy.

More details being given in:
http://wiki.lyx.org/LyX/UserInterface

Best regards,

Olivier

(1) http://wiki.lyx.org/LyX/SystemDir
(2) http://wiki.lyx.org/LyX/UserDir




regards Uwe





Re: How I can add a new button to the tool bar?

2010-02-01 Thread Uwe Stöhr

Olivier Ripoll schrieb:

I think LyX images need to be 20x20, at least on Windows with your 
version, or the result is ugly.


When you have a look at the icons in the images folder, you see that 
there are icons with the size 24x24, 22x22 and 20x20; and all look OK 
for me in the toolbar.


I'd love it if LyX used same size as 
original Tango icons (22x22), I wouldn't have had to spend so many hours 
shrinking these icons pixel-per-pixel from 22 to 20.


I think in the case of the bold function, there is already (at least 
in your installer) an icon for it : font-bold.png


Yes, I therefore chose this as example.

regards Uwe


Re: Lyx - Sweave in MS WIndows XP

2010-02-01 Thread Jlaake

I posted a possible solution to your problem at:

http://yildizoglu.blogspot.com/2009/02/lyx-and-sweave-under-windows-xp.html
-- 
View this message in context: 
http://n2.nabble.com/Lyx-Sweave-in-MS-WIndows-XP-tp4284360p4494574.html
Sent from the LyX - Users mailing list archive at Nabble.com.


Re: How I can add a new button to the tool bar?

2010-02-01 Thread Olivier Ripoll

Uwe Stöhr wrote:

Olivier Ripoll schrieb:

I think LyX images need to be 20x20, at least on Windows with your 
version, or the result is ugly.


When you have a look at the icons in the images folder, you see that 
there are icons with the size 24x24, 22x22 and 20x20; and all look OK 
for me in the toolbar.


They don't for me: See attached picture, esp. the table float and the 
save icons. But since I'm not using those icons anyway... :-)


I'd love it if LyX used same size as original Tango icons (22x22), I 
wouldn't have had to spend so many hours shrinking these icons 
pixel-per-pixel from 22 to 20.


I think in the case of the bold function, there is already (at least 
in your installer) an icon for it : font-bold.png


Yes, I therefore chose this as example.

regards Uwe


Best regards,

Olivier
inline: LyX icon resizing.png

Character spacing in Lyx

2010-02-01 Thread Thomas Hedden
I am using Lyx 1.6.5 on Linux and want to apply, to some text, a character
attribute that is variously referred to as character spacing,
intercharacter spacing, inter-character spacing, or merely spacing,
and possibly other names as well. When used on pairs of characters,
it is also referred to as kerning. This attribute is widely used in
typography,
and is available in both Microsoft Word and in OpenOffice.org Writer.
When applied to some text, for example test text, it could spread the
text out like this t e s t   t e x t. Of course this effect can be imitated
as I did here, by inserting spaces between the letters. But doing this
changes the text. That is, instead of test text, it would then become
t[space]e[space]s[space]t[space][space][space]t[space]e[space]x[space]t.
I find this unacceptable. I have searched in the user interface and the
manual, and cannot find any information about this.
A few cryptic posts I have read refer to a package called soul, but it
does not come up when I query for lyx in the package manager
(using Fedora 11). I have also heard suggestions about writing a Latex
script or something like that.
Does anyone know whether this feature is supported and how to apply
this attribute to text?
Thanks in advance for any suggestions.
Tom


Re: linux-libertine fonts

2010-02-01 Thread Wolfgang Engelmann
Am Monday 01 February 2010 09:46:37 schrieb Guenter Milde:

Thanks for the answers to my question (libertine and unit package)

Wolfgang


Editing equations as latex rather than graphically.

2010-02-01 Thread Tim Hutt
Hi, I've searched but I can't find an answer: Is it possible to edit
the source latex code of equations rather than edit the equations in a
graphical way? I much prefer this method for equations and in my mind
it is one of the things that makes latex superior to for example, MS
Word.

If this isn't a feature I'd suggest something like CTRL-clicking on an
equation (also accessible by right-click-Edit Source) shows you the
source of the equation and lets you edit it.

Cheers,

-Tim


Re: grid image of pdf output

2010-02-01 Thread HL2050

I made another experiment today. I replaced Preview with Acrobat Reader 9.0
as a default on Mac OS Snow Leopard. Then the grid (net-like) image problem
was no longer a problem. 

It appears that LyX on Mac OS Snow Leopard still has compatibility problems
that need to be fixed. 
-- 
View this message in context: 
http://n2.nabble.com/grid-image-of-pdf-output-tp4483939p4496225.html
Sent from the LyX - Users mailing list archive at Nabble.com.


Re: Editing equations as latex rather than graphically.

2010-02-01 Thread rgheck

On 02/01/2010 01:54 PM, Tim Hutt wrote:

Hi, I've searched but I can't find an answer: Is it possible to edit
the source latex code of equations rather than edit the equations in a
graphical way? I much prefer this method for equations and in my mind
it is one of the things that makes latex superior to for example, MS
Word.

   
This is possible. First, you can enter LaTeX code at the keyboard, and 
then LyX will display it as graphical. So just type Ctrl-M to enter 
math mode and then start typing:

2^x + \sqrt 3 = \frac ...
Anything LyX doesn't understand it will display as raw commands.


If this isn't a feature I'd suggest something like CTRL-clicking on an
equation (also accessible by right-click-Edit Source) shows you the
source of the equation and lets you edit it.

   
Try ViewSource if you want to *see* the LaTeX. There is no provision 
for editing it directly. However, if you really want to edit LaTeX, try 
this. Highlight just the *inside* of a math inset. Now exit it and 
paste. You should get the raw LaTeX code. Edit it. Now highlight it and 
hit Ctrl-M again.


The request for roundtrip LaTeX editing is longstanding and difficult 
to implement. But the math case is special and actually wouldn't be that 
hard to do. As the workaround just given shows, LyX can essentially do 
this already. So you might file this special case, of math, as an 
enhancement request here: http://www.lyx.org/trac/wiki/BugTrackerHome.


rh



Re: Editing equations as latex rather than graphically.

2010-02-01 Thread Tim Hutt
On 1 February 2010 19:22, rgheck rgh...@bobjweil.com wrote:
 Try ViewSource if you want to *see* the LaTeX.

Ah yes, I did that in an equation and it is almost exactly what I want
- just need to be able to edit the text. Without looking at the code,
it doesn't look like you'd have to do much to make it editable. I
might have a go some time.

Cheers.


Re: Character spacing in Lyx

2010-02-01 Thread stephen's mailinglist account
On 1 February 2010 17:37, Thomas Hedden tho...@hedden.org wrote:
 I am using Lyx 1.6.5 on Linux and want to apply, to some text, a character
 attribute that is variously referred to as character spacing,
 intercharacter spacing, inter-character spacing, or merely spacing,
 and possibly other names as well. When used on pairs of characters,
 it is also referred to as kerning. This attribute is widely used in
 typography,
 and is available in both Microsoft Word and in OpenOffice.org Writer.
 When applied to some text, for example test text, it could spread the
 text out like this t e s t   t e x t. Of course this effect can be imitated
 as I did here, by inserting spaces between the letters. But doing this
 changes the text. That is, instead of test text, it would then become
 t[space]e[space]s[space]t[space][space][space]t[space]e[space]x[space]t.
 I find this unacceptable. I have searched in the user interface and the
 manual, and cannot find any information about this.
 A few cryptic posts I have read refer to a package called soul, but it
 does not come up when I query for lyx in the package manager
 (using Fedora 11). I have also heard suggestions about writing a Latex
 script or something like that.
 Does anyone know whether this feature is supported and how to apply
 this attribute to text?
 Thanks in advance for any suggestions.
 Tom

My first instinct is to ask why, since the underlying typesetting
engine kerns automatically? To quote one text based on the kerning
pairs defined in the font metrics file

Presumably you are trying to alter what LaTeX does by default.  You
could apparently alter these kerning pairs if that is what you want to
do for the whole document.  For odd cases you can use some ERT
(\kern+1pt) between letters - substitute unit as appropriate.

Otherwise look up documentation for LaTeX packages on CTAN (for
example soul: http://www.ctan.org/tex-archive/macros/latex/contrib/soul/
)


-- 
Stephen


Re: Editing equations as latex rather than graphically.

2010-02-01 Thread rgheck

On 02/01/2010 02:29 PM, Tim Hutt wrote:

On 1 February 2010 19:22, rgheckrgh...@bobjweil.com  wrote:
   

Try ViewSource if you want to *see* the LaTeX.
 

Ah yes, I did that in an equation and it is almost exactly what I want
- just need to be able to edit the text. Without looking at the code,
it doesn't look like you'd have to do much to make it editable. I
might have a go some time.

   
It's harder than you think, in the general case, because *reading* the 
LaTeX back is not trivial. In the math case, however, it isn't so hard, 
and it'd be easier to do it in the editing pane. All you have to do is 
have a special mode where LyX displays the raw LaTeX, which it knows how 
to generate. This would be kind of like the preview mode, where it 
displays a little picture. Switching back to LyX mode would then read 
the LaTeX---LyX knows how to do this in the math case---and display the 
LyX form.


rh



Re: How I can add a new button to the tool bar?

2010-02-01 Thread Uwe Stöhr

Olivier Ripoll schrieb:

When you have a look at the icons in the images folder, you see that 
there are icons with the size 24x24, 22x22 and 20x20; and all look OK 
for me in the toolbar.


They don't for me: See attached picture, esp. the table float and the 
save icons. But since I'm not using those icons anyway... :-)


I cannot see a problem. What do you find ugly?

regards Uwe


Re: Editing equations as latex rather than graphically.

2010-02-01 Thread James C. Sutherland

On Feb 1, 2010, at 12:29 PM, Tim Hutt wrote:

 On 1 February 2010 19:22, rgheck rgh...@bobjweil.com wrote:
 Try ViewSource if you want to *see* the LaTeX.
 
 Ah yes, I did that in an equation and it is almost exactly what I want
 - just need to be able to edit the text. Without looking at the code,
 it doesn't look like you'd have to do much to make it editable. I
 might have a go some time.
 
 Cheers.

Note that another option to see the LaTeX code is to copy the math environment 
into a text editor.  That will give you the raw LaTeX.

James

Re: Editing equations as latex rather than graphically.

2010-02-01 Thread Tommaso Cucinotta

rgheck wrote:

Ah yes, I did that in an equation and it is almost exactly what I want
- just need to be able to edit the text. Without looking at the code,
it doesn't look like you'd have to do much to make it editable. I
might have a go some time.
It's harder than you think, in the general case, because *reading* the 
LaTeX back is not trivial. In the math case, however, it isn't so 
hard, and it'd be easier to do it in the editing pane. All you have to 
do is have a special mode where LyX displays the raw LaTeX, which it 
knows how to generate. This would be kind of like the preview mode, 
where it displays a little picture. Switching back to LyX mode would 
then read the LaTeX---LyX knows how to do this in the math case---and 
display the LyX form.
One question: isn't it possible to handle this case like the other 
external-material objects ?


I mean, imagine you define another kind of external-material object, the 
External Equation type (e.g., a '*.eq' file), imagine you associate a 
text editor to such a type, and imagine you define a set of filters 
which just invoke externally LaTeX for computing the .eps of the file 
for both preview and print purposes. This way, for example, clicking on 
the image of the equation, would pop-up the external text editor on the 
.eq file, and after exiting it would be updated on the screen.

Wouldn't you achieve exactly what this user is looking for ?

   T.


Re: Editing equations as latex rather than graphically.

2010-02-01 Thread rgheck

On 02/01/2010 03:44 PM, Tommaso Cucinotta wrote:

rgheck wrote:

Ah yes, I did that in an equation and it is almost exactly what I want
- just need to be able to edit the text. Without looking at the code,
it doesn't look like you'd have to do much to make it editable. I
might have a go some time.
It's harder than you think, in the general case, because *reading* 
the LaTeX back is not trivial. In the math case, however, it isn't so 
hard, and it'd be easier to do it in the editing pane. All you have 
to do is have a special mode where LyX displays the raw LaTeX, which 
it knows how to generate. This would be kind of like the preview 
mode, where it displays a little picture. Switching back to LyX 
mode would then read the LaTeX---LyX knows how to do this in the math 
case---and display the LyX form.


One question: isn't it possible to handle this case like the other 
external-material objects ?


I mean, imagine you define another kind of external-material object, 
the External Equation type (e.g., a '*.eq' file), imagine you 
associate a text editor to such a type, and imagine you define a set 
of filters which just invoke externally LaTeX for computing the .eps 
of the file for both preview and print purposes. This way, for 
example, clicking on the image of the equation, would pop-up the 
external text editor on the .eq file, and after exiting it would be 
updated on the screen.

Wouldn't you achieve exactly what this user is looking for ?

I think this might be useful in some cases, assuming you just included 
the LaTeX, rather than an image. But my thought was that it should 
actually be fairly easy to switch back and forth between LaTeX mode and 
LyX mode, which many people might like. And then you can do this right 
inside LyX.


Richard



Re: Editing equations as latex rather than graphically.

2010-02-01 Thread Tommaso Cucinotta

rgheck wrote:
One question: isn't it possible to handle this case like the other 
external-material objects ?


I mean, imagine you define another kind of external-material object, 
the External Equation type (e.g., a '*.eq' file), imagine you 
associate a text editor to such a type, and imagine you define a set 
of filters which just invoke externally LaTeX for computing the .eps 
of the file for both preview and print purposes. This way, for 
example, clicking on the image of the equation, would pop-up the 
external text editor on the .eq file, and after exiting it would be 
updated on the screen.

Wouldn't you achieve exactly what this user is looking for ?
In fact, the attached patch achieves such behaviour easily. If you have 
a .eq file with a contents such as:


 \begin{equation}
   U = \frac{C}{T}
 \end{equation}

then you can do Insert-File-External Material-[Equation (LaTeX)], 
then select your .eq file. Now, if you have Instant Preview enabled in 
preferences, you can see the formatted equation on the screen. 
Furthermore, right-click on it and select External Editor and you can 
edit it with emacs.
The difference w.r.t. an ERT block is that you can see the formatted 
result on the screen (but editing through an external editor is not as 
comfortable as a collapsable inset).


Was kind of a learning excercise -- just in case anyone finds such patch 
useful (btw, I find the built-in LyX WYSIWYG/M equation editor 
extraordinary).


   T.

Index: lib/scripts/eq2eps.py
===
--- lib/scripts/eq2eps.py	(revisione 0)
+++ lib/scripts/eq2eps.py	(revisione 0)
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# file eq2eps.py
+# This file is part of LyX, the document processor.
+# Licence details can be found in the file COPYING.
+#
+# \author Angus Leeming
+# \author Bo Peng
+# \author Tommaso Cucinotta
+#
+# Full author contact details are available in file CREDITS
+
+
+# This script converts a LaTeX equation (EQ) to Encapsulated PostScript (EPS).
+
+# Usage:
+#   python eq2eps.py ${base}.eq ${base}.eps
+# This command generates
+#   ${base}.epsthe converted eps file
+
+import os, sys
+
+# We expect two args, the names of the input and output files.
+if len(sys.argv) != 3:
+sys.exit(1)
+
+input, output = sys.argv[1:]
+
+# Fail silently if the file doesn't exist
+if not os.path.isfile(input):
+sys.exit(0)
+
+# Strip the extension from ${input}
+inbase = os.path.splitext(input)[0]
+# Strip the extension from ${output}
+outbase = os.path.splitext(output)[0]
+
+# Generate the EPS file
+print 'latex -jobname=%s \\documentclass{article}\\pagestyle{empty}\\begin{document}\\input{%s}\\end{document}' % (inbase,input)
+if os.system('latex -jobname=%s \\documentclass{article}\\pagestyle{empty}\\begin{document}\\input{%s}\\end{document}' % (inbase,input)) != 0 or \
+  os.system('dvips -E -o %s.eps %s.dvi' % (outbase, inbase)) != 0:
+  print 'eq2eps fails'
+  sys.exit(1)
Index: lib/external_templates
===
--- lib/external_templates	(revisione 33314)
+++ lib/external_templates	(copia locale)
@@ -159,6 +159,35 @@
 TemplateEnd
 
 
+Template Equation-LaTeX
+	GuiName Eq: $$AbsOrRelPathParent$$Basename
+	HelpText
+		A LaTeX Equation
+	HelpTextEnd
+	InputFormat eq
+	FileFilter *.eq
+	AutomaticProduction true
+	Transform Rotate
+	Transform Resize
+	Transform Clip
+	Transform Extra
+	Preview InstantPreview
+	Format LaTeX
+		TransformOption Rotate RotationLatexOption
+		TransformOption Resize ResizeLatexOption
+		TransformOption Clip   ClipLatexOption
+		TransformOption Extra  ExtraOption
+		Option Arg [$$Extra,$$Rotate,$$Resize,$$Clip]
+		Product \\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}
+		UpdateFormat eps
+		UpdateResult $$AbsPath$$Basename.eps
+		Requirement graphicx
+		ReferencedFile latex $$AbsPath$$Basename.eps
+		ReferencedFile dvi   $$AbsPath$$Basename.eps
+	FormatEnd
+TemplateEnd
+
+
 Template ChessDiagram
 	GuiName Chess: $$AbsOrRelPathParent$$Basename
 	HelpText
Index: lib/configure.py
===
--- lib/configure.py	(revisione 33314)
+++ lib/configure.py	(copia locale)
@@ -507,6 +507,7 @@
 \Format sweave RnwSweaveS   %%document
 \Format lilypond   ly LilyPond music 	%%	vector
 \Format latex  texLaTeX (plain) L  	%%	document
+\Format eq eq Equation (LaTeX)  L  	%%	document
 \Format pdflatex   texLaTeX (pdflatex)   	%%	document
 \Format xetex  texLaTeX (XeTeX)  	%%	document
 \Format text   txtPlain texta  	%%	document
@@ -585,6 +586,9 @@
 
 def checkConverterEntries():
 ''' Check all converters (\converter entries) '''
+addToRC(r'''\converter eq epspython -tt $$s/scripts/eq2eps.py $$i $$o	
+''')
+
 checkProg('the pdflatex program', ['pdflatex $$i'],
   

Re: Editing equations as latex rather than graphically.

2010-02-01 Thread rgheck

On 02/01/2010 05:42 PM, Tommaso Cucinotta wrote:

rgheck wrote:
One question: isn't it possible to handle this case like the other 
external-material objects ?


I mean, imagine you define another kind of external-material object, 
the External Equation type (e.g., a '*.eq' file), imagine you 
associate a text editor to such a type, and imagine you define a set 
of filters which just invoke externally LaTeX for computing the .eps 
of the file for both preview and print purposes. This way, for 
example, clicking on the image of the equation, would pop-up the 
external text editor on the .eq file, and after exiting it would be 
updated on the screen.

Wouldn't you achieve exactly what this user is looking for ?
In fact, the attached patch achieves such behaviour easily. If you 
have a .eq file with a contents such as:


 \begin{equation}
   U = \frac{C}{T}
 \end{equation}

then you can do Insert-File-External Material-[Equation (LaTeX)], 
then select your .eq file. Now, if you have Instant Preview enabled 
in preferences, you can see the formatted equation on the screen. 
Furthermore, right-click on it and select External Editor and you 
can edit it with emacs.
The difference w.r.t. an ERT block is that you can see the formatted 
result on the screen (but editing through an external editor is not as 
comfortable as a collapsable inset).


Was kind of a learning excercise -- just in case anyone finds such 
patch useful (btw, I find the built-in LyX WYSIWYG/M equation editor 
extraordinary).


I think you should post this to devel and commit it. In the case of very 
complex equations, which would basically be nothing but ERT, it could be 
very useful. LyX can handle it, of course, but perhaps not with the 
kinds of comments and so forth one might want. I'm sure there are some 
people in this sort of predicament.


I hate to be greedy here, but does this handle math macros defined 
earlier in the document? That would be a good addition, if not. And it 
would, as it happens, allow me to use exactly this script for exporting 
little math images during XHTML output (if someone wanted a given 
equation to be output that way).


Richard



Re: Editing equations as latex rather than graphically.

2010-02-01 Thread Vincent


The difference w.r.t. an ERT block is that you can see the formatted 
result on the screen (but editing through an external editor is not as 
comfortable as a collapsable inset).



Remember I have the InsetPreview in my back pocket :)

I didn't follow the thread further, so I don't know what the question 
is/was, but it seems perfect that with the InsetPreview, you can 
generate a preview of an ERT.


Vincent



Weird error LyX........

2010-02-01 Thread M-L

I've created a letter template and used it and converted it to .pdf
many times in the past with this in the preamble:

%
%% Here you can modify the layout of your letter
%% Have a look at the KOMA script documentation
%% for details. Most commands are commented out
%% here (i.e. we use default settings)
%

%% Load an *.lco style file (see KOMA documentation)
%%\LoadLetterOption{DIN}%  

% vertical position of the address field
\...@addtoplength{toaddrvpos}{2mm}
% space between ref line and letter text
\...@setplength{refaftervskip}{-1cm}
% position from top of page of Sender Name thanks to: Jean-Marie
%Pacquet \...@addtoplength{firstheadvpos}{2cm}

%% THE CLASS OPTIONS
%% Remove preceeding '%' to uncomment an item
\KOMAoptions{%
,headsepline=false%separate the header with a line on page
1 ,footsepline=false% separate the footer with a line on
page 1
%pagenumber=botcenter%   position of the page number (see docu)
%,parskip=false%  Use indent instead of skip (more options cf.
docu) ,fromalign=left%alignment of the address
,fromrule=aftername%separate the address with a line?
,fromphone=false% print sender phone number
%,fromfax=true%  print sender fax number
,fromemail=false%   print sender e-mail address
,fromurl=false%   print sender URL
%,fromlogo=true% print a logo (position depends on fromalign)
%,addrfield=false%print an address field?
%,backaddress=false%  print the back address?
%,subject=afteropening,titled% alternative subject layout and position
%,locfield=narrow%  width of the (extra) location field
,foldmarks=false%  print foldmarks?
%,numericaldate=true%  date layout
%,refline=wide% layout of the refline
}

%% Customize Separators
%\setkomavar{placeseparator}{ -- }
%\setkomavar{backaddressseparator}{ $\cdot$ }
%%\setkomavar{emailseparator}{}
%\setkomavar{enclseparator}{  }
%\setkomavar{faxseparator}{ -- }
%\setkomavar{phoneseparator}{ -- }
%\setkomavar{subjectseparator}{  }

%% Customize fonts
%% Use LaTeX's standard font commands
%% Modify with \setkomafont or \addtokomafont
%% (see KOMA documentation)
%\setkomafont{backaddress}{\rmfamily}
%\setkomafont{descriptionlabel}{}
\setkomafont{fromaddress}{\small}
\setkomafont{fromname}{\bf}
%\setkomafont{pagefoot}{utopia}
%\setkomafont{pagehead}{}
%\setkomafont{pagenumber}{}
%\setkomafont{subject}{}
%\setkomafont{title}{}
\hyphenpenalty=1
\usepackage{xcolor}
\usepackage{hyperref}
\hypersetup{colorlinks=true,urlcolor=blue}
\usepackage[OT1,T1]{fontenc}
\usepackage{times}

But suddenly I get this silly error message:

Package scrkbase Error: Unknown KOMA option `',

 }
  
You have used \KOMAoptions to set `',
but KOMA-Script does not know any option named `'.
See the KOMA-Script manual for more informations about options and
their values.

I can't find it in the document any place at all, and I've loaded the
document with a text editor without being able to find that `',

what is it a ' a ` or a ,

TIA
Charlie
-- 
Registered Linux User:- 329524
***
We need only travel enough to give our intellects an
airing. .Henry David Thoreau

***
Debian GNU/Linux - just the best way to create magic
___


Re: unit package

2010-02-01 Thread Wolfgang Engelmann
Am Saturday 30 January 2010 21:19:01 schrieb Kenward Vaughan:
 math menu--fractions button

A few more questions re typography:

1- how about 20 and 150g? Would one use unit(864m) (example from the math 
menu--fractions button) and keep in the first case (20) the second blue box 
empty, and in the second case fill in 150, first box, g, second box?

2- In the (German) math LyX explanation it is stated under 22 Hints: A. 
Typographische Hinweise (Typo hints)

• Physikalische Einheiten werden immer aufrecht gesetzt: 30 km/h
physical units are always set upright: 30 km/h

Does this apply also for the following:
I am using italics for the legends. If they contain units such as (864m), 
should they still be upright?

3- What is the correct spacing for e.g. 
10:30o'clock (the :)
and for 
Donnerstag, den 31.6., (the . and ,)


Wolfgang


Re: queries re images

2010-02-01 Thread Guenter Milde
On 2010-01-31, Uwe Stöhr wrote:

>> Later I will want to have captions that
>> are simply descriptive and don't have "Figure X" in the front of them. How
>> do I turn off the automatic numbering?

> This is tricky because this is quite unusual when tpesetting. Have a
> look in the documentation of the LaTeX-package "caption" for a
> description how the numbering and label "Figure" can be suppressed.

How about using a standard paragraph instead of a caption? 

Should be easy:

* delete the empty caption paragraph that is input by default for every
  new float (as most users *do* want it), 
* insert the image, 
* press Enter to get a new paragraph, 
* write your informal caption.

Günter



Re: linux-libertine fonts

2010-02-01 Thread Guenter Milde
On 2010-01-30, Wolfgang Engelmann wrote:

> I have installed the
> ttf-linux-libertine (4.4.1-4)
> family of fonts
> under Debian (using synaptics)
> texhash and reconfigure of LyX
> but can't get it under Document>settings>fonts>serif etc

> what am I missing?

Two things:

* the LaTeX fonts (ttf works only with XeTeX (or some nasty tricks)).

  Install texlive-fonts-extra (the TeXLive2009 version from
  Debian/testing).

* the tip that the GUI font settings are restricted and you must use
  [Default] + code in the LaTeX preamble (in this case
  
 \usepackage{libertine}
  
  ) for many fonts.

Günter




Re: How I can add a new button to the tool bar?

2010-02-01 Thread Olivier Ripoll

Uwe Stöhr wrote:

Am 31.01.2010 23:15, schrieb Marcelo Acuña:

I need to make many changes in the size of the letters, and also to 
put bold or normal, in texts in which I must emphasize certain parts.
  It would help me much to have buttons such as those of emphasized 
and noum.

  How I can add them to the tool bar?


Toggling bold can be done withe the shortcut "Ctrl+B". The toolbar 
button named "Font" (with the small arrow below) can be used to apply 
changes multiple times. It takes the last settings of the text style 
dialog. So when you e.g. have to make 50 words bold, italic, green, 
highlight one word and use the text style dialog to apply the changes.l 
For all further words, highlight them and press the "Font" button.


In case this method is not what you need, you can add toolbar buttons by 
creating PNG-images (size 24x24 Pixels or smaller).


Hi Uwe,

I think LyX images need to be 20x20, at least on Windows with your 
version, or the result is ugly. I'd love it if LyX used same size as 
original Tango icons (22x22), I wouldn't have had to spend so many hours 
shrinking these icons pixel-per-pixel from 22 to 20.


I think in the case of the "bold" function, there is already (at least 
in your installer) an icon for it : "font-bold.png"


Name the image by 
the LyX-function it stands for (e.g. "font-bold.png"). In the text file 
"stdtoolbars.inc" add the toolbar button where you like it.

Finally reconfigure LyX.


In other words, Marcelo should add the following line
Item "Toggle bold" "font-bold"

in the file "stdtoolbars.inc", precisely in the part where the following 
lines are:

Separator
Item "Toggle emphasis" "font-emph"
Item "Toggle noun" "font-noun"
Item "Apply last" "textstyle-apply"

The best would be to copy the original "stdtoolbars.inc" from the system 
folder (1) to the user LyX "ui" folder (2) and work on the copy.

More details being given in:
http://wiki.lyx.org/LyX/UserInterface

Best regards,

Olivier

(1) http://wiki.lyx.org/LyX/SystemDir
(2) http://wiki.lyx.org/LyX/UserDir




regards Uwe





Re: How I can add a new button to the tool bar?

2010-02-01 Thread Uwe Stöhr

Olivier Ripoll schrieb:

I think LyX images need to be 20x20, at least on Windows with your 
version, or the result is ugly.


When you have a look at the icons in the "images" folder, you see that 
there are icons with the size 24x24, 22x22 and 20x20; and all look OK 
for me in the toolbar.


I'd love it if LyX used same size as 
original Tango icons (22x22), I wouldn't have had to spend so many hours 
shrinking these icons pixel-per-pixel from 22 to 20.


I think in the case of the "bold" function, there is already (at least 
in your installer) an icon for it : "font-bold.png"


Yes, I therefore chose this as example.

regards Uwe


Re: Lyx - Sweave in MS WIndows XP

2010-02-01 Thread Jlaake

I posted a possible solution to your problem at:

http://yildizoglu.blogspot.com/2009/02/lyx-and-sweave-under-windows-xp.html
-- 
View this message in context: 
http://n2.nabble.com/Lyx-Sweave-in-MS-WIndows-XP-tp4284360p4494574.html
Sent from the LyX - Users mailing list archive at Nabble.com.


Re: How I can add a new button to the tool bar?

2010-02-01 Thread Olivier Ripoll

Uwe Stöhr wrote:

Olivier Ripoll schrieb:

I think LyX images need to be 20x20, at least on Windows with your 
version, or the result is ugly.


When you have a look at the icons in the "images" folder, you see that 
there are icons with the size 24x24, 22x22 and 20x20; and all look OK 
for me in the toolbar.


They don't for me: See attached picture, esp. the "table float" and the 
"save" icons. But since I'm not using those icons anyway... :-)


I'd love it if LyX used same size as original Tango icons (22x22), I 
wouldn't have had to spend so many hours shrinking these icons 
pixel-per-pixel from 22 to 20.


I think in the case of the "bold" function, there is already (at least 
in your installer) an icon for it : "font-bold.png"


Yes, I therefore chose this as example.

regards Uwe


Best regards,

Olivier
<>

Character spacing in Lyx

2010-02-01 Thread Thomas Hedden
I am using Lyx 1.6.5 on Linux and want to apply, to some text, a character
attribute that is variously referred to as "character spacing",
"intercharacter spacing", "inter-character spacing", or merely "spacing",
and possibly other names as well. When used on pairs of characters,
it is also referred to as "kerning". This attribute is widely used in
typography,
and is available in both Microsoft Word and in OpenOffice.org Writer.
When applied to some text, for example "test text", it could spread the
text out like this "t e s t   t e x t". Of course this effect can be imitated
as I did here, by inserting spaces between the letters. But doing this
changes the text. That is, instead of "test text", it would then become
"t[space]e[space]s[space]t[space][space][space]t[space]e[space]x[space]t".
I find this unacceptable. I have searched in the user interface and the
manual, and cannot find any information about this.
A few cryptic posts I have read refer to a package called "soul", but it
does not come up when I query for "lyx" in the package manager
(using Fedora 11). I have also heard suggestions about writing a Latex
script or something like that.
Does anyone know whether this feature is supported and how to apply
this attribute to text?
Thanks in advance for any suggestions.
Tom


Re: linux-libertine fonts

2010-02-01 Thread Wolfgang Engelmann
Am Monday 01 February 2010 09:46:37 schrieb Guenter Milde:

Thanks for the answers to my question (libertine and unit package)

Wolfgang


Editing equations as latex rather than graphically.

2010-02-01 Thread Tim Hutt
Hi, I've searched but I can't find an answer: Is it possible to edit
the source latex code of equations rather than edit the equations in a
graphical way? I much prefer this method for equations and in my mind
it is one of the things that makes latex superior to for example, MS
Word.

If this isn't a feature I'd suggest something like CTRL-clicking on an
equation (also accessible by right-click->Edit Source) shows you the
source of the equation and lets you edit it.

Cheers,

-Tim


Re: grid image of pdf output

2010-02-01 Thread HL2050

I made another experiment today. I replaced Preview with Acrobat Reader 9.0
as a default on Mac OS Snow Leopard. Then the grid (net-like) image problem
was no longer a problem. 

It appears that LyX on Mac OS Snow Leopard still has compatibility problems
that need to be fixed. 
-- 
View this message in context: 
http://n2.nabble.com/grid-image-of-pdf-output-tp4483939p4496225.html
Sent from the LyX - Users mailing list archive at Nabble.com.


Re: Editing equations as latex rather than graphically.

2010-02-01 Thread rgheck

On 02/01/2010 01:54 PM, Tim Hutt wrote:

Hi, I've searched but I can't find an answer: Is it possible to edit
the source latex code of equations rather than edit the equations in a
graphical way? I much prefer this method for equations and in my mind
it is one of the things that makes latex superior to for example, MS
Word.

   
This is possible. First, you can enter LaTeX code at the keyboard, and 
then LyX will display it as "graphical". So just type Ctrl-M to enter 
math mode and then start typing:

2^x + \sqrt 3 = \frac ...
Anything LyX doesn't understand it will display as raw commands.


If this isn't a feature I'd suggest something like CTRL-clicking on an
equation (also accessible by right-click->Edit Source) shows you the
source of the equation and lets you edit it.

   
Try View>Source if you want to *see* the LaTeX. There is no provision 
for editing it directly. However, if you really want to edit LaTeX, try 
this. Highlight just the *inside* of a math inset. Now exit it and 
paste. You should get the raw LaTeX code. Edit it. Now highlight it and 
hit Ctrl-M again.


The request for "roundtrip" LaTeX editing is longstanding and difficult 
to implement. But the math case is special and actually wouldn't be that 
hard to do. As the workaround just given shows, LyX can essentially do 
this already. So you might file this special case, of math, as an 
enhancement request here: http://www.lyx.org/trac/wiki/BugTrackerHome.


rh



Re: Editing equations as latex rather than graphically.

2010-02-01 Thread Tim Hutt
On 1 February 2010 19:22, rgheck  wrote:
> Try View>Source if you want to *see* the LaTeX.

Ah yes, I did that in an equation and it is almost exactly what I want
- just need to be able to edit the text. Without looking at the code,
it doesn't look like you'd have to do much to make it editable. I
might have a go some time.

Cheers.


Re: Character spacing in Lyx

2010-02-01 Thread stephen's mailinglist account
On 1 February 2010 17:37, Thomas Hedden  wrote:
> I am using Lyx 1.6.5 on Linux and want to apply, to some text, a character
> attribute that is variously referred to as "character spacing",
> "intercharacter spacing", "inter-character spacing", or merely "spacing",
> and possibly other names as well. When used on pairs of characters,
> it is also referred to as "kerning". This attribute is widely used in
> typography,
> and is available in both Microsoft Word and in OpenOffice.org Writer.
> When applied to some text, for example "test text", it could spread the
> text out like this "t e s t   t e x t". Of course this effect can be imitated
> as I did here, by inserting spaces between the letters. But doing this
> changes the text. That is, instead of "test text", it would then become
> "t[space]e[space]s[space]t[space][space][space]t[space]e[space]x[space]t".
> I find this unacceptable. I have searched in the user interface and the
> manual, and cannot find any information about this.
> A few cryptic posts I have read refer to a package called "soul", but it
> does not come up when I query for "lyx" in the package manager
> (using Fedora 11). I have also heard suggestions about writing a Latex
> script or something like that.
> Does anyone know whether this feature is supported and how to apply
> this attribute to text?
> Thanks in advance for any suggestions.
> Tom
>
My first instinct is to ask why, since the underlying typesetting
engine kerns automatically? To quote one text "based on the kerning
pairs defined in the font metrics file"

Presumably you are trying to alter what LaTeX does by default.  You
could apparently alter these kerning pairs if that is what you want to
do for the whole document.  For odd cases you can use some ERT
(\kern+1pt) between letters - substitute unit as appropriate.

Otherwise look up documentation for LaTeX packages on CTAN (for
example soul: http://www.ctan.org/tex-archive/macros/latex/contrib/soul/
)


-- 
Stephen


Re: Editing equations as latex rather than graphically.

2010-02-01 Thread rgheck

On 02/01/2010 02:29 PM, Tim Hutt wrote:

On 1 February 2010 19:22, rgheck  wrote:
   

Try View>Source if you want to *see* the LaTeX.
 

Ah yes, I did that in an equation and it is almost exactly what I want
- just need to be able to edit the text. Without looking at the code,
it doesn't look like you'd have to do much to make it editable. I
might have a go some time.

   
It's harder than you think, in the general case, because *reading* the 
LaTeX back is not trivial. In the math case, however, it isn't so hard, 
and it'd be easier to do it in the editing pane. All you have to do is 
have a special mode where LyX displays the raw LaTeX, which it knows how 
to generate. This would be kind of like the "preview" mode, where it 
displays a little picture. Switching back to "LyX" mode would then read 
the LaTeX---LyX knows how to do this in the math case---and display the 
LyX form.


rh



Re: How I can add a new button to the tool bar?

2010-02-01 Thread Uwe Stöhr

Olivier Ripoll schrieb:

When you have a look at the icons in the "images" folder, you see that 
there are icons with the size 24x24, 22x22 and 20x20; and all look OK 
for me in the toolbar.


They don't for me: See attached picture, esp. the "table float" and the 
"save" icons. But since I'm not using those icons anyway... :-)


I cannot see a problem. What do you find ugly?

regards Uwe


Re: Editing equations as latex rather than graphically.

2010-02-01 Thread James C. Sutherland

On Feb 1, 2010, at 12:29 PM, Tim Hutt wrote:

> On 1 February 2010 19:22, rgheck  wrote:
>> Try View>Source if you want to *see* the LaTeX.
> 
> Ah yes, I did that in an equation and it is almost exactly what I want
> - just need to be able to edit the text. Without looking at the code,
> it doesn't look like you'd have to do much to make it editable. I
> might have a go some time.
> 
> Cheers.

Note that another option to see the LaTeX code is to copy the math environment 
into a text editor.  That will give you the raw LaTeX.

James

Re: Editing equations as latex rather than graphically.

2010-02-01 Thread Tommaso Cucinotta

rgheck wrote:

Ah yes, I did that in an equation and it is almost exactly what I want
- just need to be able to edit the text. Without looking at the code,
it doesn't look like you'd have to do much to make it editable. I
might have a go some time.
It's harder than you think, in the general case, because *reading* the 
LaTeX back is not trivial. In the math case, however, it isn't so 
hard, and it'd be easier to do it in the editing pane. All you have to 
do is have a special mode where LyX displays the raw LaTeX, which it 
knows how to generate. This would be kind of like the "preview" mode, 
where it displays a little picture. Switching back to "LyX" mode would 
then read the LaTeX---LyX knows how to do this in the math case---and 
display the LyX form.
One question: isn't it possible to handle this case like the other 
external-material objects ?


I mean, imagine you define another kind of external-material object, the 
"External Equation" type (e.g., a '*.eq' file), imagine you associate a 
text editor to such a type, and imagine you define a set of filters 
which just invoke externally LaTeX for computing the .eps of the file 
for both preview and print purposes. This way, for example, clicking on 
the image of the equation, would pop-up the external text editor on the 
.eq file, and after exiting it would be updated on the screen.

Wouldn't you achieve exactly what this user is looking for ?

   T.


Re: Editing equations as latex rather than graphically.

2010-02-01 Thread rgheck

On 02/01/2010 03:44 PM, Tommaso Cucinotta wrote:

rgheck wrote:

Ah yes, I did that in an equation and it is almost exactly what I want
- just need to be able to edit the text. Without looking at the code,
it doesn't look like you'd have to do much to make it editable. I
might have a go some time.
It's harder than you think, in the general case, because *reading* 
the LaTeX back is not trivial. In the math case, however, it isn't so 
hard, and it'd be easier to do it in the editing pane. All you have 
to do is have a special mode where LyX displays the raw LaTeX, which 
it knows how to generate. This would be kind of like the "preview" 
mode, where it displays a little picture. Switching back to "LyX" 
mode would then read the LaTeX---LyX knows how to do this in the math 
case---and display the LyX form.


One question: isn't it possible to handle this case like the other 
external-material objects ?


I mean, imagine you define another kind of external-material object, 
the "External Equation" type (e.g., a '*.eq' file), imagine you 
associate a text editor to such a type, and imagine you define a set 
of filters which just invoke externally LaTeX for computing the .eps 
of the file for both preview and print purposes. This way, for 
example, clicking on the image of the equation, would pop-up the 
external text editor on the .eq file, and after exiting it would be 
updated on the screen.

Wouldn't you achieve exactly what this user is looking for ?

I think this might be useful in some cases, assuming you just included 
the LaTeX, rather than an image. But my thought was that it should 
actually be fairly easy to switch back and forth between LaTeX mode and 
LyX mode, which many people might like. And then you can do this right 
inside LyX.


Richard



Re: Editing equations as latex rather than graphically.

2010-02-01 Thread Tommaso Cucinotta

rgheck wrote:
One question: isn't it possible to handle this case like the other 
external-material objects ?


I mean, imagine you define another kind of external-material object, 
the "External Equation" type (e.g., a '*.eq' file), imagine you 
associate a text editor to such a type, and imagine you define a set 
of filters which just invoke externally LaTeX for computing the .eps 
of the file for both preview and print purposes. This way, for 
example, clicking on the image of the equation, would pop-up the 
external text editor on the .eq file, and after exiting it would be 
updated on the screen.

Wouldn't you achieve exactly what this user is looking for ?
In fact, the attached patch achieves such behaviour easily. If you have 
a ".eq" file with a contents such as:


 \begin{equation}
   U = \frac{C}{T}
 \end{equation}

then you can do Insert->File->External Material->[Equation (LaTeX)], 
then select your .eq file. Now, if you have "Instant Preview" enabled in 
preferences, you can see the formatted equation on the screen. 
Furthermore, right-click on it and select "External Editor" and you can 
edit it with emacs.
The difference w.r.t. an ERT block is that you can see the formatted 
result on the screen (but editing through an external editor is not as 
comfortable as a collapsable inset).


Was kind of a learning excercise -- just in case anyone finds such patch 
useful (btw, I find the built-in LyX WYSIWYG/M equation editor 
extraordinary).


   T.

Index: lib/scripts/eq2eps.py
===
--- lib/scripts/eq2eps.py	(revisione 0)
+++ lib/scripts/eq2eps.py	(revisione 0)
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# file eq2eps.py
+# This file is part of LyX, the document processor.
+# Licence details can be found in the file COPYING.
+#
+# \author Angus Leeming
+# \author Bo Peng
+# \author Tommaso Cucinotta
+#
+# Full author contact details are available in file CREDITS
+
+
+# This script converts a LaTeX equation (EQ) to Encapsulated PostScript (EPS).
+
+# Usage:
+#   python eq2eps.py ${base}.eq ${base}.eps
+# This command generates
+#   ${base}.epsthe converted eps file
+
+import os, sys
+
+# We expect two args, the names of the input and output files.
+if len(sys.argv) != 3:
+sys.exit(1)
+
+input, output = sys.argv[1:]
+
+# Fail silently if the file doesn't exist
+if not os.path.isfile(input):
+sys.exit(0)
+
+# Strip the extension from ${input}
+inbase = os.path.splitext(input)[0]
+# Strip the extension from ${output}
+outbase = os.path.splitext(output)[0]
+
+# Generate the EPS file
+print 'latex -jobname=%s "\\documentclass{article}\\pagestyle{empty}\\begin{document}\\input{%s}\\end{document}"' % (inbase,input)
+if os.system('latex -jobname=%s "\\documentclass{article}\\pagestyle{empty}\\begin{document}\\input{%s}\\end{document}"' % (inbase,input)) != 0 or \
+  os.system('dvips -E -o %s.eps %s.dvi' % (outbase, inbase)) != 0:
+  print 'eq2eps fails'
+  sys.exit(1)
Index: lib/external_templates
===
--- lib/external_templates	(revisione 33314)
+++ lib/external_templates	(copia locale)
@@ -159,6 +159,35 @@
 TemplateEnd
 
 
+Template Equation-LaTeX
+	GuiName "Eq: $$AbsOrRelPathParent$$Basename"
+	HelpText
+		A LaTeX Equation
+	HelpTextEnd
+	InputFormat eq
+	FileFilter "*.eq"
+	AutomaticProduction true
+	Transform Rotate
+	Transform Resize
+	Transform Clip
+	Transform Extra
+	Preview InstantPreview
+	Format LaTeX
+		TransformOption Rotate RotationLatexOption
+		TransformOption Resize ResizeLatexOption
+		TransformOption Clip   ClipLatexOption
+		TransformOption Extra  ExtraOption
+		Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
+		Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
+		UpdateFormat eps
+		UpdateResult "$$AbsPath$$Basename.eps"
+		Requirement "graphicx"
+		ReferencedFile latex "$$AbsPath$$Basename.eps"
+		ReferencedFile dvi   "$$AbsPath$$Basename.eps"
+	FormatEnd
+TemplateEnd
+
+
 Template ChessDiagram
 	GuiName "Chess: $$AbsOrRelPathParent$$Basename"
 	HelpText
Index: lib/configure.py
===
--- lib/configure.py	(revisione 33314)
+++ lib/configure.py	(copia locale)
@@ -507,6 +507,7 @@
 \Format sweave Rnw"Sweave"S  "" "%%""document"
 \Format lilypond   ly "LilyPond music""" ""	"%%"	"vector"
 \Format latex  tex"LaTeX (plain)" L  ""	"%%"	"document"
+\Format eq eq "Equation (LaTeX)"  L  ""	"%%"	"document"
 \Format pdflatex   tex"LaTeX (pdflatex)"  "" ""	"%%"	"document"
 \Format xetex  tex"LaTeX (XeTeX)" "" ""	"%%"	"document"
 \Format text   txt"Plain text"a  ""	"%%"	"document"
@@ -585,6 +586,9 @@
 
 def checkConverterEntries():
 ''' Check all converters (\converter entries) '''
+addToRC(r'''\converter eq eps"python -tt 

Re: Editing equations as latex rather than graphically.

2010-02-01 Thread rgheck

On 02/01/2010 05:42 PM, Tommaso Cucinotta wrote:

rgheck wrote:
One question: isn't it possible to handle this case like the other 
external-material objects ?


I mean, imagine you define another kind of external-material object, 
the "External Equation" type (e.g., a '*.eq' file), imagine you 
associate a text editor to such a type, and imagine you define a set 
of filters which just invoke externally LaTeX for computing the .eps 
of the file for both preview and print purposes. This way, for 
example, clicking on the image of the equation, would pop-up the 
external text editor on the .eq file, and after exiting it would be 
updated on the screen.

Wouldn't you achieve exactly what this user is looking for ?
In fact, the attached patch achieves such behaviour easily. If you 
have a ".eq" file with a contents such as:


 \begin{equation}
   U = \frac{C}{T}
 \end{equation}

then you can do Insert->File->External Material->[Equation (LaTeX)], 
then select your .eq file. Now, if you have "Instant Preview" enabled 
in preferences, you can see the formatted equation on the screen. 
Furthermore, right-click on it and select "External Editor" and you 
can edit it with emacs.
The difference w.r.t. an ERT block is that you can see the formatted 
result on the screen (but editing through an external editor is not as 
comfortable as a collapsable inset).


Was kind of a learning excercise -- just in case anyone finds such 
patch useful (btw, I find the built-in LyX WYSIWYG/M equation editor 
extraordinary).


I think you should post this to devel and commit it. In the case of very 
complex equations, which would basically be nothing but ERT, it could be 
very useful. LyX can handle it, of course, but perhaps not with the 
kinds of comments and so forth one might want. I'm sure there are some 
people in this sort of predicament.


I hate to be greedy here, but does this handle math macros defined 
earlier in the document? That would be a good addition, if not. And it 
would, as it happens, allow me to use exactly this script for exporting 
little math images during XHTML output (if someone wanted a given 
equation to be output that way).


Richard



Re: Editing equations as latex rather than graphically.

2010-02-01 Thread Vincent


The difference w.r.t. an ERT block is that you can see the formatted 
result on the screen (but editing through an external editor is not as 
comfortable as a collapsable inset).



Remember I have the InsetPreview in my back pocket :)

I didn't follow the thread further, so I don't know what the question 
is/was, but it seems perfect that with the InsetPreview, you can 
generate a preview of an ERT.


Vincent



Weird error LyX........

2010-02-01 Thread M-L

I've created a letter template and used it and converted it to .pdf
many times in the past with this in the preamble:

%
%% Here you can modify the layout of your letter
%% Have a look at the KOMA script documentation
%% for details. Most commands are commented out
%% here (i.e. we use default settings)
%

%% Load an *.lco style file (see KOMA documentation)
%%\LoadLetterOption{DIN}%  

% vertical position of the address field
\...@addtoplength{toaddrvpos}{2mm}
% space between ref line and letter text
\...@setplength{refaftervskip}{-1cm}
% position from top of page of Sender Name thanks to: Jean-Marie
%Pacquet \...@addtoplength{firstheadvpos}{2cm}

%% THE CLASS OPTIONS
%% Remove preceeding '%' to uncomment an item
\KOMAoptions{%
,headsepline=false%separate the header with a line on page
>1 ,footsepline=false% separate the footer with a line on
>page >1
%pagenumber=botcenter%   position of the page number (see docu)
%,parskip=false%  Use indent instead of skip (more options cf.
docu) ,fromalign=left%alignment of the address
,fromrule=aftername%separate the address with a line?
,fromphone=false% print sender phone number
%,fromfax=true%  print sender fax number
,fromemail=false%   print sender e-mail address
,fromurl=false%   print sender URL
%,fromlogo=true% print a logo (position depends on fromalign)
%,addrfield=false%print an address field?
%,backaddress=false%  print the back address?
%,subject=afteropening,titled% alternative subject layout and position
%,locfield=narrow%  width of the (extra) location field
,foldmarks=false%  print foldmarks?
%,numericaldate=true%  date layout
%,refline=wide% layout of the refline
}

%% Customize Separators
%\setkomavar{placeseparator}{ -- }
%\setkomavar{backaddressseparator}{ $\cdot$ }
%%\setkomavar{emailseparator}{}
%\setkomavar{enclseparator}{ > }
%\setkomavar{faxseparator}{ --> }
%\setkomavar{phoneseparator}{ --> }
%\setkomavar{subjectseparator}{ >>> }

%% Customize fonts
%% Use LaTeX's standard font commands
%% Modify with \setkomafont or \addtokomafont
%% (see KOMA documentation)
%\setkomafont{backaddress}{\rmfamily}
%\setkomafont{descriptionlabel}{}
\setkomafont{fromaddress}{\small}
\setkomafont{fromname}{\bf}
%\setkomafont{pagefoot}{utopia}
%\setkomafont{pagehead}{}
%\setkomafont{pagenumber}{}
%\setkomafont{subject}{}
%\setkomafont{title}{}
\hyphenpenalty=1
\usepackage{xcolor}
\usepackage{hyperref}
\hypersetup{colorlinks=true,urlcolor=blue}
\usepackage[OT1,T1]{fontenc}
\usepackage{times}

But suddenly I get this silly error message:

Package scrkbase Error: Unknown KOMA option `',

 }
  
You have used \KOMAoptions to set `',
but KOMA-Script does not know any option named `'.
See the KOMA-Script manual for more informations about options and
their values.

I can't find it in the document any place at all, and I've loaded the
document with a text editor without being able to find that `',

what is it a <'> a <`> or a <,>

TIA
Charlie
-- 
Registered Linux User:- 329524
***
We need only travel enough to give our intellects an
airing. .Henry David Thoreau

***
Debian GNU/Linux - just the best way to create magic
___


Re: unit package

2010-02-01 Thread Wolfgang Engelmann
Am Saturday 30 January 2010 21:19:01 schrieb Kenward Vaughan:
> math menu--fractions button

A few more questions re typography:

1- how about 20 and 150g? Would one use unit(864m) (example from the math 
menu--fractions button) and keep in the first case (20) the second blue box 
empty, and in the second case fill in 150, first box, g, second box?

2- In the (German) math LyX explanation it is stated under 22 Hints: A. 
Typographische Hinweise (Typo hints)

• Physikalische Einheiten werden immer aufrecht gesetzt: 30 km/h
physical units are always set upright: 30 km/h

Does this apply also for the following:
I am using italics for the legends. If they contain units such as (864m), 
should they still be upright?

3- What is the correct spacing for e.g. 
10:30o'clock (the :)
and for 
Donnerstag, den 31.6., (the . and ,)


Wolfgang