From b86e9967616bbf2d46b5b4f278e262bd3b824f7b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 24 Mar 2020 20:52:52 +0000 Subject: graphics-def (24mar20) git-svn-id: svn://tug.org/texlive/trunk@54522 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/graphics-def/CONTRIBUTING.md | 96 ++++++++++++++++ Master/texmf-dist/doc/latex/graphics-def/README.md | 2 +- .../texmf-dist/tex/latex/graphics-def/dvisvgm.def | 123 +++++++++++++++++---- .../texmf-dist/tex/latex/graphics-def/luatex.def | 13 ++- .../texmf-dist/tex/latex/graphics-def/pdftex.def | 13 ++- 5 files changed, 212 insertions(+), 35 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/graphics-def/CONTRIBUTING.md (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/graphics-def/CONTRIBUTING.md b/Master/texmf-dist/doc/latex/graphics-def/CONTRIBUTING.md new file mode 100644 index 00000000000..1d90f1515c8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/graphics-def/CONTRIBUTING.md @@ -0,0 +1,96 @@ +Thanks for considering contributing to LaTeX2e: feedback, fixes and +ideas are all useful. Here, we ([The LaTeX3 +Project](https://www.latex-project.org)) have collected together a few +pointers to help things along. + +## Bugs + +There are thousands of packages and tools and the LaTeX Project Team +only supports a few dozen core packages beside the kernel code. We +also don't maintain any tools or the TeX-engines themselves! So if a +bug is due to code from a contributed third-party package then the LaTeX +Project Team is not able to help or fix the code as that is maintained +by others. As such, we ask you follow the procedure below as it will +help to weed cases where we cannot help. + +To report a bug it is important to provide a short test file that +exhibits the issue. The [`latexbug`](https://github.com/latex3/latexbug) +package should be loaded at the very top of any such test file used to +report a bug in LaTeX as follows: + +```latex +\RequirePackage{latexbug} % <- first line +\documentclass{article} % or some other class +... % code showing the problem +``` + +If the `latexbug` package is not part of your distribution you can +download it +[GitHub](https://raw.githubusercontent.com/latex3/latexbug/master/latexbug.sty). +In that case simply place it in the directory next to your test file (or +place it into your local `texmf` tree so that it will be always found – +how to do that depends on the installation you use). + +If `latexbug` complains about third-party packages you should first +remove those from your test file. If that is not possible, then the +bug is most likely in one of these packages and you should report the +problem to the maintainers of the package instead of opening an issue +here. However, if you think the bug is in core LaTeX (as maintained +by the LaTeX Team) even though you need the third-party packages to +demonstrate the problem, then please continue and send the bug report +to us but explain this explicitly in your description of the bug. + + +## Font related issues + +Problems that are clearly due to using a specific font setup or a +specific font are normally out of scope as we do not maintain fonts +for LaTeX and can't help with problems in that area. Especially with +XeTeX and LuaTeX people may experience issues due to font usage that +are either due to the font itself or to different versions or +treatment on different platforms. So please use Computer Modern or +Latin Modern fonts in the test files. + + + +## Layout and interface deficiencies + +Upfront we should probably stress that 'deficiencies' in the design of +of the standard document classes (`article`, `report` and `book`) as +well a questionable but long established interface behavior of commands +is something that we will normally not change, even if we can all agree +that a different behavior or a different layout would have been a better +choice. You are, of course, welcome to report issues in these areas, +using the procedure explained below, but in all likelihood such reports +will be marked as 'won't fix'. + +The reason is is that the kernel interfaces and the document classes +have been used for many years in essentially all documents (even +documents using different classes often build them upon the standard +classes in the background) and thus such changes would break or as a +minimum noticeably change nearly all existing documents. See also the +file [LaTeX2e News Issue +07](https://www.latex-project.org/news/latex2e-news/ltnews07.pdf) with +regard to this policy. + +## Code contributions + +If you want to discuss a possible contribution before (or instead of) +making a pull request, drop a line to +[the team](mailto:latex-team@latex-project.org). + +The stability of LaTeX is very important and this means that change in +the kernel is necessarily very conservative. It also means that a lot of +discussion happens before any changes are made. If you do decide to post +a pull request, please bear this in mind: we do appreciate ideas, but +cannot always integrate them into the kernel. + +If you are submitting a pull request, notice that + +- The first line of commit messages should be a short summary (up to about + 50 chars); leave a blank line then give more detail if required +- We use Travis-CI for (light) testing so add `[ci skip]` to documentation-only + commit messages +- We favour a single linear history so will rebase accepted pull requests +- Where a commit fixes or closes an issue, please include this information + in the first line of the commit message [`(fixes #X)` or similar] diff --git a/Master/texmf-dist/doc/latex/graphics-def/README.md b/Master/texmf-dist/doc/latex/graphics-def/README.md index 54737891386..41849da9937 100644 --- a/Master/texmf-dist/doc/latex/graphics-def/README.md +++ b/Master/texmf-dist/doc/latex/graphics-def/README.md @@ -1,7 +1,7 @@ LaTeX support for color and graphics ==================================== -Release 2018-01-08 +Release 2020-03-24 This bundle contains the 'engine-dependent' part of support for color and graphics in LaTeX2e (the code here will also function diff --git a/Master/texmf-dist/tex/latex/graphics-def/dvisvgm.def b/Master/texmf-dist/tex/latex/graphics-def/dvisvgm.def index e94ec8dc09d..46a3c3859c7 100644 --- a/Master/texmf-dist/tex/latex/graphics-def/dvisvgm.def +++ b/Master/texmf-dist/tex/latex/graphics-def/dvisvgm.def @@ -1,5 +1,5 @@ % Copyright 2015 by Till Tantau -% Copyright 2016 by Till Tantau and LaTeX3 Project +% Copyright 2016 2018 by Till Tantau and LaTeX3 Project % %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -15,9 +15,9 @@ %% %% https://github.com/latex3/graphics-def/issues % -\ProvidesFile{dvisvgm.def}[2017/06/20 v1.0b dvisvgm graphics driver for latex] -\def\GPT@space{ } +\ProvidesFile{dvisvgm.def}[2020/03/22 v1.2 dvisvgm graphics driver for latex] % The following is copied from dvips.def: +\def\GPT@space{ } \def\c@lor@arg#1{% \dimen@#1\p@ \ifdim\dimen@<\z@\dimen@\maxdimen\fi @@ -72,11 +72,85 @@ \def\reset@color{\special{color pop}} \def\set@page@color{\special{bgcolor \current@color}} \def\define@color@named#1#2{\expandafter\let\csname col@#1\endcsname\@nnil} -\def\Grot@start{\special{dvisvgm:raw }} -\def\Grot@end{\special{dvisvgm:raw }} -\def\Gscale@start{\special{dvisvgm:raw }} -\def\Gscale@end{\special{dvisvgm:raw }} -\def\Gin@extensions{.png,.jpg,.jpeg,.svg} +\def\Grot@start{% + \special{ps: gsave currentpoint currentpoint translate \Grot@angle\GPT@space neg rotate neg exch neg exch translate}% + \special{dvisvgm:bbox \strip@pt\wd\z@ pt \strip@pt\ht\z@ pt \strip@pt\dp\z@ pt transform}% + \special{ps: grestore}% + \special{dvisvgm:raw }% + \special{dvisvgm:bbox lock}% +} +\def\Grot@end{\special{dvisvgm:bbox unlock}\special{dvisvgm:raw }} +\def\Gscale@start{% + \special{ps: gsave currentpoint currentpoint translate \Gscale@x\GPT@space \Gscale@y\GPT@space scale neg exch neg exch translate}% + \special{dvisvgm:bbox \strip@pt\wd\z@ pt \strip@pt\ht\z@ pt \strip@pt\dp\z@ pt transform}% + \special{ps: grestore}% + \special{dvisvgm:raw }% + \special{dvisvgm:bbox lock}% +} +\let\Gscale@end\Grot@end +\def\Gin@extensions{.svg,.eps,.png,.jpg,.jpeg} +\def\Ginclude@pdf#1{\Ginclude@psorpdf{#1}{pdffile}} +\def\Ginclude@eps#1{\let\Gin@page\@empty\Ginclude@psorpdf{#1}{PSfile}} +\def\Ginclude@psorpdf#1#2{% + \message{<#1>}% + \bgroup + \def\@tempa{!}% + \dimen@\Gin@req@width + \dimen@ii.1bp% + \divide\dimen@\dimen@ii + \@tempdima\Gin@req@height + \divide\@tempdima\dimen@ii + \special{#2="#1"\GPT@space + \ifx\Gin@page\@empty\else page=\Gin@page\GPT@space\fi + llx=\Gin@llx\GPT@space + lly=\Gin@lly\GPT@space + urx=\Gin@urx\GPT@space + ury=\Gin@ury\GPT@space + \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\GPT@space\fi + \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\GPT@space\fi + \ifGin@clip clip\fi + }% + \egroup} +\@namedef{Gin@rule@.ps}#1{{eps}{.ps}{#1}} +\@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}} +\@namedef{Gin@rule@.mps}#1{{eps}{.mps}{#1}} +\@namedef{Gin@rule@.pdf}#1{{pdf}{.xbb}{#1}} +% BoundingBox determination (from dvipdfmx.def) +\def\Gread@pdf#1{% + \Gread@generic{#1}\Gread@extractbb@aux% +}% +\def\Gread@extractbb@aux#1{% + \ifeof\@inputcheck% + \immediate\openin\@inputcheck=% + "|extractbb % + \ifx\Gin@page\@empty\else -p \Gin@page\GPT@space\fi + \ifx\Gin@pagebox\@empty\else -B \Gin@pagebox\GPT@space\fi + -O \Gin@base\Gin@ext"% + \fi% + \Gread@true% + \let\@tempb\Gread@false% + \ifeof\@inputcheck% + \@latex@error% + {Cannot run pipe command. Try --shell-escape\MessageBreak% + (--enable-pipes in MikTeX) option}% + {Alternatively, execute\MessageBreak\space\space + extractbb + \ifx\Gin@page\@empty\else -p \Gin@page\GPT@space\fi + \ifx\Gin@pagebox\@empty\else -B \Gin@pagebox\GPT@space\fi + \Gin@base\Gin@ext\MessageBreak in a terminal.}% + \else% + \loop% + \read\@inputcheck to\@tempa% + \ifeof\@inputcheck% + \Gread@false% + \else% + \expandafter\Gread@find@bb\@tempa:.\\% + \fi% + \ifGread@% + \repeat% + \immediate\closein\@inputcheck% + \fi% +} \def\Ginclude@bitmap#1{% \dimen@\Gin@urx pt% \advance\dimen@ by-\Gin@llx pt% @@ -87,17 +161,17 @@ \dimen@\Gin@svg@real@height@bp pt% \advance\dimen@ by-\Gin@ury pt% \edef\Gin@svg@view@base{\strip@pt\dimen@}% -% \kern-\Gin@llx bp% - \raise\Gin@req@height\hbox{% + \Gin@req@width0.99626\Gin@req@width% + \Gin@req@height0.99626\Gin@req@height% + \raise\strip@pt\Gin@req@height bp\hbox{% \special{dvisvgm: raw - }% -% \special{dvisvgm: img \strip@pt\Gin@req@width\GPT@space \strip@pt\Gin@req@height\GPT@space #1} }% } @@ -139,32 +213,33 @@ \fi \edef\Gin@setter{\def\noexpand\Gin@urx{\Gin@urx}\def\noexpand\Gin@ury{\Gin@ury}}% \expandafter\endgroup\Gin@setter% - \def\Gin@llx{0}% + \def\Gin@llx{0}% \def\Gin@lly{0}% \edef\Gin@svg@real@width@bp{\Gin@urx}% - \edef\Gin@svg@real@height@bp{\Gin@ury}% + \edef\Gin@svg@real@height@bp{\Gin@ury}% } \def\Gin@partext{\par} \def\Gread@svg@height#1height={\@ifnextchar\relax{}{\@ifnextchar'\Gread@svg@height@apo\Gread@svg@height@double}} -\def\Gread@svg@height@apo'#1'#2\relax{\afterassignment\Gin@gobble@till@relax\dimen@#1pt\relax\dimen@0.99626\dimen@\edef\Gin@ury{\strip@pt\dimen@}} -\def\Gread@svg@height@double"#1"#2\relax{\afterassignment\Gin@gobble@till@relax\dimen@#1pt\relax\dimen@0.99626\dimen@\edef\Gin@ury{\strip@pt\dimen@}} +\def\Gread@svg@height@apo'#1'#2\relax{\afterassignment\Gin@gobble@till@relax\dimen@#1pt\relax\edef\Gin@ury{\strip@pt\dimen@}} +\def\Gread@svg@height@double"#1"#2\relax{\afterassignment\Gin@gobble@till@relax\dimen@#1pt\relax\edef\Gin@ury{\strip@pt\dimen@}} \def\Gread@svg@width#1width={\@ifnextchar\relax{}{\@ifnextchar'\Gread@svg@width@apo\Gread@svg@width@double}} -\def\Gread@svg@width@apo'#1'#2\relax{\afterassignment\Gin@gobble@till@relax\dimen@#1pt\relax\dimen@0.99626\dimen@\edef\Gin@urx{\strip@pt\dimen@}} -\def\Gread@svg@width@double"#1"#2\relax{\afterassignment\Gin@gobble@till@relax\dimen@#1pt\relax\dimen@0.99626\dimen@\edef\Gin@urx{\strip@pt\dimen@}} +\def\Gread@svg@width@apo'#1'#2\relax{\afterassignment\Gin@gobble@till@relax\dimen@#1pt\relax\edef\Gin@urx{\strip@pt\dimen@}} +\def\Gread@svg@width@double"#1"#2\relax{\afterassignment\Gin@gobble@till@relax\dimen@#1pt\relax\edef\Gin@urx{\strip@pt\dimen@}} \def\Gin@gobble@till@relax#1\relax{} +\edef\Gin@hash@tag{\string#} \@namedef{Gin@rule@.jpg}#1{{bitmap}{.xbb}{#1}} \@namedef{Gin@rule@.jpeg}#1{{bitmap}{.xbb}{#1}} \@namedef{Gin@rule@.png}#1{{bitmap}{.xbb}{#1}} -% Replace +% Replace \def\Gread@bitmap#1{% - \Gread@eps{#1}% - \dimen@\Gin@urx bp% - \advance\dimen@ by-\Gin@llx bp% + \Gread@generic{#1}\Gread@extractbb@aux% + \dimen@\Gin@urx pt% + \advance\dimen@ by-\Gin@llx pt% \edef\Gin@svg@real@width@bp{\strip@pt\dimen@}% - \dimen@\Gin@ury bp% - \advance\dimen@ by-\Gin@lly bp% + \dimen@\Gin@ury pt% + \advance\dimen@ by-\Gin@lly pt% \edef\Gin@svg@real@height@bp{\strip@pt\dimen@}% } diff --git a/Master/texmf-dist/tex/latex/graphics-def/luatex.def b/Master/texmf-dist/tex/latex/graphics-def/luatex.def index c8287ee95f9..84ed1109be6 100644 --- a/Master/texmf-dist/tex/latex/graphics-def/luatex.def +++ b/Master/texmf-dist/tex/latex/graphics-def/luatex.def @@ -128,14 +128,17 @@ \AtBeginDocument{% \def\KV@Gin@bbllx{% \PackageError{luatex.def}{% - Options `bblly', `bblly', `bburx' and `bbury'\MessageBreak - are not supported by luatex driver:\MessageBreak + Options `bblly', `bblly', `bburx', `bbury',\MessageBreak + `natheight' and `natwidth' are not\MessageBreak + supported by luatex driver:\MessageBreak use `viewport' instead% }\@ehc }% \let\KV@Gin@bblly\KV@Gin@bbllx \let\KV@Gin@bburx\KV@Gin@bbllx \let\KV@Gin@bbury\KV@Gin@bbllx + \let\KV@Gin@natwidth\KV@Gin@bbllx + \let\KV@Gin@natheight\KV@Gin@bbllx \def\KV@Gin@bb{% \PackageInfo{luatex.def}% {Option `bb' equivalent to `viewport' for luatex driver}% @@ -575,18 +578,18 @@ % b) and shell escape is enabled (possibly restricted), % c) and \DoNotLoadEpstopdf either does not exist or is not \relax, % d) and neither pst-pdf nor pdftricks is loaded (by \begin{document}). -% +% % In other words, by default .eps files will be automatically % converted to .pdf files when outputting pdf. This can be wrong! % If the .pdf is the source, rather than the .eps, you should put % \newcommand{\DoNotLoadEpstopdf}{} % before even the \documentclass line of your document. -% +% % More information about the epstopdf run will be in the .log file; % see http://ctan.org/pkg/epstopdf-pkg for more info about the % epstopdf package itself. In turn, it calls the epstopdf script % (http://ctan.org/pkg/epstopdf). -% +% % For the first discussion and background on this, see the thread on latex-l: % http://thread.gmane.org/gmane.comp.tex.latex.latex3/1465 % diff --git a/Master/texmf-dist/tex/latex/graphics-def/pdftex.def b/Master/texmf-dist/tex/latex/graphics-def/pdftex.def index 3d064430f07..0c9d2da5489 100644 --- a/Master/texmf-dist/tex/latex/graphics-def/pdftex.def +++ b/Master/texmf-dist/tex/latex/graphics-def/pdftex.def @@ -142,14 +142,17 @@ E \else \AtBeginDocument{% \def\KV@Gin@bbllx{% \PackageError{pdftex.def}{% - Options `bblly', `bblly', `bburx' and `bbury'\MessageBreak - are not supported by pdftex driver:\MessageBreak + Options `bblly', `bblly', `bburx', `bbury',\MessageBreak + `natheight' and `natwidth' are not\MessageBreak + supported by pdftex driver:\MessageBreak use `viewport' instead% }\@ehc }% \let\KV@Gin@bblly\KV@Gin@bbllx \let\KV@Gin@bburx\KV@Gin@bbllx \let\KV@Gin@bbury\KV@Gin@bbllx + \let\KV@Gin@natwidth\KV@Gin@bbllx + \let\KV@Gin@natheight\KV@Gin@bbllx \def\KV@Gin@bb{% \PackageInfo{pdftex.def}% {Option `bb' equivalent to `viewport' with pdftex driver}% @@ -585,18 +588,18 @@ E \else % b) and shell escape (\write18) is enabled (possibly restricted), % c) and \DoNotLoadEpstopdf either does not exist or is not \relax, % d) and neither pst-pdf nor pdftricks is loaded (by \begin{document}). -% +% % In other words, by default .eps files will be automatically % converted to .pdf files when outputting pdf. This can be wrong! % If the .pdf is the source, rather than the .eps, you should put % \newcommand{\DoNotLoadEpstopdf}{} % before even the \documentclass line of your document. -% +% % More information about the epstopdf run will be in the .log file; % see http://ctan.org/pkg/epstopdf-pkg for more info about the % epstopdf package itself. In turn, it calls the epstopdf script % (http://ctan.org/pkg/epstopdf). -% +% % For the first discussion and background on this, see the thread on latex-l: % http://thread.gmane.org/gmane.comp.tex.latex.latex3/1465 % -- cgit v1.2.3