More small changes

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/lyx-1_1_5@1060 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2000-09-29 15:14:36 +00:00
parent b00faf2ea0
commit be967977f2
6 changed files with 57 additions and 14 deletions

View File

@ -1,3 +1,25 @@
2000-09-29 Dekel Tsur <dekelts@tau.ac.il>
* src/paragraph.C (TeXFootnote): Fixed bug with LTR table floats.
2000-09-26 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* lib/layouts/siamltex.layout: new textclass for SIAM journals,
from Kornelia Pietsch <pietsch@mathematik.tu-chemnitz.de>
* src/support/lyxstring.C (lyxstring): When a number of
characters has been given, we should not assume that the string is
0-terminated.
* src/vspace.C (nextToken): use isStrDbl() to check for proper
double values.
2000-09-23 Dekel Tsur <dekel@math.tau.ac.il>
* src/mathed/formula.C (MathFuncInset::Metrics): Use default
width/descent/ascent values if name is empty.
(mathed_string_height): Use std::max.
2000-09-22 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr> 2000-09-22 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* lib/doc/LaTeXConfig.lyx.in: updated. * lib/doc/LaTeXConfig.lyx.in: updated.

View File

@ -931,6 +931,22 @@ Notes: REVTeX 4 is a class used for submitting manuscripts to journals including
http://publish.aps.org/revtex4/ http://publish.aps.org/revtex4/
\layout Subsection \layout Subsection
SIAMLTeX
\layout Description
Found: @chk_siamltex@
\layout Description
CTAN:
\family typewriter
macros/latex/contrib/other/siam/siamltex.tar
\layout Description
Notes: The Society for Industrial and Applied Mathematics, Philadelphia,
Pennsylvania, wants to ensure quality typesetting according to SIAM style
standards by providing this LaTeX style.
\layout Subsection
Springer Journal of Geodesy Springer Journal of Geodesy
\layout Description \layout Description

View File

@ -48,6 +48,7 @@ using std::istream;
using std::pair; using std::pair;
using std::endl; using std::endl;
using std::vector; using std::vector;
using std::max;
extern char * mathed_label; extern char * mathed_label;
@ -231,10 +232,8 @@ int mathed_string_height(short type, int size, byte const * s,
LyXFont font = WhichFont(type, size); LyXFont font = WhichFont(type, size);
asc = des = 0; asc = des = 0;
for (int i = 0; i < ls; ++i) { for (int i = 0; i < ls; ++i) {
if (lyxfont::descent(s[i], font) > des) des = max(des, lyxfont::descent(s[i], font));
des = lyxfont::descent(s[i], font); asc = max(asc, lyxfont::ascent(s[i], font));
if (lyxfont::ascent(s[i], font) > asc)
asc = lyxfont::ascent(s[i], font);
} }
return asc + des; return asc + des;
} }
@ -1215,11 +1214,17 @@ void MathFuncInset::Metrics()
ln = (name) ? strlen(name): 0; ln = (name) ? strlen(name): 0;
LyXFont font = WhichFont(LM_TC_TEXTRM, size); LyXFont font = WhichFont(LM_TC_TEXTRM, size);
font.setLatex(LyXFont::ON); font.setLatex(LyXFont::ON);
if (ln == 0) {
width = df_width;
descent = df_des;
ascent = df_asc;
} else {
width = lyxfont::width(name, ln, font) width = lyxfont::width(name, ln, font)
+ lyxfont::width('I', font) / 2; + lyxfont::width('I', font) / 2;
mathed_string_height(LM_TC_TEXTRM, size, mathed_string_height(LM_TC_TEXTRM, size,
reinterpret_cast<unsigned char const *>(name), reinterpret_cast<unsigned char const *>(name),
strlen(name), ascent, descent); strlen(name), ascent, descent);
}
} }

View File

@ -3850,7 +3850,7 @@ LyXParagraph * LyXParagraph::TeXFootnote(ostream & os, TexRow & texrow,
bool moving_arg = false; bool moving_arg = false;
bool need_closing = false; bool need_closing = false;
bool is_rtl = isRightToLeftPar(); bool is_rtl = lyxrc.rtl_support && getParLanguage()->RightToLeft;
if (is_rtl != parent_is_rtl) { if (is_rtl != parent_is_rtl) {
if (is_rtl) if (is_rtl)

View File

@ -415,7 +415,7 @@ lyxstring::lyxstring(value_type const * s, size_type n)
Assert(s && n < npos); // STD! Assert(s && n < npos); // STD!
static Srep empty_rep(0, ""); static Srep empty_rep(0, "");
if (*s && n) { // s is not empty string and n > 0 if (*s && n) { // s is not empty string and n > 0
rep = new Srep(min(strlen(s), n), s); rep = new Srep(n, s);
} else { } else {
++empty_rep.ref; ++empty_rep.ref;
rep = &empty_rep; rep = &empty_rep;

View File

@ -97,8 +97,8 @@ char nextToken (string & data)
if ((i = data.find_last_of("0123456789.")) != string::npos) { if ((i = data.find_last_of("0123456789.")) != string::npos) {
if (number_index > 3) return 'E'; // Error if (number_index > 3) return 'E'; // Error
string buffer = data.substr(0, i + 1); string buffer = data.substr(0, i + 1);
if (sscanf (buffer.c_str(), if (isStrDbl(buffer)) {
"%f", &number[number_index]) == 1) { number[number_index] = strToDbl(buffer);
lyx_advance (data, i + 1); lyx_advance (data, i + 1);
++number_index; ++number_index;
return 'n'; return 'n';