Edit Links |
Mac /
WalkthroughCategories: Mac << | Page list | >>Installing LyX on the MacThis is an introduction to beginners. If your experience of installing programs is limited and your experience of using word processors is confined to using Word, this is the place for you. Table of contents (hide) 1. Why would you like to install LyXIf you want to create good looking documents on your Mac, you basically have three options:
LyX is a front end to TeX, which is a computer implementation of the rules typesetters have been working by for centuries. By using LyX you can be sure that your documents look good. So what do you sacrifice? Well, think about it as leaving your manuscripts to type-setting. Typesetters know what they are doing, but tend to have strong opinions. So if you want to have complete control on the layout you are in for trouble... If that does not scare you off, continue for a guide on how to install and run LyX on the Mac. 2. What you needAll software is completely free. But you will need:
I will try to keep this introduction short and to the point. If you would like the details on how to install LyX on the Mac, see http://wiki.lyx.org/LyX/LyXOnMac The installation might take anywhere between half an hour and half a day depending on your bandwidth and server load. But don't worry, it won't lock up your computer during the time and you don't have to babysit the computer during the installation. 3. Installing TeXNote: What follows is a description of a multi-step installation; if you want to install TeX in one go, use MacTeX. MacTeX is recommended for beginners and those pressed for time. Let's dive right in. An explanation to what you have done is given in the end. You can read this explanation as your installation is progressing.
3.1 What have I done?If you like to see what has happened, select the Finder and choose Go-> Go to Folder... (or press Cmd+Shift+G where Cmd is the Apple key). Type /usr and press return. Select local and then gwTeX. This is a directory that contains roughly 235 MB, which has been installed by the i-Installer. Normally you are not supposed to mess with this directory (but there are exceptions as we will come to). 3.2 What do all these Megabytes contain?They contain instructions on how to typeset documents. The additional packages you installed contain instructions for tasks related to this, such as converting image files to a format that can be used by gwTeX. Now you can use gwTeX to create documents straight away, but unless you feel like writing input files like: \documentclass{article} \title{Cartesian closed categories and the price of eggs} \author{Jane Doe} \date{September 1994} \begin{document} \maketitle Hello world! \end{document} and typing some commands in the Terminal to get the corresponding pdf-document, LyX is your choice. We will come to how you install LyX shortly, Let's just conclude by saying that you have installed a package that LyX will need to help you create nice-looking documents. How it works is something you actually don't have to worry about, although I can promise you that you will probably want to tweak the inside sooner or later. But that's another story. 4. Installing LyXNow it's time for the easy part: installing LyX.
Now you are done with the installation of LyX! 4.1 What have I done?The install script has created a directory "LyX-1.4" in the directory "Application Support" which is in the directory "Library" in your home directory. In that folder the script has placed some templates and other stuff. It has also put some templates in /usr/local/gwTeX/share/texmf.local/tex/latex/lyx/ which is deep down into the directory that was created by the i-Installer for the TeX-installation. 4.2 Why do we need two templates?The easy answer is that the templates in the "Application Support" folder control what you will see on the screen when running LyX. The templates installed deep in the gwTex folder controls what you will see on paper when you print your document. 5. Creating your first LyX document
As you saw above, LyX works in the way that you tell the program: this is a title, this is the name of the author, and so on. Section* means that this is the header for a section, but that it should not be numbered (try "Section" without the star instead and you get a numbered heading). Now the text you have written doesn't look fancy at all. LyX uses a bare-bone approach and just shows you what you really need to see. Let's look at what will appear on paper:
Now this actually looks like crap. The reason is that the fonts used are bit-mapped, which doesn't come out good on-screen (much better on paper). We need to do something about this:
Now there are a bunch of other settings you can alter, such as document class (try for instance article (koma-script)), margins, etc. But this introduction will not delve in details on formatting. Those you can find at http://wiki.lyx.org/LyX/Documentation. Instead we will look closer at some more Mac-specific aspects. 6. Spell-checkingLyX is prepared for spell-checking and there are possibilities to obtain direct spell-checking within LyX. This is not especially hard, but it includes compiling a program (if you don't know what that means, don't worry). If your use of LyX is confined to everyday tasks like writing letters, reports, etc. you can take an easier road: 6.1 A simplistic approach to spell-checking and cutting & pastingIf you don't feel an urge to install an integrated spell-checker you can instead use the spell-checker provided by MacOSX in the following manner:
As you can see, the standard Mac shortcuts work just fine in LyX. However, note that when you paste in TextEdit the formatting is gone. The reason is quite simple. We have never specified that the title should be in a larger font. All we have said is that it is a Title. TextEdit on the other hand looks for formatting of the text (bold, larger font, etc.). When it does not find any formatting, it simply pastes it as plain text. What happens if we go the other way around? Write some new text in TextEdit. Select it and copy it with Edit-> Copy (or Cmd+c). Switch to LyX, position the cursor at the bottom and press return to get a new line. Then paste using Edit-> Paste (or Cmd+v). That does not look right... What happened? The text that was originally copied from LyX got pasted. The reason is that LyX uses two clipboard. You pasted the text from LyX "internal" clipboard. If you want to paste the text from another application you have to take another approach:
This results in almost the expected result with two notable exceptions:
Due to the loss of formatting it is a good idea to spell-check in TextEdit and paste the corrected words into LyX (i.e. not pasting all of the text). 6.2 Advanced approachInstall aspell as described on the aspell Installation Instructions page. This requires:
7. Installing templatesNow that you are experienced it is time to get advanced. Let's say you want to write a paper for an Elsevier journal.
If the dialogue does not automatically position itself in the correct position, select your home folder. Then click Library (note that this is Library in your home folder and not under the hard disk), Application Support, LyX-1.4, templates and default. There you have a file called elsart.lyx. This is a template for an Elsevier paper. Select it and press open. This will cause Lyx to produce an error claiming that there is a "missing TeX-class". What does this mean? Recall that LyX acts as a interface for TeX. What the error message says is only that "OK, you have the file that tells LyX which layout to use (for instance how a title should be formatted on-screen), but you don't have the file that tells TeX how to format the output (how the title should look in print)." You can check this by pressing OK. The file will open just fine and you can edit it and save the edited file. However, if you click the View menu, there is no option to show the pdf-file. So I guess we need to find the missing file! Open up Safari (or the web browser of your choice) and head for elsevier.com. Search for "Information for authors" and "LaTex file guidelines" (if you can't find it, do a search for elsart.cls), and you will find a statement that "Users of LaTeX 2e need only one file: the class file elsart.cls." OK, that sounds promising. Download the file by holding down Ctrl, clicking in the link and choosing "Download linked file". Now comes the tricky part: In the Finder make sure you have two windows open (if you have only one, open an additional using File-> New Finder Window)
You will get an alert message. Click "Authenticate" and type in your pasword (you will need to have administrative rights). OK, now we have found the file and placed it where it should be. But there are some few more steps needed. For these we need the Terminal (don't worry, we will fix this together and your computer won't explode).
Some cryptic text will follow as seen below. Don't worry about that.
Now go to LyX
Let's do this:
Now open the elsart.lyx template file again (go throguh the procedure above starting with Select File->New from Template). This time there won't be an error message! 7.1 What have I done?You have simply downloaded the description that TeX needs to produce the output and placed it in a folder where TeX will find it. The "sudo texhash" commands simply tells TeX "Have a look on all the files in your folders and note all new templates" (remember the TeX-installation is about 300 MB, it would be quite time-consuming to look in all of these files for templates anytime a template is needed). The sudo-part is a way to tell the system that you are trusted to do this (remember we are messing with files deep down in the guts of the system). The "Reconfigure" in LyX does the same for LyX, i.e. checks which templates that are available (it actually does a bit more, but that's nothing to worry about right now). In conclusion, everytime you change something in the LyX or TeX configuration, you need to tell TeX and LyX about it. 8. Updating LyX and TeXEventually there will be new versions of both LyX and TeX. Updating is simple. 8.1 LyXDownload the installer and follow the instructions (move the program file to the Applications-folder and run the installation-script). 8.2 TeXRun the i-Installer (from Applications/Utilities if you followed the instructions above). Click Dismiss to close the splash screen. Choose i-Package-> Open Updated Packages. If you have a relatively fast internet connection, choose Now. i-Installer will now open all packages that have been updated. Click OK to close the dialogue that tells you that all packages have been checked. Go through the packages and click Install (or Install & Configure) and continue as described for the installation above (except that you now also have to confirm that you wish to update in a dialogue by clicking Update). The downloads will be smaller during update since only updated portions will be downloaded. 9. Final wordsNow you have installed LyX, learnt some few basics with focus on the Mac-platform. Now you are ready to continue with the help of the massive amount of tutorials and manuals that are freely available on-line, see the LyX main wiki page 10. Files
of the masterpiece created in this walk-through ;-) 11. Contributors
|