nyctergatis.com

Contact

Projects
Sysquake Remote Live
NME
PDF
Hike
Sudoku
GifBuilder
jpeglib for Palm OS
MySQL Client
Cross-GCC for Mac OS
NMEOutputFormat Struct Reference

Structure of output format fragments used by NMEProcess. More...

#include <NME.h>

Data Fields

NMEConstText space
 one space
NMEInt indentSpaces
 spaces per level to indent lists and indented text (not first line), 0 to rely on target markup
NMEInt defFontSize
 default font size used when fontSize is <= 0 (may be 0 if all expressions handle the case s=0)
NMEChar ctrlChar
 control character for embedded expressions (usually %)
NMEConstText beginDoc
 document preamble
NMEConstText endDoc
 document postamble
NMEInt maxHeadingLevel
 highest heading level
NMEConstText beginHeading
 beginning of H1 header
NMEConstText endHeading
 end of H1 header
NMEConstText beginPar
 beginning of text paragraph
NMEConstText endPar
 end of text paragraph
NMEConstText lineBreak
 line break in text paragraphs
NMEConstText beginPre
 beginning of block of preformatted text
NMEConstText endPre
 end of block of preformatted text
NMEConstText beginPreLine
 beginning of line of preformatted text (between beginPre/endPre)
NMEConstText endPreLine
 end of line of preformatted text
NMEBoolean sublistInListItem
 TRUE if sublist are inside previous list item, FALSE if after item end tag (used for UL/OL/DL, not indenting)
NMEConstText beginUL
 beginning of unnumbered list
NMEConstText endUL
 end of unnumbered list
NMEConstText beginULItem
 beginning of list item (between beginUL/endUL)
NMEConstText endULItem
 end of list item
NMEConstText beginOL
 beginning of numbered list
NMEConstText endOL
 end of numbered list
NMEConstText beginOLItem
 beginning of numbered list item, including number (between beginOL/endOL)
NMEConstText endOLItem
 end of numbered list item
NMEConstText beginDL
 beginning of definition list
NMEConstText endDL
 end of definition list
NMEConstText beginDT
 beginning of definition title
NMEConstText endDT
 end of definition title
NMEConstText emptyDT
 written before beginDD if it does not follow DT
NMEConstText beginDD
 beginning of definition
NMEConstText endDD
 end of definition
NMEConstText beginIndented
 beginning of indented section
NMEConstText endIndented
 end of indented section
NMEConstText beginIndentedPar
 beginning of indented paragraph
NMEConstText endIndentedPar
 end of indented paragraph
NMEConstText beginTable
 beginning of a table
NMEConstText endTable
 end of a table
NMEConstText beginTableRow
 beginning of a table row
NMEConstText endTableRow
 end of a table row
NMEConstText beginTableHCell
 beginning of a header cell
NMEConstText endTableHCell
 end of a header cell
NMEConstText beginTableCell
 beginning of a normal cell
NMEConstText endTableCell
 end of a normal cell
NMEConstText horRule
 horizontal rule
NMEConstText beginBold
 beginning of bold text span
NMEConstText endBold
 end of bold text span
NMEConstText beginItalic
 beginning of italic text span
NMEConstText endItalic
 end of italic text span
NMEConstText beginUnderline
 beginning of underline text span
NMEConstText endUnderline
 end of underline text span
NMEConstText beginSuperscript
 beginning of superscript text span
NMEConstText endSuperscript
 end of superscript text span
NMEConstText beginSubscript
 beginning of subscript text span
NMEConstText endSubscript
 end of subscript text span
NMEConstText beginCode
 beginning of monospace text span
NMEConstText endCode
 end of monospace text span
NMEConstText beginLink
 beginning of link
NMEConstText endLink
 end of link
NMEConstText sepLink
 separator between link and text of link, or NULL if no link
NMEBoolean linkAfterSep
 TRUE if link (URL) is after sepLink, FALSE if before.
NMEConstText beginImage
 beginning of image
NMEConstText endImage
 end of image
NMEConstText sepImage
 separator between image and alt text of image, or NULL if no image
NMEBoolean imageAfterSep
 TRUE if image (URL) is after sepImage, FALSE if before.
NMEBoolean noStyleInAlt
 TRUE if style markup is ignored in alt text of images.
NMEInterwiki const * interwikis
 array of interwikis, terminated by alias=NULL (NULL if none)
NMEEncodeURLFun encodeURLFun
 URL encoder (NULL if none; not used for interwiki urlPrefix)
void * encodeURLData
 data passed to encodeURLFun
NMEEncodeCharFun encodeCharFun
 character encoder everywhere except for pre blocks (NULL if none)
void * encodeCharData
 data passed to encodeCharFun
NMEEncodeCharFun encodeCharPreFun
 character encoder in preformatted blocks (NULL if none)
void * encodeCharPreData
 data passed to encodeCharPreFun
NMEInt textWidth
 text width (-1 for no wordwrap)
NMEWordwrapCheckFun wordwrapPermFun
 check if wordwrap is permitted
void * wordwrapPermData
 data passed to wordwrapPermFun
NMECharHookFun charHookFun
 char hook
void * charHookData
 data passed to charHookFun
NMEProcessHookFun divHookFun
 process hook from heading to same-level heading, whole lists or tables
NMEProcessHookFun parHookFun
 process hook for par, pre blocks, headings, list items, cell items, interparagraphs plugins
NMEProcessHookFun spanHookFun
 process hook for spans of text
void * hookData
 data passed to sectionHookFun, parHookFun and spanHookFun
NMEPlugin const * plugins
 array of plugins, terminated by name=NULL (NULL if none)
NMEAutoconvert const * autoconverts
 array of autoconverts, terminated by cb=NULL (NULL if none)
NMEGetVarFun getVarFun
 function which gets custom variable values ('A'-'Z') in expressions
void * getVarData
 data passed to getVarFun

Detailed Description

Structure of output format fragments used by NMEProcess.

All strings may contain control sequences which are processed before being copied to the output. There are three kinds of control sequences:

  • Numerical expression, whose result is converted to a decimal integer; expression is given between %{ and }. Example: "%{2+3}" is replaced by "5".
  • Replicated string, i.e. a string which is replicated 0 or more times depending on the result of a numerical expression. The control sequence starts with %%{, followed by the numerical expression, followed by }, followed by the string to replicate, followed by %% . The replicated string itself may contain numerical expressions, but not replicated strings. The string is not output if the numerical expression gives a zero or negative result. Example: "%%{2+3}-%%" is replaced by "-----", "%%{2>3}foo%%" by "", and "%%{5+6>10}%{5+6}pt%%" by "11pt".
  • Special string L for the current list nesting as NME markup characters, as produced by NMECurrentListNesting.

Character shown as % above is actually specified by ctrlChar; it can be replaced with any other 8-bit character, should it conflict with output markup.

Expressions are made of signed integers, parameters, infix operators with the expected priority, and parenthesis for subexpressions. Comparisons yeld 1 for true and 0 for false; logical operators consider any nonzero value as true. Spaces and tabs are ignored.

Parameters:

  • i current item index in lists (1=first)
  • l current list or heading level
  • s font size of normal text in points (nonpositive values should be considered as the default value, but they can be filtered out if the defFontSize field of NMEOutputFormat is positive)
  • o current offset in source code (can be used as a unique identifier for hyperlinks)
  • L current line number in source code (can be useful for debugging)
  • p current offset in output
  • x 1 if headings should have labels for hyperlinks, else 0

Operators by increasing priority:

  • ? : conditional expression (a ? b : c is b if a is nonzero, and c otherwise; actually ? is a synonym of & and : is a synonym of |, with a lower priority)
  • | logical OR (first op if nonzero, else second op)
  • & logical AND (first op if zero, else second op)
  • = ! < > comparison operators (! is "not equal to")
  • + - addition and subtraction
  • * / multiplication and integer division
See also:
NMEProcess

The documentation for this struct was generated from the following file:
Generated by Doxygen.
Copyright 2007-2013, Yves Piguet.
All rights reserved.