added devcontainer config

This commit is contained in:
2026-08-19 10:03:45 +02:00
parent faadaee37f
commit 949dfbe414
4 changed files with 520 additions and 8 deletions

54
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,54 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu
# Install dependencies for TeX Live installation and usage
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
perl \
biber \
wget \
fontconfig \
make \
git \
curl \
python3 \
python3-pygments \
&& rm -rf /var/lib/apt/lists/*
# Set non-root user provided by Microsoft base image
ARG USERNAME=vscode
# Switch to user home directory
USER $USERNAME
WORKDIR /home/$USERNAME
# Set TeX Live paths and update environment
ENV TEXLIVE_INSTALL_PREFIX="/usr/local/texlive"
ENV TEXLIVE_INSTALL_TEXDIR="${TEXLIVE_INSTALL_PREFIX}/2025"
ENV PATH="${TEXLIVE_INSTALL_TEXDIR}/bin/x86_64-linux:${PATH}"
# Download and install TeX Live 2025 as root
RUN wget -q https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz && \
tar -xzf install-tl-unx.tar.gz && \
rm install-tl-unx.tar.gz && \
cd install-tl-* && \
echo "selected_scheme scheme-full" > texlive.profile && \
echo "TEXDIR ${TEXLIVE_INSTALL_TEXDIR}" >> texlive.profile && \
echo "TEXMFCONFIG /home/vscode/.texlive2025/texmf-config" >> texlive.profile && \
echo "TEXMFVAR /home/vscode/.texlive2025/texmf-var" >> texlive.profile && \
echo "instopt_adjustpath 1" >> texlive.profile && \
echo "tlpdbopt_autobackup 0" >> texlive.profile && \
sudo perl ./install-tl --profile=texlive.profile --no-interaction && \
cd .. && rm -rf install-tl-*
# User-writeable directories for TeX Live and LuaLaTeX
ENV TEXMFCONFIG="/home/vscode/.texlive2025/texmf-config"
ENV TEXMFVAR="/home/vscode/.texlive2025/texmf-var"
ENV LUAOTFLOAD_HOME="/home/vscode/.texlive2025/texmf-var/luatex-cache"
ENV LUAOTFLOAD_DB="/home/vscode/.texlive2025/texmf-var/luatex-cache/database.sqlite"
# Install latexmk
RUN sudo tlmgr option autobackup 0 && \
sudo tlmgr install latexmk && \
sudo tlmgr path add
# Set the working directory back to a neutral location
WORKDIR /workspace

View File

@@ -0,0 +1,128 @@
{
"name": "LaTeX Dev Container",
"image": "ghcr.io/khannurien/latex-devcontainer:2025.12",
"customizations": {
"vscode": {
"settings": {
// VSCode text editor settings
"editor.padding.top": 20,
"editor.padding.bottom": 20,
"editor.fontSize": 16,
"editor.tabSize": 2,
"editor.lineHeight": 1.8,
"editor.cursorBlinking": "phase",
"editor.unicodeHighlight.nonBasicASCII": false,
"editor.wordWrap": "on",
"editor.wrappingStrategy": "advanced",
"editor.wordBasedSuggestions": "off",
// "editor.quickSuggestions": {
// "other": "on",
// "comments": "off",
// "strings": "off"
// },
// "editor.acceptSuggestionOnEnter": "off",
// LaTeX Workshop settings
"latex-workshop.intellisense.package.enabled": true,
"latex-workshop.intellisense.unimathsymbols.enabled": true,
"latex-workshop.intellisense.citation.backend": "biblatex",
"latex-workshop.latex.outDir": "build",
"latex-workshop.latex.autoBuild.run": "onFileChange",
"latex-workshop.latex.autoBuild.interval": 3000,
"latex-workshop.synctex.afterBuild.enabled": true,
"latex-workshop.view.autoFocus.enabled": false,
"latex-workshop.view.pdf.reload.transition": "fade",
"latex-workshop.view.pdf.viewer": "tab",
"latex-workshop.view.pdf.zoom": "auto",
"latex-workshop.latex.tools": [
{
"args": [
"-shell-escape",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"-outdir=%OUTDIR%",
"-out2dir=.",
"-pdflatex",
"-e",
"$bibtex='biber %O %S';",
"%DOC%"
],
"command": "latexmk",
"name": "latexmk + pdflatex + biber"
},
{
"args": [
"-shell-escape",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"-outdir=%OUTDIR%",
"-out2dir=.",
"-xelatex",
"-e",
"$bibtex='biber %O %S';",
"%DOC%"
],
"command": "latexmk",
"name": "latexmk + xelatex + biber"
},
{
"args": [
"-shell-escape",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"-outdir=%OUTDIR%",
"-out2dir=.",
"-lualatex",
"-e",
"$bibtex='biber %O %S';",
"%DOC%"
],
"command": "latexmk",
"name": "latexmk + lualatex + biber"
}
],
"latex-workshop.latex.recipes": [
{
"name": "latexmk + lualatex + biber",
"tools": [
"latexmk + lualatex + biber"
]
},
{
"name": "latexmk + xelatex + biber",
"tools": [
"latexmk + xelatex + biber"
]
},
{
"name": "latexmk + pdflatex + biber",
"tools": [
"latexmk + pdflatex + biber"
]
}
],
"latex-workshop.latex.recipe.default": "lastUsed",
// VSCode workbench settings
"workbench.startupEditor": "none",
"workbench.sideBar.location": "left",
"workbench.activityBar.location": "top",
"workbench.panel.opensMaximized": "always"
},
"extensions": [
"james-yu.latex-workshop",
"wayou.vscode-todo-highlight",
"Braver.vscode-solarized",
"hediet.vscode-drawio",
"mathematic.vscode-pdf"
]
}
},
"remoteUser": "vscode",
"updateRemoteUserUID": true,
"features": {}
}

304
.gitignore vendored Normal file
View File

@@ -0,0 +1,304 @@
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb
## Intermediate documents:
*.dvi
*.xdv
*-converted-to.*
# these rules might exclude image files for figures etc.
# *.ps
# *.eps
# *.pdf
## Generated if empty string is given at "Please type another file name for output:"
.pdf
## Bibliography auxiliary files (bibtex/biblatex/biber):
*.bbl
*.bcf
*.blg
*-blx.aux
*-blx.bib
*.run.xml
## Build tool auxiliary files:
*.fdb_latexmk
*.synctex
*.synctex(busy)
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
## Build tool directories for auxiliary files
# latexrun
latex.out/
## Auxiliary and intermediate files from other packages:
# algorithms
*.alg
*.loa
# achemso
acs-*.bib
# amsthm
*.thm
# beamer
*.nav
*.pre
*.snm
*.vrb
# changes
*.soc
# comment
*.cut
# cprotect
*.cpt
# elsarticle (documentclass of Elsevier journals)
*.spl
# endnotes
*.ent
# fixme
*.lox
# feynmf/feynmp
*.mf
*.mp
*.t[1-9]
*.t[1-9][0-9]
*.tfm
#(r)(e)ledmac/(r)(e)ledpar
*.end
*.?end
*.[1-9]
*.[1-9][0-9]
*.[1-9][0-9][0-9]
*.[1-9]R
*.[1-9][0-9]R
*.[1-9][0-9][0-9]R
*.eledsec[1-9]
*.eledsec[1-9]R
*.eledsec[1-9][0-9]
*.eledsec[1-9][0-9]R
*.eledsec[1-9][0-9][0-9]
*.eledsec[1-9][0-9][0-9]R
# glossaries
*.acn
*.acr
*.glg
*.glo
*.gls
*.glsdefs
*.lzo
*.lzs
*.slg
*.slo
*.sls
# uncomment this for glossaries-extra (will ignore makeindex's style files!)
# *.ist
# gnuplot
*.gnuplot
*.table
# gnuplottex
*-gnuplottex-*
# gregoriotex
*.gaux
*.glog
*.gtex
# htlatex
*.4ct
*.4tc
*.idv
*.lg
*.trc
*.xref
# hyperref
*.brf
# knitr
*-concordance.tex
# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files
# *.tikz
*-tikzDictionary
# listings
*.lol
# luatexja-ruby
*.ltjruby
# makeidx
*.idx
*.ilg
*.ind
# minitoc
*.maf
*.mlf
*.mlt
*.mtc[0-9]*
*.slf[0-9]*
*.slt[0-9]*
*.stc[0-9]*
# minted
_minted*
*.pyg
# morewrites
*.mw
# newpax
*.newpax
# nomencl
*.nlg
*.nlo
*.nls
# pax
*.pax
# pdfpcnotes
*.pdfpc
# sagetex
*.sagetex.sage
*.sagetex.py
*.sagetex.scmd
# scrwfile
*.wrt
# svg
svg-inkscape/
# sympy
*.sout
*.sympy
sympy-plots-for-*.tex/
# pdfcomment
*.upa
*.upb
# pythontex
*.pytxcode
pythontex-files-*/
# tcolorbox
*.listing
# thmtools
*.loe
# TikZ & PGF
*.dpth
*.md5
*.auxlock
# titletoc
*.ptc
# todonotes
*.tdo
# vhistory
*.hst
*.ver
# easy-todo
*.lod
# xcolor
*.xcp
# xmpincl
*.xmpi
# xindy
*.xdy
# xypic precompiled matrices and outlines
*.xyc
*.xyd
# endfloat
*.ttt
*.fff
# Latexian
TSWLatexianTemp*
## Editors:
# WinEdt
*.bak
*.sav
# Texpad
.texpadtmp
# LyX
*.lyx~
# Kile
*.backup
# gummi
.*.swp
# KBibTeX
*~[0-9]*
# TeXnicCenter
*.tps
# auto folder when using emacs and auctex
./auto/*
*.el
# expex forward references with \gathertags
*-tags.tex
# standalone packages
*.sta
# Makeindex log files
*.lpz
# xwatermark package
*.xwm
# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib
# option is specified. Footnotes are the stored in a file with suffix Notes.bib.
# Uncomment the next line to have this generated file ignored.
#*Notes.bib
*/build/
*.pdf

View File

@@ -73,7 +73,7 @@
% https://steeven9.github.io/USI-LaTeX/html/packages_hyperref_babel_xcolor3.html
% Section 3.2 of:
% https://mirror.ibcp.fr/pub/CTAN/macros/latex/contrib/beamer-contrib/themes/moloch/moloch.pdf
\definecolor{ubo}{HTML}{8c3759}
\definecolor{ubo}{HTML}{5e548e}
\setbeamercolor{progress bar}{fg=ubo}
\setbeamercolor{title separator}{fg=ubo}
\setbeamercolor{frametitle}{bg=ubo}
@@ -107,7 +107,7 @@
\node[anchor=south west,inner sep=0] (B) at (4,0)
{\includegraphics[#1]{#2}};
\alt#3{}{%
\fill [draw=none, fill=palette primary.fg, fill opacity=0.9] (B.north west) -- (B.north east) -- (B.south east) -- (B.south west) -- (B.north west) -- cycle;
\fill [draw=none, fill=bg, fill opacity=0.9] (B.north west) -- (B.north east) -- (B.south east) -- (B.south west) -- (B.north west) -- cycle;
}
\end{tikzpicture}
}
@@ -125,14 +125,33 @@
\newcommand{\xmark}{{\color{BrickRed}\ding{55}}}
\newcommand{\imark}{{\color{Orange}\ding{109}}}
% pills
\newcommand{\DONE}{%
\CircledParamOpts{inner color=black, outer color=LimeGreen, fill color=LimeGreen}{1}{\textbf{DONE}} %
\RequirePackage{xparse}
\NewDocumentCommand{\DONE}{g}{%
\IfNoValueTF{#1}{%
\CircledParamOpts{inner color=black, outer color=LimeGreen, fill color=LimeGreen}
{1}{\textbf{DONE}}%
}{%
\CircledParamOpts{inner color=black, outer color=LimeGreen, fill color=LimeGreen}
{1}{\textbf{DONE --} #1}%
}%
}
\newcommand{\TODO}{%
\CircledParamOpts{inner color=black, outer color=Goldenrod, fill color=Goldenrod}{1}{\textbf{TODO}} %
\NewDocumentCommand{\TODO}{g}{%
\IfNoValueTF{#1}{%
\CircledParamOpts{inner color=black, outer color=Goldenrod, fill color=Goldenrod}
{1}{\textbf{TODO}}%
}{%
\CircledParamOpts{inner color=black, outer color=Goldenrod, fill color=Goldenrod}
{1}{\textbf{TODO --} #1}%
}%
}
\newcommand{\FIXME}{%
\CircledParamOpts{inner color=white, outer color=Red, fill color=Red}{1}{\textbf{FIXME}} %
\NewDocumentCommand{\FIXME}{g}{%
\IfNoValueTF{#1}{%
\CircledParamOpts{inner color=white, outer color=Red, fill color=Red}
{1}{\textbf{FIXME}}%
}{%
\CircledParamOpts{inner color=white, outer color=Red, fill color=Red}
{1}{\textbf{FIXME --} #1}%
}%
}
% custom font size for a slide (cf. https://tex.stackexchange.com/a/401409)
\RequirePackage{environ}
@@ -166,6 +185,13 @@
\renewcommand\tabularxcolumn[1]{m{#1}}
% links
\RequirePackage{hyperref}
\hypersetup{
colorlinks,
anchorcolor=ubo,
citecolor=ubo,
linkcolor=,
urlcolor=ubo
}
% redefine title page
% https://tex.stackexchange.com/a/396409