layout file for .tex files
Charlse Darwin
macports.users at gmail.com
Fri Apr 4 08:44:19 PDT 2008
Begin forwarded message:
From: "Bob Lounsbury" <boblounsbury at gmail.com>
Date: April 3, 2008 9:40:14 AM EDT (CA)
To: "Charlse Darwin" <macports.users at gmail.com>
Cc: "LyX Users List" <lyx-users at lists.lyx.org>, rsorasen at broadpark.no
Subject: Re: layout file for .tex files
On Thu, Apr 3, 2008 at 4:13 AM, Charlse Darwin
<macports.users at gmail.com> wrote:
> Hi,
>
> It seems that I have textlive already installed.
>
> $ port installed | grep texlive
> texlive_base @2007_1 (active)
> texlive_texmf-minimal @2007_0 (active)
> $
Before we try anything else. Open a shell as root and run 'texhash'
this should refresh the LaTeX package database. Then open LyX and run
Tools->Reconfigure and restart LyX, maybe run Reconfigure twice and
restart LyX. Do you still receive the error message?
/Bob
Begin forwarded message:
From: "Bob Lounsbury" <boblounsbury at gmail.com>
Date: April 3, 2008 10:57:00 AM EDT (CA)
To: "Charlse Darwin" <macports.users at gmail.com>
Cc: "LyX Users List" <lyx-users at lists.lyx.org>,
rsorasen at broadpark.no, jmr at macports.org
Subject: Re: layout file for .tex files
On Thu, Apr 3, 2008 at 8:31 AM, Charlse Darwin
<macports.users at gmail.com> wrote:
>
> On Apr 3, 2008, at 8:40 AM, Bob Lounsbury wrote:
>
> On Thu, Apr 3, 2008 at 4:13 AM, Charlse Darwin
> <macports.users at gmail.com>
> wrote:
>
>
>> Hi,
>>
>> It seems that I have textlive already installed.
>>
>> $ port installed | grep texlive
>> texlive_base @2007_1 (active)
>> texlive_texmf-minimal @2007_0 (active)
>> $
>>
>>
>
>
> Before we try anything else. Open a shell as root and run 'texhash'
> this should refresh the LaTeX package database.
>
> $ sudo texhash
> texhash: Updating /opt/local/share/texmf/ls-R...
> texhash: Updating /opt/local/share/texmf-dist/ls-R...
> texhash: Updating /opt/local/share/texmf-var/ls-R...
> texhash: Done.
> $
>
>
> Then open LyX and run
> Tools->Reconfigure and restart LyX, maybe run Reconfigure twice and
> restart LyX. Do you still receive the error message?
>
> /Bob
>
> I have Tools->TeX Information here and then `LaTex classes' `Latex
> styles'
> `BibTex styles'. I Rescan them all (twice).
> And also LyX->Reconfigure which I did and then it asked me to
> restart the
> LyX.
>
> Same error message pops-up!
>
> Here is the file that I am trying to open:
In LyX Document->Settings->Document Class does 'article' show as
'Unavailable: article'? If so then either you don't have 'article.cls'
installed on your computer through the texlive packages or LyX is not
recognizing the path to texmf* folders.
If you have article.cls installed in one of the
/opt/local/share/texmf* directories then the path needs to be added to
Tools->Preferences->Paths->PATH prefix so that LyX will recognize the
files installed there. You should just need to add /opt/local/share to
the list of paths separated by a semi-colon and then reconfigure LyX.
/Bob
Begin forwarded message:
From: "Bob Lounsbury" <boblounsbury at gmail.com>
Date: April 3, 2008 11:51:43 AM EDT (CA)
To: "Charlse Darwin" <macports.users at gmail.com>
Cc: "LyX Users List" <lyx-users at lists.lyx.org>,
rsorasen at broadpark.no, jmr at macports.org
Subject: Re: layout file for .tex files
On Thu, Apr 3, 2008 at 9:23 AM, Charlse Darwin
<macports.users at gmail.com> wrote:
> In Lyx->Preference->Paths->PATH prefix I have
>> /usr/texbin:/usr/local/gwTeX/bin/powerpc-apple-darwin-current:/usr/
>> local/gwTeX/bin/i386-apple-darwin-current:/usr/local/teTeX/bin/
>> powerpc-apple-darwin-current:/usr/local/teTeX/bin/i386-apple-
>> darwin-current:/sw/bin:/sw/sbin:/opt/local/teTeX/bin:/opt/local/
>> bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/usr/sbin:/sbin
That's the problem then. You need to add the path to your paths :-}.
So that LyX knows where all your LaTeX stuff is.
This is what the LyX wiki says, http://wiki.lyx.org/Mac/Mac:
To use other implementations of teTeX which do not install the
binaries in /usr/texbin,
/usr/local/teTeX/bin/powerpc-apple-darwin-current, /sw/bin,
/opt/local/teTeX/bin, or /usr/local/bin, either link the teTeX
binaries to one of those directories, or add the PATH of your teTeX
binaries to the PATH prefix field in LyX -> Preferences -> Paths.
I'm not exactly positive what path you need to add which would
correspond to the teTeX binaries. I would just do a trial and error.
First, just add /opt/local/share and then Reconfigure LyX and see if
Document-Settings->Document Class has changed to "available". Bennett
is the Mac expert but he hasn't responded yet. I'm sure he would have
a more sophisticated approach.
Cheers,
/Bob
Begin forwarded message:
From: "Bennett Helm" <bewihelm at gmail.com>
Date: April 3, 2008 2:07:03 PM EDT (CA)
To: "Bob Lounsbury" <boblounsbury at gmail.com>
Cc: "Charlse Darwin" <macports.users at gmail.com>, "LyX Users List"
<lyx-users at lists.lyx.org>, rsorasen at broadpark.no, jmr at macports.org
Subject: Re: layout file for .tex files
On Thu, Apr 3, 2008 at 11:51 AM, Bob Lounsbury
<boblounsbury at gmail.com> wrote:
On Thu, Apr 3, 2008 at 9:23 AM, Charlse Darwin
<macports.users at gmail.com> wrote:
> In Lyx->Preference->Paths->PATH prefix I have
> >/usr/texbin:/usr/local/gwTeX/bin/powerpc-apple-darwin-current:/
usr/local/gwTeX/bin/i386-apple-darwin-current:/usr/local/teTeX/bin/
powerpc-apple-darwin-current:/usr/local/teTeX/bin/i386-apple-darwin-
current:/sw/bin:/sw/sbin:/opt/local/teTeX/bin:/opt/local/bin:/usr/
local/bin:/usr/bin:/usr/X11R6/bin:/usr/sbin:/sbin
That's the problem then. You need to add the path to your paths :-}.
So that LyX knows where all your LaTeX stuff is.
Yes. I'm not sure where macports puts its latex files, but you can
find out by going to Terminal.app (Applications > Utilities) and typing:
which latex
which should return the path to latex. That path (minus the "latex"
part) is what you need to add to the PATH prefix, as Bob indicated.
So for me, "which latex" returns:
/usr/texbin/latex
and so I add to the beginning of PATH prefix just the "/usr/texbin"
part, followed by a colon (":"). (Of course, in my case, "/usr/
texbin" is already there, which is why it works for me.) Then LyX
should work for you.
Please let us know what you have to add. I haven't used macports
lately, so I'm not sure where they currently put the latex
executables, but we should make sure that is a part of the default
PATH prefix so that others don't have this problem.
One final note: there's no reason to use macports to install LyX.
They actually tend to be behind the current LyX binaries we post on
the LyX website. All you need to do is download the binary, drag
LyX.app wherever you want it, run the installer, and you're done.
Bennett
Begin forwarded message:
From: "Bennett Helm" <bewihelm at gmail.com>
Date: April 4, 2008 8:59:28 AM EDT (CA)
To: "Charlse Darwin" <macports.users at gmail.com>
Cc: "Bob Lounsbury" <boblounsbury at gmail.com>, "LyX Users List" <lyx-
users at lists.lyx.org>, rsorasen at broadpark.no, jmr at macports.org
Subject: Re: layout file for .tex files
On Fri, Apr 4, 2008 at 6:30 AM, Charlse Darwin
<macports.users at gmail.com> wrote:
$ which latex
no latex in ~/WebKit/WebKitTools/Scripts /usr/local/bin ~/Documents/
scripts/ /opt/local/bin /opt/local/sbin /usr/bin /usr/sbin /bin /
sbin /bin /sbin /usr/bin /usr/sbin
$ port info lyx
…
Library Dependencies: qt4-mac, texlive, ImageMagick, python25
$
Am I missing latex? And if so, where do I get it from?
It certainly looks as though you're missing it. (My guess is that if
you installed it via macports, it would be in /opt/local somewhere.
It used to be in /opt/local/teTeX/bin, but maybe with a switch to
TeXlive, that's changed to -- guessing here -- /opt/local/texlive/
bin. If so, it looks as though macports failed to set up your paths
properly.)
If you really don't have a TeX installation, I'd recommend getting
MacTeX from:
http://www.tug.org/mactex/
Bennett
Begin forwarded message:
From: "Bob Lounsbury" <boblounsbury at gmail.com>
Date: April 4, 2008 9:41:44 AM EDT (CA)
To: "Bennett Helm" <bewihelm at gmail.com>
Cc: "Charlse Darwin" <macports.users at gmail.com>, "LyX Users List"
<lyx-users at lists.lyx.org>, rsorasen at broadpark.no, jmr at macports.org
Subject: Re: layout file for .tex files
On Fri, Apr 4, 2008 at 6:59 AM, Bennett Helm <bewihelm at gmail.com> wrote:
>
> On Fri, Apr 4, 2008 at 6:30 AM, Charlse Darwin
> <macports.users at gmail.com>
> wrote:
>>
>>
>> $ which latex
>> no latex in ~/WebKit/WebKitTools/Scripts /usr/local/bin
> ~/Documents/scripts/ /opt/local/bin /opt/local/sbin /usr/bin /usr/
> sbin /bin
> /sbin /bin /sbin /usr/bin /usr/sbin
>> $ port info lyx
>> …
>> Library Dependencies: qt4-mac, texlive, ImageMagick, python25
>> $
>>
>> Am I missing latex? And if so, where do I get it from?
>
> It certainly looks as though you're missing it. (My guess is that
> if you
> installed it via macports, it would be in /opt/local somewhere. It
> used to
> be in /opt/local/teTeX/bin, but maybe with a switch to TeXlive, that's
> changed to -- guessing here -- /opt/local/texlive/bin. If so, it
> looks as
> though macports failed to set up your paths properly.)
>
> If you really don't have a TeX installation, I'd recommend getting
> MacTeX
> from:
>
> http://www.tug.org/mactex/
>
>
> Bennett
Isn't there a way to add a PATH to the 'which latex' variable? I'm
pretty sure that Charlse has TeX through the macports TeXlive packages
because of this (that he posted):
$ sudo texhash
texhash: Updating /opt/local/share/texmf/ls-R...
texhash: Updating /opt/local/share/texmf-dist/ls-R...
texhash: Updating /opt/local/share/texmf-var/ls-R...
texhash: Done.
$
And this (now there is a macports texlive_full package if you have
space):
$ port installed | grep texlive
texlive_base @2007_1 (active)
texlive_texmf-minimal @2007_0 (active)
$
And this (so I think the needed LaTeX packages are available):
/opt/local/share/texmf-dist/tex/latex/base/article.cls
It just seems to me that TeXlive has changed their paths and that
hasn't affected the system properly (I'm a little oblivious to path
stuff :-}).
Does running 'latex' on a '.tex' file work in a shell? Even if it
doesn't I think TeX is installed and Charlse only needs to add
/opt/local/share to his LyX paths and LyX will work even if straight
"latex" doesn't. Which brings me back to my first question isn't there
a way to add /opt/local/share to the 'which latex' PATH? Since I think
his TeX distribution is fine.
/Bob
Begin forwarded message:
From: "Bob Lounsbury" <boblounsbury at gmail.com>
Date: April 4, 2008 11:22:13 AM EDT (CA)
To: "Charlse Darwin" <macports.users at gmail.com>
Cc: "Bennett Helm" <bewihelm at gmail.com>, "LyX Users List" <lyx-
users at lists.lyx.org>, rsorasen at broadpark.no, jmr at macports.org
Subject: Re: layout file for .tex files
On Fri, Apr 4, 2008 at 9:01 AM, Charlse Darwin
<macports.users at gmail.com> wrote:
> $ port installed | grep texlive
> texlive_base @2007_1 (active)
> texlive_texmf-minimal @2007_0 (active)
>
>
> $ which latex
> no latex in /opt/local/share /Users/pm/WebKit/WebKitTools/Scripts
> /usr/local/bin /Users/pm/Documents/scripts/ /opt/local/bin /opt/
> local/sbin
> /usr/bin /usr/sbin /bin /sbin /Users/pm/WebKit/WebKitTools/Scripts
> /usr/local/bin /Users/pm/Documents/scripts/ /opt/local/bin /opt/
> local/sbin
> /usr/bin /usr/sbin /bin /sbin /bin /sbin /usr/bin /usr/sbin
>
> Since I think his TeX distribution is fine.
>
> /Bob
Strange. All I can say is you have the 'base' and the 'texmf-minimal'
texlive packages installed and this does not seem to be a complete TeX
distribution install.
We've been Cc:ing, jmr at macports.org. Do they not have a recommendation
of what macport packages are necessary for a complete TeX installation
of texlive?
Either consider installing 'texlive' and/or 'texlive_texmf-full' from
macports or whatever is recommended by the macport maintainers or
install MacTeX as Bennett suggested.
/Bob
Begin forwarded message:
From: "Bob Lounsbury" <boblounsbury at gmail.com>
Date: April 2, 2008 10:08:12 PM EDT (CA)
To: "LyX Users List" <lyx-users at lists.lyx.org>
Subject: Re: layout file for .tex files
On Wed, Apr 2, 2008 at 7:33 PM, Charlse Darwin
<macports.users at gmail.com> wrote:
> I just installed LyX via MacPorts and now have a newbie question
> for you
> all:
>
> I get following error message:
>
> ``The layout file requested by this document, article.layout, is not
> usable. This is probably because a LaTeX class or style file
> required by it
> is not available. See the Customization documentation for more
> information.
> LyX will not be able to produce output.''
>
> when I try to open a .tex file. What's going on and what are we
> talking
> about?
>
> $ uname -a
> Darwin Mac.loc 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10
> 18:26:00 PDT
> 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc
> $
>
Sounds like you haven't installed a TeX distribution. The distribution
will contain article.cls which article.layout needs.
I don't know much about Mac stuff, but I thought MacTeX was a popular
option. I'm sure there are other ways. Actually, I just looked at
MacPorts and they have TeXLive (this is the prefered distribution for
Linux). You need to install TeXLive which is a TeX distribution.
Cheers,
/Bob
More information about the macports-users
mailing list