این الگو ISBN های 9 رقمی ، 10 و 13 رقمی ISBN را طبق قوانین تعیین شده توسط آژانس بین المللی شابک قالب بندی می کند. [1]
الگو یک ISBN معتبر را به عنوان آرگومان می گیرد و نسخه قالب بندی شده آن ISBN را به دست می دهد. هر خط تیره موجود در ISBN نادیده گرفته می شود، خواه درست قرار گرفته باشد یا نه:
{{format ISBN|97-8-1-57181655-9}}
→ 978-1-57181-655-9{{Format ISBN}}
قرار است جایگزین شود تا فراخوانی الگو در ویکیتکست با ISBN قالببندی شده جایگزین شود. جایگزینی ممکن است به دو صورت انجام شود. ساده ترین و مطمئن ترین روش این است که به سادگی الگو را مانند هر الگوی دیگری بنویسید. پس از انتشار ویرایش شما، AnomieBOT ، معمولاً ظرف چند ساعت، جایگزینی را انجام می دهد. روش دیگر این است که یک فرم به وضوح قابل تعویض از الگو بنویسید که باعث می شود در زمان انتشار ویرایش شما، الگو جایگزین شود:
{{subst:format ISBN|9781571816559}}
→ 978-1-57181-655-9هشدار: subst:
داخل برچسب ها کار نمی کند <ref>...</ref>
(به phab:T4700 مراجعه کنید). برای استفاده در <ref>...</ref>
تگها، مستقیماً از الگو استفاده کنید و به AnomieBOT اجازه دهید تا جایگزین را انجام دهد:
<ref> ... {{format ISBN|9781571816559}} ... </ref>
توجه داشته باشید که اگر این را بنویسید:
<ref> ... {{subst:format ISBN|9781571816559}} ... </ref>
AnomieBOT جایگزین الگو نمی شود.
این الگو سه پارامتر را می پذیرد. یکی بی نام و دو نام:
|1=
(پارامتر بدون نام) - (لازم است) شابک قالب بندی شود|separator=
– (اختیاری) یک کلمه کلیدی از پیش تعریف شده را می پذیرد: space
; هنگامی که |separator=space
، عناصر ISBN ارائه شده با استفاده از یک کاراکتر فاصله از هم جدا می شوند. برای هر مقدار دیگری، این الگو با جداکننده های خط فاصله نمایش داده می شود|out=
– (اختیاری) یکی از دو کلمه کلیدی از پیش تعریف شده را می پذیرد: 10
یا 13
; برای کسانی که مایل به تبدیل ISBN10 به ISBN13 هستند، تنظیم کنید |out=13
. برای تبدیل یک مجموعه ISBN13 به ISBN10 |out=10
. این پارامتر زمانی که ورودی است نادیده گرفته می شود:979
اگر پارامتر بدون نام این الگو شامل 9، 10 یا 13 رقم نباشد، یا رقم چک آن چیزی نباشد که از بقیه عدد انتظار میرود، شماره ورودی بدون تغییر برگردانده میشود. در چنین حالتی قالب بندی امکان پذیر نیست، زیرا ممکن است هر یک از ارقام اشتباه باشد و این روی قرارگیری خط تیره ها تأثیر می گذارد. این الگو برای استفاده در یک الگوی محصور در نظر گرفته شده است، که هر گونه خطا در طول، رقم بررسی یا نویسههای نامعتبر را گزارش میکند. در این مثال از قالب فرمت ISBN، ورودی to {{Format ISBN}}
دارای یک رقم بررسی نادرست است، بنابراین الگو ورودی خود را بدون تغییر برمی گرداند:
{{format ISBN|9789295055123}}
← 9789295055123هنگامی که این الگو، با استفاده از همان ISBN نامعتبر، در ضمیمه یا قرار می گیرد ، پیام های خطای مناسب توسط آن الگوها نمایش داده می شود:{{ISBN}}
{{cite book}}
{{ISBN|{{format ISBN|9789295055123}}}}
{{cite book |title=ISBN Users' Manual: International Edition |edition=7th |location=London |publisher=International ISBN Agency |date=2017 |isbn={{format ISBN|9789295055123|nosubst=true}}}}
{{cite book}}
: بررسی |isbn=
مقدار: چک جمع ( راهنما )نکته مهم : بدون در نظر گرفتن اعتبار ISBN ورودی، جایگزینی انجام خواهد شد. پیش نمایش ویرایش های شما پیشنهاد می شود.
شابک 13
{{format ISBN|9781571816559}}
→ 978-1-57181-655-9 (ورودی 13 رقمی){{format ISBN|9783033009608}}
→ 978-3-033-00960-8 (شبکه آلمانی که با 978-3 شروع می شود){{format ISBN|9788876055485}}
← 978-88-7605-548-5 (شابک ایتالیایی که با 978-88 شروع می شود){{format ISBN|9791220008525}}
→ 979-12-200-0852-5 (شابک ایتالیایی که با 979-12 شروع می شود [2] ){{format ISBN|97-8-1-60520624-0}}
→ 978-1-60520-624-0 (13 رقم با خط فاصله نامعتبر)شابک 10
{{format ISBN|1605206245}}
← 1-60520-624-5 (ورودی 10 رقمی [2] ){{format ISBN|0-385-33348-X}}
← 0-385-33348-XSBN
{{subst:format ISBN|035789360}}
→ 03-578936-0 (ورودی 9 رقمی (SBN))ورودی نامعتبر است
{{format ISBN|97808108596789}}
← 97808108596789 (ISBN با طول ورودی نامناسب: 10 یا 13 رقمی نیست){{format ISBN|03578936X}}
← 03578936X (9 رقمی با رقم چک نامعتبر؛ احتمالاً یک رقم چک SBN نامعتبر یا یک ISBN10 با یک رقم گمشده){{format ISBN|9780816645842}}
→ 9780816645842 (شبکه با رقم چک نامعتبر: باید 8 باشد){{format ISBN|Unknown}}
← نامشخص (پارامتر ISBN حاوی متنی که شابک نیست){{format ISBN|9782D0GP00P37}}
→ 9782D0GP00P37{{format ISBN}}
→ (خروجی خالی از ISBN خالی: پیام خطایی وجود ندارد)با استفاده از پارامترهای اختیاری
{{format ISBN|9781571816559|separator=space}}
→ 978 1 57181 655 9 (نویسه فاصله به عنوان جداکننده در خروجی استفاده می شود){{format ISBN|9781571816559|out=10}}
← 1-57181-655-0 (تبدیل ISBN13 به ISBN10){{format ISBN|1571816550|out=13}}
← 978-1-57181-655-9 (تبدیل ISBN10 به ISBN13){{format ISBN|1571816550|out=13|separator=space}}
← 978 1 57181 655 9 (تبدیل ISBN10 به ISBN13 و با نویسه فاصله به عنوان جداکننده)برای جلوگیری از شناسایی نادرست، همه سیستمهای ایالات متحده باید قبل از شروع پردازش عناوین جدید با پیشوند 979، نشانگر 10 رقمی را به طور مؤثر بازنشسته کنند.