تضامنًا مع حق الشعب الفلسطيني |
قالب:Citation Style documentation/anchors
الاقتباسات المرتبطة
This citation template can be used in حواشي مختصرة أو parenthetical referencing. It does this by creating an HTML anchor containing an ID that can be linked to from within the body of the article. This is done by use of the ref parameter.
By default, this template does not generate an ID. For most purposes, |ref=harv
is used to created an ID from the term CITEREF, plus last names of the first four authors, or the last names of the first four editors, plus the year or date. Examples:
توصيف | ID |
---|---|
{{استشهاد بكتاب|last=Harwood |first=William B |title=Raise Heaven and Earth |year=1993 }} |
CITEREFHarwood1993 |
{{استشهاد بكتاب|last1=Brett |first1=Daniel |last2=Hardman |first2=George |last3=Ratycz |first3=Rostyslaw |title=Pershing: ST-120 Stabilizing Platform Familiarization |year=1964 }} |
CITEREFBrettHardmanRatycz1964 |
Some editors may choose to place multiple authors into one parameter. Punctuation is encoded thus the output is not as expected. مثال :
توصيف | ID |
---|---|
{{استشهاد بكتاب|authors=Daniel; Hardman, George; Ratycz, Rostyslaw |title=Pershing: ST-120 Stabilizing Platform Familiarization |year=1964 }} |
CITEREFDaniel.3B_Hardman.2C_George.3B_Ratycz.2C_Rostyslaw1964 |
It is highly recommended that the last1 through last9 أو editor1-last through editor1-last4 parameters be used when anchors are desired.
Where there may not be an author or date, then |ref=ID
is used to generate a user defined ID.
توصيف | ID |
---|---|
{{Cite journal|title=Pershing Rockets for Europe |journal=Interavia |year=1961 |ref=CITEREFInteravia1961}} |
CITEREFInteravia1961 |
It is highly recommended that the ID begin with CITEREF, as this will allow error checking tools to function. A custom ID must follow these rules:
- Names may not start with a number.
- The only characters that may be used unencoded are letters A–Z, a–z, and digits 0–9.
- Inclusion of any other characters will result in them being dot encoded.
- It is recommended that names be kept simple and restricted to the standard أبجدية إنجليزية and numerals.
التواريخ
This templates supports date، year و month. It is important to use these parameters properly to prevent a malformed ID.
- Month, day, year: Use date
- Year only: Use year
- Year and month: Use year و month
If a year only is used in date, then it may be interpreted as a time, and the ID will not be as expected.
{{توصيف |
. The special parameter |ref=harv
generates an ID suitable for Harvard referencing templates such as {{Harvard citation}} as specified in the next section; this is the default for the {{citation}} template. If an empty |ref=
is given, no anchor is generated; this is the default for the Cite templates such as {{مرجع كتاب}} و {{استشهاد بخبر}}. You can also specify the ID directly, using the |ref=ID
parameter. على سبيل المثال, suppose an article's References section contains the markup:
{{استشهاد |author=Sigmund Freud |title=Civilization and Its Discontents |year=1930 |ref=CivDis}}
which generates the citation:
- Sigmund Freud (1930)، Civilization and Its Discontents
Then, the markup "([[#CivDis|Freud 1930]])
" generates a parenthetical reference "(Freud 1930)" containing a wikilink to the citation (try clicking on the wikilink).
Anchors لقوالب مرجعية هارفارد
IDs compatible with Harvard referencing templates such as {{Harvard citation}} are computed from the last names of the authors and the year of the cited source. على سبيل المثال, the markup "{{Harvard citation|Wright|Evans|1851|p=ix}}
" generates the Harvard reference "(Wright & Evans 1851, p. ix)", which wikilinks to the citation whose markup and appearance are shown below:
{{استشهاد |last1=Wright |first1=Thomas |last2=Evans |first2=R. H. |title=Historical and Descriptive Account of the Caricatures of James Gillray |location=London |publisher=Henry G. Bohn |year=1851 |oclc=59510372}}
- Wright، Thomas؛ Evans، R. H. (1851)، Historical and Descriptive Account of the Caricatures of James Gillray، London: Henry G. Bohn، OCLC:59510372
In this example the {{citation}} template defines, and the {{Harvard citation}} template uses, the HTML ID "CITEREFWrightEvans1851
", composed by concatenating the string "CITEREF
" with the last names of the authors and the year. The {{SfnRef}} template can be used to generate such IDs, على سبيل المثال, {{SfnRef|Wright|Evans|1851}}
generates "CITEREFWrightEvans1851
".
Related methods which leave only a number in the text are to use the {{استشهاد بهارفارد دون أقواس}} template enclosed in the <ref></ref> html code, or to use the {{sfn}} template alone. The example above would be <ref>{{استشهاد بهارفارد دون أقواس|Wright|Evans|1851|p=ix}}</ref>
أو {{sfn|Wright|Evans|1851|p=ix}}
both of which generate a footnote, such as
- 17. Wright & Evans 1851، صفحة ix
The names of only the first four authors are used; other author names are not concatenated to the ID. If no author names are given, editor names are used instead. For patents، inventor names are used instead of authors or editors. If these names are not given, this template does not generate an anchor.
Last names are used, as specified by the parameters |last1=
(or |last=
), |last2=
، |last3=
, and |last4=
, and similarly for |editor1-last=
etc. and for |inventor1-last=
etc. If a full name is given but no last name is specified, this template falls back on the full name, but this usage is not recommended. على سبيل المثال, in "{{استشهاد | author = Sigmund Freud | title = The Ego and the Id | year = 1923}}
" no last name is given, so this citation cannot be combined with the Harvard reference "{{Harvard citation|Freud|1923}}
". To make these {{citation}} و {{Harvard citation}} invocations compatible, either replace "|author=Sigmund Freud
" with "|first=Sigmund
|last=Freud
", or add "|ref={{SfnRef|Freud|1923}}
" to the {{citation}} invocation, or add the same ref parameter (say, "|ref=EgoId
") to both the {{citation}} and the {{Harvard citation}} invocations.
Similarly, the year is used, as specified by |year=
. If no year is given, this template attempts to derive the year from |date=
(or, if no date is given, from |publication-date=
) by applying the MediaWiki#time function. This heuristic works with many common date formats (American, International and ISO standard format YYYY-MM-DD as listed in WP:MOS), but may not work as expected with other formats, so when in doubt it may be safer to use |year=
. Note that if only a year, say 2005, is known you must use |year=2005
rather than |date=2005
.
يجب أن تكون المعرفات فريدة
يجب اختيار الأسماء والسنوات والمعرفات المحددة يدويًا بحيث تكون المعرفات فريدة داخل الصفحة؛ وإلا فإن HTML لن يتوافق مع معايير W3C, وأي إشارات إلى الاستشهادات لن تعمل بشكل موثوق. على سبيل المثال، لنفترض أن الصفحة تحتوي على الاستشهاد التاليين بـ {{Harvard citation}}-معرفات متوافقة:
- Montes، G.؛ Halterman، J. S. (2008a)، "Association of Childhood Autism Spectrum Disorders and Loss of Family Income"، Pediatrics، ج. 121 ع. 4: e821–6، DOI:10.1542/peds.2007-1594، PMID:18381511
- Montes، G.؛ Halterman، J. S. (2008b)، "Child Care Problems and Employment Among Families with Preschool-aged Children with Autism in the United States"، Pediatrics، ج. 122 ع. 1: e202–8، DOI:10.1542/peds.2007-3037، PMID:18595965
إذا تم تغيير هذه الاستشهادات لتقول "2008" بدلاً من "2008a" و "2008b"، لن تعمل الصفحة الناتجة، لأن كلا الاستشهادين المختلفين سيحاولان استخدام نفس المعرف "CITEREFMontesHalterman2008
".لتجنب هذه المشكلة، .لتجنب هذه المشكلة، التمييز بين الاستشهادات بإضافة اللواحق إلى السنوات مثال: "|year=2008a
" و"|year=2008b
"، كما تم أعلاه. ويجب أن تستخدم السنوات بنفس اللواحق عند استخدام أي إشارات هارفارد.
من الممارسات الجيدة التحقق من أن الصفحة لا تحتوي على معرفات مكررة باستخدام W3C Markup Validation Service؛ طالع وصلات خارجية.