diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..7d41fcb --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,12 @@ +{ + "name": "LaTeX4Ei Devcontainer", + "image": "makeappdev/uselatex:latest", + "extensions": [ + "eamodio.gitlens", + "James-Yu.latex-workshop", + "ms-azuretools.vscode-docker", + "ms-vscode-remote.vscode-remote-extensionpack", + "ms-vscode.cmake-tools", + "twxs.cmake" + ], +} diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..a3e749e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: 🔍 Search for existing issues first. + url: https://github.com/latex4ei/Allgemein/issues + about: Please search to see if an issue already exists, either in this repo or our common issue in https://github.com/latex4ei/Allgemein/issues diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 0000000..d61d2fd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,45 @@ +name: Feature request +description: Suggest an idea for this project +labels: [enhancement] +assignees: [] + +body: +- type: markdown + attributes: + value: | + **Is your feature request related to a problem? Please describe.** +- type: textarea + id: problem-description + attributes: + label: Problem Description + description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +- type: markdown + attributes: + value: | + **Describe the solution you'd like** +- type: textarea + id: solution-description + attributes: + label: Solution Description + description: A clear and concise description of what you want to happen. + +- type: markdown + attributes: + value: | + **Describe alternatives you've considered** +- type: textarea + id: alternatives-description + attributes: + label: Alternatives Description + description: A clear and concise description of any alternative solutions or features you've considered. + +- type: markdown + attributes: + value: | + **Additional context** +- type: textarea + id: additional-context + attributes: + label: Additional Context + description: Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/inhaltlicher_fehler.yaml b/.github/ISSUE_TEMPLATE/inhaltlicher_fehler.yaml new file mode 100644 index 0000000..95b8d1e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/inhaltlicher_fehler.yaml @@ -0,0 +1,25 @@ +name: Inhaltlicher Fehler +description: Hilf uns Fehler zu Verbessern +labels: [bug] +assignees: [] + +body: +- type: markdown + attributes: + value: | + **Fehlerbeschreibung** +- type: textarea + id: error-description + attributes: + label: Fehlerbeschreibung + description: Beschreibe hier den Fehler + +- type: markdown + attributes: + value: | + **Referenz** +- type: textarea + id: reference + attributes: + label: Referenz + description: Wenn möglich immer eine Referenz zum Skript o.ä. angeben oder als Screenshot mit einfügen. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..d61ffcf --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,14 @@ +--- +name: Vorschlag Fehlerkorrektur +about: Du hast einen Fehler gefunden und willst ihn korrigieren +title: '' +labels: bug +assignees: '' + +--- + +**Fehlerbeschreibung** +Beschreibe hier den Fehler + +**Referenz** +Wenn möglich immer eine Referenz zum Skript o.ä. angeben oder als Screenshot mit einfügen. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..39037b8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + branches: [ master, main ] + pull_request: + branches: [ master, main ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + container: makeappdev/uselatex:latest + steps: + - uses: actions/checkout@v4 + + - name: Configure Git safe directory with GITHUB_WORKSPACE + run: git config --global --add safe.directory $GITHUB_WORKSPACE + + - name: Build + run: | + cmake --version; pdflatex --version + mkdir -p build && cd build + cmake .. + make + + - name: Prepare Deployment + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' + run: | + mkdir -p export + echo "# This branch is for deployment only" >> export/README.md + cp build/doc/*.pdf export + cp build/template-files/*.pdf export + cp build/git.id export + + - name: Deploy + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' + uses: JamesIves/github-pages-deploy-action@v4.6 + with: + branch: gh-pages + folder: export + single-commit: true + silent: true diff --git a/.gitignore b/.gitignore index 88df69b..f8e04ad 100644 --- a/.gitignore +++ b/.gitignore @@ -115,4 +115,4 @@ sympy-plots-for-*.tex/ # xindy *.xdy -StochastischeSignale.pdf +*.DS_Store diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 59f0b80..0000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -dist: xenial -sudo: required - -addons: - apt: - packages: - - texlive-full - - imagemagick - -before_install: -- wget http://mirrors.ctan.org/macros/latex/contrib/titlesec.zip && unzip titlesec.zip -- sudo rm -r /usr/share/texlive/texmf-dist/tex/latex/titlesec -- sudo mv titlesec /usr/share/texlive/texmf-dist/tex/latex/ -- wget https://gitlab.kitware.com/kmorel/UseLATEX/raw/master/UseLATEX.cmake -- CMAKE_ROOT=$(cmake --system-information | grep "CMAKE_ROOT " | cut -d' ' -f 2 | cut -d'"' -f2) -- sudo mv UseLATEX.cmake $CMAKE_ROOT/Modules/ - -install: true - -script: -- mkdir -p build -- cd build && cmake ..; make; cd .. -- mkdir -p export && cp build/doc/*.pdf build/template-files/*.pdf build/git.id export -- echo "# This branch is for deployment only" >> export/README.md - -deploy: - provider: pages - skip-cleanup: true - github-token: $GITHUB_TOKEN # Set in travis-ci.org dashboard, marked secure - local-dir: export - on: - branch: master - -notifications: - email: false - webhooks: - urls: - - https://webhooks.gitter.im/e/d1c80cd55c3503854852 - on_success: change # options: [always|never|change] default: always - on_failure: always # options: [always|never|change] default: always - on_start: never # options: [always|never|change] default: always diff --git a/CMakeLists.txt b/CMakeLists.txt index b2d9e4b..f596879 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.12) project(LaTeX4Ei NONE) include(UseLATEX) diff --git a/LICENSE b/LICENSE index 3dcc74f..6946fae 100644 --- a/LICENSE +++ b/LICENSE @@ -26,4 +26,4 @@ If you want to publish your latex code you are allowed to publish the source cod of this template as well but you have to make sure that a copy of this license is included. -© 2011-2019, LaTeX4EI +© 2011-2024, LaTeX4EI diff --git a/README.md b/README.md index 884ed54..cdd1b94 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # LaTeX4EI Template -[![Build Status](https://travis-ci.org/latex4ei/latex4ei-packages.svg?branch=master)](https://travis-ci.org/latex4ei/latex4ei-packages) +[![Actions Status](https://github.com/latex4ei/latex4ei-packages/workflows/CI/badge.svg)](https://github.com/latex4ei/latex4ei-packages) [![Join the chat at https://gitter.im/LaTeX4Ei/Lobby](https://badges.gitter.im/LaTeX4Ei/Lobby.svg)](https://gitter.im/LaTeX4Ei/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![GitHub release](https://img.shields.io/github/release/latex4ei/latex4ei-packages.svg)](https://github.com/latex4ei/latex4ei-packages/releases/latest) [![Github Releases](https://img.shields.io/github/downloads/latex4ei/latex4ei-packages/latest/total.svg)](https://github.com/latex4ei/latex4ei-packages/releases/latest) @@ -37,4 +37,4 @@ cp -r template-files/latex4ei /usr/local/texlive/texmf-local/tex/latex/latex4ei If you want to share your documents please refer to the LICENSE file Read the changelog.md and known_bugs.txt and check [www.latex4ei.de](http://latex4ei.de) for updates. -© 2011-2019, LaTeX4EI +© 2011-2024, LaTeX4EI diff --git a/known_bugs.txt b/known_bugs.txt index bfa6f58..11dd9d3 100644 --- a/known_bugs.txt +++ b/known_bugs.txt @@ -17,4 +17,4 @@ Known Bugs: 1 \section command. -© 2011-2019, LaTeX4EI +© 2011-2024, LaTeX4EI diff --git a/template-files/cheatsheet_example.tex b/template-files/cheatsheet_example.tex index fc223b3..b92d702 100644 --- a/template-files/cheatsheet_example.tex +++ b/template-files/cheatsheet_example.tex @@ -12,7 +12,7 @@ % possible options: color/nocolor, english/german, threecolumn % default: color, english -\documentclass[english]{latex4ei/latex4ei_sheet} +\documentclass[german]{latex4ei/latex4ei_sheet} % set document information \title{Example\\ Cheat Sheet} @@ -22,10 +22,6 @@ % DOCUMENT_BEGIN =============================================================== \begin{document} - -\IfFileExists{git.id}{\input{git.id}}{} -\ifdefined\GitRevision\mydate{\GitNiceDate\ (git \GitRevision)}\fi - \maketitle % requires ./img/Logo.pdf % SECTION ==================================================================================== @@ -101,12 +97,12 @@ \section{Physik} \end{symbolbox} \begin{sectionbox} - \subsection{Einheitpräfixe} - \begin{tablebox}{l | ccccccccc} - $10^\pm$ & $21$ & $18$ & $15$ & $12$ & $9$ & $6$ & $3$ & $2$ & $1$ \\ \cmrule - $+$ & $\underset{\ir zetta}{\si{\zetta}}$ & $\underset{\ir exa}{\si{\exa}}$ & $\underset{\ir peta}{\si{\peta}}$ & $\underset{\ir tera}{\si{\tera}}$ & $\underset{\ir giga}{\si{\giga}}$ & $\underset{\ir mega}{\si{\mega}}$ & $\underset{\ir kilo}{\si{\kilo}}$ & $\underset{\ir hecto}{\si{\hecto}}$ & $\underset{\ir deca}{\si{\deca}}$ \\ - $-$ & $\underset{\ir zepto}{\si{\zepto}}$ & $\underset{\ir atto}{\si{\atto}}$ & $\underset{\ir femto}{\si{\femto}}$ & $\underset{\ir pico}{\si{\pico}}$ & $\underset{\ir nano}{\si{\nano}}$ & $\underset{\ir micro}{\si{\micro}}$ & $\underset{\ir milli}{\si{\milli}}$ & $\underset{\ir centi}{\si{\centi}}$& $\underset{\ir deci}{\si{\deci}}$ - \end{tablebox} + \subsection{Einheitpräfixe} + \begin{tablebox}{l | ccccccccc} + $10^\pm$ & $21$ & $18$ & $15$ & $12$ & $9$ & $6$ & $3$ & $2$ & $1$ \\ \cmrule + $+$ & $\underset{\ir zetta}{\si{\text{\zetta}}}$ & $\underset{\ir exa}{\si{\text{\exa}}}$ & $\underset{\ir peta}{\si{\text{\peta}}}$ & $\underset{\ir tera}{\si{\text{\tera}}}$ & $\underset{\ir giga}{\si{\text{\giga}}}$ & $\underset{\ir mega}{\si{\text{\mega}}}$ & $\underset{\ir kilo}{\text{kilo}}$ & $\underset{\ir hecto}{\si{\text{\hecto}}}$ & $\underset{\ir deca}{\si{\text{\deca}}}$ \\ + $-$ & $\underset{\ir zepto}{\si{\text{\zepto}}}$ & $\underset{\ir atto}{\si{\text{\atto}}}$ & $\underset{\ir femto}{\si{\text{\femto}}}$ & $\underset{\ir pico}{\si{\text{\pico}}}$ & $\underset{\ir nano}{\si{\text{\nano}}}$ & $\underset{\ir micro}{\si{\text{\micro}}}$ & $\underset{\ir milli}{\si{\text{\milli}}}$ & $\underset{\ir centi}{\si{\text{\centi}}}$& $\underset{\ir deci}{\si{\text{\deci}}}$ + \end{tablebox} \end{sectionbox} diff --git a/template-files/cheatsheet_template.tex b/template-files/cheatsheet_template.tex index 7244f9e..40aa615 100644 --- a/template-files/cheatsheet_template.tex +++ b/template-files/cheatsheet_template.tex @@ -27,9 +27,6 @@ % ====================================================================== \begin{document} -\IfFileExists{git.id}{\input{git.id}}{} -\ifdefined\GitRevision\mydate{\GitNiceDate\ (git \GitRevision)}\fi - % Title % ---------------------------------------------------------------------- \maketitle % requires ./img/Logo.pdf @@ -60,7 +57,6 @@ \section{Math} - % ====================================================================== % End % ====================================================================== diff --git a/template-files/latex4ei/latex4ei.sty b/template-files/latex4ei/latex4ei.sty index 19be237..aff8e09 100644 --- a/template-files/latex4ei/latex4ei.sty +++ b/template-files/latex4ei/latex4ei.sty @@ -28,6 +28,17 @@ % Basic Settings % ====================================================================== +% Language +% ---------------------------------------------------------------------- + +\RequirePackage[english, ngerman]{babel} + +\RequirePackage{iflang} +\providecommand{\EngGer}[2]{\IfLanguageName{english}{#1}{#2}} +\expandafter\selectlanguage\expandafter{\thelanguage} +\AtBeginDocument{\expandafter\selectlanguage\expandafter{\thelanguage}} + + % Identify Compiler % ---------------------------------------------------------------------- \RequirePackage{ifxetex} @@ -140,17 +151,6 @@ } } - -% Language -% ---------------------------------------------------------------------- - - \RequirePackage[english, ngerman]{babel} - - \RequirePackage{iflang} - \providecommand{\EngGer}[2]{\IfLanguageName{english}{#1}{#2}} - \expandafter\selectlanguage\expandafter{\thelanguage} - \AtBeginDocument{\expandafter\selectlanguage\expandafter{\thelanguage}} - % Graphics % ---------------------------------------------------------------------- \RequirePackage{graphicx} % for including images diff --git a/template-files/latex4ei/latex4ei_sheet.cls b/template-files/latex4ei/latex4ei_sheet.cls index 057bd43..04abe3e 100644 --- a/template-files/latex4ei/latex4ei_sheet.cls +++ b/template-files/latex4ei/latex4ei_sheet.cls @@ -101,13 +101,23 @@ \fancyhf{} \AtBeginDocument{ + \IfFileExists{git.id}{\input{git.id}}{} + \ifdefined\GitNiceDate\mydate{\GitNiceDate\ (git \GitRevision)}\fi + \ifdefined\GitIssuesURL + \ifdefined\setissueslinkurl + \setissueslinkurl{\GitIssuesURL} % Set the actual URL + \fi + \fi \fancyfoot[C]{\EngGer{from}{von} \theauthor\ -- Mail: \email{\theemail}} } \renewcommand{\headrulewidth}{0.0pt} %obere Linie ausblenden \renewcommand{\footrulewidth}{0.1pt} %obere Linie ausblenden + + \newcommand{\issueslinkurl}{https://github.com/latex4ei/Allgemein/issues} % Default URL placeholder + \newcommand{\setissueslinkurl}[1]{\renewcommand{\issueslinkurl}{#1}} \fancyfoot[R]{\EngGer{Last revised}{Stand}: \themydate \qquad \thepage/\pageref{LastPage}} - \fancyfoot[L]{Homepage: \url{\thewebsite} -- \EngGer{Please report mistakes \emph{immediately}}{Fehler bitte \emph{sofort} melden}.} + \fancyfoot[L]{Homepage: \url{\thewebsite} -- \EngGer{Please \href{\issueslinkurl}{report} mistakes \emph{immediately}}{Fehler bitte \emph{sofort} \href{\issueslinkurl}{melden}}.} % Title diff --git a/write-gitid.sh b/write-gitid.sh index 85d217d..59ebaf9 100755 --- a/write-gitid.sh +++ b/write-gitid.sh @@ -12,3 +12,15 @@ fi GITREV=$(git rev-list HEAD --count) echo "\\def\\GitRevision{$GITREV}"> git.id git show -s --format=%ci | xargs -I var_d $DATEBIN -d "var_d" +\\def\\GitNiceDate{%-d.\ %B\ %Y\ um\ %H:%M\ Uhr} >> git.id + +# Get the repository's remote URL +REPO_URL=$(git remote get-url origin) + +# Convert SSH URL to HTTPS URL and append /issues for the issues page +# This also ensures it works for URLs ending with .git and without +ISSUES_URL=$(echo $REPO_URL | sed -e 's/^git@github\.com:/https:\/\/github\.com\//' -e 's/\.git$//' -e 's/$/\/issues/') + +echo "\\def\\GitIssuesURL{$ISSUES_URL}" >> git.id + +#Copy git.id into template-files +cp git.id template-files/git.id