「モジュール:Citation/CS-ja」の版間の差分
削除された内容 追加された内容
事典の名前を二重鍵括弧で括るようにする |
閉じ鍵括弧の直後の開き鍵括弧が消える不具合を解消、terminate_name_list()の呼び出しをすべてコメントアウト。参考: Help‐ノート:和書用出典表記形式#chapter引数の有無による括弧の不具合 |
||
925行目:
comp = value;
end
-- CS-ja独自: 追加処理でも利用する都合で、end_chrの定義位置を変更
-- typically duplicate_char is sepc
if
-- Because individual string segments often (always?) begin with terminal punct for the
-- preceding segment: 'First element' .. 'sepc next element' .. etc.?
trim = false;
▲ end_chr = f.sub(str, -1, -1); -- get the last character of the output string
-- str = str .. "<HERE(enchr=" .. end_chr .. ")" -- debug stuff?
if end_chr == duplicate_char then -- if same as separator
957 ⟶ 959行目:
str = f.sub(str, 1, -3); -- remove them both
end
-- CS-ja独自: 閉じ鍵括弧の直後に
elseif '」' == end_chr or '』' == end_chr then
trim = true;
972 ⟶ 974行目:
end
end
end▼
-- CS-ja独自: 開き鍵括弧の直前に読点を置かないようにする
local value_first = f.sub(value, 1, 1);
if end_chr == duplicate_char and ('「' == value_first or '『' == value_first) then
str = f.sub(str, 1, -2);
end
str = str .. value; -- add it to the output string
4,092 ⟶ 4,100行目:
end
end
end
if utilities.is_set (Authors) then
-- 以下はCS-jaでは不要と思われるため、コメントアウト
if (not utilities.is_set (Date)) then -- when date is set it's in parentheses; no Authors termination▼
▲ end
--end
if utilities.is_set (Editors) then
local in_text = '';
4,111 ⟶ 4,120行目:
post_text = cfg.messages['editors'];
end
-- 以下はCS-jaでは不要と思われるため、コメントアウト
--Editors = terminate_name_list (in_text .. Editors .. post_text, sepc); -- terminate with 0 or 1 sepc
end
if utilities.is_set (Contributors) then -- book cite and we're citing the intro, preface, etc.
4,117 ⟶ 4,127行目:
if (sepc ~= '.') then by_text = by_text:lower() end -- lowercase for cs2
Authors = by_text .. Authors; -- author follows title so tweak it here
-- 以下はCS-jaでは不要と思われるため、コメントアウト
--if utilities.is_set (Editors) and utilities.is_set (Date) then -- when Editors make sure that Authors gets terminated
▲ Authors = terminate_name_list (Authors, sepc); -- terminate with 0 or 1 sepc
--
▲ end
--end
▲ --if (not utilities.is_set (Date)) then
▲ Contributors = terminate_name_list (Contributors, sepc); -- terminate with 0 or 1 sepc
-- Contributors = terminate_name_list (Contributors, sepc); -- terminate with 0 or 1 sepc
▲ end
--end
if 'cs-ja2' == Mode then -- CS-ja独自: Modeの値によって日付の表示位置を変える
text = safe_join( {Contributors, Date, Chapter, tcommon, Authors, Place, Editors, tcommon2, pgtext}, sepc );
|