Not logged in. · Lost password · Register
Forum: General Help and Support Syntax and Usage RSS
Any way to change format of any ordered list?
Avatar
walterbyrd #1
Member since Nov 2007 · 61 posts
Group memberships: Members
Show profile · Link to this post
Subject: Any way to change format of any ordered list?
Instead of

1.
  a.
  b.
  c.
2.
  a.
  b.

Could I do this?

1.
  1.1
  1.2
  1.3
2.
  2.1
  2.2
Avatar
fuchs.14 #2
Member since May 2015 · 226 posts
Group memberships: Members
Show profile · Link to this post
maybe this plugin will help

 https://www.dokuwiki.org/plugin:yalist
Avatar
ach (Administrator) #3
Member since May 2006 · 1926 posts · Location: Folkestone, UK
Group memberships: Administrators, Members, Super Mods, Wiki Managers
Show profile · Link to this post
This is not possible with native HTML, therefore you won't find any straightforward DokuWiki plugins for it either.

There is a more complex and inflexible solution with CSS counters (similar to numbered headings), but there is nothing in DokuWiki using this as far as I'm aware.
There are some plans to have something more sophisticated in CSS (like markers and @counter-style) but that's still further ahead in the future and not properly implemented by any browsers yet.
Avatar
Ashtagon #4
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
This requires the wrap plugin. If you want it to cover more than three levels, you'll need to extend it in the logical fashion. You may find it useful to place the html block in a separate page, to be referenced with the include plugin.




<div list-deep>
  - one
    - one-one
    - one-two
  - two
    - two-one
    - two-two
  - three
    - three-one
      - three-one-one
      - three-one-two
</div>


<html>
<style type="text/css">
div.dokuwiki div.wrap_list-deep ol {
  list-style-type: none;
}
div.dokuwiki div.wrap_list-deep > ol {
  counter-reset: leva 0; /* set to one lower than intended value of first list item */
}
div.dokuwiki div.wrap_list-deep ol li div.li::before {
  counter-increment: leva;
  content: counter(leva) ". ";
  color: inherit;
  font-weight: bold;
}
/* ~~~~~~ */

div.dokuwiki div.wrap_list-deep ol ol {
  list-style-type: none;
}
div.dokuwiki div.wrap_list-deep > ol ol {
  counter-reset: levb 0; /* set to one lower than intended value of first list item */
}
div.dokuwiki div.wrap_list-deep ol li li div.li::before {
  counter-increment: levb;
  content: counter(leva) "." counter(levb) ". ";
  color: inherit;
  font-weight: bold;
}

/* ~~~~~~ */

div.dokuwiki div.wrap_list-deep ol ol ol {
  list-style-type: none;
}
div.dokuwiki div.wrap_list-deep > ol ol ol {
  counter-reset: levc 0; /* set to one lower than intended value of first list item */
}
div.dokuwiki div.wrap_list-deep ol ol ol div.li::before {
  counter-increment: levc;
  content: counter(leva) "." counter(levb) "." counter(levc) ". ";
  color: inherit;
  font-weight: bold;
}
</style>
</html>
This post was edited on 2015-08-13, 00:59 by Ashtagon.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-08-24, 02:48:48 (UTC +02:00)