README.md 3.07 KB
Newer Older
Bengt Giger's avatar
Bengt Giger committed
1
# *Laweb*: LaTeX to Pressbooks Conversion
2

Bengt Giger's avatar
Bengt Giger committed
3
Publish LaTeX documents in *Pressbooks*, a Wordpress plugin.
Bengt Giger's avatar
Bengt Giger committed
4

Bengt Giger's avatar
Bengt Giger committed
5
---
Bengt Giger's avatar
Bengt Giger committed
6
7
![Screenshot of Pressbooks publication created with Laweb](static/Screenshot_Pressbooks-01.png)

Bengt Giger's avatar
Bengt Giger committed
8
9
---

Bengt Giger's avatar
Bengt Giger committed
10
11
12
This is a tool designed to transform a LaTeX source into a HTML file which
can be
[converted to a Wordpress import XML file](https://gitlab.ethz.ch/laweb/laweb2pressbooks).
Bengt Giger's avatar
Bengt Giger committed
13

Bengt Giger's avatar
Bengt Giger committed
14
15
In the background, it uses `tex4ht` for conversion. 

walterm's avatar
walterm committed
16
*Laweb* is licensed under the [GNU General Public License, version 3.0](https://www.gnu.org/licenses/gpl-3.0.en.html) or later
Bengt Giger's avatar
Bengt Giger committed
17

walterm's avatar
walterm committed
18
# Development and Roadmap
walterm's avatar
walterm committed
19
The further development of *Laweb* depends on your input. Whether you can contribute some software project financing, have skilled developers in your group which could devote some work to the project or you may even think about an [Innvovedum project grant application](https://ethz.ch/en/the-eth-zurich/education/innovedum/innovedum-fund.html). 
walterm's avatar
walterm committed
20

Bengt Giger's avatar
Bengt Giger committed
21
22
# Technical information
## Download and Installation
Bengt Giger's avatar
Bengt Giger committed
23

Bengt Giger's avatar
Bengt Giger committed
24
See [INSTALL](INSTALL.md) for installation information.
Bengt Giger's avatar
Bengt Giger committed
25

Bengt Giger's avatar
Bengt Giger committed
26
## Usage
Bengt Giger's avatar
Bengt Giger committed
27

Bengt Giger's avatar
Bengt Giger committed
28
See [USAGE](USAGE.md) for usage instructions.
Bengt Giger's avatar
Bengt Giger committed
29

Bengt Giger's avatar
Bengt Giger committed
30
31
## Do Not Edit in Pressbooks
It is important to note that the content imported to Pressbooks **may not be edited in Pressbooks**. The editor(s) integrated in Pressbooks will destroy the HTML when saving modifications. The book has to be deleted and imported again to recover.
Bengt Giger's avatar
Bengt Giger committed
32

Bengt Giger's avatar
Bengt Giger committed
33
34
# Overview
*Laweb* combines the unmatched presentation of scientific documents with the publication abilities of Wordpress. 
Bengt Giger's avatar
Bengt Giger committed
35

Bengt Giger's avatar
Bengt Giger committed
36
## Why use *Laweb*?
Bengt Giger's avatar
Bengt Giger committed
37
While it is possible to simply convert a LaTeX document into HTML and put it on a static webserver, this approach
Bengt Giger's avatar
Bengt Giger committed
38
has some drawbacks. Some features of *Laweb* are:
Bengt Giger's avatar
Bengt Giger committed
39

Bengt Giger's avatar
Bengt Giger committed
40
41
- *Laweb* uses MathML and Mathjax for the rendering of mathematical equiations, resulting in a near to optimum presentation in different browsers
- usually, a conversion to HTML ends up in a single HTML document. Think of a document consisting of hundreds of pages! *Laweb* splits parts and sections into single pages and creates the navigation structure for Pressbooks.
Bengt Giger's avatar
Bengt Giger committed
42
- Images are converted to inline data embedded in the HTML. Losing references to images is impossible.
Bengt Giger's avatar
Bengt Giger committed
43
44
- *Laweb* ensures that link references remain functional and consistent across split up pages.
- *Laweb* converts links to http://ggbm/at/MATERIAL_ID to interactive [Geogebra](https://www.geogebra.org/) applets
Bengt Giger's avatar
Bengt Giger committed
45

Bengt Giger's avatar
Bengt Giger committed
46
47
## Components
*Laweb* consists of two components:
Bengt Giger's avatar
Bengt Giger committed
48

Bengt Giger's avatar
Bengt Giger committed
49
50
- *laweb*: LaTeX style and helper scripts to convert LaTeX source code to HTML
- *laweb2pressbooks*: Converter from HTML to Wordpress XML
Bengt Giger's avatar
Bengt Giger committed
51

Bengt Giger's avatar
Bengt Giger committed
52
The LaTeX styles add information required by the XML conversion. The resulting XML contains each LaTeX *part* and *section* separated, resulting in a structured Wordpress publication.
Bengt Giger's avatar
Bengt Giger committed
53

Bengt Giger's avatar
Bengt Giger committed
54
Additionally, a Pressbook template with the ability to disable the `wpautop` function in Wordpress is required. Otherwise, the rendering engine of Wordpress will eliminate vital parts of the HTML during rendering.
55

Bengt Giger's avatar
Bengt Giger committed
56
## Example
57
See [the walkthrough](https://gitlab.ethz.ch/laweb/laweb/-/wikis/walkthrough/1-Example-Start) for a an example *Laweb* conversion from source to Pressbooks.
Bengt Giger's avatar
Bengt Giger committed
58
59


walterm's avatar
walterm committed
60

Bengt Giger's avatar
Bengt Giger committed
61