Re: Inserting Photoshop EPS Files

2005-01-14 Thread Jean-Pierre Chretien

To: lyx-users@lists.lyx.org
From: Angus Leeming [EMAIL PROTECTED]
Subject: Re: Inserting Photoshop EPS Files
Date: Thu, 13 Jan 2005 18:22:53 +

Stephen Buonopane wrote:
[..]
I have found ps2eps to do a great job of cleaning up non-standard
PostScript.

http://www.telematik.informatik.uni-karlsruhe.de/~bless/ps2eps.html

Sure, avoids bitmapping for reals epses (I mean, vector-like drawings)
that may creep in with other transcoders.

-- 
Jean-Pierre



PDF output

2005-01-14 Thread Shailesh Ashok Shirali
Dear friends,
Thanks to the advice I got (see below), I am now able to access 
PDF output from LyX. Thanks a lot!

Shailesh Shirali

Dear Sirs,
When I do ViewPDF I get the following message:
Cannot view file. No information for viewing PDF (dvipdfm).
Go to Edit - Preferences - File formats, highlight PDF 
(dvipdfm),
type acrord32 in the Viewer slot (assuming you use Acrobat 
Reader to
view PDFs), then click Modify.  It would be a good idea to do the 
same
for PDF and PDF (pdflatex) as well.  Then click Save and see 
if you can now view PDFs. / Paul



Bibtex: author's name not shown

2005-01-14 Thread Paul Smith
Dear All

I am using, by the first time, Bibtex in connection with LyX and I am
needing some help with the following problem: when I insert a citation
reference, in LyX everything looks fine; however, when I go to see the
DVI file, where it should be Smith [1], I see (author ?) [1]. I
would like to add that I am using Natbib.

Thanks in advance,

Paul


Steve Litt's gripes against LyX and Docbook

2005-01-14 Thread Matej Cepl
Hi,

while reading a Steve Litt's column on writing technical books
(http://www.troubleshooters.com/tpromag/200201/200201.htm) I found this:

 ButDocbookhaditsownproblems.IcouldhaveusedEmacstofrontendmy
 Docbook,butIdon'tknowEmacsandhavehadtroubletryingtolearnit.
 LyXcanfrontendonlytheSGMLversionofDocbook,andIwantedtousethe
 XMLDocbookrepresentation,soaLyXfrontendforDocbookwasunsuitable
 forme.MostotherDocbookfrontendsrequiredtagcoding,whichisa
 productivitykillerforawriter.Themomentyouswitchyourfocusto
 codingatag,youforgettheideaaboutwhichyouwerewriting.Ughhh!

This is not completely correct. If you don't need BibTeX (I do), then you
can pretty easily create Docbook XML from SGML Docbook with the attached
script (you have to run it in the same directory as the original LyX file.
You can even define Docbook XML as new format in LyX and define conversion
for it (see attached screenshot of its definition). It is very rough and
probably buggy, but it may work at least partially. However, then the
answer is what to do with Docbook XML file and it is not simple either.

Comments?

 Best,

  Matej
-- 
Matej Cepl, http://www.ceplovi.cz/matej
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
I love deadlines. I like the whooshing sound they make as they
fly by.
-- Douglas Adams

dbxmlfix
Description: application/shellscript
attachment: lyx-docbook-xml-conversion.png

Re: Steve Litt's gripes against LyX and Docbook

2005-01-14 Thread Angus Leeming
Matej Cepl wrote:

 Comments?

I can't comment on the ability of the script to do the task you set it, but
here's some comments on the script itself:

Isn't function a bash-ism? You can just use lyxvalue here.
function lyxvalue()

You should enclose $2 in double quotes. It might contain spaces.
STRING=$(grep ^$1 $(basename $2 .sgml).lyx)

Some explanation of what the function does wouldn't help...

Quote $1 and $OUTPUT:
lyxvalue inputencoding $1
lenc2enc $OUTPUT

While we're at it, I think you should quote all of your $FOO because they
all derive from the input arguments.

Your sed script might be a little more readable if you used single quotes
rather than double quotes. Using multiple -e commands to a single sed is
much more efficent than multiple invocations of sed. Finally, I do believe
you're guilty of a useless use of cat.

Does this not do what you want?

| sed -e '1c\
?xml version=1.0 encoding=utf-8?\
!DOCTYPE article  PUBLIC -//OASIS//DTD DocBook XML V4.1.2//EN\
http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd; [\
!ENTITY nbsp #x00A0;\
!ENTITY lsqb lsquor;\
!ENTITY rsqb lsquo;\
!ENTITY ldquo ldquor;\
!--ENTITY rdquo rdquo;--\
!ENTITY lcub #x007B;\
!ENTITY rcub #x007D;\
!ENTITY dollar #x0024;\
!ENTITY ellipsis #x2026;\
]\
\
' \
-e '/^\s*$/d' \
-e 's/\s*\n\s*\//\//'

Having said that, '\s' is a GNU-ism anyway. If you want others to use your
script, use [ TAB] where TAB is a tab character.

Your final s-command might be more readable if you used different
delimiters. Eg s@@@ rather than s/// : [EMAIL PROTECTED]/@/@

Now that I've done that, I don't believe that the command does anything
anyway. Your sed script is only acting on a single line of data. It'll
never see a '\n' character.

Try 's/[ TAB]\{1,\}$//; s/^[ TAB]\{1,\}//'. Ie, strip redundant whitespace
from the end of lines and the beginning of lines. Right?

If you  move the '/^[ TAB]*$/d' command after the whitespace stripping one,
you'll remove all empty lines...

Best,
-- 
Angus



Alt/Meta again

2005-01-14 Thread Chris Menzel
LyX folk,

I recently set up a new FreeBSD/Xorg workstation for myself at my
office.  LyX installed easily and works beautifully, of course, but I
cannot for the life of me get either LeftAlt or the Windows (ugh) key
to function as a Meta key.  This seems to be LyX-specific.  LeftAlt
works fine as Meta under emacs and xemacs out of the box.  But under LyX
it works as I believe it is designed to by default, viz., like an Alt
key, i.e., Alt-f brings up the File menu, Alt-d the Document menu, etc.
The most I've been able to do using xmodmap is simply to deactivate Alt
alt-ogether. :-)

This is such a dumb, elementary problem that I feel embarrassed asking
about it, but I've searched in all the usual places (LyX wiki, many
mailing lists, general googling) for several hours and have come up
empty.  I am new to both FreeBSD and Xorg (I use OS X and Gentoo
Linux/XFree86 on laptop and home machines) and things work a bit
differently than I'm used to, but I'm really stumped here.  Any
suggestions gratefully accepted.

Chris Menzel



Re: Alt/Meta again

2005-01-14 Thread Rich Shepard
On Fri, 14 Jan 2005, Chris Menzel wrote:

 This seems to be LyX-specific. LeftAlt works fine as Meta under emacs and
 xemacs out of the box. But under LyX it works as I believe it is designed
 to by default, viz., like an Alt key, i.e., Alt-f brings up the File menu,
 Alt-d the Document menu, etc. The most I've been able to do using xmodmap
 is simply to deactivate Alt alt-ogether. :-)

Chris,

   Have you tried the [Esc] key? I've found linux apps that accept that as
the meta key; emacs, for example.

Rich

-- 
Dr. Richard B. Shepard, President
Applied Ecosystem Services, Inc. (TM)
http://www.appl-ecosys.com   Voice: 503-667-4517   Fax: 503-667-8863


Re: Alt/Meta again

2005-01-14 Thread Chris Menzel
On Fri, Jan 14, 2005 at 06:08:01PM -0800, Rich Shepard wrote:
 On Fri, 14 Jan 2005, Chris Menzel wrote:
 
  This seems to be LyX-specific. LeftAlt works fine as Meta under emacs and
  xemacs out of the box. But under LyX it works as I believe it is designed
  to by default, viz., like an Alt key, i.e., Alt-f brings up the File menu,
  Alt-d the Document menu, etc. The most I've been able to do using xmodmap
  is simply to deactivate Alt alt-ogether. :-)
 
 Chris,
 
 Have you tried the [Esc] key? I've found linux apps that accept that as
 the meta key; emacs, for example.

Yes, Rich, I even tried that old standby -- but even if it worked I
wouldn't count it as a solution!  Would be like 20 years ego when I
first learned emacs on a terminal to a DEC 2060.  1-2 punching the
keyboard over and over to move forward by word?  Never again! :-)

-chris



Re: Inserting Photoshop EPS Files

2005-01-14 Thread Jean-Pierre Chretien

To: lyx-users@lists.lyx.org
From: Angus Leeming [EMAIL PROTECTED]
Subject: Re: Inserting Photoshop EPS Files
Date: Thu, 13 Jan 2005 18:22:53 +

Stephen Buonopane wrote:
[..]
I have found ps2eps to do a great job of cleaning up non-standard
PostScript.

http://www.telematik.informatik.uni-karlsruhe.de/~bless/ps2eps.html

Sure, avoids bitmapping for reals epses (I mean, vector-like drawings)
that may creep in with other transcoders.

-- 
Jean-Pierre



PDF output

2005-01-14 Thread Shailesh Ashok Shirali
Dear friends,
Thanks to the advice I got (see below), I am now able to access 
PDF output from LyX. Thanks a lot!

Shailesh Shirali

Dear Sirs,
When I do ViewPDF I get the following message:
Cannot view file. No information for viewing PDF (dvipdfm).
Go to Edit - Preferences - File formats, highlight PDF 
(dvipdfm),
type acrord32 in the Viewer slot (assuming you use Acrobat 
Reader to
view PDFs), then click Modify.  It would be a good idea to do the 
same
for PDF and PDF (pdflatex) as well.  Then click Save and see 
if you can now view PDFs. / Paul



Bibtex: author's name not shown

2005-01-14 Thread Paul Smith
Dear All

I am using, by the first time, Bibtex in connection with LyX and I am
needing some help with the following problem: when I insert a citation
reference, in LyX everything looks fine; however, when I go to see the
DVI file, where it should be Smith [1], I see (author ?) [1]. I
would like to add that I am using Natbib.

Thanks in advance,

Paul


Steve Litt's gripes against LyX and Docbook

2005-01-14 Thread Matej Cepl
Hi,

while reading a Steve Litt's column on writing technical books
(http://www.troubleshooters.com/tpromag/200201/200201.htm) I found this:

 ButDocbookhaditsownproblems.IcouldhaveusedEmacstofrontendmy
 Docbook,butIdon'tknowEmacsandhavehadtroubletryingtolearnit.
 LyXcanfrontendonlytheSGMLversionofDocbook,andIwantedtousethe
 XMLDocbookrepresentation,soaLyXfrontendforDocbookwasunsuitable
 forme.MostotherDocbookfrontendsrequiredtagcoding,whichisa
 productivitykillerforawriter.Themomentyouswitchyourfocusto
 codingatag,youforgettheideaaboutwhichyouwerewriting.Ughhh!

This is not completely correct. If you don't need BibTeX (I do), then you
can pretty easily create Docbook XML from SGML Docbook with the attached
script (you have to run it in the same directory as the original LyX file.
You can even define Docbook XML as new format in LyX and define conversion
for it (see attached screenshot of its definition). It is very rough and
probably buggy, but it may work at least partially. However, then the
answer is what to do with Docbook XML file and it is not simple either.

Comments?

 Best,

  Matej
-- 
Matej Cepl, http://www.ceplovi.cz/matej
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
I love deadlines. I like the whooshing sound they make as they
fly by.
-- Douglas Adams

dbxmlfix
Description: application/shellscript
attachment: lyx-docbook-xml-conversion.png

Re: Steve Litt's gripes against LyX and Docbook

2005-01-14 Thread Angus Leeming
Matej Cepl wrote:

 Comments?

I can't comment on the ability of the script to do the task you set it, but
here's some comments on the script itself:

Isn't function a bash-ism? You can just use lyxvalue here.
function lyxvalue()

You should enclose $2 in double quotes. It might contain spaces.
STRING=$(grep ^$1 $(basename $2 .sgml).lyx)

Some explanation of what the function does wouldn't help...

Quote $1 and $OUTPUT:
lyxvalue inputencoding $1
lenc2enc $OUTPUT

While we're at it, I think you should quote all of your $FOO because they
all derive from the input arguments.

Your sed script might be a little more readable if you used single quotes
rather than double quotes. Using multiple -e commands to a single sed is
much more efficent than multiple invocations of sed. Finally, I do believe
you're guilty of a useless use of cat.

Does this not do what you want?

| sed -e '1c\
?xml version=1.0 encoding=utf-8?\
!DOCTYPE article  PUBLIC -//OASIS//DTD DocBook XML V4.1.2//EN\
http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd; [\
!ENTITY nbsp #x00A0;\
!ENTITY lsqb lsquor;\
!ENTITY rsqb lsquo;\
!ENTITY ldquo ldquor;\
!--ENTITY rdquo rdquo;--\
!ENTITY lcub #x007B;\
!ENTITY rcub #x007D;\
!ENTITY dollar #x0024;\
!ENTITY ellipsis #x2026;\
]\
\
' \
-e '/^\s*$/d' \
-e 's/\s*\n\s*\//\//'

Having said that, '\s' is a GNU-ism anyway. If you want others to use your
script, use [ TAB] where TAB is a tab character.

Your final s-command might be more readable if you used different
delimiters. Eg s@@@ rather than s/// : [EMAIL PROTECTED]/@/@

Now that I've done that, I don't believe that the command does anything
anyway. Your sed script is only acting on a single line of data. It'll
never see a '\n' character.

Try 's/[ TAB]\{1,\}$//; s/^[ TAB]\{1,\}//'. Ie, strip redundant whitespace
from the end of lines and the beginning of lines. Right?

If you  move the '/^[ TAB]*$/d' command after the whitespace stripping one,
you'll remove all empty lines...

Best,
-- 
Angus



Alt/Meta again

2005-01-14 Thread Chris Menzel
LyX folk,

I recently set up a new FreeBSD/Xorg workstation for myself at my
office.  LyX installed easily and works beautifully, of course, but I
cannot for the life of me get either LeftAlt or the Windows (ugh) key
to function as a Meta key.  This seems to be LyX-specific.  LeftAlt
works fine as Meta under emacs and xemacs out of the box.  But under LyX
it works as I believe it is designed to by default, viz., like an Alt
key, i.e., Alt-f brings up the File menu, Alt-d the Document menu, etc.
The most I've been able to do using xmodmap is simply to deactivate Alt
alt-ogether. :-)

This is such a dumb, elementary problem that I feel embarrassed asking
about it, but I've searched in all the usual places (LyX wiki, many
mailing lists, general googling) for several hours and have come up
empty.  I am new to both FreeBSD and Xorg (I use OS X and Gentoo
Linux/XFree86 on laptop and home machines) and things work a bit
differently than I'm used to, but I'm really stumped here.  Any
suggestions gratefully accepted.

Chris Menzel



Re: Alt/Meta again

2005-01-14 Thread Rich Shepard
On Fri, 14 Jan 2005, Chris Menzel wrote:

 This seems to be LyX-specific. LeftAlt works fine as Meta under emacs and
 xemacs out of the box. But under LyX it works as I believe it is designed
 to by default, viz., like an Alt key, i.e., Alt-f brings up the File menu,
 Alt-d the Document menu, etc. The most I've been able to do using xmodmap
 is simply to deactivate Alt alt-ogether. :-)

Chris,

   Have you tried the [Esc] key? I've found linux apps that accept that as
the meta key; emacs, for example.

Rich

-- 
Dr. Richard B. Shepard, President
Applied Ecosystem Services, Inc. (TM)
http://www.appl-ecosys.com   Voice: 503-667-4517   Fax: 503-667-8863


Re: Alt/Meta again

2005-01-14 Thread Chris Menzel
On Fri, Jan 14, 2005 at 06:08:01PM -0800, Rich Shepard wrote:
 On Fri, 14 Jan 2005, Chris Menzel wrote:
 
  This seems to be LyX-specific. LeftAlt works fine as Meta under emacs and
  xemacs out of the box. But under LyX it works as I believe it is designed
  to by default, viz., like an Alt key, i.e., Alt-f brings up the File menu,
  Alt-d the Document menu, etc. The most I've been able to do using xmodmap
  is simply to deactivate Alt alt-ogether. :-)
 
 Chris,
 
 Have you tried the [Esc] key? I've found linux apps that accept that as
 the meta key; emacs, for example.

Yes, Rich, I even tried that old standby -- but even if it worked I
wouldn't count it as a solution!  Would be like 20 years ego when I
first learned emacs on a terminal to a DEC 2060.  1-2 punching the
keyboard over and over to move forward by word?  Never again! :-)

-chris



Re: Inserting Photoshop EPS Files

2005-01-14 Thread Jean-Pierre Chretien

>>To: lyx-users@lists.lyx.org
>>From: Angus Leeming <[EMAIL PROTECTED]>
>>Subject: Re: Inserting Photoshop EPS Files
>>Date: Thu, 13 Jan 2005 18:22:53 +
>>
>>Stephen Buonopane wrote:
[..]
>>I have found ps2eps to do a great job of cleaning up non-standard
>>PostScript.
>>
>>http://www.telematik.informatik.uni-karlsruhe.de/~bless/ps2eps.html

Sure, avoids bitmapping for reals epses (I mean, vector-like drawings)
that may creep in with other transcoders.

-- 
Jean-Pierre



PDF output

2005-01-14 Thread Shailesh Ashok Shirali
Dear friends,
Thanks to the advice I got (see below), I am now able to access 
PDF output from LyX. Thanks a lot!

Shailesh Shirali

Dear Sirs,
When I do "View>PDF" I get the following message:
"Cannot view file. No information for viewing PDF (dvipdfm)."
Go to Edit -> Preferences -> File formats, highlight "PDF 
(dvipdfm)",
type "acrord32" in the Viewer slot (assuming you use Acrobat 
Reader to
view PDFs), then click Modify.  It would be a good idea to do the 
same
for "PDF" and "PDF (pdflatex)" as well.  Then click Save and see 
if you can now view PDFs. / Paul



Bibtex: author's name not shown

2005-01-14 Thread Paul Smith
Dear All

I am using, by the first time, Bibtex in connection with LyX and I am
needing some help with the following problem: when I insert a citation
reference, in LyX everything looks fine; however, when I go to see the
DVI file, where it should be "Smith [1]", I see "(author ?) [1]". I
would like to add that I am using Natbib.

Thanks in advance,

Paul


Steve Litt's gripes against LyX and Docbook

2005-01-14 Thread Matej Cepl
Hi,

while reading a Steve Litt's column on writing technical books
(http://www.troubleshooters.com/tpromag/200201/200201.htm) I found this:

 But Docbook had its own problems. I could have used Emacs to front end my
 Docbook, but I don't know Emacs and have had trouble trying to learn it.
 LyX can front end only the SGML version of Docbook, and I wanted to use the
 XML Docbook representation, so a LyX front end for Docbook was unsuitable
 for me. Most other Docbook front ends required tag coding, which is a
 productivity killer for a writer.  The moment you switch your focus to
 coding a tag, you forget the idea about which you were writing. Ughhh!

This is not completely correct. If you don't need BibTeX (I do), then you
can pretty easily create Docbook XML from SGML Docbook with the attached
script (you have to run it in the same directory as the original LyX file.
You can even define Docbook XML as new format in LyX and define conversion
for it (see attached screenshot of its definition). It is very rough and
probably buggy, but it may work at least partially. However, then the
answer is what to do with Docbook XML file and it is not simple either.

Comments?

 Best,

  Matej
-- 
Matej Cepl, http://www.ceplovi.cz/matej
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
I love deadlines. I like the whooshing sound they make as they
fly by.
-- Douglas Adams

dbxmlfix
Description: application/shellscript
<>

Re: Steve Litt's gripes against LyX and Docbook

2005-01-14 Thread Angus Leeming
Matej Cepl wrote:

> Comments?

I can't comment on the ability of the script to do the task you set it, but
here's some comments on the script itself:

Isn't "function" a bash-ism? You can just use "lyxvalue" here.
function lyxvalue()

You should enclose $2 in double quotes. It might contain spaces.
STRING=$(grep "^$1" $(basename $2 .sgml).lyx)

Some explanation of what the function does wouldn't help...

Quote $1 and $OUTPUT:
lyxvalue inputencoding $1
lenc2enc $OUTPUT

While we're at it, I think you should quote all of your $FOO because they
all derive from the input arguments.

Your sed script might be a little more readable if you used single quotes
rather than double quotes. Using multiple -e commands to a single sed is
much more efficent than multiple invocations of sed. Finally, I do believe
you're guilty of a "useless use of cat".

Does this not do what you want?

| sed -e '1c\
\
http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd; [\
\
\
\
\
\
\
\
\
\
]>\
\
' \
-e '/^\s*$/d' \
-e 's/\s*\n\s*<\//<\//'

Having said that, '\s' is a GNU-ism anyway. If you want others to use your
script, use [ TAB] where TAB is a tab character.

Your final s-command might be more readable if you used different
delimiters. Eg s@@@ rather than s/// : [EMAIL PROTECTED]

Alt/Meta again

2005-01-14 Thread Chris Menzel
LyX folk,

I recently set up a new FreeBSD/Xorg workstation for myself at my
office.  LyX installed easily and works beautifully, of course, but I
cannot for the life of me get either LeftAlt or the "Windows" (ugh) key
to function as a Meta key.  This seems to be LyX-specific.  LeftAlt
works fine as Meta under emacs and xemacs out of the box.  But under LyX
it works as I believe it is designed to by default, viz., like an Alt
key, i.e., Alt-f brings up the File menu, Alt-d the Document menu, etc.
The most I've been able to do using xmodmap is simply to deactivate Alt
alt-ogether. :-)

This is such a dumb, elementary problem that I feel embarrassed asking
about it, but I've searched in all the usual places (LyX wiki, many
mailing lists, general googling) for several hours and have come up
empty.  I am new to both FreeBSD and Xorg (I use OS X and Gentoo
Linux/XFree86 on laptop and home machines) and things work a bit
differently than I'm used to, but I'm really stumped here.  Any
suggestions gratefully accepted.

Chris Menzel



Re: Alt/Meta again

2005-01-14 Thread Rich Shepard
On Fri, 14 Jan 2005, Chris Menzel wrote:

> This seems to be LyX-specific. LeftAlt works fine as Meta under emacs and
> xemacs out of the box. But under LyX it works as I believe it is designed
> to by default, viz., like an Alt key, i.e., Alt-f brings up the File menu,
> Alt-d the Document menu, etc. The most I've been able to do using xmodmap
> is simply to deactivate Alt alt-ogether. :-)

Chris,

   Have you tried the [Esc] key? I've found linux apps that accept that as
the meta key; emacs, for example.

Rich

-- 
Dr. Richard B. Shepard, President
Applied Ecosystem Services, Inc. (TM)
   Voice: 503-667-4517   Fax: 503-667-8863


Re: Alt/Meta again

2005-01-14 Thread Chris Menzel
On Fri, Jan 14, 2005 at 06:08:01PM -0800, Rich Shepard wrote:
> On Fri, 14 Jan 2005, Chris Menzel wrote:
> 
> > This seems to be LyX-specific. LeftAlt works fine as Meta under emacs and
> > xemacs out of the box. But under LyX it works as I believe it is designed
> > to by default, viz., like an Alt key, i.e., Alt-f brings up the File menu,
> > Alt-d the Document menu, etc. The most I've been able to do using xmodmap
> > is simply to deactivate Alt alt-ogether. :-)
> 
> Chris,
> 
> Have you tried the [Esc] key? I've found linux apps that accept that as
> the meta key; emacs, for example.

Yes, Rich, I even tried that old standby -- but even if it worked I
wouldn't count it as a solution!  Would be like 20 years ego when I
first learned emacs on a terminal to a DEC 2060.  1-2 punching the
keyboard over and over to move forward by word?  Never again! :-)

-chris