Documentation page

16 Jul 2015

WIRIS quizzes admits the possibility to add parameters to question algorithms. This may be useful if we want to do several questions about the same mathematical expression, if we want to chain some questions (in the sense that some output from a question is used in the algorithm of the following one) or other uses. It is also useful to translate strings in the algorithm and therefore have a multilanguage question.

This feature is available through the WIRIS quizzes generic integration library. Therefore the author will be able to use this feature only if the platform integration provides a way to do it. And the way it must be used will heavily depend on the integration.

Parameters must be defined in algorithms using the keyword parameter.

For example:

WIRIS CAS algorithm using parameters

Then, once instantiated the question, the platform integration may use the API function QuestionInstance.setParameter to overwrite the values of the parameters. The integration needs to manage where to store and find the actual parameter values for each question instance.

Following the same example, we could have the code in the platform integration:

...

QuizzesBuilder builder = QuizzesBuilder.getInstance();

Question question = ...

QuestionInstance instance = builder.newQuestionInstance(question);

instance.setParameter("p1", "<ms>Polinomio lineal</ms>");

instance.setParameter("p2", "<ms>Polinomio no lineal</ms>");

instance.setParameter("p3", "<mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow>");

...

When the algorithm evaluates, the values of the parameters defined in the algorithm will be overriden by the values specified by the integration. If some parameters are not specified, the values deined in the algorithm will be used.

25 May 2015

1.- Enable Uninstall mode

 Go to WIRIS filter - Maths settings and enable uninstall mode.

2.- Uninstall WIRIS filter 

Once uninstall mode has been enabled, WIRIS filter can be uninstalled from general filter settings.

3.- Uninstall WIRIS editor plugin

Go to editor settings (Atto or TinyMCE or both) and unistall WIRIS plugin. 

 

 

    15 May 2015

    WIRIS EDITOR for Java Swing is the specialized compilation of WIRIS EDITOR that targets Java Swing. With this Java component you can add to your appliation a full fledged formula (equation) editor for maths, physics and (inorganic) chemistry that works with the MathML standard. The usage is very similar to the JavaScript version

    WIRIS EDITOR for Java Swing comes also with an API that converts from/to LaTeX, generates images of the formulas in different formats (PNG, SVG) and is able to generate the textual representation of a formula used in accessibility. See editor services and library api.

    Follow this document to embed the WIRIS EDITOR in a Java Swing application.


    The actual look & feel is inherited from your swing application.

    The integration is made in two steps. The first step consists in displaying the editor itself and the second one in calling the editor API to set and retrieve the MathML.

    WIRIS editor as a modal dialog

    The easiest way to integrate WIRIS EDITOR is by displaying it as a modal window, outside the main application window.

    WIRIS EDITOR provides a method to open a dialog and retrieve the submitted MathML in an easy and fast way:

    String mathml = JavaEditorDialog.showDialog(window);
    
    if (mathml != null) {
            System.out.println("MathML: " + mathml);
    }
    else {
            System.out.println("Operation cancelled by the user");
    }
    

    This way also allows the inclusion of parameters:

    Properties p = new Properties();
    p.setProperty("language", "en");
    String mathml = JavaEditorDialog.showDialog(window, p);
    

    WIRIS EDITOR as plain component

    You can create a new Java Swing application and add the following main class:

    package com.wiris.javaEditor;
    
    import java.util.Properties;
    
    import javax.swing.JFrame;
    
    public class JavaEmbeddedExample {
        public static void main(String[] args) {
            Properties p = new Properties();
            p.setProperty("language", "en");
            JavaEditor editor = new JavaEditor(p);
    
            JFrame window = new JFrame();
            window.add(editor);
            window.pack();
            window.setVisible(true);
    
            System.out.println(editor.getMathML());
            editor.setMathML("<math><mfrac><mn>1</mn><mi>x</mi></mfrac></math>");
        }
    }
    

    In the above code, the variable editor will be used later to access the API.

    Calling the editor API to get the MathML:

    System.out.println(editor.getMathML());

    To set the MathML:

    editor.setMathML("<math><mfrac><mn>1</mn><mi>x</mi></mfrac></math>");

    Initialization parameters

    See the full table of the initialization parameters.

    Choosing the language

    In the previous example, we passed the following parameter

    p.setProperty("language", "en");

    which specifies to use English for the text in the user interface.

    Changing the toolbar

    The parameter 'toolbar' can be used to specify the icons of the toolbar. For example,

    p.setProperty("toolbar", "<toolbar ref=\"quizzes\"/>");

    tells the editor to use the simple toolbar used by the WQ tools. The definition of the toolbar is the XML fragment:

    <toolbar ref="quizzes"/>

    To learn how to specify the toolbar in detail visit custom toolbar.

    Changing the styles

    It is possible to define the default styles of the editor. For example, you can change the font size, font family, color and background color.

    p.setProperty("backgroundColor", "#008060");
    p.setProperty("color", "#ffffff");
    p.setProperty("fontSize", "32px");
    p.setProperty("fontFamily", "Times New Roman");
    
    
    10 Apr 2015

    DOWNLOAD
    1 Requirements

    Typo 6.x Installed
    A valid license to install the plugin in a production environment; otherwise, you can use the downloaded file just for demo purposes.
    Typo 6.x Installed
    A valid license to install the plugin in a production environment; otherwise, you can use the downloaded file just for demo purposes.
    Typo 6.x Installed
    A valid license to install the plugin in a production environment; otherwise, you can use the downloaded file just for demo purposes.
    Typo 6.x Installed
    A valid license to install the plugin in a production environment; otherwise, you can use the downloaded file just for demo purposes.
    Typo 6.x Installed
    A valid license to install the plugin in a production environment; otherwise, you can use the downloaded file just for demo purposes.
    • Typo 6.x Installed
    • A valid license to install the plugin in a production environment; otherwise, you can use the downloaded file just for demo purposes.

    2 Copy files

    1. Unzip Wiris plugin for Typo3 on typo3conf/ext directory
    2. Activate Wiris plugin for Typo3 in your Typo3 extension manager.
    3. Give write permissions to permissions to /typo3conf/ext/wiris_plugin/htmlarea/plugins/WirisPlugin/formulas and /typo3conf/ext/wiris_plugin/htmlarea/plugins/WirisPlugin/cache directories to the web server. 

    3  Page TSconfig

    1. Add wiris button to RTE toolbar: RTE.default.showButtons := addToList(wirisplugin)
    2. Add MathML specification to allowed tags: 
    RTE.default.proc {
     
    allowTags := addToList(math,menclose,merror,
    mfenced,mfrac,mglyph,
    mi,mlabeledtr,mmultiscripts,
    mn,mo,mover,
    mpadded,mphantom,mroot,
    mrow,ms,mspace,msqrt,
    mstyle,msub,msubsup,
    msup,mtable,mtd,
    mtext,mtr,munder,
    munderover,semantics,maction, annotation)
     
    allowTagsInTypolists := addToList(math,menclose,merror,
    mfenced,mfrac,mglyph,
    mi,mlabeledtr,mmultiscripts,
    mn,mo,mover,
    mpadded,mphantom,mroot,
    mrow,ms,mspace,msqrt,
    mstyle,msub,msubsup,
    msup,mtable,mtd,
    mtext,mtr,munder,
    munderover,semantics,maction, annotation)
     
    allowTagsOutside := addToList(math,menclose,merror,
    mfenced,mfrac,mglyph,
    mi,mlabeledtr,mmultiscripts,
    mn,mo,mover,
    mpadded,mphantom,mroot,
    mrow,ms,mspace,msqrt,
    mstyle,msub,msubsup,
    msup,mtable,mtd,
    mtext,mtr,munder,
    munderover,semantics,maction, annotation)
     
    removeTags := removeFromList(math,menclose,merror,
    mfenced,mfrac,mglyph,
    mi,mlabeledtr,mmultiscripts,
    mn,mo,mover,
    mpadded,mphantom,mroot,
    mrow,ms,mspace,msqrt,
    mstyle,msub,msubsup,
    msup,mtable,mtd,
    mtext,mtr,munder,
    munderover,semantics,maction, annotation)
     
    entryHTMLparser_db.htmlSpecialChars = -1
    entryHTMLparser_db.allowTags < RTE.default.proc.allowTags
     
    }
     

    3  Template configuration 

    Include WIRISplugins.js into frontend pages: 
     
     
    page.includeJSlibs {    
        wirispluginengine = typo3conf/ext/wiris_plugin/htmlarea/plugins/WirisPlugin/integration/WIRISplugins.js?viewer=image
        wirispluginengine.external = 1
        wirispluginengine.disableCompression = 1
        wirispluginengine.excludeFromConcatenation = 1
        wirispluginengine.forceOnTop = 1
    }
    1. Include WIRISplugins.js
    page.includeJSlibs {    
        wirispluginengine = typo3conf/ext/wiris_plugin/htmlarea/plugins/WirisPlugin/integration/WIRISplugins.js?viewer=image
        wirispluginengine.external = 1
        wirispluginengine.disableCompression = 1
        wirispluginengine.excludeFromConcatenation = 1
        wirispluginengine.forceOnTop = 1
    }