Shorttoc tight problem

2010-08-31 Thread Peter Baumgartner
I would need a short version of the table of contents. With the package
shorttoc I could generate this condensed version of the table of contents
but with too much vertical space between the entries. Therefore I added the
option "tight" 

\usepackage[tight]{shorttoc}

But there was no difference in the output. There is one line space between
every entry of the section level with the effect that even this short toc
version spans several pages. I can't see any difference between the options
"loose" or "tight".

Maybe it is important to say that I'm using the KOMA-Script class scrbook. I
looked into the manuals of both packages but I couldn't find any clue.

Any suggestions what I did wrong?

Peter





synctex and LyX?

2010-08-31 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

I just saw that synctex is working under linux with okular: just add the
option -synctex=1 to the converter to PDF (pdflatex) and if you
shift-click on any location in the resulting pdf in okular, it opens the
specified LaTeX editor (configured in okular) at the location you
clicked on - really cool.
And guess what, there is even lyx as an editor. That is really great -
and it works nicely.

Thanks a lot

Rainer

By the way - is this mailing list dead? I haven't received any mail in
the last three months?

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:+33 - (0)9 53 10 27 44
Cell:   +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx82ygACgkQoYgNqgF2egpKhQCfRxv+wXwZYUXojDl3Nmu/iDpN
83YAn3K33k0ItZU52jOFA7/6dv4n1WMz
=SgyV
-END PGP SIGNATURE-


how to make fragile frames in beamer layout

2010-08-31 Thread Shailesh Kumar
Hi,

I am new to Lyx though have used latex before. I am  creating a presentation
in Lyx using the breamer class. I want to introduce some source code
listings (using Insert -> Program Listing). Doing this leads to errors. I
suppose this can be fixed if a beamer frame can be declared as fragile. I
could not figure out any way to do this in the user interface. Does someone
know how to fix this?

Thanx a lot,
- Shailesh


Re: synctex and LyX?

2010-08-31 Thread Pavel Sanda
Rainer M Krug wrote:
> And guess what, there is even lyx as an editor. That is really great -
> and it works nicely.

in 2.0 we have nice ui for making the reverse and forward search work without
any hassling with convertors :)

> Thanks a lot
> 
> Rainer
> 
> By the way - is this mailing list dead? I haven't received any mail in
> the last three months?

http://www.mail-archive.com/lyx-annou...@lists.lyx.org/msg00123.html
pavel


Re: synctex and LyX?

2010-08-31 Thread Jürgen Spitzmüller
Rainer M Krug wrote:
> By the way - is this mailing list dead? I haven't received any mail in
> the last three months?

We had a severe server crash in April/May. You will probably need to 
resubscribe. Look here for details:
http://www.lyx.org/News#item6

Jürgen


Re: how to make fragile frames in beamer layout

2010-08-31 Thread Jürgen Spitzmüller
Shailesh Kumar wrote:
> I am new to Lyx though have used latex before. I am  creating a
> presentation in Lyx using the breamer class. I want to introduce some
> source code listings (using Insert -> Program Listing). Doing this leads
> to errors. I suppose this can be fixed if a beamer frame can be declared
> as fragile. I could not figure out any way to do this in the user
> interface. Does someone know how to fix this?

You need to use TeX-Mode:
http://marc.info/?l=lyx-users&m=125957115114257&w=2

This is due to the fact how frames are defined in LyX. Unfortunately, this 
rules out native support for fragile frames (unless someone comes up with a 
new definition of \lyxframe).

Jürgen


Re: synctex and LyX?

2010-08-31 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 31/08/10 13:11, Jürgen Spitzmüller wrote:
> Rainer M Krug wrote:
>> By the way - is this mailing list dead? I haven't received any mail in
>> the last three months?
> 
> We had a severe server crash in April/May. You will probably need to 
> resubscribe. Look here for details:
> http://www.lyx.org/News#item6

That explains the unusual silence - done, I resubscribed.

Thanks,

Rainer

> 
> Jürgen


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:+33 - (0)9 53 10 27 44
Cell:   +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx88AgACgkQoYgNqgF2egplFwCfaQDCHXIk8dZA4uYohzgH+c11
ZXMAn22+crELdHfzlpbOdBNcJdzJ0ywQ
=efeu
-END PGP SIGNATURE-


Re: Accents

2010-08-31 Thread Hal Kierstead
Guenter -

This was a big help.  It accomplishes exactly what I wanted.

Many thanks,

Hal

On Aug 30, 2010, at 12:18 AM, Guenter Milde wrote:

> On 2010-08-29, Hal Kierstead wrote:
> 
>>> I have a problem with LyX 1.6.7.  I work with collaborators who do not
>>> use LyX. Suppose I import this to LyX:
> 
>>> \begin{document}
>>> P\'osa, R\"odl, Erd\H os.
>>> \end{document}  
> 
>>> I get.
> 
>>> Pósa, Rödl, Erdős.
> 
>>> This is fine for me.  When I export it I get 
> 
>>> \begin{document}
>>> PÛsa, Rˆdl, Erdo\H{o}s.
>>> \end{document}
> 
> By default, LyX generates LaTeX files in a language-dependent 8-bit
> encoding.
> 
>>> The last is fine for me but not for my collaborators.  It would be
>>> much better to export the standard tex code for accents.
> 
> This is configurable on a document basis by checking
> Document>Settings>Language>Encoding>Other and selecting "ASCII".
> 
> Whether 7-bit ASCII or 8-bit language-dependent encodings or UTF-8
> encoded Unicode are much better is hard to agree on.
> 
> 
> Instead of changing the encoding setting for every document, you can also
> copy the file "languages" from the LyX-directory (here /usr/share/lyx/)
> to your personal LyX-directory (here ~/.lyx/) and change the default
> setting for the respective language, e.g.
> 
> - magyar  magyar  "Hungarian" false  iso8859-2  hu_HU  ""
> 
> to 
> 
> + magyar  magyar  "Hungarian" false  ascii  hu_HU  ""
> 
> or
> 
> + magyar  magyar  "Hungarian" false  utf8  hu_HU   ""
> 
> 
>>> Is this a bug or desired enhancement?
> 
> While I do not consider this a bug, I see two enhancement options:
> 
> * Store the original encoding (inputenc option) when importing LaTeX
>  files. Use ASCII instead of "language default", if there is no
>  "\usepackage[]{inputenc}" in the original.
> 
> * Provide a configurable file encoding default with the values "ascii",
>  "utf-8" and "language-dependent".
> 
> 
> Günter



LyX and Lilypond

2010-08-31 Thread Etienne Snyman
Dear LyX-people

This is my first time posting on the list as a new LyX user, so please
excuse any stupid mistakes I might make or stupid questions I might ask!
:-) For the record, I am using LyX 1.6.5 on Ubuntu 10.04.

I would like to write music theory content for music students, and it
seems that LyX natively supports the import of Lilypond files. However,
since attempting to do so, I have not had any success. I was unable to find
a reference to it in the installed LyX documentation.

If anyone could help me to incorporate Lilypond code into a LyX document,
I will be willing to send you some free fake digital non-existent
chocolates via imagination mail. Or, if any subsequent versions of LyX have
similar support, I would be even more grateful.

Thanks

Etienne


Re: OpenDocument on Windows

2010-08-31 Thread Richard Heck
On 08/30/2010 01:11 PM, David Bickel wrote:
> View >>> OpenDocument produces a blank .odt file my platform (LyX
> 1.6.6.1, Windows Vista Home Basic).
>
> Are there any easy workarounds?
>
>   
Please search this list archives for information on this. The
OpenDocument exporter, from the tex4ht package, is known to be
temperamental on Windows.

rh



Re: agutex layout?

2010-08-31 Thread Evan Mason
> It does replace the older ones in that it seems to be the only one they are
> offering now.  It's supposed to work for all the different AGU journals.
> http://www.agu.org/pubs/helpdesk/


Hi, did a new layout file eventually get written for agutex?

Thanks, Evan

 






LaTeX -> LyX and \newcommand

2010-08-31 Thread Torquil Macdonald Sørensen

Hi!

I figured out a way to preprocess LaTeX files in order to eliminate dependency 
on \newcommands, using Python and plasTeX.


My goal was to import a LaTeX file into LyX, but LyX was not able to understand 
all the \newcommands in the document, and therefore I wanted to preprocess the 
LaTeX file first.


I used a python package called plasTeX for this. It is able to parse LaTeX files 
and will automatically expand the user-defined \newcommands that are used 
throughout the document. After the parsing, it can print the resulting LaTeX 
code back to a file. The resulting LaTeX file has very long lines, but can be 
imported into LyX very nicely! The resulting file still contains all the 
\newcommands at the top, but they are not actually used in the rest of the 
document, so they can simply be deleted manually.


In this case it saved me a lot of hours time of manual editing within LyX if I 
had just imported the original LaTeX file.


I'm I right in that such functionality is not built into LyX a the moment, and 
that there are no scripts on the lyx Wiki that accomplishes this? If this 
already exists, I'd want to know how to do it without plasTeX.


If so, perhaps I should upload the script to the Wiki so that others can use it 
if they have to import a latex file into lyx which has a lot of \newcommands?


Opinions?

I have seen other requests for such functionality, e.g. here:
http://www.latex-community.org/forum/viewtopic.php?f=5&t=4680

-Torquil


Re: Can't sync LyX with Skim

2010-08-31 Thread Nat Jacobs

This is meant as a reply to Pavel.
Thanks for the help, but I'm not quite sure how to even check that. Do I
have to run lyx -dbg in the terminal? I tried that, but then I wasn't sure
where to look for error messages. Am I supposed to open both terminal and
console? I tried that, but I wasn't sure where to look in the console for
the error messages. Sorry, as you can tell, I'm really pretty
unsophisticated at using these resources...


Re: Shorttoc tight problem

2010-08-31 Thread Steve Litt
On Tuesday 31 August 2010 04:56:51 Peter Baumgartner wrote:
> I would need a short version of the table of contents. With the package
> shorttoc I could generate this condensed version of the table of contents
> but with too much vertical space between the entries. Therefore I added the
> option "tight"
> 
> \usepackage[tight]{shorttoc}
> 
> But there was no difference in the output. There is one line space between
> every entry of the section level with the effect that even this short toc
> version spans several pages. I can't see any difference between the options
> "loose" or "tight".
> 
> Maybe it is important to say that I'm using the KOMA-Script class scrbook.
>  I looked into the manuals of both packages but I couldn't find any clue.
> 
> Any suggestions what I did wrong?
> 
> Peter

I didn't understand exactly what you wanted to do, and I wouldn't even begin 
to guess what you did or didn't do wrong, but here's how I tighten up the 
table of contents in my layout file:

%%%
% ### Vertically denser table of contents
\renewcommand\tableofcontents{%
\...@twocolumn
  \...@restonecoltrue\onecolumn
\else
  \...@restonecolfalse
\fi
\chapter*{\contentsname
\...@mkboth{%
   \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
{
  \normalsize\setlength{\parskip}{-6pt}\setstretch{0.9}%
%  \normalsize\setlength{\parskip}{-8pt}\setstretch{0.8}%
  \...@starttoc{toc}%
}
\...@restonecol\twocolumn\fi
}
%%%

I'm not smart enough to have written that. I copied the book document class's 
implementation of command tableofcontents and simply tweaked its lengths. Note 
that the setstretch{} command requires a special package, I think it's the 
setspace package.

HTH

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt



Re: LyX and Lilypond

2010-08-31 Thread Torquil Macdonald Sørensen

On 31/08/10 14:47, Etienne Snyman wrote:

Dear LyX-people

This is my first time posting on the list as a new LyX user, so please
excuse any stupid mistakes I might make or stupid questions I might ask!
:-) For the record, I am using LyX 1.6.5 on Ubuntu 10.04.

I would like to write music theory content for music students, and it
seems that LyX natively supports the import of Lilypond files. However,
since attempting to do so, I have not had any success. I was unable to find
a reference to it in the installed LyX documentation.

If anyone could help me to incorporate Lilypond code into a LyX document,
I will be willing to send you some free fake digital non-existent
chocolates via imagination mail. Or, if any subsequent versions of LyX have
similar support, I would be even more grateful.

Thanks

Etienne


Hi Etienne!

Do you want to write Lilypond code directly in LyX, and have LyX automatically 
run the necessary 'lilypond-book' script in order to generate LaTeX code that 
can be compiled to PDF?


Or do you just want to include/link an external Lilypond file?

I successfully did the latter as follows:

Go to the menu item: Insert -> File -> External Material

Then select Lilypond on the Template drop-down menu on the File tab. Select the 
*.ly file in the File: field. The other tabs allow you to adjust e.g. size and 
rotation.


Within LyX I then see a grey box with the text "Lilypond typeset music". The 
music is of course present in PDF files produced with LyX.


In this case you'd still have to edit your lilypond files externally.

Or did you have something else in mind?

I'm using LyX 1.6.7 and my Lilypond is v2.12.3.

Torquil


Re: Accents

2010-08-31 Thread Uwe Stöhr

Am 30.08.2010 03:01, schrieb Hal Kierstead:


Here are five small files.

1.  Example.tex---from collaborator.
2.  Example.lyx---my LyX import
3.  ExampleCopy.lyx---my copy before exporting
4.  ExampleCopy.tex---Export to collaborator.  My tex editor has changed the 
accents, but I do not care because I use tex.
5.  ExampleCopy.pdf---what I see when I typeset (4) is correct.

My collaborator can typeset (4) correctly, as can I (see(5)), but cannot make 
sense of the tex file when he tries to edit it, because his editor interprets 
the symbols differently (actually differently from mine).


(4) has the default encoding (in your case "CP-1252"). So he only needs 
to load the TeX-file with the encoding CP-1252 in his editor.
For example my editor named "jedit" loads all files by default in 
encoding "utf-8" (Unicode), but when I reload (4) with CP-1252, it works 
fine and will also be saved in the correct encoding.


Btw. I told you not to send TeX-files as direct email attachment because 
this often destroys the encoding. (4) appears here encoded in CP-1252. 
Saving (4) from the mail to e.g. a MAC will probably result in a 
different encoding (depends on the mail program settings).


regards Uwe


Re: LaTeX -> LyX and \newcommand

2010-08-31 Thread Uwe Stöhr

Am 31.08.2010 18:35, schrieb Torquil Macdonald Sørensen:


My goal was to import a LaTeX file into LyX, but LyX was not able to
understand all the \newcommands in the document, and therefore I wanted
to preprocess the LaTeX file first.


What do you mean with LyX doesn't understand? LyX should import them as 
TeX-code and when you view it as PDF, you should see a PDF. If this is 
not the case and you get LaTeX-errors instead, you found a bug in LyX's 
TeX import program. If so, can you please provide a _small_ TeX testfile 
to be able to test?



I used a python package called plasTeX for this. It is able to parse
LaTeX files and will automatically expand the user-defined \newcommands
that are used throughout the document.


What is done by "expanding"? I mean one only uses \newcommand once and 
then use the defined command several times. Therefore you can safely put 
all \newcommands either at the beginning of the document, or better, at 
the end of the document preamble.


regards Uwe


Re: LyX and Lilypond

2010-08-31 Thread Etienne Snyman
Hi Torquil!

Thanks for the reply. Please find my replies to your comments in-line:

On Tue, 2010-08-31 at 19:08 +0200, Torquil Macdonald Sørensen wrote:
> Do you want to write Lilypond code directly in LyX, and have LyX 
> automatically 
> run the necessary 'lilypond-book' script in order to generate LaTeX code that 
> can be compiled to PDF?

That would actually be a great addition. How complicated do you think
that would be?


> Or do you just want to include/link an external Lilypond file?
> I successfully did the latter as follows:
> 
> Go to the menu item: Insert -> File -> External Material
> 
> Then select Lilypond on the Template drop-down menu on the File tab. Select 
> the 
> *.ly file in the File: field. The other tabs allow you to adjust e.g. size 
> and 
> rotation.
> 
> Within LyX I then see a grey box with the text "Lilypond typeset music". The 
> music is of course present in PDF files produced with LyX.

These steps are fine. However, when I wish to preview the PDF output,
get the following error message:

"No information for converting lilypond format files to pdf.
Define a converter in the preferences."

If I go to the preferences dialogue box, I am too confused and too
computer-literate to figure out what's wrong.

Any reply would be great!

Thanks

Etienne



Re: LaTeX -> LyX and \newcommand

2010-08-31 Thread Torquil Macdonald Sørensen

On 31/08/10 19:35, Uwe Stöhr wrote:
> Am 31.08.2010 18:35, schrieb Torquil Macdonald Sørensen:
>
>> My goal was to import a LaTeX file into LyX, but LyX was not able to
>> understand all the \newcommands in the document, and therefore I wanted
>> to preprocess the LaTeX file first.
>
> What do you mean with LyX doesn't understand? LyX should import them as
> TeX-code and when you view it as PDF, you should see a PDF. If this is
> not the case and you get LaTeX-errors instead, you found a bug in LyX's
> TeX import program. If so, can you please provide a _small_ TeX testfile
> to be able to test?

Sorry if you get two of these... I forgot to use "Reply to all" in my email 
client and my have already sent on copy just to you. This should go to the list 
as well.


Let me try to explain better what I meant. I don't want those grey boxes of tex 
code for each instance where a user-defined command is executed in the latex 
document. I want my LyX file to look as if I had written everything in LyX 
without use of any \newcommand.


The following LaTeX file captures the essence of the file I just had the 
misfortune to work with:


\documentclass{article}

\newcommand{\bea}{\begin{equation}}
\newcommand{\eea}{\end{equation}}

\begin{document}

\bea
\int f(x) dx = 0
\eea

\end{document}

Importing this file into LyX results in a file where the math is not "rendered", 
but instead the bare LaTeX math code is displayed between two grey boxes, 
representing \bea and \eea.


>> I used a python package called plasTeX for this. It is able to parse
>> LaTeX files and will automatically expand the user-defined \newcommands
>> that are used throughout the document.
>
> What is done by "expanding"? I mean one only uses \newcommand once and
> then use the defined command several times. Therefore you can safely put
> all \newcommands either at the beginning of the document, or better, at
> the end of the document preamble.

By "expanding", I mean that "my" plasTeX script (if you can call it that when it 
is just a few lines) will process the above latex file and essentially create this:


\documentclass{article}
\begin{document}

\begin{equation}
\int f(x) dx = 0
\end{equation}

\end{document}

When this is imported into LyX, the equation is interpreted correctly and 
rendered in the usualy fasion as mathematics, with no grey boxes.


Torquil


Re: LyX and Lilypond

2010-08-31 Thread Torquil Macdonald Sørensen

On 31/08/10 20:03, Etienne Snyman wrote:

Hi Torquil!

Thanks for the reply. Please find my replies to your comments in-line:

On Tue, 2010-08-31 at 19:08 +0200, Torquil Macdonald Sørensen wrote:

Do you want to write Lilypond code directly in LyX, and have LyX automatically
run the necessary 'lilypond-book' script in order to generate LaTeX code that
can be compiled to PDF?


That would actually be a great addition. How complicated do you think
that would be?


I have no idea :-) You'de have to hope for an answer from one of the LyX 
experts.


Or do you just want to include/link an external Lilypond file?
I successfully did the latter as follows:

Go to the menu item: Insert ->  File ->  External Material

Then select Lilypond on the Template drop-down menu on the File tab. Select the
*.ly file in the File: field. The other tabs allow you to adjust e.g. size and
rotation.

Within LyX I then see a grey box with the text "Lilypond typeset music". The
music is of course present in PDF files produced with LyX.


These steps are fine. However, when I wish to preview the PDF output,
get the following error message:

"No information for converting lilypond format files to pdf.
Define a converter in the preferences."

If I go to the preferences dialogue box, I am too confused and too
computer-literate to figure out what's wrong.


First of all, according to the Lilypond dropdown menu choice in the External 
Material dialog window, Lilypond 2.9or newer is needed for PDF outout, and 
Lilypond 2.6 or newer for PS. You can check you Lilypond version by executing 
"lilypond -v".


Secondly, looking in my LyX preferences, I do find the following related to 
Lilypond:



Under "File Handling -> File formats", I have the following entry in the 
"Formats" drop-down menu:


"Lilypond music"

The settings are:

"Document format" not ticked
"Vector graphics format" is ticked
Short name; lilypond
Extension: ly
Shortcut:
Editor: sensible-editor
Viewer:
Copier:

The "sensible-editor" is something related to my operating system (Debian). I 
don't think it matters for the funcionality you are after.


Under "File Handling -> Converters -> Converter Definitions", I have the 
following three instances, with the following settings:


* "Lilypond -> EPS":

From format: Lilypond music
To format: EPS
Converter: lilypond -dbackend=eps --ps $$i
Extra flag:

* "Lilypond -> PDF (ps2pdf)":

From format: Lilypond music
To format: PDF (ps2pdf)
Converter: lilypond -dbackend=eps --pdf $$i
Extra flag:

* "Lilypond -> PNG":

From format: Lilypond music
To format: PNG
Converter: lilypond -dbackend=eps --png $$i
Extra flag:

You could check if you have the same settings as me. These are default LyX 
settings here on Debian. I haven't changed them.


Best regards
Torquil


Re: LaTeX -> LyX and \newcommand

2010-08-31 Thread Hal Kierstead
I agree that this would be very pleasing, especially when working with 
collaborators who do not use LyX and who use many new commands.

Hal

On Aug 31, 2010, at 11:35 AM, Torquil Macdonald Sørensen wrote:

> On 31/08/10 19:35, Uwe Stöhr wrote:
> > Am 31.08.2010 18:35, schrieb Torquil Macdonald Sørensen:
> >
> >> My goal was to import a LaTeX file into LyX, but LyX was not able to
> >> understand all the \newcommands in the document, and therefore I wanted
> >> to preprocess the LaTeX file first.
> >
> > What do you mean with LyX doesn't understand? LyX should import them as
> > TeX-code and when you view it as PDF, you should see a PDF. If this is
> > not the case and you get LaTeX-errors instead, you found a bug in LyX's
> > TeX import program. If so, can you please provide a _small_ TeX testfile
> > to be able to test?
> 
> Sorry if you get two of these... I forgot to use "Reply to all" in my email 
> client and my have already sent on copy just to you. This should go to the 
> list as well.
> 
> Let me try to explain better what I meant. I don't want those grey boxes of 
> tex code for each instance where a user-defined command is executed in the 
> latex document. I want my LyX file to look as if I had written everything in 
> LyX without use of any \newcommand.
> 
> The following LaTeX file captures the essence of the file I just had the 
> misfortune to work with:
> 
> \documentclass{article}
> 
> \newcommand{\bea}{\begin{equation}}
> \newcommand{\eea}{\end{equation}}
> 
> \begin{document}
> 
> \bea
> \int f(x) dx = 0
> \eea
> 
> \end{document}
> 
> Importing this file into LyX results in a file where the math is not 
> "rendered", but instead the bare LaTeX math code is displayed between two 
> grey boxes, representing \bea and \eea.
> 
> >> I used a python package called plasTeX for this. It is able to parse
> >> LaTeX files and will automatically expand the user-defined \newcommands
> >> that are used throughout the document.
> >
> > What is done by "expanding"? I mean one only uses \newcommand once and
> > then use the defined command several times. Therefore you can safely put
> > all \newcommands either at the beginning of the document, or better, at
> > the end of the document preamble.
> 
> By "expanding", I mean that "my" plasTeX script (if you can call it that when 
> it is just a few lines) will process the above latex file and essentially 
> create this:
> 
> \documentclass{article}
> \begin{document}
> 
> \begin{equation}
> \int f(x) dx = 0
> \end{equation}
> 
> \end{document}
> 
> When this is imported into LyX, the equation is interpreted correctly and 
> rendered in the usualy fasion as mathematics, with no grey boxes.
> 
> Torquil



Re: LaTeX -> LyX and \newcommand

2010-08-31 Thread Torquil Macdonald Sørensen

On 31/08/10 20:52, Hal Kierstead wrote:

I agree that this would be very pleasing, especially when working with 
collaborators who do not use LyX and who use many new commands.

Hal


This is the simple python code which takes a filename as an argument, and 
creates the file PlastexProcessed.tex


-
#!/usr/bin/python
# _*_ coding: UTF-8 _*_

import sys
from plasTeX.TeX import TeX

doc = TeX(file=sys.argv[1]).parse()

# The processed document is contained in the string doc.source

# Print to file
f = open('PlastexProcessed.tex', 'w')
f.write(doc.source.encode("utf-8"))
f.close()




*** Example: 

It converts this:

--
\documentclass{article}

\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}

\begin{document}

\be
\int f(x) dx = 0
\ee

\end{document}
--


into this:

--
\documentclass{article}

\newcommand{\be }{\begin {equation}} \newcommand{\ee }{\end {equation}}

\begin{document} \begin{equation} \int f(x) dx = 0 \end{equation}

\end{document}
-

In the latter file, the \newcommands are not used in the text, so it is better 
suited for LyX import. The \newcommands can be deleted manually. It tends to 
make long lines, but that doesn't seem to matter for the subsequent LyX import.


Best regards
Torquil Sørensen


Re: how to make fragile frames in beamer layout

2010-08-31 Thread Guenter Milde
On 2010-08-31, Jürgen Spitzmüller wrote:

> This is due to the fact how frames are defined in LyX. Unfortunately, this 
> rules out native support for fragile frames (unless someone comes up with a 
> new definition of \lyxframe).

How about a "fragile frame" inset?

InsetLayout FragileFrame
   LyXType  custom
   LatexTypeEnvironment
   LatexName???
   ...


Günter



Beamer-conference-ornate and listings

2010-08-31 Thread Miguel Negrão

Hi

I'm doing a presentation with the Beamer-conference-ornate and I want to
include some programming code using the listing environment (insert->listing
or something like that, my version is not in english). When I do this the
file doesn't compile anymore... any ideas on how to solve this ?

Argument of \...@next has an extra }.
etc

thanks,
Miguel Negrão
-- 
View this message in context: 
http://lyx.475766.n2.nabble.com/Beamer-conference-ornate-and-listings-tp5484117p5484117.html
Sent from the LyX - Users mailing list archive at Nabble.com.


Re: how to make fragile frames in beamer layout

2010-08-31 Thread Rob Oakes
Hi Guenter,

I'm probably missing something obvious, but can't you use a \protect command?  
In a few of the document classes I've written, this has allowed me to pass all 
kind of fragile commands (images, for examples in the texMemo class) while 
keeping the processor nice and happy.

Cheers,

Rob


On Aug 31, 2010, at 1:28 PM, Guenter Milde wrote:

> On 2010-08-31, Jürgen Spitzmüller wrote:
> 
>> This is due to the fact how frames are defined in LyX. Unfortunately, this 
>> rules out native support for fragile frames (unless someone comes up with a 
>> new definition of \lyxframe).
> 
> How about a "fragile frame" inset?
> 
> InsetLayout FragileFrame
>   LyXType custom
>   LatexType   Environment
>   LatexName   ???
>   ...
> 
> 
> Günter
> 



landscape stops working!

2010-08-31 Thread Joseph
Hello people, I hope someone out there can help me out please

I've got a piece of simple latex code in my lyx document,

\begin{landscape} 
{\input{file.tex}}
\end{landscape}

and of course \usepackage{lscape} in the preamble

The file I'm inputting has a lot of floating tables (not lyx generated file)

The problem is that sometimes only the first table is in landscape mode, and not
the rest. It might have relation with the width of the table, still can't figure
it out, hopefully someone has an idea about it

thanks a lot



Re: LyX and Lilypond

2010-08-31 Thread Julien Rioux

On 31/08/2010 2:50 PM, Torquil Macdonald Sørensen wrote:

You could check if you have the same settings as me. These are default
LyX settings here on Debian. I haven't changed them.


These are default (I checked for LyX 1.6.5 specifically), but you do 
need a recent version of lilypond installed, as mentioned by the 
previous useful message. Once installed, select Tools > Reconfigure from 
LyX's menus, and the lilypond converter should get configured 
automatically. Do restart LyX after reconfiguration.


Cheers,
Julien



Re: Can't sync LyX with Skim

2010-08-31 Thread Pavel Sanda
Nat Jacobs wrote:
> Thanks for the help, but I'm not quite sure how to even check that. Do I
> have to run lyx -dbg in the terminal? 

run "lyx -dbg action" in terminal, lyx window will be launched and on that
terminal you will see the debug messages.

in the "correct" case, if you do the reverse search in skim, there should
appear message similar to what i posted in last message.
if it appears we have to look whats wrong within lyx, if it does not appear
we have to look whats wrong with skim or generated file.

by chance - you dont use xdvi? also have read the section about reverse
search in our manuals?

pavel


Re: Can't sync LyX with Skim

2010-08-31 Thread BH
On Tue, Aug 31, 2010 at 5:28 PM, Pavel Sanda  wrote:
> Nat Jacobs wrote:
>> Thanks for the help, but I'm not quite sure how to even check that. Do I
>> have to run lyx -dbg in the terminal?
>
> run "lyx -dbg action" in terminal, lyx window will be launched and on that
> terminal you will see the debug messages.

More specifically (on Mac), open Terminal.app (in
/Applications/Utilities/), and type:

/Applications/LyX.app/Contents/MacOS/lyx -dbg action

(assuming you have LyX.app in your /Applications directory, which it
should be for Skim to work). A new instance of LyX will open, so make
sure you've quit LyX before doing this.

BH


Re: LaTeX -> LyX and \newcommand

2010-08-31 Thread Uwe Stöhr

Am 31.08.2010 20:35, schrieb Torquil Macdonald Sørensen:


Let me try to explain better what I meant. I don't want those grey boxes of tex 
code for each
instance where a user-defined command is executed in the latex document. I want 
my LyX file to look
as if I had written everything in LyX without use of any \newcommand.
The following LaTeX file captures the essence of the file I just had the 
misfortune to work with:

\newcommand{\bea}{\begin{equation}}
\newcommand{\eea}{\end{equation}}
\begin{document}
\bea
\int f(x) dx = 0
\eea


Thanks, now I understand what you meant.

Such a feature is indeed very useful when collaborating with plain TeX users. I propose to create a 
new Wiki page describing your method and attaching there your python script.

Create a new Wiki page in this Wiki space:
http://wiki.lyx.org/LaTeX/LaTeX
(To upload files, like your script you need a password. if you need this, mail me and I'll send it 
to you privately.)


thanks in advance and best regards
Uwe


Re: agutex layout?

2010-08-31 Thread Uwe Stöhr

Am 31.08.2010 17:33, schrieb Evan Mason:


It does replace the older ones in that it seems to be the only one they are
offering now.  It's supposed to work for all the different AGU journals.
http://www.agu.org/pubs/helpdesk/


Hi, did a new layout file eventually get written for agutex?


I wrote a layout file for agutex. It requires that you have the AguTeX files:
ftp://ftp.agu.org/journals/latex/journals/Manuscript-Preparation/
installed to your LaTeX system.

The layout file is attached together with a LyX example file. Please test it our and report back. If 
it works for you, we can provide it together with the next LyX version.


regards Uwe


agutex.lyx
Description: application/lyx
#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[agutex]{article (AGU)}
# elsarticle textclass definition file.
# Author: Uwe Stöhr (uwesto...@web.de)

Format 11

Columns 1
Sides   1
SecNumDepth 3
TocDepth3
DefaultStyleStandard
Provides natbib 1

ClassOptions
FontSize10|11|12
end


# This is just to show how to declare the default font.
# The defaults are exactly those shown here.
DefaultFont
Family  Roman
Series  Medium
Shape   Up
SizeNormal
Color   None
EndFont


Style Standard
Margin  Static
LatexType   Paragraph
LatexName   dummy
ParIndent   MM
ParSkip 0.4
Align   Block
AlignPossible   Block, Left, Right, Center
LabelType   No_Label
End

Input stdcounters.inc
Input stdfloats.inc
Input stdlists.inc
Input stdsections.inc
Input stdstarsections.inc
Input stdlayouts.inc

NoStyle Chapter
NoStyle Chapter*


Style Title
Margin  Static
LatexType   Command
LatexName   title
CategoryFrontMatter
ParSkip 0.4
ItemSep 0
TopSep  0
BottomSep   1
ParSep  1
Align   Center
LabelType   No_Label
Font
  Size  Largest
EndFont
End


Style Authors
Margin  Static
LatexType   Command
CategoryFrontMatter
LatexName   authors
LabelSepxxx
ParSkip 0.4
TopSep  1.3
BottomSep   0.7
ParSep  0.7
Align   Center
LabelType   No_Label
Font
  Size  Large
EndFont
End


InsetLayout "Affiliation Mark"
LyxType custom
LatexType   command
LatexName   altaffilmark
LabelString "Affiliation Mark"
Font
  Color foreground
  Size  Small
  FamilyRoman
  Shape Up
  SeriesMedium
  Misc  No_Emph
  Misc  No_Noun
  Misc  No_Bar
EndFont
LabelFont
  Color latex
  Size  Small
EndFont
End


Style "Author affiliation"
Margin  Dynamic
LatexType   Command
LatexName   altaffiltext
CategoryFrontMatter
ParSkip 0.4
BottomSep   0.5
Align   Left
LabelSepxx
LabelType   Static
LabelString "Author affiliation:"
LabelFont
  Color Green
  SeriesBold
EndFont
End


Style Abstract
Margin  Dynamic
LatexType   Environment
LatexName   abstract
CategoryFrontMatter
NextNoIndent1
LabelSepxxx
ParSkip 0.4
TopSep  0.7
BottomSep   0.4
Align   Block
LabelType   Static
LabelString "Abstract."
LabelFont
  SeriesBold
EndFont
End


Style "Glossary term"
CopyStyle   Subsection*
CategoryBackMatter
LatexName   paragraph
End


Style Notation
Margin  Static
LatexType   Environment
LatexName