Kile in Mac

Hi everybody,

that's my first post, so i hope i'm posting in the right place...

I'm trying to use Kile in Mac but i still have some troubles, and I was hoping if someone could help me...

I installed Kile via ports by the following command

sudo ports install kile

everything is fine and i can run it by X11. Actually it compiles and it's ok, but then i cannot see the pdf file. I dont know if this is because of running in X11 so i should also put any extra command apart from

sudo kile

i tried to fix the problem by changing the preferences of kile (pdfviewer and so on) but the point is that kpdf is the default viewer and i'm using Skim. Actually i guess kpdf isnt installed in mac. So u can write and change the command to use any other software like Skim, but maybe i'm not doing correctly...

I'm a bit confused and lost using LaTeX in mac. I used it for a long time in Windows and in Mac it is Texshop and Texworks which really work fine, but Kile is the best LaTeX editor and i'd like to use it...

I tried to follow this link in order to install it, but i failed in the automator step and also in some packages installation.

http://hints.macworld.com/article.ph...71024061901344

So any advice and help is welcome. I must admit i'm really desperated and after hours i couldnt manage it...

thanks in advance,

Munoz

Macbook, Mac OS X (10.6)

Posted on Nov 2, 2010 3:56 AM

Reply
10 replies

Nov 2, 2010 7:29 AM in response to L3munoz

I know nothing about Kile, but if I understand your problem, it is that you create a PDF file, but you cannot view it.

Several ideas. If you can specify any utility for viewing your PDF, then try specifying

/Applications/Preview.app/Contents/MacOS/Preview

If Kile passes /Applications/Preview.app/Contents/MacOS a filename, then the Mac OS X PDF viewer (Preview) will display it. Preview can also open Postscript files as well, along with various graphic image files.

From Preview you can easily print the file, should you wish to do that.

If I have made wrong assumptions, please clarify your desires.

Nov 2, 2010 7:41 AM in response to BobHarris

Yes, that's the idea, to see somehow the pdf file just created. I've installed Skim and Okular and Acrobat Reader, so i'd like to use anyone of them, how should then i put for them and not preview??

and that command, where should i write it?? sorry but i'm new on Mac/Linux world and my background is too poor...

Furthermore, kile gives me the following error when trying to view the pdf file
/bin/bash skim command not found

I guess if i can define the command skim (as I suppose a executable) then kile can open the pdf file...but i really dont have any idea about how to create such file...

Nov 2, 2010 8:23 AM in response to L3munoz

Furthermore, kile gives me the following error when trying to view the pdf file
/bin/bash skim command not found

I guess if i can define the command skim (as I suppose a executable) then kile can open the pdf file...but i really dont have any idea about how to create such file...

If kile has a configuration option that allows you specify the command to use for skim, then see about replacing that with the path to Preview.

If that does not work, then you could create a shell script named 'skim' which really invokes Preview

#!/usr/bin/env bash
# skim replacment for use by kile
#
open -a Preview "$@"

Make the script executable, and put this file where kile can find it

chmod 775 skim
sudo mkdir -p /usr/local/bin
sudo mv skim /usr/local/bin/

If this does not work, then maybe /usr/local/bin is NOT in your PATH while running kile. If that is the case, then put the skim script in /usr/bin

sudo mv skim /usr/bin

I do not normally recommend putting your stuff in /usr/bin, as the next time you do a major OS install, it will most likely be removed.

Nov 2, 2010 9:29 AM in response to BobHarris

Hi Bob,

you were right. Actually it worked perfectly. It was just necessary to put the command /Applications/Skim.app/Contents/MacOS/Skim (as you can see i used Skim instead of Preview) in the Kile preferences and in this way kile knew how to find Skim.

In fact, if i open a shell and I write the same path I can use Skim (good to know it! thanks) but i guess there's a way to run the software without writing every time the whole path. I mean, something like called skim which actually is all the path or a call for it. How can I do it??

Nov 2, 2010 10:04 AM in response to L3munoz

you were right. Actually it worked perfectly. It was just necessary to put the command /Applications/Skim.app/Contents/MacOS/Skim (as you can see i used Skim instead of Preview) in the Kile preferences and in this way kile knew how to find Skim.

In fact, if i open a shell and I write the same path I can use Skim (good to know it! thanks) but i guess there's a way to run the software without writing every time the whole path. I mean, something like called skim which actually is all the path or a call for it. How can I do it??

If you want to invoke skim from the command line, since it is also a Mac OS X GUI application, you can invoke it as:

open -a Skim /file/you/want/to/open/with/skim

If you just want to invoke Skim as a regular Unix command, you could either create a shell alias in your .profile (unless you already have a .bash_profile)

alias skim="/Applications/Skim.app/Contents/MacOS/Skim"

-OR- you could put /Applications/Skim.app/Contents/MacOS in your PATH environment variable (also something you put in .profile (or .bash_profile)

export PATH="$PATH:/Applications/Skim.app/Contents/MacOS"

Anytime you change your .profile (or .bash_profile) you need to restart your Terminal session so the shell initialization file is re-read.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Kile in Mac

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.