Tags

kppe supports tags, via an additional markup syntax to provide functionality which pandoc does not provide itself.

Syntax

kppe tags have a simple syntax:

<<TAG NAME:ARGUMENT 1[:ARGUMENT 2]..[:ARGUMENT n]>>

All tags take at least one argument, while some tags take more arguments, ”:” seperated.

Tags should be placed alone on a line in the pandoc document.

Available Tags

  1. Abbreviation Tag
  2. Action Tag
  3. Decision Tag
  4. Heading Tag
  5. Reference Tag
  6. Right Tag
  7. Signature Tag

Abbreviation Tag

The abbreviation tag allows abbreviations to be used in documents - valid abbreviation tags are replaced with the text the abbreviation maps to. Its syntax is:

<<abbrev|name|n|a:abbreviation>>

Abbreviations must appear in a section in the configuration file called Names, one line per abbreviation, like so:

[Names]
JB = Joe Bloggs
MRe = Matthew Reallylongsurname
RHCP = the Red Hot Chilli Peppers
OMD = Orchestral Maneuvers in the Dark

The command is aliased to “name”, “n” and “a”, all of which will produce the same result.

Example

Pandoc markup like this:

<<name:JB>> and <<n:MRe>> liked to discuss <<abbrev:RHCP>> and \
<<a:OMD>> on online forums, but found typing out the names \
of the bands to be very tedious.

will yield a document like so:

_images/tag_abbrev.png

Action Tag

The action tag assigns one or more people to an action task for the section or subsection it is specified in. Its syntax is:

<<action:Person 1[:Person 2]..[:Person n]>>

For each action tag assigned to any particular person (or effectively any string) a summary is inserted at the end of the pandoc document, listing each section or subsection in which an action is assigned. For each action tag, a highlighted sentence is inserted at the location of the tag, indicating who the action was assigned to.

Example

Pandoc markup like this:

# Bridge Crew

## Explore Mysterious Planet
Visit the surface of the planet.
<<action:James T Kirk:Spock:Red-shirted Victim>>

## Assert Medical Profession
Loudly Exclaim "Damnit Jim, I'm a doctor!"
<<action:Bones McCoy>>

# Cannon Fodder Department

## Die Horribly
Do not return alive from the planet.
<<action:Red-shirted Victim>>

will yield a document like so:

_images/tag_action.png

Decision Tag

The decision tag makes its single argument bold with a red typeface, intended originally for use in indicating decisions approved by Lions meetings.

Example

Pandoc markup like this:

The weather was discussed at length. To ward off tedium, <<decision:Bob proposed that the weather should only be
mentioned if an actual tornado is approaching. Unanimously approved.>>

will yield a document like so:

_images/tag_decision.png

Heading Tag

The heading tag emphasises and centralises each of its arguments, particularly useful to to provide a heading for a document.

Example

Pandoc markup like this:

<<heading:HEADING LINE 1:HEADING LINE 2:HEADING LINE 3:SHORT>>

will yield a document like so:

_images/tag_heading.png

Reference Tag

Reference tags specify that a particular section is related to a pre-defined topic. For each reference tag, a listing is placed into a section at the end of the document with the hardcoded title “District Projects” (but before the list of actions, if there is one), linking the topics to the sections in which the tags appear. The topics are currently also hardcoded, although a future version of the application will make both the section title and the topics configurable. Some topics also have a hardcoded prefix which is added to the listing. If there are no tags in the document for a topic, the text “Nothing to report” is inserted, unless the topic has a prefix, in which case only the prefix is used.

As the topics and the section title are hardcoded, the reference tag is perhaps the aspect of kppe which is most specific to the North Durban Lions Club and Lions in general.

The current list of topics and the associated tag name and prefix (if there is one) is:

  • Christmas Cakes: <<ref:cakes>>. No prefix.
  • Diabetes and Blood Drives: <<ref:diabetes_blood>>. No prefix.
  • Environment: <<ref:env>>. No prefix.
  • Food Security: <<ref:food>>. No prefix.
  • Global Leadership Team: <<ref:glt>>. No prefix.
  • Global Membership Team: <<ref:gmt>>. No prefix.
  • Information Technology: <<ref:it>>. Prefix of “MMR’s and Activity Reports completed online. Club website kept up-to-date with all club events.”.
  • Lionesses: <<ref:lioness>>. No prefix.
  • Lions Clubs International Foundation: <<ref:lcif>>. No prefix.
  • Louis Halse Trust: <<ref:lh>>. No prefix.
  • Marketing of Lions: <<ref:marketing>>. No prefix.
  • Physically Challenged: <<ref:disabled>>. No prefix.
  • Resolutions, Constitution & By Laws and Protocol: <<ref:const>>. No prefix.
  • Sight and Hearing: <<ref:sight_hearing>>. No prefix.
  • Youth: <<ref:youth>>. No prefix.
  • Youth Exchange: <<ref:ye>>. No prefix.

Example

Pandoc markup like this:

# Youth Feeding Scheme
<<ref:food>>
<<ref:youth>>

# Website Updates
<<ref:it>>

## Eyesight Screening
<<ref:health>>

will yield a document like so:

_images/tag_ref.png

Right Tag

The right tag right justifies each of its arguments.

Example

Pandoc markup like this:

<<right:This will appear on the right of the page:Prepare to move eyes to the left>>

This will be on the left. Well done for getting your eyes over here.

will yield a document like so:

_images/tag_right.png

Signature Tag

The signature tag inserts an image into the document. Its primary intention is for inserting electronic versions of author’s signatures into the document (hence its name) but it can insert any image. Its syntax is:

<<sig:file name:[size]>>

The file name argument is required, and must be the name of a PNG file in the location that kppe is running from. The actual file must have a .png extension, although it must be specified in the tag without the extension.

The second argument optionally specifies the length of the image, in cm. Fractions are permitted. The image is scaled accordingly. If the size is not specified, 3cm is used.

Example

Pandoc markup like this:

<<sig:sample_sig>>

Normal Size

<<sig:sample_sig:1.2>>

Small

<<sig:sample_sig:6.5>>

Large

will yield a document like so:

_images/tag_signature.png

This is inserting a file called sample_sig.png.