itex Endpoint

Add a Rack Metal itex endpoint.
Add an itex tool to SVG-Edit.
Disable the foreignObject tool
(at least, for now) as it doesn't
currently play nice with the itex tool.
This commit is contained in:
Jacques Distler 2010-02-22 00:05:52 -06:00
parent 956d523a4a
commit 702b450fd9
6 changed files with 473 additions and 2 deletions

36
app/metal/itex.rb Normal file
View file

@ -0,0 +1,36 @@
# Allow the metal piece to run in isolation
require(File.dirname(__FILE__) + "/../../config/environment") unless defined?(Rails)
require 'stringsupport'
class Itex
def self.call(env)
if env["PATH_INFO"] =~ /^\/itex/
[200, {"Content-Type" => "application/xml"}, [response(env)]]
else
[404, {"Content-Type" => "text/html"}, ["Not Found"]]
end
end
private
def self.response(env)
@params = Rack::Request.new(env).params
tex = @params['tex'].purify
display = @params['display'] || 'inline'
filter = (display + '_filter').to_sym
estart = "<math xmlns='http://www.w3.org/1998/Math/MathML' display='inline'><merror><mtext>"
eend = "</mtext></merror></math>"
begin
require 'itextomml'
itex2mml_parser = Itex2MML::Parser.new
itex2mml_parser.send(filter, tex).to_utf8
rescue LoadError
estart + "Please install the itex2MML Ruby bindings." + eend
rescue Itex2MML::Error => e
estart + e.to_s + eend
rescue
estart + "Unknown Error" + eend
end
end
end

View file

@ -144,7 +144,7 @@ $(function() {
}, {
type: "input",
panel: "foreignObject_panel",
title: "Change foreignObject's height",
title: "Change the font-size of enclosed content",
id: "foreign_font_size",
label: "font-size",
size: 2,

View file

@ -0,0 +1,308 @@
/*
* ext-itex.js
*
* Licensed under the Apache License, Version 2
*
* Copyright(c) 2010 Jacques Distler
* Copyright(c) 2010 Alexis Deveria
*
*/
$(function() {
svgCanvas.addExtension("itex", function(S) {
var svgcontent = S.svgcontent,
addElem = S.addSvgElementFromJson,
selElems,
svgns = "http://www.w3.org/2000/svg",
xlinkns = "http://www.w3.org/1999/xlink",
xmlns = "http://www.w3.org/XML/1998/namespace",
xmlnsns = "http://www.w3.org/2000/xmlns/",
se_ns = "http://svg-edit.googlecode.com",
htmlns = "http://www.w3.org/1999/xhtml",
mathns = "http://www.w3.org/1998/Math/MathML",
editingitex = false,
svgdoc = S.svgroot.parentNode.ownerDocument,
started,
newFO;
var properlySourceSizeTextArea = function(){
// TODO: remove magic numbers here and get values from CSS
var height = $('#svg_source_container').height() - 80;
$('#svg_source_textarea').css('height', height);
};
function showPanel(on) {
var fc_rules = $('#fc_rules');
if(!fc_rules.length) {
fc_rules = $('<style id="fc_rules"><\/style>').appendTo('head');
}
fc_rules.text(!on?"":" #tool_topath { display: none !important; }");
$('#itex_panel').toggle(on);
}
function toggleSourceButtons(on) {
$('#tool_source_save, #tool_source_cancel').toggle(!on);
$('#itex_save, #itex_cancel').toggle(on);
}
function htmlEscape(string) {
return string.replace(/&/g, '&amp;').replace(/</g, '&lt;');
}
// Function: setItexString(string, url)
// This function sets the content of of the currently-selected foreignObject element,
// based on the itex contained in string.
//
// Parameters:
// string - The itex text.
// url - the url of the itex server to do the conversion
//
// Returns:
// This function returns false if the set was unsuccessful, true otherwise.
function setItexString(tex) {
var elt = selElems[0];
try {
math = svgdoc.createElementNS(mathns, 'math');
// make an AJAX request to the server, to get the MathML
$.get('../../itex', {'tex': tex, 'display': 'inline'}, function(data){
math.setAttributeNS(xmlnsns, 'xmlns', mathns);
math.setAttributeNS(xmlnsns, 'xmlns:xlink', xlinkns);
math.setAttribute('display', 'inline');
var semantics = document.createElementNS(mathns, 'semantics');
var annotation = document.createElementNS(mathns, 'annotation');
annotation.setAttribute('encoding', 'application/x-tex');
annotation.textContent = htmlEscape(tex);
var mrow = document.createElementNS(mathns, 'mrow');
var children = data.documentElement.childNodes;
while (children.length > 0) {
mrow.appendChild(children[0]);
}
semantics.appendChild(mrow);
semantics.appendChild(annotation);
math.appendChild(semantics);
});
S.sanitizeSvg(math);
elt.replaceChild(math, elt.firstChild);
S.call("changed", [elt]);
svgCanvas.clearSelection();
} catch(e) {
console.log(e);
return false;
}
return true;
};
function showItexEditor() {
var elt = selElems[0];
var annotation = jQuery('math > semantics > annotation', elt);
if (!annotation || editingitex) return;
editingitex = true;
toggleSourceButtons(true);
// elt.removeAttribute('fill');
var str = annotation.text();
$('#svg_source_textarea').val(str);
$('#svg_source_editor').fadeIn();
properlySourceSizeTextArea();
$('#svg_source_textarea').focus();
}
function setAttr(attr, val) {
svgCanvas.changeSelectedAttribute(attr, val);
S.call("changed", selElems);
}
return {
name: "itex",
svgicons: "extensions/itex-icons.xml",
buttons: [{
id: "tool_itex",
type: "mode",
title: "itex Tool",
events: {
'click': function() {
svgCanvas.setMode('itex')
}
}
},{
id: "edit_itex",
type: "context",
panel: "itex_panel",
title: "Edit TeX Content",
events: {
'click': function() {
showItexEditor();
}
}
}],
context_tools: [{
type: "input",
panel: "itex_panel",
title: "Change enclosing foreignObject's width",
id: "itex_width",
label: "w",
size: 3,
events: {
change: function() {
setAttr('width', this.value);
}
}
},{
type: "input",
panel: "itex_panel",
title: "Change enclosing foreignObject's height",
id: "itex_height",
label: "h",
events: {
change: function() {
setAttr('height', this.value);
}
}
}, {
type: "input",
panel: "itex_panel",
title: "Change font size",
id: "itex_font_size",
label: "font-size",
size: 2,
defval: 16,
events: {
change: function() {
setAttr('font-size', this.value);
}
}
}
],
callback: function() {
$('#itex_panel').hide();
var endChanges = function() {
$('#svg_source_editor').hide();
editingitex = false;
$('#svg_source_textarea').blur();
toggleSourceButtons(false);
}
// TODO: Needs to be done after orig icon loads
setTimeout(function() {
// Create source save/cancel buttons
var save = $('#tool_source_save').clone()
.hide().attr('id', 'itex_save').unbind()
.appendTo("#tool_source_back").click(function() {
if (!editingitex) return;
if (!setItexString($('#svg_source_textarea').val())) {
$.confirm("Errors found. Revert to original?", function(ok) {
if(!ok) return false;
endChanges();
});
} else {
endChanges();
}
// setSelectMode();
});
var cancel = $('#tool_source_cancel').clone()
.hide().attr('id', 'itex_cancel').unbind()
.appendTo("#tool_source_back").click(function() {
endChanges();
});
}, 3000);
},
mouseDown: function(opts) {
var e = opts.event;
if(svgCanvas.getMode() == "itex") {
started = true;
newFO = S.addSvgElementFromJson({
"element": "foreignObject",
"attr": {
"x": opts.start_x,
"y": opts.start_y,
"id": S.getNextId(),
"font-size": 16, //cur_text.font_size,
"width": "48",
"height": "20",
"style": "pointer-events:inherit"
}
});
var m = svgdoc.createElementNS(mathns, 'math');
m.setAttributeNS(xmlnsns, 'xmlns', mathns);
m.setAttribute('display', 'inline');
var semantics = svgdoc.createElementNS(mathns, 'semantics');
var mrow = svgdoc.createElementNS(mathns, 'mrow');
var mi = svgdoc.createElementNS(mathns, 'mi');
mi.setAttribute('mathvariant', 'normal');
mi.textContent = "\u03A6";
var mo = svgdoc.createElementNS(mathns, 'mo');
mo.textContent = "\u222A";
var mi2 = svgdoc.createElementNS(mathns, 'mi');
mi2.textContent = "\u2133";
var annotation = svgdoc.createElementNS(mathns, 'annotation');
annotation.setAttribute('encoding', 'application/x-tex');
annotation.textContent = "\\Phi \\union \\mathcal{M}";
mrow.appendChild(mi);
mrow.appendChild(mo);
mrow.appendChild(mi2);
semantics.appendChild(mrow);
semantics.appendChild(annotation);
m.appendChild(semantics);
newFO.appendChild(m);
return {
started: true
}
}
},
mouseUp: function(opts) {
var e = opts.event;
if(svgCanvas.getMode() == "itex" && started) {
var attrs = $(newFO).attr(["width", "height"]);
keep = (attrs.width != 0 || attrs.height != 0);
svgCanvas.addToSelection([newFO], true);
return {
keep: keep,
element: newFO
}
}
},
selectedChanged: function(opts) {
// Use this to update the current selected elements
selElems = opts.elems;
var i = selElems.length;
while(i--) {
var elem = selElems[i];
if(elem && elem.tagName == "foreignObject") {
if(opts.selectedElement && !opts.multiselected) {
$('#itex_font_size').val(elem.getAttribute("font-size"));
$('#itex_width').val(elem.getAttribute("width"));
$('#itex_height').val(elem.getAttribute("height"));
showPanel(true);
} else {
showPanel(false);
}
} else {
showPanel(false);
}
}
},
elementChanged: function(opts) {
var elem = opts.elems[0];
}
};
});
});

View file

@ -0,0 +1,125 @@
<svg xmlns="http://www.w3.org/2000/svg">
<g id="tool_itex">
<svg xmlns="http://www.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-0.3-0.7L59.4,36l-7.1,10.3
c-0.3,0.4-0.5,0.8-0.5,1.3c0,0.8,0.6,2,2.6,2.1v1.4c-1.1-0.1-4.2-0.1-5.5-0.1c-2.4,0-3,0-5,0.1v-1.4c4.3,0,5.9-2,6.7-3.2l8.1-11.8
l-9-13.3c-1-1.5-1.5-1.8-5.1-1.8v-1.4c1.2,0.1,4.5,0.1,5.9,0.1c1.4,0,5.2,0,6.3-0.1v1.4c-1.7,0-2.7,0.8-2.7,1.4
c0,0.2,0.2,0.6,0.3,0.8l6.5,9.6l5.8-8.4c0.3-0.4,0.5-0.7,0.5-1.2c0-0.8-0.6-2-2.6-2.1v-1.4c1.1,0.1,4.2,0.1,5.5,0.1
c2.4,0,3,0,5-0.1v1.4c-4.6,0-6,2.2-6.8,3.3l-6.6,9.6l10.3,15.4c1.1,1.7,2.3,1.7,5.1,1.7v1.4C75.8,51.1,72.4,51.1,71,51.1z"/>
</g>
</svg>
</g>
<g id="edit_itex">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-10 -10 100 100">
<g fill="#D1D3D4">
<path d="M25.1,30.8c-0.7-7.6-1.1-9.3-8.7-9.3c-0.9,0-2.3,0-2.7,0.1c-0.8,0.2-0.9,0.6-0.9,1.8V49
c0,1.6,0,2.3,4.7,2.3h1.7v1.4c-1.5-0.1-6.5-0.1-8.4-0.1s-6.8,0-8.4,0.1v-1.4h1.7C9,51.3,9,50.6,9,49V23.4c0-1.1,0-1.7-1-1.8
c-0.4-0.1-1.7-0.1-2.6-0.1c-7.6,0-8,1.7-8.7,9.3h-1.1l0.9-10.7h28.8l0.9,10.7H25.1z"/>
<path d="M48.1,63.4H21.4V62h1c3.5,0,3.6-0.5,3.6-2.3V34.4c0-1.8-0.1-2.3-3.6-2.3h-1v-1.4h26.1l1.2,10.7h-1.1
c-0.7-6.9-2.2-9.3-9.3-9.3h-6.4c-2.1,0-2.2,0.3-2.2,1.9v11.7h4.4c4.6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20" points="87.2,18.4 44.5,70.5 54.1,70.4 87.2,39.5 87.2,18.4"/>
<polyline opacity="0.4" fill="#231F20" points="87.2,18.3 44.4,70.5 49.7,70.4 83,39.2 87.2,29.9 87.2,18.4"/>
<path fill="#FFD761" d="M45.9,24.2l0.4,41.4l29.5-26.8c0,0-7.2-12.2-11.7-14.2C59.8,22.8,45.9,24.2,45.9,24.2z"/>
<path fill="#FEA01E" d="M87.4-8.3H61.9L46,24.4c0,0,14-1.6,18.1,0.4C68.3,26.8,76,39.3,76,39.3l11.4-23.6V-8.3z"/>
<path d="M45.3,55L45,66.8l11.3-8c0,0-3.8-3.3-5.3-3.8C49.6,54.5,45.3,55,45.3,55z"/>
<polyline fill="none" stroke="#231F20" stroke-width="2.3641" points="61.1,-8.5 45.9,24.2 45.4,68 76.6,39.2 87.2,15.5 "/>
</g>
</svg>
</g>
<g id="svg_eof"/>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -21,7 +21,8 @@
<script type="text/javascript" src="extensions/ext-closepath.js"></script>
<script type="text/javascript" src="extensions/ext-arrows.js"></script>
<script type="text/javascript" src="extensions/ext-connector.js"></script>
<script type="text/javascript" src="extensions/ext-foreignobject.js"></script>
<!--<script type="text/javascript" src="extensions/ext-foreignobject.js"></script>-->
<script type="text/javascript" src="extensions/ext-itex.js"></script>
<!-- Release version of script tags: >
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>

View file

@ -124,6 +124,7 @@ var isOpera = !!window.opera,
"use": ["class", "clip-path", "clip-rule", "fill", "fill-opacity", "fill-rule", "filter", "height", "id", "mask", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "style", "transform", "width", "x", "xlink:href", "y"],
// MathML Elements
"annotation": ["encoding"],
"annotation-xml": ["encoding"],
"maction": ["actiontype", "other", "selection"],
"math": ["class", "id", "display", "xmlns"],