Editors (not part of Therion package)

Therion files are text files. They can be edited with any text editor, not just with xtherion.

BBEdit (TextWrangler)

Bare Bones Edit for Macintosh https://www.barebones.com/products/bbedit/ https://www.barebones.com/products/textwrangler/

Xavier Robert has written some configuration files for both applications, to highlight according to Therion syntax. They are not complete, and he says there may be still errors. https://github.com/robertxa/Therion-TextWrangler


Brackets

Open source text editor for Mac, Windows, Linux http://brackets.io/

Xavier Robert has written some configuration files, to highlight according to Therion syntax. They are not complete, and he says there may be still errors. https://github.com/robertxa/Therion-Brackets

Emacs

:contrib:therion-emacs.zip Emacs mode with syntax highlight (M. Luethi).

Unzip the file and read the instructions in it.

Note: C-c C-c invokes therion to compile the project. With emacs shell xpdf –remote therion cave.pdf & you get the preview (emacs is so nice that it closes xpdf at the end).


KatePart (Kate, KWrite)

Open source editor for Linux https://kate-editor.org/about-katepart/

Bill Gee has written a configuration file to highlight Therion syntax…

katetherion.zip v1.2 30 March 2018

I run Fedora 27 with KDE desktop, so the editor I use most is Kate/KWrite. KDE has a system-wide syntax highlighting system that is part of KatePart.

The attached XML file is for use in either Kate or KWrite. It is very much a work in progress.

Copy the XML file to your user profile directory. The exact location will vary depending on your distribution. On my Fedora 27 system it is…

  $HOME/.local//share/org.kde.syntax-highlighting/syntax 

You may have to create this directory.

The file can also go in the common syntax highlighting directory which (on my system) is…

  /usr/share/kde4/apps/katepart/syntax 

You will need root permissions to copy to this folder.

The next time you start either Kate or KWrite, the new file will be used.

Recent Changes (29-30 March 2018)

  • Added several more keywords such as ceiling-step and floor-step.
  • Applies different rules for “code metapost”, “code tex-map” and “code tex-atlas” sections
  • Numbers are now highlighted in color.

—-

NotePad++

NotePad++ is a free editor that I have used successfully with XTherion (B. Mutton, Footleg)
Last updated for version 6.7.3 Jan 2015

http://notepad-plus-plus.org/download/
http://recomhub.com/blog/notepad-for-mac-os-x-free/

Features Relevant to Therion

  • Edits multi-lingual character-set plain text files; include words like Комплексный
  • User definable language (syntax) styler; makes therion and survex files easier to use
  • Open as many documents as you like in single pane, dual pane or multiple NP++ instances
  • Compare two documents and identify differences. Alt + D, Ctrl + Alt + D
  • Find and replace over multiple documents
  • Block comment and uncomment or toggle lines. Ctrl + K, Ctrl + shift + K, Ctrl + Q
  • User definable macros;
    • Launch Xtherion with currently open file. Ctrl + Alt + X
    • Close Xtherion and NP++ automatically reloads the file if you want
    • Highlight a file and (relative) path and it opens that file in NP++. Alt + F5, Alt + F6
    • Open a (Windows) Explorer window or a cmd prompt window in the current folder. (Run menu)
    • Directly compile a therion project from a thconfig file. Ctrl + T
  • User interface is a bit cluttered and hard to learn, but I found it's worth persevering
  • can be tricky to set up

Customise NotePad++

To allow NotePad++ to work with Therion data files select the menu item Settings. Preferences and in the dialog that opens select the New Document tab.

Select the 'UTF-8 without BOM' radio button and tick 'Apply to open ANSI file'

Here are some options to make NotePad++ work well with Therion.

In windows XP add the files below to the folder

 %APPDATA%\Notepad++ 

which in Windows XP usually evaluates to …

 C:\Documents and Settings\<Username>\Application Data\Notepad++ 

or in Windows 7

 C:\Users\<Username>\AppData\Roaming\Notepad++ 

Make sure that NotePad++ is not running when you relocate or edit these files in the above location. Edit them in a different location if NotePad++ is running, otherwise NotePad++ will overwrite them when it closes.


User defined language styler for survex and for therion

Includes 3 styles - Survex, Therion simple highlighting of comments only, and Therion 5.3.3) :contrib:userDefineLang.xml (Download the file then unzip the contents to %APPDATA%\Notepad++)


Open a new instance of Xtherion with the currently active file using Ctrl + shift + X

Modified keyboard shortcuts to include opening therion using Ctrl+Alt X :contrib:shortcuts.xml (Download the file then save to %APPDATA%\Notepad++; don't open it in your browser as it will corrupt the file contents)

Actually the above file is rather old and assumes Therion is on the D: drive, you will need to edit it if your Therion is on a different drive. Might be better just to insert the code below in the <UserDefinedCommands> section of the default shortcuts.xml file that installs with NotePad++. This will avoid overwriting recent improvements made by the NotePad++ authors. For Therion 5.3.13 and earlier…

 <Command name="XTherion_THIS_file" Ctrl="yes" Alt="yes" Shift="no" Key="88">&quot;C:\Program Files\Therion\bin\wish84.exe&quot; &quot;C:\Program Files\Therion\xtherion.tcl&quot; &quot;$(FULL_CURRENT_PATH)&quot;</Command> 

For Therion 5.3.14 and later …

 <Command name="XTherion_THIS_file" Ctrl="yes" Alt="yes" Shift="no" Key="88">&quot;C:\Program Files\Therion\bin\wish86t.exe&quot; &quot;C:\Program Files\Therion\xtherion.tcl&quot; &quot;$(FULL_CURRENT_PATH)&quot;</Command> 

Run Therion compiler on the currently active file without invoking XTherion using Ctrl + T (Footleg)

I find having multiple thconfig files open so I can compile different parts of my large cave system project very useful. So I was investgating how to run Therion from Notepad++ (my preferred text editor). This is how I got it working:

I wrote a 2 line batch file containing these commands:

cd %1
"C:\Program Files (x86)\Therion\therion.exe" %2

Save this file to somewhere on disk, and then call it from Notepad++ using the Run command, as follows:
On the Run menu in Notepad++, Select the 'Run' item, and enter the command as follows:

"C:\Personal\Caving\Therion\compileTherion.bat" "$(CURRENT_DIRECTORY)" "$(FILE_NAME)"

(But using the path to where you saved your batch file). Save the command (I called it 'Compile Therion' and gave it the shortcut CTRL+T). Now with any thconfig file open in a tab in Notepad++, I can compile that project by pressing CTRL+T, or by selecting 'Compile Therion' from the Run menu.

So if I have several config files to output maps of different scales or areas which share the scrap I am working on, then I edit the scrap in xTherion scrap editor, and have the various config files open in tabs in Notepad++. I then just select each tab in turn and press Ctrl+T to generate the outputs for that file. This allows me to easily render PDFs at different scales for example to check label placements I am editing in a scrap render OK at each scale I want to use that scrap at, and don't overlap with offset maps etc.

The above only works if your Therion config file is located on the same letter drive as you are running Notepad++ from. If you have your Therion project on a different drive them you have to add a line to the batch file to switch to that drive. So in the example below I have my Therion project on drive E, meaning I have to create my batch file as follows:

E:
cd %1
"C:\Program Files (x86)\Therion\therion.exe" %2

Vi

:contrib:therion-vim.zip Vi syntax highlight file (M. Corvi).

Unzip the file and read the instructions in it.

Note: vi too has the shell, :! followed by the command.


Adobe Acrobat

Post process pdf outputs with a GUI & for a fee.


pdftk (PDF Toolkit)

from http://www.accesspdf.com http://www.pdfhacks.com/pdftk/ Free command line application with various useful tools for post processing Atlas pdf outputs. Add or delete pages, interleave atlas plan and elevation pages. Distributed under GPL.

It can be a bit fiddly to use. I have put together these batch files to ease the pain.

  • pdfburst.bat = Cut the pdf file up into single pages
  • pdfMesh.bat = Interleave the pages of two files - usually preserves internal hyperlinks
  • pdfTMesh.bat = as above, but allows pre-pending a title page

pdftknotesbatchfiles.zip
They need to be edited on a case by case basis to suit the files that you intend to process.


Convert pdf to PowerPoint Slides

These people provide a free on-line converter that seems to work quite well. http://www.convertpdftopowerpoint.com/ The text and other components of the created .pptx file can be edited separately. Excellent way to present single page, multi-chapter atlas outputs to a crowd, without the fickle intricacies of 'other peoples pdf viewer' set-ups and time-lag associated with multi-MB pdf files.

Some other converters I tried either came with malware or distorted the image to fit a portrait layout or converted as a flat raster image only.


  • contrib/externaleditors.txt
  • Last modified: 21 months ago
  • by brucemutton