PageBox |
Presentation | FAQ | Reference | Customization | Runtime | Forms | Demo | Math | Verification | Downloads | Legal |
Advanced functions in Cuckoo
Element supportHorizontal ruleTo create a horizontal rule (<hr/>) in the HTML page, create an empty paragraph in Horizontal style like this: PreserveThe <pre> element preserves the text format. Within a <pre> element all characters are interpreted literally and retained in display, including multiple spaces, tabs, carriage returns and linefeeds. You can use two Word styles to create <pre> elements:
MathematicsCuckoo 0.0.5 and above support characters and styles used in Mathematics and Chemistry. It leverages on Word and browser capabilities. Mathematics and Greek support in Word 97/2000Subscript and SuperscriptIn Mathematics you often need to write things such as x2. In Chemistry you often need to write things such as H2O. Cuckoo leverages on Word Superscript and Subscript to display smaller characters above or below the normal characters. If you don't yet have configured Word with Superscript and Subscript here is how to do it. Open up the Tools... Customize menu and choose the All Commands category:
Scroll down to find the Subscript and Superscript options. Then click the desired option and drag it on the toolbar. Your toolbar should now contain x2 and x2:
Now if you want to write x2 type x as usual, click on x2 button, type 2 and click again on x2 to revert to normal mode. Note: Normally you don't need to configure Word because Subscript and Superscript are already saved in cuckoo.dot. Equation EditorThe Equation Editor comes with Microsoft Office or Works (including OEM editions). However it is not installed under a standard installation. Therefore you need to retrieve your installation CDROM and do a custom installation. Once the Equation Editor is installed, just follow the same procedure as for Superscript and Subscript:
You can learn how to use the Equation Editor on spot.pcc.edu/academ/math/faculty/simonds/handouts/equation/ and on www.rdg.ac.uk/SerDepts/su/Topic/WordProc/WoP2Kequ01/. When Cuckoo finds an Equation in the document it generates a small .gif image and a <img> element. SymbolsA Font named Symbol supports Mathematical symbols and Greek characters in Word. If you type 'a' with the Symbol font a a is displayed. The Symbol font is the same as the Symbol font of browsers. You can find the codes of Greek and Mathematical characters here. However in Word Symbol characters are stored on two bytes, for instance F022 or -4074 for ". IssuesSupport of Greek and Mathematical characters is buggy. There is a gap between what should be supported and what really works and there are problems on browsers as well as in Word. BrowsersHTML 4.0 uses Unicode as its base character set and we should be able for instance to display " with ∀. Furthermore named entities were defined and we should be able to use ∀, arguably easier to remember. Before HTML 4.0 the only solution was to use the Symbol font. We could code " with <font face="Symbol">"</font> where 34 is 22 in decimal. The math browser page shows how well your browser supports HTML 4 and Symbol font. The table below summarizes the situation:
To summarize it is impossible to display symbols and Greek characters on all browsers without checking the browser type. Insert SymbolWhatever symbol you choose, Word Insert Symbol inserts x0028 or '(' in the document. Ok the character code is stored somewhere else (it is displayed!) but impossible to retrieve with VBA. Therefore we created a Word document containing all supported characters. Download and inflate this file. Then Copy | Paste Mathematical symbols from this file to your document. For Greek characters, it is faster to type the Latin equivalent. You can easily remember that a a is an a, a b is a b and so on. Implementationcuckoo.dotcuckoo.dot processes characters written with the Symbol font. If the character is a character listed in the Math browser page and in the Word document, it converts it into the equivalent Unicode numbered entity, for instance ∀ for ". Otherwise it copies the ASCII value of the character:
cuckoo.dot also identifies Subscript and Superscript and wraps the character(s) in a <span> element. math-gen.jscuckoo.dot generates XML and HTML 4 files appropriate for a display in Netscape 6, Mozilla 0.9.6 and Opera 6. These files will not display all Greek characters and Mathematical symbol on other browsers. math-gen.js is a WSH script that makes two things:
Note: math-gen.js is designed to process HTML files generated by cuckoo-gen.js. MathGreekWe defined a MathGreek Word style with the Symbol font. We also defined a MathGreek CSS class:
You don't need to use MathGreek because Cuckoo tests the font. However if you define another style with the Symbol font, you must also define a CSS class with a Symbol font-family. math-verifClick on math-verif.html to see the different advanced functions of Cuckoo.
Contact:support@pagebox.net |
|