contrib:externaleditors

This is an old revision of the document!


Editors (not part of Therion package)

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

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


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

: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).


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++ is a free editor that I have used successfully with XTherion (B. Mutton, Footleg)
Last updated for version 7.9 in Oct 2020

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

Another setting you might like to adjust is that which detects when another application (Therion) has saved a file that Notepad++ has open. In the Misc tab under File Status Auto-Detection.

Select 'Enable', and untick Update silently and Scroll to the last line after update. It can be annoying, but if you edit a file in Notepadd++ while Therion is running, you will be pleased that you unticked 'update silently'.

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

In Windows add the files below to the folder

 %APPDATA%\Notepad++ 

which in Windows 7 usually evaluates to …

 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 + Alt + X

Modified keyboard shortcuts to include opening Xtherion using Ctrl+Alt X

For Therion 5.3.14 and later, add this line to the file %APPDATA%\Notepad++\shortcuts.xml

 <Command name="XTherion_THIS_file" Ctrl="yes" Alt="yes" Shift="no" Key="88">&quot;C:\Program Files (x86)\Therion\bin\wish86t.exe&quot; &quot;C:\Program Files (x86)\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

: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.


A VSCode extension to enable syntax highlighting, formatting, and code completion for Therion files.

Install from the VSCode store: https://marketplace.visualstudio.com/items?itemName=rhystyers.therion&ssr=false#overview


A free online image editor you may use to edit, crop, rotate and erase white space of background images and save them as .png with transparency. Maximum size for free online version is 4096×4096 px. There are paid and paid desktop versions too.

https://pixlr.com/


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


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.


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.1625655558.txt.gz
  • Last modified: 3 years ago
  • by sluka