mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fileformat change.
Provide only one Japanese language that is encoding independent, patch partly by Koji Yokata. This fixes http://bugzilla.lyx.org/show_bug.cgi?id=4597 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24053 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
749cbb30ad
commit
30663a8019
@ -158,32 +158,18 @@ The following new LyX functions have been removed:
|
||||
For the detailed description of LyX functions look into doxygen documentation.
|
||||
|
||||
|
||||
Known issues in version 1.5.2
|
||||
Known issues in version 1.6.0
|
||||
------------------------------------
|
||||
|
||||
- Cursor restoration problems with Multiple-View:
|
||||
When using multiple Windows to edit different parts of the
|
||||
same document, the cursor position is sometimes not correctly restored
|
||||
when you switch from one view to the other.
|
||||
|
||||
- RTL and keymaps:
|
||||
Currently there is a bug where you can't use two non-RTL language keymaps if
|
||||
the RTL preference is set (which is now the default). If you need to use two
|
||||
non-RTL keymaps, for now you should just turn off the RTL preference (Tools ->
|
||||
Preferences... -> Language settings -> Language, uncheck "Right-to-left
|
||||
language support").
|
||||
We hope to offer more comprehensive support for multiple keymaps in the future,
|
||||
which will solve this bug, as well as allow more than just two keymaps. If you
|
||||
have any input on this issue, please chime in on the developers mailing list,
|
||||
or add your comments to http://bugzilla.lyx.org/show_bug.cgi?id=4051.
|
||||
- ...
|
||||
|
||||
|
||||
Caveats when upgrading from earlier versions to 1.5.x
|
||||
Caveats when upgrading from earlier versions to 1.6.x
|
||||
-------------------------------------------------------
|
||||
|
||||
Due to the change to Unicode, there are some general things you'll have to take care
|
||||
about when upgrading from an older version to LyX 1.5.0 or newer. Please refer to the
|
||||
file UPGRADING for details.
|
||||
The support for Japanese has been improved in LyX 1.6.x. Due to encoding
|
||||
reasons, Japanese documents that were edited with LyX 1.6.x cannot correctly
|
||||
be converted to the format of LyX 1.5.x and thus not edited with LyX 1.5.x.
|
||||
|
||||
|
||||
Note: There may later be an updated list of known issues online at
|
||||
|
@ -1,6 +1,10 @@
|
||||
LyX file-format changes
|
||||
-----------------------
|
||||
|
||||
2008-03-29 Uwe Stöhr <uwestoehr@web.de>
|
||||
* Format incremented to 325: merge the two Japanese languages to one that is
|
||||
encoding independent.
|
||||
|
||||
2008-03-25 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
* Format incremented to 324: merge the two newline insets.
|
||||
|
||||
|
@ -173,15 +173,12 @@ End
|
||||
|
||||
# Traditional Japanese TeX programs require neither CJK nor inputenc
|
||||
# package.
|
||||
Encoding euc-jp-plain EUC-JP-plain EUC-JP variable none
|
||||
Encoding euc-jp-plain EUC-JP-pLaTeX EUC-JP variable none
|
||||
End
|
||||
Encoding jis-plain JIS-plain JIS variable none
|
||||
Encoding jis-plain JIS-pLaTeX ISO-2022-JP variable none
|
||||
End
|
||||
Encoding shift-jis-plain SJIS-pLaTeX CP932 variable none
|
||||
End
|
||||
# The SJIS encoding can't be taken as is, therefore it is disabled here
|
||||
# as long as someone build in the needed conversion, described here:
|
||||
# http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129935.html
|
||||
#Encoding shift-jis-plain SJIS-plain SJIS variable none
|
||||
#End
|
||||
|
||||
# This one needs hardcoded support, since the inputenc package does not know
|
||||
# tis620-0, and thailatex sets up babel directly to use tis620-0, so the
|
||||
|
@ -47,8 +47,7 @@ icelandic icelandic "Icelandic" false iso8859-15 is_IS ""
|
||||
interlingua interlingua "Interlingua" false iso8859-15 ia ""
|
||||
irish irish "Irish" false iso8859-15 ga_IE ""
|
||||
italian italian "Italian" false iso8859-15 it_IT ""
|
||||
japanese "" "Japanese" false euc-jp ja_JP ""
|
||||
japanese-plain "" "Japanese (non-CJK)" false euc-jp-plain ja_JP ""
|
||||
japanese japanese "Japanese" false jis-plain ja_JP ""
|
||||
kazakh kazakh "Kazakh" false pt154 kk_KZ ""
|
||||
# there is no country code for Korean because ko_KR is the same as ko_KI
|
||||
korean "" "Korean" false euc-kr ko ""
|
||||
|
@ -80,7 +80,7 @@ format_relation = [("0_06", [200], minor_versions("0.6" , 4)),
|
||||
("1_3", [221], minor_versions("1.3" , 7)),
|
||||
("1_4", range(222,246), minor_versions("1.4" , 5)),
|
||||
("1_5", range(246,277), minor_versions("1.5" , 2)),
|
||||
("1_6", range(277,325), minor_versions("1.6" , 0))]
|
||||
("1_6", range(277,326), minor_versions("1.6" , 0))]
|
||||
|
||||
|
||||
def formats_list():
|
||||
|
@ -1713,7 +1713,6 @@ def convert_linebreaks(document):
|
||||
'\\end_inset']
|
||||
|
||||
|
||||
|
||||
def revert_linebreaks(document):
|
||||
' Revert \\begin_inset Newline to previous inline format '
|
||||
i = 0
|
||||
@ -1730,6 +1729,23 @@ def revert_linebreaks(document):
|
||||
document.body[i] = document.body[i].replace('\\begin_inset Newline linebreak', '\\linebreak')
|
||||
|
||||
|
||||
def convert_japanese_plain(document):
|
||||
"Set language japanese-plain to japanese"
|
||||
i = 0
|
||||
if document.language == "japanese-plain":
|
||||
document.language = "japanese"
|
||||
i = find_token(document.header, "\\language", 0)
|
||||
if i != -1:
|
||||
document.header[i] = "\\language japanese"
|
||||
j = 0
|
||||
while True:
|
||||
j = find_token(document.body, "\\lang japanese-plain", j)
|
||||
if j == -1:
|
||||
return
|
||||
document.body[j] = document.body[j].replace("\\lang japanese-plain", "\\lang japanese")
|
||||
j = j + 1
|
||||
|
||||
|
||||
##
|
||||
# Conversion hub
|
||||
#
|
||||
@ -1782,10 +1798,12 @@ convert = [[277, [fix_wrong_tables]],
|
||||
[321, [convert_tablines]],
|
||||
[322, []],
|
||||
[323, [convert_pagebreaks]],
|
||||
[324, [convert_linebreaks]]
|
||||
[324, [convert_linebreaks]],
|
||||
[325, [convert_japanese_plain]],
|
||||
]
|
||||
|
||||
revert = [[323, [revert_linebreaks]],
|
||||
revert = [[324, []],
|
||||
[323, [revert_linebreaks]],
|
||||
[322, [revert_pagebreaks]],
|
||||
[321, [revert_local_layout]],
|
||||
[320, [revert_tablines]],
|
||||
|
@ -116,7 +116,7 @@ namespace os = support::os;
|
||||
|
||||
namespace {
|
||||
|
||||
int const LYX_FORMAT = 324;
|
||||
int const LYX_FORMAT = 325;
|
||||
|
||||
typedef map<string, bool> DepClean;
|
||||
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
|
||||
|
@ -1035,8 +1035,13 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
||||
// http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129417.html
|
||||
size_t viet = language_options.str().find("vietnam");
|
||||
// viet = string::npos when not found
|
||||
// when Japanese is used, babel must directly be loaded with the
|
||||
// language options, not in the class options, see
|
||||
// http://bugzilla.lyx.org/show_bug.cgi?id=4597#c4
|
||||
size_t japan = language_options.str().find("japanese");
|
||||
// japan = string::npos when not found
|
||||
if (lyxrc.language_global_options && !language_options.str().empty()
|
||||
&& viet == string::npos)
|
||||
&& viet == string::npos && japan == string::npos)
|
||||
clsoptions << language_options.str() << ',';
|
||||
}
|
||||
|
||||
@ -1282,18 +1287,6 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
||||
lyxpreamble += from_utf8(features.getBabelOptions());
|
||||
}
|
||||
|
||||
// When the language "japanese-plain" is used, the package "japanese" must
|
||||
// be loaded behind babel (it provides babel support for Japanese) but before
|
||||
// hyperref, see
|
||||
// http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129680.html
|
||||
if (language->lang() == "japanese-plain" &&
|
||||
!documentClass().provides("japanese")) {
|
||||
//load babel in case it was not loaded due to an empty language list
|
||||
if (language_options.str().empty())
|
||||
lyxpreamble += "\\usepackage{babel}\n";
|
||||
lyxpreamble += "\\usepackage{japanese}\n";
|
||||
}
|
||||
|
||||
// PDF support.
|
||||
// * Hyperref manual: "Make sure it comes last of your loaded
|
||||
// packages, to give it a fighting chance of not being over-written,
|
||||
@ -1782,7 +1775,12 @@ string BufferParams::babelCall(string const & lang_opts) const
|
||||
// http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129417.html
|
||||
size_t viet = lang_opts.find("vietnam");
|
||||
// viet = string::npos when not found
|
||||
if (!lyxrc.language_global_options || viet != string::npos)
|
||||
// when Japanese is used, babel must directly be loaded with the
|
||||
// language options, see
|
||||
// http://bugzilla.lyx.org/show_bug.cgi?id=4597#c4
|
||||
size_t japan = lang_opts.find("japanese");
|
||||
// japan = string::npos when not found
|
||||
if (!lyxrc.language_global_options || viet != string::npos || japan != string::npos)
|
||||
return "\\usepackage[" + lang_opts + "]{babel}";
|
||||
return lang_pack;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user