Giter VIP home page Giter VIP logo

amivtex's Introduction

amivtex

Tex templates for the AMIV CI

Two document classes are provided: amivletter and amivbooklet -- and they are easy to use, take a look in the examples folder to see all available commands and how to use them.

Quick Usage

If you only need to edit or create a single document quickly, this is what you need to do:

  1. Download all amivtex files
  2. Choose:
    • Copy your document into the amivtex subfolder (put it right next to the .sty files!)
    • Pick the example that fits your intentions best and copy it to the amivtex folder (again, right next to the .sty files)
  3. In your editor, set the engine from LaTex (or whatever is activated) to XeLaTex (otherwise we can't use the DIN Pro font)
  4. Make sure you have the DIN Pro Font installed (see Installation for quick download links)

All done, you can now edit and compile your document!

Installation

Prerequisites: Fonts & XeLaTex

The Din Pro font must be installed. It is not public, but available for all ETH Members. For convenience, it can also be found in the AMIV Drive and AMIV Wiki.

To use this font, XeLaTex must be used. On Linux, TexLive includes XeLaTeX, MiKTeX on Windows as well.

Linux & MacOS

Some TeX Editors allow to add additional resources directly. Otherwise, probably the easiest way is to just add amivtex to the local texmf tree.

# Create local texmf tree, be careful to get the subdirectories right
## Linux
mkdir -p ~/texmf/tex/latex/
## MacOS
mkdir -p ~/Library/texmf/tex/latex/

# Clone amivtex and create symlink
git clone https://github.com/NotSpecial/amivtex.git
## Linux
ln -s ./amivtex/amivtex ~/texmf/tex/latex
## MacOS
ln -s ./amivtex/amivtex ~/Library/texmf/tex/latex

No further steps necessary, it should be detected automatically. More info here.

Windows

MikTex has several options to add .sty files, e.g. a simple command line option --include-directory=<your_amivtex_dir>/amivtex, which can be added in your Tex Editor. (Be careful to include the subdirectory amivtex which actually contains the .sty files) More Info.

Verify your installation

Open one of the example .tex files. If they compile, you are good to go.

Docker

If you want to create a python application that requires amivtex, a Docker image is available with python3, xelatex and the templates installed. Begin your Dockerfile with FROM notspecial/amivtex and you are nearly set.

As the Din Pro font is not public, it cannot be included in the public image, but the image contains an entrypoint-script which will install the font at container startup, before the first CMD is executed.

Note: Make sure not to use the ENTRYPOINT instruction in your Dockerfile, or you will overwrite this setup!

The font can be provided in the following ways:

Using docker secrets (recommended)

Docker secrets allow handling sensitive data conveniently. The container accepts an URL to download the fonts as secret. (The URL can be found in the AMIV Wiki)

# Create the secret named 'font_url'
echo "URL" | docker secret create font_url -
# Start your container (which builds on amivtex) with the secret
docker service create --name your_amivtex_app --secret font_url your_amivtex_app_image

The amivtex image looks for the secret at /run/secrets/font_url, so if you name your secret differently, either adjust the mount point or specify the path with the environment variable FONT_URL_FILE:

docker service create \
  --name your_amivtex_app \
  --secret my_secret \
  -e FONT_URL_FILE="/run/secrets/my_secret" \
  your_amivtex_app_image

Using environment vars

If you can't use secrets, you can pass the URL directly with the environment variable FONT_URL.

If you don't want the container to download anything, you can also mount the compressed fonts (.tar.gz) and let the image the path where you mounted the archive with the environment variable FONT_ARCHIVE.

amivtex's People

Contributors

hermannsblum avatar notspecial avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.