Changes

Jump to navigation Jump to search
896 bytes added ,  06:42, 9 March 2017
Added a code submited by R. Gieseke. Thank you very much!
** <code>cd DIRECTORY</code> change to directory with name DIRECTORY
** <code>cd..</code> change to superior directory
** <code>cd\</code> change to drive root drive
** <code>X:</code> change to drive X:
** also possible: <code>cd directory\subdirectory\subsubdir...</code>
== Step 4: 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:
 
* One of them is in the extracted Textadept main folder. It is '''not recommended''' to edit this file as your changes will be lost when you update Textadept. Instead:
* When you start Textadept for the first time a new folder <code>SYSDRIVE:\users\USERNAME\.textadept</code> gets created. It also contains the file called <code>init.lua</code>. This is the file and location where you should save all your Textadept settings. This way you can make a copy and use it on several computers. When you open it for the first time it should be empty.
 
Usually you have to restart Textadept after changing its configuration files. Robert Gieseke created a code, which you can add to your <code>init.lua</code> to circumvent reloading of Textadept:
 
-- Save and reset Lua state: `F9`
keys['f9'] = function()
io.save_file()
reset()
end
 
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 reload the changes without having to restart Textadept.
=== Step 4.1: Bind a PDF build command into Textadept ===
1. Use your freshly installed Textadept to open Textadept's main configuration file called <code>init.lua</code>.* After extraction of the downloaded Textadept archive there is a file called your <code>init.lua</code> stored in the main program folder. It is '''not recommended''' to edit this file as your changes will be lost when you update Textadept. Instead:* When you start Textadept for the first time a new folder <code>SYSDRIVE:\users\USERNAMEUSER\.textadept\</code> gets created. It also contains the file called <code>init.lua</code>. It's the file and location where you should save all your Textadept settings. This way you can make a copy and use it on several computers. When you open it for the first time it should be empty.
2. Add an execute command for ConTeXt to Textadept's menu:
* If your ConTeXt executables folder is already in the Windows search PATHPath:
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:
* There are more settings which you can look up in Textadept's [https://foicica.com/textadept/manual.html#Themes manual].
 
* Many ''base16'' themes for Textadept can be found at [https://github.com/rgieseke/textadept-themes Robert Gieseke's GitHub]. You can preview them [https://chriskempson.github.io/base16/ here] (partially).
=== Snippets ===
A ConTeXt module for textadept is being developed at [https://github.com/stephengaito/ta-context-latex ta-context-latex].
Note though, that if you plan to use Textadept without LaTeX with ConTeXt mkiv only (recommended), then you might not need the package mentioned above as it comes with literally only a hand full of ConTeXt snippets. Italso needs additional software to be installed (Textredux, ctags), so that it's almost more comfortable to create own ConTeXt snippets with the ease of Textadept (see above).
194

edits

Navigation menu