qqzsxyz / vimwiki

Automatically exported from code.google.com/p/vimwiki
0 stars 0 forks source link

Feature Request: output wiki files to tex document #429

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Vimwiki is fantastic. I appreciate everyone that has bad it possible.

One major (or minor ? ^.^ ) improvement of the plugin would be to enable 
exporting the .wiki files into LaTeX format.

As a first attempt on this track, we can keep it simple. Here is what I could 
think of: 
- Assume that user of Vimwiki would only use the `= h1 titleline =` series for 
structuring their text document. Then, we can have the following 
correspondence: 

`=AnyText1=` could be translated to `\section{AnyText1}`;
`==AnyText2==` could be translated to `\subsection{AnyText2}`;
`===AnyText3===` could be translated to `\subsubsection{AnyText3}`;
`====AnyText4====` could be translated to `\paragraph{AnyText4}`;
`=====AnyText5=====` could be translated to `\subparagraph{AnyText5}`
There may be a subsubparagraph class, but I am not sure. 

- For texts enclosed by `$`, they could be left by themselves;
- For enclosed chunks of code, either by ` or {{{ ... }}}, they could be 
changed to 
    * Inline: \verb|CodeChunk|
    * Cross-line code block:

     `\begain{verbatim}`
             `    CodeChunk-CrossLine`
     `\end{verbatim}`

- For bold texts: `*BoldText*` == `\textbf{BoldText}`; 
- For italic ones: `_ItalicText_` == `\textit{ItalicText}`; 
- For superscripts: `super^script^` == `$super^{script}$`; if the superscript 
should be an text element, one can specify this by 
$\text{super}^\text{script}$. 
- For subscripts: `sub,,script,,` == `$sub_{script}$`. 
Note that,  `_` and `^` for subscript and superscript would only work when they 
are enclosed in `$` environment, with an opening dollar sign and a closing 
dollar sign. 

I am making this proposal because I cannot help myself typing in accordance 
with the LaTeX syntax when I am documenting thoughts in VimViki. I am trying to 
write a "cleaning" script using Regex in Python to convert my Vimwiki files 
into TEX-readable files, but I am still in progress of familiarizing with 
regular expression (still a long way to go). I believe it would be better if we 
could make it a <leader> key mapping within VimWiki. @EinfachToll I am willing 
to help with the cleaning script if you would need help.

Thanks in advance! 

- Linfeng

Original issue reported on code.google.com by linfeng....@gmail.com on 4 Sep 2014 at 7:31

GoogleCodeExporter commented 8 years ago
A better displayed/formatted posting could be found here:  
https://github.com/vimwiki/vimwiki/issues/69

Original comment by linfeng....@gmail.com on 4 Sep 2014 at 7:32