diff --git a/documentation/doxygen/converttonotebook.py b/documentation/doxygen/converttonotebook.py
index 44ed22d31b91b42b82eeb99e93429885efce7c8c..42fe16804ea49541f1e55d9c9260f923fc70ee3e 100644
--- a/documentation/doxygen/converttonotebook.py
+++ b/documentation/doxygen/converttonotebook.py
@@ -44,6 +44,7 @@ from datetime import datetime, date
 
 starttime = time.time()
 
+
 #-------------------------------------
 #-------- Fuction definitions---------
 #-------------------------------------
@@ -71,11 +72,17 @@ def pythonheader(text):
     description=''
     author=''
     notebook=False
+    jsroot=False
+    nodraw=False
     for i, line in enumerate(lines):
         if line.startswith("## \\aut"):
             author = line[11:]
         elif line.startswith("## \\note"):
             notebook=True
+            if "-js" in line:
+                jsroot = True
+            if "-nodraw" in line:
+                nodrwa = True
         elif line.startswith("##"):
             if not line.startswith("## \\") and not line == "##":
                 description+=(line[3:]+ '\n')
@@ -85,7 +92,7 @@ def pythonheader(text):
     for j in lines[i:]:
         newtext += (j+"\n")
 
-    return newtext, description, author, notebook
+    return newtext, description, author, notebook, jsroot, nodraw
 
 def pythoncomments (text):
     """
@@ -119,11 +126,17 @@ def cppheader(text):
     description=''
     author=''
     notebook=False
+    jsroot = False
+    nodraw = False
     for i, line in enumerate(lines):
         if line.startswith("/// \\aut"):
             author = line[12:]
         if line.startswith("/// \\note"):
             notebook=True
+            if "-js" in line:
+                jsroot = True
+            if "-nodraw" in line:
+                nodraw = True
         if line.startswith("///"):
             if not line.startswith("/// \\") and not line == "///":
                 description+=(line[4:]+ '\n')
@@ -133,7 +146,7 @@ def cppheader(text):
     for j in lines[i:]:
         newtext += (j+"\n")
 
-    return newtext, description, author, notebook
+    return newtext, description, author, notebook, jsroot, nodraw
 
 def cppfunction(text):
     """
@@ -183,13 +196,13 @@ def split(text):
     """
     #p = re.compile(r'^void\s\w*?\s?\([\w\n=,*\_ ]*\)\s*\{.*?^\}|^int\s\w*?\s?\([\w\n=,*\_ ]*\)\s*\{.*?^\}|^string\s\w*?\s?\([\w\n=,*\_ ]*\)\s*\{.*?^\}|^double\s\w*?\s?\([\w\n=,*\_ ]*\)\s*\{.*?^\}|^float\s\w*?\s?\([\w\n=,*\_ ]*\)\s*\{.*?^\}|^char\s\w*?\s?\([\w\n=,*\_ ]*\)\s*\{.*?^\}|^TCanvas\s\*\w*\(.*?\).*?\{.*?^\}|^TString\s\w*?\s?\([\w\n=,*\_ ]*\)\s*\{.*?^\}|^Double_t\s\w*?\s?\([\w\n=,*\_ ]*\)\s*\{.*?^\}', flags = re.DOTALL | re.MULTILINE)
 
-    p = re.compile(r'(^void\s|^int\s|^string\s|^double\s|^float\s|^char\s|^TCanvas\s|^TString\s|^Double_t\s)\*?\w*?\s?\([^\)]*\)\s*\{.*?^\}', flags = re.DOTALL | re.MULTILINE)
+    p = re.compile(r'(^void|^int|^Int_t|^TF1|^string|^bool|^double|^float|^char|^TCanvas|^TString|^Double_t)\s?\*?\s?\w*?\s?\([^\)]*\)\s*\{.*?^\}', flags = re.DOTALL | re.MULTILINE)
     matches = p.finditer(text)
     helpers=[]
     main = ""
     for match in matches:
 
-        if name in match.group()[:match.group().find("\n")]:
+        if name in match.group()[:match.group().find("\n")]: #if name is in the first line
             main = match.group()
         else:
             helpers.append(match.group())
@@ -200,9 +213,27 @@ def split(text):
     for helper in helpers:
         rest = rest.replace(helper, "")
 
-    rest = rest.rstrip() #remove newlines at the end of string
+    newhelpers=[]
+    lines=text.splitlines()
+    for helper in helpers:
+        for i, line in enumerate(lines):
+            if line.startswith(helper[:helper.find("\n")]):
+                if lines[i-1].startswith("//"):
+                    helperdescription = lines[i-1][2:]
+                    rest = rest.replace(helperdescription, "")
+                    break
+                else:
+                    helperdescription = "A helper funciton is created:"
+                    break
+                
+               
+        if "main" not in helper[:helper.find("\n")]: #remove void main function
+            newhelpers.append("\n# <markdowncell>\n " + helperdescription + " \n# <codecell>\n%%cpp -d\n" + helper )
+    
 
-    return main, helpers, rest
+    rest = rest.rstrip() #remove newlines at the end of string
+    print  "MAIN \n\n\n" , main, "\n\n HELPERS\n\n\n", newhelpers, "\n\nREST\n\n\n",rest
+    return main, newhelpers, rest
 
 def processmain(text):
     """
@@ -215,14 +246,16 @@ def processmain(text):
     
     regex = re.compile(r'(?<=\().*?(?=\))',flags = re.DOTALL | re.MULTILINE)
     arguments = regex.search(text)
+    print "\n\nTEXT\n\n" , text , "ENDTEXT"
     if text: 
         if text.startswith("TCanvas") or len(arguments.group())>3: 
             keepfunction = True
-            p = re.compile(r'(?<=(?<=int\s)|(?<=void\s)|(?<=string\s)|(?<=double\s)|(?<=float\s)|(?<=char\s)|(?<=TCanvas\s)).*?(?=\s?\()',flags = re.DOTALL | re.MULTILINE)
+            p = re.compile(r'(?<=(?<=int)|(?<=void)|(?<=TF1)|(?<=Int_t)|(?<=string)|(?<=double)|(?<=float)|(?<=char)|(?<=TString)|(?<=bool)|(?<=TCanvas))\s?\*?\s?[^\s]*?(?=\s?\()',flags = re.DOTALL | re.MULTILINE)
 
             match = p.search(text)
-            functionname=match.group()
-            addition = "\n# <markdowncell> \n# Call the main function \n# <codecell>\n%s()" %functionname
+            functionname=match.group().strip(" *")
+            print "FUCNITONNAME", functionname
+            addition = "\n# <markdowncell> \n# Call the main function \n# <codecell>\n%s();" %functionname
         
     return text, addition, keepfunction 
 
@@ -251,6 +284,8 @@ filename = os.path.basename(pathname)
 path = pathname.replace(filename, "")
 name,extension = filename.split(".")
 outname= filename + ".ipynb"
+outnameconverted= filename + ".nbconvert.ipynb"
+
 
 #print pathname, "**" , filename,"**" ,  name, "**" , extension,"**" ,  outname , pathname.replace(filename, "")
 ## Extract output directory
@@ -273,10 +308,10 @@ with open(pathname) as fpin:
 
 ## Extract information from header and remove header from text
 if extension == "py":
-    text, description, author, notebook = pythonheader(text)
+    text, description, author, notebook, jsroot, nodraw = pythonheader(text)
 
 elif extension in ("C", "c", "cpp", "C++", "cxx"):
-    text, description, author, notebook = cppheader(text)
+    text, description, author, notebook, jsroot, nodraw = cppheader(text)
 
 
 def mainfunction(text):
@@ -304,11 +339,12 @@ def mainfunction(text):
             text = rest
         
         for helper in helpers:
-            text+= "\n# <markdowncell>\n A helper function is created: \n# <codecell>\n%%cpp -d\n"
             text+=helper
-        text+="\n# <codecell>\n"
+
         if keepfunction:
-            text+="%%cpp -d\n"
+            text+="\n# <markdowncell>\n# The main function is defined\n# <codecell>\n%%cpp -d\n"
+        else:
+            text+="\n# <codecell>\n"
         text+=main
         if addition:
             text+=addition
@@ -316,15 +352,21 @@ def mainfunction(text):
         text = pythoncomments(text) # Convert comments into Markdown cells
 
     ## Add the title and header of the notebook    
-    text= "# <markdowncell> \n# # %s\n# %s# \n# This notebook tutorial was automatically generated from the macro found\
-     in the ROOT repository on %s.\n# **Author:** %s \n# <codecell>\n%s" % (name.title(), description, date, author, text)
+    text= "# <markdowncell> \n# # %s\n# %s# \n# \n# **Author:** %s  \n# <small>This notebook tutorial was automatically generated from the macro found " \
+    "in the ROOT repository on %s.</small>\n# <codecell>\n%s" % (name.title(), description, author, date, text)
 
     ## Add cell at the end of the notebook that draws all the canveses. Add a Markdown cell before explaining it.
-    if extension == ("C" or "c" or "cpp" or "c++"):
-        text +="\n# <markdowncell> \n# Draw all canvases \n# <codecell>\ngROOT->GetListOfCanvases()->Draw()"
-    if extension == "py":
-        text +="\n# <markdowncell> \n# Draw all canvases \n# <codecell>\nfrom ROOT import gROOT \ngROOT.GetListOfCanvases().Draw()"
-
+    if jsroot:
+        if extension == ("C" or "c" or "cpp" or "c++"):
+            text +="\n# <markdowncell> \n# Draw all canvases \n# <codecell>\n%jsroot\ngROOT->GetListOfCanvases()->Draw()"
+        if extension == "py":
+            text +="\n# <markdowncell> \n# Draw all canvases \n# <codecell>\n%jsroot\nfrom ROOT import gROOT \ngROOT.GetListOfCanvases().Draw()"
+    
+    elif not nodraw:
+        if extension == ("C" or "c" or "cpp" or "c++"):
+            text +="\n# <markdowncell> \n# Draw all canvases \n# <codecell>\ngROOT->GetListOfCanvases()->Draw()"
+        if extension == "py":
+            text +="\n# <markdowncell> \n# Draw all canvases \n# <codecell>\nfrom ROOT import gROOT \ngROOT.GetListOfCanvases().Draw()"
     ## Create a notebook from the working text
     nbook = v3.reads_py(text)  
     nbook = v4.upgrade(nbook)  # Upgrade v3 to v4
@@ -376,6 +418,8 @@ def mainfunction(text):
     print time.time() - starttime
     #subprocess.call(["jupyter", "nbconvert","--ExecutePreprocessor.timeout=60", "--to=html", "--execute",  outdir+outname])
     subprocess.call(["jupyter", "nbconvert","--ExecutePreprocessor.timeout=60",  "--to=notebook", "--execute",  outdir+outname])
+    if jsroot:
+        subprocess.call(["jupyter", "trust",  outdir+outnameconverted])
     os.remove(outdir+outname)
 
 ## Set DYLD_LIBRARY_PATH. When run without root access or as a different user, epecially from Mac systems,
diff --git a/documentation/doxygen/notebook.gif b/documentation/doxygen/notebook.gif
index 5817aea256d2224ddea85d788320e5bdff3f4069..a975df6756eb3484fd760d64323d6f6ff6ad1ea4 100644
Binary files a/documentation/doxygen/notebook.gif and b/documentation/doxygen/notebook.gif differ
diff --git a/tutorials/fit/FittingDemo.C b/tutorials/fit/FittingDemo.C
index e97f99dcdc45d36031ac67d7e8191c387df224de..53086e1be30cb08e6439ee76dcaec1d9f0a08c4f 100644
--- a/tutorials/fit/FittingDemo.C
+++ b/tutorials/fit/FittingDemo.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -js
 /// Example for fitting signal/background.
 /// This example can be executed with:
 ///
diff --git a/tutorials/fit/Ifit.C b/tutorials/fit/Ifit.C
index a29605f5518f757dfa723eeb9d20340ac9c45c92..c518d0de073170ae30f4817a10a8343a64e1980f 100644
--- a/tutorials/fit/Ifit.C
+++ b/tutorials/fit/Ifit.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -nodraw
 ///   Example of a program to fit non-equidistant data points
 ///
 ///   The fitting function fcn is a simple chisquare function
diff --git a/tutorials/fit/NumericalMinimization.C b/tutorials/fit/NumericalMinimization.C
index 8f1e16cec76ab26040066b34ec59f1f9b65d3b4c..2fdd58d2e76d630b7805e01316c71b2c1397c074 100644
--- a/tutorials/fit/NumericalMinimization.C
+++ b/tutorials/fit/NumericalMinimization.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -nodraw
 /// Example on how to use the new Minimizer class in ROOT
 ///  Show usage with all the possible minimizers.
 /// Minimize the Rosenbrock function (a 2D -function)
diff --git a/tutorials/fit/TestBinomial.C b/tutorials/fit/TestBinomial.C
index 334cf4316df043a25c4a264881fc001a6c467e65..854ff312831ef1b3d5dfdd1e996bf892f9c38e2b 100644
--- a/tutorials/fit/TestBinomial.C
+++ b/tutorials/fit/TestBinomial.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -js
 /// Perform a fit to a set of data with binomial errors
 /// like those derived from the division of two histograms.
 /// Three different fits are performed and compared:
diff --git a/tutorials/fit/TwoHistoFit2D.C b/tutorials/fit/TwoHistoFit2D.C
index b068c30ab0db751e07d6e05a9742d94759592d3b..1022179da846aab210fc584cb07e69a904689570 100644
--- a/tutorials/fit/TwoHistoFit2D.C
+++ b/tutorials/fit/TwoHistoFit2D.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook
 /// Example to fit two histograms at the same time.
 ///
 /// \macro_image
diff --git a/tutorials/fit/combinedFit.C b/tutorials/fit/combinedFit.C
index 04e939d09f9cfb84cc54fbfc054a632267f48137..81fd3d13385687efd7e3da9cb2c054ec03e1af12 100644
--- a/tutorials/fit/combinedFit.C
+++ b/tutorials/fit/combinedFit.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook
 /// Combined (simultaneous) fit of two histogram with separate functions
 /// and some common parameters
 ///
@@ -39,6 +40,8 @@ int iparSB[5] = { 1, // exp amplitude in S+B histo
                   5  // gaussian sigma
 };
 
+// Create the GlobalCHi2 structure
+
 struct GlobalChi2 {
    GlobalChi2(  ROOT::Math::IMultiGenFunction & f1,
                 ROOT::Math::IMultiGenFunction & f2) :
diff --git a/tutorials/fit/exampleFit3D.C b/tutorials/fit/exampleFit3D.C
index 0923b33d1082d5ebd2dfd228e0b7702724786d72..5bdb71407e2bcbab5fa6ccde3fcf4bd9413029bf 100644
--- a/tutorials/fit/exampleFit3D.C
+++ b/tutorials/fit/exampleFit3D.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -nodraw
 /// example of fitting a 3D function
 /// Typical multidimensional parametric regression where the predictor
 /// depends on 3 variables
diff --git a/tutorials/fit/fit2.C b/tutorials/fit/fit2.C
index 033aa742061e5bd1365a96ca93a361123bd8ccf7..f423d144e3ced16ab77dd98fa440b6119d8d7fbf 100644
--- a/tutorials/fit/fit2.C
+++ b/tutorials/fit/fit2.C
@@ -1,6 +1,7 @@
 /// \file
 /// \ingroup tutorial_fit
 /// Fitting a 2-D histogram
+/// \notebook
 /// This tutorial illustrates :
 ///  - how to create a 2-d function
 ///  - fill a 2-d histogram randomly from this function
diff --git a/tutorials/fit/fit2a.C b/tutorials/fit/fit2a.C
index f63d415bfef8fc34f070be4149947d09ea7d9249..a3e00a1f8f7964a65cd9469fae0633ce52353b40 100644
--- a/tutorials/fit/fit2a.C
+++ b/tutorials/fit/fit2a.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook
 /// Fitting a 2-D histogram (a variant)
 /// This tutorial illustrates :
 ///  - how to create a 2-d function
diff --git a/tutorials/fit/fit2d.C b/tutorials/fit/fit2d.C
index 7a6949d0237424888a6296e05abc7233475a330d..29c9656faeee6703ba5eb88f155c6f227a945909 100644
--- a/tutorials/fit/fit2d.C
+++ b/tutorials/fit/fit2d.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -js
 /// Example illustrating how to fit a 2-d histogram of type y=f(x)
 ///
 /// \macro_image
diff --git a/tutorials/fit/fit2dHist.C b/tutorials/fit/fit2dHist.C
index 12c0f1b9df4454dceba08a725c0e9cecc40a58ad..a1ffa5bc26073e64c2d2395ae26d6a83706b07bf 100644
--- a/tutorials/fit/fit2dHist.C
+++ b/tutorials/fit/fit2dHist.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -js
 ///
 /// Example to fit two histograms at the same time via TVirtualFitter
 ///
diff --git a/tutorials/fit/fitCircle.C b/tutorials/fit/fitCircle.C
index 1af820beb5ad62e5fb7364215583a7058b47d3ad..4b99a16bd172a33d56efa8a10571162859d2c886 100644
--- a/tutorials/fit/fitCircle.C
+++ b/tutorials/fit/fitCircle.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook
 /// Generate points distributed with some errors around a circle
 /// Fit a circle through the points and draw
 /// To run the script, do, eg
diff --git a/tutorials/fit/fitConvolution.C b/tutorials/fit/fitConvolution.C
index 8398a92342111d4a0f54cb35dc278277b3187bc5..5cef78693808788a846a0b4e17d67cbe2136bccf 100644
--- a/tutorials/fit/fitConvolution.C
+++ b/tutorials/fit/fitConvolution.C
@@ -1,12 +1,13 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -js
 /// Tutorial for convolution of two functions
 ///
 /// \macro_image
 /// \macro_output
 /// \macro_code
 ///
-/// \author Aur茅lie Flandi
+/// \author Aurelie Flandi
 
 #include <stdio.h>
 #include <TMath.h>
diff --git a/tutorials/fit/fitExclude.C b/tutorials/fit/fitExclude.C
index 4024168135e4293764203d25579580163ee3cee2..a606615b3de65cc27bcc5a95aeefcfdd2a66483b 100644
--- a/tutorials/fit/fitExclude.C
+++ b/tutorials/fit/fitExclude.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -js
 /// Illustrates how to fit excluding points in a given range.
 ///
 /// \macro_image
diff --git a/tutorials/fit/fitLinear.C b/tutorials/fit/fitLinear.C
index f417431ab9c1bbd542d27b3b675f1e56fbcdc78f..c62288f33579b17eda900721a1f8194ff595303f 100644
--- a/tutorials/fit/fitLinear.C
+++ b/tutorials/fit/fitLinear.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -js
 /// Example of fitting with a linear function, using TLinearFitter
 /// This example is for a TGraphErrors, but it can also be used
 /// when fitting a histogram, a TGraph2D or a TMultiGraph
diff --git a/tutorials/fit/fitLinear2.C b/tutorials/fit/fitLinear2.C
index 40b419d4c1a6286fb0cf260bf89e40fcab79a92a..a4b89f151537f81900aed3d7f5530de0a861e455 100644
--- a/tutorials/fit/fitLinear2.C
+++ b/tutorials/fit/fitLinear2.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -nodraw
 /// Fit a 5d hyperplane by n points, using the linear fitter directly
 ///
 /// This macro shows some features of the TLinearFitter class
diff --git a/tutorials/fit/fitLinearRobust.C b/tutorials/fit/fitLinearRobust.C
index 87841a81c7bfcbd44db910683c16230646893bae..1591d2b344f7da68edf950eaacd7ea7c5de57ba1 100644
--- a/tutorials/fit/fitLinearRobust.C
+++ b/tutorials/fit/fitLinearRobust.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -js
 /// This tutorial shows how the least trimmed squares regression,
 /// included in the TLinearFitter class, can be used for fitting
 /// in cases when the data contains outliers.
diff --git a/tutorials/fit/fitMultiGraph.C b/tutorials/fit/fitMultiGraph.C
index 70de29c30aebdcefc524d656427dc7cd1cf01627..7c7cdabd04c59739afebc215f33eb5bf41c90d4b 100644
--- a/tutorials/fit/fitMultiGraph.C
+++ b/tutorials/fit/fitMultiGraph.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -js
 /// fitting a parabola to a multigraph of 3 partly overlapping graphs
 /// with different errors
 ///
diff --git a/tutorials/fit/fitNormSum.C b/tutorials/fit/fitNormSum.C
index c5d7be0fea1d165c5d53548400076002c66fe687..8561aa1d273d7f9e8dea011c9c05f5ba5280cb70 100644
--- a/tutorials/fit/fitNormSum.C
+++ b/tutorials/fit/fitNormSum.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook
 /// Tutorial for normalized sum of two functions
 /// Here: a background exponential and a crystalball function
 /// Parameters can be set:
diff --git a/tutorials/fit/fithist.C b/tutorials/fit/fithist.C
index 55aba81ced715bdd575a56e9ad03453520378c34..e03af4c0743ec6749145250b5bdbb60004561457 100644
--- a/tutorials/fit/fithist.C
+++ b/tutorials/fit/fithist.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -js
 /// Example of fit where the model is histogram + function
 ///
 /// \macro_image
diff --git a/tutorials/fit/fitpanel_playback.C b/tutorials/fit/fitpanel_playback.C
index 3221b63fa3e5674c4ac8782797fc8a44fb579ff6..3dcb2e3b4db439fd36576ac0b333521037ccaa1c 100644
--- a/tutorials/fit/fitpanel_playback.C
+++ b/tutorials/fit/fitpanel_playback.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook
 /// This file will test all the transient frames (aka Dialog windows)
 /// displayed in the fitpanel, as the rest of the functionality is
 /// tried automatically with the UnitTest.C unit.
diff --git a/tutorials/fit/graph2dfit.C b/tutorials/fit/graph2dfit.C
index c7b257174d9da25cf9b6b6ee3757079f0848018c..bdec93e8b0ba3aed3ef8a422e54aa4428481c530 100644
--- a/tutorials/fit/graph2dfit.C
+++ b/tutorials/fit/graph2dfit.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook
 /// Fitting a TGraph2D
 ///
 /// \macro_image
diff --git a/tutorials/fit/langaus.C b/tutorials/fit/langaus.C
index 5865b5011135cab24d0b7d24a27ab9cd02fe4171..72d4cccb69b80880d5ecfaba68d688bbc9807601 100644
--- a/tutorials/fit/langaus.C
+++ b/tutorials/fit/langaus.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook
 /// Convoluted Landau and Gaussian Fitting Function
 ///         (using ROOT's Landau and Gauss functions)
 ///
diff --git a/tutorials/fit/minuit2FitBench.C b/tutorials/fit/minuit2FitBench.C
index 07c38c0b79eeca1d424292f6bdc62ce6ae8ce1ed..7d263da30ec65dd93c340e43cdcb1a06e7fbeb84 100644
--- a/tutorials/fit/minuit2FitBench.C
+++ b/tutorials/fit/minuit2FitBench.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook
 /// Fitting 1-D histograms with minuit2
 ///
 /// \macro_image
diff --git a/tutorials/fit/minuit2FitBench2D.C b/tutorials/fit/minuit2FitBench2D.C
index 17088d72e4fe5a0094310d714baffefc1e8d8af1..4986c4424beeb5c493db608a0a54ea1c919486a8 100644
--- a/tutorials/fit/minuit2FitBench2D.C
+++ b/tutorials/fit/minuit2FitBench2D.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -js
 ///
 /// \macro_image
 /// \macro_output
diff --git a/tutorials/fit/minuit2GausFit.C b/tutorials/fit/minuit2GausFit.C
index c049fff8874578404829db633e19756b9403d99d..6a865459dd2e01d04026c10e59b83855fefe35f8 100644
--- a/tutorials/fit/minuit2GausFit.C
+++ b/tutorials/fit/minuit2GausFit.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -js
 ///
 /// \macro_image
 /// \macro_output
diff --git a/tutorials/fit/multidimfit.C b/tutorials/fit/multidimfit.C
index 62d9c0c46ba0b195182684d87fe1271243f56655..9938e7aa9a33c5cae8d23cd2e093c30bf5d45094 100644
--- a/tutorials/fit/multidimfit.C
+++ b/tutorials/fit/multidimfit.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -nodraw
 /// Multi-Dimensional Parametrisation and Fitting
 ///
 /// \macro_output
@@ -64,7 +65,7 @@ int CompareResults(TMultiDimFit *fit, bool doFit)
   2.83819,
   -3.48855,
   -3.97612
-};
+  };
 
    // the right coefficients (after fit)
   double GoodCoeffs[] = {
@@ -89,7 +90,7 @@ int CompareResults(TMultiDimFit *fit, bool doFit)
      3.516,
      -4.111,
      -3.823,
-};
+  };
 
 // Good Powers
   int GoodPower[] = {
@@ -114,7 +115,7 @@ int CompareResults(TMultiDimFit *fit, bool doFit)
   1,  2,  2,  2,
   2,  1,  2,  2,
   2,  2,  2,  1
-};
+  };
 
   Int_t nc = fit->GetNCoefficients();
   Int_t nv = fit->GetNVariables();
diff --git a/tutorials/fit/multifit.C b/tutorials/fit/multifit.C
index 282738934df90dfa23f3e7699c39054f6f8b30c1..4c9273a5041c49f9cb34630725db0c5c92a21511 100644
--- a/tutorials/fit/multifit.C
+++ b/tutorials/fit/multifit.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -js
 ///  Fitting multiple functions to different ranges of a 1-D histogram
 ///      Example showing how to fit in a sub-range of an histogram
 ///  An histogram is created and filled with the bin contents and errors
diff --git a/tutorials/fit/qa2.C b/tutorials/fit/qa2.C
index a9a6515321faf83dba683236e35bee7982f617f4..b7ea141664a2659cc89d39f40a02f3a179135219 100644
--- a/tutorials/fit/qa2.C
+++ b/tutorials/fit/qa2.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_fit
+/// \notebook -js
 ///
 /// \macro_image
 /// \macro_output
diff --git a/tutorials/graphics/analyze.C b/tutorials/graphics/analyze.C
index ab111ef02ba18e119923e7eaad661d7fd8246d97..6adf2ab9fab91246efb0920974fcce46482215ed 100644
--- a/tutorials/graphics/analyze.C
+++ b/tutorials/graphics/analyze.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_graphics
-/// \notebook
+/// \notebook -js
 /// This macro produces the flowchart of TFormula::Analyze.
 ///
 /// \macro_image
diff --git a/tutorials/graphics/anim.C b/tutorials/graphics/anim.C
index efdaaedb81b449b6412ec8888e159ffc2b8779d7..8208fcdd2a964bfd2014d55673aaa98900df93f6 100644
--- a/tutorials/graphics/anim.C
+++ b/tutorials/graphics/anim.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_graphics
+/// \notebook
 /// Macro illustrating how to animate a picture using a Timer.
 ///
 /// \macro_code
diff --git a/tutorials/graphics/arrow.C b/tutorials/graphics/arrow.C
index f690f87f8b603d1445dec0a743f21021cb10c43d..e5790c301aa78ba5a0693172b4c6ef84882db1b8 100644
--- a/tutorials/graphics/arrow.C
+++ b/tutorials/graphics/arrow.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_graphics
-/// \notebook
+/// \notebook -js
 /// Draw arrows.
 ///
 /// \macro_image
diff --git a/tutorials/graphics/canvas.C b/tutorials/graphics/canvas.C
index 6dd4b348deddcd6c1e33e66bfb81cdc7ed2ff118..5308661aa19b92b71a14f86890068642cdbd19a1 100644
--- a/tutorials/graphics/canvas.C
+++ b/tutorials/graphics/canvas.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_graphics
-/// \notebook
+/// \notebook -js
 /// Example of primitives in a canvas.
 /// One of the first actions in a ROOT session is the creation of a Canvas.
 /// Here we create a Canvas named "c1".
diff --git a/tutorials/graphics/compile.C b/tutorials/graphics/compile.C
index 8ece69ebad95f691d9f70927e218572df323149d..683f7cf3f93f718e532c6c0024c2edb1ab348a2a 100644
--- a/tutorials/graphics/compile.C
+++ b/tutorials/graphics/compile.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_graphics
-/// \notebook
+/// \notebook -js
 /// This macro produces the flowchart of TFormula::Compile
 ///
 /// \macro_image
diff --git a/tutorials/graphics/ellipse.C b/tutorials/graphics/ellipse.C
index 3946512fd4f8a1bd41e1fa8e41fbc922b7f78f0b..a350e039b54ac2855a27962a49a1be87f63f20f6 100644
--- a/tutorials/graphics/ellipse.C
+++ b/tutorials/graphics/ellipse.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_graphics
-/// \notebook
+/// \notebook -js
 /// Draw ellipses.
 ///
 /// \macro_image
diff --git a/tutorials/graphics/eval.C b/tutorials/graphics/eval.C
index fdc1dbfc8d4a6c7d5684c450df830adf84de4337..4d65991c20ff182c80f73e9b5a8b2fb2c9dd1045 100644
--- a/tutorials/graphics/eval.C
+++ b/tutorials/graphics/eval.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_graphics
-/// \notebook
+/// \notebook -js
 /// This macro produces the flowchart of TFormula::Eval.
 ///
 /// \macro_image
diff --git a/tutorials/graphics/event.C b/tutorials/graphics/event.C
index 9058e5a19bf78d0df1cd84ba746607c4e94a95aa..6bb49c4889ed7e7c56ef53ed237dfe20f6c21980 100644
--- a/tutorials/graphics/event.C
+++ b/tutorials/graphics/event.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_graphics
-/// \notebook
+/// \notebook -js
 /// Illustrate some basic primitives.
 ///
 /// \macro_image
diff --git a/tutorials/graphics/first.C b/tutorials/graphics/first.C
index 480584ed2209bba3103cc1b34cc3ce556de7a4c0..df1ab9a42572db325f042328c2df7d09db12125f 100644
--- a/tutorials/graphics/first.C
+++ b/tutorials/graphics/first.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_graphics
-/// \notebook
+/// \notebook -js
 /// Show some basic primitives.
 ///
 /// \macro_image
diff --git a/tutorials/graphics/formula1.C b/tutorials/graphics/formula1.C
index f3a403142df78cae766703b8f5ef25d6db0f7594..453e321ad0d298c7573d8c0f735e8274da0a39a6 100644
--- a/tutorials/graphics/formula1.C
+++ b/tutorials/graphics/formula1.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_graphics
-/// \notebook
+/// \notebook -js
 /// Display interpreted functions.
 ///
 /// \macro_image
diff --git a/tutorials/graphics/gtime.C b/tutorials/graphics/gtime.C
index 4e880992875cc552870e39d672b1bd6a3c7ef2e4..5986b55979e18ce4fb978ed4774830b8a19c403a 100644
--- a/tutorials/graphics/gtime.C
+++ b/tutorials/graphics/gtime.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_graphics
+/// \notebook
 /// Example of a graph of data moving in time.
 /// Use the canvas "File/Quit" to exit from this example
 ///
diff --git a/tutorials/graphics/mandelbrot.C b/tutorials/graphics/mandelbrot.C
index 445d74d8837a7cfb8adafa1c35d3cbc58ef283d4..78ebee4b0d2a174ad38c529f4499e82ecfa9cf85 100644
--- a/tutorials/graphics/mandelbrot.C
+++ b/tutorials/graphics/mandelbrot.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_graphics
-/// \notebook
+/// \notebook -js
 /// Using TExec to handle keyboard events and TComplex to draw the Mandelbrot set.
 ///
 /// Pressing the keys 'z' and 'u' will zoom and unzoom the picture
diff --git a/tutorials/graphics/manyaxis.C b/tutorials/graphics/manyaxis.C
index a106a0367f5203c6f0cb91257931efe0a5d4c4b4..c9ffaa2176cdc4679d5d04fb48a7b62bc161bdf0 100644
--- a/tutorials/graphics/manyaxis.C
+++ b/tutorials/graphics/manyaxis.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_graphics
-/// \notebook
+/// \notebook -js
 /// Show several TGaxis formats.
 ///
 /// \macro_image
diff --git a/tutorials/graphics/psview.C b/tutorials/graphics/psview.C
index 3cd25dd1250538d7d44c16d46e8e1533276297ef..6e4c2f7b8edfafa6653e48c8dd1f7261f0d0ac45 100644
--- a/tutorials/graphics/psview.C
+++ b/tutorials/graphics/psview.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_graphics
+/// \notebook
 /// An example how to display PS, EPS, PDF files in canvas.
 /// To load a PS file in a TCanvas, the ghostscript program needs to be install.
 /// - On most unix systems it is installed by default.
diff --git a/tutorials/graphics/tmathtext.C b/tutorials/graphics/tmathtext.C
index 029f681815f4e82a1462fff3a445a025ae3ef663..cd66ddfb9bd55e8a9fee464e9249fa54ea73d228 100644
--- a/tutorials/graphics/tmathtext.C
+++ b/tutorials/graphics/tmathtext.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_graphics
+/// \notebook
 /// This macro draws various formula in a canvas.
 /// It also prints the canvas as a Postscript file using TMathText.
 ///
diff --git a/tutorials/hist/DynamicSlice.C b/tutorials/hist/DynamicSlice.C
index c90a6f5e8d7d05f652dd049409d2685c57e56edf..a4e008f1e91977993646347e23806dc8c9e60524 100644
--- a/tutorials/hist/DynamicSlice.C
+++ b/tutorials/hist/DynamicSlice.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_hist
-/// \notebook
+/// \notebook -js
 /// Show the slice of a TH2 following the mouse position.
 ///
 /// \macro_image
diff --git a/tutorials/hist/cernstaff.root b/tutorials/hist/cernstaff.root
new file mode 100644
index 0000000000000000000000000000000000000000..bfd064c78780db7e2270fbeb18cac77c68c2666d
Binary files /dev/null and b/tutorials/hist/cernstaff.root differ
diff --git a/tutorials/hist/cumulative.C b/tutorials/hist/cumulative.C
index 0e671d19384d37d79b9b0ef50012d278e490a0b2..18b9f13bde27e7f8bfac101e835c41830e18b721 100644
--- a/tutorials/hist/cumulative.C
+++ b/tutorials/hist/cumulative.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_hist
-/// \notebook
+/// \notebook -js
 /// Illustrate use of the TH1::GetCumulative method.
 ///
 /// \macro_image
diff --git a/tutorials/hist/exec1.C b/tutorials/hist/exec1.C
index 7446e0cbe18377494a00df954c56e706dabb318d..b0d80427b8322fac6ef61ac8d1221e3326a9fb4a 100644
--- a/tutorials/hist/exec1.C
+++ b/tutorials/hist/exec1.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_hist
+/// \notebook
 /// Echo object at mouse position.
 /// Example of macro called when a pad is redrawn
 /// one must create a TExec object in the following way
diff --git a/tutorials/hist/h1draw.C b/tutorials/hist/h1draw.C
index 2057792684039cfe335dffe97fb51c5e88e85169..1c7a430351863b82f0e0326c72222eb8c239a07d 100644
--- a/tutorials/hist/h1draw.C
+++ b/tutorials/hist/h1draw.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_hist
+/// \notebook
 /// 1-D histogram drawing options.
 /// We attach (or generate) the ROOT file in `$ROOTSYS/tutorials/hsimple.root`
 /// or `$PWD/hsimple.root`
diff --git a/tutorials/hist/hsum.C b/tutorials/hist/hsum.C
index 410df4c32a88016272285e9fd328054b8b21d56c..5d0f8b1d63b665471f18dda41c1c43e3f588fa3d 100644
--- a/tutorials/hist/hsum.C
+++ b/tutorials/hist/hsum.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_hist
-/// \notebook
+/// \notebook -js
 /// Histograms filled and drawn in a loop.
 /// Simple example illustrating how to use the C++ interpreter
 /// to fill histograms in a loop and show the graphics results
diff --git a/tutorials/hist/hsumTimer.C b/tutorials/hist/hsumTimer.C
index eb2f5f195f7126de360f367817d2dcbd3221d4ee..c0748c08dc03fe501dbe3b6b1e8a34e8c99b9447 100644
--- a/tutorials/hist/hsumTimer.C
+++ b/tutorials/hist/hsumTimer.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_hist
-/// \notebook
+/// \notebook -js
 /// Demo of Timers.
 ///
 /// Simple example illustrating how to use the C++ interpreter
diff --git a/tutorials/hist/rebin.C b/tutorials/hist/rebin.C
index faadd1c0d266ee198f5c9eea80766d6acc436e3e..d7b46194a1ba9826737c4e56840483721670d8a4 100644
--- a/tutorials/hist/rebin.C
+++ b/tutorials/hist/rebin.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_hist
-/// \notebook
+/// \notebook -js
 /// Rebin a variable bin-width histogram.
 ///
 /// This tutorial illustrates how to:
diff --git a/tutorials/hist/th2polyEurope.C b/tutorials/hist/th2polyEurope.C
index 47aa8979707c5e502d6a26c4486aa372693eddf5..acf8980f007b4f8dc27307288b2509fbbe3e87e7 100644
--- a/tutorials/hist/th2polyEurope.C
+++ b/tutorials/hist/th2polyEurope.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_hist
-/// \notebook
+/// \notebook -js
 /// This tutorial illustrates how to create an histogram with polygonal
 /// bins (TH2Poly), fill it and draw it. The initial data are stored
 /// in TMultiGraphs. They represent the european countries.
diff --git a/tutorials/hist/th2polyHoneycomb.C b/tutorials/hist/th2polyHoneycomb.C
index 45fc31eaa79e867813899d8dea37b9f1c5409960..1d58f486a2125e2c352069bdc366d06da62318c7 100644
--- a/tutorials/hist/th2polyHoneycomb.C
+++ b/tutorials/hist/th2polyHoneycomb.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_hist
+/// \notebook
 /// This tutorial illustrates how to create an histogram with hexagonal
 /// bins (TH2Poly), fill it and draw it using GL.
 ///
diff --git a/tutorials/hist/th2polyUSA.C b/tutorials/hist/th2polyUSA.C
index 84aa00ac0baa429060bdb2ea0ca53e55d6df1062..1086cd9b1b9753813bbb1360c0064f142d1ec950 100644
--- a/tutorials/hist/th2polyUSA.C
+++ b/tutorials/hist/th2polyUSA.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_hist
+/// \notebook
 /// This tutorial illustrates how to create an histogram with polygonal
 /// bins (TH2Poly), fill it and draw it using GL. The initial data are stored
 /// in TMultiGraphs. They represent the USA.