Skip to content

Commit

Permalink
Fixed 3 tests (dvips -> pdftex).
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier committed Nov 24, 2017
1 parent 3444135 commit 9727164
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 33 deletions.
Binary file added required/babel/testfiles/support/foo.pdf
Binary file not shown.
85 changes: 85 additions & 0 deletions required/babel/testfiles/support/test2eb.tex
@@ -0,0 +1,85 @@

% =============================
% \TestEngine
% -
% \Show % non-stopping \show
% \ShowThe % non-stopping \show\the
% -
% \TestBox{htext} % box dimensions
% \TestWd{htext} % Only width - redundant, but one-liner
% \TestSavePos{label} % label only for reference - requires .aux
% (\TestAuxMessage - auxiliary for the previous - defined only if used)
% \TestNum{a=b} % or with < > - result is True o False
% \TestPdf{label}{text}
% \CHECKPDF{pattern|pattern} % in preample, with regex'es for resources

\chardef\TestEngine=%
\ifx\directlua\@undefined
\ifx\XeTeXinputencoding\@undefined
\z@
\else
\tw@
\fi
\else
\@ne
\fi

%----
\def\Show#1{{%
{\edef\Test@Temp{\meaning#1}% use csname ???
\message{^^J\string#1 \string= \Test@Temp^^J}}}}

%----
\def\ShowThe#1{\message{^^J\string#1 \string= \the#1^^J}}

%----
\def\TestBox#1{%
\def\Test@Temp{#1}%
\texttt{\expandafter\strip@prefix\meaning\Test@Temp} = {#1}%
\setbox0\hbox{#1}%
\message{^^J\expandafter\strip@prefix\meaning\Test@Temp
\space\string= \the\wd0, \the\ht0, \the\dp0}}

%----
\def\TestWd#1{\setbox0\hbox{#1}\ShowThe{\wd0}\relax#1}

%----
\def\TestPos#1{%
\def\TestAuxMessage##1{\message{^^JTIMO^^J##1^^JOMIT^^J}}%
\pdfsavepos
\protected@write\@mainaux{}%
{\protect\TestAuxMessage{#1 \string= \noexpand\the\pdflastxpos,
\noexpand\the\pdflastypos}}}
\def\TestAuxMessage#1{}
\let\TestSavePos\TestPos % Just a synon

\ifx\pdfsavepos\@undefined
\ifx\savepos\@undefined\else
\let\pdfsavepos\savepos
\let\pdflastxpos\lastxpos
\let\pdflastypos\lastypos
\fi
\fi

%----
\def\TestNum#1{%
\def\Test@Temp{#1}%
\message{^^J\expandafter\strip@prefix\meaning\Test@Temp
\space\string= \ifnum#1 True\else False\fi}}

%----

\def\TestPdf#1{%
\def\Test@Temp{== #1 ==}%
\pdfliteral direct {%
\@percentchar TIMO \expandafter\strip@prefix\meaning\Test@Temp}%
#1%
\pdfliteral direct {\@percentchar OMIT}}

% In preamble:
\def\CHECKPDF#1{%
\pdfcompresslevel=\z@
\pdfobjcompresslevel=\z@
\typeout{CHECKPDF #1}}

\endinput
6 changes: 3 additions & 3 deletions required/babel/testfiles/tlb1347.lvt
Expand Up @@ -15,12 +15,12 @@
\CLASS{report}
\PACKAGE[francais]{babel}
\PACKAGE{array}
\PACKAGE[dvips]{graphicx}
\PACKAGE{graphicx}

\OMIT
\usepackage[francais]{babel}
\usepackage{array}
\usepackage[dvips]{graphicx}
\usepackage{graphicx}

\begin{document}
\TIMO
Expand All @@ -32,7 +32,7 @@ un & deux \\
trois & quatre \\
\end{tabular}

\includegraphics[width=0.5\linewidth, angle=-90]{eye.ps}
\includegraphics[width=0.5\linewidth, angle=-90]{foo.pdf}

test! test !

Expand Down
15 changes: 8 additions & 7 deletions required/babel/testfiles/tlb1347.tlg
Expand Up @@ -7,14 +7,15 @@ Package: babel
Options: francais
Package: array
Package: graphicx
Options: dvips
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line ....
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line ....
File: eye.ps Graphic file (type eps)
<eye.ps> [1
Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!] (.aux)
<foo.pdf, id=1, 44.61339pt x 47.858pt>
File: foo.pdf Graphic file (type pdf)
<use foo.pdf>
Package pdftex.def Info: foo.pdf used on input line ....
(pdftex.def) Requested size: 172.5pt x 185.06145pt.
[1
<./foo.pdf>]
(.aux)
2 changes: 1 addition & 1 deletion required/babel/testfiles/tlb3523.lvt
Expand Up @@ -51,7 +51,7 @@ l.6 \includegraphics[width=\linewidth]{example1} >
\begin{document}
\TIMO

\testit{\includegraphics[width=\linewidth]{example1}}
\testit{\includegraphics[width=\linewidth]{foo.pdf}}

\end{document}
\endinput
31 changes: 20 additions & 11 deletions required/babel/testfiles/tlb3523.tlg
Expand Up @@ -6,17 +6,26 @@ Package: babel
Options: latin,english
Main Class: article
Package: graphicx
! LaTeX Error: File `example1' not found.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l. ......cludegraphics[width=\linewidth]{example1}}
I could not locate the file with any of these extensions:
.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPEG,.JBIG2,.JB2,.eps
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
<foo.pdf, id=1, 44.61339pt x 47.858pt>
File: foo.pdf Graphic file (type pdf)
<use foo.pdf>
Package pdftex.def Info: foo.pdf used on input line ....
(pdftex.def) Requested size: 345.0pt x 370.25217pt.
> \box0=
\hbox(0.0+0.0)x0.0
\hbox(370.25217+0.0)x345.0
.\hbox(370.25217+0.0)x345.0
..\hbox(370.25323+0.0)x345.15129
...\hbox(370.25323+0.0)x345.15129
....\hbox(370.25323+0.0)x0.0
.....\pdfsave
.....\pdfsetmatrix{7.7365 0 0 7.7365}
.....\hbox(47.858+0.0)x0.0, glue set - 44.61339fil
......\hbox(47.858+0.0)x44.61339
.......\pdfrefximage(47.858+0.0)x44.61339
......\glue 0.0 plus 1.0fil minus 1.0fil
.....\pdfrestore
....\kern 345.15129
....\glue 0.0 plus 1.0fil minus 1.0fil
! OK.
l. ......cludegraphics[width=\linewidth]{example1}}
l. ......ncludegraphics[width=\linewidth]{foo.pdf}}
(.aux)
2 changes: 1 addition & 1 deletion required/babel/testfiles/tlb3976.lvt
Expand Up @@ -31,7 +31,7 @@ When the babel package is loaded with the latin option, parameters passed to the
\begin{document}
\TIMO
\selectlanguage{UKenglish}
\includegraphics[width=10cm]{graphics/billard}
\includegraphics[width=10cm]{foo.pdf}
\selectlanguage{latin}
\showthe\catcode`\^
\LatinMarksOn
Expand Down
16 changes: 6 additions & 10 deletions required/babel/testfiles/tlb3976.tlg
Expand Up @@ -10,19 +10,15 @@ Package: graphicx
l. ...\showthe\catcode`\^
> 12.
l. ...\showthe\catcode`\=
! LaTeX Error: File `graphics/billard' not found.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l. ......ludegraphics[width=10cm]{graphics/billard}
I could not locate the file with any of these extensions:
.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPEG,.JBIG2,.JB2,.eps
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
<foo.pdf, id=1, 44.61339pt x 47.858pt>
File: foo.pdf Graphic file (type pdf)
<use foo.pdf>
Package pdftex.def Info: foo.pdf used on input line ....
(pdftex.def) Requested size: 284.52756pt x 305.35385pt.
> 7.
l. ...\showthe\catcode`\^
> 13.
l. ...\showthe\catcode`\^
> 12.
l. ...\showthe\catcode`\^
[1]
[1 <./foo.pdf>]

0 comments on commit 9727164

Please sign in to comment.