打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

用户:LynChern/Sandbox:修订间差异

来自 LNN的:not(博客)?
LynChern留言 | 贡献
Undo revision 179229 by LynChern (talk)
LynChern留言 | 贡献
Undo revision 179218 by LynChern (talk)
第1行: 第1行:
本页面分为两部分:如何实现特定效果,以及关于使用这些效果的样式指南。
This page is split into two parts: how to achieve certain effects, and style guidelines regarding use of those effects.


==测试场所==
==Where to test things out==


如果您想在编辑时进行测试而不改变实际文章,可以在[[Esolang:Sandbox|沙盒]]中进行(请自行清理!)或者在[[Special:MyPage/Sandbox|您自己的沙盒]]中进行。要预览对文章的更改而不提交,请使用编辑视图底部的“显示预览”和“显示更改”按钮。
If you wish to experiment with editing without changing an actual article, you may do so in the [[Esolang:Sandbox|sandbox]] (please clean up after yourself!) or in [[Special:MyPage/Sandbox|your own sandbox]]. To preview a change to an article without submitting it, use the "Show preview" and "Show changes" buttons at the bottom of the editing view.


==如何操作==
==How to do stuff==


===文本格式和组织===
===Text formatting and organization===


使用两个单引号表示斜体:<nowiki>''fun''</nowiki> 生成 ''fun''
Use two apostrophes for italics: <nowiki>''fun''</nowiki> produces ''fun''.


使用三个单引号表示粗体:<nowiki>'''Brainfuck'''</nowiki> 生成 '''Brainfuck'''。粗体应仅用于页面标题,且仅在该标题首次在文章中出现时使用。
Use three apostrophes for bold: <nowiki>'''Brainfuck'''</nowiki> produces '''Brainfuck'''. This should only be used for titles of pages, the first time they appear in the article.


使用两个等号表示章节:<nowiki>==计算能力==</nowiki>。使用三个等号表示子章节:<nowiki>===图灵等价===</nowiki>
Use two equals signs for sections: <nowiki>==Computational class==</nowiki>. Three for subsections: <nowiki>===Turing equivalence===</nowiki>.


:缩进通过在行首添加冒号实现。
:Indenting is achieved by starting the line with a colon


===内部链接===
===Internal links===


使用两个方括号表示维基内部的链接:<nowiki>[[Brainfuck]]</nowiki> 生成 [[Brainfuck]]
Use two brackets for links within the wiki: <nowiki>[[Brainfuck]]</nowiki> produces [[Brainfuck]].


对于文章名称,所有名词我们都使用单数形式(Esolang: 命名空间中的除外)。MediaWiki很智能,所以这很容易:只需写 <nowiki>[[esoteric programming language]]s</nowiki>,你就会得到 [[esoteric programming language]]s。注意,尽管 "s" 在方括号外面,但它看起来仍像是链接的一部分。
We use the singular form for all nouns for article names (except in the Esolang: namespace). MediaWiki is smart, so this is pretty easy: just do <nowiki>[[esoteric programming language]]s</nowiki> and you get [[esoteric programming language]]s. Notice how the s is outside the brackets, but it appears to be within the link anyway.


有时你需要更有创意,像这样:<nowiki>此类语言类似于 [[cellular automaton|cellular automata]]</nowiki>,这会生成:此类语言类似于 [[cellular automaton|cellular automata]]。文章名称区分大小写(所以不要链接到 "BrainFuck"),但 MediaWiki 会自动为您大写首字母。
Sometimes you have to be more creative, like this: <nowiki>Such languages are similar to [[cellular automaton|cellular automata]]</nowiki>, which produces: Such languages are similar to [[cellular automaton|cellular automata]]. Article names are case sensitive (so don't link to "BrainFuck"), but MediaWiki automatically uppercases the first letter for you.


===外部链接===
===External links===


对于外部链接,写 <nowiki>[http://whatever.the/urlis.html 页面描述]</nowiki>。外部链接应主要仅在文章底部的“外部资源”章节中使用。更多信息请参见下文。
For an external link, do <nowiki>[http://whatever.the/urlis.html Description of page]</nowiki>. External links should mostly only be used at the bottom of an article in the "External resources" section. See below for more information.


===预格式化代码===
===Preformatted code===


对于文本代码片段,在行首添加空格。它们将神奇地像这样分隔:
For textual code snippets, start lines with spaces. They will magically get set off like this:


  [-]    清空单元格
  [-]    empty cell
  >+++++ 将下一个单元格设为 5。
  >+++++ set next cell to 5.
  [-<++>] 乘以 2
  [-<++>] multiply by 2
  <.      打印换行符。
  <.      print a newline.


如果上述内容有任何不清楚的地方,您可以点击本页面的“编辑”查看。
You can click on "edit" for this page if any of the above is unclear.


对于那些使用维基表格的人,我们的维基有一个特殊的 <code>plainpres</code> 类,它能使预格式化代码(如上所示,或使用显式的 <code>&lt;pre></code> 标签)在表格单元格中看起来更美观。用以下代码开始表格:
For those who use wikitables, our wiki has a special <code>plainpres</code> class that makes preformatted code (as above, or using explicit <code>&lt;pre></code> tags) look nicer in table cells.  Start the table with
  <nowiki>{| class="wikitable plainpres"</nowiki>
  <nowiki>{| class="wikitable plainpres"</nowiki>


有些深奥编程语言不易使用空格进行格式化,因此自然会产生由一整行组成的程序。或者你可能只是认为没有空格更符合语言的风格。无论如何,我们有一个 <code>rectwrap</code> 类,旨在允许此类代码在保持直边距的情况下很好地换行。使用方法如下:
Some esolangs don't allow easy formatting with whitespace, and so naturally give programs that consist of one huge line.  Or you might just think having no whitespace fits the language's style better.  In any case, we have a <code>rectwrap</code> class that is intended to allow such code to be nicely wrapped with straight margins.  Use e.g. as follows:
  <nowiki><pre class="rectwrap">...你的代码放在这里...</pre></nowiki>
  <nowiki><pre class="rectwrap">...your code goes here...</pre></nowiki>


===分类===
===Categories===


您可以通过链接到某个分类来将内容添加到该分类中,通常放在页面末尾。所以,如果您想将文章放入“低级”分类,请在文章末尾添加 <nowiki>[[Category:Low-level]]</nowiki>
You add something to a category by linking to it, usually at the end of a page. So if you want to put an article in the "Low-level" category, add <nowiki>[[Category:Low-level]]</nowiki> to the end of it.


如果您想提供指向分类页面的普通链接,必须在分类前使用额外的冒号。<nowiki>[[:Category:Low-level]]</nowiki> 将生成 [[:Category:Low-level]]
If you want to provide a normal link to a category page you must use an additional colon in front of the category. <nowiki>[[:Category:Low-level]]</nowiki> will produce [[:Category:Low-level]].


关于特定语言的页面应''同时''添加到[[:Category:Languages]](如上所述)和[[语言列表]]页面(通过编辑后者)。
Pages about specific languages should be added ''both'' to [[:Category:Languages]] (as above) and to the [[Language list]] page (by editing the latter).


另请参阅[[#Categorization|分类]]
See also [[#Categorization|Categorization]].


===列表===
===Lists===


最后,项目符号列表通过在连续的行首添加星号来创建。例如,“* 一件事”后面跟着“* 另一件事”再跟着“* 最后一件事”会生成:
Finally, bulleted lists are made by starting successive lines with asterisks. For example, "* One thing" followed by "* Another thing" then "* The last thing" produces this:


* 一件事
* One thing
* 另一件事
* Another thing
* 最后一件事
* The last thing


对于编号列表,做同样的事情,但以井号(更常被称为数字符号、英镑符号、主题标签或哈希符号,#)开始一行。例如,三个商业上最成功的[[深奥编程语言]]是:
For numbered lists, do the same, but start the line with an octothorpe (more common said as number sign, pound sign, hashtag or hash, #). For example, the three most commercially successful [[esoteric programming language]]s are:


# [[Perl]]
# [[Perl]]
第70行: 第70行:
# [[Brainfuck]]
# [[Brainfuck]]


===含有禁用字符的文章名称===
===Article names with forbidden characters===


有些字符不允许出现在文章名称中。这通常是 URL 中不允许的字符,如 <nowiki>?[ ]</nowiki>。例如,[[SMITH sharp|SMITH#]] 文章被命名为 ''SMITH sharp''。此类页面应在顶部包含 ''wrongtitle'' 模板。
Some characters are not allowed in article names. This is typically characters that aren't allowed in URLs, like <nowiki>?, [ and ]</nowiki>. For instance, the [[SMITH sharp|SMITH#]] article is named ''SMITH sharp''. Such articles should include the ''wrongtitle'' template at the top of the page.


以下是添加 wrongtitle 模板的代码(以 SMITH# 为例):
Here's the code for adding a wrongtitle template (in the case of SMITH#):


  <nowiki>{{wrongtitle|title=SMITH#}}</nowiki>
  <nowiki>{{wrongtitle|title=SMITH#}}</nowiki>


这在页面上看起来会像这样:
This will look like this on the page:


{{wrongtitle|title=SMITH#}}
{{wrongtitle|title=SMITH#}}


对于名称应为小写的文章,在顶部放置 <nowiki>{{lowercase}}</nowiki> 以正确显示其标题。
For articles whose name should be lowercase, put <nowiki>{{lowercase}}</nowiki> at the top to have their title display correctly.


===在讨论页签名===
===Signing your posts on talk pages===


您可以通过输入 <nowiki>~~~~</nowiki> 来为您的帖子签名,这会自动替换为您的用户名、指向您用户页的链接以及时间和日期。在讨论页发表评论时请务必这样做。''仅''在讨论页发表评论时这样做。
You can sign your posts by typing <nowiki>~~~~</nowiki>, which automatically substitutes in your username, a link to your userpage, and the time and date. Always do this when commenting on talk pages. Only do this when commenting on talk pages.


您也可以使用编辑框上方的签名按钮,它会插入“<nowiki>--~~~~</nowiki>”。
You can also use the signature button above the editing box, which inserts "<nowiki>--~~~~</nowiki>".


===重定向===
===Redirecting===


有时,拥有一个自动将用户重定向到另一个页面的页面很有用。例如,文章 [[Brainf***]] [[BF]] 都会重定向到 [[Brainfuck]]
Sometimes it is useful to have a page that automatically redirects the user to another page. For example, the articles [[Brainf***]] and [[BF]] both redirect to [[Brainfuck]].


要创建自动重定向,请在要重定向的页面顶部插入以下代码:
To make an automatic redirect, insert the following code at the top of the page to be redirected:


  <nowiki>#REDIRECT [[要重定向到的页面名称]]</nowiki>
  <nowiki>#REDIRECT [[Name of page to redirect to]]</nowiki>


===表格===
===Tables===
表格创建如下:
Tables are created like so:
  <nowiki>{| [class="wikitable, wikitable sortable"]</nowiki>
  <nowiki>{| [class="wikitable, wikitable sortable"]</nowiki>
  <nowiki>[! 标题 a !! 标题 b !! ...</nowiki>
  <nowiki>[! header a !! header b !! ...</nowiki>
  <nowiki>|-]</nowiki>
  <nowiki>|-]</nowiki>
  <nowiki>| 条目 a || 条目 b || ...</nowiki>
  <nowiki>| entry a || entry b || ...</nowiki>
  <nowiki>|-</nowiki>
  <nowiki>|-</nowiki>
  <nowiki>...</nowiki>
  <nowiki>...</nowiki>
  <nowiki>|}</nowiki>
  <nowiki>|}</nowiki>
[] 表示可选,多个选项用逗号分隔
[] indicate optional, and multiple options are separated by commas


===信息框===
===Infobox===
信息框是一个整齐列出文章主题信息的框,它们显示在文章的右上角,以尽量减少对文本的干扰。<br>
The infobox is a box with a neat tabulation of information about the subject of the article, they are displayed in the top right corner of the article, as to cause minimal interference with the text.<br>
用于语言的信息框语法如下:
The syntax for use for a language is:
  {{infobox proglang
  {{infobox proglang
  name=<文本>
  name=<text>
  paradigms=(命令式, 声明式, 函数式等)
  paradigms=(imperative, declarative, functional, etc.)
  author=<用户>
  author=<User>
  year=<整数>
  year=<integer>
  class=(图灵完备, 下推自动机, 有限状态机等)
  class=(Turing complete, Push down automata, Finite state machine, etc.)
  majorimpl=<语言>
  majorimpl=<languages>
  influence=<语言>
  influence=<languages>
  influenced=<语言>
  influenced=<languages>
  image=<图像文件>
  image=<image file>
  }}
  }}
所有 key=value 对都是无序且可选的。
all the key=value pairs are unordered and optional.


==何时操作==
==When to do stuff==


===强调===
===Emphasis===


'''粗体'''仅用于文章标题,且仅在其首次出现时使用。重要术语在首次出现时可以用''斜体''突出显示(除非它们重要到需要单独的文章,那样直接链接过去即可)。
Only use '''bold''' for the title of an article, and only the first time it appears. Important terms can be set off with ''italics'' the first time they appear (unless they're important enough to have a separate article, in which case just link to it).


===章节===
===Sections===


一般来说,请尽量少用子章节(尽管本帮助页面并非如此)。
Try to use subsections sparingly in general (this help page notwithstanding).


章节名称仅首字母大写。“Computational class”,而非“Computational Class”。
Only capitalize the first word in a section's name. "Computational class", not "Computational Class".


===文章名称===
===Article names===


大多数以名词命名的文章都应使用单数形式。例如,我们有一个名为[[cellular automaton]]的文章,讨论细胞自动机。
Most articles that are named after nouns should be in the singular form. So we have an article called [[cellular automaton]] that discusses cellular automata, for instance.


===外部链接===
===External links===


尽量将外部链接仅放在“外部资源”章节中。有时可能需要打破此规则,但仅限于偶尔。
Try to keep external links only in the section "External resources". There may be times to break this rule, but only occasionally.


该章节称为外部“资源”,而不是链接!说“链接”很傻;链接是展示功能,而我们链接到的资源才是重要的。
The section is called external ''resources'', not links! Saying "links" is silly; the links are a presentation feature and the resources, which we're linking to, are important.


此章节应是一个列表。所以如果只有一个元素,请在它前面加上 *
This section should be a list. So if you only have one element, put a * before it.


鉴于我们维基主题的性质,我们的外部链接通常是关于某个主题的唯一外部文档,并且有消失的趋势。'''请不要删除链接''',除非检查过是否有替代方案可用,例如页面已移动或有 Wayback Machine 上的缓存页面。[[:Template:Deadlink]](用于标记链接已过时)和[[:Template:Wayback]](用于以有用的格式链接到 Wayback)可帮助处理此问题。
By the nature of our wiki's topic, our external links may often be the only outside documentation on a subject, and have a tendency to disappear.  '''Please don't delete links''' without checking if there is an alternative available, like a moved page or a cached page on the wayback machine.  [[:Template:Deadlink]] (to mark a link as out of date) and [[:Template:Wayback]] (to link to wayback in a useful format) are available to help with this.


===链接到用户页===
===Linking to user pages===


一般来说,不要链接到用户页,但如果您有充分的理由这样做,请通过保留链接中的“User:”部分可见来使其显而易见(例如[[User:Graue]])。更多信息请参阅[[Esolang:Authors]]
Generally speaking, don't link to user pages, but if you have a good reason to do so, make it obvious by leaving the "User:" part of the link visible (e.g. [[User:Graue]]). See [[Esolang:Authors]] for more information.


===分类===
===Categorization===


[[Esolang:Categorization]] 提供了关于现有分类的信息。请不要在未于[[Esolang talk:Categorization]]讨论的情况下创建新分类。
[[Esolang:Categorization]] has information about the existing categories. Please don't make a new category without discussing it at [[Esolang talk:Categorization]].


===沙盒使用===
===Sandboxing===


[[Esolang:Sandbox]]有一个沙盒页面用于测试编辑。它几乎''从不''是准备新文章或模板的正确位置!相反,请将沙盒视为当编辑无法使用标准“显示预览”工具进行预览时的最后手段。大多数编辑者永远不需要此功能,可以放心忽略它,但在需要时它就在那里。
There is a sandbox page at [[Esolang:Sandbox]] for testing edits. It is almost always the wrong place to prepare new articles or templates! Instead, think of the sandbox as a last resort for when an edit cannot be previewed using the standard "Show preview" tool. Most editors will never need this functionality and can safely ignore it, but it will be there when the need arises.


==另请参阅==
==See also==


* [[Esolang:大胆编辑页面]],一项重要的编辑指南。
* [[Esolang:Be bold in editing pages]], an important editing guideline.
* [[Esolang:政策]],总结了深奥编程语言维基特有的政策。
* [[Esolang:Policy]], summarizing policies specific to the Esolang wiki.


==外部资源==
==External resources==
* [[wikipedia:Help:Editing|维基百科编辑指南]]
* [[wikipedia:Help:Editing|Wikipedia's guide to editing]]

2026年4月10日 (五) 10:34的版本

This page is split into two parts: how to achieve certain effects, and style guidelines regarding use of those effects.

Where to test things out

If you wish to experiment with editing without changing an actual article, you may do so in the sandbox (please clean up after yourself!) or in your own sandbox. To preview a change to an article without submitting it, use the "Show preview" and "Show changes" buttons at the bottom of the editing view.

How to do stuff

Text formatting and organization

Use two apostrophes for italics: ''fun'' produces fun.

Use three apostrophes for bold: '''Brainfuck''' produces Brainfuck. This should only be used for titles of pages, the first time they appear in the article.

Use two equals signs for sections: ==Computational class==. Three for subsections: ===Turing equivalence===.

Indenting is achieved by starting the line with a colon

Use two brackets for links within the wiki: [[Brainfuck]] produces Brainfuck.

We use the singular form for all nouns for article names (except in the Esolang: namespace). MediaWiki is smart, so this is pretty easy: just do [[esoteric programming language]]s and you get esoteric programming languages. Notice how the s is outside the brackets, but it appears to be within the link anyway.

Sometimes you have to be more creative, like this: Such languages are similar to [[cellular automaton|cellular automata]], which produces: Such languages are similar to cellular automata. Article names are case sensitive (so don't link to "BrainFuck"), but MediaWiki automatically uppercases the first letter for you.

For an external link, do [http://whatever.the/urlis.html Description of page]. External links should mostly only be used at the bottom of an article in the "External resources" section. See below for more information.

Preformatted code

For textual code snippets, start lines with spaces. They will magically get set off like this:

[-]     empty cell
>+++++ set next cell to 5.
[-<++>] multiply by 2
<.      print a newline.

You can click on "edit" for this page if any of the above is unclear.

For those who use wikitables, our wiki has a special plainpres class that makes preformatted code (as above, or using explicit <pre> tags) look nicer in table cells. Start the table with

{| class="wikitable plainpres"

Some esolangs don't allow easy formatting with whitespace, and so naturally give programs that consist of one huge line. Or you might just think having no whitespace fits the language's style better. In any case, we have a rectwrap class that is intended to allow such code to be nicely wrapped with straight margins. Use e.g. as follows:

<pre class="rectwrap">...your code goes here...</pre>

Categories

You add something to a category by linking to it, usually at the end of a page. So if you want to put an article in the "Low-level" category, add [[Category:Low-level]] to the end of it.

If you want to provide a normal link to a category page you must use an additional colon in front of the category. [[:Category:Low-level]] will produce Category:Low-level.

Pages about specific languages should be added both to Category:Languages (as above) and to the Language list page (by editing the latter).

See also Categorization.

Lists

Finally, bulleted lists are made by starting successive lines with asterisks. For example, "* One thing" followed by "* Another thing" then "* The last thing" produces this:

  • One thing
  • Another thing
  • The last thing

For numbered lists, do the same, but start the line with an octothorpe (more common said as number sign, pound sign, hashtag or hash, #). For example, the three most commercially successful esoteric programming languages are:

  1. Perl
  2. Biota
  3. Brainfuck

Article names with forbidden characters

Some characters are not allowed in article names. This is typically characters that aren't allowed in URLs, like ?, [ and ]. For instance, the SMITH# article is named SMITH sharp. Such articles should include the wrongtitle template at the top of the page.

Here's the code for adding a wrongtitle template (in the case of SMITH#):

{{wrongtitle|title=SMITH#}}

This will look like this on the page:

模板:Wrongtitle

For articles whose name should be lowercase, put {{lowercase}} at the top to have their title display correctly.

Signing your posts on talk pages

You can sign your posts by typing ~~~~, which automatically substitutes in your username, a link to your userpage, and the time and date. Always do this when commenting on talk pages. Only do this when commenting on talk pages.

You can also use the signature button above the editing box, which inserts "--~~~~".

Redirecting

Sometimes it is useful to have a page that automatically redirects the user to another page. For example, the articles Brainf*** and BF both redirect to Brainfuck.

To make an automatic redirect, insert the following code at the top of the page to be redirected:

#REDIRECT [[Name of page to redirect to]]

Tables

Tables are created like so:

{| [class="wikitable, wikitable sortable"]
[! header a !! header b !! ...
|-]
| entry a || entry b || ...
|-
...
|}

[] indicate optional, and multiple options are separated by commas

Infobox

The infobox is a box with a neat tabulation of information about the subject of the article, they are displayed in the top right corner of the article, as to cause minimal interference with the text.
The syntax for use for a language is:

{{infobox proglang
name=<text>
paradigms=(imperative, declarative, functional, etc.)
author=<User>
year=<integer>
class=(Turing complete, Push down automata, Finite state machine, etc.)
majorimpl=<languages>
influence=<languages>
influenced=<languages>
image=<image file>
}}

all the key=value pairs are unordered and optional.

When to do stuff

Emphasis

Only use bold for the title of an article, and only the first time it appears. Important terms can be set off with italics the first time they appear (unless they're important enough to have a separate article, in which case just link to it).

Sections

Try to use subsections sparingly in general (this help page notwithstanding).

Only capitalize the first word in a section's name. "Computational class", not "Computational Class".

Article names

Most articles that are named after nouns should be in the singular form. So we have an article called cellular automaton that discusses cellular automata, for instance.

Try to keep external links only in the section "External resources". There may be times to break this rule, but only occasionally.

The section is called external resources, not links! Saying "links" is silly; the links are a presentation feature and the resources, which we're linking to, are important.

This section should be a list. So if you only have one element, put a * before it.

By the nature of our wiki's topic, our external links may often be the only outside documentation on a subject, and have a tendency to disappear. Please don't delete links without checking if there is an alternative available, like a moved page or a cached page on the wayback machine. Template:Deadlink (to mark a link as out of date) and Template:Wayback (to link to wayback in a useful format) are available to help with this.

Linking to user pages

Generally speaking, don't link to user pages, but if you have a good reason to do so, make it obvious by leaving the "User:" part of the link visible (e.g. User:Graue). See Esolang:Authors for more information.

Categorization

Esolang:Categorization has information about the existing categories. Please don't make a new category without discussing it at Esolang talk:Categorization.

Sandboxing

There is a sandbox page at Esolang:Sandbox for testing edits. It is almost always the wrong place to prepare new articles or templates! Instead, think of the sandbox as a last resort for when an edit cannot be previewed using the standard "Show preview" tool. Most editors will never need this functionality and can safely ignore it, but it will be there when the need arises.

See also

External resources