128 lines
5.0 KiB
TeX
128 lines
5.0 KiB
TeX
%%% File: nordwind.sty
|
|||
|
|
\NeedsTeXFormat{LaTeX2e}
|
||
|
|
\ProvidesPackage{nordwind}[2026/09/21 Nordwind AG corporate identity]
|
||
|
|
|
||
|
|
% What a company writes, and the only file of a company that carries a value.
|
||
|
|
%
|
||
|
|
% It carries the name of the company and nothing else: a document of this company
|
||
|
|
% writes `\usepackage{nordwind}` and has the identity and the template of the
|
||
|
|
% family in one line. Its letter class and its presentation theme load the same
|
||
|
|
% file with `plain`, which gives them the identity and the logo without the
|
||
|
|
% page of a document.
|
||
|
|
%
|
||
|
|
% Nordwind AG is the example of the suite: a company that does not exist, with a
|
||
|
|
% palette of three colours so that the two layers are visible. A company copies
|
||
|
|
% this file, replaces the values, and calls it after itself.
|
||
|
|
%
|
||
|
|
% The NAME of the file is the name of the company, and it has to be free: TeX
|
||
|
|
% Live ships a package called `example`, and a document that wrote
|
||
|
|
% `\usepackage{example}` got that one instead of this company — measured on
|
||
|
|
% 2026-09-21 with a probe that reported the page of the article class and never
|
||
|
|
% said that it had loaded somebody else's package.
|
||
|
|
|
||
|
|
\RequirePackage{business-identity}
|
||
|
|
|
||
|
|
% ===================
|
||
|
|
% The palette
|
||
|
|
% ===================
|
||
|
|
% Layer one, and the only place in a company with a colour value. The names are
|
||
|
|
% the ones the brand gives its colours; nothing outside this block writes a
|
||
|
|
% colour.
|
||
|
|
\definecolor{nordwind-deep}{HTML}{14425C}
|
||
|
|
\definecolor{nordwind-sea}{HTML}{3E8EA8}
|
||
|
|
\definecolor{nordwind-sand}{HTML}{C97B2A}
|
||
|
|
|
||
|
|
% ===================
|
||
|
|
% The roles
|
||
|
|
% ===================
|
||
|
|
% Layer two: what a colour is FOR. Every template of the company reads these and
|
||
|
|
% never the palette above, so a brand that changes a value changes it here and
|
||
|
|
% nowhere else. A role takes a palette entry or a mixture of two, which is what
|
||
|
|
% a brand with three colours needs to build the quiet scale it never declared.
|
||
|
|
\businesscolours{
|
||
|
|
brand = nordwind-deep,
|
||
|
|
text = black,
|
||
|
|
title = nordwind-deep,
|
||
|
|
titlemeta = nordwind-deep!60,
|
||
|
|
running-strong = nordwind-deep,
|
||
|
|
running-quiet = nordwind-deep!55,
|
||
|
|
folio = nordwind-deep!55,
|
||
|
|
caption = nordwind-deep!70,
|
||
|
|
rowrule = nordwind-deep!25,
|
||
|
|
heading-bg = nordwind-deep,
|
||
|
|
heading-fg = white,
|
||
|
|
border = nordwind-sea,
|
||
|
|
thick-border = nordwind-deep,
|
||
|
|
black-border = black,
|
||
|
|
}
|
||
|
|
|
||
|
|
% ===================
|
||
|
|
% The faces
|
||
|
|
% ===================
|
||
|
|
% fontspec is called by the company, because it is code and not a value: this one
|
||
|
|
% takes three families every TeX installation carries, so the example builds
|
||
|
|
% anywhere. A real company names its own files or its own package here.
|
||
|
|
\setmainfont{TeX Gyre Pagella}
|
||
|
|
\setsansfont{TeX Gyre Heros}
|
||
|
|
\setmonofont{TeX Gyre Cursor}[Scale=MatchLowercase]
|
||
|
|
% The letter head of `g-brief2` asks for small capitals, and where the face has
|
||
|
|
% none LaTeX substitutes silently and writes "Font shape undefined" into every
|
||
|
|
% build log. The substitution is raised to a rule here, so the page is the same
|
||
|
|
% and the log is quiet. A company whose face really has small capitals leaves
|
||
|
|
% this out.
|
||
|
|
\businessfonts{
|
||
|
|
default = rm,
|
||
|
|
symbols = DejaVu Sans,
|
||
|
|
smallcaps = false,
|
||
|
|
}
|
||
|
|
|
||
|
|
% ===================
|
||
|
|
% The logo
|
||
|
|
% ===================
|
||
|
|
% The company draws its icon, so it hands the suite a command instead of a file:
|
||
|
|
% a drawing takes parameters that no file name can carry. The command takes a
|
||
|
|
% height and leaves a box of exactly that height. A company whose logo IS a file
|
||
|
|
% writes `icon = nordwind-icon` instead, without an extension.
|
||
|
|
%
|
||
|
|
% `\pgfresetboundingbox` with an explicit bounding box is what makes the box
|
||
|
|
% keep its proportions: `\resizebox` otherwise compensates for the line width,
|
||
|
|
% and the same drawing comes out at two different widths at two heights. The
|
||
|
|
% address line is set to the WIDTH of this box, so everything under the logo
|
||
|
|
% hangs on it.
|
||
|
|
%
|
||
|
|
% The compass needle is cut OUT of the disc and not drawn on it: the same
|
||
|
|
% drawing then stands on the paper and on the brand-coloured bar of a deck, and
|
||
|
|
% it carries exactly one colour — the one the caller asked for, which reaches
|
||
|
|
% the drawing as `\businesslogocolour`.
|
||
|
|
\RequirePackage{tikz}
|
||
|
|
\newcommand{\nordwindicon}[1]{%
|
||
|
|
\resizebox{!}{#1}{%
|
||
|
|
\begin{tikzpicture}[x=1cm,y=1cm]
|
||
|
|
\fill[\businesslogocolour, even odd rule]
|
||
|
|
(0,0) circle (0.5)
|
||
|
|
(0,0.34) -- (0.13,-0.06) -- (0,-0.02) -- (-0.13,-0.06) -- cycle
|
||
|
|
(0,-0.34) -- (0.13,0.06) -- (0,0.02) -- (-0.13,0.06) -- cycle;
|
||
|
|
\pgfresetboundingbox
|
||
|
|
\path[use as bounding box] (-0.5,-0.5) rectangle (0.5,0.5);
|
||
|
|
\end{tikzpicture}}}
|
||
|
|
|
||
|
|
\businessidentity{
|
||
|
|
name = Nordwind,
|
||
|
|
url = https://nordwind.example,
|
||
|
|
address = https://nordwind.example,
|
||
|
|
lockup = icon+text,
|
||
|
|
icon code = \nordwindicon,
|
||
|
|
}
|
||
|
|
|
||
|
|
% ===================
|
||
|
|
% The template of the family
|
||
|
|
% ===================
|
||
|
|
% Everything a document of this company gets beyond its identity. Whatever the
|
||
|
|
% document wrote at `\usepackage` reaches the template: `plain` for a letter
|
||
|
|
% class or a presentation theme, which then take the identity and the logo and
|
||
|
|
% none of the page.
|
||
|
|
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{business-suite}}
|
||
|
|
\ProcessOptions\relax
|
||
|
|
\RequirePackage{business-suite}
|
||
|
|
|
||
|
|
\endinput
|