GithubHelp home page GithubHelp logo

tgm-hit / latex-protocol Goto Github PK

View Code? Open in Web Editor NEW
17.0 13.0 11.0 4.26 MB

LaTeX template for documents and laboratory documentation :books:

TeX 67.90% Python 32.10%
protocol documentation template latex tgm information-technology glossaries bibliography

latex-protocol's Introduction

A latex protocol template

Quickstart

git clone [email protected]:tgm-hit/latex-protocol.git protocol
cd protocol
./maketex

Contents

Dependencies

For local compilation a TeX distribution is required. Both TeX Live and MiKTeX are fully supported. The compilation script requires Python 3.

Some features might depend on packages which are not installed by default! A growing list of optional dependencies can be found here.

Arch Linux

sudo pacman -S texlive-most python-pygments

Usage

With Python 3 and LaTeX installed you can easily compile your project using the maketex script which simplifies the compilation progress, handles multiple source files and removes unnecessary files. For most use-cases you only have to run ./maketex which compiles the main.tex file using pdflatex while looking for bibliography and glossary entries.

Latex

If (for some reason) you do not want to depend on the maketex script you can also use pdflatex, makeglossaries and bibtex from the shell.

pdflatex -shell-escape main	# Initial compilation
makeglossaries main 		# Compile glossaries
pdflatex -shell-escape main	# Progressive compilation for glossaries
bibtex main 			# Compile bibliography
pdflatex -shell-escape main	# Progressive compilation for bibtex
pdflatex -shell-escape main	# Progressive compilation for bibtex

TexStudio

In TexStudio a custom command can be added under OptionsConfigure TexStudioBuildUser Commands. The following line completely compiles a LaTeX file with glossaries, bibliography and minted.

pdflatex -shell-escape -interaction=nonstopmode % | txs:///makeglossaries | pdflatex -shell-escape -interaction=nonstopmode % | txs:///bibtex | pdflatex -shell-escape -interaction=nonstopmode % | pdflatex -shell-escape -interaction=nonstopmode % | txs:///view-pdf-internal --embedded

Of course you can also add the maketex script as a user command but you might want to set -lm so TexStudio can find your log files and minted cache after cleanup.

python maketex -lm | txs:///view-pdf-internal --embedded

Overleaf

Overleaf is a popular online latex editor and is also fully supported by this template. Just download the archived repository or latest release and upload as a new project.

Overleaf usage

Options

Options are added to the \documentclass command usually found in main.tex.

\documentclass[<option1>,<option2>,...]{protocol}
Option Result
en Set main document language to english
landscape Change the page format to landscape orientation
minted Add and configure minted package
natbib Change bibtex backend to natbib
nobib No bibliography
nofonts No additional fonts
noglo No acronyms and glossary
nologos No logos on titlepage
notable No table on titlepage
notitle No titlepage
notoc No table of contents
parskip Skip a line instead of indenting after blank line
sans Load sans-serif fonts

Variables

Variables are set as commands with their parameter being the variable value.

\myvariable{value}
Command Content
mysubtitle Subtitle of group
mysubject Thematic group / subject
mycourse Current course / class
myteacher Current teacher
myversion Current version of the document
mybegin Start of documentation
myfinish End of documentation

latex-protocol's People

Contributors

mborko avatar re1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

latex-protocol's Issues

Make ccicons package optional

The ccicons package should be optional (\IfFileExists{ccicons.sty}{RequirePackage{ccicons}}{/cciconsfalse}) in order to reduce dependencies for TexLive users.

Also optional packages (including but not limited to ccicons) can be documented inside README.md.

[nobib] Option raises Error

Describe the bug
When no glossary or bibliography is used and the [nobib] Option ist used the compiler produces an error

To Reproduce

  1. Create a document
  2. don`t use a bibliography, glossary or similar indexes.
  3. add the Option [nobib] to the \documentclass-Command:
    \documentclass[nobib][minted]{protocol}

Error Messages
grafik
Raw Log:

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex 2019.8.28)  11 DEC 2019 09:16
entering extended mode
 \write18 enabled.
 %&-line parsing enabled.
**main.tex
(/compile/main.tex
LaTeX2e <2018-12-01>

! LaTeX Error: File `.cls' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: cls)

Enter file name: 
! Emergency stop.
<read *> 
         
l.1 \documentclass[nobib][m
                           inted]{protocol}^^M
*** (cannot \read from terminal in nonstop modes)

 
Here is how much of TeX's memory you used:
 11 strings out of 492616
 186 string characters out of 6128979
 56957 words of memory out of 5000000
 4020 multiletter control sequences out of 15000+600000
 3640 words of font info for 14 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 10i,0n,8p,60b,8s stack positions out of 5000i,500n,10000p,200000b,80000s
!  ==> Fatal error occurred, no output PDF file produced!

Expected behavior
With the Option, there won't be blank page at the end of the document

Desktop

  • Overleaf
  • Browser: Firefox
  • OS: Windows 10

Make not working on windows

makefile is not adjusted to Windows operating systems. As an alternative a cross-platform script could be used to easily compile the template.

makefig error

It is not possible to use the label, which is defined in the makefig-command, to refer a image.

Problem with listing longer than a Page

test

\begin{listing}
    \begin{minted}{json}
    [
        {
        "serverVersion": 0,
        "localVersion": 1,
        "diff": {
            "data": {
                "layers": {
                    "0": [
                        {
                            "data": [
                                17,
                                17,
                                17,
                                0
                            ],
                            "height": 2,
                            "name": "Kachelebene 1",
                            "opacity": 1,
                            "type": "tilelayer",
                            "visible": true,
                            "width": 2,
                            "x": 0,
                            "y": 0
                        }
                    ],
                    "_t": "a",
                    "_0": [
                        {
                            "data": [
                                17,
                                17,
                                17,
                                17
                            ],
                            "height": 2,
                            "name": "Kachelebene 1",
                            "opacity": 1,
                            "type": "tilelayer",
                            "visible": true,
                            "width": 2,
                            "x": 0,
                            "y": 0
                        },
                        0,
                        0
                    ]
                },
                "version": [
                    1,
                    2
                ]
            }
        }
        }
    ]
    \end{minted}
    \caption{Json Differenz mit einer Änderung in einem Layer in TMX}
    \label{code:}
\end{listing}

Makefile

please make a Makefile, which passes the arguments to the python file, so you can run make

A too long title or too many authors are not displayed correctly

Describe the bug
A too long title or too many authors are not displayed correctly
image

To Reproduce
Steps to reproduce the behavior:

  • Set \title{} to something too long for the headline
  • Set \author{} to something too long for the footer

Expected behavior
A new linie within the header/footer if one of them is too long (also multiple new lines if there are a lot of authors or the title is very long)

Desktop (please complete the following information):

  • Overleaf
  • Tested Browsers: Firefox & Chromium
  • OS: Fedora 29

Title page is all denglish

Describe the bug
The title page is all denglish

screenshot (1)

To Reproduce

Set lang to en:

\selectlanguage{english}

Expected behavior

At least all generated text should be English. Preferably the images as well, I am however not sure if we can translate "Die Schule der Technik" and "bildung mit Zukunft".

Titles overlap in header

As pointed out by @mfentler-tgm, long titles and subtitles will overlap each other in the documents header as seen below.
image

Reproduction
Set \title{to a very long sentence you would usually never give a document} and \mysubtitle{too}.

pagenumber error

If the glossary is longer than one page the max. page-size is not calculated correctly. (e.g. 32/30)

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.