Generating colored tables for a LyX document

2010-04-02 Thread Kosta Welke
Hello,

I need to include a lot of auto-generated tables into a LyX document. What is 
the best way of getting my tables into LyX?

It seems the easiest way would be to simply generate one .lyx file per table 
and include that in the actual LyX document at the right place. However, I 
would really like to color my rows and columns differently and it seems that 
everything I try in LyX/LaTeX looks awful (the lines between the cells seem to 
change width depending on whether a cell is colored or not, etc.). I based my 
experiments on this:
http://wiki.lyx.org/LyX/Tables#toc7
 
I had the idea of generating HTML tables and creating PDFs to include in my LyX 
document, but that fails on the fact that all html->pdf converters that I could 
find only generate full-page PDFs, whereas I need something cropped to the 
table size.

What would you propose to generate nice tables for my LyX document?

Thanks in advance!

Cheers,
Kosta

Re: Wave

2009-05-31 Thread Kosta Welke
On Sun, 31 May 2009 22:50:47 +0200
A B  wrote:

> I just viewed a video demo of google wave, and remembered the
> collaboration discussion when someone talked about using wiki for
> collaborative editing, but google wave sounds to be a much more
> interesting tool for collaboration in this way. So either use wave for
> LyX files or use LyX to edit Waves?

Well it seems that it will be kind of open, so I guess one _could_
write something on the server-side that translates something wave-y to
LaTeX, and from there to PDF/PS/whatever. But it would not be LyX...
(cause I think it would be insane to try to port the whole LyX
interface to Wave).

Cheers,

Kosta


Re: Bibliography Is really complex , or it is a bug

2009-05-26 Thread Kosta Welke
Hi Marcelo!

Could you create an example file that illustrates the problem and post
it here? (e.g. using a service like pastebin.com)

Cheers,

Kosta


Re: Can't get my university thesis .cls class to work

2009-05-22 Thread Kosta Welke
On Thu, 21 May 2009 23:45:55 -0700 (PDT)
elaliberte  wrote:

> My University provides the
> http://n2.nabble.com/file/n2955951/uocthesis.cls uocthesis.cls  file

Where did you put that file? It is not sufficient to just put it in the
same folder as the .lyx file, it needs to be in some latex path,
like /usr/local/share/texmf/tex/latex/

You have to run `texhash` as root afterwards.

Also, did you put your .layout file to ~/.lyx/layouts/ and
"reconfigure"d lyx afterwards?

I know, this doesn't exactly fit your error report, but sometimes lyx
shows really weird errors...

HTH,
Kosta


Re: Is PDF the best graphic format for LyX?

2009-05-21 Thread Kosta Welke
On Thu, 21 May 2009 16:52:43 -0400
Steve Litt  wrote:

> Is it my imagination, or do things go MUCH better when graphics
> included in a LyX diagram are PDFs? That's what I've found. I've
> found them infinitely and continuously scalable, and if I create the
> PDF with "embed fonts", I think they work anywhere.

Note however that if there are e.g. a lot of gradients, some pdf
viewers will show an ugly, incomplete version of the pdf (e.g. evince),
while others take forever to render the page (e.g. adobe reader). I
gave up on vector graphics and use high-res pngs for everything with
gradients or lots of layers.

HTH,

Kosta


article-style TOC for article (paper)

2009-05-21 Thread Kosta Welke
Hi!

I really like the "article (paper)" layout, but I dislike the table of
contents style. What is the easiest way (or is there a way) to have an
"article"-style toc for "article (paper)"?

Thanks in Advance,

Kosta


Re: Beamer: Error with section

2009-05-17 Thread Kosta Welke
On Sun, 17 May 2009 18:43:56 +0200
Hellmut Weber  wrote:

> As you can see I'm doing nearly nothing

Here is a version that works:

http://pastebin.com/m1f60d2ea
(there's a 'download' link)

I did two things:

a) Add an empty slide (so that the error goes away)

b) Changed the document class from article(beamer) to
presentation(beamer) so that it looks like a presentation

HTH,

Kosta


Re: Beamer: Error with section

2009-05-17 Thread Kosta Welke
On Sun, 17 May 2009 09:53:31 +0200
Hellmut Weber  wrote:

> i'm trying to create my first beamer presentation.
> What am i doing wrong?
> What is missing?

Could you post the source of a lyx document that contains the error to
a service like pastebin.com? That way, someone can reproduce it and
tell you what's going wrong.

Unfortunately, the Latex-Beamer stuff simply throws completely
incomprehensible error messages for the average user :(

Could it be that you define a section inside a "frame"? If so, try
defining it before that frame.

Cheers,

Kosta


Re: Encoding problem

2009-05-04 Thread Kosta Welke
On Mon, 4 May 2009 17:02:18 +0200
ami guru  wrote:

> Change th docu,emt encoding to UTF8 might help
> Any Hint on doing that ?

Document > Settings > Language. Under Encoding, choose "Other", then
"Unicode (utf8)". 

HTH,
Kosta


Re: references and coding

2009-05-02 Thread Kosta Welke
On Tue, 28 Apr 2009 17:03:51 +0200
Jürgen Spitzmüller  wrote:

[unicode characters, bibtex and sorting]
> Bibtex8 does this specific case right, because the latin1 glyphs have
> the same code points in unicode. However, bibtex8 will scream and
> bail out at the first multibyte character it finds. I guess sorting
> on non-latin1 glyphs will be just random.

I asked about this on the XeTeX mailing list[0] and they think biber[1]
should do it right.

0: http://tug.org/pipermail/xetex/2009-April/012861.html
1: http://biblatex-biber.sourceforge.net/

HTH,

Kosta


Re: Trying to use some Chinese characters in Lyx 1.6.2 for Mac

2009-05-02 Thread Kosta Welke
On Fri, 1 May 2009 13:10:08 -0700
Kleanthes Koniaris  wrote:

> I just installed MacTeX and Lyx 1.6.2 on my Mac, and then I typed in  
> some English, along with a few Chinese characters.  Everything  
> displays very nicely in LyX.  

Yeah, well, that can be confusing. Always remember: Just because it
looks good in LyX, doesn't mean it works in LaTeX ;)

There's basically two ways to use chinese characters in LaTeX: CJK or
XeTeX. I don't know anything about CJK, but the XeTeX way is described
here:

http://wiki.lyx.org/LyX/XeTeX

HTH,

Kosta


Re: references and coding

2009-04-28 Thread Kosta Welke
On Tue, 28 Apr 2009 16:24:07 +0200
Jürgen Spitzmüller  wrote:

> Kosta Welke wrote:
> > I just tried adding a chinese character using {\fontspec{Sazanami
> > Mincho}猫} into the BibTeX and it worked flawlessly.
> However, this does not fix the sorting problem.

Well if we're happy with 'sort by unicode number', sorting utf8
byte-by-byte should be fine (i think).

If you want sorting like specified in
http://unicode.org/reports/tr10/
I guess you need to patch bibtex (or use bibtex8? I'm not sure).

Either way, I'm out of this discussion as I'm really no expert on
either bibtex nor unicode :) (As you already figured)

Cheers,

Kosta


Re: references and coding

2009-04-28 Thread Kosta Welke
On Tue, 28 Apr 2009 13:05:48 +0200
Kosta Welke  wrote:

> Well, I just tried adding some characters that definitely are
> multi-byte (e.g. ค from the thai alphabet) to a test bibtex file. It
> "worked" with XeTeX in the sense that [...] the character was replaced
> by whitespace (just like when the character is not in the alphabet
> you're using).

I just tried adding a chinese character using {\fontspec{Sazanami
Mincho}猫} into the BibTeX and it worked flawlessly. It seems that
BibTeX does not really care what is between the curly braces and just
copies the octets. And as utf8 encodes multibyte characters into the
0x80 and upward space, I don't seem how this can blow in my face. (This
also seems to be the opinion on the XeTeX mailing list)

Here's my example lyx/bib pair:
http://lastpageofthe.net/xetex-problems/utf8-test.lyx
http://lastpageofthe.net/xetex-problems/utf8-test.bib

You might need to replace Sazanami Mincho with a font that you have
actually installed on your system, though.

Cheers,

Kosta


Re: references and coding

2009-04-28 Thread Kosta Welke
On Tue, 28 Apr 2009 12:25:49 +0200
Jürgen Spitzmüller  wrote:

> Bibtex can only handle 7-bit correctly. Bibtex8 handles 8-bit.
> Neither can deal with multibyte characters (although apparently only
> bibtex8 complains about such files, bibtex just passes it silently
> [which is bad]).

Well, I just tried adding some characters that definitely are
multi-byte (e.g. ค from the thai alphabet) to a test bibtex file. It
"worked" with XeTeX in the sense that no error was raised (at least I
didnt see any in the console log), and the character was replaced by
whitespace (just like when the character is not in the alphabet you're
using).

With "normal" LaTeX and default encoding, I get a T1 encoding error.
With utf8 encoding, I get a "unicode char not set up for use with
LaTeX" error.

To be honest, my LaTeX suck and I really don't know the internals. A
way to tell XeLaTeX to use a different font for non-latin characters in
the bibliography would be great. Currently, allowing but not displaying
characters is pretty useless (except for those chars that are in the
font, which seems to be the case e.g. for european special chars but
not for e.g. asian fonts)

HTH,

Kosta


Re: references and coding

2009-04-28 Thread Kosta Welke
On Tue, 28 Apr 2009 11:59:23 +0200
Jürgen Spitzmüller  wrote:

> Which, however, will make bibtex (the program) fail (at least) on
> sorting. Or does XeTeX ship its own bibtex variant?

Sorry, I'm completely ignorant of the details. I just know that adding
weird swedish special characters to my bibtex file "just worked" in a
XeTeX LyX document. So I guess it probably ships its own bibtex...

Cheers,

Kosta


Re: references and coding

2009-04-28 Thread Kosta Welke
On Tue, 28 Apr 2009 11:35:35 +0200
Wolfgang Engelmann  wrote:

> I have a reference from a (JabRef created) bib-file which LyX (1.6.2)
> does not like. The begin of the bib file states that it is encoded in
> utf8. I can't see anything strange in the reference and in the bibtex
> output. How can I check this (and if possible the whole file) for
> coding errors? The current LyX version is using utf8, right?

You can set the document encoding in Document->Settings->Language. I
don't know about the default encoding, though.

I'm not sure if BibTeX files are allowed to have non-ASCII characters
in "normal" LaTeX (I'm completely LaTeX incompetent), but I know that
with XeTeX, you can have utf8 characters in you BibTeX file.

The brute force method to find out your document encoding is to type
some special characters in lyx, open the document with a text editor
that lets you choose the encoding and see in which encoding the
characters are displayed correcly (but I guess there is also a
non-braindamaged way).

Cheers,

Kosta


Re: Lyx question

2009-04-23 Thread Kosta Welke

On Thu, 23 Apr 2009 23:45:29 +0200, Nathalia Monteiro 
 wrote:

Hi Nathalia!


The lyx presentation is posted on: http://pastebin.com/m37214208
Can someone help me out?


Can you please post this again to pastebin - only this time post the lyx source code. If 
you're using windows, you can access it by right-clicking on it, choose "Open 
With..." and then a Text Editor, e.g. Notepad. The source code should begin with 
something like this:

#LyX 1.6.2 created this file. For more info see http://www.lyx.org/
\lyxformat 345
\begin_document
\begin_header

and eventually be a mix of lyx commands and your text. This is the file we need 
to help you :)

Cheers,

Kosta




Re: Open .lyx document on different computer and have graphics be okay

2009-04-23 Thread Kosta Welke

On Thu, 23 Apr 2009 23:24:23 +0200, ad_ke  wrote:


However, I can't figure out how to make
the document portable.  I keep each document in a project that includes  
each figure, but when I open the file up on a new machine, within that same
project folder, all the figures are gone.  All that is there is the name  
of the file, and a "loaded into memory.  Generating ...".  This stinks when

there are a lot of images in the document.  There must be a solution to
this.


I'm not sure if this relates to your problem, but click on the image and check the path. Sometimes, I had problems because lyx used the absolute path, like "C:\Documents and Settings\Kosta\My Documents\test.png" instead of a simple "test.png". 


Also, what kind of figure are you using? Using bitmaps should yield absolutely 
the same results, while I had problems with vector graphics in the past (e.g. 
with gradients or anything gnuplot generated).

Cheers,
Kosta




Re: Lyx question

2009-04-22 Thread Kosta Welke

On Wed, 22 Apr 2009 16:44:41 +0200, Nathalia Monteiro 
 wrote:

What exactly should I post at pastebin.com? The error message or the  
whole tex code?


Please post the whole lyx file.

Cheers,

Kosta



Re: LyX 1.6.2 -- svn on Windows

2009-04-22 Thread Kosta Welke

On Wed, 22 Apr 2009 04:48:20 +0200, sykes  wrote:


I'm running LyX 1.6.2 on Windows XP.  I use the Tortoise SVN client for
subversion.  I'm getting an error when I try to commit from within LyX:



"Some problem occured while running the command:
'svn commit -m " ... "


I don't have access to a windows machine at the moment, but can you check if 
svn is in the windows PATH? Just open a command prompt and type 'svn'. If it 
says command not found (or something similar), its not there. Try adding the 
Tortoise SVN folder containing svn.exe to the Windows PATH. (It's probably 
Program Files\Tortoise SVN\bin). Follow this guide to add something to the PATH 
variable:

http://www.computerhope.com/issues/ch000549.htm

I'm assuming I need a command line client for svn to execute... is there  
a way to make Tortoise SVN handle this...or is there another application  
that will do it...or do I need to install cygwin and run LyX through it?


Tortoise SVN is a graphical front-end to svn. I think it includes svn.exe. Even 
if it doesnt, you would need to install svn for windows and _NOT_ some cygwin 
stuff. Lyx needs the command line program, not a graphical front-end. 
Alternatively, you can just use Tortoise SVN _instead_ of LyX to handle 
versioning, but I guess you already knew that :)

Cheers,

Kosta




Re: Lyx question

2009-04-22 Thread Kosta Welke

On Wed, 22 Apr 2009 04:12:50 +0200, Nathalia Monteiro 
 wrote:

I imported the layout of a beamer presentation from Latex and after  
editing

it on Lyx, I couldn't see it as a PDF due to some errors:
The Lyx - Latex error box pops up saying:


Yeah, especially with the beamer template, the error messages can be less than 
helpful. It it possible for you to post the file somewhere (e.g. pastebin.com), 
so that we can take a look at it and maybe help?

Then, I tried to export the file I had altered on Lyx to Latex plain to  
try

to open it using TexnicCenter, however, I couldn't figure where the files
are exported to. I couldn't find the file I exported.


The exported files are in the same folder as the lyx file, with the same name but a different ending. LyX files 
end in ".lyx", while the exported LaTeX ends in ".tex". To see which folder the file is in, 
just click on "File -> Save as...". This should open a dialog window showing the current folder of 
the file.


Can someone help me out?


We try :)

Cheers,

Kosta




Re: LyX and XeTeX - how to preview PDF?

2009-04-20 Thread Kosta Welke

On Mon, 20 Apr 2009 12:28:58 +0200, Kosta Welke  wrote:


The correct name is stdtoolbars.ui.


Stupid me, the actually correct name is stdtoolbars.inc :)

Kosta




Re: LyX and XeTeX - how to preview PDF?

2009-04-20 Thread Kosta Welke

On Mon, 20 Apr 2009 08:07:26 +0200, Jürgen Spitzmüller  wrote:


Copy the buffer-view_pdf2.png and buffer-update_pdf2.png icons to buffer-
view_pdf4.png and buffer-update_pdf4.png in your LyX user directory  
(create a new icons folder, if not already there).


The correct folder is "images".

Then copy the stdtoolbars.ui file from the LyX System directory to your  
LyX user directory (new folder "ui"), and add the following lines to the

"view/update" section:



Item "View PDF (XeTeX)" "buffer-view pdf4"
Item "Update PDF (XeTeX)" "buffer-update pdf4"
This will add two new buttons.


The correct name is stdtoolbars.ui.

Thank you very much for your input! Thats extremely practical indeed.

Just one question though: Is there a way to just use ui/stdtoolbars.ui to just 
add a new toolbar and leave the old one untouched? Similar to .lyx/preferences? 
That would be much better, e.g. with respect to future lyx updates... (if I add 
this to the wiki, and stdtoolbars.ui changes in the next version, users will 
give you _weird_ error reports).

Cheers,

Kosta




Re: CO_2

2009-04-20 Thread Kosta Welke

On Mon, 20 Apr 2009 10:19:53 +0200, Wolfgang Engelmann 
 wrote:


How would I write CO_2 in such a way that it is not emphasized


Do you mean you want to write it like a math formula?

Use Insert->Math->Inline Formula or press Ctrl-M, then type CO_2 and see if 
thats what you want :)

Cheers,

Kosta




LyX and XeTeX - how to preview PDF?

2009-04-19 Thread Kosta Welke

Hi!

I'm trying to use LyX together with Xetex and thanks to strangers on the internet, it actually works. I updated the wiki under http://wiki.lyx.org/LyX/XeTeX so that it might work for other people, too. 


There's one problem, though: As XeTeX must run through the xelatex, which is a different 
lyx file format, the preview PDF button does not work anymore (exporting using pdflatex 
gives an error, as you need to export using xelatex). What is the best/quickest/working 
way to get the "preview/update PDF" buttons to export using XeTeX instead of 
pdflatex? (optimally, this would be a document setting).

Thanks in advance for your help!

Cheers,
Kosta