Modulo:Citazione/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
+
correggo
 
(6 versioni intermedie di uno stesso utente non sono mostrate)
Riga 98:
 
--[[ ===============================================================================
Ritorna true/false a seconda che la stringa siasi esclusivamentepossa inscrivere caratteriin latinicorsivo
===============================================================================]]
local function is_latinis_italicizable( str )
return require('Modulo:IsLatinValido in corsivo')._IsLatin_main({ str })
end
 
Riga 476:
if type(links) == 'table' then
for _, t in ipairs(links) do
t[2] = is_latinis_italicizable( t[2] ) and wrap( 'italic-title', t[2] ) or t[2]
value = value .. ' / ' .. external_link( t[1], t[2] )
end
Riga 1 092:
end
end
if is_set(Issue) and A:ORIGIN('Periodical') ~= "collana" then
if tonumber(Issue:gsub('[-/]', ''), 10) then
Issue = "n. " .. Issue
Riga 1 200:
end
------------------------------------------------------------------------------
-- Per cambiare posizione aalle collane onella seriecitazione dirispetto libri nella citazione,ai nomi
-- rispettodi arivista nomied dievitare rivistaedche evitare disiano precederleprecedute conda un "in"
-- TODO per il momento commentato (da rivedere per chiarire collana/opera)
------------------------------------------------------------------------------
-- local Book_seriesEditorialCollection = ''
-- if is_set(Periodical) and (A:ORIGIN('Periodical') == "opera" or A:ORIGIN('Periodical') == "collana") then
-- Book_series EditorialCollection = "(collana " .. wrap( 'italic-title', Periodical );
if is_set(Issue) then
-- Periodical = '';
EditorialCollection = EditorialCollection .. ', ' .. Issue;
-- end
Issue = '';
end
EditorialCollection = EditorialCollection .. ')';
-- Periodical = '';
-- end
 
------------------------------------------------------------------------------
Riga 1 301 ⟶ 1 305:
-- Recupero e formatto lista curatori
------------------------------------------------------------------------------
local EditorCount, msg_editors
local CuratoriEtal = A['Etalcuratori']
control.coauthors = false
ifcontrol.etal = is_set(CuratoriEtal) then
if is_set(Editors) or is_set(ChapterEditors) then
control.etal = true
else
control.etal = false
end
if is_set(Editors) or is_set(ChapterEditors) then
msg_editors = 'editors'
else
local EditorCount
Editors, EditorCount = list_people(control, e)
if is_set(Editors) then
ifmsg_editors = EditorCount <= 1 then msg_editors =and 'editor' else msg_editors =or 'editors' end
end
end
Riga 1 321 ⟶ 1 322:
-- Recupero e formatto lista autori e curatori di un singolo capitolo dell'opera citata
------------------------------------------------------------------------------
local msg_chapter_editors
local Contributors, ChapterEditors = "", ""
if is_set(Chapter) then
local ChapterEditorCount
control.etal = false
Contributors = list_people(control,
extract_names( args, 'ContributorList', A:ORIGIN('Chapter') ))
ChapterEditors, ChapterEditorCount = list_people(control,
extract_names( args, 'ChapterEditorList', A:ORIGIN('Chapter') ))
if is_set(ChapterEditors) then
msg_chapter_editors = ChapterEditorCount <= 1 and 'editor' or 'editors'
end
end
 
Riga 1 451 ⟶ 1 457:
end
end
Chapter = is_latinis_italicizable( Chapter ) and wrap( 'italic-title', Chapter ) or Chapter;
if is_set(TransChapter) then Chapter = Chapter .. " " .. TransChapter end
if is_set(Chapter) then
Riga 1 488 ⟶ 1 494:
end
end
Title = is_latinis_italicizable( Title ) and wrap('italic-title', Title ) or Title;
if is_set(TransTitle) then Title = Title .. " " .. TransTitle end
if is_set(Title) then
Riga 1 644 ⟶ 1 650:
fragment_citation:append(fragment_Title)
else
if is_set(ContributorsChapterEditors) and (is_set(ChapterEditorsContributors) or args["anteposizione-curatore"] == "no") then
ChapterEditors = 'a cura di ' .. ChapterEditors
fragment_citation = Fragment.new({Contributors, Chapter, ChapterEditors}, sepc)
else
if is_set(ChapterEditors) and is_set(msg_editors) then
ChapterEditors = wrap(msg_editorsmsg_chapter_editors, ChapterEditors)
end
if is_set(Chapter) and not (is_set(Contributors) or is_set(ChapterEditors)) then
if is_set(Authors) then
Contributors, Authors = Authors, ""
elseif is_set(Editors) and args["anteposizione-curatore"] ~= "no" then
ChapterEditors, Editors = wrap(msg_editors, Editors), ""
end
end
fragment_citation = Fragment.new({is_set(Contributors) and Contributors or ChapterEditors, Chapter}, sepc)
Riga 1 661 ⟶ 1 674:
end
end
if is_set(Editors) and (is_set(Authors) or args["anteposizione-curatore"] == "no" and not is_set(EditorsChapter)) then
Editors = 'a cura di ' .. Editors
fragment_citation:appends({Authors, fragment_Title, Editors})
else
if is_set(Editors) and is_set(msg_editors) then
Editors = wrap(msg_editors, Editors)
end
Riga 1 671 ⟶ 1 684:
end
end
fragment_citation:appends( { Conference, Periodical, Translator, Illustrator, Others, Series, -- Book_seriesVolume, Issue,
Volume, Issue, Edition, Institution, Place, PublisherName, Station, Date, Position } )
local fragment_ID_list = Fragment.new(ID_list, sepc):append(ID):start(",")
local fragment_URL = Fragment.new(URL):start(",")
Riga 1 679 ⟶ 1 692:
local fragment_Via = Fragment.new(Via):start(".")
local fragment_Quote = Fragment.new({Quote}):start(".")
fragment_citation:appends({fragment_ID_list, EditorialCollection, fragment_URL, fragment_AccessDate, fragment_Archived, fragment_Via})
if PostScript == 'nessuno' then
fragment_citation:last("nothing")