diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ec9c2f..dccd6b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,10 @@ name: build-test-release on: push: - tags: ["v*.*.*"] + branches: + - "**" + tags: + - "v*.*.*" pull_request: workflow_dispatch: @@ -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 @@ -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 diff --git a/heig-vd/latex/.gitignore b/heig-vd/latex/.gitignore index afa8730..cad08be 100644 --- a/heig-vd/latex/.gitignore +++ b/heig-vd/latex/.gitignore @@ -1,8 +1,12 @@ build/ heiglogo.pdf +heiglogo.sty *.aux *.log *.out *.toc *.fls *.fdb_latexmk +heiglogo-ctan.zip +tex/ +*.zip diff --git a/heig-vd/latex/build.lua b/heig-vd/latex/build.lua index 1c648d8..eee9f63 100644 --- a/heig-vd/latex/build.lua +++ b/heig-vd/latex/build.lua @@ -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 diff --git a/heig-vd/latex/fonts.pdf b/heig-vd/latex/fonts.pdf new file mode 100644 index 0000000..46eab84 Binary files /dev/null and b/heig-vd/latex/fonts.pdf differ diff --git a/heig-vd/latex/heiglogo.dtx b/heig-vd/latex/heiglogo.dtx index 9a49331..bf19b8e 100644 --- a/heig-vd/latex/heiglogo.dtx +++ b/heig-vd/latex/heiglogo.dtx @@ -33,6 +33,7 @@ \usepackage{multirow} \usepackage{fontspec} \usepackage{listings} +\usepackage{graphicx} \usepackage{parskip} \lstset{basicstyle=\ttfamily,breaklines=true,language=[LaTeX]TeX} @@ -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: @@ -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{ @@ -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} @@ -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} @@ -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