+2005-03-23 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ * configure.m4: add a check to see whether TeX allows spaces in
+ file names. Works with web2c 7.5.3 or later.
+
2005-03-23 Angus Leeming <leeming@lyx.org>
* scripts/convertDefault.sh: remove the test that "convert" really,
fi ;;
esac
done > chklayouts.tex
+ ${LATEX} wrap_chkconfig.ltx 2>/dev/null | grep '^\+'
changequote([,])dnl
- [eval] ${LATEX} wrap_chkconfig.ltx 2>/dev/null | grep '^\+'
[eval] `cat chkconfig.vars | sed 's/-/_/g'`
changequote(,)dnl
test -n "${rmlink}" && rm -f chkconfig.ltx
echo "s/@chk_docbook@/$chk_docbook/g" >> chkconfig.sed
sed -f chkconfig.sed "${srcdir}"/doc/LaTeXConfig.lyx.in >doc/LaTeXConfig.lyx
+### Let's check whether spaces are allowed in TeX file names
+MSG_CHECKING(whether TeX allows spaces in file names)
+if test ${lyx_check_config} = no ; then
+ tex_allows_spaces=false
+else
+ fname="a b"
+ rm -f "$fname".tex
+ echo "\\message{working^^J}" >"$fname".tex
+ if ${LATEX} "$fname" </dev/null | grep 'working' >/dev/null ; then
+ MSG_RESULT(yes)
+ tex_allows_spaces=true
+ else
+ MSG_RESULT(no)
+ tex_allows_spaces=false
+ fi
+ rm -r "$fname".*
+fi
+
echo "creating $outfile"
cat >$outfile <<EOF
# This file has been automatically generated by LyX' lib/configure
$rc_entries
\\font_encoding "$chk_fontenc"
+\\tex_allows_spaces $tex_allows_spaces
EOF
if [ "x$use_cygwin_path_fix" != "x" ]
src/lyxrc.C
src/lyxvc.C
src/mathed/formulamacro.C
+src/mathed/math_casesinset.C
src/mathed/math_gridinset.C
src/mathed/math_hullinset.C
src/mathed/math_macrotemplate.C
+2005-03-14 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ * lyxrc.C (setDefaults, read, output, getDescription): add support
+ for tex_allows_spaces.
+
+ * exporter.C (Export): allows files in directory containing spaces
+ if tex_allows_spaces is true.
+
+ * buffer.C (makeLaTeXFile): if the document path contains spaces,
+ output it in double quotes.
+
2005-03-22 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* rowpainter.C: use default text height for drawing change tracker
if (!original_path.empty()) {
string inputpath = os::external_path(original_path);
subst(inputpath, "~", "\\string~");
+ if (inputpath.find(' ') != string::npos)
+ inputpath = '"' + inputpath + '"';
os << "\\makeatletter\n"
<< "\\def\\input@path{{"
<< inputpath << "/}}\n"
else if (backend_format == format) {
runparams.nice = true;
buffer->makeLaTeXFile(filename, string(), runparams);
- } else if (contains(buffer->filePath(), ' ')) {
+ } else if (!lyxrc.tex_allows_spaces
+ && contains(buffer->filePath(), ' ')) {
Alert::error(_("File name error"),
_("The directory path to the document cannot contain spaces."));
return false;
{ "\\spell_command", LyXRC::RC_SPELL_COMMAND },
{ "\\tempdir_path", LyXRC::RC_TEMPDIRPATH },
{ "\\template_path", LyXRC::RC_TEMPLATEPATH },
+ { "\\tex_allows_spaces", LyXRC::RC_TEX_ALLOWS_SPACES },
{ "\\ui_file", LyXRC::RC_UIFILE },
{ "\\use_alt_language", LyXRC::RC_USE_ALT_LANG },
{ "\\use_escape_chars", LyXRC::RC_USE_ESC_CHARS },
default_language = "english";
show_banner = true;
cygwin_path_fix = false;
+ tex_allows_spaces = false;
date_insert_format = "%A, %e %B %Y";
cursor_follows_scrollbar = false;
dialogs_iconify_with_main = false;
}
break;
- case RC_KBMAP:
- if (lexrc.next()) {
- use_kbmap = lexrc.getBool();
- }
- break;
-
case RC_CYGWIN_PATH_FIX:
if (lexrc.next()) {
cygwin_path_fix = lexrc.getBool();
}
break;
+ case RC_TEX_ALLOWS_SPACES:
+ if (lexrc.next()) {
+ tex_allows_spaces = lexrc.getBool();
+ }
+ break;
+
+ case RC_KBMAP:
+ if (lexrc.next()) {
+ use_kbmap = lexrc.getBool();
+ }
+ break;
+
case RC_KBMAP_PRIMARY:
if (lexrc.next()) {
string const kmap(lexrc.getString());
index_command != system_lyxrc.index_command) {
os << "\\index_command \"" << index_command << "\"\n";
}
- case RC_KBMAP:
- if (ignore_system_lyxrc ||
- use_kbmap != system_lyxrc.use_kbmap) {
- os << "\\kbmap " << convert<string>(use_kbmap) << '\n';
- }
-
case RC_CYGWIN_PATH_FIX:
if (ignore_system_lyxrc ||
cygwin_path_fix != system_lyxrc.cygwin_path_fix) {
os << "\\cygwin_path_fix_needed "
<< convert<string>(cygwin_path_fix) << '\n';
}
+ case RC_TEX_ALLOWS_SPACES:
+ if (tex_allows_spaces != system_lyxrc.tex_allows_spaces) {
+ os << "\\tex_allows_spaces "
+ << convert<string>(tex_allows_spaces) << '\n';
+ }
+ case RC_KBMAP:
+ if (ignore_system_lyxrc ||
+ use_kbmap != system_lyxrc.use_kbmap) {
+ os << "\\kbmap " << convert<string>(use_kbmap) << '\n';
+ }
case RC_KBMAP_PRIMARY:
if (ignore_system_lyxrc ||
primary_kbmap != system_lyxrc.primary_kbmap) {
str = _("The path that LyX will set when offering to choose a template. An empty value selects the directory LyX was started from.");
break;
+ case RC_TEX_ALLOWS_SPACES:
+ break;
+
case RC_UIFILE:
str = _("The UI (user interface) file. Can either specify an absolute path, or LyX will look in its global and local ui/ directories.");
break;
RC_SPELL_COMMAND,
RC_TEMPDIRPATH,
RC_TEMPLATEPATH,
+ RC_TEX_ALLOWS_SPACES,
RC_UIFILE,
RC_USER_EMAIL,
RC_USER_NAME,
std::string user_email;
///
bool cygwin_path_fix;
+ /// True if the TeX engine can handle file names containing spaces
+ bool tex_allows_spaces;
/** Prepend paths to the PATH environment variable.
* The string is input, stored and output in native format.
*/