Skip to content

CSlawyer1985/legal-skillhub / skills/ambiguity-report

ambiguity-report

Verified

将法律文本(合同、法规、规章或司法意见)的诠释性歧义审查转化为精美的交付物。可生成多页面网站(默认)、单页面交互式网站、Microsoft Word 文档、PowerPoint 演示文稿或 LaTeX/PDF。当用户持有压力测试结果、歧义审查或"这将在何处被诉"场景分析,并希望发布、演示或分享时使用。触发词包括"发布审查报告"、"据此制作报告"、"将其转化为网站/演示文稿/简报/Word 文档"、"制作 Netlify 网站"、"制作这些歧义点的幻灯片"、"渲染场景"、"打包这份压力测试"、"生成 LaTeX 版本"等。与歧义压力测试技能(底层分析)配套使用,但也适用于任何结构化或半结构化的歧义分析。视觉设计有明确风格倾向,但用户可覆盖颜色、字体和品牌标识。大多数格式需要 Python 和可写的文件系统;单文件 HTML 在主机两者皆无时仍可运行。

FileKindSize
LICENSEother11.1 KB
NOTICEother1.7 KB
README.mdmarkdown964 B
SKILL.mdskill md16.8 KB
assets/latex-preamble.texother3.8 KB
assets/site-style.cssother23.9 KB
resources/data-format.mdmarkdown11.7 KB
resources/format-docx.mdmarkdown6.5 KB
resources/format-inline-html.mdmarkdown3.6 KB
resources/format-latex.mdmarkdown6.4 KB
resources/format-pptx.mdmarkdown6.1 KB
resources/format-website.mdmarkdown6.1 KB
resources/parsing-unstructured.mdmarkdown6.5 KB
scripts/generate_latex.pyscript19.4 KB
scripts/generate_site.pyscript37.7 KB

resources/format-latex.md

View on GitHub
# 格式——LaTeX → PDF

LaTeX 路径生成可编译为精美 PDF 的自包含 `.tex` 文件。适合学术受众、法律评论投稿或任何排版质量重要的场景。

## 生成器

```bash
python scripts/generate_latex.py \
  --spec <output-dir>/spec.json \
  --out <output-dir>/report.tex
```

该脚本生成一个带全部内联前言(无需 `\input` 外部文件)的单个 `.tex` 文件。用户用自己偏好的 LaTeX 引擎编译——`latexmk -pdf`、`pdflatex`(交叉引用需运行两次),或需要非默认字体时用 `xelatex`。

## 文档类和宏包

默认:`article` 类,11pt,letterpaper。前言加载:

- `geometry` — 1in 页边距
- `xcolor` — 用于调色板
- `tcolorbox` — 用于双立场面板和改写文本醒目框
- `enumitem` — 用于更整洁的列表
- `titlesec` — 用于标题定制
- `hyperref` — 用于交叉引用和可点击锚点
- `microtype` — 用于排版润色
- `fontspec`(如果使用 xelatex)— 用于自定义字体;否则脚本使用 Latin Modern

颜色绑定到以规范键命名的 LaTeX 颜色定义(`accentColor`、`deptColor`、`advColor` 等)。类别颜色命名为 `famScopeBg`、`famScopeFg` 等。

## 文档结构

LaTeX 文档镜像网站的信息架构,但采用线性形式。

**标题块。**
```latex
\title{\textsc{\small Interpretive-Ambiguity Stress-Test}\\[1em]
       {\Huge \textsf{Where {\source name} will be fought over}}\\[0.5em]
       \large \textit{{page subtitle}}}
\date{{audit_date}}
```

**前置部分。**
- 标题。
- 简短的引导块(`meta.page_subtitle` 的一个段落)。
- 场景列表目录(自定义——不是标准的 `\tableofcontents`,而是带样式的列表)。

**第一部分——源文本。**
- `\section*{The source}` 配 `\addcontentsline`,使其出现在目录中。
- 使用 `\subsection` 渲染顶层章节,用缩进块渲染子条款。每条条款置于 `quote` 环境中,标签加粗。
- 有锚定的条款通过 `\marginpar` 获得页边编号徽章。徽章是带场景编号的 `\tcbox`。

**第二部分——场景。**
- `\section*{The {N} fights}`
- 每个场景:
  - `\subsection*{S-N · {title}}`
  - 下方斜体标签行。
  - 单行以 `\fbox` 包裹的小号文本呈现锚点和类别。
  - **情境:** 置于带细灰边框、沙色填充的 `tcolorbox` 中。
  - **双立场面板:** 两个并排的 `tcolorbox`(用 `tcbraster` 排版)。左侧:立场 A。右侧:立场 B。每个有彩色顶边框、`\textsc` 的主体名和论证正文。
  - **弱点:** 描述列表条目。`\textbf{Weak point.} \itshape ...`
  - **可能结果:** 相同模式。
  - **改写文本:** 黄色调的 `tcolorbox`,标签"Proposed amendment"小型大写,正文斜体。
  - 下一个场景前加 `\rule` 分隔线。

**第三部分——改写文本。**
- `\section*{Proposed amendments}`
- 关于该组合的简短引导。
- 每个场景的改写文本:
  - `\subsection*{R-N · {short title}}`
  - 标题下方斜体小型大写的目标条款。
  - 问题陈述。
  - 提案置于 `tcolorbox` 中(与场景内改写文本相同的样式)。

**第四部分——覆盖清单(如存在)。**
- `\section*{Additional ambiguities flagged}`
- `\description` 样式列表:粗体标签,然后是说明。

**第五部分——方法论(如存在)。**
- `\section*{Methodology}`
- 每个 `methodology.*` 键的子节。
- 来源行作为斜体页脚。

## 分析深度的脚注

在适当之处,将次要细节推到脚注而非挤占正文。例如,"可能结果"段落可以加脚注引用具体解释规则,或改写文本可以脚注注明语言来源。

这正是 LaTeX 的用武之地。尽情使用。

## 交叉引用

使用 `\label` 和 `\autoref`:
- 每个场景标题:`\label{scen:N}`
- 每条源条款:`\label{prov:ID}`,其中 ID 是规范中的条款 ID
- 每个改写文本标题:`\label{redraft:N}`

然后"see Scenario S-2"变成 `see \autoref{scen:2}`,hyperref 宏包使其在 PDF 中可点击。

## tcolorbox 样式

在前言中定义三个可复用的样式:

```latex
\tcbset{
  situationbox/.style={
    colback=panelColor, colframe=accentSoft,
    boxrule=0.5pt, arc=2pt,
    left=10pt, right=10pt, top=8pt, bottom=8pt,
  },
  positionA/.style={
    colback=deptBg, colframe=deptColor,
    boxrule=0pt, leftrule=0pt, rightrule=0pt, bottomrule=0pt, toprule=2pt,
    arc=2pt, left=10pt, right=10pt, top=8pt, bottom=8pt,
  },
  positionB/.style={
    colback=advBg, colframe=advColor,
    boxrule=0pt, leftrule=0pt, rightrule=0pt, bottomrule=0pt, toprule=2pt,
    arc=2pt, left=10pt, right=10pt, top=8pt, bottom=8pt,
  },
  redraftbox/.style={
    colback=redraftBg, colframe=redraftBorder,
    boxrule=0.5pt, arc=2pt,
    left=10pt, right=10pt, top=8pt, bottom=8pt,
  }
}
```

## 编译

生成器不编译 PDF。用户自行编译。建议:

```bash
latexmk -pdf report.tex
```

如果 `latexmk` 不可用:

```bash
pdflatex report.tex
pdflatex report.tex   # second pass for cross-references
```

如果编译失败(例如 `tcolorbox` 未安装),向用户呈现错误并建议安装缺失宏包。MacTeX / TeX Live 发行版默认包含 `tcolorbox`;非常精简的 LaTeX 安装可能没有。

## 备选文档类

默认是 `article`。未来扩展可提供:

- **Tufte-LaTeX** — 用于边注和更宽边距版式。分析有大量想放在页边空白处的评论时最佳。
- **Beamer** — 与 PowerPoint 相当的 LaTeX。除非用户明确想要 Beamer 输出,否则改用 pptx 路径。
- **Memoir** — 用于书级长度的交付物。对大多数歧义审查而言过度。

V1 目前不支持这些;如果用户要求其中之一,说明这是未来工作并提供 article 类输出。

## 字体定制

如果用户提供的 `design.primary_font` 是 LaTeX 能找到的(例如系统安装的 TrueType 字体),指示他们用 `xelatex` 而非 `pdflatex` 编译。脚本可以从字体选择中检测到这一点,并在 `.tex` 文件顶部添加注释:

```latex
% Compile with xelatex (custom fonts requested)
```

否则坚持使用 Latin Modern(pdflatex 的默认字体)。

## 此格式擅长的

LaTeX 生成排版精良的 PDF,打印清晰、嵌入交叉引用、天然支持脚注。交付物将被打印、存档或投稿期刊时最佳。

## 此格式不擅长的

LaTeX 不可交互。没有过滤、没有点击高亮、没有实时跨窗格联动。对于探索式阅读,网站远胜一筹。
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall