[[PageOutline(2-3)]] = Trac Wiki Syntax enhancements = Note: all the syntax enhancements that went into [milestone:0.12] can be seen in [[.@25|version 25]] of this page. == Topics == === Tables === - support WikiCreole single pipe style (#6630) \\ If we support single pipe tables, then it would be worth supporting `+----...` either as a no-op or a row separator (like `|----...`), in order to handle the following: {{{ +--------------------+ | Boxed | Tables | +--------------------+ }}} - add `|+` MediaWiki style caption or `#!caption` - annotation for specifying vertical alignment (top `||^` and bottom `||.`) (ticket:9309#comment:9) - annotation for specifying vertical spans (`<|2>`) {{{ ||<|2> 2 rows || row 1 || || row 2 || ||<-2> row 3 over 2 columns || }}} - also support MediaWiki style??? (#1424) === Definition lists === - nesting definition lists (#7721) - terms should automatically get an anchor, much like headings (but ''nice'' anchors, see [#Headings] below) === Lists === There are several enhancements that come to mind: - ''1)'' style numbered items and ''o'' style numbered items (see also #5498) ||= Wiki Markup =||= Display =|| {{{#!td {{{ o this is a list o that's another list 1) Point 1 2) Point 2 }}} }}} {{{#!td o this is a list o that's another list 1) Point 1 2) Point 2 }}} - support empty lines between items (#1936, #6482 and more specifically #8140) ||= Wiki Markup =||= Display =|| {{{#!td {{{ 1. start a list 1. continue in the same list another paragraph in the //same item// }}} }}} {{{#!td 1. start a list 1. continue in the same list another paragraph in the //same item// }}} - when continuing an item on the next line, one should stay within the item if we don't dedent past the item starter symbol (nearly works, but see #4848) - support for WikiCreole-style lists (gains compatibility with e.g. MediaWiki) ||= Wiki Markup =||= Display =|| {{{#!td {{{ * start a list ** subitem *** sub-subitem # ordered list ## numbered subitem }}} }}} {{{#!td * start a list ** subitem *** sub-subitem # ordered list ## numbered subitem }}} Notes: - issue #6482 is at work here, as the tables are not part of their corresponding item - slight difficulty for the VerticalHorizontalParsing, need to consider empty lines as potential "no-ops" in some situations. === Headings === The automatic ids generated for headings are not readable. We should replace spaces by hyphens instead of squashing them, at the very least. Compatibility with the old compact style could be achieved by using the `name` attribute, whereas `id` would be used for the new, more readable style. This is especially important for languages when titles use sentence-style capitalization, not title-style capitalization (see e.g. [Wikipedia:Wikipedia:Manual_of_Style_(capital_letters)#Section_headings Section_headings] in Wikipedia). See #8645. === Enhanced processors === For div and tables, add some more "standard" classes (we already have "important" for divs and "listing" for tables): - see MoinMoin:HelpOnAdmonitions - [http://docutils.sourceforge.net/docs/ref/rst/directives.html#admonitions admonitions] and [http://docutils.sourceforge.net/docs/user/rst/demo.html#topics-sidebars-and-rubrics sidebars] in docutils. \\ Note that sidebars could have their own syntax, a bit like citations (`> ...`): {{{ | This will appear in a sidebar: | - any content | || will || do ... || }}} which should be fully equivalent to: {{{ {{{#!sidebar This will appear in a sidebar: - any content || will || do ... || }}} }}} - [http://meta.wikimedia.org/wiki/Help:Collapsing#Collapsible_DIV collapsible and collapsed] (#9214) - sortable (#8949) === TracLinks === ==== Alternative forms of linking ==== #linking - shorthand for `[[Image()]]`: `{{}}`, see MoinMoin:HelpOnLinking; `{{...}}` is also used for [MediaWiki:Help:Template transclusion] in MediaWiki - shorthand for footnotes? see #9037 ==== Contextual links ==== ===== Link to filenames In some contexts (changeset comment), it would make sense to have automatic links to source files, leading to the specific changes for that file (#1200). The detection of file names could be inspired from Doxygen: // All words that contain a dot (.) that is not the last character in the word are considered to be file names. If the word is indeed the name of a documented input file, a link will automatically be created to the documentation of that file. // [[http://www.stack.nl/~dimitri/doxygen/autolink.html#linkfile| Doxygen, Link to files]] == Compatibility with other Wiki Markups == #Compatibility_with_other_Wiki_Markups While achieving universality is likely not possible, there are both many interesting ideas that could be grabbed from other Wiki markups and incompatibilities than could be eased out. Here are several other markups that are very interesting for us as they also target similar kinds of users that we do: - !GoogleCode uses http://code.google.com/p/support/wiki/WikiSyntax [[br]] * Mostly compatible markup, with the notable exception of `*...*` and `_..._` used for bold and italics. This is ''not'' something we're going to support, considering all the complaints we already had with our underline style `__...__`. // However, with strict patterns this can perhaps "work": `*this is bold*` would match, but not `use *this and *that`, and `that's /really/ useful` or `that's /really useful/` but neither of `see /trunk/README, and/or, / etc.` // * Internal Wiki links are a bit easier to write: `[Wikipage]` instead of `["Wikipage"]` for us. * automatic heading anchors are more readable (`== Wiki-style markup ==` corresponds to `Wiki-style_markup` instead of `Wiki-stylemarkup`) (#8645) - BitBucket uses http://www.wikicreole.org/wiki/Creole1.0 [[br]] * See WikiCreole - RedMine uses http://www.redmine.org/help/wiki_syntax_detailed.html based on http://hobix.com/textile [[br]] * also uses `*...*` and `_..._` used for bold and italics... * syntax for bulleted lists is similar to the WikiCreole one - MoinMoin, the original model for the Trac wiki syntax has since its version 1.6.0 increased its compatibility with WikiCreole: - `[[...]]` links and `{{...}}` for embedding, see MoinMoin:HelpOnLinking - `<<...>>` macro calls, see MoinMoin:HelpOnMacros - [http://daringfireball.net/projects/markdown/syntax Markdown] is used in a number of developer oriented sites (e.g. [http://stackoverflow.com/editing-help StackOverflow], [http://gitorious.org/gitorious/mainline/blobs/master/lib/markup_renderer.rb Gitorious wiki], [http://github.github.com/github-flavored-markdown/ GitHub Flavored Markdown]). Some of the interesting parts: - [http://daringfireball.net/projects/markdown/syntax#header headings by underlining] (similar to reStructuredText, but limited to `========` and `--------`) - the [http://daringfireball.net/projects/markdown/syntax#list rules for list items] are quite interesting as well (how to deal with empty lines and paragraphs within lists, see [#Lists] above) - others?