Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 30 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ name: build-test-release

on:
push:
tags: ["v*.*.*"]
branches:
- "**"
tags:
- "v*.*.*"
pull_request:
workflow_dispatch:

Expand All @@ -24,35 +27,48 @@ jobs:
latex-bin
latex
tools
collection-binextra
xetex
luatex
l3build
geometry
eukdate
graphics
graphics-def
booktabs
multirow
fontspec
listings
parskip
xcolor
pgf
kvoptions
ltxcmds
kvsetkeys
etoolbox
hypdoc
hyperref
epstopdf-pkg
tex-gyre
makeindex

- name: Build & test
run: |
tlmgr update --self --all || true
cd heig-vd/latex
texlua build.lua check -e ${{ matrix.engine }}
texlua build.lua doc
texlua build.lua ctan
texlua build.lua zip
l3build check -e ${{ matrix.engine }}
l3build doc
l3build ctan

- name: Upload artifacts
if: matrix.engine == 'luatex'
uses: actions/upload-artifact@v4
with:
name: tonpkg-artifacts
name: heiglogo-artifacts
path: |
heig-vd/latex/build/distrib/*.zip
heig-vd/latex/build/doc/*.pdf
heig-vd/latex/build/*.zip
heig-vd/latex/build/distrib/ctan/*.zip
heig-vd/latex/build/doc/heiglogo.pdf
heig-vd/latex/build/local/heiglogo.sty

release:
needs: build
Expand All @@ -61,10 +77,13 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: tonpkg-artifacts
name: heiglogo-artifacts
path: artifacts

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: artifacts/**/*.zip
files: |
artifacts/**/*.zip
artifacts/**/heiglogo.pdf
artifacts/**/heiglogo.sty
4 changes: 4 additions & 0 deletions heig-vd/latex/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
build/
heiglogo.pdf
heiglogo.sty
*.aux
*.log
*.out
*.toc
*.fls
*.fdb_latexmk
heiglogo-ctan.zip
tex/
*.zip
2 changes: 1 addition & 1 deletion heig-vd/latex/build.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module = "heiglogo"

sourcefiles = {"heiglogo.dtx","heiglogo.ins"}
sourcefiles = {"heiglogo.dtx","heiglogo.ins", "fonts.pdf"}
installfiles = {"heiglogo.sty"}
typesetfiles = {"heiglogo.dtx"}
tagfiles = {"heiglogo.dtx"} -- pour versions
Expand Down
Binary file added heig-vd/latex/fonts.pdf
Binary file not shown.
35 changes: 22 additions & 13 deletions heig-vd/latex/heiglogo.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
\usepackage{multirow}
\usepackage{fontspec}
\usepackage{listings}
\usepackage{graphicx}
\usepackage{parskip}
\lstset{basicstyle=\ttfamily,breaklines=true,language=[LaTeX]TeX}

Expand All @@ -56,7 +57,7 @@ Colors can be set to black (default) or the official red (Pantone 485 C).\par

The package is implemented with TikZ for the vector logo, \textsf{fontspec} for text rendering, and expl3 keys for customization.

\section{TL; DR}
\section{TL;DR}

To use the package, compile your document with XeLaTeX or LuaLaTeX and include the package in your preamble:

Expand All @@ -67,7 +68,8 @@ To use the package, compile your document with XeLaTeX or LuaLaTeX and include t
\logo

% Red logo with title and subtitle
\logo[color, relative, height=1.5cm]{Department of Engineering}{Bachelor of Science}
\logo[color, relative, height=1.5cm]{
Department of Engineering}{Bachelor of Science}

% Change defaults globally
\heiglogoSetup{
Expand Down Expand Up @@ -191,8 +193,17 @@ You can provide both a title and a subtitle. The title will be in uppercase and

\section{Typeface}

In the original graphical identity, the typeface used is Circular Black which is a commercial font and only available to the communication department of HEIG-VD.\par
As a free alternative, the package uses Arial Bold (or Helvetica Bold if Arial is not available) which is widely available and similar in appearance.
The official \textsc{HEIG-VD} visual identity uses the Circular Black typeface, a commercial font licensed exclusively to the Communication Department.

As a free alternative, the Communication Department recommends using \emph{Arial Bold} (or \emph{Helvetica Bold} if Arial is not available). Both fonts are common on Windows and macOS systems, but they are commercially licensed and therefore not readily available on most Linux distributions.

To ensure broad compatibility and avoid licensing issues, this package defaults to \textbf{TeX Gyre Heros}. This is a free, open-source typeface distributed with TeX Live, designed as a metric and visual replacement for Helvetica, and thus provides a look that is close to Arial Bold.

For comparison, here below are samples of the three fonts. We notice that TeX Gyre Heros is slightly wider than Arial Bold, which is itself slightly wider than Circular Black.

\begin{center}
\includegraphics[width=0.8\textwidth]{fonts.pdf}
\end{center}

\DocInput{heiglogo.dtx}
\end{document}
Expand Down Expand Up @@ -228,19 +239,17 @@ As a free alternative, the package uses Arial Bold (or Helvetica Bold if Arial i
% \begin{macrocode}
\RequirePackage{tikz}
% \end{macrocode}
% Fontspec is used to load and manage the Arial font (or Helvetica as a fallback).
% Fontspec is used to load and manage the fonts for the title and subtitle.
% \begin{macrocode}
\RequirePackage{fontspec}

% \end{macrocode}
% We define a new font family \cs{heiglogoFont} using Arial Bold for bold text and Arial for regular text. Helvetica Bold is provided as a fallback if Arial is not available.
% We define a new font family \cs{heiglogoFont} using TeX Gyre Heros, a Helvetica-compatible font.
% \begin{macrocode}
\newfontfamily\heiglogoFont{Arial}[
\newfontfamily\heiglogoFont{TeX Gyre Heros}[
BoldFont = * Bold,
UprightFont = * ,
NFSSFamily = heiglogo,
FontFace = {b}{n}{Arial Bold},
FontFace = {b}{n}{Helvetica Bold}, % fallback
]

% \end{macrocode}
Expand Down Expand Up @@ -478,12 +487,12 @@ As a free alternative, the package uses Arial Bold (or Helvetica Bold if Arial i

% 4) Optional text
\IfNoValueTF{#2}
{ \heiglogo@hastexttitlefalse \def\heiglogo@txt{} }
{ \heiglogo@hastexttitletrue \def\heiglogo@txt{#2} }
{ \heiglogo@hastexttitlefalse \def\heiglogo@txt{} }
{ \heiglogo@hastexttitletrue \def\heiglogo@txt{#2} }

\IfNoValueTF{#3}
{ \heiglogo@hastextsubtitlefalse \def\heiglogo@subtitle{} }
{ \heiglogo@hastextsubtitletrue \def\heiglogo@subtitle{#3} }
{ \heiglogo@hastextsubtitlefalse \def\heiglogo@subtitle{} }
{ \heiglogo@hastextsubtitletrue \def\heiglogo@subtitle{#3} }

% 5. Relative or absolute placement
\bool_if:NTF \l_heiglogo_relative_bool
Expand Down