Install LaTeX on mac OS using Sublime Text 3 MacTex LaTeXTools Skim
You need four tools to use LaTeX in Sublime Text and mac:
MacTeX, Sublime Text with Package Control, LaTeXTools and Skim. MacTeX contains the TeX-related programs and packages needed to use LaTeX on your Mac. Sublime Text is a text editor used to write LaTeX documents. Skim is a PDF viewer used to view LaTeX documents. LaTeXTools plugin provides several features that simplify working with LaTeX files and used to build LaTeX documents. Read more here
Install MacTeX. You need about 6 –10 Gb free space.
Install Sublime Text 3
Download - Sublime Text
Sublime Text may be downloaded and evaluated for free, however a license must be purchased for continued use. There is…
Install Package Control which is necessary to install LaTexTools.
Method 1: manually
Installation - Package Control
If for some reason the console installation instructions do not work for you (such as having a proxy on your network)…
Method 2: automatically
When you open Sublime Text 3 press these keys:
⌘(Command) + Shift + P
Then search “Package Control” in the window. You will see the option to install it.
If you’re a regular user of Sublime, you likely already have Package Control.
Method-1: Install LaTeXTools automatically:
Once, you have Package Control installed, launch the Command Palette by pressing Ctrl+shift+p(Windows / Linux) or ⌘+shift+p (OS X) and select the Package Control: Install Package option. This will bring up a quick panel with a list of installable plugins. Start typing LaTeXTools and when you see it, select it. That’s it!
Briefly, do these:
- Press ⌘(Command) + Shift + P
- Search “Package Control: Install Package”
- Press Enter
- Search “LaTeXTools”
- Press Enter when you find the option to install it
Method-2: Install LaTeXTools manually:
If you prefer a more hands-on approach, you can always clone the git repository or else just grab the plugin’s .zip file from GitHub and extract it to your Sublime Packages directory (you can open it easily from ST, by clicking on Preferences | Browse Packages). Please note that if you do a manual installation, the package must be named “LaTeXTools”.
- Open Skim
- Select “Skim” then “Preferences” from the menu
- Select “Sync”
- Select “Check for file changes”
- Select “Reload automatically”
- Select “Sublime Text” from the “Preset” menu
If you are running LaTeXTools for the first time, you may want to run the LaTeXTools: Reset user settings to default command from the Command Palette to get an editable copy of the settings file. To open this file, please select Preferences | Package Settings | LaTeXTools | Settings — User. Please pay careful attention to the settings in the Platform-Specific Settings for your platform, as these may need to be adjusted for your environment. See the OS-specific instructions below for details on what needs to be adjusted.
Briefly do these and nothing more:
1- Open Sublime Text 3 and as show bellow select the Setting_User item.
2- You will see this notice:
3- LaTeXTools settings successfully reset to default!
In terminal do this:
brew install imagemagick
You can use the LaTeXTools: Check System command to verify that these are installed and setup in a place LaTeXTools can find.
You will see this results:
Which shows every necessary item is available in our system!
Once LaTeX is setup in Sublime Text, it can be used to create pdf document from a LaTex (.tex) file. To use LaTeX in Sublime Text open a .tex file which you want to build a pdf for that. If you don’t have one download one from here.
Then according to the picture bellow choose: Build With or
⌘(Command) + Shift + B
Then select “LaTex” from the items:
You now have a pdf file of your .tex file!
Or for more simplicity just do this:
Open Sublime Text and then open a new tab ( blank file in Sublime Text) by:
⌘(Command) + N
- Then press
⌘(Command) + Shift + P
2. Then search “Set Syntax: LaTeX” find the item
3. Press Enter
4. Open a .tex file
5. Then build with
⌘(Command) + B
That’s it! done!
Step 12: optional
Make Sublime Text your default editor: You can make Sublime Text your default editor for LaTeX documents.
Find a .tex file on your Mac and right click on it and select “Get info”. According to the bellow picture do these:
- Select “Sublime Text” from the “Open with” menu
- Select “Change all”
- Close window
Step 13: optional
LaTeXTools can be customized by editing user settings that we created in Step 7. When you build a .tex file, Skim opens the pdf file on the page associated with the position of your cursor in Sublime Text. You can turn this feature off.
In Sublime Text 3 go to LaTeXTools user settings like bellow and then change the value of “forward_sync” form “true” to “false” and save the file.
If you want to make your Sublime Text pretty as like as mine read this tutorial!
One interesting feature of typing Latex in Sublime ( considering my method of installation ) is that if you write a formula you can see its preview before compiling Latex, just by click at the end of formula like this:
greek-alphabet in Latex