|
NME optional plugin for table of contents in HTML.
More...
#include "NMEPluginTOC.h"
#include <stdlib.h>
Go to the source code of this file.
Defines |
#define | isBlankOrEol(c) ((c) == ' ' || (c) == '\t' || (c) == 10 || (c) == 13) |
| Test if a character is a space, tab, cr or lf.
|
Functions |
static void | switchOutputFormatTOC (HookTOCData *hookData, NMEBoolean heading) |
| Switch output on for titles and off for everything else.
|
static NMEErr | parHookTOC (NMEInt level, NMEInt item, NMEBoolean enter, NMEConstText markup, NMEInt srcIndex, NMEInt srcLineNumber, NMEContext *context, void *data) |
| Paragraph hook for TOC (switch output on for titles and off for everything else)
|
void | NMESetTOCOutputFormat (NMEOutputFormat *f, HookTOCData *d) |
| Set output format structure for TOC generation.
|
NMEErr | NMEPluginTOC (NMEConstText name, NMEInt nameLen, NMEConstText data, NMEInt dataLen, NMEContext *context, void *userData) |
| Plugin implementation for table of contents.
|
Detailed Description
NME optional plugin for table of contents in HTML.
- Author:
- Yves Piguet.
- Copyright:
- 2007-2013, Yves Piguet.
Definition in file NMEPluginTOC.c.
Function Documentation
Plugin implementation for table of contents.
- Parameters:
-
[in] | name | plugin name, such as "toc" |
[in] | nameLen | length of name |
[in] | data | data text |
[in] | dataLen | length of data |
[in,out] | context | current context |
[in] | userData | pointer passed from the parser, as specified in NMEPlugin |
- Returns:
- error code (kNMEErrOk for success)
- Test:
or
or
<< toc level1 level2 title
>>
Definition at line 89 of file NMEPluginTOC.c.
Set output format structure for TOC generation.
- Parameters:
-
[in] | f | address of output format structure, whose contents are filled |
[out] | d | paragraph hook user data |
Definition at line 80 of file NMEPluginTOC.c.
Paragraph hook for TOC (switch output on for titles and off for everything else)
- Parameters:
-
[in] | level | heading or list level (1 = topmost) |
[in] | item | list item or heading counter |
[in] | enter | TRUE when entering construct, FALSE when exiting |
[in] | markup | null-terminated string for initial markup ("p" for par, "*" for unnumbered list of any level, "//" for italic, "{{{" for preformatted) |
[in] | srcIndex | current index in source code |
[in] | srcLineNumber | current line number in source code |
[in,out] | context | current context |
[in,out] | data | value specific to the callback |
- Returns:
- error code (kNMEErrOk for success)
Definition at line 31 of file NMEPluginTOC.c.
Switch output on for titles and off for everything else.
- Parameters:
-
[in,out] | hookData | hook user data |
[in] | heading | TRUE for heading start, FALSE for heading end |
Definition at line 52 of file NMEPluginTOC.c.
|
Generated by Doxygen.
Copyright 2007-2013, Yves Piguet.
All rights reserved.
|
|