Placeholders

Insert Text

There are some placeholders you can use in your user-defined tags: %C, %B, %M, %E, %R and %T.

  • %C:  this is where the cursor will be placed after the insertion of a user-defined tag.


    Cursor Position (%C)
  • %B:  will be replaced by a bullet (see Bullets).


    Bullet (%B)
  • %M:  will be replaced by the selected text.


    Selected Text (%M)
  • %E:  denotes the indentation depth of text inside an environment.


    Indentation of environment text (%E)
  • %R:  will call a reference-dialog to choose a label which has already been defined. This can be used to refer to a predefined label, which you can choose from a drop-down list (see also LaTeXReferencesref or LaTeXReferencespageref).


    References (%R)
  • %T:  will call a citation-dialog to choose an already defined citation. The same as using LaTeXReferencescite a list with all the citation keys pops up.


    Citation Keys (%T)

Let's consider another example, with the following macro \frac{%M}{%C}. First, we select a number in our text, let's say 42. Now we invoke this macro and obtain \frac{42}{} with the cursor located within the second pair of brackets.

Insert File Contents

If you want to insert the contents of a text file, you could use the same placeholders.

Execute A Program

If you want to execute an external program, only the %M for selected text is recognized in the command line. The selection will be saved in a temporary file and the placeholder %M is replaced with this filename.


Execute an external program (%M)

Another placeholder is %S, which is replaced by the complete base name of the current document without the path. This base name consists of all characters in the file up to (but not including) the last '.' character.