Re: rc3

2008-09-27 Thread Bob J .

Kornel Benko wrote:
> > 1.) I had to add in the preamble "\usepackage{amssymb}" to resolve the
> > Error "Undefined control sequence \mathbb"

I also manually had to add "\usepackage{amssymb}" to the preamble.  I was 
exporting from the command line, e.g.

  lyx -e pdf newfile1.lyx

This happens in both Windows (LyX-16rc2-4-08-AltInstaller-Small.exe), and with 
the rc2 Linux source I compiled. (See 
http://bugzilla.lyx.org/show_bug.cgi?id=5263 )
_
See how Windows connects the people, information, and fun that are part of your 
life.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/

Re: Version Control on OS X

2008-09-27 Thread Christian Ridderström

On Sat, 27 Sep 2008, tim opie wrote:


Hi all,

am happy to add more stuff to the wiki if you would like to give me
the developer password for the mac wiki. I have been using Lyx on


I've sent the password off-list.

/Christian

--
Christian Ridderström, +46-8-768 39 44http://www.md.kth.se/~chr

[patch] make documents compilable that use hyperref and colorlinks

2008-09-27 Thread Uwe Stöhr

When using hyperref with the option colorlinks (that we support), hyperref 
loads the color package
\AtBeginDocument. But babel loads it too \AtBeginDocument, so that is not 
loaded when babel defined
shorthand characters.
Thus document with the languages Esperanto, Slovak, and some others are not 
compilable, see
http://bugzilla.lyx.org/show_bug.cgi?id=5291 (I attached there a testfile.)

Heiko Oberdiek, the hyperref developer, pointed me to the solution that color 
is loaded before babel
when hyperref is used with colorlinks.

The attached patch implements this. To be able to do that, I needed to handle 
the color packages
[x]color and pdfcolmk in a separate routine in LaTeXParams.cpp.

OK to go in?

regards Uwe
Index: BufferParams.cpp
===
--- BufferParams.cpp	(revision 26594)
+++ BufferParams.cpp	(working copy)
@@ -917,8 +917,14 @@
 		}
 	}
 
-	if (pdfoptions().use_hyperref)
+	if (pdfoptions().use_hyperref) {
 		features.require("hyperref");
+		// due to interferences with babel and hyperref, the color package has to
+		// be loaded after hyperref when hyperref is used with the colorlinks
+		// option, see http://bugzilla.lyx.org/show_bug.cgi?id=5291
+		if (pdfoptions().colorlinks)
+			features.require("color");
+	}
 
 	if (language->lang() == "vietnamese")
 		features.require("vietnamese");
@@ -1249,7 +1255,16 @@
 		texrow.newline();
 	}
 
-	// If we use hyperref, jurabib, japanese, or vietnamese, we have to call babel here.
+	// due to interferences with babel and hyperref, the color package has to
+	// be loaded (when it is not already loaded) before babel when hyperref
+	// is used with the colorlinks option, see
+	// http://bugzilla.lyx.org/show_bug.cgi?id=5291
+	if (use_babel && features.isRequired("hyperref") && pdfoptions().colorlinks) {
+		os << from_utf8(features.getColorOptions());
+		texrow.newline();
+	}
+
+	// If we use hyperref, jurabib, japanese, or vietnamese, we have to call babel before them.
 	if (use_babel
 		&& (features.isRequired("jurabib")
 			|| features.isRequired("hyperref")
@@ -1263,9 +1278,15 @@
 	}
 
 	// Now insert the LyX specific LaTeX commands...
+	docstring lyxpreamble;
 
+	// The color packages (when not loaded before babel)
+	// (have to be loaded before the optional packages)
+	if (!(use_babel && features.isRequired("hyperref") && pdfoptions().colorlinks))
+		lyxpreamble += from_utf8(features.getColorOptions());
+
 	// The optional packages;
-	docstring lyxpreamble(from_ascii(features.getPackages()));
+	lyxpreamble += from_utf8(features.getPackages());
 
 	// Line spacing
 	lyxpreamble += from_utf8(spacing().writePreamble(tclass.provides("SetSpace")));
@@ -1284,12 +1305,12 @@
 		pdfoptions().writeLaTeX(oss, documentClass().provides("hyperref"));
 		lyxpreamble += oss.str();
 	}
-
+	
 	// Will be surrounded by \makeatletter and \makeatother when needed
 	docstring atlyxpreamble;
 
 	// Some macros LyX will need
-	docstring tmppreamble(from_ascii(features.getMacros()));
+	docstring tmppreamble(from_utf8(features.getMacros()));
 
 	if (!tmppreamble.empty())
 		atlyxpreamble += "\n%% "
@@ -1367,8 +1388,7 @@
 	else
 		lyxpreamble += '\n' + atlyxpreamble;
 
-	// We try to load babel late, in case it interferes
-	// with other packages.
+	// We try to load babel late, in case it interferes with other packages.
 	// Jurabib and Hyperref have to be called after babel, though.
 	if (use_babel && !features.isRequired("jurabib")
 	&& !features.isRequired("hyperref")
Index: LaTeXFeatures.cpp
===
--- LaTeXFeatures.cpp	(revision 26594)
+++ LaTeXFeatures.cpp	(working copy)
@@ -520,6 +520,34 @@
 }
 
 
+string const LaTeXFeatures::getColorOptions() const
+{
+	ostringstream colors;
+
+	// Handling the color packages separately is needed to be able to load them
+	// before babel when hyperref is loaded with the colorlinks option
+	// for more info see Bufferparams.cpp
+
+	// [x]color.sty
+	if (mustProvide("color") || mustProvide("xcolor")) {
+		string const package =
+			(mustProvide("xcolor") ? "xcolor" : "color");
+		if (params_.graphicsDriver == "default")
+			colors << "\\usepackage{" << package << "}\n";
+		else
+			colors << "\\usepackage["
+ << params_.graphicsDriver
+ << "]{" << package << "}\n";
+	}
+
+	// pdfcolmk must be loaded after color
+	if (mustProvide("pdfcolmk"))
+		colors << "\\usepackage{pdfcolmk}\n";
+
+	return colors.str();
+}
+
+
 string const LaTeXFeatures::getPackages() const
 {
 	ostringstream packages;
@@ -573,22 +601,8 @@
 	if (mustProvide("accents"))
 		packages << "\\usepackage{accents}\n";
 
-	// [x]color.sty
-	if (mustProvide("color") || mustProvide("xcolor")) {
-		string const package =
-			(mustProvide("xcolor") ? "xcolor" : "color");
-		if (params_.graphicsDriver == "default")
-			packages << "\\usepackage{" << package << "}\n";
-		else
-			packages << "\\usepackage["
- << params_

SageTeX with LyX (was: On the interface between Lyx and CAS: some ideas for a better desing)

2008-09-27 Thread Gregor Gorjanc
Hi LyX developers!

Enthused with use of R (via Sweave) in LyX I started to also look for 
integration of SAGE (see http://www.sagemath.org). Since Python is used the 
integration should be doable. However, luckily much has already been done with 
the SageTeX (see last example at http://www.sagemath.org/tour-research.html and
http://www.ctan.org/tex-archive/macros/latex/contrib/sagetex/). This is really
a nice interface for CAS (free as well as comercial ones!). 

One adds LaTeX markup such as \sage{}, \sageplot{},  begin{sageblock} ... 
\end{sageblock} etc. to a LaTeX file (for more see docs at 
http://www.ctan.org/get/macros/latex/contrib/sagetex/sagetexpackage.pdf).
Then the compilation is done via:

latex file.tex
sage file.sage
latex file.tex 
...

First steps creates the sage script (file.sage) which needs to be evaluated 
with sage. The third step is a start of a "normal" LaTeX compilation.

Does anyone have any idea how we could use this directly in LyX? If there
would be a special file format, we could use the same thing as with Sweave
(see http://cran.r-project.org/contrib/extra/lyx/). Since the first step is
a LaTeX run and the file is a "pure" LaTeX markup, I do not know how to tell
LyX to run latex and sage before a "normal" LaTeX compilation.

Working example of SageTeX is in sage-*/examples/latex_embed folder of a SAGE
distribution. See the following blog post on howto install SAGE under Linux.

http://ggorjan.blogspot.com/2008/09/sage-open-source-mathematics-software.html

Regards, Gregor



Re: boost update

2008-09-27 Thread Jean-Marc Lasgouttes

Agreed.


So is that a red flag to Peter?


I mean a _green_ flag of course...


Yes, from m at least. José?

JMarc

Re: about character styles

2008-09-27 Thread rgheck

Uwe Stöhr wrote:

rgheck schrieb:

So I fear that users won't use character styles when they are not 
able to modify and define them easily.


But honestly, it isn't that difficult! I would have thought you could 
look at the logicalmkup module and figure out pretty quickly how to 
do a new one.


I know how to do this, but this was not my point. I argued as if I 
were a basic user to show the problematic and not be impolite or 
ignorant - just objective.


Sorry, by "you" I meant "one". (This is common in colloquial English. 
Maybe not so much in other languages.) I think anyone with any knowledge 
of LaTeX at all ought to be able to make a simple character style along 
the lines of noun, etc. But people are, for whatever reason, reluctant 
to do so. I'm not saying some sort of GUI wouldn't be helpful. But it's 
not as if character styles are so incredibly complicated you have to be 
a programmer to create them.


According to my arguments, I will postpone using character styles in 
the docs I maintain to LyX 1.7 or 1.6.x.



That's fine.

rh



Version Control on OS X

2008-09-27 Thread tim opie
Hi all,

Just writing to say I wrote a short guide for installing RCS  on OS X
so that Version Control works. I was going to just put it on the
wiki>Mac>Useful Helper Programs section, but I need a developer
password for the wiki to do that. I have instead made a short wiki
page @ http://wiki.lyx.org/Mac/VersionControl, which is a bit more
detailed than I would have done, but probably more useful overall. I
am happy to add more stuff to the wiki if you would like to give me
the developer password for the mac wiki. I have been using Lyx on
FreeBSD for about 7 years, but I recently got a Mac, so I am finding
out all kinds of new things, which might be worth documenting.

Cheers,
Tim


Re: Picins for LyX, easy to make

2008-09-27 Thread Michael Gasperl

I'm glad to see the enhancement of LyX 1.6 concerning wrapped figures ( see
http://wiki.lyx.org/LyX/NewInLyX16#toc11 )! A similar output of the
picins-workaround can be reached by inserting following into the praeambel:

\setlength{\intextsep}{0cm plus1cm minus1cm}



Pavel Sanda wrote:
> 
>> The best way to integrate pictures in the text is picins. I tried all the 
>> other packages.
>> LyX isn't able to insert graphics, which are circumfloated with text. If 
>> you provided an interface it would from now on be easy to insert such 
>> images!
>>
>> Now I made a workaround:
>> Insert LaTeX-environment:
>> 0) \usepackage{picins} in praeamble
>> 1) ERT[\piccaption{Ideenblüte}\label{ideenbluete}\parpic[r]{]
>> 2) insert (scaled) picture
>> 3) insert LaTeX-env: ERT[}]
>>
>> This works, but is a bit complicated. So, I'd be glad to see a
>> picins-port 
>> integrated in next versions :-)
>> Thanks. Michael, Salzburg
> 
> lyx bugzilla is a good device to put the enhacenment requests.
> pavel
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/Picins-for-LyX%2C-easy-to-make-tp487889p1122699.html
Sent from the LyX - Developers mailing list archive at Nabble.com.



Re: boost update

2008-09-27 Thread Abdelrazak Younes

On 27/09/2008 11:25, Abdelrazak Younes wrote:

On 22/09/2008 12:33, Jean-Marc Lasgouttes wrote:

Abdelrazak Younes<[EMAIL PROTECTED]>  writes:

Well, I understand but 1.36 is already one year old and we don't use
boost as much as in the past. So I reckon that the risk is very
minimal and we should upgrade boost before rc3 so that we have more
testing before 1.6.0.


Agreed.


So is that a red flag to Peter?


I mean a _green_ flag of course...

Abdel.



Re: boost update

2008-09-27 Thread Abdelrazak Younes

On 22/09/2008 12:33, Jean-Marc Lasgouttes wrote:

Abdelrazak Younes<[EMAIL PROTECTED]>  writes:
   

Well, I understand but 1.36 is already one year old and we don't use
boost as much as in the past. So I reckon that the risk is very
minimal and we should upgrade boost before rc3 so that we have more
testing before 1.6.0.
 


Agreed.
   


So is that a red flag to Peter?

Abdel.



Re: [patch] beamer complementations

2008-09-27 Thread Abdelrazak Younes

On 27/09/2008 10:43, Jürgen Spitzmüller wrote:

I've noticed that our beamer layout does not support quote, quotation and
verse, even though beamer includes these environments.

I'll add these to branch and trunk (is trunk open again for commits?)
   
I've seen a few commits so I guess it is. At least I thought it was 
because I committed something...


Abdel.



[patch] beamer complementations

2008-09-27 Thread Jürgen Spitzmüller
I've noticed that our beamer layout does not support quote, quotation and 
verse, even though beamer includes these environments.

I'll add these to branch and trunk (is trunk open again for commits?)

Jürgen
Index: lib/layouts/beamer.layout
===
--- lib/layouts/beamer.layout	(Revision 26587)
+++ lib/layouts/beamer.layout	(Arbeitskopie)
@@ -891,6 +891,62 @@
   EndFont
 End
 
+Style Quotation
+  Category MainText
+  Margin   Static
+  LatexTypeEnvironment
+  LatexNamequotation}%{
+  NextNoIndent 1
+  LeftMargin   MMM
+  RightMargin  MMM
+  ParIndentMM
+  ParSkip  0
+  ItemSep  0
+  TopSep   0.5
+  BottomSep0.5
+  ParSep   0
+  AlignBlock
+  AlignPossibleBlock, Left, Right, Center
+End
+
+
+Style Quote
+  Category MainText
+  Margin   Static
+  LatexTypeEnvironment
+  LatexNamequote}%{
+  NextNoIndent 1
+  LeftMargin   MMM
+  RightMargin  MMM
+  TopSep   0.5
+  ParSep   0.5
+  BottomSep0.5
+  AlignBlock
+  AlignPossibleBlock, Left, Right, Center
+  LabelTypeNo_Label
+End
+
+
+Style Verse
+  # LaTeX type is first dynamic because of LaTeX implementation.
+  # In LyX this does not make sense.
+  Category MainText
+  LatexTypeEnvironment
+  LatexNameverse}%{
+  Margin   First_Dynamic
+  NextNoIndent 1
+  LeftMargin   
+  LabelIndent  
+  ParSkip  0.4
+  TopSep   0.7
+  BottomSep0.7
+  ParSep   0.5
+  AlignBlock
+  AlignPossibleBlock, Left
+  LabelTypeNo_Label
+End
+
+
 Style TitleGraphic
   Category Titling
   Margin   Static
@@ -911,7 +967,6 @@
 Series Bold
 Color  Blue
   EndFont
-
 End