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
Last revisionBoth sides next revision
ja:dev:citation_styles:style_editing_step-by-step [2012/01/07 01:06] – [3 - Install your Edited Style with Zotero] odonja:dev:citation_styles:style_editing_step-by-step [2014/07/02 03:10] – [ヘルプ] odon1
Line 14: Line 14:
 編集したいと思うスタイルをあなたのコンピューターにダウンロードして、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の文法チェック]]が可能です。 編集したいと思うスタイルをあなたのコンピューターにダウンロードして、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の中での変更は簡単に失われてしまいます。+スタイルのコードを[[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 の仕様]]に目を通すようにしてください)。以下ではいくつかの基本的なスタイル編集について論じます。 CSLに変更を行う際の情報については、CSLプロジェクトのウェブサイトにある[[http://citationstyles.org/citation-style-language/documentation/|ドキュメンテーションのページ]]を参照するようにしてください (特に、[[http://citationstyles.org/downloads/specification.html|CSL の仕様]]に目を通すようにしてください)。以下ではいくつかの基本的なスタイル編集について論じます。
-==== Examples Edits ====+==== 編集の例 ====
  
-===Changing Punctuation===+===句読点の打ち方の変更=== 
 + 
 +この例では、出版社("CSHL Press")と出版社の所在地("Cold Spring Harbor, NY")を文献目録に表示したいものとします。これは次のコードで実現することができますが、
  
-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> <code>
Line 28: Line 29:
 </code> </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:+これでは出力は"CSHL PressCold Spring Harbor, NY"のようになってしまいます。幸いにも''prefix''、 ''suffix'' そして ''delimiter''属性に句読点を追加することが可能です。たとえば、''publisher'' と ''publisher-place''とを、コンマとスペースとで区切り、この両者を一組の括弧で括りたい(すなわち、 "(CSHL Press, Cold Spring Harbor, NY)"という出力)ものとしますと、これは次のように実現することができます。
  
 <code> <code>
Line 37: Line 38:
 </code> </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.+''group''要素を使用する利点は、''publisher''はあるが、''publisher-place''がないような場合に、望ましくない句読点の使用に煩わされずにすむことです。この場合の出力は、"(CSHL Press)"のようになります。もしも、句読点を直接''text''要素に指定するとすると、すなわち以下のコードを使用すると
  
 <code xml> <code xml>
Line 44: Line 45:
 </code> </code>
  
-you would lose the closing bracket, i.e. "(CSHL Press".+"(CSHL Press"のように、閉じる側の括弧を失うことになります .
  
-=== Changing Et-al Abbreviation ===+=== et-al 略記の変更 ===
  
-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.".+et-al略記(すなわち"Doe, Smith & Johnson" を "Doe et al."と表記すること)については大きくふたつの設定があります。et-al略記を行うための最少の著者数、そして"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).+CSLにおいては、これらの設定は''style''''citation''''bibliography''または''names''要素に、''et-al-min'' および ''et-al-use-first''属性として現れます(なお、''et-al-subsequent-min'' および ''et-al-subsequent-use-first''属性を使って、すでに本文中で引用された文献項目について別の指定を行うこともあり得ます。)。 
  
-For example,+ 
 +たとえば、次のコード
  
 <code xml> <code xml>
Line 60: Line 62:
 </code> </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.+は、"Doe"、 "Doe & Smith" そして、もし著者が三名以上の場合には、"Doe et al."という、著者名一覧を出力します。これらの数値を変更して効果をご確認ください。
  
-===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)").+CSLは、引用文献や著者名の曖昧性を解消するための複数の手段を提供します。たとえば、あるスタイルが通常は姓のみを表示するとしましょう(つまり"(Doe 1999, Doe 2002)"となります)。もし、これらの著者がJane Doe と Thomas Doeであった場合、これらの名前の曖昧性は下の名前のイニシャルを追加することで解消することができます(つまり"(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+曖昧性解消法は''citation''要素で選択されます。たとえば、[[kb/given_name_disambiguation|下の名前による曖昧性解消]]を無効にするには、''disambiguate-add-givenname''属性を削除します。すなわち、
  
 <code xml> <code xml>
Line 74: Line 76:
 </code> </code>
  
-to+
  
 <code xml> <code xml>
Line 82: Line 84:
 </code> </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.+==== スタイルの名前とIDの変更 ====
  
-The style title and ID are stored within the ''<title/>'' and ''<id/>'' elements near the top of the style. For example,+編集済みののスタイルをインストールする前に、編集前のスタイルを上書きしたくなければ、新しいスタイルの名前とIDを変更してください。 
 + 
 +スタイルの名前とIDは、スタイル・コードの始まり近く、''<title/>'' および ''<id/>''要素の中に格納されています。たとえば、
  
 <code><title>Harvard Reference format 1 (Author-Date)</title>  <code><title>Harvard Reference format 1 (Author-Date)</title> 
 <id>http://www.zotero.org/styles/harvard1</id></code> <id>http://www.zotero.org/styles/harvard1</id></code>
  
-can be changed to+を以下のように変更することができます。
  
 <code><title>Harvard Style Modified</title> <code><title>Harvard Style Modified</title>
Line 100: Line 104:
 変更したスタイルをインストールする前に、必ずそれが正確なXMLかつCSLであることを[[https://github.com/citation-style-language/styles/wiki/Validation|CSL文法チェック]]で確認して下さい。 変更したスタイルをインストールする前に、必ずそれが正確な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にインストール ===== ===== 3 - 編集済みのスタイルをZoteroにインストール =====
  
Line 106: Line 111:
 {{:style_install.png?600}} {{:style_install.png?600}}
  
-===== 4 - Sharing Styles =====+===== 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==
  
-If you think that your modified style might be useful to other peopleconsider [[https://github.com/citation-style-language/styles/wiki/Submitting-Styles|submitting]] it to the [[/styles|Zotero Style Repository]].+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 changesand 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). 
 +===== ヘルプ =====
  
-===== Getting Help =====+どこかで行き詰まった場合には、 [[/forum/|Zotero フォーラム]]を検索してみるか、そこに答えが見つからない場合はフォーラムの [[/forum/11/|引用様式部門]]に投稿してください。 
  
-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'[[/forum/11/|styles section]]. +  * [[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スタイルを編集することが出来ます