fix latex output for graphics file names containing "."; partly fix 381

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4508 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-07-01 14:31:57 +00:00
parent cd19a0b33b
commit 4e2dae89d2
7 changed files with 59 additions and 10 deletions

View File

@ -8,6 +8,7 @@ src/converter.C
src/CutAndPaste.C
src/debug.C
src/exporter.C
src/ext_l10n.h
src/FloatList.C
src/frontends/controllers/biblio.C
src/frontends/controllers/ButtonController.h
@ -161,7 +162,6 @@ src/mathed/formulamacro.C
src/mathed/math_cursor.C
src/mathed/ref_inset.C
src/MenuBackend.C
src/minibuffer.C
src/paragraph.C
src/support/filetools.C
src/tabular.C

View File

@ -888,7 +888,7 @@ Inset * BufferView::Pimpl::checkInsetHit(LyXText * text, int & x, int & y)
void BufferView::Pimpl::workAreaResize()
{
static int work_area_width;
static unsigned int work_area_height;
static int work_area_height;
bool const widthChange = workarea().workWidth() != work_area_width;
bool const heightChange = workarea().workHeight() != work_area_height;

View File

@ -1,3 +1,12 @@
2002-07-01 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* paragraph.C (startTeXParParams):
(endTeXParParams): add \protect when necessary
2002-06-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* BufferView_pimpl.C (workAreaExpose): remove warning
2002-06-27 Angus Leeming <leeming@lyx.org>
* Makefile.am: add lyxlayout_ptr_fwd.h.

View File

@ -1,3 +1,8 @@
2002-07-01 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* GraphicsConverter.C (convert): do not use ChangeExtension
because to_file_base may contain a dot.
2002-06-28 Angus Leeming <leeming@lyx.org>
* GraphicsCacheItem.[Ch]: refactor some of the more convoluted logic

View File

@ -150,7 +150,9 @@ Converter::Impl::Impl(Converter & p,
fs.close();
// The converted image is to be stored in this file
to_file_ = ChangeExtension(to_file_base, formats.extension(to_format));
// We do not use ChangeExtension here because this is a
// basename, which may nevertheless contain a dot
to_file_ = to_file_base + '.' + formats.extension(to_format);
// The command needed to run the conversion process
// We create a dummy command for ease of understanding of the

View File

@ -1461,7 +1461,7 @@ Paragraph * Paragraph::TeXOnePar(Buffer const * buf,
// This could go to ParagraphParameters if we want to
int Paragraph::startTeXParParams(BufferParams const & bparams,
ostream & os) const
ostream & os, bool moving_arg) const
{
int column = 0;
@ -1470,6 +1470,22 @@ int Paragraph::startTeXParParams(BufferParams const & bparams,
column += 10;
}
switch (params().align()) {
case LYX_ALIGN_NONE:
case LYX_ALIGN_BLOCK:
case LYX_ALIGN_LAYOUT:
case LYX_ALIGN_SPECIAL:
break;
case LYX_ALIGN_LEFT:
case LYX_ALIGN_RIGHT:
case LYX_ALIGN_CENTER:
if (moving_arg) {
os << "\\protect";
column = 8;
}
break;
}
switch (params().align()) {
case LYX_ALIGN_NONE:
case LYX_ALIGN_BLOCK:
@ -1505,10 +1521,26 @@ int Paragraph::startTeXParParams(BufferParams const & bparams,
// This could go to ParagraphParameters if we want to
int Paragraph::endTeXParParams(BufferParams const & bparams,
ostream & os) const
ostream & os, bool moving_arg) const
{
int column = 0;
switch (params().align()) {
case LYX_ALIGN_NONE:
case LYX_ALIGN_BLOCK:
case LYX_ALIGN_LAYOUT:
case LYX_ALIGN_SPECIAL:
break;
case LYX_ALIGN_LEFT:
case LYX_ALIGN_RIGHT:
case LYX_ALIGN_CENTER:
if (moving_arg) {
os << "\\protect";
column = 8;
}
break;
}
switch (params().align()) {
case LYX_ALIGN_NONE:
case LYX_ALIGN_BLOCK:
@ -1602,7 +1634,7 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
++column;
}
if (!asdefault)
column += startTeXParParams(bparams, os);
column += startTeXParParams(bparams, os, moving_arg);
}
@ -1626,7 +1658,8 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
}
if (!asdefault)
column += startTeXParParams(bparams, os);
column += startTeXParParams(bparams, os,
moving_arg);
}
value_type c = getChar(i);
@ -1741,7 +1774,7 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
}
if (!asdefault) {
column += endTeXParParams(bparams, os);
column += endTeXParParams(bparams, os, moving_arg);
}
lyxerr[Debug::LATEX] << "SimpleTeXOnePar...done " << this << endl;

View File

@ -123,10 +123,10 @@ public:
bool moving_arg);
///
int startTeXParParams(BufferParams const &, std::ostream &) const;
int startTeXParParams(BufferParams const &, std::ostream &, bool) const;
///
int endTeXParParams(BufferParams const &, std::ostream &) const;
int endTeXParParams(BufferParams const &, std::ostream &, bool) const;
///