Skip to content
GitLab
Projects Groups 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
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar

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

February 2023 and with it the next round of user cleanup is just around the corner! The gitlab.ethz.ch users without an equivalent ETH LDAP-user will be deleted. Together with the users are deleted: the users own repositories and the groups where these users are the only owner.

To avoid losing data, please ensure that the groups you use have at least one owner with a valid ETH LDAP-account. If you don't know what that means, ask yourself this question: "is the owner of the group still working at ETH?". If the answer is "No" and you want to keep using that group, you need to set a valid owner.

If you need help, please open a ticket with the ID service-desk. We'll do our best to help you.

  • laweb
  • Laweb
  • Wiki
  • Development

Development · Changes

Page history
Create Development authored Jun 21, 2021 by Bengt Giger's avatar Bengt Giger
Hide whitespace changes
Inline Side-by-side
Development.md 0 → 100644
View page @ 622f36ca
# Development
## Components
The conversion from LaTeX to the XML ready for import takes 2 steps:
1. convert from LaTeX to a single page HTML file
1. split the HTML into parts and chapters and create the import XML
### Conversion to HTML: *Laweb*
*Laweb* uses *tex4ht* and consists of two configuration files. Their main purposes:
- `laweb.cfg`: page properties, CSS definitions
- `laweb.sty`: define LaTeX macros
### 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.
## Where to Change
Fix issues and add features as early as possible in the pipeline: address *Laweb* first, then *laweb2pressbooks*.
### 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.
### 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.
Examples for tasks performed by *laweb2pressbooks* besides splitting up the parts:
- fix line breaks written as `\n`
- create links between newly created pages
- remove comments
- process images
## 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.
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