> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/on-premises/zh-tw/she-ding/overleaf-toolkit/zotero-integration.md).

# Zotero 整合

{% hint style="info" %}
這個功能最初由 [davrot](https://github.com/davrot) 以及 [yu-i-i/overleaf-cep](https://github.com/yu-i-i/overleaf-cep)，由……修改 [ayaka-notes/overleaf-pro](https://github.com/ayaka-notes/overleaf-pro) 採用 OAuth。自 v6.2.0 及之後版本引入。它目前仍處於 beta 狀態。如果您遇到任何問題，我們需要您的回饋。
{% endhint %}

<div data-with-frame="true"><figure><img src="/files/c3931455c7566e90e8504ef92d6e8699ffd3f129" alt=""><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="/files/4f6d04549c387f843e1537561da1f740471f01b8" alt=""><figcaption></figcaption></figure></div>

### 設定 Zotero 整合

1. 開啟 [這個連結](https://www.zotero.org/oauth/apps) 以建立一個 Zotero OAuth 用戶端（如圖片所示）
2. 選擇 **應用程式類型**: **瀏覽器**
3. 使用你的設定回呼 URL `${OVERLEAF_SITE_URL}/user/zotero/oauth/callback`
4. 設定你的 `config/variables.env`

<figure><img src="/files/d401b0940ff11a8e551c19878fcc42a9dd3a5829" alt="" width="375"><figcaption></figcaption></figure>

{% code title="config/variables.env" %}

```dotenv
#################
#    Zotero     #
#################
# 'zotero' 必須包含在 ENABLED_LINKED_FILE_TYPES 中（於 develop/docker-compose.yml 設定）
ENABLED_LINKED_FILE_TYPES=project_file,project_output_file,url,zotero

# 來自 Zotero OAuth 用戶端（註冊於 https://www.zotero.org/oauth/apps）
# 應用程式類型：瀏覽器 
# 回呼 URL -> ${OVERLEAF_SITE_URL}/user/zotero/oauth/callback
ZOTERO_CLIENT_ID=
ZOTERO_CLIENT_SECRET=
# 會在 mongo 中加密 Zotero API 金鑰（在開發環境中設定，以避免寫入金鑰檔案
# 到 /var/lib/overleaf/data，而開發用 web 容器無法建立該路徑）
# 產生方式：`openssl rand -hex 32`
ZOTERO_CIPHER_PASSWORD=dev-zotero-cipher-password
# 選用：將模組的伺服器端 Zotero 請求（OAuth + API）透過
# HTTP 代理伺服器（必須可從 web 容器連線；與 github-sync 相同）
# http://10.0.0.1:10808
#（選用）ZOTERO_PROXY_URL=
```

{% endcode %}


---

# 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://ayakaleaf-pro.ayaka.space/on-premises/zh-tw/she-ding/overleaf-toolkit/zotero-integration.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.
