= Rich Abstract Submission = == Abstract == The proposal consists on improving Indico abstract editor to be able to accept [http://www.latex-project.org/ LaTeX] and [http://daringfireball.net/projects/markdown/ Markdown]/[http://www.mathjax.org/ MathJax] formulas to generate HTML and PDF compiled outputs. Using [https://code.google.com/p/pagedown/ PageDown editor] to translate the plain text from input to LaTeX documents ("book of abstracts") and HTML while live previewing the edition on a canvas. == Use Cases == Indico abstract editor is a plain text editor for physics to submit their paper abstracts and research documentation. For a better comprehension of how useful my features are, here are some use cases: * Joe just made an incredible discovery and he wants to submit an article about it. To do this, he's used to write down some topics on a blank sheet and then copy them to Indico abstract editor, where he can easily submit plain text combined with !MathJax formulas that will be interpreted by the editor. * Janet is looking for some research to complement her's, she knows there is a database where she can navigate between submitted abstracts from her fellow co-workers without opening and/or saving PDF documents into her computer. She can explore the abstracts directly from her browser of choice, viewing all the complex formulas that she's used to in LaTeX documents. * Higgs is a newbie using !MathJax formulas, but he needs to submit a quick article to Indico. He opens the editor and with the live preview feature he can anticipate the outcome of his paper, along with any syntax errors he may correct in real time as he types. * Jamie has over 10 papers submitted on Indico in HTML format and he has a presentation in 30 minutes; he needs to print out some copies to offer to his audience, so he logs into Indico, opens the HTML view of the paper and clicks on that blue button on the corner "Generate LaTeX document". In a few seconds he saves the generated document and prints it out; the presentation is a success! == Deliverables == [https://github.com/pedrogaudencio/indico Github branch] with Javascript script files to handle the canvas live preview and formula translation to show them on HTML, and Python classes/script files to manage LaTeX-to-PDF compiling and syntax error reporting/correction; also the document and article storing ("book of abstracts"). It will be primarily tested on several browsers on Linux, Mac and Windows to assure compatibility and accessibility. == Timeline == Milestone like schedule with concise objectives for each step. Here the plan: 1. Pre-GSoC: * analysis to current Indico source, familiarisation with the code and define exactly what needs to be changed and implemented; * also patch any existing bugs that might affect further development of the project and some general bug fixing so I get acquaintance with the base code. 2. Community Bonding Period: * read Indico documentation, learn its complexity and main behavior; * read !PageDown ([http://math.stackexchange.com/questions/ask Math StackExchange editor]) wiki and documentation, discuss integration issues with project mentors and evaluate the best ways to implement; 3. Week 1: * class structures, plot diagrams, and a general draw of the final interface workflow. 4. Week 2 to 3: * make the necessary changes to the Indico user interface; * design and implement the new interface elements. 5. Week 4 to 6: * implementation and integration of !PageDown Markdown converter into existing Indico editor, testing parser functionalities and evaluate security issues from possible "evil inputs"; * implement live preview on a canvas that shows acyclically the expected result; 6. Mid-term evaluations deadline: * by mid-term I expect to have Indico editor accepting !MathJax and LaTeX formulas and parsing them into HTML, also the live preview canvas up and running - it is probable that some bugs still exist, but I'll clean them up in the final weeks. 7. Week 7 to 8: * study, implementation and testing of the LaTeX documents generation algorithm. 8. Week 9 to 10: * integration of the LaTeX generator with the user interface. 9. Week 11 to 12: * Testing, correcting bugs and documentation. == Development == === 1. Integrating !PageDown Editor and !MathJax '''Abstract and Contribution Data Modification:''' Templates changed: `AbstractDataModification.tpl`, `ContributionDataModification.tpl`. As described in the [https://code.google.com/p/pagedown/wiki/PageDown#Markdown.Editor.js PageDown documentation], if there is more than one editor in the current page each panel has to have its unique `id`. So, we wrap the textarea inside the `
`, the respective buttons inside that with `
` - the `${ field.getId()` is a Mako function that asks for the field id (for instance, `f_content` and `f_summary`), providing an unique `id` to this div. Same thing for the `