Changes

Jump to navigation Jump to search
155 bytes removed ,  22:03, 13 July 2018
no edit summary
Here is the place to get everything that is important to get started with ''ConTeXt'' (''mkiv'') and ''Textadept'' on ''MS Windows'' systems.
Note that this page is a ''User talk'', which might differ from usual wiki-entries. This means that there is no absolute truth to find be found within this page. Experience might differ heavily from the expected results. Here I, ''Koenich'', will try to add as much info as I could gather on my way of learning, what I like to abbreviate ''CTX'', ConTeXt.
(Thanks to especially *''Donald Knuth''*, *''Hans Hagen''* and too many other coders and users to mention right here!)
Hopefully the readers (of which there seem to be a lot; from 0 to over 9000 views in within 1.5 years [minus a dozen of my own previews :D]) will get a better understanding of what ConTeXt is, what its advantages and disadvantages are, also compared to other popular software, and how the text/coding editor ''Textadept'' can help to get the most out of ConTeXt.
Note though, that in the end this page is meant to be of personal purpose.
[https://foicica.com/textadept/ Textadept] is a programmable text editor for Linux, Mac OSX and Windows, created and maintained by [https://foicica.com/mitchell/ ''Mitchell'']. It is fully extensible using [https://www.lua.org/ Lua].
= I. : Quick setup =
== I.C : Quick setup ConTeXt ==
=== I.C Step 1: Install / Update ConTeXt ===
Installation and update of ConTeXt work the same way. If you only want to update ConTeXt, you can go to point 1.3.
1.1. Download [http://standalone.contextgarden.net/setup/ ConTeXt].
* Windows x86 / 32 bit users: [http://standalone.contextgarden.net/setup/context-setup-mswin.zip context-setup-mswin.zip]
* Windows x64 / 64 bit users: [http://standalone.contextgarden.net/setup/context-setup-win64.zip context-setup-win64.zip]
** Download the x64 / 64 bit version only when you are really sure, that you '''need''' it.
1.2. Extract the archive to a location of your choice.
* You might want to change the name of the extracted directory to a shorter one as it will be the final location for ConTeXt.
1.3. Install / Update ConTeXt
1.3. Method 1: Write a batch file
Since at this point the installation and update of ConTeXt work the same way, the most effective solution is to create a batch file. To do so
From here you can go to I.C Step 2 directly.
1.3. Method 2: Type the command by hand
* Use Windows Explorer to navigate to your ConTeXt directory.
** by using the key shortcut <code>Windows-key + R</code>, entering <code>cmd</code> and pressing <code>Enter</code>-key.
** Alternatively you can use <code>Start</code> -> <code>Programs</code> -> <code>Accessories</code> -> <code>Command Pompt</code>.
* Some important ''MS DOS '' commands you might need:
** <code>dir</code> list the content of the current directory
** <code>cd DIRECTORY</code> change to directory with name DIRECTORY
X:\ConTeXt>_
* If you only want ConTeXt mkiv (highly '''recommended'''), enter the following line and press <code>Enter</code>-key:
first-setup -engine=luatex -modules=all -fonts=all
* 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.
=== I.C Step 2: Add ConTeXt's executables folder to Windows search 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.
2.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''' -> '''Settings''' -> '''About''' -> '''System Info'''
* or on older Windows Machines by going to '''Control Panel''' -> '''System'''.
2.2. Click on '''Advanced System Settings''' ("System Properties").
2.3. Click on '''Advanced'''-Tab.
2.4. Click on '''Environment Variables...'''.
2.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.
2.6. Double-click on the respective variable called ''Path''.
2.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>).
X:\ConTeXt\tex\texmf-win64\bin
2.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: Opt 1. You can test whether it worked by starting your Command prompt and entering the following line, while being in 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 of ConTeXt's executables (context.exe) path to Windows' search path or re-try the operation by starting from Step 2.1.
== I.T. Step 1: Quick setup Textadept ==
=== I.T Step 1: Install '''Textadept''' ===
1.1. [https://foicica.com/textadept/download/textadept_LATEST.win32.zip Download] and extract [https://foicica.com/textadept/ '''Textadept'''] to a folder of your choice.
1.2. Use <code>textadept.exe</code> from the extracted folder to start Textadept.
=== I.T Step 2: Tweak '''Textadept''''s settings ===
'''Note''' that almost all changes to Textadept are saved in the file <code>init.lua</code>. There is two of them, of which you should edit only one:
Save <code>init.lua</code> and restart Textadept once. After doing so you can add changes to Textadept's configuration files and press <code>F9</code>-key afterwards to save and load the changes without having to restart Textadept.
=== I.T Step 2.1: Bind a PDF build command into Textadept ===
2.1.1. Use Textadept to open your <code>init.lua</code> stored in <code>SYSDRIVE:\users\USER\.textadept\</code>.
2.1.6. When you have a popular PDF reader installed already, it should pop up at the end of the process and show the created PDF output. [https://www.sumatrapdfreader.org/free-pdf-reader.html '''Sumatra PDF'''] is highly recommended for this.
=== I.T Step 2.2: Lexing (command highlighting & code folding) ===
A lexer is a file that defines command highlighting and code folding keywords. Textadept comes with a ConTeXt lexer. In order to be able to use command highlighting and code folding when writing ConTeXt documents, you have to bind those documents to the lexer. To do so
194

edits

Navigation menu