MathJax HTML source file instructions ==================== This project has math with high complexity equations (integrals, partial derivatives, gradients, matrices, etc.), grouped equations, etc. The source is a preliminary HTML file that uses MathJax to define mathematical expressions, which is processed to generate a final HTML file, along with SVG images with file names consisting of a number and “.svg”, such as “4.svg”. This source file is kept for the purpose of applying errata fixes. Although the MathJax takes some learning, it is clearer than the generated final. This also allows the SVG images to be regenerated with changes. Owing to the complexity of this type of book, it is not required to submit a text file. Inline svg note ==================== It is possible to use inline svg in the html file rather than images. It is essential in this case also to keep the source file. MathML note ==================== For books with less complex math, this may be a good choice. It does not require extra processing. Tools ==================== See the ppmath GitHub repository: https://github.com/DistributedProofreaders/ppmath. Follow the instructions to install m2svg. Don't forget to run "npm update -g" before installing m2svg. Command line: m2svg -i input.htm -o output.htm - The SVG files will be placed in a subdirectory of the working directory called "images". - In the converted file, the maths expressions, delimited by the tags `\[` and `\]` for *display* expressions or `\(` and `\)` for *inline* expressions, are replaced by `` links. - The "data-tex" attribute will contain the original maths expression. Inline code example ==================== For the expression AB^2 = AG × BD the input `\(\mathrm{AB}^{2} = \mathrm{AG} \times \mathrm{BD}\)` becomes `,` The file images/4.svg displays the desired expression. Source files structure on Project Gutenberg ==================== (eBook 75107 is used as an example) - 75107/ - 75107-0.txt (optional) - 75107-h/ - 75107-h.htm (final HTML file) - images/ (generated SVGs + other images) - cover.jpg - 1.svg - (etc.) - 75107-source/ - 75107-source.htm (source HTML file with MathJax) - README-math.txt (this file) Submission process ==================== - Generated final HTML and images should be submitted as normal. - In addition, the source HTML will be included in a "source/" subdirectory. - This readme will also be included in the "source/" subdirectory. - Having it with the eBook makes it obvious, and avoids issues with procedures changing in the future. - The submitter should add a note that this is a MathJax project, and whether a text file is included. - Workflow will rename the source/ subdirectory and HTML file. Errata process ==================== (eBook 75107 is used as an example) 1. Download the project files using Errata Workbench, and unzip. 2. Install m2svg if not already done. 3. Make the desired changes to 75107-source.htm. 4. Execute command line "m2svg -i 75107-source.htm -o 75107-h.htm". - The image files will be placed in a subdirectory of the working directory called "images". - Check error report: filename_svgerr.err (as generated by Guiguts 2) - Preview 75107-h.htm in a browser to make sure that all changes are properly added. 5. Move 75107-h.htm to the 75107-h directory. 6. Move the contents of the images directory to the 75107-h/images directory. - The generated images are just a number with .svg extension. There could be other svg files which are not generated by m2svg. It is best to remove the existing generated files from 75107-h/images first. - Any non-generated images should be kept. Otherwise, if the edit results in there being fewer generated images than before, some old ones could be left behind. 7. Remove the generated images subdirectory and any other temporary files. 8. Run PPhtml from Guiguts 2 or Post-Processing Workbench to verify all images are used, and none are missing. 9. Zip the project directory and upload to Errata Workbench.