Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • L Laweb
  • Project information
    • Project information
    • Activity
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar

Admin message

To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

  • laweb
  • Laweb
  • Wiki
  • Development

Development · Changes

Page history
Update Development authored Jun 21, 2021 by Bengt Giger's avatar Bengt Giger
Hide whitespace changes
Inline Side-by-side
Development.md
View page @ ce019bd3
# Development # Components
## Components
The conversion from LaTeX to the XML ready for import takes 2 steps: The conversion from LaTeX to the XML ready for import takes 2 steps:
1. convert from LaTeX to a single page HTML file 1. convert from LaTeX to a single page HTML file
1. split the HTML into parts and chapters and create the import XML 1. split the HTML into parts and chapters and create the import XML
### Conversion to HTML: *Laweb* ## Conversion to HTML: *Laweb*
*Laweb* uses *tex4ht* and consists of two configuration files. Their main purposes: *Laweb* uses *tex4ht* and consists of two configuration files. Their main purposes:
- `laweb.cfg`: page properties, CSS definitions - `laweb.cfg`: page properties, CSS definitions
- `laweb.sty`: define LaTeX macros - `laweb.sty`: define LaTeX macros
### Dissection and XML generation ## Dissection and XML generation
*laweb2pressbooks* is a Python program, hosted in a [separate repository](https://gitlab.ethz.ch/laweb/laweb2pressbooks). Adaptions have to be done in the code, there is no relevant configuration file. *laweb2pressbooks* is a Python program, hosted in a [separate repository](https://gitlab.ethz.ch/laweb/laweb2pressbooks). Adaptions have to be done in the code, there is no relevant configuration file.
## Where to Change # Where to Change
Fix issues and add features as early as possible in the pipeline: address *Laweb* first, then *laweb2pressbooks*. Fix issues and add features as early as possible in the pipeline: address *Laweb* first, then *laweb2pressbooks*.
### New Features for LaTeX ## New Features for LaTeX
`laweb.sty` is probably the best choice. With `\ifdefined\HCode`, macros may detect if the document is processed for HTML output or not, and act accordingly. See the definition for for the *<details>* element [in the source](https://gitlab.ethz.ch/laweb/laweb/-/blob/master/laweb.sty#L64) as an example. `laweb.sty` is probably the best choice. With `\ifdefined\HCode`, macros may detect if the document is processed for HTML output or not, and act accordingly. See the definition for for the *<details>* element [in the source](https://gitlab.ethz.ch/laweb/laweb/-/blob/master/laweb.sty#L64) as an example.
### Post Processing ## Post Processing
The post processing with *laweb2pressbooks* should be reserved for tasks which cannot be done in Laweb. *laweb2pressbooks* has no knowledge about the LaTeX source and only sees HTML. The post processing with *laweb2pressbooks* should be reserved for tasks which cannot be done in Laweb. *laweb2pressbooks* has no knowledge about the LaTeX source and only sees HTML.
Examples for tasks performed by *laweb2pressbooks* besides splitting up the parts: Examples for tasks performed by *laweb2pressbooks* besides splitting up the parts:
...@@ -32,5 +31,7 @@ Examples for tasks performed by *laweb2pressbooks* besides splitting up the part ...@@ -32,5 +31,7 @@ Examples for tasks performed by *laweb2pressbooks* besides splitting up the part
- remove comments - remove comments
- process images - process images
## Releases # Releases
The distribution formats for *laweb2pressbooks* are Python package and Docker container. Both are versioned through Git tags. To release a new version, create a tag with description (not a lightweight tag without description). The build pipelines will create and publish new packages/containers automatically. The distribution formats for *laweb2pressbooks* are Python package and Docker container. Both are versioned through Git tags. To release a new version, create a tag with description (not a lightweight tag without description). The build pipeline will create and publish new packages/containers automatically.
The build pipeline does some syntax and security checks, failing checks will prevent the packages to be released. [Read the notice here](https://gitlab.ethz.ch/laweb/laweb2pressbooks#developing) for more information.
\ No newline at end of file
Clone repository
  • Development
  • Images
  • LaTeX Macros Added
  • Pressbooks Template Configuration
  • Home
  • walkthrough
    • 1 Example Start
    • 2 HTML Conversion
    • 3 XML Conversion
    • 4 Import in Pressbooks