mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
Rename arguments of makeLaTeXFile to a sane scheme.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7370 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b52b324d64
commit
00a58355dd
@ -1,3 +1,9 @@
|
|||||||
|
2003-07-27 José Matos <jamatos@fep.up.pt>
|
||||||
|
|
||||||
|
* buffer.[Ch] (makeLaTeXFile): changed name of arguments for
|
||||||
|
consistency in both functions.
|
||||||
|
* bufferlist.C (updateIncludedTeXfiles): change client to comply.
|
||||||
|
|
||||||
2003-07-26 Asger Alstrup <alstrup@local>
|
2003-07-26 Asger Alstrup <alstrup@local>
|
||||||
|
|
||||||
* rowpainter.C (paintRows): Change algorithm to work directly on
|
* rowpainter.C (paintRows): Change algorithm to work directly on
|
||||||
|
16
src/buffer.C
16
src/buffer.C
@ -910,7 +910,7 @@ void Buffer::writeFileAscii(ostream & os, int linelen)
|
|||||||
void Buffer::makeLaTeXFile(string const & fname,
|
void Buffer::makeLaTeXFile(string const & fname,
|
||||||
string const & original_path,
|
string const & original_path,
|
||||||
LatexRunParams const & runparams,
|
LatexRunParams const & runparams,
|
||||||
bool only_body, bool only_preamble)
|
bool output_preamble, bool output_body)
|
||||||
{
|
{
|
||||||
lyxerr[Debug::LATEX] << "makeLaTeXFile..." << endl;
|
lyxerr[Debug::LATEX] << "makeLaTeXFile..." << endl;
|
||||||
|
|
||||||
@ -919,7 +919,7 @@ void Buffer::makeLaTeXFile(string const & fname,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
makeLaTeXFile(ofs, original_path,
|
makeLaTeXFile(ofs, original_path,
|
||||||
runparams, only_body, only_preamble);
|
runparams, output_preamble, output_body);
|
||||||
|
|
||||||
ofs.close();
|
ofs.close();
|
||||||
if (ofs.fail()) {
|
if (ofs.fail()) {
|
||||||
@ -931,7 +931,7 @@ void Buffer::makeLaTeXFile(string const & fname,
|
|||||||
void Buffer::makeLaTeXFile(ostream & os,
|
void Buffer::makeLaTeXFile(ostream & os,
|
||||||
string const & original_path,
|
string const & original_path,
|
||||||
LatexRunParams const & runparams_in,
|
LatexRunParams const & runparams_in,
|
||||||
bool only_body, bool only_preamble)
|
bool output_preamble, bool output_body)
|
||||||
{
|
{
|
||||||
LatexRunParams runparams = runparams_in;
|
LatexRunParams runparams = runparams_in;
|
||||||
niceFile = runparams.nice; // this will be used by Insetincludes.
|
niceFile = runparams.nice; // this will be used by Insetincludes.
|
||||||
@ -947,7 +947,7 @@ void Buffer::makeLaTeXFile(ostream & os,
|
|||||||
// first paragraph of the document. (Asger)
|
// first paragraph of the document. (Asger)
|
||||||
texrow.start(paragraphs.begin()->id(), 0);
|
texrow.start(paragraphs.begin()->id(), 0);
|
||||||
|
|
||||||
if (!only_body && runparams.nice) {
|
if (output_preamble && runparams.nice) {
|
||||||
os << "%% " << lyx_docversion << " created this file. "
|
os << "%% " << lyx_docversion << " created this file. "
|
||||||
"For more info, see http://www.lyx.org/.\n"
|
"For more info, see http://www.lyx.org/.\n"
|
||||||
"%% Do not edit unless you really know what "
|
"%% Do not edit unless you really know what "
|
||||||
@ -963,7 +963,7 @@ void Buffer::makeLaTeXFile(ostream & os,
|
|||||||
// input@path is set when the actual parameter
|
// input@path is set when the actual parameter
|
||||||
// original_path is set. This is done for usual tex-file, but not
|
// original_path is set. This is done for usual tex-file, but not
|
||||||
// for nice-latex-file. (Matthias 250696)
|
// for nice-latex-file. (Matthias 250696)
|
||||||
if (!only_body) {
|
if (output_preamble) {
|
||||||
if (!runparams.nice) {
|
if (!runparams.nice) {
|
||||||
// code for usual, NOT nice-latex-file
|
// code for usual, NOT nice-latex-file
|
||||||
os << "\\batchmode\n"; // changed
|
os << "\\batchmode\n"; // changed
|
||||||
@ -985,13 +985,13 @@ void Buffer::makeLaTeXFile(ostream & os,
|
|||||||
// Write the preamble
|
// Write the preamble
|
||||||
runparams.use_babel = params.writeLaTeX(os, features, texrow);
|
runparams.use_babel = params.writeLaTeX(os, features, texrow);
|
||||||
|
|
||||||
if (only_preamble)
|
if (!output_body)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// make the body.
|
// make the body.
|
||||||
os << "\\begin{document}\n";
|
os << "\\begin{document}\n";
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
} // only_body
|
} // output_preamble
|
||||||
lyxerr[Debug::INFO] << "preamble finished, now the body." << endl;
|
lyxerr[Debug::INFO] << "preamble finished, now the body." << endl;
|
||||||
|
|
||||||
if (!lyxrc.language_auto_begin) {
|
if (!lyxrc.language_auto_begin) {
|
||||||
@ -1014,7 +1014,7 @@ void Buffer::makeLaTeXFile(ostream & os,
|
|||||||
texrow.newline();
|
texrow.newline();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!only_body) {
|
if (output_preamble) {
|
||||||
os << "\\end{document}\n";
|
os << "\\end{document}\n";
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
|
|
||||||
|
@ -141,14 +141,14 @@ public:
|
|||||||
void makeLaTeXFile(string const & filename,
|
void makeLaTeXFile(string const & filename,
|
||||||
string const & original_path,
|
string const & original_path,
|
||||||
LatexRunParams const &,
|
LatexRunParams const &,
|
||||||
bool only_body = false,
|
bool output_preamble = true,
|
||||||
bool only_preamble = false);
|
bool output_body = true);
|
||||||
///
|
///
|
||||||
void makeLaTeXFile(std::ostream & os,
|
void makeLaTeXFile(std::ostream & os,
|
||||||
string const & original_path,
|
string const & original_path,
|
||||||
LatexRunParams const &,
|
LatexRunParams const &,
|
||||||
bool only_body = false,
|
bool output_preamble = true,
|
||||||
bool only_preamble = false);
|
bool output_body = true);
|
||||||
///
|
///
|
||||||
void simpleDocBookOnePar(std::ostream &,
|
void simpleDocBookOnePar(std::ostream &,
|
||||||
ParagraphList::iterator par, int & desc_on,
|
ParagraphList::iterator par, int & desc_on,
|
||||||
|
@ -236,7 +236,7 @@ void BufferList::updateIncludedTeXfiles(string const & mastertmpdir,
|
|||||||
writefile += '/';
|
writefile += '/';
|
||||||
writefile += (*it)->getLatexName();
|
writefile += (*it)->getLatexName();
|
||||||
(*it)->makeLaTeXFile(writefile, mastertmpdir,
|
(*it)->makeLaTeXFile(writefile, mastertmpdir,
|
||||||
runparams, true);
|
runparams, false);
|
||||||
(*it)->markDepClean(mastertmpdir);
|
(*it)->markDepClean(mastertmpdir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2003-07-27 José Matos <jamatos@fep.up.pt>
|
||||||
|
|
||||||
|
* PreviewLoader.C (Impl::dumpPreamble): comply with makeLaTeXFile
|
||||||
|
argument change.
|
||||||
|
|
||||||
2003-07-21 Angus Leeming <leeming@lyx.org>
|
2003-07-21 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
* GraphicsCache.h:
|
* GraphicsCache.h:
|
||||||
|
@ -575,7 +575,7 @@ void PreviewLoader::Impl::dumpPreamble(ostream & os) const
|
|||||||
runparams.nice = true;
|
runparams.nice = true;
|
||||||
runparams.moving_arg = true;
|
runparams.moving_arg = true;
|
||||||
runparams.free_spacing = true;
|
runparams.free_spacing = true;
|
||||||
tmp.makeLaTeXFile(os, buffer_.filePath(), runparams, false, true);
|
tmp.makeLaTeXFile(os, buffer_.filePath(), runparams, true, false);
|
||||||
|
|
||||||
// FIXME! This is a HACK! The proper fix is to control the 'true'
|
// FIXME! This is a HACK! The proper fix is to control the 'true'
|
||||||
// passed to WriteStream below:
|
// passed to WriteStream below:
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2003-07-27 José Matos <jamatos@fep.up.pt>
|
||||||
|
|
||||||
|
* insetinclude (latex): comply with makeLaTeXFile argument change.
|
||||||
|
|
||||||
2003-07-26 Asger Alstrup <alstrup@local>
|
2003-07-26 Asger Alstrup <alstrup@local>
|
||||||
|
|
||||||
* insettext.C (reinitLyXText): Get rid of updateLocal which causes
|
* insettext.C (reinitLyXText): Get rid of updateLocal which causes
|
||||||
|
@ -345,7 +345,7 @@ int InsetInclude::latex(Buffer const * buffer, ostream & os,
|
|||||||
tmp->markDepClean(buffer->tmppath);
|
tmp->markDepClean(buffer->tmppath);
|
||||||
|
|
||||||
tmp->makeLaTeXFile(writefile, OnlyPath(getMasterFilename()),
|
tmp->makeLaTeXFile(writefile, OnlyPath(getMasterFilename()),
|
||||||
runparams, true);
|
runparams, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isVerbatim()) {
|
if (isVerbatim()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user