rogerjames
Is there a plugin for 2018-04-22 "Greebo" that will allow tabs, indents, non-breaking spaces, ect? I have a Word Visual Basic macro that converts the word documents into a wiki document and uploads them to my server. The problem is a lot of these documents has indent/tabs and extra spaces for aligning things in the documents so when you open the document in dokuwiki it ends up a lot of code blocks because of the indent/tabs and extra spaces.
So I was hoping if any one knows if there is a plugin that is compatible with 2018-04-22 "Greebo" that will allow for tabs, indents, non-breaking spaces or if there is something that can be edit to allow this?
I would hate to have to go into each document and edit every document to try to remove code blocks or add something to every document so it does not put code blocks all over the document because I have over 1000 word documents that I have to convert and that would be very long time to do this and would be very time consuming.
So if some one knows a way around this or a plugin or how to get it to work so you can have tabs, extra non-breaking spaces in your text file and not have it convert a ton of code blocks please let me know. I would be very grateful. Thanks in advance.
lpaulsen93
Have a look at the wrap plugin, see
https://www.dokuwiki.org/plugin:wrap.
rogerjames
I have that plugin but it does not seem to help any. Is that not something you have to add <wrap> every where you have a indent, tab, extra non-breaking spaces? Because that would mean I would have to go in and add that to over 1000 documents. Thanks for your reply.
lpaulsen93
Sorry, I haven't read carefully enough. Yes, with the wrap plugin you would need to insert wrap syntax tags all across your pages.
rogerjames
Is there any other way to allow non-breaking spaces, tabs, indents with out having to go into every document/text file to add that wrap line in the document/text file? Having to do this to over 1000 documents would be very time consuming. Like can we add that some where so it does it automatic or something? Sorry I am not great with some of this stuff so any help would be appreciated. Thanks for the reply.
pop
I don't think there's much you can do once the files are in the wiki.
I would suggest to look at first at the visual basic script which does the conversion. Can't you change it to avoid leading spaces at all?
Secondly, there are text editors which are quite good at this sort of things. I recently detected Bluefish, a text editor which lets specify search and replace operations with Regular Expressions and which can apply the same set of changes to a great number of files at the same time. It's blindingly fast, and I used it to remove false line breaks and hyphenations to sets of fifty files at a time.
I would think that this kind of editor might be useful to either correct the wrong markup or to insert markup such as the wrap tags.
rogerjames
I am using the Word2DokuWiki macro. I had a programmer end up fixing a lot of the issues with the macro with images, formatting, and a lot of other things and got it to upload the text and images to the server and got the rest of it working great.
The problem is, a lot of these documents has tab/indent and some times there are 2 tabs or 2 indents and when the macro uploads the text files and you load the page on the dokuwiki it ends up having these tabs/indents in a code block. So not sure how to have the macro fix this or add something so it does not load the code blocks. Hope this all makes sense. Any suggestions would be appreciated.
pop
It is part of the Dokuwiki syntax that any line beginning with spaces is rendered as a block of code. Hence, it would be best if you could ask the programmer who fixed the Word2DokuWiki macro to fix this as well. Leading spaces in a line should, therefore, be translated into something else.
However, you should first decide what the macro is to do in this case.
You could simply drop all the leading spaces. This would cause your text to look like all the other text.
Or you could decide and indent the text starting with spaces. In this case, the Word2DokuWiki macro should wrap either each line or each group of lines with the same number of spaces in front into "<WRAP indent> .... </WRAP>
turnermm
You might be able to use the batchedit plugin. It would need someone who is familiar with regular expressions.
https://www.dokuwiki.org/plugin:batchedit
rogerjames
So, any one know how the <wrap> command works with all the different <wrap> syntax? I tried searching online and there really is not much details on this.
So if I want to add 2 spaces I can add <wrap>text</wrap> ?
So if I want to add 3 space I can add <wrap>text</wrap> ?
So if I want to add a tab I can add <wrap indent>text</wrap> ?
So if I want to add 2 tabs I can add <wrap indent><wrap indent> text </wrap indent> ?
Would this how I would use the <wrap> commands? Or is there better <wrap> commands to use? Thanks for all the replies.
turnermm
There is a plugin that inserts characters, and it also suggests using instead the conf/entities.local.conf file (create if it doesn't exist) to create an entity for replacement. That sounds to me the simplest.
lizat
Myron, unless there's another I have missed that plugin is old and throws warnings on install so I decieded against it
turnermm
Use entities instead. In the conf/ directory, create a file named entities.local.conf. Add these lines:
(sp)  
(SP)  
When you want a space character, use (sp)
in your document for a standard space and (SP)
for a wider space. These derive from when fonts were lead type, and the wide space was created as the width of a capital M and the narrow as half M and were named en and em.
lizat
Myron, I am using '~~' (without the quotation marks) because I like it better visually. I couldn't find a refernce to the use of tidle anywhere else. Can you advise?
Thank you
turnermm
I think that should be OK. Entities are processed before plugins so any plugins using a double tilde will process correctly. I wasn't sure about MACROS, e.g.~~NOTOC~~, but tested and it's OK.