> For the complete documentation index, see [llms.txt](https://kb.howsci.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.howsci.com/output-style/modifying-style-templates/rules-for-working-with-style-templates.md).

# 格式模板的规则

[EndNote](http://www.howsci.com/tag/endnote/)的引文模板有4个基本的独立规则来规定文本，空格和栏目名如何相互影响的。如有需要，在特定情况下使用特殊字符可以绕过这些规则，这将在接下来的内容中讲述。

### 规则#1：基本依赖

没有用空格分开的任何文本或者标点符号，其最终是否在参考文献中出现基于邻近指标的内容。

这里的基于是指如果邻近指标有内容的话，那么这个文本或者标点符号就会出现在参考文献中。例如下面这段：

`Volume·(Issue)`

来看Issue周围的括号，如果Issue有内容的话，那么这个括号就会出现；如果一个文献Issue没有内容，那么在引用这个文献作为参考文献的时候就不出现。现在的括号是基于Issue是否有内容，这个就是基本依赖关系。

[科研动力](http://www.howsci.com/)举个例子可能更形象。现在需要在论文中插入两篇文献，一篇有Issue，另一篇没有Issue。由于基本依赖关系，凡是没有用空格和指标分开的输入的文本，如上例的括号就是手动输入的，那么在引用这两篇文献的时候，因为基本依赖关系，那么有Issue号的文献在参考文献中括号就会出现，而别一篇没有Issue，那么在参考文献中括号就不出现。

### 规则#2：前面的指标优先于后面的指标

当标点符号出现在没有空格的指标周围时，标点符号依赖于前面的指标，例如：

`Volume:Issue`

在这个例子中的冒号基于前面的Volume，这意味着如果Volume有内容的话，冒号就会出现，如果没有Volume的话，冒号就不会出现。这里的冒号不依赖于后面的Issue就没有关系了。

**注：**&#x8BE5;例子说明了依赖规则可能不是你想要的。例如可能是想如果Issue有内容的话，才出现冒号，可是现在冒号是否出现却依赖于前面的Volume。解决这个问题就需要[特殊格式化字符了](http://www.howsci.com/endnote/wiki/15Styles/Special_Formatting_Chars.htm)。

### 规则#3：第一个指标后的空格依赖于该指标，再多一个或多个空格就是独立的

一个指标后的空格依赖于该指标，如果再添加空格，那么除了第一个空格就是独立的了，这些额外的空格会出现在参考文献中。

例如：如果[EndNote](http://www.howsci.com/tag/endnote/)格式化一个的书籍，使用的引文[格式](http://www.howsci.com/tag/output-styles/)是作者后跟一个空格然后是题目

`Author.`**`·`**`Title`

题目前空格在参考文献中不会出现，因为这个空格依赖于前面的作者指标。但是如果作者和题目之间有两个空格

`Author.`**`··`**`TTitle`

此时题目前有两个空格，在论文中参考文献中，题目前就会有一个空格。这是因为第一个空格是依赖于前面的作者，可是第二个空格是独立的，所以会出现在参考文献中。

如果想把这个或者这些独立的空格强制性的依赖于前面的指标，也就是强制性的在参考文献中不出现，可以参考[特殊格式化符号](http://www.howsci.com/endnote/wiki/15Styles/Special_Formatting_Chars.htm)。

### 规则#4：独立文本出现在参考文献中

任何不依赖于邻近指标的独立文本或者标点符号会出现在论文中的参考文献中，例如：

`Edition`**`·`**`ed.`

这里的ed.因为前面有个空格，空格是依赖于Edition的，但是ed.是独立的，因此在参考文献中会出现ed.，无论书籍的Edition是否有内容，ed.都会出现。

**注：**&#x4E0D;间断空格可以用于代替空格来连接独立文本，详见[特殊格式化符号](http://www.howsci.com/endnote/wiki/15Styles/Special_Formatting_Chars.htm)。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://kb.howsci.com/output-style/modifying-style-templates/rules-for-working-with-style-templates.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
