Skip to content

Commit

Permalink
Move l3graphics to l3kernel (stable)
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Apr 19, 2023
1 parent 42a19bf commit 7702ad1
Show file tree
Hide file tree
Showing 68 changed files with 73 additions and 296 deletions.
73 changes: 16 additions & 57 deletions l3backend/l3backend-graphics.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,6 @@
%<@@=graphics>
% \end{macrocode}
%
% \begin{macro}{\@@_backend_loaded:n}
% To deal with file load ordering. Plain users are on their own.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_loaded:n #1
{
\cs_if_exist:NTF \hook_gput_code:nnn
{
\hook_gput_code:nnn
{ package / l3graphics / after }
{ backend }
{#1}
}
{#1}
}
% \end{macrocode}
% \end{macro}
%
% \subsection{\texttt{dvips} backend}
%
% \begin{macrocode}
Expand All @@ -85,19 +68,15 @@
%
% \begin{variable}{\l_graphics_search_ext_seq}
% \begin{macrocode}
\@@_backend_loaded:n
{ \seq_set_from_clist:Nn \l_graphics_search_ext_seq { .eps , .ps } }
\seq_set_from_clist:Nn \l_graphics_search_ext_seq { .eps , .ps }
% \end{macrocode}
% \end{variable}
%
% \begin{macro}{\@@_backend_getbb_eps:n, \@@_backend_getbb_ps:n}
% Simply use the generic function.
% \begin{macrocode}
\@@_backend_loaded:n
{
\cs_new_eq:NN \@@_backend_getbb_eps:n \@@_read_bb:n
\cs_new_eq:NN \@@_backend_getbb_ps:n \@@_read_bb:n
}
\cs_new_eq:NN \@@_backend_getbb_eps:n \@@_read_bb:n
\cs_new_eq:NN \@@_backend_getbb_ps:n \@@_read_bb:n
% \end{macrocode}
% \end{macro}
%
Expand All @@ -122,8 +101,7 @@
%
% \begin{macro}{\@@_backend_get_pagecount:n}
% \begin{macrocode}
\@@_backend_loaded:n
{ \cs_new_eq:NN \@@_backend_get_pagecount:n \@@_get_pagecount:n }
\cs_new_eq:NN \@@_backend_get_pagecount:n \@@_get_pagecount:n
% \end{macrocode}
% \end{macro}
%
Expand All @@ -139,12 +117,8 @@
%
% \begin{variable}{\l_graphics_search_ext_seq}
% \begin{macrocode}
\@@_backend_loaded:n
{
\seq_set_from_clist:Nn
\l_graphics_search_ext_seq
{ .pdf , .eps , .ps , .png , .jpg , .jpeg }
}
\seq_set_from_clist:Nn \l_graphics_search_ext_seq
{ .pdf , .eps , .ps , .png , .jpg , .jpeg }
% \end{macrocode}
% \end{variable}
%
Expand Down Expand Up @@ -378,11 +352,8 @@
%
% \begin{variable}{\l_graphics_search_ext_seq}
% \begin{macrocode}
\@@_backend_loaded:n
{
\seq_set_from_clist:Nn \l_graphics_search_ext_seq
{ .pdf , .eps , .ps , .png , .jpg , .jpeg , .bmp }
}
\seq_set_from_clist:Nn \l_graphics_search_ext_seq
{ .pdf , .eps , .ps , .png , .jpg , .jpeg , .bmp }
% \end{macrocode}
% \end{variable}
%
Expand All @@ -396,11 +367,8 @@
% Simply use the generic functions: only for \texttt{dvipdfmx} in the
% extraction cases.
% \begin{macrocode}
\@@_backend_loaded:n
{
\cs_new_eq:NN \@@_backend_getbb_eps:n \@@_read_bb:n
\cs_new_eq:NN \@@_backend_getbb_ps:n \@@_read_bb:n
}
\cs_new_eq:NN \@@_backend_getbb_eps:n \@@_read_bb:n
\cs_new_eq:NN \@@_backend_getbb_ps:n \@@_read_bb:n
%<*dvipdfmx>
\cs_new_protected:Npn \@@_backend_getbb_jpg:n #1
{
Expand Down Expand Up @@ -543,8 +511,7 @@
% \begin{macro}{\@@_backend_get_pagecount:n}
% \begin{macrocode}
%<*dvipdfmx>
\@@_backend_loaded:n
{ \cs_new_eq:NN \@@_backend_get_pagecount:n \@@_get_pagecount:n }
\cs_new_eq:NN \@@_backend_get_pagecount:n \@@_get_pagecount:n
%</dvipdfmx>
% \end{macrocode}
% \end{macro}
Expand Down Expand Up @@ -688,12 +655,8 @@
%
% \begin{variable}{\l_graphics_search_ext_seq}
% \begin{macrocode}
\@@_backend_loaded:n
{
\seq_set_from_clist:Nn
\l_graphics_search_ext_seq
{ .svg , .pdf , .eps , .ps , .png , .jpg , .jpeg }
}
\seq_set_from_clist:Nn \l_graphics_search_ext_seq
{ .svg , .pdf , .eps , .ps , .png , .jpg , .jpeg }
% \end{macrocode}
% \end{variable}
%
Expand Down Expand Up @@ -804,11 +767,8 @@
% \begin{macro}{\@@_backend_getbb_eps:n, \@@_backend_getbb_ps:n}
% Simply use the generic function.
% \begin{macrocode}
\@@_backend_loaded:n
{
\cs_new_eq:NN \@@_backend_getbb_eps:n \@@_read_bb:n
\cs_new_eq:NN \@@_backend_getbb_ps:n \@@_read_bb:n
}
\cs_new_eq:NN \@@_backend_getbb_eps:n \@@_read_bb:n
\cs_new_eq:NN \@@_backend_getbb_ps:n \@@_read_bb:n
% \end{macrocode}
% \end{macro}
%
Expand Down Expand Up @@ -913,8 +873,7 @@
%
% \begin{macro}{\@@_backend_get_pagecount:n}
% \begin{macrocode}
\@@_backend_loaded:n
{ \cs_new_eq:NN \@@_backend_get_pagecount:n \@@_get_pagecount:n }
\cs_new_eq:NN \@@_backend_get_pagecount:n \@@_get_pagecount:n
% \end{macrocode}
% \end{macro}
%
Expand Down
3 changes: 3 additions & 0 deletions l3experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ this project uses date-based 'snapshot' version identifiers.
### Added
- Key `pdf-attr` to `l3graphics` for additional attribute setting

### Removed
- `l3graphics` package: integrated into `l3kernel`

### Fixed
- Grouping in `\draw_path_arc_axes:nnnn` (see \#1195)

Expand Down
1 change: 0 additions & 1 deletion l3experimental/build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ top of LaTeX2e with no changes to the existing kernel.
The present release includes:
- `l3benchmark` for measuring the time taken by TeX to run certain code;
- `l3draw`, a code-level interface for constructing drawings;
- `l3graphics`, an interfaces for the inclusion of graphics files;
- `l3str`, support for string manipulation;
- `l3sys-shell`, which provides abstractions for common shell functions like
file deletion and copying;
Expand Down
34 changes: 0 additions & 34 deletions l3experimental/l3graphics/build.lua

This file was deleted.

56 changes: 0 additions & 56 deletions l3experimental/l3graphics/l3graphics.ins

This file was deleted.

16 changes: 0 additions & 16 deletions l3experimental/l3graphics/testfiles/m3graphics000.lvt

This file was deleted.

13 changes: 0 additions & 13 deletions l3experimental/l3graphics/testfiles/m3graphics000.tlg

This file was deleted.

1 change: 1 addition & 0 deletions l3kernel/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ this project uses date-based 'snapshot' version identifiers.
`\text_declare_titlecase_mapping:nn(n)`
and `\text_declare_uppercase_mapping:nn(n)` to allow customization of
case changing outcomes
- Module `l3graphics`, moved from `l3experimental` to stable status

### Changed
- `\box_set_trim:Nnnnn` and `\box_set_viewport:Nnnnn` moved to
Expand Down
4 changes: 3 additions & 1 deletion l3kernel/config-backend.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ specialformats.latex =
}
}
checkengines =
{"pdftex", "luatex", "xetex", "etex-dvips", "etex-dvisvgm", "ptex", "uptex"}
{"pdftex", "luatex", "xetex", "etex-dvips", "etex-dvisvgm", "ptex", "uptex"}

dynamicfiles = {"*-eps-converted-to.pdf"}
1 change: 1 addition & 0 deletions l3kernel/l3.ins
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ and all files in that bundle must be distributed together.
\from{l3regex.dtx} {package}
\from{l3box.dtx} {package}
\from{l3color.dtx} {package}
\from{l3graphics.dtx} {package}
\from{l3pdf.dtx} {package}
\from{l3coffins.dtx} {package}
\from{l3luatex.dtx} {package,tex}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
%
% http://www.latex-project.org/lppl.txt
%
% This file is part of the "l3experimental bundle" (The Work in LPPL)
% This file is part of the "l3kernel bundle" (The Work in LPPL)
% and all files in that bundle must be distributed together.
%
% -----------------------------------------------------------------------
Expand Down Expand Up @@ -49,9 +49,7 @@
%
% \begin{documentation}
%
% \section{\pkg{l3graphics} documentation}
%
% \subsection{Graphics keys}
% \section{Graphics keys}
%
% Inclusion of graphic files requires a range of low-level data be passed to
% the backend. This is set up using a small number of key--value settings,
Expand Down Expand Up @@ -97,7 +95,7 @@
% \emph{type} is determined from the file extension.
% \end{variable}
%
% \subsection{Including graphics}
% \section{Including graphics}
%
% \begin{function}{\graphics_include:nn, \graphics_include:nV}
% \begin{syntax}
Expand Down Expand Up @@ -127,7 +125,7 @@
% variable content. Spaces need not be quoted.
% \end{variable}
%
% \subsection{Utility functions}
% \section{Utility functions}
%
% \begin{function}[noTF]{\graphics_get_full_name:nN}
% \begin{syntax}
Expand Down Expand Up @@ -183,11 +181,6 @@
%<@@=graphics>
% \end{macrocode}
%
% \begin{macrocode}
\ProvidesExplPackage{l3graphics}{2023-03-30}{}
{L3 Experimental graphics inclusion support}
% \end{macrocode}
%
% \begin{variable}{\l_@@_internal_dim, \l_@@_internal_ior, \l_@@_internal_tl}
% Scratch space.
% \begin{macrocode}
Expand Down Expand Up @@ -716,7 +709,7 @@
}
\cs_new_protected:Npx \@@_get_pagecount:n #1
{
\ior_shell_open:Nn \exp_not:N \l_@@_internal_ior
\exp_not:N \ior_shell_open:Nn \exp_not:N \l_@@_internal_ior
{ extractbb~-O~#1 }
\exp_not:N \ior_if_eof:NTF \exp_not:N \l_@@_internal_ior
{ \msg_error:nnn { graphics } { pipe-failed } }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%
% Copyright (C) 2022 The LaTeX Project
% Copyright (C) 2022,2023 The LaTeX Project
%

\documentclass{minimal}
Expand All @@ -10,8 +10,6 @@
\debug_on:n { check-declarations , deprecation }
\ExplSyntaxOff

\RequirePackage{l3graphics}

\begin{document}

\ExplSyntaxOn
Expand Down

0 comments on commit 7702ad1

Please sign in to comment.