Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ja:dev:citation_styles:style_editing_step-by-step [2012/01/07 01:09] – [4 - Sharing Styles] odonja:dev:citation_styles:style_editing_step-by-step [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-======CSLスタイル編集の手引き====== 
  
-Zoteroで使用される [[http://citationstyles.org|Citation Style Language]] (CSL) スタイルのための、スタイル編集ソフトが(今のところ)存在しませんが、引用様式は手動で編集することが可能です。この手引で編集すべきスタイルの見つけ方、そのスタイルの編集、そして修正されたスタイルをZoteroにインストールするための基本的な手順をご紹介します。 
- 
-===== 1 - ふさわしい引用様式から手をつけましょう ===== 
- 
- [[/styles|Zotero 引用様式保管庫]]をまずご確認ください。既存のCSLスタイルを改善したい場合には、最新の版を編集するように念を押してください(保管庫はそれぞれの引用様式が最後に更新された日付を示しています)。新しいスタイルを作りたい場合は、保管庫のプレヴュー機能を利用してもっともよく似た既存のスタイルを見つけてください("Show only unique styles"にチェックをすると重複した物を隠すことができます)。また[[dev/citation_styles/preview_pane|Zotero プレヴュー画面]]を使ってインストール済みのスタイルの出力引用様式をZoteroライブラリの中の実際の項目を用いながら比較することができます。 
- 
- 
-**Important** If you have ever used Zotero 2.0 or an earlier version on your computer, your [[/support/zotero_data|Zotero data directory]] probably still contains styles in the CSL 0.8.1 format. While Zotero 2.1 and newer still supports this older format, it is strongly recommended to always start with an up-to-date style CSL 1.0 style from the [[/styles|Zotero Style Repository]], or, if you want to make changes to a CSL 0.8.1 style not present in the style repository, to first [[http://citationstyles.org/downloads/upgrade-notes.html#updating-csl-0-8-styles|update it to CSL 1.0]]. 
- 
-===== 2 - スタイルの編集 ===== 
- 
-編集したいと思うスタイルをあなたのコンピューターにダウンロードして、Windows付属のメモ帳、Mac OS X付属のテキストエディットなどの(プレイン)テキストエディタでそれを開いてください。その他の選択肢としては、Windows用の[[http://notepad-plus-plus.org/|Notepad++]]、Mac OS X用の[[http://www.barebones.com/products/TextWrangler/|TextWrangler]]、あるいは[[http://www.oxygenxml.com/|oXygen XML Editor]]、[[http://www.thaiopensource.com/nxml-mode/|Emacs in nXML mode]]、and [[http://www.jedit.org/|jEdit]]など、いずれもXML文法のカラーリング機能を備えていて(CSLはXMLに基づいた言語です)、あるものはリアルタイムでの[[https://github.com/citation-style-language/styles/wiki/Validation|CSLの文法チェック]]が可能です。 
- 
-スタイルのコードを[[/support/dev/citation_styles/reference_test_pane|Zotero Reference Test pane]]にコピーして貼りつけてください。こうすると、コードの編集によるスタイル出力への効果を直ちに確認することができます。このtest paneの中で直接編集を行う場合、編集をテキストエディタで頻繁に保存するようにしてください。test paneの中での変更は簡単に失われてしまいます。 
- 
-CSLに変更を行う際の情報については、CSLプロジェクトのウェブサイトにある[[http://citationstyles.org/citation-style-language/documentation/|ドキュメンテーションのページ]]を参照するようにしてください (特に、[[http://citationstyles.org/downloads/specification.html|CSL の仕様]]に目を通すようにしてください)。以下ではいくつかの基本的なスタイル編集について論じます。 
-==== Examples Edits ==== 
- 
-===Changing Punctuation=== 
- 
-In this example, we want to display the publisher ("CSHL Press") and the location of the publisher ("Cold Spring Harbor, NY") in a bibliographic entry. While this can be achieved with the code 
- 
-<code> 
-<text variable="publisher"/> 
-<text variable="publisher-place"/> 
-</code> 
- 
-this would result in "CSHL PressCold Spring Harbor, NY". Fortunately, we can add some punctuation with the ''prefix'', ''suffix'' and ''delimiter'' attributes. Let's say we want to separate the ''publisher'' and ''publisher-place'' by a comma-space, and wrap the whole in parentheses, i.e. "(CSHL Press, Cold Spring Harbor, NY)". This can be done with: 
- 
-<code> 
-<group delimiter=", " prefix="(" suffix=")"> 
-  <text variable="publisher"/> 
-  <text variable="publisher-place"/> 
-</group> 
-</code> 
- 
-The advantage of use a ''group'' element is that whenever you have a ''publisher'', but no ''publisher-place'', you don't end up with incorrect punctuation: the output would become "(CSHL Press)". If you would set the punctuation directly onto the ''text'' elements, e.g. 
- 
-<code xml> 
-<text variable="publisher" prefix="("/> 
-<text variable="publisher-place" prefix=", " suffix=")"/> 
-</code> 
- 
-you would lose the closing bracket, i.e. "(CSHL Press". 
- 
-=== Changing Et-al Abbreviation === 
- 
-There are two main settings for et-al abbreviation (e.g., rendering the names "Doe, Smith & Johnson" as "Doe et al."). The minimum number of names that activates et-al abbreviation, and the number of names shown before "et al.". 
- 
-In CSL, these settings can appear on the ''style'', ''citation'', ''bibliography'' or ''names'' elements in the form of the ''et-al-min'' and ''et-al-use-first'' attributes (it is possible to have separate settings for items that have been cited previously by using the ''et-al-subsequent-min'' and ''et-al-subsequent-use-first'' attributes). 
- 
-For example, 
- 
-<code xml> 
-<citation et-al-min="3" et-al-use-first="1"> 
-  ... 
-</citation> 
-</code> 
- 
-will result in name lists like "Doe", "Doe & Smith" and, if there are three or more names, "Doe et al.". Try changing these numbers and observe the effect. 
- 
-===Changing Disambiguation=== 
- 
-CSL offers multiple methods to disambiguate cites or names. For example, a style might normally render only the family name (e.g., "(Doe 1999, Doe 2002)"). If the authors are Jane Doe and Thomas Doe, these names can be disambiguated by adding initials or the full given names (e.g., "(J. Doe 1999, T. Doe 2002)"). 
- 
-Disambiguation methods are selected on the ''citation'' element. For example, to disable [[kb/given_name_disambiguation|given name disambiguation]], delete the ''disambiguate-add-givenname'' attribute, e.g. change 
- 
-<code xml> 
-<citation disambiguate-add-givenname="true"> 
-  ... 
-</citation> 
-</code> 
- 
-to 
- 
-<code xml> 
-<citation> 
-  ... 
-</citation> 
-</code> 
- 
-==== Change the Style Title and ID ==== 
- 
-Before installing your edited style, change the title and ID of your style if you don't want your modified style to overwrite the original style. 
- 
-The style title and ID are stored within the ''<title/>'' and ''<id/>'' elements near the top of the style. For example, 
- 
-<code><title>Harvard Reference format 1 (Author-Date)</title>  
-<id>http://www.zotero.org/styles/harvard1</id></code> 
- 
-can be changed to 
- 
-<code><title>Harvard Style Modified</title> 
-<id>http://www.zotero.org/styles/harvard-modified</id></code> 
- 
-==== 文法チェック ==== 
- 
-変更したスタイルをインストールする前に、必ずそれが正確なXMLかつCSLであることを[[https://github.com/citation-style-language/styles/wiki/Validation|CSL文法チェック]]で確認して下さい。 
- 
-===== 3 - 編集済みのスタイルをZoteroにインストール ===== 
- 
-スタイルを".csl"拡張子つきで保存し、このCSLスタイルをFirefoxブラウザ画面にドラッグ&ドロップして、「インストール」ボタンを押してください(画面の上部に出る"This XML style does not appear..."という灰色の帯は無視してください)。 
- 
-{{:style_install.png?600}} 
- 
-===== 4 - スタイルを共有する ===== 
- 
-もし編集したスタイルが他の利用者にも有用であるとお考えなら、そのスタイルを[[/styles|Zotero 引用様式保管庫]]に[[https://github.com/citation-style-language/styles/wiki/Submitting-Styles|投稿]]してください。 
- 
-===== Getting Help ===== 
- 
-If you get stuck at any point, try searching the [[/forum/|Zotero forums]], or, if that doesn't give an answer, post in the forum's [[/forum/11/|styles section]].  
ja/dev/citation_styles/style_editing_step-by-step.1325916565.txt.gz · Last modified: 2012/01/07 01:09 by odon