[Sciviews-commits] r553 - komodo/SciViews-K komodo/SciViews-K/components komodo/SciViews-K/udl pkg/svDoc pkg/svDoc/R pkg/svDoc/inst/asciidoc pkg/svDoc/inst/asciidoc/dblatex pkg/svDoc/inst/asciidoc/docbook-xsl pkg/svDoc/inst/asciidoc/filters/code pkg/svDoc/inst/asciidoc/filters/source pkg/svDoc/inst/asciidoc/images pkg/svDoc/inst/asciidoc/images/icons pkg/svDoc/inst/asciidoc/images/icons/callouts pkg/svDoc/inst/asciidoc/javascripts pkg/svDoc/inst/asciidoc/stylesheets pkg/svDoc/inst/asciidoc/themes/sciviews pkg/svDoc/man pkg/svIDE/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Mar 9 10:28:17 CET 2014


Author: phgrosjean
Date: 2014-03-09 10:28:16 +0100 (Sun, 09 Mar 2014)
New Revision: 553

Added:
   pkg/svDoc/inst/asciidoc/a2x.py
   pkg/svDoc/inst/asciidoc/asciidocapi.py
   pkg/svDoc/inst/asciidoc/dblatex/
   pkg/svDoc/inst/asciidoc/dblatex/asciidoc-dblatex.sty
   pkg/svDoc/inst/asciidoc/dblatex/asciidoc-dblatex.xsl
   pkg/svDoc/inst/asciidoc/dblatex/dblatex-readme.txt
   pkg/svDoc/inst/asciidoc/docbook-xsl/
   pkg/svDoc/inst/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt
   pkg/svDoc/inst/asciidoc/docbook-xsl/chunked.xsl
   pkg/svDoc/inst/asciidoc/docbook-xsl/common.xsl
   pkg/svDoc/inst/asciidoc/docbook-xsl/epub.xsl
   pkg/svDoc/inst/asciidoc/docbook-xsl/fo.xsl
   pkg/svDoc/inst/asciidoc/docbook-xsl/htmlhelp.xsl
   pkg/svDoc/inst/asciidoc/docbook-xsl/manpage.xsl
   pkg/svDoc/inst/asciidoc/docbook-xsl/text.xsl
   pkg/svDoc/inst/asciidoc/docbook-xsl/xhtml.xsl
   pkg/svDoc/inst/asciidoc/docbook45.conf
   pkg/svDoc/inst/asciidoc/images/
   pkg/svDoc/inst/asciidoc/images/icons/
   pkg/svDoc/inst/asciidoc/images/icons/callouts/
   pkg/svDoc/inst/asciidoc/images/icons/callouts/1.png
   pkg/svDoc/inst/asciidoc/images/icons/callouts/10.png
   pkg/svDoc/inst/asciidoc/images/icons/callouts/11.png
   pkg/svDoc/inst/asciidoc/images/icons/callouts/12.png
   pkg/svDoc/inst/asciidoc/images/icons/callouts/13.png
   pkg/svDoc/inst/asciidoc/images/icons/callouts/14.png
   pkg/svDoc/inst/asciidoc/images/icons/callouts/15.png
   pkg/svDoc/inst/asciidoc/images/icons/callouts/2.png
   pkg/svDoc/inst/asciidoc/images/icons/callouts/3.png
   pkg/svDoc/inst/asciidoc/images/icons/callouts/4.png
   pkg/svDoc/inst/asciidoc/images/icons/callouts/5.png
   pkg/svDoc/inst/asciidoc/images/icons/callouts/6.png
   pkg/svDoc/inst/asciidoc/images/icons/callouts/7.png
   pkg/svDoc/inst/asciidoc/images/icons/callouts/8.png
   pkg/svDoc/inst/asciidoc/images/icons/callouts/9.png
   pkg/svDoc/inst/asciidoc/images/icons/home.png
   pkg/svDoc/inst/asciidoc/images/icons/next.png
   pkg/svDoc/inst/asciidoc/images/icons/prev.png
   pkg/svDoc/inst/asciidoc/images/icons/up.png
   pkg/svDoc/inst/asciidoc/lang-cs.conf
   pkg/svDoc/inst/asciidoc/lang-ro.conf
   pkg/svDoc/inst/asciidoc/main.aap
   pkg/svDoc/inst/asciidoc/stylesheets/docbook-xsl.css
   pkg/svDoc/inst/asciidoc/stylesheets/pygmentsGithub.css
   pkg/svDoc/inst/asciidoc/stylesheets/pygmentsSciViews.css
Removed:
   pkg/svDoc/inst/asciidoc/wordpress.conf
Modified:
   komodo/SciViews-K/components/koRwiki_UDL_Language.py
   komodo/SciViews-K/install.rdf
   komodo/SciViews-K/udl/wikilex.udl
   pkg/svDoc/DESCRIPTION
   pkg/svDoc/NEWS
   pkg/svDoc/R/asciidoc.R
   pkg/svDoc/R/svDoc-internal.R
   pkg/svDoc/TODO
   pkg/svDoc/inst/asciidoc/CHANGELOG.txt
   pkg/svDoc/inst/asciidoc/README.txt
   pkg/svDoc/inst/asciidoc/asciidoc.conf
   pkg/svDoc/inst/asciidoc/asciidoc.py
   pkg/svDoc/inst/asciidoc/filters/code/code-filter.py
   pkg/svDoc/inst/asciidoc/filters/source/source-highlight-filter.conf
   pkg/svDoc/inst/asciidoc/help.conf
   pkg/svDoc/inst/asciidoc/html4.conf
   pkg/svDoc/inst/asciidoc/html5.conf
   pkg/svDoc/inst/asciidoc/javascripts/ASCIIMathML.js
   pkg/svDoc/inst/asciidoc/stylesheets/asciidoc.css
   pkg/svDoc/inst/asciidoc/stylesheets/pygments.css
   pkg/svDoc/inst/asciidoc/themes/sciviews/sciviews.css
   pkg/svDoc/inst/asciidoc/xhtml11.conf
   pkg/svDoc/man/svDoc-package.Rd
   pkg/svIDE/R/guiDDEInstall.R
Log:
svDoc towards markdown/Asciidoc mix
Ascidoc upgrade to 8.6.9

Modified: komodo/SciViews-K/components/koRwiki_UDL_Language.py
===================================================================
--- komodo/SciViews-K/components/koRwiki_UDL_Language.py	2014-03-02 12:31:56 UTC (rev 552)
+++ komodo/SciViews-K/components/koRwiki_UDL_Language.py	2014-03-09 09:28:16 UTC (rev 553)
@@ -62,7 +62,7 @@
     # ------------ Commenting Controls ------------ #
     
     commentDelimiterInfo = {
-        "line": [ "#", ],
+        "line": [ "//", ],
     }
     
     # ------------ Indentation Controls ------------ #
@@ -115,7 +115,7 @@
     
     sample = """== A h2 title
     
-A  paragraph of text with **bold** and ,,italic,, text...
+A  paragraph of text with **bold** and __italic_ text...
 
 * Item 1,
 * Item 2

Modified: komodo/SciViews-K/install.rdf
===================================================================
--- komodo/SciViews-K/install.rdf	2014-03-02 12:31:56 UTC (rev 552)
+++ komodo/SciViews-K/install.rdf	2014-03-09 09:28:16 UTC (rev 553)
@@ -5,7 +5,7 @@
         <em:unpack>true</em:unpack>
         <em:id>sciviewsk at sciviews.org</em:id>
         <em:name>SciViews-K</em:name>
-        <em:version>0.9.33</em:version>
+        <em:version>0.9.34</em:version>
         <em:description>Edit R code with Komodo</em:description>
         <em:creator>Philippe Grosjean</em:creator>
         <em:contributor>Romain Francois</em:contributor>

Modified: komodo/SciViews-K/udl/wikilex.udl
===================================================================
--- komodo/SciViews-K/udl/wikilex.udl	2014-03-02 12:31:56 UTC (rev 552)
+++ komodo/SciViews-K/udl/wikilex.udl	2014-03-09 09:28:16 UTC (rev 553)
@@ -66,23 +66,61 @@
 #SCE_UDL_M_COMMENT
 #    SGML comments.
 
+# Set the basic patterns we'll be using for styling transitions.
+pattern WCHAR = 'a-zA-Z\d\x80-\xff'     # characters in words
+pattern WS = '\s\t\r\n'                 # whitespace
+pattern OP = '!%&\(\)\*\+,-\/:;<=>\?@\[\]\^\{\}~|\$'    # operator
+
+
 state IN_M_WIKI_START
 /^/ : => in_wiki_default_start_of_line
 /./: redo, => in_wiki_default_on_line
 
 state in_wiki_default_start_of_line:
 #'{{{' : paint(upto, M_DEFAULT), paint(include, M_TAGNAME), => in_wiki_triple_brace_start
-'##': paint(upto, M_CDATA), paint(include, M_COMMENT), => in_wiki_have_comment
+'//': paint(upto, M_CDATA), paint(include, M_COMMENT), => in_wiki_have_comment
 
-# This is for the item list
-# NO'- ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+# Ruler
+/^[ \t]*-{3}[ \t]*$/: paint(upto, M_CDATA), paint(include, M_PI), => in_wiki_default_on_line
+/^[ \t]*(- ){2,}-[ \t]*$/: paint(upto, M_CDATA), paint(include, M_PI), => in_wiki_default_on_line
+/^[ \t]*\*{3}[ \t]*$/: paint(upto, M_CDATA), paint(include, M_PI), => in_wiki_default_on_line
+/^[ \t]*_{3}[ \t]*$/: paint(upto, M_CDATA), paint(include, M_PI), => in_wiki_default_on_line
+/^[ \t]*(\* ){2,}\*[ \t]*$/: paint(upto, M_CDATA), paint(include, M_PI), => in_wiki_default_on_line
+# Page break
+/^[ \t]*<{3,}[ \t]*$/: paint(upto, M_CDATA), paint(include, M_PI), => in_wiki_default_on_line
+
+# Special characters (c), (r), (tm), ..., --, ---, 1/2, 1/4, 3/4
+/(?<!\\)\(c\)/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+/(?<!\\)\(r\)/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+/(?<!\\)\(tm\)/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+/(?<!\\)\.\.\./: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+/(?<!\\)---/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+/(?<!\\)--/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+/(?<!\\)1\/2/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+/(?<!\\)1\/4/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+/(?<!\\)3\/4/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+"\\\\.": paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+
+# This is for unordered list
 '* ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
 '** ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
 '*** ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
 '**** ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
 '***** ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
 
-# This is for the numbered list
+'+ ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+'++ ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+'+++ ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+'++++ ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+'+++++ ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+
+'- ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+'-- ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+'--- ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+'---- ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+'----- ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+
+# This is for the ordered list
 '. ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
 '.. ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
 '... ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
@@ -94,11 +132,12 @@
 /[ivx]+\) /: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
 /[IVX]+\) /: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
 
-'===== ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header
-'==== ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header
-'=== ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header
-'== ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header
-'= ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header
+'######': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header
+'#####': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header
+'####': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header
+'###': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header
+'##': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header
+'#': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header
 '.': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header
 
 # This is for special paragraphs
@@ -108,6 +147,10 @@
 'CAUTION:': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
 'TIP:': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
 
+# Markdown quote style (> quoted text) is not handled correctly in Asciidoc
+# Just highlight quotes as tags however, here
+/>[> \t]+/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line
+
 # Everything between [] on the beginning of a line, or with name;; name:: name::: name:::: is tag
 /\[.*\]$/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_start_of_line
 /[a-zA-Z][a-zA-Z _0-9]+;;$/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_start_of_line
@@ -116,30 +159,35 @@
 /./: redo, => in_wiki_default_on_line
 
 state in_wiki_finish_header:
-/$/ : paint(upto, M_PI), paint(include, M_PI), => in_wiki_default_start_of_line
-#/\s+/ : #stay
-#'##': paint(upto, M_PI), paint(include, M_COMMENT), => in_wiki_have_comment
-#/./: redo, => in_wiki_default_on_line
+/#*$/ : paint(upto, M_PI), paint(include, M_TAGNAME), => in_wiki_default_start_of_line
 
 state in_wiki_default_on_line:
 #'##': paint(upto, M_CDATA), paint(include, M_COMMENT), => in_wiki_have_comment
-# Line break with +
-/ \+$/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_start_of_line
+# Line break with + (asciidoc style)
+/ +\+[$WS]*$/: paint(upto, M_CDATA), paint(include, SSL_STRING), => in_wiki_default_on_line
+/(  |\t)[$WS]*$/: paint(upto, M_CDATA), paint(include, SSL_STRING), => in_wiki_default_on_line
+# Line break with 2 sp, 1 tab or more (markdown style)
 /$/: => in_wiki_default_start_of_line
-",," : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_italic
-"**" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_bold
+"__" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_bold1
+/(?<![$WCHAR])_/ : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_italic1
+"**" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_bold2
+/(?<![$WCHAR])\*/ : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_italic2
+"~~" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_del
 ## TODO: use a different language here... may be latex or latexequation?
 "+++$$" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_equation
-"$$" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_code
+/^```+[a-zA-Z0-9]*$/ : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_literal
+/``[\s\t]+/ : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_code1
+/``(?![`\s\t])/ : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_code2
+"`" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_code3
 "+++" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_passthrough
-"~~" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_monospaced
+"++" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_monospaced
 
 #"'''''" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_q5
 #"'''" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_q3
 #"''" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_q2
 
-"__" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_subscript
-"^^" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_superscript
+"~" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_subscript
+"^" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_superscript
 
 '{{{' : paint(upto, M_CDATA), => in_wiki_brace_3
 /!'+/: #stay
@@ -189,31 +237,65 @@
 
 
 #{{{ in-line things
-state in_wiki_italic:
-# We don't want to transit from italic stage for URLs like http://xxx
-/!,,/: #stay
-## TODO: allow for other in-line things inside this!
-",," : paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line
+state in_wiki_bold1:
+/!\__/: #stay
+"__" : paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line
 
-state in_wiki_bold:
+state in_wiki_bold2:
 /!\**/: #stay
-"**" : paint(upto, M_TAGNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line
+"**" : paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line
 
+state in_wiki_italic1:
+/!_/: #stay
+"_" : redo, => in_wiki_italic1_transition
+
+state in_wiki_italic1_transition:
+/_(?=[$WCHAR])/: => in_wiki_italic1
+/_(?![$WCHAR])/: paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line
+
+state in_wiki_italic2:
+/!\*/: #stay
+"*" : redo, => in_wiki_italic2_transition
+
+state in_wiki_italic2_transition:
+/\*(?=[$WCHAR])/: => in_wiki_italic2
+/\*(?![$WCHAR])/: paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line
+
+state in_wiki_del:
+/!\~~/: #stay
+"~~" : paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line
+
 state in_wiki_equation:
 /!\$$+++/: #stay
-"$$+++" : paint(upto, M_TAGNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line
+"$$+++" : paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line
 
-state in_wiki_code:
-/!\$$/: #stay
-"$$" : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line
+state in_wiki_literal:
+/!\^/: #stay
+/^/ : paint(upto, M_TAGNAME), paint(include, M_TAGNAME), => in_wiki_literal_code
 
+state in_wiki_literal_code:
+/!\^```+$/: #stay
+/^```+$/ : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line
+
+state in_wiki_code1:
+/!\[\s\t]+``/: #stay
+/[\s\t]+``/ : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line
+
+state in_wiki_code2:
+/!\``/: #stay
+"``" : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line
+
+state in_wiki_code3:
+/!\`/: #stay
+"`" : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line
+
 state in_wiki_passthrough:
 /!\+++/: #stay
 "+++" : paint(upto, SSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line
 
 state in_wiki_monospaced:
-/!\~~/: #stay
-"~~" : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line
+/!\++/: #stay
+"++" : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line
 
 #state in_wiki_q5:
 #/!'+/: #stay
@@ -226,11 +308,11 @@
 #"''" : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line
 
 state in_wiki_subscript:
-/!__/: #stay
-"__" : paint(upto, M_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line
+/!~/: #stay
+"~" : paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line
 state in_wiki_superscript:
-/!^^/: #stay
-"^^" : paint(upto, M_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line
+/!^/: #stay
+"^" : paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line
 #}}}
 
 ################ End of State Handling ################

Modified: pkg/svDoc/DESCRIPTION
===================================================================
--- pkg/svDoc/DESCRIPTION	2014-03-02 12:31:56 UTC (rev 552)
+++ pkg/svDoc/DESCRIPTION	2014-03-09 09:28:16 UTC (rev 553)
@@ -1,7 +1,7 @@
 Package: svDoc
 Type: Package
-Version: 0.9-9
-Date: 2013-09-21
+Version: 0.9-10
+Date: 2014-03-03
 Title: SciViews GUI API - svDoc functions
 Author: Philippe Grosjean [aut, cre]
 Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"),
@@ -11,6 +11,6 @@
 Imports: utils
 SystemRequirements: Python (>= 2.4) to run Asciidoc (http://www.python.org/)
 Description: Supporting functions for the GUI API (SciViews documents management)
-License: file LICENSE
+License: GPL (>= 2)
 URL: http://www.sciviews.org/SciViews-R
 BugReports: https://r-forge.r-project.org/tracker/?group_id=194

Modified: pkg/svDoc/NEWS
===================================================================
--- pkg/svDoc/NEWS	2014-03-02 12:31:56 UTC (rev 552)
+++ pkg/svDoc/NEWS	2014-03-09 09:28:16 UTC (rev 553)
@@ -1,5 +1,10 @@
 = svDoc News
 
+== Changes in svDoc 0.9-10
+
+* AsciiDoc updates to version 8.6.9 (november 2013)
+
+
 == Changes in svDoc 0.9-9
 
 * Detection of python, internal function .python(), sometimes failed. Corrected.

Modified: pkg/svDoc/R/asciidoc.R
===================================================================
--- pkg/svDoc/R/asciidoc.R	2014-03-02 12:31:56 UTC (rev 552)
+++ pkg/svDoc/R/asciidoc.R	2014-03-09 09:28:16 UTC (rev 553)
@@ -7,6 +7,7 @@
 svDocToRnw <- function (svDocFile, RnwFile, encoding)
 {
 	## Converts a SciViews doc into an sweave document (.Rnw)
+	## with Asciidoc formatting (also convert markdown to Asccidoc)
 	
 	## If svDocFile is missing, try to get it from option or the command line
 	if (missing(svDocFile)) svDocFile <- .svDocFile()
@@ -55,17 +56,151 @@
 	## Text chunks are lines where cstart > cend
 	inDoc <- cstart > cend
 	
+	#### Conversion markdown into asciidoc formattings
+	#### Titles
+	## Asciidoc does not support H6. Transform it into block .title
+#	Rscript[inDoc] <- sub('^######[ \t]*([^#]+)#*$', '.\\1', Rscript[inDoc])
+#	## H1 -> H5: markdown to Asciidoc
+#	Rscript[inDoc] <- sub('^#####[ \t]*([^#]+)#*$', '===== \\1', Rscript[inDoc])
+#	Rscript[inDoc] <- sub('^####[ \t]*([^#]+)#*$', '==== \\1', Rscript[inDoc])
+#	Rscript[inDoc] <- sub('^###[ \t]*([^#]+)#*$', '=== \\1', Rscript[inDoc])
+#	Rscript[inDoc] <- sub('^##[ \t]*([^#]+)#*$', '== \\1', Rscript[inDoc])
+#	Rscript[inDoc] <- sub('^#[ \t]*([^#]+)#*$', '= \\1', Rscript[inDoc])
+#	## TODO: make sure we have same number of chars for ==== and ---- underlined titles
+	
+	## Markdown version of *italic* and __bold__: done in asciidoc.conf
+	## Markdown strikethrough ~~text~~ also done in asciidoc.conf
+	## Super^script^and sub~script~ is identical between extended markdown
+	## and asciidoc, but support also <sub>...</sub> and <super>...</super>
+#	Rscript[inDoc] <- gsub('</?sub>', '~', Rscript[inDoc])
+#	Rscript[inDoc] <- gsub('</?super>', '~', Rscript[inDoc])
+	## Note super^script without terminating ^ like in first  .Rmd version NOT supported!
+	## Terminate unterminated superscripts (markdown compatible) and subscripts
+	## NO! It is too much error-prone!!!
+	#Rscript[inDoc] <- gsub('\\^([^^ \t\r\n]+)\\^?([ \t\r\n])', '^\\1^\\2', Rscript[inDoc])
+	#Rscript[inDoc] <- gsub('\\~([^~ \t\r\n]+)~?([ \t\r\n])', '~\\1~\\2', Rscript[inDoc])
+	
+	## Convert markdown style force line break (2 or more space or 1
+	## or more tabs at the end of line) into asciidoc break (space +)
+	## TODO: may be use this, but not in passthrough or listing or literal blocks!
+#	Rscript[inDoc] <- gsub("(  |\t)[ \t]*$", " +", Rscript[inDoc])
+	
+	## Make sure rulers are on their own line
+	## --- or - - - or *** or * * * or ___
+	## Note: if using ---, *** or ___: do not support more than three items!
+	## This is to avoid clash with listing, sidebar and quoted blocks, respectively!
+#	Rscript[inDoc] <- sub('^[ /t]*[-*_]{3}[ /t]*$', "'''", Rscript[inDoc])
+#	Rscript[inDoc] <- sub('^[ /t]*(- ){2,}-[ /t]*$', "'''", Rscript[inDoc])
+#	Rscript[inDoc] <- sub('^[ /t]*(\\* ){2,}\\*[ /t]*$', "'''", Rscript[inDoc])
+	## Format page break...not needed, since not defined in markdown?
+	#Rscript[inDoc] <- sub('^[ /t]*<{3,}[ /t]*$', '\n<<<\n', Rscript[inDoc])
+	
+	## Convert markdown fenced block (possibly with syntax highlighting) ```s
+	## into Asciidoc equivalent [source,lang]\n```
+	## TODO: allow for numbered lines (how?)
+	Rscript[inDoc] <- sub('^`{3,}([a-zA-Z0-9]+)[ \t]*$', '[source,\\1]\n```', Rscript[inDoc])
+#	Rscript[inDoc] <- sub('^`{3,}[ \t]*$', '----', Rscript[inDoc])
+	
+	## Convert markdown HTML blocks into Asciidoc HTML block by enclosing it inside
+	## a passtrough block using ++++
+	## TODO: look if it is not already a passthrough and avoid this in listing bocks!
+#	Rscript[inDoc] <- sub('^(</[^>]+)>)', '\\1\n++++', Rscript[inDoc])
+#	Rscript[inDoc] <- sub('^(<[^>]+)>)', '++++\n\\1', Rscript[inDoc])
+	
+	## Convert markdown image markups into Asciidoc equivalents
+	## ![Alt text](path/to/img.jpg "opt title") on one line => image::/path/to/img.jpg[Alt text]
+	## Same one inside text => image:/path/to/img.jpg[Alt text]
+	## TODO: how to deal with optional title? And with white space? And non relative path?
+	## TODO: I have a space too much if optional title is provided!
+	Rscript[inDoc] <- sub('^!(\\[[^]]+\\])\\(([^)"\']+)[^)]*\\)$', 'image::\\2\\1', Rscript[inDoc])
+	Rscript[inDoc] <- sub('!(\\[[^]]+\\])\\(([^)"\']+)[^)]*\\)', 'image:\\2\\1', Rscript[inDoc])
+	
+	## Convert markdown links into Asciidoc equivalents
+	## [A link](http://example.com "opt title") => http://example.com/[A link]
+	## TODO: deal with spaces inside links
+	## TODO: I have a space too much if optional title is provided!
+	Rscript[inDoc] <- sub('(\\[[^]]+\\])\\(([^)"\']+)[^)]*\\)', '\\2\\1', Rscript[inDoc])
+	
+	
+	## Asciidoc does not handle markdown quoted text well, currently
+	## Just prepend {empty} for transforming it as text
+	## TODO... and what about indented stuff?
+	
+
+#	isTxt <- grepl("^(#' .*|[ /t]*)$", ttt)
+#	tt2 <- sub("^#' ", "", ttt)
+#	## Transition text -> R chunk
+#	trans1 <- c(FALSE, !isTxt[-1] & isTxt[-length(isTxt)])
+#	## Add empty R chunk transition in trans1, if not there
+#	tt2t1 <- tt2[trans1]
+#	noTrans <- !grepl("^#[+-] ", tt2t1)
+#	tt2t1[noTrans] <- paste0("<<>>=\n", tt2t1[noTrans])
+#	tt2[trans1] <- tt2t1
+#	## Transition R chunk -> text
+#	trans2 <- c(FALSE, isTxt[-1] & !isTxt[-length(isTxt)])
+#	tt2[trans2] <- paste0("@\n", tt2[trans2])
+	
+	
+	
 	## Convert \" into " inside doc blocks
 	Rscript[inDoc] <- gsub('\\\\"', '"', Rscript[inDoc])
 	
 	## Convert \\ into \ inside doc blocks
 	Rscript[inDoc] <- gsub("\\\\\\\\", "\\\\", Rscript[inDoc])
 	
+	## Convert from R markdown `r 1+1`or ``r 1+1``into Sweave style for
+	## inline R expressions \Sexpr{1+1} (note that we leave external ` if it is doubled!) 
+	Rscript[inDoc] <- gsub('`r[ \t]+([^`]*)`', '\\\\Sexpr{\\1}', Rscript[inDoc])
+	## But WAIT: we need to escape } inside the expression!!!
+	## First, replace Sexpr delimiters by %@%SEXPR%@% on both sides
+#	sexprs <- gsub("`r[ /t]([^`]*)`", "%@%SEXPR%@%\\1%@%SEXPR%@%", Rscript[inDoc])
+#	## Then, split the strings on this tag
+#	sexprs <- strsplit(sexprs, "%@%SEXPR%@%", fixed = TRUE)
+	## Now, all even items in the list contain Sexpr... replace } by \} there,
+	## if } is not already escaped
+	## Note also that if the Sexpr was at the end of the string, we need to
+	## append "" to it, in order to be able to put end delimiter at next step
+	## Also, glue together the pieces by using \Sexpr{ and } as delimiters
+#	Rscript[inDoc] <- sapply(sexprs, function (x) {
+#		l <- length(x)
+#		if (!l) return("")
+#		evenPos <- !(1:l %% 2)
+#		x[evenPos] <-  paste0("\\Sexpr{", gsub("[\\\\]?([{}])", "\\\\\\\\\\1", x[evenPos]),
+#			"}")
+#		paste(x, collapse = "")
+#	})
+
+	## Convert from R markdown latex equations to AsciiDoc version
+	## \[ ... \] => ++++\n<center>$ ... $</center>\n++++ for display equations
+	Rscript[inDoc] <- gsub('^[ \t]*\\\\\\[', '+++<center>$', Rscript[inDoc])
+	Rscript[inDoc] <- gsub('^[ \t]*\\\\\\]', '$</center>+++', Rscript[inDoc])
+	## Note: for reasons I don't know, this does not work:  $$latex ... $$ into ++++\n<center>$ ... $</center>\n++++
+	## $$latex ... $$ into +++<center>$ ... $</center>+++
+	## TODO: eliminate this!
+	#Rscript[inDoc] <- gsub('^[ \t]*\\$\\$latex', '+++<center>$', Rscript[inDoc])
+#	Rscript[inDoc] <- gsub('^[ \t]*\\$\\$', '$</center>+++', Rscript[inDoc])
+	## \( ... \) => +++$ ... $+++ for inline equations
+	Rscript[inDoc] <- gsub('\\\\\\(', '+++$', Rscript[inDoc])
+	Rscript[inDoc] <- gsub('\\\\\\)', '$+++', Rscript[inDoc])
+	## $latex ... $ into +++$ ... $+++
+	## TODO: eliminate this
+	#Rscript[inDoc] <- gsub('\\$latex ([^$]+)\\$', '+++$\\1$+++', Rscript[inDoc])
+	
+	
+	## Eliminate spaces and tabs between `` and <code> and ``
+	## => ``code`` (markdown allows but ignores spaces and tabs... this is
+	## to allow  backquotes inside code!). This is tricky, but here it is!
+	## TODO: not good solution => solved in asciidoc.conf for single space inside `` code ``
+#	Rscript[inDoc] <- gsub("``[ \t]*([^ ]*( (?![ \t]*``)[^ ]*)*)[ \t]*``", "``\\1``",
+#		Rscript[inDoc], perl = TRUE)
+	
 	## Convert comments blocks using four or more #### by ////
-	Rscript[inDoc] <- gsub("^####+$", "////", Rscript[inDoc])
+	## No, since # is for title now
+#	Rscript[inDoc] <- gsub("^####+$", "////", Rscript[inDoc])
 	
 	## Convert line comments using ## by __
-	Rscript[inDoc] <- gsub("^##", "__", Rscript[inDoc])
+	## NO! Now, it is //, since # is for titles
+#	Rscript[inDoc] <- gsub("^##", "__", Rscript[inDoc])
 	
 	## Replace all doc chunk starters (!") by @
 	Rscript[start] <- "@"
@@ -139,7 +274,6 @@
 		html4 = "html",
 		slidy = "html",
 		slidy2 = "html",
-		wordpress = "html",
 		docbook = "xml",
 		docbook45 = "xml",
 		latex = "tex",
@@ -237,10 +371,18 @@
 		stop("Problems while creating the Asciidoc file (", TxtFile, ")")
 	
 	## Do we use a particular theme with Asciidoc
+	## I have got problem with `var` insode code blocks that are interpreted as
+	## equations by MathML => do not use it!!!
+	#if (theme == "classic") {
+	#	opts <- paste('" -b ', format, ' -a asciimath -a caption "', sep = "")
+	#} else {
+	#	opts <- paste('" -b ', format, ' -a asciimath -a caption --theme=',
+	#		theme, '@ "', sep = "")
+	#}
 	if (theme == "classic") {
-		opts <- paste('" -b ', format, ' -a asciimath -a caption "', sep = "")
+		opts <- paste('" --unsafe -b ', format, ' -a latexmath -a caption "', sep = "")
 	} else {
-		opts <- paste('" -b ', format, ' -a asciimath -a caption --theme=',
+		opts <- paste('" --unsafe -b ', format, ' -a latexmath -a caption --theme=',
 			theme, '@ "', sep = "")
 	}
 

Modified: pkg/svDoc/R/svDoc-internal.R
===================================================================
--- pkg/svDoc/R/svDoc-internal.R	2014-03-02 12:31:56 UTC (rev 552)
+++ pkg/svDoc/R/svDoc-internal.R	2014-03-09 09:28:16 UTC (rev 553)
@@ -5,8 +5,7 @@
 	if (!is.null(py)) options(python = py)
 		
 	## Add an svDoc function to the R http daemon server to process svDoc pages
-	e <- get(".httpd.handlers.env", envir = asNamespace("tools"),
-		inherits = FALSE)
+	e <- getNamespace("tools")$.httpd.handlers.env
 	e[["svDoc"]] <- function (path, query, body, ...) {
 		## Avoid partial argument match (cf warnings with ascii functions)!
 		partmatch <- getOption("warnPartialMatchArgs")
@@ -51,7 +50,7 @@
 	if (is.null(svDocFile)) svDocFile <- commandArgs(TRUE)[1] # If #! script
 	if (!length(svDocFile) || !file.exists(svDocFile))
 		stop("svDocFile not found (", svDocFile, ")")
-	return(normalizePath(svDocFile, winslash = "/"))
+	normalizePath(svDocFile, winslash = "/")
 	
 }
 
@@ -148,5 +147,5 @@
 	if (!file.exists(py)) return(NULL)
 
 	## Recheck now...
-	if (.pyCheck(py)) return(py) else return(NULL)
+	if (.pyCheck(py)) py else NULL
 }

Modified: pkg/svDoc/TODO
===================================================================
--- pkg/svDoc/TODO	2014-03-02 12:31:56 UTC (rev 552)
+++ pkg/svDoc/TODO	2014-03-09 09:28:16 UTC (rev 553)
@@ -4,7 +4,7 @@
 
 * Check styles for paragraphs
 
-* Change syntax for onm code
+* Change syntax for owm code
 
 * Use only one # at the beginning of a line for wiki comments???
 
@@ -16,7 +16,7 @@
 
 * Support for equal signs at the end of titles too
 
-* Support for block elements, including listing, litera, sidebar, quote, example
+* Support for block elements, including listing, literal, sidebar, quote, example
   with styles
   
 * Full support for table formatting
@@ -26,7 +26,7 @@
 * Support for special inline stiles like variable, code, package, command,
    menu item, file, program
 
-* Support for replacepent for R, SciViews, LyX, LaTeX, ...
+* Support for replacement for R, SciViews, LyX, LaTeX, ...
 
 * Support for level 1 & 2 undelined titles (=== and ---, respectively)
 

Modified: pkg/svDoc/inst/asciidoc/CHANGELOG.txt
===================================================================
--- pkg/svDoc/inst/asciidoc/CHANGELOG.txt	2014-03-02 12:31:56 UTC (rev 552)
+++ pkg/svDoc/inst/asciidoc/CHANGELOG.txt	2014-03-09 09:28:16 UTC (rev 553)
@@ -1,9 +1,85 @@
 AsciiDoc ChangeLog
 ==================
 
-:website: http://www.methods.co.nz/asciidoc/
+:website: http://asciidoc.org/
 
 
+Version 8.6.9 (2013-11-09)
+--------------------------
+.Additions and changes
+- 'html5', 'xhtml11' and 'slidy'  outputs now wrap 'pre' element
+  contents at right margin (see
+https://groups.google.com/group/asciidoc/browse_thread/thread/9877a316b7a47309).
+- Vim syntax file: highlight line breaks in lists (patch submitted by
+  Alex Efros). See
+  https://groups.google.com/group/asciidoc/browse_thread/thread/5145e4c0b65cde0a).
+- Vim syntax file: fixed highlighting of lines with spaces preceding
+  an indented paragraph.  See
+  https://groups.google.com/group/asciidoc/browse_thread/thread/5145e4c0b65cde0a
+- Vim syntax file: dropped ')' from list of illegal characters
+  following opening quote. See
+  https://groups.google.com/group/asciidoc/browse_thread/thread/1a60eb4507a0555f/264c39c6a89fc7a0
+- Added {plus} intrinsic attribute. See
+  http://code.google.com/p/asciidoc/issues/detail?id=14
+- Allow `tabsize=0 in` configuration file. See
+  https://groups.google.com/group/asciidoc/browse_thread/thread/c88457020288ce1d
+- Removed 'wordpress' backend into the blogpost project (where it
+  belongs) as an AsciiDoc backend plugin.
+- Added HTML5 footer badges.
+- Added favicon to AsciiDoc website.
+- Changed AsciiDoc website domain to 'asciidoc.org'.
+- Vim syntax file: closing quote character cannot be immediately
+  followed by same closing quote character.
+- Documentation updates.
+- If admonition icons are embedded using the Data URI Scheme and the
+  icons directory is undefined or does not exist then the 'iconsdir'
+  attribute is set to the location of the icons installed in the
+  AsciiDoc configuration directory.
+- Updated `./stylesheets/pygments.css` from pygments 1.4.
+- HTML backends: Align inline images to text-bottom.
+- html4 backend: Added 'hr' attribute to make the inter-section
+  horizontal ruler element optional.
+- Documented 'Callout lists cannot be used within tables'. See:
+  https://groups.google.com/group/asciidoc/browse_thread/thread/268f9b46ebc192d3
+- Removed Vim related stuff from the installer makefile. See:
+  https://groups.google.com/group/asciidoc/browse_thread/thread/753a52b2af85fcfc/04c9091b0856fc13
+  and
+  https://groups.google.com/group/asciidoc/browse_thread/thread/cd07629fa7a53fb3
+- Dropped `vim/ftdetect/asciidoc_filetype.vim` from distribution, the
+  file detection  was broken and the default settings satisfied noone.
+- Vim syntax highlighter: increase sync backtracking to catch changes
+  to large block elements.
+- Added Romanian language configuration file. Contributed by Vitalie
+  Lazu.  See
+  https://groups.google.com/group/asciidoc/browse_thread/thread/2fe14a10dbf20d20/27726e7e13f7bfc7?lnk=gst&q=romanian#27726e7e13f7bfc7
+- Added ruler and line-break outputs to HTML Help outputs. Patch
+  submitted by DonM.  See
+  https://groups.google.com/group/asciidoc/browse_thread/thread/b131d0155eccd73e
+- Added Czech language configuration file. Contributed by Petr Klíma.
+- html4 backend: allow embedded images and icons (data-uri
+  attribute).
+- html4 backend: table and example block caption place at bottom for
+  consistency.
+- html4 backend: dropped border around example block.
+- html4 backend: cellpaddings made equal to 4 for consistency.
+- Vim syntax highligher: Highlight closing OpenBlock delimiter when it
+  immediately follows a list.
+- Updated html5 backend (previous commit was xhtml11 only). See:
+  https://groups.google.com/group/asciidoc/browse_thread/thread/dbdfaf838f93e020
+- Embedded data-uri images now figure file mimetype from file contents
+  rather than the file extension. Patch submitted by Lex Trotman. See:
+  https://groups.google.com/group/asciidoc/browse_thread/thread/dbdfaf838f93e020
+
+.Bug fixes
+- `indexterm2:[]` macro syntax now recognized. See
+  https://groups.google.com/group/asciidoc/browse_thread/thread/1b3f1a0f0a21425e
+- Synthesised `*-option` attributes for options set in table conf file
+  style entries. See
+  https://groups.google.com/group/asciidoc/browse_thread/thread/8aa340a3069ef5f1/a727a8a564eea76c
+- Makefile: Fixed sh compatibility issue. See
+  https://groups.google.com/group/asciidoc/browse_thread/thread/753a52b2af85fcfc/04c9091b0856fc13
+
+
 Version 8.6.8 (2012-07-17)
 --------------------------
 .Release highlights
@@ -1561,7 +1637,7 @@
   reflect these changes.
 - Highlighted source code paragraphs have been implemented -- it's a
   much more convenient way to enter short code examples (see
-  http://www.methods.co.nz/asciidoc/source-highlight-filter.html[the
+  http://asciidoc.org/source-highlight-filter.html[the
   online docs]).
 - The source highlighter and music filter syntax has changed -- they
   now used the ListingBlock syntax customized with 'source' and
@@ -1688,7 +1764,7 @@
 .Additions and changes
 - Added VMiklos's 'permalink' patch for auto-generated section IDs
   (enabled by default by the `sectids` attribute).
-- Added http://www.methods.co.nz/asciidoc/faq.html[FAQ] to website.
+- Added http://asciidoc.org/faq.html[FAQ] to website.
 - Changed format of \{localdate} attribute to ISO 8601 (`%Y-%m-%d`).
 - Added `abc2ly --beams=None` option to make `music2png.py` conform to
   ABC's notion of beams.
@@ -1723,7 +1799,7 @@
 - http://www.maths.nottingham.ac.uk/personal/drw/lm.html[LaTeXMathML]
   capability has been added for users who are more familiar with or
   prefer LaTeX math formulas to the
-  http://www.methods.co.nz/asciidoc/asciimathml.html[ASCIIMathML]
+  http://asciidoc.org/asciimathml.html[ASCIIMathML]
   notation (thanks to Arthur Sakellariou for the patch).
 - The 'source highlight' and 'code' filters now process embedded
   callouts.
@@ -1814,7 +1890,7 @@
   `manpage` if `--format=manpage` else defaults to `article`
   (previously `--doctype` always defaulted to `article`).
 - Added an 'External Resources' section to the
-  http://www.methods.co.nz/asciidoc/index.html[AsciiDoc home page].
+  http://asciidoc.org/index.html[AsciiDoc home page].
 
 .Bug fixes
 
@@ -1830,7 +1906,7 @@
   http://tpl.sourceforge.net/userguide.html[tpl User Guide] for a
   fancier layout. Use the `-a toc -a numbered` command-line options to
   produce a number table of contents.
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/sciviews -r 553


More information about the Sciviews-commits mailing list