[latex3-commits] [git/LaTeX3-latex3-graphics-def] hint: first draft for hitex (6f427d1)

David Carlisle d.p.carlisle at gmail.com
Tue Apr 18 16:22:27 CEST 2023


Repository : https://github.com/latex3/graphics-def
On branch  : hint
Link       : https://github.com/latex3/graphics-def/commit/6f427d1111cc05b93a1fc3dc6063d595b6fb3381

>---------------------------------------------------------------

commit 6f427d1111cc05b93a1fc3dc6063d595b6fb3381
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Tue Apr 18 15:22:27 2023 +0100

    first draft for hitex


>---------------------------------------------------------------

6f427d1111cc05b93a1fc3dc6063d595b6fb3381
 hitex.def | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/hitex.def b/hitex.def
new file mode 100644
index 0000000..98613d5
--- /dev/null
+++ b/hitex.def
@@ -0,0 +1,56 @@
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%   http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is the LaTeX3 Project.
+%%
+%% https://github.com/latex3/graphics-def/issues
+%%
+
+% VERY MINIMAL hitex file for color/graphics
+\ProvidesFile{hitex.def}
+  [2023/04/17 v0.1a Graphics/color driver for hitex]
+
+
+\def\set at color{%
+ \special{}%
+ \hi at color@warn
+ \aftergroup\reset at color}
+\def\reset at color{\special{}}%
+
+\def\hi at color@warn{%
+  \PackageWarning{color}{color not supported\@gobble}%
+  \global\let\hi at color@warn\relax}
+  
+
+\def\color at rgb#1#2{\def#1{}}
+
+\def\Gin at extensions{.png,.jpg}
+\@namedef{Gin at rule@.png}#1{{png}{.png}{#1}}
+\@namedef{Gin at rule@.jpg}#1{{jpg}{.jpg}{#1}}
+
+
+\def\Gread at png#1{%
+\setbox\@tempboxa\hbox{\HINTimage #1\relax}%
+      \def\Gin at llx{0}\let\Gin at lly\Gin at llx
+      \Gin at defaultbp\Gin at urx{\wd\@tempboxa}% = 0...
+      \Gin at defaultbp\Gin at ury{\ht\@tempboxa}% = 0...
+      \Gin at nat@height\Gin at ury
+      \Gin at nat@width\Gin at urx
+      }
+
+\def\Ginclude at png#1{%
+   \mbox{\HINTimage #1\relax}%
+}
+
+\let\Gread at jpg\Gread at png
+\let\Ginclude at jpg\Ginclude at png
+
+\endinput





More information about the latex3-commits mailing list.