Difference between revisions of "User talk:Koenich"

From Wiki
Jump to navigation Jump to search
m
m
Line 25: Line 25:
 
* further options that can be added to your '''user/init.lua
 
* further options that can be added to your '''user/init.lua
 
** As of v9 (at least) Textadept seems to have an own ConTeXt lexer. So you can add the following lines to your ''init.lua'' to let Textadept choose it when you open a ''.tex'' document.
 
** As of v9 (at least) Textadept seems to have an own ConTeXt lexer. So you can add the following lines to your ''init.lua'' to let Textadept choose it when you open a ''.tex'' document.
*** textadept.file_types.extensions.tex = 'context'
+
textadept.file_types.extensions.tex = 'context'
**** if you plan to use ConTeXt mkiv alone, or use another ending to seperate ConTeXt from LaTeX documents, for example ''.ctx'':
+
*** if you plan to use ConTeXt mkiv alone, or use another ending to seperate ConTeXt from LaTeX documents, for example ''.ctx'':
*** textadept.file_types.extensions.ctx = 'context'
+
textadept.file_types.extensions.ctx = 'context'
 +
 
 +
** Change the theme, font and font size of Textadept with the following line
 +
ui.set_theme('dark', {font = 'Monospace', fontsize = 10})
 +
*** the expression ''dark'' is the filename of the theme located either in Textadept's program folder themes or you can download and add new themes to USER\.textadept\themes
 +
(create the folder if it's not there yet)

Revision as of 17:03, 2 March 2017

All of my wiki.contextgarden.net work in progress

ConTeXt (beta 2017/02/19) with Textadept (9.3)

Intstallation & ConTeXt Integration in Windows (as of 2017/03)

  • Install (i.e. download, extract and update) ConTeXt (mkiv)
    • work in progress
  • Add ConTeXt's executables folder to Windows PATH
    • work in progress
  • Download and extract Textadept to a folder of your choice.
  • Edit Textadept's init.lua
    • Note that there are two init.lua of certain importancy:
      • one is located in Textadept's program folder: don't edit this one, as you will lose your changes when you update Textadept
      • second is created by Textadept when you start it for the first time and it's located at SYSDRIVE:\users\USERNAME\.textadept\init.lua
  • add the following line to the blank init.lua:
    • textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script context --autopdf --purge --synctex=-1 "%f"'
      • Note that it's only a single line, so you might need to re-format it when you copy and paste it from here into your document. Also note that your mtxrun.exe has to be in the Windows PATH (see above) in order to work, otherwise you have to add the full path to mtxrun. For example:
        • textadept.run.compile_commands.tex = 'C:/CTX/tex/texmf-win64/bin/mtxrun --autogenerate --script context --autopdf --purge --synctex=-1 "%f"'
          • Note that you have to use slash ( / ) instead of backslash ( \ ) in the file path, since Lua (same as ConTeXt) interprets a \ as the beginning of a command, while for Windows is doesn't make a change.
  • restart Textadept and open or create a ConTeXt test document:
    • \starttext hello world! \stoptext
  • use Textadept's Tools -> Compile to build a PDF with the options added to the line
  • That's it, you're done. 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. Sumatra PDF is highly recommended for this.
  • further options that can be added to your user/init.lua
    • As of v9 (at least) Textadept seems to have an own ConTeXt lexer. So you can add the following lines to your init.lua to let Textadept choose it when you open a .tex document.

textadept.file_types.extensions.tex = 'context'

      • if you plan to use ConTeXt mkiv alone, or use another ending to seperate ConTeXt from LaTeX documents, for example .ctx:

textadept.file_types.extensions.ctx = 'context'

    • Change the theme, font and font size of Textadept with the following line

ui.set_theme('dark', {font = 'Monospace', fontsize = 10})

      • the expression dark is the filename of the theme located either in Textadept's program folder themes or you can download and add new themes to USER\.textadept\themes

(create the folder if it's not there yet)