Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
Run JEuclid "foprep" Command on macOS
How to Run JEuclid "foprep" Command on macOS?
✍: FYIcenter
"foprep" is a command provided in JEuclid 3.1.9 that allows you
to render MathML documents embedded in XSL-FO or XHTML files to SVG documents.
This helps XSL-FO processors or XHTML browsers that do not support MathML to view rendered math formulas as SVG documents.
You can follow these steps to run "foprep" command.
1. Create an XHTML document with a MathML document embedded inside and save it as JEuclid-MathML-Example-3-in-XHTML.xhtml.
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <html xmlns="http://www.w3.org/1999/xhtml"> <body> <h4>MathML Document Embedded Below:</h4> <math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"> <mrow> <mo>(</mo> <mtable> <mtr> <mtd columnalign="center"> <mrow> <mo>(</mo> <mtable> <mtr> <mtd columnalign="center"> <mi>a</mi> </mtd> <mtd columnalign="center"> <mi>b</mi> </mtd> </mtr> <mtr> <mtd columnalign="center"> <mi>c</mi> </mtd> <mtd columnalign="center"> <mi>d</mi> </mtd> </mtr> </mtable> <mo>)</mo> </mrow> </mtd> <mtd columnalign="center"> <mrow> <mo>(</mo> <mtable> <mtr> <mtd columnalign="center"> <mi>e</mi> </mtd> <mtd columnalign="center"> <mi>f</mi> </mtd> </mtr> <mtr> <mtd columnalign="center"> <mi>g</mi> </mtd> <mtd columnalign="center"> <mi>h</mi> </mtd> </mtr> </mtable> <mo>)</mo> </mrow> </mtd> </mtr> <mtr> <mtd columnalign="center"> <mn>0</mn> </mtd> <mtd columnalign="center"> <mrow> <mo>(</mo> <mtable> <mtr> <mtd columnalign="center"> <mi>i</mi> </mtd> <mtd columnalign="center"> <mi>j</mi> </mtd> </mtr> <mtr> <mtd columnalign="center"> <mi>k</mi> </mtd> <mtd columnalign="center"> <mi>l</mi> </mtd> </mtr> </mtable> <mo>)</mo> </mrow> </mtd> </mtr> </mtable> <mo>)</mo> </mrow> </math> </body> </html>
2. Run "foprep" command to replace embedded MathML documents with SVG documents.
fyicenter$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_341.jdk/Contents/Home fyicenter$ ~/Applications/jeuclid-3.1.9/bin/foprep \ -in JEuclid-MathML-Example-3-in-XHTML.xhtml -out output.xhtml
3. Review the generated file output.xhtml.
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <html xmlns="http://www.w3.org/1999/xhtml"> <body> <h4>MathML Document Embedded Below:</h4> <svg xmlns="http://www.w3.org/2000/svg" color-interpolation="auto" color-rendering="auto" contentScriptType="text/ecmascript" contentStyleType="text/css" fill="black" fill-opacity="1" font-family="'Dialog'" font-size="12" font-style="normal" font-weight="normal" height="59" image-rendering="auto" preserveAspectRatio="xMidYMid meet" shape-rendering="auto" stroke="black" stroke-dasharray="none" stroke-dashoffset="0" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="10" stroke-opacity="1" stroke-width="1" text-rendering="auto" version="1.0" width="68" zoomAndPan="magnify"> <!--Converted from MathML using JEuclid--> <defs id="genericDefs"/> <g><g color-interpolation="linearRGB" color-rendering="optimizeQuality" image-rendering="optimizeQuality" text-rendering="optimizeLegibility" transform="translate(-0.5508,46.4629) matrix(1,0,0,5.6552,0,0)"> <path d="M1.7695 -6.5918 Q2.5195 -7.5352 3.5391 -8.1094 L3.6504 -7.916 Q2.707 ... ... </g></g> </svg> </body> </html>
4. Open both JEuclid-MathML-Example-3-in-XHTML.xhtml and output.xhtml in a Web browser that supports MathML and SVG. The output shows that the output rendered by JEuclid is smaller with thinner strokes. But you can make it bigger by inserting a <mstyle fontsize="16"> container element.
⇐ Run JEuclid "mathviewer" Command on macOS
2025-04-29, ∼1189🔥, 0💬
Popular Posts:
JDK 11 jdk.jshell.jmod is the JMOD file for JDK 11 JShell tool, which can be invoked by the "jshell"...
JDK 11 jdk.jfr.jmod is the JMOD file for JDK 11 JFR module. JDK 11 JFR module compiled class files a...
Java Architecture for XML Binding (JAXB) is a Java API that allows Java developers to map Java class...
JDK 11 jdk.javadoc.jmod is the JMOD file for JDK 11 Java Document tool, which can be invoked by the ...
What Is commons-fileupload-1.3.3 .jar?commons-fileupload-1.3.3 .jaris the JAR file for Apache Common...