20. Linux platform for document publishing

1. Standard number line and annotations.
2. Function graph.
3. Periodic functions.
4. Inequalities and interval notations.
5. Grids in log scale.
6. Mathjax symbols.
7. Polar vs Cartesian coordinates.
8. Perspective, orthogonal, spherical projection.
9. Conic sections.
10. Contours.
11. Special plots (box and whisker), google charts.
12. Wireframe 3D with WebGL.
13. Contour maps (2D and 3D).
14. JessieScript and geometric elements.
15. Publishing PDF portable documents.
16. Linear equations and inequalities.
17. Parabolas and hyperbolas.
18. Function transformation using matrix.
19. WordPress plugin using jsxgraph and MathJax.
20. Linux platform for data processing and publication testing.
In 2015, the South Korean manufacturer giant Samsung produced the Odroid-XU4, a low-powered-credit-card-size single board computer. It can run modern open-source operating systems such as Linux and Android. The standard hardware packs an octa-core Heterogeneous Multi-Processing ARM-based CPU, 2GB of high-speed RAM, 2x full-sized USB3.0 ports, Gigabit Ethernet and more into a fully functional computer operating on only 5 volts of power!

From software perspective, the Odroid-XU4 is a new generation of single board computer that has eight (8) processors. 2 Gigabytes of high-speed memory can run most if not all programs on Linux platform. The USB ports provide high-speed access to external storage devices. Because of inherent design requirements of low power, in terms of processing speed, ARM CPUs are a lot slower than traditional desktop Intel CPUs. However, an 8-cpu board is slightly faster than a power-hungry modern Intel 2-core cpu.

This project builds a server-based publishing platform to create PDF documents of publication quality. Documents in PDF format are portable and can be viewed on any computer, tablet, or phone device, regardless of the operating system. Because of this inherent advantage, it is more economical to employ modern open-source web-based technology to publish documents in this cross-platform PDF format.

wkhtmltopdf can create documents in this format accurately from documents prepared in web language html, css, and javascript. The following steps need to be successfully finalized before this software can be utilized effectively.
1. Build a fully configured Linux platform. I am biased toward Fedora Core since the installation commands and software packaging are significantly different from the manufacturer’s provided OS (Ubuntu). The platform to be built and tested is Fedora Core 20. Since this is a headless server, as soon as SSH and yum works, we can have a fully functional system for our purposes.
2. Build wkhtmltopdf from source. This is a requirement since pre-built binaries are for Intel processors only.
3. Build jsxgraph and Mathjax for mathematical and scientific symbols.
4. Basic understanding of css and html are useful but not required to build the basic layout for a typical publication in PDF. Even though programming skill is essential to make the process more controllable, it is not required to publish only text-based publication that do not use special symbols, formatting, charts, and graphs.

wkhtmltopdf is a software tool to convert html documents to pdf format using the open-source WebKit package. It works with most html, css, and fairly complex javascript codes. This package is chosen over comparable packages such as phantomjs or slimerjs due to its ability to render graphic images produced by jsxgraph and Mathjax.
wkhtmltopdf Bugs & Features
The following issues with wkhtmltopdf v2.12 may arise due to possible problems in either WebKit, the Qt port, incomplete or incomprehensible documentation of the software, or my own usage errors. However, being aware of these issues will bypass all obstacles to create an error-free document.
1. wkhtmltopdf uses the WebKit rendering engine which is not designed for the printed page.
2. A margin of 1 cm is the default margin.
3. Take advantage of the flexibility of css, use percentage instead of a fixed unit such as mm or cm.
4. Design your own footer and header.
5. Use white instead of color margin, wall-to-wall color is nothing other than inviting trouble if this is a design requirement.
6. Shorten formatting or repetitive section of codes by using javascript.
Group as many formatting blocks in javascript as possible to see the html page outline structure. css styling should be placed outside the html document in a .css file.
7. Since you are the publisher, choose the fonts which are legible and appropriate for your contents. Character subsets of one or more chosen typefaces can be embedded in the document so that the documentation looks the same on all computer platforms.

Whether you want to make a brochure having only a few pages or a complete book with table of contents, once the process is understood, you will be able to self-publish publication quality with little or no cost. The following PDF document demonstrates a typical 2-column book layout can be accurately created using simple html, css, and some javascript. You can create similar layout by using only the following html and css tags.

You will need basic knowledge of at least several of the required components listed on this page.

Only essential concepts of the following technology required to get the job done are covered. These basic steps should help you build a solid foundation to further advance your skills and knowledge of modern web technology.
1. html, to hold the page contents (text, images, charts, graph, etc.).
2. css, rules to present and layout the pages.
3. javascript, basic knowledge to automate certain tasks.
4. jsxgraph, geometric drawing, basic chart and graphs.
helper library to simplify usage, common graphs, and customize functions (charts and graphs), interactive geometry to generate codes required for wkhtmltopdf rendering.
First book: Learn programming html/css/javascript with jsxgraph.
Interactive jsxgraph to generate the final page codes (without coding).
5. notepad++ or an equivalent text editor.
6. mathjax, special mathematic and typesetting symbols.
7. wordpress, page previewing, html code debugging.
8. webKit wkhtmltopdf, pdf publishing.
9. Hardware platform (Linux, http, MySQL, php, python)
10.Optional google charts, webGL.
11.Stand-alone hardware platform.

1. DVD specifications,
2. math worksheets.
3. interactive jsxgraph, generate required javascript to use jsxgraph and google charts. Learn only the HTML/CSS/Javascript part needed for implementation of the graphic. This is needed to generate calculus/sage math exercises sheets.
documentation of sourceforge most popular projects.
4. wordpress theme customization. Learn only necessary database and php.
The design of this project is to build and develop a small network of servers for document publishing, interactive computer algebra, web-based notebook, testing of contents management system (WordPress). The goal is to speed up these processor intensive processes and to help reduce the heavy work load off the desktop computer. The desktop supports all aspects of authoring digital books to be published in pdf format. Most books require complex layouts, vector graphic, bitmap images, musical scores, and traditional mathematical symbols. Fortunately, there are many available open-source software packages with commercial quality which readily help to complete these tasks. Most if not all authoring functions can be accomplished by the following packages:
☼ wkhtmltopdf (html to pdf file conversion using webkit),
☼ jsxgraph (graphic drawing with HTML/css/javascript),
☼ mathjax (mathematical symbols),
☼ sage (computer algebra system),
☼ matplotlib (advanced plotting),
☼ wordpress (contents management system for previewing),
☼ maria (SQL database to support wordpress),
☼ automated and web-based scripts (php, python, bash)
☼ samba (map network drive)
☼ zencart (ebook category and pricing)
☼ user registration and support
cover book design and templates from book torrents

The following packages are required for video conversion and editing.
The server platform can effectively handle processor intensive tasks. These are work assignments which can be completed without interaction. As more and more tasks are offloaded to these servers, the desktop will run faster and becomes more responsive.
The major assignments to be offloaded include the following:
☼ pdf book pulishing (webkit)
☼ video subtitling and format conversion (ffmpeg)
☼ video and ebook file repository and automatic backup (rsync, tar)
☼ document and directory archival (rar, bz2)
☼ wordpress database testing (apache, maria, php)
☼ math and plotting support (sage, matplotlib)
☼ 3D rendering (povray, poseray)

Each server must satisfy the following basic requirements:

1. wkhtmltopdf is able to convert any HTML document formatted with CSS and Javascript to a PDF file accurately using the webkit rendering engine. Since PDF standard allows embedded fonts, the viewers of the document see the same typefaces as designed by the author. CSS allows the choice of fonts, background color and image opacity, page layout, and the placement of page elements accurately. Documents written in HTML are cross-platform and can be viewed quickly with standard modern browsers such as Firefox, Safari, Chrome, etc. Once the HTML page is finalized, its contents can be left as is, or with minor modifications to accommodate the requirements of the document page size such as margins, footers or headers, page numbering, and page breaks. Since the PDF format is designed for cross-platform browsing, the converted file will work on any desktop, tablet, or smart phone, regardless of the operating system.

2. Even though expert knowledge is not necessary, fundamental knowledge of how CSS and Javascript interact with HTML is extremely useful to design complex page contents including one or more of the following:
☼ dynamic page formatting,
☼ accurate positioning using units of inches or centimeters (CSS absolute attributes),
☼ geometric coordinate and figure drawing using pure HTML instead of embedded graphic images (jsxgraph),
☼ typesetting of mathematic and special symbols (mathjax),
☼ image and background effects such as tranparency,
☼ navigation of table of contents,
☼ custom page/chapter number with headers/footers.

3. A content management system (CMS) like WordPress running on a local server provides a robust environment for designing, previewing, updating, testing contents and page layout, as well as quick changes of individual pages before publishing. General page formatting and layout can be viewed quickly on cross-platform browsers for potential compatibility issues before rendering to the final PDF format. Besides providing a robust testing platform, a local server also provides automated archival functions. Database tables and documents ready to be published to a production web site can be compressed into a single .zip or .tar file to migrate to a production server in an automated fashion. Custom scripts can be deployed on the server to further assist the testing and development of contents. Off the web development is faster, more secure, less chance of outside virus contamination, and potentially can avoid or resolve bandwidth bottleneck, network speed issues, dependency of system resources (fonts, registry, 3rd party software).

Eyedropper or equivalent color selection tool
Shift-Print Screen to copy screen images to the clipboard.
Command history to reduce/avoid repetitive typing.

E-book self-publishing guide (English & Vietnamese).
Website tool or full-service or do-it-yourself guide.
Preview for changes
Javascript/JSXGraph/JQuery/MathJax for math symbols

WordPress database operations
MySQL/Maria database, multiple sites with apache
server maintenance with php
Notepad++ for general editing.
Client/server environment.
One server, multiple clients.
Linux and non-Intel platform
Major software packages to support content browsing,
compatibility testing,
Linux,nfs,samba,
Apache,PHP,Python,MySQL/Maria database,WordPress,
Tam Quốc Chí ebook repackage