「ヘルプ:Formatting/ja」の版間の差分

提供: ひつじ小屋別館2代目
移動先: 案内検索
(& 記号をテキストとして出力するには以下のようにします。「<tt>&amp;</tt>」を使用すると、「&」の文字に置換されます (例: 「<tt>&amp;nbsp;</tt>」と入力すると、「<tt>&nbsp;</tt>」に...)
(1版 をインポートしました)
 
(4人の利用者による、間の12版が非表示)
45行目: 45行目:
 
<nowiki>''マークアップ''なし</nowiki>
 
<nowiki>''マークアップ''なし</nowiki>
 
|-
 
|-
| Escape wiki markup once
+
| 一度でのウィキ マークアップの回避
 
| <pre>
 
| <pre>
[[API]]&lt;nowiki/>extension
+
[[Special:MyLanguage/API:Main page|API]]&lt;nowiki/>&nbsp;拡張機能
 
</pre>
 
</pre>
 
|
 
|
[[API]]<nowiki/>extension
+
[[Special:MyLanguage/API:Main page|API]]<nowiki/>&nbsp;拡張機能
 
|-
 
|-
 
! colspan="3" style="background: #ABE" | 節の整形 - ''行頭でのみ有効''
 
! colspan="3" style="background: #ABE" | 節の整形 - ''行頭でのみ有効''
68行目: 68行目:
 
----
 
----
 
{{note|
 
{{note|
* [[Special:MyLanguage/Help_talk:Formatting#Level_1|Skip Level 1]], it is page name level.
+
* [[Special:MyLanguage/Help_talk:Formatting#Level_1|レベル 1 は使用しないでください]]。これはページ名に使用されるためです。
* An article with 4 or more headings automatically creates a [[wikipedia:Wikipedia:Section#Table of contents (TOC)|目次]].
+
* レベル 1 ~ 4 の見出しがある記事には、自動的に[[w:ja:Help:セクション#目次(TOC)|目次]]が生成されます。
 
}}
 
}}
 
|
 
|
<!-- 新しい節が作成されるのを回避するため、HTML マークアップを使用しています -->
+
<!-- using HTML markup to avoid creating new sections -->
 
<h2>レベル 2</h2>
 
<h2>レベル 2</h2>
  
97行目: 97行目:
 
|
 
|
 
<pre>
 
<pre>
* Start each line
+
* それぞれの行を、
* with an [[Wikipedia:asterisk|asterisk]] (*).
+
* アスタリスク[[Wikipedia:asterisk|asterisk]] (*)で始めます。
** More asterisks give deeper
+
** アスタリスクが多いほど、
*** and deeper levels.
+
*** リストが深くなっていきます。
* Line breaks <br />don't break levels.
+
* 改行<br />は深さを変えません。
*** But jumping levels creates empty space.
+
*** ただし、深さが連続していないときは隙間ができます。
Any other start ends the list.
+
その他の文字が来るとリストは終了します。
 
</pre>
 
</pre>
 
|
 
|
* Start each line
+
* それぞれの行を、
* with an [[Wikipedia:asterisk|asterisk]] (*).
+
* アスタリスク[[Wikipedia:asterisk|asterisk]] (*)で始めます。
** More asterisks give deeper
+
** アスタリスクが多いほど、
*** and deeper levels.
+
*** リストが深くなっていきます。
* Line breaks <br />don't break levels.
+
* 改行<br />は深さを変えません。
*** But jumping levels creates empty space.
+
*** ただし、深さが連続していないときは隙間ができます。
Any other start ends the list.
+
そのほかの文字が来るとリストは終了します。
 
|-
 
|-
 
| 番号付きリスト
 
| 番号付きリスト
 
|
 
|
 
<pre>
 
<pre>
# Start each line
+
# それぞれの行を、
# with a [[Wikipedia:Number_sign|number sign]] (#).
+
# ナンバーサイン[[Wikipedia:Number_sign|number sign]] (#)で始めます。
## More number signs give deeper
+
## ナンバーサインが多いほど、
### and deeper
+
### リストが、
### levels.
+
### 深くなっていきます。
# Line breaks <br />don't break levels.
+
# 改行<br />はレベルを変えません。
### But jumping levels creates empty space.
+
### ただし、深さが連続していないときは隙間ができます。
# Blank lines
+
# 空行は
  
# end the list and start another.
+
# リストを一旦終了して、次のリストを開始します。
Any other start also
+
その他の文字は同様にリストを終了します。
ends the list.
 
 
</pre>
 
</pre>
 
|
 
|
# Start each line
+
# それぞれの行を、
# with a [[Wikipedia:Number_sign|number sign]] (#).
+
# ナンバーサイン[[Wikipedia:Number_sign|number sign]] (#)で始めます。
## More number signs give deeper
+
## ナンバーサインが多いほど、
### and deeper
+
### リストが、
### levels.
+
### 深くなっていきます。
# Line breaks <br />don't break levels.
+
# 改行<br />はレベルを変えません。
### But jumping levels creates empty space.
+
### ただし、深さが連続していないときは隙間ができます。
# Blank lines
+
# 空行は、
  
# end the list and start another.
+
# リストを一旦終了して、次のリストを開始します。
Any other start also
+
その他の文字は同様にリストを終了します。
ends the list.
 
 
|-
 
|-
 
| 定義リスト
 
| 定義リスト
161行目: 159行目:
 
| テキストのインデント
 
| テキストのインデント
 
| <pre>
 
| <pre>
: Single indent
+
: 一個のインデント
:: Double indent
+
:: 二個のインデント
::::: Multiple indent
+
::::: 多数のインデント
 
</pre>
 
</pre>
 
----
 
----
{{Note|This workaround may harm accessibility.}}
+
{{Note|この回避策は、アクセシビリティに悪影響を及ぼす場合があります。}}
 
|
 
|
: Single indent
+
: 一個のインデント
:: Double indent
+
:: 二個のインデント
::::: Multiple indent
+
::::: 多数のインデント
 
|-
 
|-
 
| さまざまな種類のリストの混在
 
| さまざまな種類のリストの混在
193行目: 191行目:
 
</pre>
 
</pre>
 
----
 
----
{{note|The usage of <code>#:</code> and <code>*:</code> for breaking a line within an item may also harm accessibility.}}
+
{{note|項目内で改行するために <code>#:</code> <code>*:</code> を使用すると、アクセシビリティに悪影響を及ぼす場合があります。}}
 
|
 
|
 
# one
 
# one
225行目: 223行目:
 
  ''マークアップ''も'''''できます'''''。
 
  ''マークアップ''も'''''できます'''''。
 
|-
 
|-
| Preformatted text blocks
+
| 整形済みテキスト ブロック
 
| <pre> <nowiki><nowiki>Start with a space in the first column,
 
| <pre> <nowiki><nowiki>Start with a space in the first column,
 
(before the <nowiki>).
 
(before the <nowiki>).
252行目: 250行目:
  
 
def function():
 
def function():
     """documentation string"""
+
     """説明文書の文字列"""
  
 
     if True:
 
     if True:
271行目: 269行目:
 
! width=40% | 出力
 
! width=40% | 出力
 
|-
 
|-
| Inserted <br />(Displays as underline in most browsers)
+
| 挿入線 <br />(多くのブラウザでは下線が表示されます)
 
| <pre>
 
| <pre>
 
<ins>挿入済み</ins>
 
<ins>挿入済み</ins>
286行目: 284行目:
 
<u>下線</u>
 
<u>下線</u>
 
|-
 
|-
| Deleted <br />(Displays as strikethrough in most browsers)
+
| 打消し線 <br />(多くのブラウザでは文の中心に線が引かれます)
 
| <pre>
 
| <pre>
 
<s>取り消し済み</s>
 
<s>取り消し済み</s>
308行目: 306行目:
 
または
 
または
  
<tt>Fixed width text</tt>
+
<tt>等幅テキスト</tt>
 
</pre>
 
</pre>
 
|
 
|
317行目: 315行目:
 
<tt>等幅テキスト</tt>
 
<tt>等幅テキスト</tt>
 
|-
 
|-
| Blockquotes
+
| ブロック引用
 
| <pre>
 
| <pre>
 
前のテキスト
 
前のテキスト
<blockquote>Blockquote</blockquote>
+
<blockquote>ブロック引用</blockquote>
 
後のテキスト
 
後のテキスト
 
</pre>
 
</pre>
 
|
 
|
 
前のテキスト
 
前のテキスト
<blockquote>Blockquote</blockquote>
+
<blockquote>ブロック引用</blockquote>
 
後のテキスト
 
後のテキスト
 
|-
 
|-
 
| コメント
 
| コメント
| <pre><!-- This is a comment -->
+
| <pre><!-- コメント -->
Comments are visible only
+
コメントは編集欄でのみ表示されます。</pre>
in the edit zone.</pre>
 
 
|
 
|
<!-- This is a comment -->
+
<!-- コメント -->
Comments are visible only
+
コメントは編集欄でのみ表示されます。
in the edit zone.
 
 
|-
 
|-
 
| Completely preformatted text
 
| Completely preformatted text
397行目: 393行目:
 
== 記号の挿入 ==
 
== 記号の挿入 ==
  
Symbols and other special characters not available on your keyboard can be inserted through a special sequence of characters. Those sequences are called HTML entities. For example, the following sequence (entity) '''&amp;rarr;''' when inserted will be shown as <ins>right arrow</ins> HTML symbol &rarr; and '''&amp;mdash;''' when inserted will be shown as an <ins>em dash</ins> HTML symbol &mdash;.
+
キーボードから入力できない記号や特殊文字は特別な文字の並びによって挿入できます。この並びはHTMLエンティティと呼ばれます。例えば、次のようなエンティティ'''&amp;rarr;'''は挿入時に<ins>right arrow</ins> HTML特殊文字&rarr;として表示され、'''&amp;mdash;'''<ins>em dash</ins>HTML特殊文字&mdash;として表示されます。
 
----
 
----
{{note|Hover over any character to find out the symbol that it produces.  Some symbols not available in the current font will appear as empty squares.}}  
+
{{note|文字の上にマウスカーソルをかざすと、その文字を表示するHTMLエンティティが表示されます。現在のフォントで表示できない特殊文字は四角形で表示されます。}}  
  
 
{| class="wikitable" align=center width=100%
 
{| class="wikitable" align=center width=100%
698行目: 694行目:
 
:<tt>&lt;span style="color: red; text-decoration: line-through;">Typo to be corrected&lt;/span></tt> &nbsp;&rarr; '''<span style="color: red; text-decoration: line-through;">Typo to be corrected</span>'''
 
:<tt>&lt;span style="color: red; text-decoration: line-through;">Typo to be corrected&lt;/span></tt> &nbsp;&rarr; '''<span style="color: red; text-decoration: line-through;">Typo to be corrected</span>'''
  
:<tt><nowiki><span style="color: red; text-decoration: line-through;">Typo to be corrected</span></nowiki></tt> &nbsp;&rarr; '''&lt;span style="color: red; text-decoration: line-through;">Typo to be corrected&lt;/span>'''
+
:<tt><nowiki>&amp;lt;span style="color: red; text-decoration: line-through;">Typo to be corrected</span></nowiki></tt> &nbsp;&rarr; '''&lt;span style="color: red; text-decoration: line-through;">Typo to be corrected&lt;/span>'''
=== Nowiki for HTML ===
+
=== HTML の nowiki ===
 
<<nowiki />nowiki /> は、(HTML) タグを阻害します:
 
<<nowiki />nowiki /> は、(HTML) タグを阻害します:
 
* <nowiki><<</nowiki>nowiki />pre> &nbsp;&rarr; <<nowiki/>pre>
 
* <nowiki><<</nowiki>nowiki />pre> &nbsp;&rarr; <<nowiki/>pre>
710行目: 706行目:
 
テキスト整形以外の整形用マークアップについては以下を参照してください:
 
テキスト整形以外の整形用マークアップについては以下を参照してください:
  
* [[Special:MyLanguage/Help:Links|Links]]
+
* {{ll|Help:Links|nsp=0}}
 
* [[Special:MyLanguage/Help:Lists|Lists]]
 
* [[Special:MyLanguage/Help:Lists|Lists]]
 
* [[Special:MyLanguage/Help:Images|Images]]
 
* [[Special:MyLanguage/Help:Images|Images]]

2015年9月21日 (月) 22:22時点における最新版

PD 注意: このページを編集すると、編集内容が CC0 のもとで公開されることに同意したと見なされます。詳細はパブリック・ドメインのヘルプ ページを参照してください。
PD
</div>

ウィキマークアップを使用することによりテキストの整形ができます。テキスト整形マークアップには、アスタリスク・シングルクォート・等号などごく一般的な記号を使用します。これらの記号がウィキ内では特別な機能を果たすのです(一部の記号は特定の位置で使った時だけ機能します)。例えばことばをイタリック体にするには、そのことばを''このように''シングルクオート2つではさみます。

テキスト整形のマークアップ[編集]

説明 入力 出力
(インライン) 文字整形 - どこでも有効
斜体テキスト
''斜体''

斜体

太字テキスト
'''太字'''

太字

太字と斜体
'''''太字 & 斜体'''''

太字 & 斜体

取り消し線
<strike> 取り消し線 </strike>
取り消し線
ウィキ マークアップの回避
<nowiki>''マークアップ''なし</nowiki>

''マークアップ''なし

一度でのウィキ マークアップの回避
[[Special:MyLanguage/API:Main page|API]]<nowiki/> 拡張機能

API 拡張機能

節の整形 - 行頭でのみ有効
さまざまなレベルの見出し
== レベル 2 ==

=== レベル 3 ===

==== レベル 4 ====

===== レベル 5 =====

====== レベル 6 ======

レベル 2

レベル 3

レベル 4

レベル 5
レベル 6
水平線
前のテキスト
----
後のテキスト

前のテキスト


後のテキスト

番号なしリスト (箇条書き)
* それぞれの行を、
* アスタリスク[[Wikipedia:asterisk|asterisk]] (*)で始めます。
** アスタリスクが多いほど、
*** リストが深くなっていきます。
* 改行<br />は深さを変えません。
*** ただし、深さが連続していないときは隙間ができます。
その他の文字が来るとリストは終了します。
  • それぞれの行を、
  • アスタリスクasterisk (*)で始めます。
    • アスタリスクが多いほど、
      • リストが深くなっていきます。
  • 改行
    は深さを変えません。
      • ただし、深さが連続していないときは隙間ができます。

そのほかの文字が来るとリストは終了します。

番号付きリスト
# それぞれの行を、
# ナンバーサイン[[Wikipedia:Number_sign|number sign]] (#)で始めます。
## ナンバーサインが多いほど、
### リストが、
### 深くなっていきます。
# 改行<br />はレベルを変えません。
### ただし、深さが連続していないときは隙間ができます。
# 空行は

# リストを一旦終了して、次のリストを開始します。
その他の文字は同様にリストを終了します。
  1. それぞれの行を、
  2. ナンバーサインnumber sign (#)で始めます。
    1. ナンバーサインが多いほど、
      1. リストが、
      2. 深くなっていきます。
  3. 改行
    はレベルを変えません。
      1. ただし、深さが連続していないときは隙間ができます。
  4. 空行は、
  1. リストを一旦終了して、次のリストを開始します。

その他の文字は同様にリストを終了します。

定義リスト
;項目 1
: 定義 1
;項目 2
: 定義 2-1
: 定義 2-2
項目 1
定義 1
項目 2
定義 2-1
定義 2-2
テキストのインデント
: 一個のインデント
:: 二個のインデント
::::: 多数のインデント

この回避策は、アクセシビリティに悪影響を及ぼす場合があります。
一個のインデント
二個のインデント
多数のインデント
さまざまな種類のリストの混在
# one
# two
#* two point one
#* two point two
# three
#; three item one
#: three def one
# four
#: four def one
#: this looks like a continuation
#: and is often used
#: instead <br />of <nowiki><br /></nowiki>
# five
## five sub 1
### five sub 1 sub 1
## five sub 2

項目内で改行するために #:*: を使用すると、アクセシビリティに悪影響を及ぼす場合があります。
  1. one
  2. two
    • two point one
    • two point two
  3. three
    three item one
    three def one
  4. four
    four def one
    this looks like a continuation
    and is often used
    instead
    of <br />
  5. five
    1. five sub 1
      1. five sub 1 sub 1
    2. five sub 2
整形済みテキスト
 行頭に空白を挿入すると
 テキストが'''整形済み'''になり
 ''マークアップ''も'''''できます'''''。

この方式は段落整形のみを無効にし、文字整形のマークアップは有効のままです。
行頭に空白を挿入すると
テキストが整形済みになり
マークアップできます
整形済みテキスト ブロック
 <nowiki>Start with a space in the first column,
(before the <nowiki>).

Then your block format will be
    maintained.
 
This is good for copying in code blocks:

def function():
    """documentation string"""

    if True:
        print True
    else:
        print False</nowiki>
Start with a space in the first column,
(before the <nowiki>).

Then your block format will be
    maintained.

This is good for copying in code blocks:

def function():
    """説明文書の文字列"""

    if True:
        print True
    else:
        print False

段落[編集]

MediaWikiは通常の改行を無視します。新しい段落は空白行を残してから始めます。段落内で改行を強制するためにはHTMLタグの <br /> を使用できます。

HTMLタグ[編集]

MediaWikiではいくつかの HTML タグが認められています。これには<code>, <div>, <span> および <font> などがあります。これらのマークアップはどこで使用しても有効です。

説明 入力 出力
挿入線
(多くのブラウザでは下線が表示されます)
<ins>挿入済み</ins>

または

<u>下線</u>

挿入済み

または

下線

打消し線
(多くのブラウザでは文の中心に線が引かれます)
<s>取り消し済み</s>

または

<del>削除済み</del>

取り消し済み

または

削除済み

等幅テキスト
<code>ソース コード</code>

または

<tt>等幅テキスト</tt>

ソース コード

または

等幅テキスト

ブロック引用
前のテキスト
<blockquote>ブロック引用</blockquote>
後のテキスト

前のテキスト

ブロック引用

後のテキスト

コメント
<!-- コメント -->
コメントは編集欄でのみ表示されます。

コメントは編集欄でのみ表示されます。

Completely preformatted text
<pre>Text is '''preformatted''' and 
''markups'' '''''cannot''''' be done</pre>

For marking up of preformatted text, check the "Preformatted text" entry at the end of the previous table.
Text is '''preformatted''' and 
''markups'' '''''cannot''''' be done
Customized preformatted text
<pre style="color: red">Text is '''preformatted''' 
with a style and 
''markups'' '''''cannot''''' be done
</pre>

A CSS style can be named within the style property.
Text is '''preformatted''' 
with a style and 
''markups'' '''''cannot''''' be done

continued:

説明 入力 出力
Customized preformatted text with text wrap according to available width
<pre style="white-space: pre-wrap; 
white-space: -moz-pre-wrap; 
white-space: -pre-wrap; 
white-space: -o-pre-wrap; 
word-wrap: break-word;">
This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer.
</pre>
This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer.
Preformatted text with text wrap according to available width
<code>
This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer.
</code>

This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer.

記号の挿入[編集]

キーボードから入力できない記号や特殊文字は特別な文字の並びによって挿入できます。この並びはHTMLエンティティと呼ばれます。例えば、次のようなエンティティ&rarr;は挿入時にright arrow HTML特殊文字→として表示され、&mdash;em dashHTML特殊文字—として表示されます。


文字の上にマウスカーソルをかざすと、その文字を表示するHTMLエンティティが表示されます。現在のフォントで表示できない特殊文字は四角形で表示されます。
HTML symbol entities
Á á Â â ´ Æ æ À à Α α & Å å Ã ã Ä ä Β β ¦ Ç ç ¸ ¢
Χ χ ˆ © ¤ ° Δ δ ÷ É é Ê ê È è Ε ε Η η
Ð ð Ë ë ƒ ½ ¼ ¾ Γ γ > Í í Î î ¡ Ì ì Ι ι
¿ Ï ï Κ κ Λ λ « < ¯ µ · Μ μ  
¬ Ñ ñ Ν ν Ó ó Ô ô Œ œ Ò ò Ω ω Ο ο ª º Ø ø Õ õ Ö
ö Φ φ Π π ϖ ± £ Ψ ψ " » ® Ρ ρ
Š š § ­ Σ σ ς ¹ ² ³ ß Τ τ Θ θ ϑ Þ þ ˜
× Ú ú Û û Ù ù ¨ ϒ Υ υ Ü ü Ξ ξ Ý ý ¥ ÿ Ÿ Ζ ζ
説明 入力 出力
著作権記号
&copy;
©
ギリシャ文字の「デルタ」
&delta;
δ
通貨のユーロ記号
&euro;

See the list of all HTML entities on the Wikipedia article List of HTML entities. Additionally, MediaWiki supports two non-standard entity reference sequences: &רלמ; and &رلم; which are both considered equivalent to &rlm; which is a right-to-left mark. (Used when combining right to left languages with left to right languages in the same page.)

HTML tags and symbol entities displayed themselves (with and without interpreting them)[編集]

&amp;euro;  → &euro;
<span style="color: red; text-decoration: line-through;">Typo to be corrected</span>  → Typo to be corrected
&lt;span style="color: red; text-decoration: line-through;">Typo to be corrected</span>  → <span style="color: red; text-decoration: line-through;">Typo to be corrected</span>

HTML の nowiki[編集]

<nowiki /> は、(HTML) タグを阻害します:

  • <<nowiki />pre>  → <pre>

しかし、& 記号はエスケープされません:

  • &<nowiki />amp;  → &

& 記号をテキストとして出力するには以下のようにします。「&amp;」を使用すると、「&」の文字に置換されます (例: 「&amp;nbsp;」と入力すると、「&nbsp;」になります)。

その他の整形[編集]

テキスト整形以外の整形用マークアップについては以下を参照してください:

You can find more references at Help:Contents.

案内メニュー