Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
updated README
  • Loading branch information
EsGeh authored and EsGeh committed Nov 12, 2019
1 parent a6b0d41 commit 511a25e
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 644 deletions.
49 changes: 0 additions & 49 deletions INSTALL.md

This file was deleted.

101 changes: 47 additions & 54 deletions README.md
Expand Up @@ -7,76 +7,69 @@ LaTeX and DocX (as used in Microsoft Word).

![The EOA workflow](doc/eoa_intermediate_workflow.png)

## The LaTeX workflow
The LaTeX workflow is based on a reduced set of LaTeX commands which
are defined in a preambel and help keeping the book production
workflow consistent. A sample project is found at
<https://github.molgen.mpg.de/EditionOpenAccess/eoa_sample_project>.
# Installation

The PDF version is created directly with `xelatex`.
In order to provide a consistent environment we are using docker.
A set of python scripts is used for automatisation.
Installing and running the project without Docker or the scripts is possible, but not recommended. In this case you are on your own.

For the creation of the other format,
[tralics](https://www-sop.inria.fr/marelle/tralics/) is used to
convert the TeX source to XML. The original DocBook output is enriched
by various EOA-specific elements.
## Prerequisites

This intermediate XML file is subsequently used by three additional
programs which turn it into TEI-XML, EPUB and Django-XML,
respectively. The Django-XML format is ingested into the database of
the EOA site where it will show up as an online publication.
- Python 3
- Docker, Docker Compose

The EPUB files can be put together to form an ebook. The script
[data/misc/epub.sh](https://github.molgen.mpg.de/EditionOpenAccess/EOASkripts/blob/master/data/misc/epub.sh) performs the required steps.
## Initialise the Repository

The conversion to TEI is still work in progress.
$ ./scripts/init.py [--build]

## The DocX workflow
This workflow is based on Microsoft Word documents which are created
following the Guidelines of a template found at
<http://edition-open-access.de/media/support/files/EOA_Word_Template.docx>.
Currently, the webservice at <http://www.tei-c.org/oxgarage/#> is used
to convert it into TEI P5.
This will pull remote repositories and resources, initialize the database, etc.
Force recreating the docker image by adding `--build` e.g. if `Dockerfile` or `requirements.txt` has changed.

Similar to the LaTeX workflow we require the authors to hand in their
bibliographic references in a database format, such as BibTeX. The
Word template explains in detail how citations should be entered.
## Run the Docker Container

The script [fix_tei](https://github.molgen.mpg.de/EditionOpenAccess/EOASkripts/blob/master/fix_tei.py) corrects some artifacts of the oxgarage
conversion and expands the shorthand codes for references and figures
to XML tags.
$ ./scripts/run.py

After that, a PDF document can be obtained by using an XSL script to
create a LaTeX file, or the TEI file can be converted into the
customized DocBook format from above workflow so that the existing
tools can be used.
The container should now be up and running.

See [doc/XSL.md](https://github.molgen.mpg.de/EditionOpenAccess/EOASkripts/blob/master/doc/XSL.md) for a documentation of the XSL workflow.
## Run Command in the Docker Container

## Examplary workflow
$ ./scripts/exec_in_container.py [-- CMD ...]

To install the whole toolchain, clone at least this repository as well
as the 'advanced' branch of
[EOA sample project](https://github.molgen.mpg.de/EditionOpenAccess/eoa_sample_project).
Follow the installation instructions in [INSTALL.md](./INSTALL.md).
Follow your workflow by running the appropriate scripts to compile your publications (see chapter 'Workflow').
Inside the container you have a well defined environment with all necessary evil dependencies available.
Don't forget to stop the container when you are done.

In `eoa_sample_project`, run `xelatex`, `biber` (the version included
in your TeX distribution) and `xelatex` two more times. This will give
you the PDF version of the document.
## Stop the Docker Container

Next, comment line 9 in `EOASample.tex` (the EOA preambel) and
uncomment line 10 (the XML preambel) and run `eoaconvert.py`:
$ ./scripts/stop.py

eoaconvert.py -f EOASample
## Clean the Repository

If everything went well, you can also try and run
$ ./scripts/exit.py

tralics2django.py
tralics2epub.py
tralics2tei.py
This should remove all remote repositories and resources not part of this repository.
Docker images are not deleted though.

These scripts don't take any arguments and will produce output in the
`CONVERT` directory.
## Configuration

External dependencies
---------------------
See [INSTALL.md](./INSTALL.md) for details.
- Environment variables: see file `.env`

These variables are available inside the `docker-compose.yaml` file and are also loaded into the python scripts.
The file is created with default settings by the `init.py` script.

# Workflows

Compiling your documents involves following a workflow which can consist of several steps.
For all further explanations we assume you are in the docker container.

## The LaTeX workflow (TODO)

TODO

## The DocX workflow (TODO)

TODO

## Examplary workflow (TODO)

TODO
74 changes: 0 additions & 74 deletions doc/COSMOS.md

This file was deleted.

76 changes: 0 additions & 76 deletions doc/XSL.md

This file was deleted.

25 changes: 0 additions & 25 deletions doc/bibliography.md

This file was deleted.

19 changes: 0 additions & 19 deletions doc/create_tmpbib.md

This file was deleted.

0 comments on commit 511a25e

Please sign in to comment.