Changes

Jump to navigation Jump to search
2,801 bytes added ,  14:00, 8 March 2017
Added Step 2: Adding CTX to Win Path
** <code>cd\</code> change to root drive
** <code>X:</code> change to drive X:
** also possible: <code>cd directory\subdirectory\subsubdir...</code>
* In the end your command prompt should look like this:
X:\ConTeXt>_
* Wait until the download / update is complete. Afterwards you can close the command prompt by entering <code>exit</code> and pressing <code>Enter</code>-key or by simply closing the window.
== Step 2: Add ConTeXt's executables folder to Windows search PATH Path ==
'''Note''': you will need admin rights for this. On public machines for example you most probably won't be able to add ConTeXt to that machine's path. In that case skip this step and go to Step 3 respectively Step 4.1 directly.
1. Open Windows' '''System''' dialog* either by <code>Right-click</code>ing on '''This PC''' / '''My Computer''' on your Desktop and then clicking on '''Properties'''* or by clicking '''Start''' - work > '''Settings''' -> '''About''' -> '''System Info'''* or on older Windows Machines by going to '''Control Panel''' -> '''System'''. 2. Click on '''Advanced System Settings''' ("System Properties"). 3. Click on '''Advanced'''-Tab. 4. Click on '''Environment Variables...'''. 5. Choose where to add ConTeXt's executables folder to:*Either to '''User variables for USER''' for the current user only*or to '''System variables''' for all users. 6. Double-click on the respective variable called Path. 7. Add your ConTeXt executables to Windows path.* '''Note''' that the position, to where you add the location is sorted by importancy. The most important directories will be searched first. This might be taken into account when using ConTeXt together with MiKTeX for example. It's safest to place ConTeXt's path at the very beginning.* In '''User''' Path variable you might need to add the location and seperate it from the existing ones by using a semikolon (<code>;</code>).* In '''System''' Path variable you probably only have to add a new line. The location should look like this: * Win x86 / 32 bit: D:\CTX\tex\texmf-mswin\bin* Win x64 / 64 bit: D:\CTX\tex\texmf-win64\bin 8. Save your changes. Usually no restart or re-login is needed after this operation, but to make sure, that the folder was added, you should restart your machine. Optional: You can test whether it worked by starting your Command prompt and entering the following line, while being in progress a directory other than the one you just added.  context -version * A message with ConTeXt's version number should apear.* If a message like '''context' is not recognized as an internal or external command...'' appears, you should restart your machine, make sure that you added the correct location oder re-try the operation by starting from Step 2.1.
== Step 3: Install '''Textadept''' ==
1. [https://foicica.com/textadept/download/textadept_LATEST.win32.zip Download] and extract [https://foicica.com/textadept/ '''Textadept'''] to a folder of your choice.
2. Use <code>textadept.exe</code> from the extracted folder to start '''Textadept'''.
== Step 4: Tweak '''Textadept''''s settings ==
* If your ConTeXt executables folder is already in the Windows search PATH:
textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script context --autopdf --purge --synctex=-1 "%f"'
* If for some reason you can't add the folder to PATH , for example on public machines, you have to add the full path to your ConTeXt executables. For example:
textadept.run.compile_commands.tex = 'C:/ctx/tex/texmf-mswin/bin/mtxrun --autogenerate --script context --autopdf --purge --synctex=-1 "%f"'
* '''Note''' that you have to use slash <code>/</code> instead of backslash <code>\</code> in the file path, since Lua (same as ConTeXt) interprets a <code>\</code> as the beginning of a command, while for Windows it doesn't make any difference.
in which the expression '''dark''' is the filename of the theme located either in <code>Textadept\themes</code> or you can download and add new themes to <code>USER\.textadept\themes</code>
(create the folder if it's not there yet).
 * There are more settings which you can look up in Textadept's [https://foicica.com/textadept/manual.html#Themes online manual].
=== Snippets ===
Snippets are predefined code or text blocks. Using snippets can save a lot of time as you won't have to retype often used commands and text passages. You add them snippets to your <code>USER/.textadept/init.lua</code>. Snippets in In Textadept they look like this:
-- The first line is mandatory:
* After adding snippets, you have to restart Textadept first.
* Then You can paste snippets into ConTeXt documents** either by typing the keyword that you can use defined within <code>snippets.context['KEYWORD']</code> and pressing <code>Tab</code>-key afterwards** or by using <code>Ctrl + K</code> (by default on Windows machines) to choose from the list of snippets. No matter in which order you add them to your <code>init.lua</code>, when they will show up sorted alphabetically. * '''Note''' that since you added snippets.'''context''', i.e. to Textadept's ConTeXt lexer, Textadept's status bar in the lower right corner has to say '''context''', otherwise use a ConTeXt document is opened or see Step 4.2. * Read more about snippets in the active tabTextadept's [https://foicica.com/textadept/api.html#textadept.snippets manual].
194

edits

Navigation menu