Add xfig import test

This commit is contained in:
Georg Baum 2012-10-23 22:08:57 +02:00
parent b222b93ca7
commit ecf24f1cb5
6 changed files with 165 additions and 1 deletions

View File

@ -29,7 +29,10 @@ TEST_FILES = \
test/test-insets.tex \
test/test.ltx \
test/test-structure.tex \
test/XeTeX-polyglossia.tex
test/XeTeX-polyglossia.tex \
test/xfigtest.fig \
test/xfigtest.pstex \
test/xfigtest.pstex_t
TESTS = test/runtests.py
updatetests: tex2lyx

View File

@ -790,6 +790,23 @@ Spreadsheets:
\end_inset
\end_layout
\begin_layout Standard
XFig drawings:
\end_layout
\begin_layout Standard
\begin_inset External
template XFig
filename xfigtest.fig
\end_inset
\end_layout
\begin_layout Standard

View File

@ -144,6 +144,10 @@ Spreadsheets:
\def\inputGnumericTable{}\input{../../../lib/examples/longsheet.tex}
XFig drawings:
\input{xfigtest.pstex_t}
and PDF pages:
\includepdf[pages=-,angle=22,origin=Bl,width=5cm,height=40mm,keepaspectratio]{../../../lib/examples/beamer-icsi-logo}

View File

@ -0,0 +1,12 @@
#FIG 3.2 Produced by xfig version 3.2.5b
Landscape
Center
Metric
A4
100.00
Single
-2
1200 2
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2070 1845 5670 1845 5670 4275 2070 4275 2070 1845
4 0 0 50 -1 1 12 0.0000 2 195 855 2925 3870 $\\gamma$\001

View File

@ -0,0 +1,113 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Title: xfigtest.fig
%%Creator: fig2dev Version 3.2 Patchlevel 5d
%%CreationDate: Tue Oct 23 21:26:13 2012
%%BoundingBox: 0 0 229 155
%Magnification: 1.0000
%%EndComments
%%BeginProlog
/$F2psDict 200 dict def
$F2psDict begin
$F2psDict /mtrx matrix put
/col-1 {0 setgray} bind def
/col0 {0.000 0.000 0.000 srgb} bind def
/col1 {0.000 0.000 1.000 srgb} bind def
/col2 {0.000 1.000 0.000 srgb} bind def
/col3 {0.000 1.000 1.000 srgb} bind def
/col4 {1.000 0.000 0.000 srgb} bind def
/col5 {1.000 0.000 1.000 srgb} bind def
/col6 {1.000 1.000 0.000 srgb} bind def
/col7 {1.000 1.000 1.000 srgb} bind def
/col8 {0.000 0.000 0.560 srgb} bind def
/col9 {0.000 0.000 0.690 srgb} bind def
/col10 {0.000 0.000 0.820 srgb} bind def
/col11 {0.530 0.810 1.000 srgb} bind def
/col12 {0.000 0.560 0.000 srgb} bind def
/col13 {0.000 0.690 0.000 srgb} bind def
/col14 {0.000 0.820 0.000 srgb} bind def
/col15 {0.000 0.560 0.560 srgb} bind def
/col16 {0.000 0.690 0.690 srgb} bind def
/col17 {0.000 0.820 0.820 srgb} bind def
/col18 {0.560 0.000 0.000 srgb} bind def
/col19 {0.690 0.000 0.000 srgb} bind def
/col20 {0.820 0.000 0.000 srgb} bind def
/col21 {0.560 0.000 0.560 srgb} bind def
/col22 {0.690 0.000 0.690 srgb} bind def
/col23 {0.820 0.000 0.820 srgb} bind def
/col24 {0.500 0.190 0.000 srgb} bind def
/col25 {0.630 0.250 0.000 srgb} bind def
/col26 {0.750 0.380 0.000 srgb} bind def
/col27 {1.000 0.500 0.500 srgb} bind def
/col28 {1.000 0.630 0.630 srgb} bind def
/col29 {1.000 0.750 0.750 srgb} bind def
/col30 {1.000 0.880 0.880 srgb} bind def
/col31 {1.000 0.840 0.000 srgb} bind def
end
/cp {closepath} bind def
/ef {eofill} bind def
/gr {grestore} bind def
/gs {gsave} bind def
/sa {save} bind def
/rs {restore} bind def
/l {lineto} bind def
/m {moveto} bind def
/rm {rmoveto} bind def
/n {newpath} bind def
/s {stroke} bind def
/sh {show} bind def
/slc {setlinecap} bind def
/slj {setlinejoin} bind def
/slw {setlinewidth} bind def
/srgb {setrgbcolor} bind def
/rot {rotate} bind def
/sc {scale} bind def
/sd {setdash} bind def
/ff {findfont} bind def
/sf {setfont} bind def
/scf {scalefont} bind def
/sw {stringwidth} bind def
/tr {translate} bind def
/tnt {dup dup currentrgbcolor
4 -2 roll dup 1 exch sub 3 -1 roll mul add
4 -2 roll dup 1 exch sub 3 -1 roll mul add
4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
bind def
/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
4 -2 roll mul srgb} bind def
/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
/$F2psEnd {$F2psEnteredState restore end} def
/pageheader {
save
newpath 0 155 moveto 0 0 lineto 229 0 lineto 229 155 lineto closepath clip newpath
-129.6 270.0 translate
1 -1 scale
$F2psBegin
10 setmiterlimit
0 slj 0 slc
0.06299 0.06299 sc
} bind def
/pagefooter {
$F2psEnd
restore
} bind def
%%EndProlog
pageheader
%
% Fig objects follow
%
%
% here starts figure with depth 50
% Polyline
0 slj
0 slc
7.500 slw
n 2070 1845 m 5670 1845 l 5670 4275 l 2070 4275 l
cp gs col0 s gr
% here ends figure;
pagefooter
showpage
%%Trailer
%EOF

View File

@ -0,0 +1,15 @@
\begin{picture}(0,0)%
\includegraphics{xfigtest.pstex}%
\end{picture}%
\setlength{\unitlength}{4144sp}%
%
\begingroup\makeatletter\ifx\SetFigFont\undefined%
\gdef\SetFigFont#1#2#3#4#5{%
\reset@font\fontsize{#1}{#2pt}%
\fontfamily{#3}\fontseries{#4}\fontshape{#5}%
\selectfont}%
\fi\endgroup%
\begin{picture}(3624,2454)(2059,-3448)
\put(2926,-3031){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$\gamma$}%
}}}}
\end{picture}%