Tags:
,
view all tags
---+!! <nop>%TOPIC% <!-- Contributions to this TWiki plugin are appreciated. Please update the plugin page at http://twiki.org/cgi-bin/view/Plugins/ExplicitNumberingPlugin or provide feedback at http://twiki.org/cgi-bin/view/Plugins/ExplicitNumberingPluginDev. If you are a TWiki contributor please update the plugin in the SVN repository. --> <sticky> <div style="float:right; background-color:#EBEEF0; margin:0 0 20px 20px; padding: 0 10px 0 10px;"> %TOC{ title="Page contents" depth="2" }% </div> <img src="%ATTACHURLPATH%/screenshot.png" alt="Example image" style="float:right;" /> </sticky> %SHORTDESCRIPTION% ---++ Introduction Use the ==#<nop>#.==, ==#<nop>#..== _etc._ notation to insert outline numbering sequences (1, 1.1, 2, 2.1) in topic's text. Use ==---#<nop>==, ==---#<nop>#==, _etc._, to generate numbered headings. Use ==#<nop>#5.==, ==#<nop>#.==, ==#<nop>#.== to start a numbering sequence at 5 ---++ Syntax Rules ---+++ Numbered sequences * The default outline numbering sequence uses the notation =#<nop>#...= (with 1-6 dots). The notation is replaced anywhere in the topic. The level number corresponding to the number of dots increases with each use. Each time a level is used, all higher levels are reset to 0. * Named numbering sequences can be used with the notation =#<nop>#name#...= for sequence =name=. Named sequences have independent numbering. * The numbering of a sequence can be initialized or re-initialized by adding a number =n= into the tag. For example, =#<nop>#name#2...= resets numbering sequence =name= to =2=. The sequence is initialized from the indicated level on. * As a concession to backwards compatibility, =0= re-initializes the sequence at all levels. This comes in handy when using a sequence within headers that are also used in a *%<nop>TOC%*. In that case, start the first heading using something like =---+ Chapter #<nop>#0. Introduction=. You can then safely use the number notation in headings. * The rendering of the numbering sequence can be turned into an letter-labeled list by appending a lowercase letter to the notation: =#<nop>#...a= ---+++ Numbered headings * When the =+= character in headings is replaced by =#=, the headings are numbered. Heading numbers are derived from the unnamed sequence and can, therefore, be affected by the syntax above. * Tip: Avoid unnamed sequences when using numbered headings. ---+++ General comments * Numbering count is maintained throughout a single topic. Included topics are considered part of the topic and are numbered in sequence with the including topic. * The maximum number of levels is 6, and using levels higher than maximum implies the last level. * Non-consecutive increasing levels generate =0= for the skipped levels. * Sequence numbering always starts at level 1. A missing first level will result in a =0= to indicate the skipped level. * Non-numbered headers do not affect the numbering of numbered headings. * The "alpha" sequence can be changed by plugin setttings. ---++ Examples If you have the plugin installed, the *Rendered* and *Expected* columns should be identical. If you do not have the plugin installed, the *Rendered* column will be the same as the *Source* column. | *Source* | *Rendered* | *Expected* | | #<nop>#. | ##. | 1 | | #<nop>#.. | ##.. | 1.1 | | #<nop>#... | ##... | 1.1.1 | | #<nop>#.... | ##.... | 1.1.1.1 | | #<nop>#..... | ##..... | 1.1.1.1.1 | | #<nop>#...... | ##...... | 1.1.1.1.1.1 | | #<nop>#....... | ##....... | 1.1.1.1.1.2 | | Chapter #<nop>#a#. | Chapter ##a#. | Chapter 1 | | Section #<nop>#a#.. | Section ##a#.. | Section 1.1 | | Subsection #<nop>#a#... | Subsection ##a#... | Subsection 1.1.1 | | Req #<nop>#a#....: | Req ##a#....: | Req 1.1.1.1: | | Req #<nop>#a#....: | Req ##a#....: | Req 1.1.1.2: | | Subsection #<nop>#a#... | Subsection ##a#... | Subsection 1.1.2 | | Req #<nop>#a#....: | Req ##a#....: | Req 1.1.2.1: | | Req #<nop>#a#....: | Req ##a#....: | Req 1.1.2.2: | | #<nop>#a#....a) | ##a#....a) | a) | | #<nop>#a#....a) | ##a#....a) | b) | | #<nop>#a#....a) | ##a#....a) | c) | | #<nop>#A#....A) | ##A#....A) | A) | | #<nop>#A#....A) | ##A#....A) | B) | | #<nop>#A#....A) | ##A#....A) | C) | | Req #<nop>#a#....: | Req ##a#....: | Req 1.1.2.3: | | Section #<nop>#a#.. | Section ##a#.. | Section 1.2 | | Chapter #<nop>#a#. | Chapter ##a#. | Chapter 2 | | Section #<nop>#a#.. | Section ##a#.. | Section 2.1 | | Section #<nop>#a#.. | Section ##a#.. | Section 2.2 | ---+++ Numbered heading examples Reset anonymous numbering to ##0. using =#<nop>#0. <table cellpadding="5"> <tr> <td> *Write* </td> <td> *If Installed* </td> <td> *You should see* </td> <tr> <td> ---# Heading level 1 </td> <td> ---#!! Heading </td> <td> ---+!! 1 Heading </td> </tr> <tr> <td> ---## Next level </td> <td> ---## Next level </td> <td> ---++!! 1.1 Next level </td> </tr> <tr> <td> ---### And another </td> <td> ---###!! And another </td> <td> ---+++!! 1.1.1 And another </td> </tr> <tr> <td> ---++# Single numbered </td> <td> ---++#!! Single numbered </td> <td> ---+++!! 2 Single numbered </td> </tr> </table> ---++ <nop>%TOPIC% Global Settings Plugin settings are stored as preferences settings. To retrieve a preference setting write it as a TWiki Macro: ==%<nop><plugin>_ <setting>%==, i.e. ==%<nop>EXPLICITNUMBERINGPLUGIN_SHORTDESCRIPTION%== Note: This plugin does not obtain preference settings from this topic. Settings should be entered in the %USERSWEB%.TWikiPreferences or Web Preferences topic. The following settings can be used. * Bold font the numbering sequence. If this setting is enabled, the numbers are rendered in a bold font. <verbatim> * #Set EXPLICITNUMBERINGPLUGIN_BOLD = 1 </verbatim> * Alternate collating sequence for letter headings. This is a commma-separated list of "letters" used in alpha headings. They should be entered as lower-case letters. The plugin will convert to upper-case as needed. The example below shows the default sequence, a reversed sequence, and a Greek letter sequence. The plugin will "wrap" back to the beginning of the sequence if it is exceeded. <sticky> <verbatim> * #Set EXPLICITNUMBERINGPLUGIN_ALPHASEQ = a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z * #Set EXPLICITNUMBERINGPLUGIN_ALPHASEQ = z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a * #Set EXPLICITNUMBERINGPLUGIN_ALPHASEQ = α,β,γ,δ,ε,ζ,η,θ,ι,κ,λ,μ </verbatim> </sticky> * Debug plugin: (See output in =data/debug.txt=) This plugin provides minimal debugging information <verbatim> * #Set EXPLICITNUMBERINGPLUGIN_DEBUG = 1 </verbatim> ---++ See also The TWiki:Plugins.TocPlugin provides a more complete table of contents and cross-reference management. ---++ Plugin Operations/Installation Instructions You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server where TWiki is running. Like many other TWiki extensions, this module is shipped with a fully automatic installer script written using the Build<nop>Contrib. * If you have TWiki 4.2 or later, you can install from the =configure= interface (Go to Plugins->Find More Extensions) * See the [[http://twiki.org/cgi-bin/view/Plugins/BuildContribInstallationSupplement][installation supplement]] on TWiki.org for more information. * If you have any problems, then you can still install manually from the command-line: 1 Download one of the =.zip= or =.tgz= archives 1 Unpack the archive in the root directory of your TWiki installation. 1 Run the installer script ( =perl <module>_installer= ) 1 Run =configure= and enable the module, if it is a plugin. 1 Repeat for any missing dependencies. * If you are *still* having problems, then instead of running the installer script: 1 Make sure that the file permissions allow the webserver user to access all files. 1 Check in any installed files that have existing =,v= files in your existing install (take care *not* to lock the files when you check in) 1 Manually edit !LocalSite.cfg to set any configuration variables. %IF{"defined 'SYSTEMWEB'" else="<div class='twikiAlert'>%X% WARNING: SYSTEMWEB is not defined in this TWiki. Please add these definitions to your %MAINWEB%.TWikiPreferences, if they are not already there:<br><pre> * <nop>Set SYSTEMWEB = %<nop>TWIKIWEB%<br> * <nop>Set USERSWEB = %<nop>MAINWEB%</pre></div>"}% ---++ Plugin Info <!-- * Set SHORTDESCRIPTION = Use the ==#<nop>#.,== ==#<nop>#..== etc. notation to insert outline numbering sequences (1, 1.1, 2, 2.1) in topic's text. Also support numbered headings. --> | Plugin Author: | TWiki:Main.MartinVlach, TWiki:Main.ThomasWeigert (21 Nov 2006) | | Copyright: | © 2003, Lynguent, Inc. <br /> © 2006, !ProjectContributor <br /> © 2006-2010 TWiki:TWiki/TWikiContributor | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | | Plugin Version: | 19806 (2010-11-09) | | Plugin Release: | 1.6 | | Change History: | <!-- versions below in reverse order --> | | 22 Feb 2010: | Internal changes compatible with trunk; various enhancements - added alphabet setting for alpha sequence; documentation enhancements | | 4 Jun 2009: | Added a bold preference option; (TWiki:Main.SallyHoughton) | | 3 Mar 2009: | Exclude textareas from rendering to improve compatibility with TWiki:Plugins.EditChapterPlugin. (TWiki:Main.GeorgeClark); | | 12 Feb 2009: | Fixed regular expression to parse enumerated headings (TWiki:Main.MichaelDaum); Added support for upper-case alphabetic enumerations (TWiki:Main.DarrenElkerton) | | 21 Nov 2006: | Added reset to specific number based on suggestion by TWiki:Main.SteveWampler. Added support of numbered headers. Proper handling in table of content. | | 17 Sep 2003: | Added alpha-labeled lists. | | 12 Aug 2003: | Initialize sequences in startRenderingHandler. Thank you TWiki:Main.IngoKarkat. | | 29 Jul 2003: | Initial version | | CPAN Dependencies: | none | | Other Dependencies: | none | | Perl Version: | 5.8.0 | | Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC% | | Feedback: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev | __Related Topics:__ %SYSTEMWEB%.TWikiPreferences, [[%USERSWEB%.TWikiPreferences]], %SYSTEMWEB%.TWikiPlugins
Attachments
Attachments
Topic attachments
I
Attachment
Action
Size
Date
Who
Comment
png
screenshot.png
manage
6.0 K
2010-11-10 - 05:44
TWikiAdminUser
Saved by install script
Edit
|
Attach
|
PDF
|
H
istory
:
r5
<
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
More topic actions...
Topic revision: r3 - 2011-10-24
-
TWikiAdminUser
Home
Site map
CEMon web
CREAM web
Cloud web
Cyclops web
DGAS web
EgeeJra1It web
Gows web
GridOversight web
IGIPortal web
IGIRelease web
MPI web
Main web
MarcheCloud web
MarcheCloudPilotaCNAF web
Middleware web
Operations web
Sandbox web
Security web
SiteAdminCorner web
TWiki web
Training web
UserSupport web
VOMS web
WMS web
WMSMonitor web
WeNMR web
TWiki Web
User registration
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
InterWikis
ManagingUsers
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Account
Log In
Edit
Attach
Copyright © 1999-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.ExplicitNumberingPlugin
.