Discussion:
how compile LyX from the terminal [on Max 10.9.4] --> lyx not found
Helmut Hauser
2014-09-17 10:23:15 UTC
Permalink
Hi everybody,

I am trying to write a shell script to compile individual LyX files automatically. I was able to find on

http://wiki.lyx.org/FAQ/ImportExport

that one can use:

lyx --export FORMAT myfile.lyx

I tried that and I get there error that the command “lyx" can not be found
-bash: lyx: command not found

It seem it it is not in my binary path. The problem might be that I am working on a Mac (OS 10.9.4). However, I was not able to locate lyx in order to add the right path in front of the command.
If found it int "Applications/_ifi_applications/LyX/Contents/MacOS/lyx”, but I am not able to access it even with the full path.
When I copy it with the finder to the folder where I need it, I get a link (alias), however, it tells me that I don’t have permissions, although I do have reading and writing permission ( for the link and for the original command).
Now I am stuck….

Any help is very much appreciated!

Thank you!

All the best,
Helmut
Stephan Witt
2014-09-18 06:19:49 UTC
Permalink
Post by Helmut Hauser
Hi everybody,
I am trying to write a shell script to compile individual LyX files automatically. I was able to find on
http://wiki.lyx.org/FAQ/ImportExport
lyx --export FORMAT myfile.lyx
I tried that and I get there error that the command “lyx" can not be found
-bash: lyx: command not found
It seem it it is not in my binary path. The problem might be that I am working on a Mac (OS 10.9.4). However, I was not able to locate lyx in order to add the right path in front of the command.
If found it int "Applications/_ifi_applications/LyX/Contents/MacOS/lyx”, but I am not able to access it even with the full path.
When I copy it with the finder to the folder where I need it, I get a link (alias), however, it tells me that I don’t have permissions, although I do have reading and writing permission ( for the link and for the original command).
Now I am stuck….
On Mac OS you have to type the full path. But the path you gave is weird. Are you sure?

This is how it works for me (on 10.8.6):

$ /Applications/LyX.app/Contents/MacOS/lyx --help
Aufruf: lyx [ Befehlszeilenoptionen ] [ name.lyx ... ]
Befehlszeilenoptionen (Groß-/Kleinschreibung beachten):
-help Zusammenfassende Hilfshinweise
-userdir dir Setzt das Benutzerverzeichnis auf dir
-sysdir dir Setzt das Systemverzeichnis auf dir
...
-e [--export] fmt Exportiert in das Format fmt.

Stephan
Helmut Hauser
2014-09-18 07:24:06 UTC
Permalink
Hi Stephan,
Post by Stephan Witt
Post by Helmut Hauser
Hi everybody,
I am trying to write a shell script to compile individual LyX files automatically. I was able to find on
http://wiki.lyx.org/FAQ/ImportExport
lyx --export FORMAT myfile.lyx
I tried that and I get there error that the command “lyx" can not be found
-bash: lyx: command not found
It seem it it is not in my binary path. The problem might be that I am working on a Mac (OS 10.9.4). However, I was not able to locate lyx in order to add the right path in front of the command.
If found it int "Applications/_ifi_applications/LyX/Contents/MacOS/lyx”, but I am not able to access it even with the full path.
When I copy it with the finder to the folder where I need it, I get a link (alias), however, it tells me that I don’t have permissions, although I do have reading and writing permission ( for the link and for the original command).
Now I am stuck….
On Mac OS you have to type the full path. But the path you gave is weird. Are you sure?
Well, regarding the weird path, I have organized my Application folder with an additional subfolder called “_ifi_applications” for work reasons. However, the main issue was that I looked into my local Application folder (/Users/my_account_name/Applications/….) and not into the “global" one.
Now it works. Thank you very much for this. You made my day!

All the best,
Helmut
Post by Stephan Witt
$ /Applications/LyX.app/Contents/MacOS/lyx --help
Aufruf: lyx [ Befehlszeilenoptionen ] [ name.lyx ... ]
-help Zusammenfassende Hilfshinweise
-userdir dir Setzt das Benutzerverzeichnis auf dir
-sysdir dir Setzt das Systemverzeichnis auf dir
...
-e [--export] fmt Exportiert in das Format fmt.
Stephan
---------------------------------------------------------
Helmut Hauser, Ph.D.
Artificial Intelligence Laboratory
Dept. of Informatics, University of Zurich
Andreasstr. 15, CH-8050 Zurich, Switzerland
---------------------------------------------------------
email: ***@ifi.uzh.ch
skype: helmuthauser
tel: +41 44 635 4310
web: http://ailab.ifi.uzh.ch/
---------------------------------------------------------
Helmut Hauser
2014-09-18 09:01:48 UTC
Permalink
Hi Stephan,

It is me again. Now I have troubles to compile with the export command.

I have the right LyX path, since it works with the —help option. However, the export does not work. I get the error message:

Error: Couldn't export file
----------------------------------------
No information for exporting the format Postscript.

I have tried it with various formats like Postscript (example above) and HTML since I figured maybe "PDF (pdflatex)” (wich I actually would need) with the space in between and the quotation mark might be an issues.
Do I understand it correctly, that I could use any format listed in the menu File/Export ?

my command looks like this (e.g. with the Postscript option):

/Applications/LyX.app/Contents/MacOS/lyx -e Postscript Chapter_01.lyx

I have also tried with —export, but of course that should’t make a difference. I have checked, I am in the right path, where the LyX file is located.

Any suggestion what I might have done wrong?

Thank you.

All the best,
Helmut


PS: When I move to LyX it gives me an error message: Error reading module basis (see below).
Post by Helmut Hauser
Hi Stephan,
Post by Stephan Witt
Post by Helmut Hauser
Hi everybody,
I am trying to write a shell script to compile individual LyX files automatically. I was able to find on
http://wiki.lyx.org/FAQ/ImportExport
lyx --export FORMAT myfile.lyx
I tried that and I get there error that the command “lyx" can not be found
-bash: lyx: command not found
It seem it it is not in my binary path. The problem might be that I am working on a Mac (OS 10.9.4). However, I was not able to locate lyx in order to add the right path in front of the command.
If found it int "Applications/_ifi_applications/LyX/Contents/MacOS/lyx”, but I am not able to access it even with the full path.
When I copy it with the finder to the folder where I need it, I get a link (alias), however, it tells me that I don’t have permissions, although I do have reading and writing permission ( for the link and for the original command).
Now I am stuck….
On Mac OS you have to type the full path. But the path you gave is weird. Are you sure?
Well, regarding the weird path, I have organized my Application folder with an additional subfolder called “_ifi_applications” for work reasons. However, the main issue was that I looked into my local Application folder (/Users/my_account_name/Applications/….) and not into the “global" one.
Now it works. Thank you very much for this. You made my day!
All the best,
Helmut
Post by Stephan Witt
$ /Applications/LyX.app/Contents/MacOS/lyx --help
Aufruf: lyx [ Befehlszeilenoptionen ] [ name.lyx ... ]
-help Zusammenfassende Hilfshinweise
-userdir dir Setzt das Benutzerverzeichnis auf dir
-sysdir dir Setzt das Systemverzeichnis auf dir
...
-e [--export] fmt Exportiert in das Format fmt.
Stephan
---------------------------------------------------------
Helmut Hauser, Ph.D.
Artificial Intelligence Laboratory
Dept. of Informatics, University of Zurich
Andreasstr. 15, CH-8050 Zurich, Switzerland
---------------------------------------------------------
skype: helmuthauser
tel: +41 44 635 4310
web: http://ailab.ifi.uzh.ch/
---------------------------------------------------------
---------------------------------------------------------
Helmut Hauser, Ph.D.
Artificial Intelligence Laboratory
Dept. of Informatics, University of Zurich
Andreasstr. 15, CH-8050 Zurich, Switzerland
---------------------------------------------------------
email: ***@ifi.uzh.ch
skype: helmuthauser
tel: +41 44 635 4310
web: http://ailab.ifi.uzh.ch/
---------------------------------------------------------
Dr Eberhard Lisse
2014-09-18 09:35:32 UTC
Permalink
Have you tried

lyx --help

el
Post by Helmut Hauser
Hi Stephan,
It is me again. Now I have troubles to compile with the export command.
I have the right LyX path, since it works with the —help option.
Error: Couldn't export file
----------------------------------------
No information for exporting the format Postscript.
[...]
Stephan Witt
2014-09-18 09:54:41 UTC
Permalink
Post by Helmut Hauser
Hi Stephan,
It is me again. Now I have troubles to compile with the export command.
Error: Couldn't export file
----------------------------------------
No information for exporting the format Postscript.
I have tried it with various formats like Postscript (example above) and HTML since I figured maybe "PDF (pdflatex)” (wich I actually would need) with the space in between and the quotation mark might be an issues.
Do I understand it correctly, that I could use any format listed in the menu File/Export ?
/Applications/LyX.app/Contents/MacOS/lyx -e Postscript Chapter_01.lyx
I have also tried with —export, but of course that should’t make a difference. I have checked, I am in the right path, where the LyX file is located.
Any suggestion what I might have done wrong?
You have to pass the value of "Kurztitel".

See the shapshot I've attached.

Stephan
Helmut Hauser
2014-09-18 10:05:14 UTC
Permalink
Post by Helmut Hauser
Hi Stephan,
It is me again. Now I have troubles to compile with the export command.
Error: Couldn't export file
----------------------------------------
No information for exporting the format Postscript.
I have tried it with various formats like Postscript (example above) and HTML since I figured maybe "PDF (pdflatex)” (wich I actually would need) with the space in between and the quotation mark might be an issues.
Do I understand it correctly, that I could use any format listed in the menu File/Export ?
/Applications/LyX.app/Contents/MacOS/lyx -e Postscript Chapter_01.lyx
I have also tried with —export, but of course that should’t make a difference. I have checked, I am in the right path, where the LyX file is located.
Any suggestion what I might have done wrong?
You have to pass the value of "Kurztitel”.
That did it. I was not aware of the "Short Name”. I have looked everywhere, but not in the most obvious place, i.e., with the --help option.
Thank you very much !

All the best,
Helmut
See the shapshot I've attached.
Stephan
<Bildschirmfoto 2014-09-18 um 11.35.08.png>
---------------------------------------------------------
Helmut Hauser, Ph.D.
Artificial Intelligence Laboratory
Dept. of Informatics, University of Zurich
Andreasstr. 15, CH-8050 Zurich, Switzerland
---------------------------------------------------------
email: ***@ifi.uzh.ch
skype: helmuthauser
tel: +41 44 635 4310
web: http://ailab.ifi.uzh.ch/
---------------------------------------------------------

Loading...