> For the complete documentation index, see [llms.txt](https://overleaf-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://overleaf-pro.ayaka.space/on-premises/zh-tw/she-ding/overleaf-toolkit/zotero-zheng-he.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`&#x20;
4. 設定您的 `config/variables.env`&#x20;

<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=
# 將 Zotero API 金鑰加密儲存在 Mongo 中（在開發環境中設定，以避免寫入金鑰檔案
# 到 /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://overleaf-pro.ayaka.space/on-premises/zh-tw/she-ding/overleaf-toolkit/zotero-zheng-he.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.
