mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
fix space insets, increase version to 244.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10490 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d9d8fa107b
commit
82765345ac
@ -1,3 +1,7 @@
|
||||
2005-09-28 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* FORMAT: document format change to 244.
|
||||
|
||||
2005-09-21 Bennett Helm <bennett.helm@fandm.edu>
|
||||
|
||||
* MacOSX/LyX.app/Contents/Info.plist: change description of .lyx
|
||||
|
@ -1,6 +1,13 @@
|
||||
LyX file-format changes
|
||||
-----------------------
|
||||
|
||||
2005-09-24 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* format incremented to 244. Rename '\InsetSpace \,'
|
||||
to '\InsetSpace \thinspace{}', because the comma was
|
||||
not parsed by lyxlex, and '\InsetSpace \space' to
|
||||
'\InsetSpace \space{}' in favour of consistency.
|
||||
|
||||
2005-07-18 José Matos <jamatos@lyx.org>
|
||||
|
||||
* format incremented to 243.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2005-09-28 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* UserGuide.lyx:
|
||||
* Extended.lyx: fix broken space insets. Format is now 244.
|
||||
|
||||
2005-09-19 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* UserGuide.lyx: document new space inset, correct some
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX 1.4.0cvs created this file. For more info see http://www.lyx.org/
|
||||
\lyxformat 243
|
||||
\lyxformat 244
|
||||
\begin_document
|
||||
\begin_header
|
||||
\textclass book
|
||||
@ -2078,8 +2078,8 @@ Alternative Citation Styles
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Standard BibTeX uses numbers (e.\InsetSpace \,
|
||||
g.\InsetSpace \space
|
||||
Standard BibTeX uses numbers (e.\InsetSpace \thinspace{}
|
||||
g.\InsetSpace \space{}
|
||||
|
||||
\begin_inset Quotes eld
|
||||
\end_inset
|
||||
@ -2090,8 +2090,8 @@ g.\InsetSpace \space
|
||||
|
||||
) to refer to a cited work.
|
||||
However, in many scientific disciplines, other citation styles are in use.
|
||||
The most common one is the author-year style (e.\InsetSpace \,
|
||||
g.\InsetSpace \space
|
||||
The most common one is the author-year style (e.\InsetSpace \thinspace{}
|
||||
g.\InsetSpace \space{}
|
||||
|
||||
\begin_inset Quotes eld
|
||||
\end_inset
|
||||
@ -2287,8 +2287,8 @@ Scientific works
|
||||
\begin_inset Quotes erd
|
||||
\end_inset
|
||||
|
||||
, you first need to create two bibliographic databases, e.\InsetSpace \,
|
||||
g.\InsetSpace \space
|
||||
, you first need to create two bibliographic databases, e.\InsetSpace \thinspace{}
|
||||
g.\InsetSpace \space{}
|
||||
|
||||
\family typewriter
|
||||
sources.bib
|
||||
@ -2412,8 +2412,8 @@ Multiple Bibliographies
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Multiple bibliographies, e.\InsetSpace \,
|
||||
g.\InsetSpace \space
|
||||
Multiple bibliographies, e.\InsetSpace \thinspace{}
|
||||
g.\InsetSpace \space{}
|
||||
a bibliography for each section or chapter of
|
||||
the document, are not supported by BibTeX itself.
|
||||
But the
|
||||
@ -2502,7 +2502,7 @@ end{btUnit}
|
||||
(those commands have to be inserted as ERT).
|
||||
The bibliography will contain all references which have been cited in the
|
||||
current btUnit.
|
||||
N.\InsetSpace
|
||||
N.\InsetSpace \thinspace{}
|
||||
B.: If you are using this approach, then
|
||||
\emph on
|
||||
every
|
||||
@ -2543,7 +2543,6 @@ In the
|
||||
\emph default
|
||||
\bar default
|
||||
\noun default
|
||||
\color default
|
||||
Outputs\SpecialChar \menuseparator
|
||||
LaT\SpecialChar \textcompwordmark{}
|
||||
eX
|
||||
@ -2554,7 +2553,6 @@ eX
|
||||
\emph off
|
||||
\bar no
|
||||
\noun off
|
||||
\color none
|
||||
section of the preferences dialog, however, you can customize the index
|
||||
command, if you prefer an alternative program like
|
||||
\family typewriter
|
||||
@ -2564,7 +2562,7 @@ eX
|
||||
\emph default
|
||||
\bar default
|
||||
\noun default
|
||||
\color default
|
||||
\color none
|
||||
xindy
|
||||
\family roman
|
||||
\series medium
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX 1.4.0cvs created this file. For more info see http://www.lyx.org/
|
||||
\lyxformat 243
|
||||
\lyxformat 244
|
||||
\begin_document
|
||||
\begin_header
|
||||
\textclass scrbook
|
||||
@ -12401,8 +12401,8 @@ With the corrections, our earlier examples look like this:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Itemize
|
||||
e.\InsetSpace \,
|
||||
g.\InsetSpace \space
|
||||
e.\InsetSpace \thinspace{}
|
||||
g.\InsetSpace \space{}
|
||||
this is too much space!
|
||||
\end_layout
|
||||
|
||||
@ -22015,9 +22015,8 @@ Inter-word Space
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Some languages (e.\InsetSpace
|
||||
\InsetSpace \,
|
||||
g.\InsetSpace \space
|
||||
Some languages (e.\InsetSpace \thinspace{}
|
||||
g.\InsetSpace \space{}
|
||||
English) have the typographical convention to add extra
|
||||
space after an end-of-sentence punctuation mark, and LyX honors those conventio
|
||||
ns (see section\InsetSpace ~
|
||||
@ -22148,10 +22147,10 @@ protected
|
||||
\end_layout
|
||||
|
||||
\begin_layout Quote
|
||||
D.\InsetSpace \,
|
||||
D.\InsetSpace \thinspace{}
|
||||
E.
|
||||
Knuth has developped our beloved typesetting program, i.\InsetSpace \,
|
||||
e.\InsetSpace \space
|
||||
Knuth has developped our beloved typesetting program, i.\InsetSpace \thinspace{}
|
||||
e.\InsetSpace \space{}
|
||||
TeX.
|
||||
\end_layout
|
||||
|
||||
|
@ -1,3 +1,11 @@
|
||||
2005-09-28 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* LyX.py: enlarge range to current format (244).
|
||||
* lyx_1_4.py (revert_spaces): fix so that new space insets are reverted
|
||||
to ERT.
|
||||
* lyx_1_4.py (rename_spaces, revert_space_names): some InsetSpace types
|
||||
had to be renamed; conversion takes place between 243<->244.
|
||||
|
||||
2005-09-19 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* parser_tools.py (get_paragraph, get_next_paragraph): add format
|
||||
|
@ -46,7 +46,7 @@ format_relation = [("0_10", [210], ["0.10.7","0.10"]),
|
||||
("1_1_6fix3", [218], ["1.1.6fix3","1.1.6fix4","1.1"]),
|
||||
("1_2", [220], ["1.2.0","1.2.1","1.2.3","1.2.4","1.2"]),
|
||||
("1_3", [221], ["1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3"]),
|
||||
("1_4", range(222,244), ["1.4.0cvs","1.4"])]
|
||||
("1_4", range(222,245), ["1.4.0cvs","1.4"])]
|
||||
|
||||
|
||||
def formats_list():
|
||||
|
@ -65,8 +65,38 @@ def convert_spaces(file):
|
||||
|
||||
|
||||
def revert_spaces(file):
|
||||
regexp = re.compile(r'(.*)(\\InsetSpace\s+)(\S+)')
|
||||
i = 0
|
||||
while 1:
|
||||
i = find_re(file.body, regexp, i)
|
||||
if i == -1:
|
||||
break
|
||||
space = regexp.match(file.body[i]).group(3)
|
||||
prepend = regexp.match(file.body[i]).group(1)
|
||||
if space == '~':
|
||||
file.body[i] = regexp.sub(prepend + '\\SpecialChar ~', file.body[i])
|
||||
i = i + 1
|
||||
else:
|
||||
file.body[i] = regexp.sub(prepend, file.body[i])
|
||||
file.body[i+1:i+1] = ''
|
||||
if space == "\\space":
|
||||
space = "\\ "
|
||||
i = insert_ert(file.body, i+1, 'Collapsed', space, file.format - 1)
|
||||
|
||||
##
|
||||
# \InsetSpace \, -> \InsetSpace \thinspace{}
|
||||
# \InsetSpace \space -> \InsetSpace \space{}
|
||||
#
|
||||
def rename_spaces(file):
|
||||
for i in range(len(file.body)):
|
||||
file.body[i] = replace(file.body[i],"\\InsetSpace ~", "\\SpecialChar ~")
|
||||
file.body[i] = replace(file.body[i],"\\InsetSpace \\space","\\InsetSpace \\space{}")
|
||||
file.body[i] = replace(file.body[i],"\\InsetSpace \,","\\InsetSpace \\thinspace{}")
|
||||
|
||||
|
||||
def revert_space_names(file):
|
||||
for i in range(len(file.body)):
|
||||
file.body[i] = replace(file.body[i],"\\InsetSpace \\space{}","\\InsetSpace \\space")
|
||||
file.body[i] = replace(file.body[i],"\\InsetSpace \\thinspace{}","\\InsetSpace \\,")
|
||||
|
||||
|
||||
##
|
||||
@ -2255,9 +2285,11 @@ convert = [[222, [insert_tracking_changes, add_end_header]],
|
||||
[240, [convert_output_changes]],
|
||||
[241, [convert_ert_paragraphs]],
|
||||
[242, [convert_french]],
|
||||
[243, [remove_paperpackage]]]
|
||||
[243, [remove_paperpackage]],
|
||||
[244, [rename_spaces]]]
|
||||
|
||||
revert = [[242, []],
|
||||
revert = [[243, [revert_space_names]],
|
||||
[242, []],
|
||||
[241, []],
|
||||
[240, [revert_ert_paragraphs]],
|
||||
[239, [revert_output_changes]],
|
||||
|
@ -1,3 +1,7 @@
|
||||
2005-09-28 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* buffer.C: format is up to 244.
|
||||
|
||||
2005-09-27 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* text.C (redoParagraph): fix calcultation of inset width wrt
|
||||
|
@ -144,7 +144,7 @@ extern BufferList bufferlist;
|
||||
|
||||
namespace {
|
||||
|
||||
int const LYX_FORMAT = 243;
|
||||
int const LYX_FORMAT = 244;
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2005-09-28 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* insetspace.C: rename '\,' to '\thinspace{}' (avoid parsing error)
|
||||
and '\space' to '\space{}' (consistency).
|
||||
|
||||
2005-09-19 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* insettabular.C (tabularFeatures): validate cursor after
|
||||
|
@ -106,13 +106,13 @@ void InsetSpace::write(Buffer const &, ostream & os) const
|
||||
string command;
|
||||
switch (kind_) {
|
||||
case NORMAL:
|
||||
command = "\\space";
|
||||
command = "\\space{}";
|
||||
break;
|
||||
case PROTECTED:
|
||||
command = "~";
|
||||
break;
|
||||
case THIN:
|
||||
command = "\\,";
|
||||
command = "\\thinspace{}";
|
||||
break;
|
||||
case QUAD:
|
||||
command = "\\quad{}";
|
||||
@ -134,17 +134,16 @@ void InsetSpace::write(Buffer const &, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
// This function will not be necessary when lyx3
|
||||
void InsetSpace::read(Buffer const &, LyXLex & lex)
|
||||
{
|
||||
lex.next();
|
||||
string const command = lex.getString();
|
||||
|
||||
if (command == "\\space")
|
||||
if (command == "\\space{}")
|
||||
kind_ = NORMAL;
|
||||
else if (command == "~")
|
||||
kind_ = PROTECTED;
|
||||
else if (command == "\\,")
|
||||
else if (command == "\\thinspace{}")
|
||||
kind_ = THIN;
|
||||
else if (command == "\\quad{}")
|
||||
kind_ = QUAD;
|
||||
|
Loading…
Reference in New Issue
Block a user