From d1063993ce66e9d1fbc5c689dd77de49963aba33 Mon Sep 17 00:00:00 2001 From: Asger Ottar Alstrup Date: Sun, 29 Jul 2001 10:50:07 +0000 Subject: [PATCH] Baruchs latest graphics patch git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2382 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/ChangeLog | 4 ++++ lib/configure | 57 ++++++++++++++++++++++++++++++++++++++++++------ lib/configure.m4 | 24 ++++++++++++++------ src/ChangeLog | 8 +++++++ src/buffer.C | 6 ++--- 5 files changed, 82 insertions(+), 17 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 9c1dd035e6..5c051d6fcd 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2001-07-29 Baruch Even + + * configure.m4: Added conversion from EPS to PDF using epstopdf. + 2001-07-26 John Levon * bind/cua.bind: diff --git a/lib/configure b/lib/configure index 3ec21e1575..2a65dd9913 100755 --- a/lib/configure +++ b/lib/configure @@ -1091,7 +1091,7 @@ case $TOEPS in pnmtops) gif_to_eps="giftopnm \$\$i | pnmtops > \$\$o" png_to_eps="pngtopnm \$\$i | pnmtops >\$\$o" jpg_to_eps="jpegtopnm \$\$i | pnmtops >\$\$o";; esac -echo $ac_n "checking for a GIF -> PNG converter""... $ac_c" +echo $ac_n "checking for a Image -> PNG converter""... $ac_c" echo "$ac_t""(convert pnmtopng)" TOPNG= for ac_prog in convert pnmtopng @@ -1130,6 +1130,44 @@ case $TOPNG in pnmtopng) gif_to_png="giftopnm \$\$i | pnmtopng >\$\$o" eps_to_png="pstopnm \$\$i| pnmtopng >\$\$o" jpg_to_png="jpegtopnm \$\$i | pnmtopng >\$\$o";; esac +echo $ac_n "checking For an EPS -> PDF converter""... $ac_c" +echo "$ac_t""(epstopdf)" +EPSTOPDF= +for ac_prog in epstopdf +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog ; ac_word=$2 +if test -n "$ac_word"; then + echo $ac_n "+checking for \"$ac_word\"""... $ac_c" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -x $ac_dir/$ac_word; then + EPSTOPDF="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" + + if test -n "$EPSTOPDF"; then + ac_result=yes + else + ac_result=no + fi + + echo "$ac_t""$ac_result" + test -n "$EPSTOPDF" && break +fi +done + +if test -z "$EPSTOPDF" ; then + EPSTOPDF=none +fi + +case $EPSTOPDF in + epstopdf) eps_to_pdf="epstopdf --outfile=\$\$o \$\$i";; +esac + #### Explore the LaTeX configuration echo $ac_n "checking LaTeX configuration""... $ac_c" # First, remove the files that we want to re-create @@ -1218,6 +1256,7 @@ cat >lyxrc.defaults <lyxrc.defaults < PNG converter], TOPNG, convert pnmtopng) +SEARCH_PROG([for a Image -> PNG converter], TOPNG, convert pnmtopng) case $TOPNG in convert) gif_to_png="convert GIF:\$\$i PNG:\$\$o" eps_to_png="convert EPS:\$\$i PNG:\$\$o" jpg_to_png="convert JPG:\$\$i PNG:\$\$o";; pnmtopng) gif_to_png="giftopnm \$\$i | pnmtopng >\$\$o" eps_to_png="pstopnm \$\$i| pnmtopng >\$\$o" jpg_to_png="jpegtopnm \$\$i | pnmtopng >\$\$o";; esac +SEARCH_PROG([For an EPS -> PDF converter], EPSTOPDF, epstopdf) +case $EPSTOPDF in + epstopdf) eps_to_pdf="epstopdf --outfile=\$\$o \$\$i";; +esac + #### Explore the LaTeX configuration MSG_CHECKING(LaTeX configuration) # First, remove the files that we want to re-create @@ -420,6 +425,7 @@ cat >lyxrc.defaults <lyxrc.defaults < + + * buffer.C (readInset): Stop auto-converting InsetFig to InsetGraphics. + +2001-07-29 Baruch Even + + * buffer.C (readInset): Changed GRAPHICS to Graphics. + 2001-07-27 Lars Gullik Bjønnes * ParameterStruct.h (endif): add a default constructor to make diff --git a/src/buffer.C b/src/buffer.C index e9316c6e3c..361367258c 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -1454,9 +1454,9 @@ void Buffer::readInset(LyXLex & lex, Paragraph *& par, } else if (tmptok == "Formula") { inset = new InsetFormula; } else if (tmptok == "Figure") { // Backward compatibility - //inset = new InsetFig(100, 100, *this); - inset = new InsetGraphics; - } else if (tmptok == "GRAPHICS") { + inset = new InsetFig(100, 100, *this); + //inset = new InsetGraphics; + } else if (tmptok == "Graphics") { inset = new InsetGraphics; } else if (tmptok == "Info") {// backwards compatibility inset = new InsetNote(this, -- 2.39.5