[latex3-commits] [latex2e-public] r1478 - adjust scalebox for math mode use (github issue 6)

noreply at latex-project.org noreply at latex-project.org
Sat Apr 15 01:38:06 CEST 2017


Author: carlisle
Date: 2017-04-15 01:38:06 +0200 (Sat, 15 Apr 2017)
New Revision: 1478

Added:
   trunk/required/graphics/testfiles/tlb-scalebox-001.lvt
   trunk/required/graphics/testfiles/tlb-scalebox-001.tlg
Modified:
   trunk/required/graphics/changes.txt
   trunk/required/graphics/graphics.dtx
Log:
adjust scalebox for math mode use (github issue 6)

Modified: trunk/required/graphics/changes.txt
===================================================================
--- trunk/required/graphics/changes.txt	2017-04-14 14:23:23 UTC (rev 1477)
+++ trunk/required/graphics/changes.txt	2017-04-14 23:38:06 UTC (rev 1478)
@@ -4,6 +4,11 @@
 are not part of the distribution.
 =======================================================================
 
+2017-04-14  David Carlisle  <latex-bugs at latex-project.org>
+
+	* graphics.dtx: modify \Gscale at box for math mode usage
+	https://github.com/latex3/graphics-def/issues/6
+
 2017-03-17  David Carlisle  <latex-bugs at latex-project.org>
 
 	* graphics.dtx: add \leavevmode to \includegraphics

Modified: trunk/required/graphics/graphics.dtx
===================================================================
--- trunk/required/graphics/graphics.dtx	2017-04-14 14:23:23 UTC (rev 1477)
+++ trunk/required/graphics/graphics.dtx	2017-04-14 23:38:06 UTC (rev 1478)
@@ -19,7 +19,7 @@
 %<driver> \ProvidesFile{graphics.drv}
 % \fi
 %         \ProvidesFile{graphics.dtx}
-          [2017/03/17 v1.1a  Standard LaTeX Graphics (DPC,SPQR)]
+          [2017/04/14 v1.1b  Standard LaTeX Graphics (DPC,SPQR)]
 %
 % \iffalse
 %<*driver>
@@ -1682,6 +1682,8 @@
 %     {\cs{leavevmode} moved earlier. graphics/1521}
 % \changes{v1.0j}{1999/01/07}
 %     {made long. graphics/2908}
+% \changes{v1.1b}{2017/04/14}
+%     {Adjust box resizing for math mode gh issue 6}
 %    \begin{macrocode}
 \long\def\Gscale at box#1[#2]#3{%
   \leavevmode
@@ -1698,8 +1700,7 @@
   \ifdim#1\p@<\z@
     \hb at xt@-#1\wd\z@{\kern-#1\wd\z@\box\tw@\hss}%
   \else
-    \wd\tw@#1\wd\z@
-    \box\tw@
+    \hb at xt@#1\wd\z@{\box\tw@\kern#1\wd\z@\hss}%
   \fi}
 %    \end{macrocode}
 %  \end{macro}

Added: trunk/required/graphics/testfiles/tlb-scalebox-001.lvt
===================================================================
--- trunk/required/graphics/testfiles/tlb-scalebox-001.lvt	                        (rev 0)
+++ trunk/required/graphics/testfiles/tlb-scalebox-001.lvt	2017-04-14 23:38:06 UTC (rev 1478)
@@ -0,0 +1,26 @@
+\documentclass{article}
+
+\input{test2e}
+\usepackage{graphics}
+% reported as https://github.com/latex3/graphics-def/issues/6
+% scalebox in math.
+
+\begin{document}
+\def\contents{\scalebox{2}{a}}
+
+\sbox0{$\frac{\contents}{\contents}$}
+\sbox2{$\frac{\contents}{\contents\kern1sp}$}% wrong!
+\showboxdepth3
+
+\START
+
+\showbox0
+\showbox2
+
+\OMIT
+[\usebox0]
+
+[\usebox2]
+\TIMO
+
+\end{document}
\ No newline at end of file

Added: trunk/required/graphics/testfiles/tlb-scalebox-001.tlg
===================================================================
--- trunk/required/graphics/testfiles/tlb-scalebox-001.tlg	                        (rev 0)
+++ trunk/required/graphics/testfiles/tlb-scalebox-001.tlg	2017-04-14 23:38:06 UTC (rev 1478)
@@ -0,0 +1,26 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+> \box0=
+\hbox(12.5484+6.71106)x12.40002
+.\mathon
+.\hbox(12.5484+6.71106)x12.40002
+..\hbox(12.5484+6.71106)x12.40002
+...\hbox(0.0+0.0)x1.2, shifted -2.5
+...\vbox(12.5484+6.71106)x10.00003 []
+...\hbox(0.0+0.0)x1.2, shifted -2.5
+.\mathoff
+! OK.
+l. ...\showbox0
+> \box2=
+\hbox(12.5484+6.71106)x12.40004
+.\mathon
+.\hbox(12.5484+6.71106)x12.40004
+..\hbox(12.5484+6.71106)x12.40004
+...\hbox(0.0+0.0)x1.2, shifted -2.5
+...\vbox(12.5484+6.71106)x10.00005 []
+...\hbox(0.0+0.0)x1.2, shifted -2.5
+.\mathoff
+! OK.
+l. ...\showbox2
+[1
+] (.aux)



More information about the latex3-commits mailing list