pdftex[959] branches/stable/tests/38-interword-space-at-font-switch:
commits+thanh at tug.org
commits+thanh at tug.org
Tue Feb 18 09:56:51 CET 2025
Revision: 959
https://tug.org/svn/pdftex?view=revision&revision=959
Author: thanh
Date: 2025-02-18 09:56:51 +0100 (Tue, 18 Feb 2025)
Log Message:
-----------
Update test files for change: interword spacing at font switch (cont.)
Modified Paths:
--------------
branches/stable/tests/38-interword-space-at-font-switch/Makefile
branches/stable/tests/38-interword-space-at-font-switch/a2.tex
branches/stable/tests/38-interword-space-at-font-switch/compare_pdfs.rb
branches/stable/tests/38-interword-space-at-font-switch/from-latex-tagged-pdf/glosuba.tex
Added Paths:
-----------
branches/stable/tests/38-interword-space-at-font-switch/a.bib
branches/stable/tests/38-interword-space-at-font-switch/a3.bbl
branches/stable/tests/38-interword-space-at-font-switch/a3.tex
branches/stable/tests/38-interword-space-at-font-switch/f3.tex
Modified: branches/stable/tests/38-interword-space-at-font-switch/Makefile
===================================================================
--- branches/stable/tests/38-interword-space-at-font-switch/Makefile 2025-02-18 08:56:27 UTC (rev 958)
+++ branches/stable/tests/38-interword-space-at-font-switch/Makefile 2025-02-18 08:56:51 UTC (rev 959)
@@ -7,7 +7,11 @@
pdftex25 = /opt/texlive/2020/bin/local/pdftex2
pdflatex24 = $(pdftex24) -fmt pdflatex-24
pdflatex25 = $(pdftex25) -fmt pdflatex-25
+cmp_vimdiff = vimdiff
+cmp_visual = ./compare_pdfs.rb
+cmp_vimdiff = true
+
test:
# $(pdftex21) -ini f.tex && mv f.pdf f-21.pdf && ./postpdf.sh f-21.pdf
# $(pdftex22) -ini f.tex && mv f.pdf f-22.pdf && ./postpdf.sh f-22.pdf
@@ -14,8 +18,8 @@
# $(pdftex23) -ini f.tex && mv f.pdf f-23.pdf && ./postpdf.sh f-23.pdf
$(pdftex24) -ini f.tex && mv f.pdf f-24.pdf && ./postpdf.sh f-24.pdf
$(pdftex25) -ini f.tex && mv f.pdf f-25.pdf && ./postpdf.sh f-25.pdf
- ./compare_pdfs.rb f-2[45].pdf --res=300
- vimdiff -R f-2[45]--pp.pdf
+ $(cmp_visual) f-2[45].pdf --res=300
+ $(cmp_vimdiff) -R f-2[45]--pp.pdf
test2:
# $(pdftex21) -fmt pdflatex-21 f2.tex && mv f2.pdf f2-21.pdf && ./postpdf.sh f2-21.pdf
@@ -23,9 +27,18 @@
# $(pdftex23) -fmt pdflatex-23 f2.tex && mv f2.pdf f2-23.pdf && ./postpdf.sh f2-23.pdf
$(pdflatex24) f2.tex && mv f2.pdf f2-24.pdf && ./postpdf.sh f2-24.pdf
$(pdflatex25) f2.tex && mv f2.pdf f2-25.pdf && ./postpdf.sh f2-25.pdf
- ./compare_pdfs.rb f2-2[45].pdf --res=300
- vimdiff -R f2-2[45]--pp.pdf
+ $(cmp_visual) f2-2[45].pdf --res=300
+ $(cmp_vimdiff) -R f2-2[45]--pp.pdf
+test3:
+ # $(pdftex21) -fmt pdflatex-21 f3.tex && mv f3.pdf f3-21.pdf && ./postpdf.sh f3-21.pdf
+ # $(pdftex22) -fmt pdflatex-22 f3.tex && mv f3.pdf f3-22.pdf && ./postpdf.sh f3-22.pdf
+ # $(pdftex23) -fmt pdflatex-23 f3.tex && mv f3.pdf f3-23.pdf && ./postpdf.sh f3-23.pdf
+ $(pdflatex24) f3.tex && mv f3.pdf f3-24.pdf && ./postpdf.sh f3-24.pdf
+ $(pdflatex25) f3.tex && mv f3.pdf f3-25.pdf && ./postpdf.sh f3-25.pdf
+ $(cmp_visual) f3-2[45].pdf --res=300
+ $(cmp_vimdiff) -R f3-2[45]--pp.pdf
+
sample2e:
make fmt
# $(pdftex21) -fmt pdflatex-21 sample2e.tex && mv sample2e.pdf sample2e-21.pdf && ./postpdf.sh sample2e-21.pdf
@@ -33,8 +46,8 @@
# $(pdftex23) -fmt pdflatex-23 sample2e.tex && mv sample2e.pdf sample2e-23.pdf && ./postpdf.sh sample2e-23.pdf
$(pdflatex24) sample2e.tex && mv sample2e.pdf sample2e-24.pdf && ./postpdf.sh sample2e-24.pdf
$(pdflatex25) sample2e.tex && mv sample2e.pdf sample2e-25.pdf && ./postpdf.sh sample2e-25.pdf
- ./compare_pdfs.rb sample2e-2[45].pdf --res=300
- vimdiff -f -R sample2e-2[45]--pp.pdf
+ $(cmp_visual) sample2e-2[45].pdf --res=300
+ $(cmp_vimdiff) -f -R sample2e-2[45]--pp.pdf
a1:
$(pdflatex24) a1.tex
@@ -45,8 +58,8 @@
$(pdflatex25) a1.tex
$(pdflatex25) a1.tex
mv a1.pdf a1-25.pdf && ./postpdf.sh a1-25.pdf
- ./compare_pdfs.rb a1-2[45].pdf --res=300
- vimdiff -R a1-2[45]--pp.pdf
+ $(cmp_visual) a1-2[45].pdf --res=300
+ $(cmp_vimdiff) -R a1-2[45]--pp.pdf
a2:
$(pdflatex24) a2.tex
@@ -57,9 +70,21 @@
$(pdflatex25) a2.tex
$(pdflatex25) a2.tex
mv a2.pdf a2-25.pdf && ./postpdf.sh a2-25.pdf
- ./compare_pdfs.rb a2-2[45].pdf --res=300 --res=300
- vimdiff -R a2-2[45]--pp.pdf
+ $(cmp_visual) a2-2[45].pdf --res=300 --res=300
+ $(cmp_vimdiff) -R a2-2[45]--pp.pdf
+a3:
+ $(pdflatex24) a3.tex
+ $(pdflatex24) a3.tex
+ $(pdflatex24) a3.tex
+ mv a3.pdf a3-24.pdf && ./postpdf.sh a3-24.pdf
+ $(pdflatex25) a3.tex
+ $(pdflatex25) a3.tex
+ $(pdflatex25) a3.tex
+ mv a3.pdf a3-25.pdf && ./postpdf.sh a3-25.pdf
+ $(cmp_visual) a3-2[45].pdf --res=300 --res=300
+ $(cmp_vimdiff) -R a3-2[45]--pp.pdf
+
texlive-en:
$(pdflatex24) texlive-en.tex
# $(pdflatex24) texlive-en.tex
@@ -69,8 +94,8 @@
# $(pdflatex25) texlive-en.tex
# $(pdflatex25) texlive-en.tex
mv texlive-en.pdf texlive-en-25.pdf && ./postpdf.sh texlive-en-25.pdf
- ./compare_pdfs.rb texlive-en-2[45].pdf --res=300
- vimdiff -R texlive-en-2[45]--pp.pdf
+ $(cmp_visual) texlive-en-2[45].pdf --res=300
+ $(cmp_vimdiff) -R texlive-en-2[45]--pp.pdf
fmt:
# $(pdftex21) -ini -etex -env pdflatex.ini && mv pdflatex.fmt pdflatex-21.fmt
Added: branches/stable/tests/38-interword-space-at-font-switch/a.bib
===================================================================
--- branches/stable/tests/38-interword-space-at-font-switch/a.bib (rev 0)
+++ branches/stable/tests/38-interword-space-at-font-switch/a.bib 2025-02-18 08:56:51 UTC (rev 959)
@@ -0,0 +1 @@
+link from-latex-tagged-pdf/glosuba.bib
\ No newline at end of file
Property changes on: branches/stable/tests/38-interword-space-at-font-switch/a.bib
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: branches/stable/tests/38-interword-space-at-font-switch/a2.tex
===================================================================
--- branches/stable/tests/38-interword-space-at-font-switch/a2.tex 2025-02-18 08:56:27 UTC (rev 958)
+++ branches/stable/tests/38-interword-space-at-font-switch/a2.tex 2025-02-18 08:56:51 UTC (rev 959)
@@ -1 +1 @@
-link /Users/thanh/pdftex/tests/38-interword-space-at-font-switch/from-latex-tagged-pdf/arXiv-2401.05361v1.tex
\ No newline at end of file
+link from-latex-tagged-pdf/arXiv-2401.05361v1.tex
\ No newline at end of file
Added: branches/stable/tests/38-interword-space-at-font-switch/a3.bbl
===================================================================
--- branches/stable/tests/38-interword-space-at-font-switch/a3.bbl (rev 0)
+++ branches/stable/tests/38-interword-space-at-font-switch/a3.bbl 2025-02-18 08:56:51 UTC (rev 959)
@@ -0,0 +1 @@
+link from-latex-tagged-pdf/glosuba.bbl
\ No newline at end of file
Property changes on: branches/stable/tests/38-interword-space-at-font-switch/a3.bbl
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: branches/stable/tests/38-interword-space-at-font-switch/a3.tex
===================================================================
--- branches/stable/tests/38-interword-space-at-font-switch/a3.tex (rev 0)
+++ branches/stable/tests/38-interword-space-at-font-switch/a3.tex 2025-02-18 08:56:51 UTC (rev 959)
@@ -0,0 +1 @@
+link from-latex-tagged-pdf/glosuba.tex
\ No newline at end of file
Property changes on: branches/stable/tests/38-interword-space-at-font-switch/a3.tex
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: branches/stable/tests/38-interword-space-at-font-switch/compare_pdfs.rb
===================================================================
--- branches/stable/tests/38-interword-space-at-font-switch/compare_pdfs.rb 2025-02-18 08:56:27 UTC (rev 958)
+++ branches/stable/tests/38-interword-space-at-font-switch/compare_pdfs.rb 2025-02-18 08:56:51 UTC (rev 959)
@@ -40,17 +40,17 @@
Dir["#{output_prefix}-*.png"].length
end
-def create_diff_visualization(image1, image2, diff_output)
+def create_diff_visualization(image1, image2, diff_output_base)
system("magick '(' \"#{image1}\" -flatten -grayscale Rec709Luminance ')' " \
"'(' \"#{image2}\" -flatten -grayscale Rec709Luminance ')' " \
"'(' -clone 0-1 -compose darken -composite ')' " \
- "-channel RGB -combine \"#{diff_output}\"")
+ "-channel RGB -combine \"#{diff_output_base}\"")
end
-def compare_images(image1, image2, diff_output, fuzz=5)
+def compare_images(image1, image2, diff_output_base, fuzz=5)
# First create both types of difference visualizations
- base_name = File.join(File.dirname(diff_output),
- File.basename(diff_output, ".png"))
+ base_name = File.join(File.dirname(diff_output_base),
+ File.basename(diff_output_base))
compare_output = "#{base_name}-compare.png"
visual_output = "#{base_name}-visual.png"
@@ -77,23 +77,23 @@
page2 = File.join(dir2, File.basename(page1))
if File.exist?(page2)
- diff_output = File.join(diff_dir, "diff-page-#{page_num}.png")
- diff = compare_images(page1, page2, diff_output)
+ diff_output_base = File.join(diff_dir, "diff-page-#{page_num}-")
+ diff = compare_images(page1, page2, diff_output_base)
if diff == -1
puts "Page #{page_num}: Error comparing pages (possibly different dimensions)"
differences[page_num] = "error"
- elsif diff == 0
- puts "Page #{page_num}: Identical"
- File.delete(diff_output) if File.exist?(diff_output)
- differences[page_num] = 0
elsif diff <= threshold
- puts "Page #{page_num}: Minor differences (#{diff} pixels) - below threshold"
- Dir["#{diff_output}-*.png"].each { |f| File.delete(f) if File.exist?(f) }
+ if diff == 0
+ puts "Page #{page_num}: Identical"
+ else
+ puts "Page #{page_num}: Minor differences (#{diff} pixels) - below threshold"
+ end
+ Dir["#{diff_output_base}*"].each { |file| File.delete(file) if File.exist?(file) }
differences[page_num] = 0
else
- base_name = File.join(File.dirname(diff_output),
- File.basename(diff_output, ".png"))
+ base_name = File.join(File.dirname(diff_output_base),
+ File.basename(diff_output_base))
puts "Page #{page_num}: Significant differences (#{diff} pixels)"
puts "Difference images saved as:"
puts " - Compare method: #{base_name}-compare.png"
@@ -108,11 +108,11 @@
end
# Check for extra pages in second PDF
- Dir["#{dir2}/*.png"].each_with_index do |page2, idx|
- page_num = idx + 1
- unless File.exist?(File.join(dir1, File.basename(page2)))
- puts "Page #{page_num}: Extra page in second PDF"
- differences[page_num] = "extra"
+ Dir["#{dir2}/*.png"].each do |page2|
+ base_name = File.basename(page2)
+ unless File.exist?(File.join(dir1, base_name))
+ puts "Extra page in second PDF: #{base_name}"
+ differences[base_name] = "extra"
end
end
Added: branches/stable/tests/38-interword-space-at-font-switch/f3.tex
===================================================================
--- branches/stable/tests/38-interword-space-at-font-switch/f3.tex (rev 0)
+++ branches/stable/tests/38-interword-space-at-font-switch/f3.tex 2025-02-18 08:56:51 UTC (rev 959)
@@ -0,0 +1,13 @@
+\documentclass{article}
+
+\usepackage{microtype}
+\begin{document}
+\pdfcompresslevel=0
+\pdfobjcompresslevel=0
+\pdfinterwordspaceon
+
+a\pdffakespace b
+
+c d \pdffakespace e
+\end{document}
+
Modified: branches/stable/tests/38-interword-space-at-font-switch/from-latex-tagged-pdf/glosuba.tex
===================================================================
--- branches/stable/tests/38-interword-space-at-font-switch/from-latex-tagged-pdf/glosuba.tex 2025-02-18 08:56:27 UTC (rev 958)
+++ branches/stable/tests/38-interword-space-at-font-switch/from-latex-tagged-pdf/glosuba.tex 2025-02-18 08:56:51 UTC (rev 959)
@@ -171,7 +171,7 @@
This function is identically zero if and only if $|f(x_k) - f(x)| < \epsilon$, for all $x$. This happens only if $x_k$ is a $\epsilon-$ approximation to the optimum (See Figure \ref{illusfig}). Note that $x_k$ and $x$ are represented with some finite precision. % then $h_{x_k}^{\epsilon}(\cdot)$ is identically zero. %Or to find a finite-precision point $y$ which is $\epsilon-$ approximation to the optimum is same as finding a function $h_y^{\epsilon}(\cdot)$ which is identically zero for some $y$. But this cannot be checked for any particular value of $y$.
\begin{figure}[!ht]
\centering
- \includegraphics{fig1-crop.pdf}
+ % \includegraphics{fig1-crop.pdf}
\caption{The figure on the right shows a sample objective function. The figure of the left is the function $ \max \{0,f(60)-f(x) \}$. This function is not identically zero as $x=60$ is not the global minima of $f(x)$.}
\label{illusfig}
\end{figure}
More information about the pdftex-commits
mailing list.