Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
ja:dev:citation_styles:style_editing_step-by-step [2014/07/02 03:10] – [ヘルプ] odon1ja: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の文法チェック]]が可能です。 
- 
-スタイルのコードを[[ja:dev:citation_styles:reference_test_pane|Zotero 参考文献検証画面]]にコピーして貼りつけてください。こうすると、コードの編集によるスタイル出力への効果を直ちに確認することができます。このtest paneの中で直接編集を行う場合、編集をテキストエディタで頻繁に保存するようにしてください。test paneの中での変更は簡単に失われてしまいます。 
- 
-CSLに変更を行う際の情報については、CSLプロジェクトのウェブサイトにある[[http://citationstyles.org/citation-style-language/documentation/|ドキュメンテーションのページ]]を参照するようにしてください (特に、[[http://citationstyles.org/downloads/specification.html|CSL の仕様]]に目を通すようにしてください)。以下ではいくつかの基本的なスタイル編集について論じます。 
-==== 編集の例 ==== 
- 
-===句読点の打ち方の変更=== 
- 
-この例では、出版社("CSHL Press")と出版社の所在地("Cold Spring Harbor, NY")を文献目録に表示したいものとします。これは次のコードで実現することができますが、 
- 
- 
-<code> 
-<text variable="publisher"/> 
-<text variable="publisher-place"/> 
-</code> 
- 
-これでは出力は"CSHL PressCold Spring Harbor, NY"のようになってしまいます。幸いにも''prefix''、 ''suffix'' そして ''delimiter''属性に句読点を追加することが可能です。たとえば、''publisher'' と ''publisher-place''とを、コンマとスペースとで区切り、この両者を一組の括弧で括りたい(すなわち、 "(CSHL Press, Cold Spring Harbor, NY)"という出力)ものとしますと、これは次のように実現することができます。 
- 
-<code> 
-<group delimiter=", " prefix="(" suffix=")"> 
-  <text variable="publisher"/> 
-  <text variable="publisher-place"/> 
-</group> 
-</code> 
- 
-''group''要素を使用する利点は、''publisher''はあるが、''publisher-place''がないような場合に、望ましくない句読点の使用に煩わされずにすむことです。この場合の出力は、"(CSHL Press)"のようになります。もしも、句読点を直接''text''要素に指定するとすると、すなわち以下のコードを使用すると 
- 
-<code xml> 
-<text variable="publisher" prefix="("/> 
-<text variable="publisher-place" prefix=", " suffix=")"/> 
-</code> 
- 
-"(CSHL Press"のように、閉じる側の括弧を失うことになります . 
- 
-=== et-al 略記の変更 === 
- 
-et-al略記(すなわち"Doe, Smith & Johnson" を "Doe et al."と表記すること)については大きくふたつの設定があります。et-al略記を行うための最少の著者数、そして"et al."の前に表示される名前の数です。 
- 
-CSLにおいては、これらの設定は''style''、''citation''、''bibliography''または''names''要素に、''et-al-min'' および ''et-al-use-first''属性として現れます(なお、''et-al-subsequent-min'' および ''et-al-subsequent-use-first''属性を使って、すでに本文中で引用された文献項目について別の指定を行うこともあり得ます。)。  
- 
- 
-たとえば、次のコード 
- 
-<code xml> 
-<citation et-al-min="3" et-al-use-first="1"> 
-  ... 
-</citation> 
-</code> 
- 
-は、"Doe"、 "Doe & Smith" そして、もし著者が三名以上の場合には、"Doe et al."という、著者名一覧を出力します。これらの数値を変更して効果をご確認ください。 
- 
-===曖昧性解消法の変更=== 
- 
-CSLは、引用文献や著者名の曖昧性を解消するための複数の手段を提供します。たとえば、あるスタイルが通常は姓のみを表示するとしましょう(つまり"(Doe 1999, Doe 2002)"となります)。もし、これらの著者がJane Doe と Thomas Doeであった場合、これらの名前の曖昧性は下の名前のイニシャルを追加することで解消することができます(つまり"(J. Doe 1999, T. Doe 2002)"となります)。 
- 
-曖昧性解消法は''citation''要素で選択されます。たとえば、[[kb/given_name_disambiguation|下の名前による曖昧性解消]]を無効にするには、''disambiguate-add-givenname''属性を削除します。すなわち、 
- 
-<code xml> 
-<citation disambiguate-add-givenname="true"> 
-  ... 
-</citation> 
-</code> 
- 
- 
- 
-<code xml> 
-<citation> 
-  ... 
-</citation> 
-</code> 
- 
-のように変更します。 
- 
-==== スタイルの名前とIDの変更 ==== 
- 
-編集済みののスタイルをインストールする前に、編集前のスタイルを上書きしたくなければ、新しいスタイルの名前とIDを変更してください。 
- 
-スタイルの名前とIDは、スタイル・コードの始まり近く、''<title/>'' および ''<id/>''要素の中に格納されています。たとえば、 
- 
-<code><title>Harvard Reference format 1 (Author-Date)</title>  
-<id>http://www.zotero.org/styles/harvard1</id></code> 
- 
-を以下のように変更することができます。 
- 
-<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文法チェック]]で確認して下さい。 
- 
-[[http://validator.nu/?schema=https%3A%2F%2Fgithub.com%2Fcitation-style-language%2Fschema%2Fraw%2Fv1.0%2Fcsl.rnc&parser=xml&laxtype=yes|Validator.nu]] 
-===== 3 - 編集済みのスタイルをZoteroにインストール ===== 
- 
-スタイルを".csl"拡張子つきで保存し、このCSLスタイルをFirefoxブラウザ画面にドラッグ&ドロップして、「インストール」ボタンを押してください(画面の上部に出る"This XML style does not appear..."という灰色の帯は無視してください)。 
- 
-{{:style_install.png?600}} 
- 
-===== 4 - スタイルを共有する ===== 
- 
-もし編集したスタイルが[[https://github.com/citation-style-language/styles/wiki/Validation|文法チェック]]をクリアし、他の利用者にも有用であるとお考えなら、そのスタイルを[[/styles|Zotero 引用様式保管庫]]に[[https://github.com/citation-style-language/styles/wiki/Submitting-Styles|投稿]]してください。 
- 
-==方法1 gist.github.com (手軽で早い)== 
- 
-[[http://gist.github.com]]に移動し, スタイルのコードをテキストボックスに貼り付けてください。 スタイルに名前をつけて("name this file...")、"Create Public Gist"ボタンをクリックしてください。その結果作られるgistページのURL(例 [[https://gist.github.com/1320111]])をコピーして、Zoteroのスタッフへ知らせてください。[[http://forums.zotero.org/11/|ZoteroフォーラムのCitation Styles部門]]で新しい議論を立ち上げてくださっても構いませんし、スタイルの保管庫の中で[[https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcitation-style-language%2Fstyles%2Fissues%2Fnew|新しいGitHub issueを作って]]貰っても構いません。 
- 
- 
-==方法2 Pull Requests== 
- 
-Creating GitHub pull requests is slightly more complicated, but is more convenient for us, and quicker if you want to submit (changes to) a large number of styles. Start by forking the style repository. Commit your changes, and create a pull request. You can do all this directly through the GitHub interface (see https://github.com/blog/844-forking-with-the-edit-button), or use a local Git client (we recommend SmartGit, which is free for non-commercial purposes, and doesn't require you to manually set up a SSH connection). 
-===== ヘルプ ===== 
- 
-どこかで行き詰まった場合には、 [[/forum/|Zotero フォーラム]]を検索してみるか、そこに答えが見つからない場合はフォーラムの [[/forum/11/|引用様式部門]]に投稿してください。  
- 
-  * [[http://citationstyles.org/downloads/specification.html|CSL 1.0 Specification]] 
-  * [[http://citationstyles.org/downloads/primer.html|CSL 1.0 Primer]] 
-  * [[https://github.com/citation-style-language/styles/wiki]] 
-  * [[http://editor.citationstyles.org/visualEditor/|Visual CSL Editor]] 洗練されたGUIでCSLスタイルを編集することが出来ます 
ja/dev/citation_styles/style_editing_step-by-step.1404285040.txt.gz · Last modified: 2014/07/02 03:10 by odon1