Changes

Jump to navigation Jump to search
1,333 bytes added ,  07:53, 31 March 2023
 
= TeXShop =
* ''In the Finder'', Option-click on the ''Go'' menu and select ''Library'' (this menu entry may not be visible if you do not keep Option pressed while clicking). TeXShop installs support files for every user in the folder ''TeXShop'' in the user's ''Library'' folder of the user's home folder. They are installed first when the user runs TeXShop for the first time.
* Go into ''TeXShop > Engines > Inactive > ConTeXt-Sync''. Move or copy the file <code>ConTeXt2021ConTeXt202X.engine</code> into the ''Engines'' folder.* Close and reopen TeXShop. The new ''ConTeXt2021ConTeXt202X'' engine should now appear in the toolbar drop-down menu.
* Open Terminal.app, then type the following to make the engine executable and press Enter:
chmod 755 +x ~/Library/TeXShop/Engines/ConTeXt2021ConTeXt202X.engine
You may close the terminal.
* Back in TeXShop, go to ''Preferences > Engine'' and adjust the ''Alternate Path'' text field to point to the full path of your local ConTeXt installation.
 
''' Remark''' this engines uses <code>context</code> and not <code>mtxrun</code> for compilation. See below how to add an engine using the latter instead.
Now, every time you edit a ConTeXt document and want to use your local installation instead of MacTeX's, add the following “magic lines” right at the beginning of your source document:
% !TEX TS-program = ConTeXt2021ConTeXt202X
% !TEX useAlternatePath
Then, typeset your document. You do not need to select the correct engine from the drop-down menu when <code>% !TEX TS-program</code> is used: TeXShop will pick up the engine specified in the source. Verify in the Console window that the correct ConTeXt distribution is used for typesetting.
Then, typeset your document and try Cmd-clicking either in the source or in the preview. This is a minimal example that allows you to test syncing within TeXShop:
<nowiki>
% !TEX TS-program = ConTeXt2021ConTeXt202X
% !TEX useAlternatePath
% !TEX useConTeXtSyncParser
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 ====
 
TeXShop installs support files for the user in ''~/Library/TeXShop''. Let's create an engine for ''mtxrun'':
 
* 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
echo "$path"
setenv PATH "$3"\:$PATH
echo "$path"
"$3"/mtxrun --autogenerate --script context --autopdf --synctex=1 "$1"
* Save it as ''LMTX.engine'' (use the File-Menu or use cmd-S)
 
* Make the file executable by doing the following in a terminal window
chmod +x LMTX.engine
 
* 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 folder containing the engines for TeXShop
press: ''shift''-cmd-G
in the dialog enter: ~/Library/TeXShop/Engines
* copy the engine from the other window using 'option'-drag
 
* close the windows
 
* select it in TeXShop
==== Setting-Up TeXShop for ConTeXt Suite System-Wide Installation ====
1

edit

Navigation menu