Not logged in. · Lost password · Register
Forum: General Help and Support Features and Functionality RSS
Integration of code in Dokuwiki
bodin #1
Member since May 2007 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Integration of code in Dokuwiki
Dear all,

I would like a wiki that enables the management of code written
in collaboration. More precisely I want a page,
whith a section of code that is a text file exo1234.txt (in fact this a exercice of math
in Latex). I want the wiki to enable to load, edit and save this sub-part exo1234.txt.

Of course in a former step the user has choosen an exercise between about 4000 small text files
(exo0001.txt to exo4000.txt, less than 1 ko each).

Here is the structure of the desired page :

  Blabla in html/wiki :
  Here is the code of the file exo1234.txt
  < output of the source of exo1234.txt >
  Buttons : Edit exo1234.txt, Save exo1234.txt

I don't want exo.txt to be a full page of wiki for several reasons :
I wan't something around the code (for example the wiki code <code latex> </code>
in order to have highlithing); there is no wiki code in the exo1234.txt file
(it will be process with other programs like Latex) ;
I don't want the 4000 pages to appear in the index !
And I want to use a wiki to keep in mind the modification and history of exo1234.txt
(and also to build the remaining pages of the site).

Can Dokuwiki do that ? (and how ?)
If not is there another wiki or solution ?

Thank you very much,
A. Bodin
chi #2
Member since Jun 2006 · 1851 posts · Location: Munich Germany
Group memberships: Members, Super Mods, Wiki Managers
Show profile · Link to this post

lets see if I get you right:

  - you have a set of 4000 .txt files which contain nothing else but latex
  - you want to include those files into other wiki pages (including syntax highlighting)
  - you want to be able to edit those latex files by using the wiki (to keep track of their modifications)
  - you don`t want to list those latex files in the index

to achieve that, you could try the following (though I am not sure if it wouldn`t be better to use a version control system like darcs or subversion):

  - first I would put the latex text files in their own namespace means a directory inside data/pages/
    (i.e. <dokuwiki>/data/pages/<namespace name>/)
  - to include those files into other pages (including syntax highlighting) you could use the source plugin [1], however there won`t be
    any edit buttons, you would have to browse to the sourced pages itself giving the right URL (see below) AND the output of
    these pages (while they`re not sourced via the source plugin) would look like rubbish because DW would try to parse them, I am not
    sure if you can edit/save them via DokuWiki either, in regards to linebreaks/tabs etc.
  - if your latex files follow a decent naming scheme and in case you put them into a namespace in DWs data dir it would be easy to
    hide them from the index/search/recent changes/rss via the "hidepages" configuration option [2] (it takes a regular expression,
    though you can`t hide them from the index only)

Maybe a combination of both, Wiki for all the non latex stuff, and a CVS for the latex files and the source plugin would be the best I can think of.


Please add [SOLVED] to the initial thread subject if you feel your question has been answered.
If my answer doesn't make sense maybe your question didn't either - just visit
This post was edited 2 times, last on 2007-05-22, 17:08 by chi.
bodin #3
Member since May 2007 · 2 posts
Group memberships: Members
Show profile · Link to this post
Thank you very much for all these information,

it works exactly as you said. Moreover I have used the plugin "linebreak" ( in order to have a good behaviour for paragraphs.

Two (small) problems remains open :
 1/ I would like to turn off the following features : the non-parsed blocks (created with two spaces at the beginning of the line),
and the footnotes.
 2/ I would like some pages to be automatically highlight : for example say all the pages whose name begins by
"exo" are highlight as latex code.

In any case Dokuwiki is what I was looking for !!
Thanks again,
A. Bodin
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
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-05-26, 17:35:09 (UTC +02:00)