Archive for the ‘Pakete’ Category.

Das thematicpuzzle Paket

Es gibt ein neues Paket auf CTAN, thematicpuzzle. Damit gehen dann TikZ-basiert Dinge wie die folgenden (der Anleitung entnommen):

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website

Python und LaTeX in einem Lauf kombinieren mit pylualatex

Mi dem pylualatex Paket gibt es eine neue Möglichkeit, Python und LaTeX miteinander zu „verheiraten“. Das Besondere an diesem Paket ist, dass es keine zwei Durchläufe benötigt, sondern nur einen einzigen.

%!TEX TS-program = Arara
% arara: lualatex: {shell: yes}
 
\documentclass{article}
 
\usepackage[executable=python.exe,localimports=false]{pyluatex} 
 
\begin{document}
 
\py{2**2**2}
 
\end{document}

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website

Silbentrennung und Kerning anzeigen mit showhyphenation und showkerning

Für LuaLaTeX gibt es mit showhyphenation und showkerning zwei interessante Pakete, die die möglichen Trennstellen bzw. das Kerning anzeigen.

%!TEX TS-program = lualatex
\documentclass[12pt,ngerman]{scrartcl}
 
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{blindtext}
\usepackage{microtype}
 
\usepackage{showhyphenation}
\usepackage[ontop]{showkerning}
\begin{document}
 
\blindtext
 
\blindtext
 
 
\end{document}

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website

LaTeX Briefe mit KOMA-Script und dem scrletter Paket

Neben der Nutzung der scrlttr2 Klasse gibt es in aktuelleren KOMA-Script Versionen auch die Möglichkeit, das scrletter-Paket zu nutzen. Hier ein Beispiel:

\documentclass[12pt,ngerman]{scrartcl}
 
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{booktabs}
\usepackage{babel}
\usepackage{graphicx}
\usepackage{csquotes}
\usepackage{paralist}
\usepackage{xcolor}
\usepackage{palatino}
\usepackage{blindtext}
\usepackage{scrletter}
 
\setkomavar{fromname}{Max Mustermann}
\setkomavar{fromemail}{Max@Mustermann.de}
 
\setkomavar{fromaddress}{Musterweg 221, 12345 Musterstadt}
 
\setkomavar{firstfoot}{\usekomavar{fromemail}}
 
 
\begin{document}
\begin{letter}{Maria Mustermann \\ Mustergasse 1 \\ 12346 Musterstadt}
 
\opening{Hallo Maria,}
 
\blindtext[2]
 
\closing{Mit freundlichen Grüßen}
 
\end{letter}
\end{document}

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website

XCharter – Der passende Mathematik-Font zur Charter

Hier ein Beispiel für das XCharter Paket, das einen passenden Mathe-Font für die Charter bereitstellt.

%!TEX TS-program = LuaLaTeX
\documentclass[12pt,ngerman]{scrartcl}
 
\usepackage{fontspec}
\usepackage{babel}
\usepackage{unicode-math}
\setmathfont{XCharter-Math.otf} % Call by file name or
\setmathfont{XCharter Math} % Call by font name
 
\setmainfont{XCharter}
\setsansfont{Cabin}[Scale=MatchLowercase] % sf
\setmonofont{Inconsolatazi4}[Scale=MatchLowercase] % tt
 
\usepackage{blindtext}
 
\begin{document}
 
\blindtext
 
\begin{equation}
\int_{x=1}^{\infty} -\frac{p}{2} \pm \sqrt{ \left(\frac{p}{2}  \right)^2 -q   } 
\end{equation}
 
\blindtext
 
\end{document}

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website

Pocketmod – TODO Listen in A3

Zum Thema Pocketmod hatte ich schon früher etwas geschrieben (https://www.uweziegenhagen.de/?p=1294), hier nun ein Template für ein TODO-Listen Pocket in DIN A3.

Das fertige PDF sieht dann so aus: PocketMod_for_A3

\documentclass[21pt]{scrartcl}
\usepackage[left=2cm,right=2cm, top=2cm,bottom=2cm,a3paper]{geometry}
 
\usepackage{forloop}
\setlength{\parindent}{0pt}
\usepackage{tikz}
 
\newcounter{ct} 
\usepackage{pgfpages}
 
\def\pgfpageoptionheight{\the\paperwidth} % landscaped by default
\def\pgfpageoptionwidth{\the\paperheight}
\def\pgfpageoptionborder{0pt}
\def\pgfpageoptionfirstshipout{1}
 
\pgfpagesphysicalpageoptions{%
    logical pages=8,%
    physical height=\pgfpageoptionheight,%
    physical width=\pgfpageoptionwidth,%
    current logical shipout=\pgfpageoptionfirstshipout%
}
 
    \pgfpageslogicalpageoptions{1}{%
      border shrink=\pgfpageoptionborder,%
      resized width=.25\pgfphysicalwidth,%
      border code=\pgfusepath{stroke},%
      resized height=0.5\pgfphysicalheight,%
      center=\pgfpoint{.875\pgfphysicalwidth}{.75\pgfphysicalheight}%
    }%
    \pgfpageslogicalpageoptions{2}
    {%
      border shrink=\pgfpageoptionborder,%
      resized width=.25\pgfphysicalwidth,%
      border code=\pgfusepath{stroke},%
      rotation=180,%      
      resized height=0.5\pgfphysicalheight,%
      center=\pgfpoint{.875\pgfphysicalwidth}{.25\pgfphysicalheight}%
    }%
 
    \pgfpageslogicalpageoptions{3}
    {%
      border shrink=\pgfpageoptionborder,%
      resized width=.25\pgfphysicalwidth,%
      border code=\pgfusepath{stroke},%
      rotation=180,%      
      resized height=0.5\pgfphysicalheight,%
      center=\pgfpoint{.625\pgfphysicalwidth}{.25\pgfphysicalheight}%
    }%
    \pgfpageslogicalpageoptions{4}
    {%
      border shrink=\pgfpageoptionborder,%
      resized width=.25\pgfphysicalwidth,%
      border code=\pgfusepath{stroke},%
      rotation=180,%      
      resized height=0.5\pgfphysicalheight,%
      center=\pgfpoint{.375\pgfphysicalwidth}{.25\pgfphysicalheight}%
    }%
 
    \pgfpageslogicalpageoptions{5}
    {%
      border shrink=\pgfpageoptionborder,%
      resized width=.25\pgfphysicalwidth,%
      border code=\pgfusepath{stroke},%
      rotation=180,%
      resized height=0.5\pgfphysicalheight,%
      center=\pgfpoint{.125\pgfphysicalwidth}{.25\pgfphysicalheight}%
    }%
    \pgfpageslogicalpageoptions{6}
    {%
      border shrink=\pgfpageoptionborder,%
      resized width=.25\pgfphysicalwidth,%
      border code=\pgfusepath{stroke},%
      resized height=0.5\pgfphysicalheight,%
      center=\pgfpoint{.125\pgfphysicalwidth}{.75\pgfphysicalheight}%
    }%
 
    \pgfpageslogicalpageoptions{7}
    {%
      border shrink=\pgfpageoptionborder,%
      resized width=.25\pgfphysicalwidth,%
      border code=\pgfusepath{stroke},%
      resized height=0.5\pgfphysicalheight,%
      center=\pgfpoint{.375\pgfphysicalwidth}{.75\pgfphysicalheight}%
    }%
    \pgfpageslogicalpageoptions{8}
    {%
      border shrink=\pgfpageoptionborder,%
      resized width=.25\pgfphysicalwidth,%
      border code=\pgfusepath{stroke},%
      resized height=0.5\pgfphysicalheight,%
      center=\pgfpoint{.625\pgfphysicalwidth}{.75\pgfphysicalheight}%
    }%
 
 
\begin{document}%
 
\forloop{ct}{1}{\value{ct} < 9}{%
\begin{tikzpicture}
\foreach \i in {0,...,-17}{%
\draw[very thick] (0,\i*2) -- ++(0,1.5) -- ++(1.5,0) -- ++(0,-1.5)--cycle; 
\draw[very thick] (2.5,\i*2) -- (22,\i*2);
\draw[very thick] (23,\i*2) -- ++(0,1.5) -- ++(1.5,0) -- ++(0,-1.5)--cycle; 
}
\end{tikzpicture}
\clearpage
}
 
\end{document}

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website

Gittermuster erstellen mit gridpapers

Hier ein Beispiel dafür, wie man mit dem gridpapers Paket Muster auf Papier bringen kann, hier ein Punktmuster.

%!TEX TS-program = Arara
% arara: pdflatex: {shell: yes}
\documentclass[12pt,ngerman]{scrartcl}
\areaset{8cm}{16cm}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\pagestyle{empty}
\usepackage[pattern=dot,% 
colorset=std,
geometry={left=2.25cm,right=1.25cm,top=1cm,bottom=1.25cm},%
textarea,%
patternsize={5mm},%
dotsize={1pt}
]{gridpapers}
 
\begin{document}
~
 
\end{document}

Auszug aus der A4-Seite:

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website

Dymo Labels mit LaTeX und ticket.sty gestalten

Hier ein kurzes Beispiel, wie man mit LaTeX auch Dymo-Labels erzeugen kann, im Beispiel für die Label-Größe 57*32mm. Zum allgemeinen Verständnis von ticket.sty siehe auch meinen DTK Artikel in Ausgabe 1/2021.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage[landscape,paperheight=57mm,paperwidth=32mm,left=0mm,top=0mm,right=0mm,bottom=0mm]{geometry}
%\usepackage[sfdefault]{plex-sans}
\usepackage{palatino}
 
\begin{filecontents}[overwrite]{Dymo5732.tdf}
\unitlength=1mm
\hoffset=-25.4mm
\voffset=-29mm
\ticketNumbers{1}{1}
\ticketSize{57}{32} % Breite und Hoehe der Labels in mm
\ticketDistance{0}{0} % Abstand der Labels
\end{filecontents}
 
\usepackage[Dymo5732]{ticket}
 
\renewcommand{\ticketdefault}{}%
\makeatletter
\@boxedfalse % Rahmen um Ticket
\@emptycrossmarkfalse % Falzmarken
\@cutmarkfalse % Schnittmarken
\makeatother
 
\newcommand{\myticket}[2]{
\ticket{%
\put(10,10){\scalebox{#1}{\bfseries #2}}
}}
 
\newcommand{\myticketml}[4]{
\ticket{%
\put(5,20){\scalebox{#1}{\bfseries #2}}
\put(5,15){\scalebox{#1}{\bfseries #3}}
\put(5,10){\scalebox{#1}{\bfseries #4}}
}}
 
 
\begin{document}
\myticketml{1.25}{Dr. Max  Mustermann}{Musterweg 123}{54321~Musterstadt}
\myticket{2}{Steuern}
\end{document}

PDF

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website

Farbige Boxen in LaTeX mit tcolorbox

Hier einige Beispiele für farbige Boxen mit dem tcolorbox Paket, entnommen der Paketbeschreibung

\documentclass[12pt,ngerman]{scrartcl}
 
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{booktabs}
\usepackage{babel}
\usepackage{graphicx}
\usepackage{csquotes}
\usepackage{paralist}
\usepackage{xcolor}
\usepackage{blindtext}
\usepackage{microtype}
 
\usepackage{empheq}
\usepackage[most]{tcolorbox}
\tcbuselibrary{theorems}
 
\newtcbtheorem[number within=section]{mytheo}{My Theorem}%
{colback=green!5,colframe=green!35!black,fonttitle=\bfseries}{th}
 
\begin{document}
 
 
\begin{tcolorbox}
Hallo Welt!
\end{tcolorbox}
 
 
\begin{tcolorbox}
\blindtext
\end{tcolorbox}
 
\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,title=My nice heading]
This is another \textbf{tcolorbox}.
\tcblower
Here, you see the lower part of the box.
\end{tcolorbox}
 
\begin{mytheo}{This is my title}{theoexample}
This is the text of the theorem. The counter is automatically assigned and,
in this example, prefixed with the section number. This theorem is numbered with
\ref{th:theoexample}, it is given on page~\pageref{th:theoexample}.
\end{mytheo}
 
 
\begin{equation}
\tcbset{fonttitle=\footnotesize}
\tcboxmath[colback=yellow!25!white,colframe=blue]{ a^2 = 16 }
\quad \Rightarrow \quad
\tcboxmath[colback=blue!25!white,colframe=red,title=Implication]%
{ a = 4 ~\vee~ a=-4. }
\end{equation}
 
 
\newtcbox{\otherbox}[1][]{nobeforeafter,math upper,tcbox raise base,
enhanced,frame hidden,boxrule=0pt,interior style={top color=green!10!white,
bottom color=green!10!white,middle color=green!50!yellow},
fuzzy halo=1pt with green,#1}
\begin{empheq}[box=\otherbox]{align}
a&=\sin(z)\\
E&=mc^2 + \int_a^b x\, dx
\end{empheq}
\begin{equation}
\tcbhighmath{E} = \otherbox{mc^2}
\end{equation}
 
 
\newtcolorbox{mybox}[2][]{colback=red!5!white,
colframe=red!75!black,fonttitle=\bfseries,
colbacktitle=red!85!black,enhanced,
attach boxed title to top center={yshift=-2mm},
title=#2,#1}
\begin{mybox}[colback=yellow]{Hello there}
This is my own box with a mandatory title
and options.
\end{mybox}
 
\begin{tcolorbox}[enhanced,
size=minimal,auto outer arc,
width=2.1cm,octogon arc,
colback=red,colframe=white,colupper=white,
fontupper=\fontsize{6mm}{6mm}\selectfont\bfseries\sffamily,
halign=center,valign=center,
square,arc is angular,
borderline={0.2mm}{-1mm}{red} ]
STOP
\end{tcolorbox}
 
\begin{tcolorbox}[enhanced,
size=minimal,auto outer arc,
width=2.1cm,octogon arc,
colback=green,colframe=white,colupper=black,
fontupper=\fontsize{6mm}{6mm}\selectfont\bfseries\sffamily,
halign=center,valign=center,
square,arc is angular,
borderline={0.2mm}{-1mm}{green}]
GO
\end{tcolorbox}
\end{document}

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website

Kurszertifikate mit LaTeX erstellen

Das pgfornaments Paket erlaubt es, spezielle Schmuckzeichen für beispielsweise Kurszertifikate zu nutzen. Hier ein Beispiel, das ich gern für die Teilnehmerinnen und Teilnehmer meiner LaTeX-Kurse nutze.

\documentclass[16pt,ngerman]{scrartcl}
 
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{booktabs}
\usepackage{eso-pic,calc} 
\usepackage{babel}
\usepackage{graphicx}
\usepackage{csquotes}
\usepackage{paralist}
\usepackage{xcolor}  
\usepackage[a4paper,landscape,bottom=1.5cm]{geometry} % left=0pt,right=0pt,top=0pt,bottom=0pt
\usepackage{palatino,dashrule}
\usepackage{pgfornament}
\pagestyle{empty}
 
\setlength{\parindent}{0pt}
 
\makeatletter
\AddToShipoutPicture{%
  \begingroup 
    \setlength{\@tempdima}{5mm}%
    \setlength{\@tempdimb}{\paperwidth-\@tempdima-3cm}%
    \setlength{\@tempdimc}{\paperheight-\@tempdima}%
    \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimc}){%
            \pgfornament[color=magenta,anchor=north west,width=3cm]{63}} 
    \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdima}){%
            \pgfornament[color=magenta,anchor=south west,width=3cm,symmetry=h]{63}}
    \put(\LenToUnit{\@tempdimb},\LenToUnit{\@tempdima+\paperheight-1cm}){%
            \pgfornament[color=magenta,anchor=north east,width=3cm,symmetry=v]{63}}    
    \put(\LenToUnit{\@tempdimb},\LenToUnit{\@tempdima+\paperheight-21cm}){%
            \pgfornament[color=magenta,anchor=south east,width=3cm,symmetry=c]{63}} 
  \endgroup  
} 
\let\strippt\strip@pt     
\makeatother   
 
 
\begin{document}
 
\centering\Huge
 
\textbf{Zertifikat}
\vspace{20mm}
\begin{center}
Max Mustermann%\hdashrule[0.75ex]{14cm}{1pt}{3mm}
\end{center}
\vspace{1cm}\huge
 
hat erfolgreich am zweitägigen \LaTeX-Kurs der Musteruni teilgenommen. \vspace{2cm}\LARGE\flushleft
 
Musterau, \hfill\hdashrule[0.75ex]{9.5cm}{1pt}{2mm}
 
\today
 
\begin{center}
\vfill\pgfornament[width=0.7\textwidth]{88}
\end{center}
\end{document}

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website