feat: land superpaper v1 notes scaffold
Add the ledger schema, class router, lint codes, ingest/build pipeline, and three work-tree examples: align derivation, superfig delegation, and supertensor delegation.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
schema: superpaper.ledger/v1
|
||||
retired_ids: []
|
||||
paper:
|
||||
id: "example"
|
||||
title: ""
|
||||
authors: []
|
||||
notes_language: zh
|
||||
source:
|
||||
kind: excerpt
|
||||
coverage:
|
||||
mode: excerpt
|
||||
sections_in: []
|
||||
sections_skipped: []
|
||||
questions: []
|
||||
claims: []
|
||||
definitions: []
|
||||
assumptions: []
|
||||
lemmas: []
|
||||
symbols: []
|
||||
derivations: []
|
||||
figures: []
|
||||
evidence: []
|
||||
terms: []
|
||||
source_assets: []
|
||||
@@ -0,0 +1,210 @@
|
||||
$schema: "http://json-schema.org/draft-07/schema#"
|
||||
$id: "https://local/superpaper.ledger/v1"
|
||||
type: object
|
||||
required: [schema, paper, coverage]
|
||||
additionalProperties: true
|
||||
properties:
|
||||
schema: {const: superpaper.ledger/v1}
|
||||
retired_ids:
|
||||
type: array
|
||||
items: {type: string, pattern: "^(C|Q|D|A|L|E|DER|F|SA)[1-9][0-9]*$"}
|
||||
paper:
|
||||
type: object
|
||||
required: [id, title, source]
|
||||
additionalProperties: true
|
||||
properties:
|
||||
id: {type: string, minLength: 1}
|
||||
title: {type: string}
|
||||
authors: {type: array, items: {type: string}}
|
||||
year: {type: integer}
|
||||
venue: {type: string}
|
||||
notes_language: {type: string, enum: [zh, en]}
|
||||
degraded:
|
||||
type: array
|
||||
items: {type: string, enum: [scanned, no-eprint, no-pdftotext]}
|
||||
source:
|
||||
type: object
|
||||
required: [kind]
|
||||
additionalProperties: true
|
||||
properties:
|
||||
kind: {enum: [arxiv, pdf, tex, excerpt, markdown]}
|
||||
arxiv: {type: string}
|
||||
local_pdf: {type: string}
|
||||
pages: {type: integer, minimum: 1}
|
||||
language: {type: string}
|
||||
coverage:
|
||||
type: object
|
||||
required: [mode]
|
||||
additionalProperties: true
|
||||
properties:
|
||||
mode: {enum: [full, excerpt, body-only]}
|
||||
sections_in: {type: array, items: {type: string}}
|
||||
sections_skipped: {type: array, items: {type: string}}
|
||||
skip_reasons:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required: [section, reason]
|
||||
properties:
|
||||
section: {type: string}
|
||||
reason: {type: string}
|
||||
questions:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required: [id, text]
|
||||
properties:
|
||||
id: {type: string, pattern: "^Q[1-9][0-9]*$"}
|
||||
text: {type: string}
|
||||
source: {type: string}
|
||||
claims:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required: [id, text, kind, status]
|
||||
properties:
|
||||
id: {type: string, pattern: "^C[1-9][0-9]*$"}
|
||||
text: {type: string}
|
||||
kind: {enum: [contribution, theoretical, empirical, methodological]}
|
||||
status: {enum: [core, supporting, dropped]}
|
||||
supports: {type: array, items: {type: string}}
|
||||
depends_on: {type: array, items: {type: string}}
|
||||
evidence: {type: array, items: {type: string}}
|
||||
source: {type: string}
|
||||
definitions:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required: [id, name, text]
|
||||
properties:
|
||||
id: {type: string, pattern: "^D[1-9][0-9]*$"}
|
||||
name: {type: string}
|
||||
text: {type: string}
|
||||
source: {type: string}
|
||||
assumptions:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required: [id, text]
|
||||
properties:
|
||||
id: {type: string, pattern: "^A[1-9][0-9]*$"}
|
||||
text: {type: string}
|
||||
source: {type: string}
|
||||
used_by: {type: array, items: {type: string}}
|
||||
lemmas:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required: [id, text]
|
||||
properties:
|
||||
id: {type: string, pattern: "^L[1-9][0-9]*$"}
|
||||
text: {type: string}
|
||||
depends_on: {type: array, items: {type: string}}
|
||||
used_by: {type: array, items: {type: string}}
|
||||
source: {type: string}
|
||||
symbols:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required: [name, latex, meaning, kind]
|
||||
properties:
|
||||
name: {type: string}
|
||||
latex: {type: string}
|
||||
meaning: {type: string}
|
||||
domain: {type: string}
|
||||
kind:
|
||||
enum: [value, score, probability, index, rank, count, id, mask,
|
||||
permutation, "shape parameter", scalar, set]
|
||||
introduced: {type: string}
|
||||
used: {type: array, items: {type: string}}
|
||||
aliases: {type: array, items: {type: string}}
|
||||
derivations:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required: [id, claim, title, expand]
|
||||
properties:
|
||||
id: {type: string, pattern: "^DER[1-9][0-9]*$"}
|
||||
claim: {type: string}
|
||||
title: {type: string}
|
||||
source: {type: string}
|
||||
expand: {type: boolean}
|
||||
figure: {type: ["string", "null"]}
|
||||
steps:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required: [id, from, to, rule]
|
||||
properties:
|
||||
id: {type: string}
|
||||
from: {type: string}
|
||||
to: {type: string}
|
||||
rule:
|
||||
enum: [definition, substitute, cancel, factor, scale,
|
||||
take-limit, approx, cite, rearrange, introduce]
|
||||
cite: {type: string}
|
||||
justify: {type: string}
|
||||
figures:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required: [id, claim, title, grammar, toolkit, signals, status]
|
||||
properties:
|
||||
id: {type: string, pattern: "^F[1-9][0-9]*$"}
|
||||
claim: {type: string}
|
||||
title: {type: string}
|
||||
grammar:
|
||||
enum: [architecture, pipeline, data-flow, state, time, dependency,
|
||||
argument-map, tensor-face, derivation, screenshot, plot,
|
||||
notation, none]
|
||||
toolkit:
|
||||
enum: [superfig, supertensor, superderive, screenshot,
|
||||
matplotlib, none, align]
|
||||
signals: {type: array, items: {type: string}}
|
||||
source_fig: {type: string}
|
||||
source_pages: {type: array, items: {type: integer, minimum: 1}}
|
||||
crop_bbox:
|
||||
type: ["array", "null"]
|
||||
minItems: 4
|
||||
maxItems: 4
|
||||
items: {type: number}
|
||||
request: {type: ["string", "null"]}
|
||||
include: {type: ["string", "null"]}
|
||||
status: {enum: [planned, delegated, built, included, dropped]}
|
||||
drop_reason: {type: ["string", "null"]}
|
||||
evidence:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required: [id, kind, source, supports, handling]
|
||||
properties:
|
||||
id: {type: string, pattern: "^E[1-9][0-9]*$"}
|
||||
kind: {enum: [table, plot, ablation, theorem, example]}
|
||||
source: {type: string}
|
||||
supports: {type: array, items: {type: string}}
|
||||
handling:
|
||||
enum: [redraw-superfig, redraw-supertensor, redraw-superderive,
|
||||
screenshot, matplotlib, omit]
|
||||
terms:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required: [canonical]
|
||||
properties:
|
||||
canonical: {type: string}
|
||||
aliases: {type: array, items: {type: string}}
|
||||
first_defined: {type: string}
|
||||
source_assets:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required: [id, kind, handling]
|
||||
properties:
|
||||
id: {type: string, pattern: "^SA[1-9][0-9]*$"}
|
||||
kind: {enum: [figure, table]}
|
||||
paper_ref: {type: string}
|
||||
handling:
|
||||
enum: [redraw-superfig, redraw-supertensor, redraw-superderive,
|
||||
screenshot, matplotlib, omit]
|
||||
pages: {type: array, items: {type: integer}}
|
||||
note: {type: string}
|
||||
@@ -0,0 +1,54 @@
|
||||
% Shared notes preamble. TEXINPUTS must include superpaper/assets/.
|
||||
\usepackage[fontset=fandol]{ctex}
|
||||
\usepackage{amsmath,amssymb}
|
||||
\usepackage{graphicx}
|
||||
\usepackage[margin=2.5cm]{geometry}
|
||||
\usepackage[most]{tcolorbox}
|
||||
\usepackage{etoolbox}
|
||||
\usepackage{listings}
|
||||
\usepackage{booktabs}
|
||||
\usepackage{subcaption}
|
||||
\usepackage{float}
|
||||
\usepackage{tikz}
|
||||
\usepackage{hyperref}
|
||||
|
||||
\newtcolorbox{knowledgebox}[1]{
|
||||
enhanced, colback=blue!5!white, colframe=blue!75!black, colbacktitle=blue!75!black,
|
||||
coltitle=white, fonttitle=\bfseries, title=#1,
|
||||
attach boxed title to top left={yshift=-2mm, xshift=2mm},
|
||||
boxrule=1pt, sharp corners
|
||||
}
|
||||
\newtcolorbox{importantbox}[1]{
|
||||
enhanced, colback=yellow!10!white, colframe=yellow!80!black, colbacktitle=yellow!80!black,
|
||||
coltitle=black, fonttitle=\bfseries, title=#1, sharp corners
|
||||
}
|
||||
\newtcolorbox{warningbox}[1]{
|
||||
enhanced, colback=red!5!white, colframe=red!75!black, colbacktitle=red!75!black,
|
||||
coltitle=white, fonttitle=\bfseries, title=#1, sharp corners
|
||||
}
|
||||
\newtcolorbox{quotebox}[1]{
|
||||
enhanced, breakable,
|
||||
colback=black!3!white, colframe=black!55, colbacktitle=black!55,
|
||||
coltitle=white, fonttitle=\bfseries, title=#1, sharp corners
|
||||
}
|
||||
|
||||
\newcommand{\splabel}[1]{\hypertarget{sp:#1}{}\label{sp:#1}}
|
||||
\newcommand{\spref}[1]{\hyperlink{sp:#1}{\texttt{#1}}}
|
||||
\newcommand{\spsource}[1]{\footnote{来源:#1}}
|
||||
\newcommand{\spfig}[4][0.92\textwidth]{%
|
||||
\begin{figure}[H]\centering
|
||||
\includegraphics[width=#1]{figures/#2/build/#2.pdf}%
|
||||
\caption{#3\protect\footnotemark}\end{figure}
|
||||
\footnotetext{#4}}
|
||||
\newcommand{\spscreenshot}[4][0.92\textwidth]{%
|
||||
\begin{figure}[H]\centering
|
||||
\includegraphics[width=#1]{figures/#2/orig.png}%
|
||||
\caption{#3\protect\footnotemark}\end{figure}
|
||||
\footnotetext{#4}}
|
||||
|
||||
\newcommand{\notetitle}{论文笔记}
|
||||
\newcommand{\noteauthors}{}
|
||||
\newcommand{\notedate}{\today}
|
||||
\newcommand{\notepaper}{}
|
||||
\newcommand{\notevenue}{}
|
||||
\newcommand{\notearxiv}{}
|
||||
@@ -0,0 +1,43 @@
|
||||
\documentclass[a4paper]{article}
|
||||
\input{notes-macros}
|
||||
|
||||
% Locked skeleton (see references/pedagogy.md):
|
||||
% \section{这篇论文在问什么}
|
||||
% \section{主张与贡献} % \splabel{C*}
|
||||
% \section{预备:定义、假设、符号}
|
||||
% % --- outline-chosen mechanism sections ---
|
||||
% \section{实验与证据} % optional
|
||||
% \section{总结与延伸}
|
||||
% \appendix
|
||||
% \section{符号表} % \input{sections/symbols.tex}
|
||||
% \section{推导链一览}
|
||||
% \section{图表清单}
|
||||
%
|
||||
% Formula: Chinese motive, then \[ / align, then a flat symbol list.
|
||||
% Keep figures outside knowledgebox / importantbox / warningbox / quotebox.
|
||||
% Do not \usepackage{superfig|supertensor|superderive}.
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{titlepage}
|
||||
\centering
|
||||
\vspace{1.2cm}
|
||||
{\huge\bfseries \notetitle\par}
|
||||
\vspace{0.8cm}
|
||||
{\large \noteauthors\par}
|
||||
\vspace{0.3cm}
|
||||
{\large \notedate\par}
|
||||
\vspace{1.2cm}
|
||||
\begin{tcolorbox}[width=0.9\textwidth, colback=black!2!white, colframe=black!60, sharp corners]
|
||||
\textbf{论文}:\notepaper\par
|
||||
\textbf{venue}:\notevenue\par
|
||||
\textbf{arXiv}:\notearxiv\par
|
||||
\end{tcolorbox}
|
||||
\end{titlepage}
|
||||
|
||||
\tableofcontents
|
||||
\newpage
|
||||
|
||||
\input{sections/sec-01.tex}
|
||||
|
||||
\end{document}
|
||||
Reference in New Issue
Block a user