mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-24 18:43:37 +00:00
better fix to #7239. Actually the whole switch and kaboodle (see r37229) is needed (otherwise sweave is broken)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37322 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
297a74b7ad
commit
3b316bc83f
9
INSTALL
9
INSTALL
@ -103,20 +103,21 @@ to create the Makefile by typing
|
||||
|
||||
./configure
|
||||
|
||||
For more complicated cases, LyX configure takes the following specific
|
||||
For more complicated cases, LyX configure honors the following specific
|
||||
flags:
|
||||
|
||||
o --enable-build-type=[rel(ease), dev(elopment), pre(release)]
|
||||
allows to tweak the compiled code. The following table describes
|
||||
the settings in terms of various options that are described later
|
||||
|
||||
release prerelease development
|
||||
optimization -O2 -O2 -O
|
||||
release prerelease development gprof
|
||||
optimization -O2 -O2 -O -O2
|
||||
assertions X X
|
||||
stdlib-debug X
|
||||
concept-checks X X
|
||||
warnings X X
|
||||
debug X X
|
||||
debug X X X
|
||||
gprof X
|
||||
|
||||
The default are as follows in terms of version number
|
||||
release: stable release (1.x.y)
|
||||
|
@ -19,6 +19,8 @@ AC_ARG_ENABLE(build-type,
|
||||
build_type=development;;
|
||||
pre*) lyx_prerelease=yes
|
||||
build_type=prerelease;;
|
||||
gp*) lyx_profiling=yes
|
||||
build_type=gprof;;
|
||||
rel*) ;;
|
||||
*) AC_ERROR([Bad build type specification \"$enableval\". Please use one of dev(elopment), rel(ease) or pre(release)]);;
|
||||
esac],
|
||||
@ -188,7 +190,7 @@ fi
|
||||
### We might want to disable debug
|
||||
AC_ARG_ENABLE(debug,
|
||||
AC_HELP_STRING([--enable-debug],[enable debug information]),,
|
||||
[ if test $lyx_devel_version = yes -o $lyx_prerelease = yes ; then
|
||||
[ if test $lyx_devel_version = yes -o $lyx_prerelease = yes -o $lyx_profiling = yes ; then
|
||||
enable_debug=yes;
|
||||
else
|
||||
enable_debug=no;
|
||||
@ -212,7 +214,11 @@ AC_ARG_ENABLE(concept-checks,
|
||||
|
||||
AC_ARG_ENABLE(gprof,
|
||||
AC_HELP_STRING([--enable-gprof],[enable profiling using gprof]),,
|
||||
enable_gprof=no;)
|
||||
[if test $build_type = gprof ; then
|
||||
enable_gprof=yes;
|
||||
else
|
||||
enable_gprof=no;
|
||||
fi;])
|
||||
|
||||
### set up optimization
|
||||
AC_ARG_ENABLE(optimization,
|
||||
|
@ -380,6 +380,40 @@ int latexArgInsets(Paragraph const & par, odocstream & os,
|
||||
return lines;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
// output the proper paragraph start according to latextype.
|
||||
void parStartCommand(Paragraph const & par, odocstream & os, TexRow & texrow,
|
||||
OutputParams const & runparams,Layout const & style)
|
||||
{
|
||||
switch (style.latextype) {
|
||||
case LATEX_COMMAND:
|
||||
os << '\\' << from_ascii(style.latexname());
|
||||
|
||||
// Separate handling of optional argument inset.
|
||||
if (style.optargs != 0 || style.reqargs != 0) {
|
||||
int ret = latexArgInsets(par, os, runparams, style.reqargs, style.optargs);
|
||||
while (ret > 0) {
|
||||
texrow.newline();
|
||||
--ret;
|
||||
}
|
||||
}
|
||||
else
|
||||
os << from_ascii(style.latexparam());
|
||||
break;
|
||||
case LATEX_ITEM_ENVIRONMENT:
|
||||
case LATEX_LIST_ENVIRONMENT:
|
||||
os << "\\item ";
|
||||
break;
|
||||
case LATEX_BIB_ENVIRONMENT:
|
||||
// ignore this, the inset will write itself
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace anon
|
||||
|
||||
// FIXME: this should be anonymous
|
||||
void TeXOnePar(Buffer const & buf,
|
||||
@ -444,23 +478,18 @@ void TeXOnePar(Buffer const & buf,
|
||||
|
||||
if (style.pass_thru) {
|
||||
Font const outerfont = text.outerFont(pit);
|
||||
// can we have pass_thru for lists? if so, we need to do the whole
|
||||
// switch and kaboodle here.
|
||||
os << '\\' << from_ascii(style.latexname());
|
||||
parStartCommand(par, os, texrow,runparams, style);
|
||||
|
||||
// Separate handling of optional argument inset.
|
||||
if (style.optargs != 0 || style.reqargs != 0) {
|
||||
int ret = latexArgInsets(par, os, runparams, style.reqargs, style.optargs);
|
||||
while (ret > 0) {
|
||||
texrow.newline();
|
||||
--ret;
|
||||
}
|
||||
}
|
||||
else
|
||||
os << from_ascii(style.latexparam());
|
||||
par.latex(bparams, outerfont, os, texrow, runparams, start_pos,
|
||||
end_pos);
|
||||
|
||||
// I did not create a parEndCommand for this minuscule
|
||||
// task because in the other user of parStartCommand
|
||||
// the code is different (JMarc)
|
||||
if (style.isCommand())
|
||||
os << from_ascii("}\n");
|
||||
else
|
||||
os << from_ascii("\n");
|
||||
texrow.newline();
|
||||
if (!style.parbreak_is_newline) {
|
||||
os << '\n';
|
||||
@ -687,31 +716,7 @@ void TeXOnePar(Buffer const & buf,
|
||||
}
|
||||
}
|
||||
|
||||
switch (style.latextype) {
|
||||
case LATEX_COMMAND:
|
||||
os << '\\' << from_ascii(style.latexname());
|
||||
|
||||
// Separate handling of optional argument inset.
|
||||
if (style.optargs != 0 || style.reqargs != 0) {
|
||||
int ret = latexArgInsets(par, os, runparams, style.reqargs, style.optargs);
|
||||
while (ret > 0) {
|
||||
texrow.newline();
|
||||
--ret;
|
||||
}
|
||||
}
|
||||
else
|
||||
os << from_ascii(style.latexparam());
|
||||
break;
|
||||
case LATEX_ITEM_ENVIRONMENT:
|
||||
case LATEX_LIST_ENVIRONMENT:
|
||||
os << "\\item ";
|
||||
break;
|
||||
case LATEX_BIB_ENVIRONMENT:
|
||||
// ignore this, the inset will write itself
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
parStartCommand(par, os, texrow,runparams, style);
|
||||
|
||||
Font const outerfont = text.outerFont(pit);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user