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

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

来自 LNN的:not(博客)?
LynChern留言 | 贡献
无编辑摘要
LynChern留言 | 贡献
无编辑摘要
第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==
==测试场所==


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.
如果您想在编辑时进行测试而不改变实际文章,可以在[[Esolang:Sandbox|沙盒]]中进行(请自行清理!)或者在[[Special:MyPage/Sandbox|您自己的沙盒]]中进行。要预览对文章的更改而不提交,请使用编辑视图底部的“显示预览”和“显示更改”按钮。


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


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


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


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>'''Brainfuck'''</nowiki> 生成 '''Brainfuck'''。粗体应仅用于页面标题,且仅在该标题首次在文章中出现时使用。


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


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


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


Use two brackets for links within the wiki: <nowiki>[[Brainfuck]]</nowiki> produces [[Brainfuck]].
使用两个方括号表示维基内部的链接:<nowiki>[[Brainfuck]]</nowiki> 生成 [[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 <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.
对于文章名称,所有名词我们都使用单数形式(Esolang: 命名空间中的除外)。MediaWiki很智能,所以这很容易:只需写 <nowiki>[[esoteric programming language]]s</nowiki>,你就会得到 [[esoteric programming language]]s。注意,尽管 "s" 在方括号外面,但它看起来仍像是链接的一部分。


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.
有时你需要更有创意,像这样:<nowiki>此类语言类似于 [[cellular automaton|cellular automata]]</nowiki>,这会生成:此类语言类似于 [[cellular automaton|cellular automata]]。文章名称区分大小写(所以不要链接到 "BrainFuck"),但 MediaWiki 会自动为您大写首字母。


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


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.
对于外部链接,写 <nowiki>[http://whatever.the/urlis.html 页面描述]</nowiki>。外部链接应主要仅在文章底部的“外部资源”章节中使用。更多信息请参见下文。


===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.
  >+++++ 将下一个单元格设为 5。
  [-<++>] multiply by 2
  [-<++>] 乘以 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 <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
对于那些使用维基表格的人,我们的维基有一个特殊的 <code>plainpres</code> 类,它能使预格式化代码(如上所示,或使用显式的 <code>&lt;pre></code> 标签)在表格单元格中看起来更美观。用以下代码开始表格:
  <nowiki>{| class="wikitable plainpres"</nowiki>
  <nowiki>{| class="wikitable plainpres"</nowiki>


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:
有些深奥编程语言不易使用空格进行格式化,因此自然会产生由一整行组成的程序。或者你可能只是认为没有空格更符合语言的风格。无论如何,我们有一个 <code>rectwrap</code> 类,旨在允许此类代码在保持直边距的情况下很好地换行。使用方法如下:
  <nowiki><pre class="rectwrap">...your code goes here...</pre></nowiki>
  <nowiki><pre class="rectwrap">...你的代码放在这里...</pre></nowiki>


===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 <nowiki>[[Category:Low-level]]</nowiki> to the end of it.
您可以通过链接到某个分类来将内容添加到该分类中,通常放在页面末尾。所以,如果您想将文章放入“低级”分类,请在文章末尾添加 <nowiki>[[Category:Low-level]]</nowiki>


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]].
如果您想提供指向分类页面的普通链接,必须在分类前使用额外的冒号。<nowiki>[[:Category:Low-level]]</nowiki> 将生成 [[: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).
关于特定语言的页面应''同时''添加到[[:Category:Languages]](如上所述)和[[语言列表]]页面(通过编辑后者)。


See also [[#Categorization|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===
===含有禁用字符的文章名称===


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.
有些字符不允许出现在文章名称中。这通常是 URL 中不允许的字符,如 <nowiki>?[ ]</nowiki>。例如,[[SMITH sharp|SMITH#]] 文章被命名为 ''SMITH sharp''。此类页面应在顶部包含 ''wrongtitle'' 模板。


Here's the code for adding a wrongtitle template (in the case of SMITH#):
以下是添加 wrongtitle 模板的代码(以 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#}}


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


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


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>".
您也可以使用编辑框上方的签名按钮,它会插入“<nowiki>--~~~~</nowiki>”。


===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]].
有时,拥有一个自动将用户重定向到另一个页面的页面很有用。例如,文章 [[Brainf***]] [[BF]] 都会重定向到 [[Brainfuck]]


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


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


===Tables===
===表格===
Tables are created like so:
表格创建如下:
  <nowiki>{| [class="wikitable, wikitable sortable"]</nowiki>
  <nowiki>{| [class="wikitable, wikitable sortable"]</nowiki>
  <nowiki>[! header a !! header b !! ...</nowiki>
  <nowiki>[! 标题 a !! 标题 b !! ...</nowiki>
  <nowiki>|-]</nowiki>
  <nowiki>|-]</nowiki>
  <nowiki>| entry a || entry b || ...</nowiki>
  <nowiki>| 条目 a || 条目 b || ...</nowiki>
  <nowiki>|-</nowiki>
  <nowiki>|-</nowiki>
  <nowiki>...</nowiki>
  <nowiki>...</nowiki>
  <nowiki>|}</nowiki>
  <nowiki>|}</nowiki>
[] 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.<br>
信息框是一个整齐列出文章主题信息的框,它们显示在文章的右上角,以尽量减少对文本的干扰。<br>
The syntax for use for a language is:
用于语言的信息框语法如下:
  {{infobox proglang
  {{infobox proglang
  name=<text>
  name=<文本>
  paradigms=(imperative, declarative, functional, etc.)
  paradigms=(命令式, 声明式, 函数式等)
  author=<User>
  author=<用户>
  year=<integer>
  year=<整数>
  class=(Turing complete, Push down automata, Finite state machine, etc.)
  class=(图灵完备, 下推自动机, 有限状态机等)
  majorimpl=<languages>
  majorimpl=<语言>
  influence=<languages>
  influence=<语言>
  influenced=<languages>
  influenced=<语言>
  image=<image file>
  image=<图像文件>
  }}
  }}
all the key=value pairs are unordered and optional.
所有 key=value 对都是无序且可选的。


==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".
章节名称仅首字母大写。“Computational class”,而非“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.
大多数以名词命名的文章都应使用单数形式。例如,我们有一个名为[[cellular automaton]]的文章,讨论细胞自动机。


===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.
此章节应是一个列表。所以如果只有一个元素,请在它前面加上 *


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.
鉴于我们维基主题的性质,我们的外部链接通常是关于某个主题的唯一外部文档,并且有消失的趋势。'''请不要删除链接''',除非检查过是否有替代方案可用,例如页面已移动或有 Wayback Machine 上的缓存页面。[[:Template:Deadlink]](用于标记链接已过时)和[[:Template:Wayback]](用于以有用的格式链接到 Wayback)可帮助处理此问题。


===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.
一般来说,不要链接到用户页,但如果您有充分的理由这样做,请通过保留链接中的“User:”部分可见来使其显而易见(例如[[User:Graue]])。更多信息请参阅[[Esolang:Authors]]


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


[[Esolang:Categorization]] has information about the existing categories. Please don't make a new category without discussing it at [[Esolang talk:Categorization]].
[[Esolang:Categorization]] 提供了关于现有分类的信息。请不要在未于[[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.
[[Esolang:Sandbox]]有一个沙盒页面用于测试编辑。它几乎''从不''是准备新文章或模板的正确位置!相反,请将沙盒视为当编辑无法使用标准“显示预览”工具进行预览时的最后手段。大多数编辑者永远不需要此功能,可以放心忽略它,但在需要时它就在那里。


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


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


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

2026年4月9日 (四) 14:55的版本

本页面分为两部分:如何实现特定效果,以及关于使用这些效果的样式指南。

测试场所

如果您想在编辑时进行测试而不改变实际文章,可以在沙盒中进行(请自行清理!)或者在您自己的沙盒中进行。要预览对文章的更改而不提交,请使用编辑视图底部的“显示预览”和“显示更改”按钮。

如何操作

文本格式和组织

使用两个单引号表示斜体:''fun'' 生成 fun

使用三个单引号表示粗体:'''Brainfuck''' 生成 Brainfuck。粗体应仅用于页面标题,且仅在该标题首次在文章中出现时使用。

使用两个等号表示章节:==计算能力==。使用三个等号表示子章节:===图灵等价===。

缩进通过在行首添加冒号实现。

内部链接

使用两个方括号表示维基内部的链接:[[Brainfuck]] 生成 Brainfuck

对于文章名称,所有名词我们都使用单数形式(Esolang: 命名空间中的除外)。MediaWiki很智能,所以这很容易:只需写 [[esoteric programming language]]s,你就会得到 esoteric programming languages。注意,尽管 "s" 在方括号外面,但它看起来仍像是链接的一部分。

有时你需要更有创意,像这样:此类语言类似于 [[cellular automaton|cellular automata]],这会生成:此类语言类似于 cellular automata。文章名称区分大小写(所以不要链接到 "BrainFuck"),但 MediaWiki 会自动为您大写首字母。

外部链接

对于外部链接,写 [http://whatever.the/urlis.html 页面描述]。外部链接应主要仅在文章底部的“外部资源”章节中使用。更多信息请参见下文。

预格式化代码

对于文本代码片段,在行首添加空格。它们将神奇地像这样分隔:

[-]     清空单元格
>+++++ 将下一个单元格设为 5。
[-<++>] 乘以 2
<.      打印换行符。

如果上述内容有任何不清楚的地方,您可以点击本页面的“编辑”查看。

对于那些使用维基表格的人,我们的维基有一个特殊的 plainpres 类,它能使预格式化代码(如上所示,或使用显式的 <pre> 标签)在表格单元格中看起来更美观。用以下代码开始表格:

{| class="wikitable plainpres"

有些深奥编程语言不易使用空格进行格式化,因此自然会产生由一整行组成的程序。或者你可能只是认为没有空格更符合语言的风格。无论如何,我们有一个 rectwrap 类,旨在允许此类代码在保持直边距的情况下很好地换行。使用方法如下:

<pre class="rectwrap">...你的代码放在这里...</pre>

分类

您可以通过链接到某个分类来将内容添加到该分类中,通常放在页面末尾。所以,如果您想将文章放入“低级”分类,请在文章末尾添加 [[Category:Low-level]]。

如果您想提供指向分类页面的普通链接,必须在分类前使用额外的冒号。[[:Category:Low-level]] 将生成 Category:Low-level

关于特定语言的页面应同时添加到Category:Languages(如上所述)和语言列表页面(通过编辑后者)。

另请参阅分类

列表

最后,项目符号列表通过在连续的行首添加星号来创建。例如,“* 一件事”后面跟着“* 另一件事”再跟着“* 最后一件事”会生成:

  • 一件事
  • 另一件事
  • 最后一件事

对于编号列表,做同样的事情,但以井号(更常被称为数字符号、英镑符号、主题标签或哈希符号,#)开始一行。例如,三个商业上最成功的深奥编程语言是:

  1. Perl
  2. Biota
  3. Brainfuck

含有禁用字符的文章名称

有些字符不允许出现在文章名称中。这通常是 URL 中不允许的字符,如 ?、[ 和 ]。例如,SMITH# 文章被命名为 SMITH sharp。此类页面应在顶部包含 wrongtitle 模板。

以下是添加 wrongtitle 模板的代码(以 SMITH# 为例):

{{wrongtitle|title=SMITH#}}

这在页面上看起来会像这样:

模板:Wrongtitle

对于名称应为小写的文章,在顶部放置 {{lowercase}} 以正确显示其标题。

在讨论页签名

您可以通过输入 ~~~~ 来为您的帖子签名,这会自动替换为您的用户名、指向您用户页的链接以及时间和日期。在讨论页发表评论时请务必这样做。在讨论页发表评论时这样做。

您也可以使用编辑框上方的签名按钮,它会插入“--~~~~”。

重定向

有时,拥有一个自动将用户重定向到另一个页面的页面很有用。例如,文章 Brainf***BF 都会重定向到 Brainfuck

要创建自动重定向,请在要重定向的页面顶部插入以下代码:

#REDIRECT [[要重定向到的页面名称]]

表格

表格创建如下:

{| [class="wikitable, wikitable sortable"]
[! 标题 a !! 标题 b !! ...
|-]
| 条目 a || 条目 b || ...
|-
...
|}

[] 表示可选,多个选项用逗号分隔

信息框

信息框是一个整齐列出文章主题信息的框,它们显示在文章的右上角,以尽量减少对文本的干扰。
用于语言的信息框语法如下:

{{infobox proglang
name=<文本>
paradigms=(命令式, 声明式, 函数式等)
author=<用户>
year=<整数>
class=(图灵完备, 下推自动机, 有限状态机等)
majorimpl=<语言>
influence=<语言>
influenced=<语言>
image=<图像文件>
}}

所有 key=value 对都是无序且可选的。

何时操作

强调

粗体仅用于文章标题,且仅在其首次出现时使用。重要术语在首次出现时可以用斜体突出显示(除非它们重要到需要单独的文章,那样直接链接过去即可)。

章节

一般来说,请尽量少用子章节(尽管本帮助页面并非如此)。

章节名称仅首字母大写。“Computational class”,而非“Computational Class”。

文章名称

大多数以名词命名的文章都应使用单数形式。例如,我们有一个名为cellular automaton的文章,讨论细胞自动机。

外部链接

尽量将外部链接仅放在“外部资源”章节中。有时可能需要打破此规则,但仅限于偶尔。

该章节称为外部“资源”,而不是链接!说“链接”很傻;链接是展示功能,而我们链接到的资源才是重要的。

此章节应是一个列表。所以如果只有一个元素,请在它前面加上 *。

鉴于我们维基主题的性质,我们的外部链接通常是关于某个主题的唯一外部文档,并且有消失的趋势。请不要删除链接,除非检查过是否有替代方案可用,例如页面已移动或有 Wayback Machine 上的缓存页面。Template:Deadlink(用于标记链接已过时)和Template:Wayback(用于以有用的格式链接到 Wayback)可帮助处理此问题。

链接到用户页

一般来说,不要链接到用户页,但如果您有充分的理由这样做,请通过保留链接中的“User:”部分可见来使其显而易见(例如User:Graue)。更多信息请参阅Esolang:Authors

分类

Esolang:Categorization 提供了关于现有分类的信息。请不要在未于Esolang talk:Categorization讨论的情况下创建新分类。

沙盒使用

Esolang:Sandbox有一个沙盒页面用于测试编辑。它几乎从不是准备新文章或模板的正确位置!相反,请将沙盒视为当编辑无法使用标准“显示预览”工具进行预览时的最后手段。大多数编辑者永远不需要此功能,可以放心忽略它,但在需要时它就在那里。

另请参阅

外部资源