Re: prettyref latex errors - again

2003-06-22 Thread Angus Leeming
Alexandru Cabuz wrote:

 then when you use prettyref, you have to type \prettyref{eq|Max4} instead
 
 Is there no way to get lyx to put in the | instead of the : directly
 or to figure something out so I don't have to actually type the stuff?
 That's kinda the benefit of using Lyx over direct Tex. You don't have to
 type as much weird code up.
 Besides for a document that's already written there's not much I can do
 but go back and change every one of the hundreds of references... right?
 
 Alex.

This should automate the process:

$ cat conv.sed
s/^\(\\begin_inset LatexCommand \\ref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\eqref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\pageref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\vpageref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\vref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\prettyref{[a-zA-z]\{2,3\}\):/\1|/

$ sed -f conv.sed yourfile.lyx  modified.lyx

-- 
Angus



Re: prettyref latex errors - again

2003-06-22 Thread Angus Leeming
Alexandru Cabuz wrote:

 then when you use prettyref, you have to type \prettyref{eq|Max4} instead
 
 Is there no way to get lyx to put in the | instead of the : directly
 or to figure something out so I don't have to actually type the stuff?
 That's kinda the benefit of using Lyx over direct Tex. You don't have to
 type as much weird code up.
 Besides for a document that's already written there's not much I can do
 but go back and change every one of the hundreds of references... right?
 
 Alex.

This should automate the process:

$ cat conv.sed
s/^\(\\begin_inset LatexCommand \\ref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\eqref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\pageref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\vpageref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\vref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\prettyref{[a-zA-z]\{2,3\}\):/\1|/

$ sed -f conv.sed yourfile.lyx  modified.lyx

-- 
Angus



Re: prettyref latex errors - again

2003-06-22 Thread Angus Leeming
Alexandru Cabuz wrote:

>> then when you use prettyref, you have to type \prettyref{eq|Max4} instead
> 
> Is there no way to get lyx to put in the "|" instead of the ":" directly
> or to figure something out so I don't have to actually type the stuff?
> That's kinda the benefit of using Lyx over direct Tex. You don't have to
> type as much weird code up.
> Besides for a document that's already written there's not much I can do
> but go back and change every one of the hundreds of references... right?
> 
> Alex.

This should automate the process:

$ cat conv.sed
s/^\(\\begin_inset LatexCommand \\ref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\eqref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\pageref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\vpageref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\vref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\prettyref{[a-zA-z]\{2,3\}\):/\1|/

$ sed -f conv.sed yourfile.lyx > modified.lyx

-- 
Angus



Re: prettyref latex errors - again

2003-06-21 Thread Alexandru Cabuz
 then when you use prettyref, you have to type \prettyref{eq|Max4} instead

Is there no way to get lyx to put in the | instead of the : directly or to 
figure something out so I don't have to actually type the stuff? That's kinda 
the benefit of using Lyx over direct Tex. You don't have to type as much 
weird code up.
Besides for a document that's already written there's not much I can do but go 
back and change every one of the hundreds of references... right?

Alex.


Re: prettyref latex errors - again

2003-06-21 Thread Alexandru Cabuz
 then when you use prettyref, you have to type \prettyref{eq|Max4} instead

Is there no way to get lyx to put in the | instead of the : directly or to 
figure something out so I don't have to actually type the stuff? That's kinda 
the benefit of using Lyx over direct Tex. You don't have to type as much 
weird code up.
Besides for a document that's already written there's not much I can do but go 
back and change every one of the hundreds of references... right?

Alex.


Re: prettyref latex errors - again

2003-06-21 Thread Alexandru Cabuz
> then when you use prettyref, you have to type \prettyref{eq|Max4} instead

Is there no way to get lyx to put in the "|" instead of the ":" directly or to 
figure something out so I don't have to actually type the stuff? That's kinda 
the benefit of using Lyx over direct Tex. You don't have to type as much 
weird code up.
Besides for a document that's already written there's not much I can do but go 
back and change every one of the hundreds of references... right?

Alex.


Re: prettyref latex errors - again

2003-06-19 Thread Alexandru Cabuz
 Add at the beginning of the document
   \catcode`:=12
 in latex mode.

Added that in ERT. Made no difference.

Also, I tried running lyx as 

LANG=en_US lyx

and then tried again, no difference. Although that does not prove the problem 
is not related to the locale. The rest of my system, including, importantly, 
latex, is probably still on the default French locale.

I have tried booting into the english locale but RH9 seems reluctant to do 
it... I gotta look into that.

Any other ideas, anybody?

Alex.


Re: prettyref latex errors - again

2003-06-19 Thread Charpentier Philippe

Ensuite nous éliminons 
\begin_inset Formula $\mathbf{E}$
\end_inset

 dans eq.
 
\begin_inset LatexCommand \prettyref{eq:Max4}

\end_inset 

The problem comes from the language frenchb which redefine ':'.
If you want to use frenchb with prettyref you have to rewrite
prettyref.sty
For example you can put in the preamble of the document the
following lines:

\def\newrefformat#1#2{%
  [EMAIL PROTECTED]@#1}##1{#2}}
\newrefformat{eq}{\textup{(\ref{#1})}}
\newrefformat{ssec}{Sous-section \ref{#1}}
\newrefformat{sssec}{Sous-sous-section \ref{#1}}
\newrefformat{cha}{Chapitre \ref{#1}}
\newrefformat{sec}{Section \ref{#1}}
\newrefformat{tab}{Tableau \ref{#1} on page \pageref{#1}}
\newrefformat{fig}{Figure \ref{#1} on page \pageref{#1}}
[EMAIL PROTECTED]|}
[EMAIL PROTECTED]|#2|{%
  \expandafter\ifx\csname [EMAIL PROTECTED]
\PackageWarning{prettyref}{Reference format #1\space undefined}%
\ref{#1|#2}%
  \else%
\csname [EMAIL PROTECTED]|#2}%
  \fi%
}

This will replace, in prettyref.sty the ':' by '|' (and also defines
predefined refformat eq, sec, ssec, sssec, cha, tab and fig in french).
then when you use prettyref, you have to type \prettyref{eq|Max4} instead
of \prettyref{eq:Max4} (i.e. replace the ':' by '|').

Note. if you redefine ':' (for example by \catcode`:=12) in the begining
of the document to be able to use the original prettyref, you loose
the definition of ':' in frenchb, and, for me, this is a bad solution.

Ph. C.


Re: prettyref latex errors - again

2003-06-19 Thread Alexandru Cabuz
 Note. if you redefine ':' (for example by \catcode`:=12) in the begining
 of the document to be able to use the original prettyref, you loose
 the definition of ':' in frenchb, and, for me, this is a bad solution.

I don't write the references, I just insert them using the menu. So I don't 
actually type the ':' or the '|'. 

But why is that a bad solution? I don't know anything about tex, what is ':' 
supposed to do that may get messed up by redefining it?

Alex.


Re: prettyref latex errors - again

2003-06-19 Thread Alexandru Cabuz
Thanks. Now it works. For some reason I had inserted that ERT after the title 
and it did not seem to work. Now it's OK though.

Alex.



Re: prettyref latex errors - again

2003-06-19 Thread Philippe Charpentier
On Thu, 19 Jun 2003 13:49:44 +0200
Alexandru Cabuz [EMAIL PROTECTED] wrote:

  Note. if you redefine ':' (for example by \catcode`:=12) in the begining
  of the document to be able to use the original prettyref, you loose
  the definition of ':' in frenchb, and, for me, this is a bad solution.
 
 I don't write the references, I just insert them using the menu. So I don't 
 actually type the ':' or the '|'. 
 
 But why is that a bad solution? I don't know anything about tex, what is ':' 
 supposed to do that may get messed up by redefining it?
 
 Alex.

OK, this discussion being about french, I will continu in that language.
On utilise les prettyref avec des labels adaptés. Avec le package de base, ils sont de 
la forme  type:nom , où type est, par exemple  eq  pour une équation. Ici  :  
est simplement un carctère comme les autres.
Qand on utilise frenchb, ce carctère  :  devient une macro TeX, car l'espace entre 
un mot et  :  est prédéfini (et d'ailleurs indépendant du fait que l'on mette un 
espace ou non). En conséquence prettyref ne comprend plus le label! Si on redéfini  : 
 comme un caractère ordinaire, on perd cet espace qui fait partie des règles de la 
typographie française, ce qui n'est pas une bonne solution à mon sens.
Ainsi, pour bénéficier à la fois des règles de typographie française et de prettyref, 
à ma connaissance, la seule solution (en tous cas la plus simple) est de reécrire 
prettyref.sty en remplaçant le caractère  :  par (par ewemple)  | . C'est ce que 
fait la macro de mon précédent message.
Il faut aussi faire attention quand on utilise la possbilité donnée par LyX de céer 
les labels automatiquement. Dans le nom du label il ne doit y avoir que des lettres et 
des chiffres (plus exactement certains caractères sont à proscrire impérativement). Il 
vaut donc toujours mieux écrire son label soi-même. Dans le cas de labels pour 
prettyref, le type comportant des lettres et le nom des lettres et des chiffres est 
une solution sans risque.

Ph. C.


Re: prettyref latex errors - again

2003-06-19 Thread Alexandru Cabuz
 Add at the beginning of the document
   \catcode`:=12
 in latex mode.

Added that in ERT. Made no difference.

Also, I tried running lyx as 

LANG=en_US lyx

and then tried again, no difference. Although that does not prove the problem 
is not related to the locale. The rest of my system, including, importantly, 
latex, is probably still on the default French locale.

I have tried booting into the english locale but RH9 seems reluctant to do 
it... I gotta look into that.

Any other ideas, anybody?

Alex.


Re: prettyref latex errors - again

2003-06-19 Thread Charpentier Philippe

Ensuite nous éliminons 
\begin_inset Formula $\mathbf{E}$
\end_inset

 dans eq.
 
\begin_inset LatexCommand \prettyref{eq:Max4}

\end_inset 

The problem comes from the language frenchb which redefine ':'.
If you want to use frenchb with prettyref you have to rewrite
prettyref.sty
For example you can put in the preamble of the document the
following lines:

\def\newrefformat#1#2{%
  [EMAIL PROTECTED]@#1}##1{#2}}
\newrefformat{eq}{\textup{(\ref{#1})}}
\newrefformat{ssec}{Sous-section \ref{#1}}
\newrefformat{sssec}{Sous-sous-section \ref{#1}}
\newrefformat{cha}{Chapitre \ref{#1}}
\newrefformat{sec}{Section \ref{#1}}
\newrefformat{tab}{Tableau \ref{#1} on page \pageref{#1}}
\newrefformat{fig}{Figure \ref{#1} on page \pageref{#1}}
[EMAIL PROTECTED]|}
[EMAIL PROTECTED]|#2|{%
  \expandafter\ifx\csname [EMAIL PROTECTED]
\PackageWarning{prettyref}{Reference format #1\space undefined}%
\ref{#1|#2}%
  \else%
\csname [EMAIL PROTECTED]|#2}%
  \fi%
}

This will replace, in prettyref.sty the ':' by '|' (and also defines
predefined refformat eq, sec, ssec, sssec, cha, tab and fig in french).
then when you use prettyref, you have to type \prettyref{eq|Max4} instead
of \prettyref{eq:Max4} (i.e. replace the ':' by '|').

Note. if you redefine ':' (for example by \catcode`:=12) in the begining
of the document to be able to use the original prettyref, you loose
the definition of ':' in frenchb, and, for me, this is a bad solution.

Ph. C.


Re: prettyref latex errors - again

2003-06-19 Thread Alexandru Cabuz
 Note. if you redefine ':' (for example by \catcode`:=12) in the begining
 of the document to be able to use the original prettyref, you loose
 the definition of ':' in frenchb, and, for me, this is a bad solution.

I don't write the references, I just insert them using the menu. So I don't 
actually type the ':' or the '|'. 

But why is that a bad solution? I don't know anything about tex, what is ':' 
supposed to do that may get messed up by redefining it?

Alex.


Re: prettyref latex errors - again

2003-06-19 Thread Alexandru Cabuz
Thanks. Now it works. For some reason I had inserted that ERT after the title 
and it did not seem to work. Now it's OK though.

Alex.



Re: prettyref latex errors - again

2003-06-19 Thread Philippe Charpentier
On Thu, 19 Jun 2003 13:49:44 +0200
Alexandru Cabuz [EMAIL PROTECTED] wrote:

  Note. if you redefine ':' (for example by \catcode`:=12) in the begining
  of the document to be able to use the original prettyref, you loose
  the definition of ':' in frenchb, and, for me, this is a bad solution.
 
 I don't write the references, I just insert them using the menu. So I don't 
 actually type the ':' or the '|'. 
 
 But why is that a bad solution? I don't know anything about tex, what is ':' 
 supposed to do that may get messed up by redefining it?
 
 Alex.

OK, this discussion being about french, I will continu in that language.
On utilise les prettyref avec des labels adaptés. Avec le package de base, ils sont de 
la forme  type:nom , où type est, par exemple  eq  pour une équation. Ici  :  
est simplement un carctère comme les autres.
Qand on utilise frenchb, ce carctère  :  devient une macro TeX, car l'espace entre 
un mot et  :  est prédéfini (et d'ailleurs indépendant du fait que l'on mette un 
espace ou non). En conséquence prettyref ne comprend plus le label! Si on redéfini  : 
 comme un caractère ordinaire, on perd cet espace qui fait partie des règles de la 
typographie française, ce qui n'est pas une bonne solution à mon sens.
Ainsi, pour bénéficier à la fois des règles de typographie française et de prettyref, 
à ma connaissance, la seule solution (en tous cas la plus simple) est de reécrire 
prettyref.sty en remplaçant le caractère  :  par (par ewemple)  | . C'est ce que 
fait la macro de mon précédent message.
Il faut aussi faire attention quand on utilise la possbilité donnée par LyX de céer 
les labels automatiquement. Dans le nom du label il ne doit y avoir que des lettres et 
des chiffres (plus exactement certains caractères sont à proscrire impérativement). Il 
vaut donc toujours mieux écrire son label soi-même. Dans le cas de labels pour 
prettyref, le type comportant des lettres et le nom des lettres et des chiffres est 
une solution sans risque.

Ph. C.


Re: prettyref latex errors - again

2003-06-19 Thread Alexandru Cabuz
> Add at the beginning of the document
>   \catcode`:=12
> in latex mode.

Added that in ERT. Made no difference.

Also, I tried running lyx as 

LANG="en_US" lyx&

and then tried again, no difference. Although that does not prove the problem 
is not related to the locale. The rest of my system, including, importantly, 
latex, is probably still on the default French locale.

I have tried booting into the english locale but RH9 seems reluctant to do 
it... I gotta look into that.

Any other ideas, anybody?

Alex.


Re: prettyref latex errors - again

2003-06-19 Thread Charpentier Philippe

>Ensuite nous éliminons 
>\begin_inset Formula $\mathbf{E}$
>\end_inset
>
> dans eq.
> 
>\begin_inset LatexCommand \prettyref{eq:Max4}
>
>\end_inset 

The problem comes from the language frenchb which redefine ':'.
If you want to use frenchb with prettyref you have to rewrite
prettyref.sty
For example you can put in the preamble of the document the
following lines:

\def\newrefformat#1#2{%
  [EMAIL PROTECTED]@#1}##1{#2}}
\newrefformat{eq}{\textup{(\ref{#1})}}
\newrefformat{ssec}{Sous-section \ref{#1}}
\newrefformat{sssec}{Sous-sous-section \ref{#1}}
\newrefformat{cha}{Chapitre \ref{#1}}
\newrefformat{sec}{Section \ref{#1}}
\newrefformat{tab}{Tableau \ref{#1} on page \pageref{#1}}
\newrefformat{fig}{Figure \ref{#1} on page \pageref{#1}}
[EMAIL PROTECTED]|}
[EMAIL PROTECTED]|#2|{%
  \expandafter\ifx\csname [EMAIL PROTECTED]
\PackageWarning{prettyref}{Reference format #1\space undefined}%
\ref{#1|#2}%
  \else%
\csname [EMAIL PROTECTED]|#2}%
  \fi%
}

This will replace, in prettyref.sty the ':' by '|' (and also defines
predefined refformat eq, sec, ssec, sssec, cha, tab and fig in french).
then when you use prettyref, you have to type \prettyref{eq|Max4} instead
of \prettyref{eq:Max4} (i.e. replace the ':' by '|').

Note. if you redefine ':' (for example by \catcode`:=12) in the begining
of the document to be able to use the original prettyref, you loose
the definition of ':' in frenchb, and, for me, this is a bad solution.

Ph. C.


Re: prettyref latex errors - again

2003-06-19 Thread Alexandru Cabuz
> Note. if you redefine ':' (for example by \catcode`:=12) in the begining
> of the document to be able to use the original prettyref, you loose
> the definition of ':' in frenchb, and, for me, this is a bad solution.

I don't write the references, I just insert them using the menu. So I don't 
actually type the ':' or the '|'. 

But why is that a bad solution? I don't know anything about tex, what is ':' 
supposed to do that may get messed up by redefining it?

Alex.


Re: prettyref latex errors - again

2003-06-19 Thread Alexandru Cabuz
Thanks. Now it works. For some reason I had inserted that ERT after the title 
and it did not seem to work. Now it's OK though.

Alex.



Re: prettyref latex errors - again

2003-06-19 Thread Philippe Charpentier
On Thu, 19 Jun 2003 13:49:44 +0200
Alexandru Cabuz <[EMAIL PROTECTED]> wrote:

> > Note. if you redefine ':' (for example by \catcode`:=12) in the begining
> > of the document to be able to use the original prettyref, you loose
> > the definition of ':' in frenchb, and, for me, this is a bad solution.
> 
> I don't write the references, I just insert them using the menu. So I don't 
> actually type the ':' or the '|'. 
> 
> But why is that a bad solution? I don't know anything about tex, what is ':' 
> supposed to do that may get messed up by redefining it?
> 
> Alex.

OK, this discussion being about french, I will continu in that language.
On utilise les prettyref avec des labels adaptés. Avec le package de base, ils sont de 
la forme " type:nom ", où type est, par exemple " eq " pour une équation. Ici " : " 
est simplement un carctère comme les autres.
Qand on utilise frenchb, ce carctère " : " devient une macro TeX, car l'espace entre 
un mot et " : " est prédéfini (et d'ailleurs indépendant du fait que l'on mette un 
espace ou non). En conséquence prettyref ne comprend plus le label! Si on redéfini " : 
" comme un caractère ordinaire, on perd cet espace qui fait partie des règles de la 
typographie française, ce qui n'est pas une bonne solution à mon sens.
Ainsi, pour bénéficier à la fois des règles de typographie française et de prettyref, 
à ma connaissance, la seule solution (en tous cas la plus simple) est de reécrire 
prettyref.sty en remplaçant le caractère " : " par (par ewemple) " | ". C'est ce que 
fait la macro de mon précédent message.
Il faut aussi faire attention quand on utilise la possbilité donnée par LyX de céer 
les labels automatiquement. Dans le nom du label il ne doit y avoir que des lettres et 
des chiffres (plus exactement certains caractères sont à proscrire impérativement). Il 
vaut donc toujours mieux écrire son label soi-même. Dans le cas de labels pour 
prettyref, le type comportant des lettres et le nom des lettres et des chiffres est 
une solution sans risque.

Ph. C.


Re: prettyref latex errors - again

2003-06-18 Thread Juergen Spitzmueller
Alexandru Cabuz wrote:
 Here is the offending part of the lyx file, if it helps.

Can you please send a complete, but minimal lyx file that demonstrates the 
error?

Juergen.


Re: prettyref latex errors - again

2003-06-18 Thread Matej Cepl
On 2003-06-18, 13:39 GMT, Alexandru Cabuz wrote:
 I keep getting these pesky latex errors whenever I try using prettyref.

Could you please provide minimal (complete) .lyx document showing this 
behavior? Also the version of LyX, TeX distribution, and operating 
system would be helpful.

   Best,

  Matej

-- 
Matej Cepl,
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488



Re: prettyref latex errors - again

2003-06-18 Thread Alexandru Ioan Cabuz
 Could you please provide minimal (complete) .lyx document showing this
 behavior? Also the version of LyX, TeX distribution, and operating
 system would be helpful.

RedHat 9 tetex and tetex-latex 1.0.7-66

Lyx 1.3.2.

File is attached. It gives the same error as in my document. However if I don't have 
the few words after the reference, if the reference is the last thing in the file, 
then I get Operation produced an empty file

Thanks.

Alex.



sample.lyx
Description: Binary data


Re: prettyref latex errors - again

2003-06-18 Thread Juergen Spitzmueller
Alexandru Cabuz wrote:
 Here is the offending part of the lyx file, if it helps.

Can you please send a complete, but minimal lyx file that demonstrates the 
error?

Juergen.


Re: prettyref latex errors - again

2003-06-18 Thread Matej Cepl
On 2003-06-18, 13:39 GMT, Alexandru Cabuz wrote:
 I keep getting these pesky latex errors whenever I try using prettyref.

Could you please provide minimal (complete) .lyx document showing this 
behavior? Also the version of LyX, TeX distribution, and operating 
system would be helpful.

   Best,

  Matej

-- 
Matej Cepl,
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488



Re: prettyref latex errors - again

2003-06-18 Thread Alexandru Ioan Cabuz
 Could you please provide minimal (complete) .lyx document showing this
 behavior? Also the version of LyX, TeX distribution, and operating
 system would be helpful.

RedHat 9 tetex and tetex-latex 1.0.7-66

Lyx 1.3.2.

File is attached. It gives the same error as in my document. However if I don't have 
the few words after the reference, if the reference is the last thing in the file, 
then I get Operation produced an empty file

Thanks.

Alex.



sample.lyx
Description: Binary data


Re: prettyref latex errors - again

2003-06-18 Thread Juergen Spitzmueller
Alexandru Cabuz wrote:
> Here is the offending part of the lyx file, if it helps.

Can you please send a complete, but minimal lyx file that demonstrates the 
error?

Juergen.


Re: prettyref latex errors - again

2003-06-18 Thread Matej Cepl
On 2003-06-18, 13:39 GMT, Alexandru Cabuz wrote:
> I keep getting these pesky latex errors whenever I try using prettyref.

Could you please provide minimal (complete) .lyx document showing this 
behavior? Also the version of LyX, TeX distribution, and operating 
system would be helpful.

   Best,

  Matej

-- 
Matej Cepl,
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488



Re: prettyref latex errors - again

2003-06-18 Thread Alexandru Ioan Cabuz
> Could you please provide minimal (complete) .lyx document showing this
> behavior? Also the version of LyX, TeX distribution, and operating
> system would be helpful.

RedHat 9 tetex and tetex-latex 1.0.7-66

Lyx 1.3.2.

File is attached. It gives the same error as in my document. However if I don't have 
the few words after the reference, if the reference is the last thing in the file, 
then I get "Operation produced an empty file"

Thanks.

Alex.



sample.lyx
Description: Binary data