Changes

Jump to navigation Jump to search
8,247 bytes removed ,  10:56, 2 July 2020
Typically, most editors work out of the box with MacTeX, but if you are using a version earlier than those shipped with MacTeX 2011 (TeXShop 2.42), or if you would like to use the Standalone distribution (ConTeXt Suite), you need to configure engines for ConTeXt manually.
=== TeXShop ===TeXShop is a good Editor for all variants of TeX and ConTeXt. It offers:* Syntax highlighting.* A viewer for your typeset PDFs.* has templates and you can create your own* command completions* multiple file encodings If you install "ConTeXt Suite" or want to use "TeXLive" in parallel with "ConTeXt Suite"s you have to create new engines for "[[TeXShop", so that you can run your versions of "ConTeXt" directly from within "TeXShop". ==== Setting-Up TeXShop for ConTeXt Single User Installation ====TeXShop installs support files for every user in the folder ''TeXShop'' in the users Library folder of the users HOME folder. They are installed first when the user runs TexShop for the first time.  ===== Making UTF-8 Default File Encoding===== ConTeXt uses UTF-8 as its default encoding, so it is best to make this the default encoding for your files. You can also choose which ever encoding you wish. You can, also, set the file encoding when it is saved. TeXShop will automatically recognize the file encoding of existing files and use that when saving the file.]]* Start TeXShop. If TeXShop was installed with MacTeX you can find it in the folder TeX in your Application folder. * Make TeXshop use utf-8 as its standard encoding for files Choose the TeXShop->Preferences Menu In the dialog window that comes up look for Encodings Field and choose UTF-8 Close the Dialog window ===== Creating an ''Engine'' for TeXShop ===== Actually, ''engine'' is somewhat misleading. In TeXShop an ''engine'' is a script that contains commands that are use to typeset your documents. TeXShop comes with many engines set up to run TeX, LaTeX, Xe(La)TeX and ConTeXt MKII and MKIV that have been installed via MacTeX. If you want to use ConTeXt Suite you will have to create an TeXShop-''engine''. If you have not run TeXShop start it so that the support files for TeXShop are installed for you.  Since in the newer versions of MacOS the users ''Library''-folder is hidden and not accessible from within TeXShop we will use the terminal for simplicity reasons. If you wish you can access the your ''Library''-folder from the Finder and navigate to the Engines-folder inside of the TeXShop-folder inside your ''Library''-folder and choose a ConTeXt-engine. * Start the Terminal you will find it in the Utility-folder in the Applications-folder * Find your username is, if you do not know it already.<p>The command <code>whoami</code> will output your user name.</p> * Open the standard MKIV engine for TeXShop enter open -a TeXShop $HOME/Library/TeXShop/Engines/ConTeXt\ \(LuaTeX\).engine This will open the file in TeXShop and switch to TeXShop * Save the engine with a new Name "ConTeXt Suite": option click on the File menu choose "Save As …" change (LuaTeX) in the Name field to Suite hit return * Change the set path line to: set path= (/Users/username/context/tex/texmf-osx-64/bin $path /usr/local/bin) If you installed in a different location then change /Users/username/context/ to the location where you installed ConTeXt standalone. ''Do not forget to change username in the line above to your actual username!!''  * Save the file again use either the file menu or cmd-s * close the window use either the file menu or cmd-w You can know use your new engine by choosing it from the Pop-up Menu of your document window. If you want other options or use MKII then create a new engine and change the line containing mtxrun accordingly. In the manual for TeXShop you can find instructions for making your engine the the default engine or how to have TeXShop use your engine no matter which engine is set on a file by file basis. ==== Setting-Up TeXShop for ConTeXt Suite System-Wide Installation ==== Making a decent tutorial for setting-up TeXShop for a ConTeXt Suite system-wide installation is kind of difficult, because TeXShop installs support files for each user which become unique to each user after it has been started for the first time by the user. The problem is how get the needed engine/s for the ConTeXt Suite into the user support files. You can put the engine in into the application bundle of TeXShop, so that it will be installed for every user the first time they run TeXShop or a new version of TeXShop is run. Of course you have to the engine into the application bundle of each update to TeXShop! * Start TeXShop * create a new document use the File-Menu or use cmd-N * save the engine use the File-Menu or use cmd-S In the dialog window change the name of the file to ''ConTeXt Suite.engine'' or whatever! In the lower part of the dialog change the file format to ''Plain Text'' * enter the following content into the document: #!/bin/tcsh  set path= (/Users/quayjay/context/tex/texmf-osx-64/bin $path /usr/local/bin) mtxrun --script context --autogenerate --synctex=1 "$1" * Save the ''engine'' use the File-Menu or use cmd-S * Quit TeXShop * Open 2 windows in the finder * In one window and navigate to where you saved the engine * In the other window navigate to the Applications-folder and to where TeXShop was installed. If you installed via MacTeX you will find it in Applications->TeX->TexShop * Open the folder containing the default engines for TeXShop press: ''shift''-cmd-G in the dialog enter: TeXShop.app/Contents/Resources/TeXShop/Engines * copy the engine from the other window using 'option'-drag You will be ask for an administrator password: enter it! * close the windows 'IMPORTANT:' The newly created engine will not be installed if a user has already run TeXShop! If a user has already run TeXShop then the newly created engine must copied to their ''Engine''-folder inside of their TeXShop-folder inside their ''Library''-folder!! Do not forget that you have to also copy your own copy of the newly created engine to your own ''Engine''-folder!!  === [[TeXworks ===If you install ConTeXt in your Applications Folder, you have to create a new engine. Go to your preferences inside TeXworks. In Typesetting Menu, in Processing tools, add a new engine.]]In Name, type what you want.In Program : /Applications/ConText/tex/texmf-osx-64/bin/texmfstartIn Arguments : *texexec as the first argument[[Texpad]] *$fullname as the second argument *$synctexoption as the third argument.  === Texpad === Texpad (https://www.texpadapp.com) is a commercial LaTeX editor, which supports typesetting in ConTeXt. It has a number of nice features, such as a project outline/manager that lists todos and cross-references; a built in previewer; and syncs with an OS X version of the software. Texpad supports ConTeXt out of the box. However, Texpad also allows users to write and install build scripts (.tpbuild, the equivalent of an "engine" in TexShop or TeXworks, as described above.). By means of these custom scripts, Texpad can also be configured to typeset using ConTeXt Standalone (ConTeXt suite).  As of Texpad 1.7.14 (July 2015), these are the steps which allow for typesetting using ConTeXt Standalone: 1. Create an empty text file. 2. Paste the following into it: #!/bin/bash # Texpad build (.tpbuild) for ConTeXt Standalone suite export PATH=$HOME/context/tex/texmf-osx-64/bin:$PATH mtxrun --script context --autogenerate --synctex=1 "$TEXPAD_ROOTFILE" 3. Save it as `ConTeXt_Suite.tpbuild`', and place this file in `~/Library/Application Support/Texpad/Buildscripts` 4. Relaunch Texpad. Open or create your ConTeXt document. 5. In the drop-down menu (which establishes the Typeset Chain) on the toolbar's far left, select "Typeset configuration > Manual"; click "Use a .tpbuild script", and select "ConTeXt_Suite". Note that the second step assumes that you have installed your ConTeXt standalone in your $HOME directory. If, instead, you've installed it in your Applications directory or elsewhere, simply replace $HOME with the relevant path. === BBEdit === There is a [https://github.com/pmazaitis/ConTeXtBBLM [BBEdit Language Module] for ConTeXt that supports:] * Syntax highlighting * Code folding * Navigation by headings and callouts * Integrated navigation to included files * Command completion To install, download the [https://github.com/pmazaitis/ConTeXtBBLM/releases current release[TextMate]], unzip, and drag the language module onto the BBEdit icon.
== Skim (PDF viewer) ==

Navigation menu