@open-press/cli 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/core/AGENTS.md +126 -0
- package/template/core/CHANGELOG.md +87 -1
- package/template/core/README.md +9 -5
- package/template/core/engine/cli.mjs +2 -5
- package/template/core/engine/commands/_shared.mjs +4 -4
- package/template/core/engine/commands/deploy.mjs +1 -1
- package/template/core/engine/commands/inspect.mjs +3 -3
- package/template/core/engine/commands/replace.mjs +1 -1
- package/template/core/engine/commands/search.mjs +1 -1
- package/template/core/engine/commands/upgrade.mjs +47 -5
- package/template/core/engine/commands/validate.mjs +2 -2
- package/template/core/engine/document-export.mjs +1 -1
- package/template/core/engine/{chrome-pdf.mjs → output/chrome-pdf.mjs} +1 -2
- package/template/core/engine/{deploy-sync.mjs → output/deploy-sync.mjs} +2 -2
- package/template/core/engine/{fonts.mjs → output/fonts.mjs} +1 -1
- package/template/core/engine/{public-assets.mjs → output/public-assets.mjs} +2 -2
- package/template/core/engine/{static-server.mjs → output/static-server.mjs} +2 -2
- package/template/core/engine/react/caption-numbering.mjs +73 -0
- package/template/core/engine/react/comment-marker.mjs +54 -10
- package/template/core/engine/react/document-entry.mjs +124 -64
- package/template/core/engine/react/document-export.mjs +266 -310
- package/template/core/engine/react/mdx-compile.mjs +214 -3
- package/template/core/engine/react/measurement-css.mjs +3 -3
- package/template/core/engine/react/pagination/allocator.mjs +122 -0
- package/template/core/engine/react/pagination/regions.mjs +81 -0
- package/template/core/engine/react/pagination.mjs +9 -121
- package/template/core/engine/react/pipeline/allocate.mjs +248 -0
- package/template/core/engine/react/pipeline/final-render.mjs +94 -0
- package/template/core/engine/react/pipeline/frame-measurement.mjs +300 -0
- package/template/core/engine/react/pipeline/press-tree.mjs +135 -0
- package/template/core/engine/react/project-asset-endpoint.mjs +2 -2
- package/template/core/engine/react/{chapter-css.mjs → section-css.mjs} +12 -9
- package/template/core/engine/react/sources/heading-numbering.mjs +132 -0
- package/template/core/engine/react/sources/mdx-resolver.mjs +441 -0
- package/template/core/engine/react/{workspace-discovery.mjs → style-discovery.mjs} +29 -40
- package/template/core/engine/{config.mjs → runtime/config.mjs} +15 -0
- package/template/core/engine/{file-utils.mjs → runtime/file-utils.mjs} +1 -1
- package/template/core/engine/{inspection.mjs → runtime/inspection.mjs} +3 -4
- package/template/core/engine/{source-text-tools.mjs → runtime/source-text-tools.mjs} +24 -7
- package/template/core/engine/runtime/source-workspace.mjs +186 -0
- package/template/core/engine/{validation.mjs → runtime/validation.mjs} +19 -17
- package/template/core/package.json +5 -2
- package/template/core/src/openpress/anchorMap.ts +27 -0
- package/template/core/src/openpress/core/Frame.tsx +80 -0
- package/template/core/src/openpress/core/FrameContext.tsx +19 -0
- package/template/core/src/openpress/core/MdxArea.tsx +35 -0
- package/template/core/src/openpress/core/Press.tsx +34 -0
- package/template/core/src/openpress/core/index.tsx +34 -15
- package/template/core/src/openpress/core/primitives.tsx +23 -0
- package/template/core/src/openpress/core/types.ts +131 -19
- package/template/core/src/openpress/core/useSource.ts +28 -0
- package/template/core/src/openpress/manuscript/index.tsx +196 -0
- package/template/core/src/openpress/mdx/index.ts +88 -0
- package/template/core/src/openpress/numbering/index.ts +294 -0
- package/template/core/src/openpress/publicPage.tsx +4 -186
- package/template/core/src/openpress/reactDocumentMetadata.ts +2 -16
- package/template/core/src/openpress/types.ts +0 -16
- package/template/core/src/openpress/workbench.tsx +2 -36
- package/template/core/src/styles/openpress/responsive.css +0 -14
- package/template/core/tsconfig.json +4 -1
- package/template/core/vite.config.ts +10 -3
- package/template/packs/academic-paper/document/chapters/01-introduction/content/01-introduction.mdx +26 -12
- package/template/packs/academic-paper/document/chapters/02-methods/content/01-methods.mdx +37 -17
- package/template/packs/academic-paper/document/chapters/03-results-and-discussion/content/01-results.mdx +34 -16
- package/template/packs/academic-paper/document/chapters/04-acknowledgment/content/01-acknowledgment.mdx +22 -8
- package/template/packs/academic-paper/document/chapters/05-references/content/01-references.mdx +20 -15
- package/template/packs/academic-paper/document/components/Page.tsx +48 -15
- package/template/packs/academic-paper/document/design.md +2 -2
- package/template/packs/academic-paper/document/index.tsx +96 -80
- package/template/packs/academic-paper/document/media/figure-placeholder.svg +9 -0
- package/template/packs/academic-paper/document/theme/base/page-contract.css +30 -13
- package/template/packs/academic-paper/document/theme/base/typography.css +30 -33
- package/template/packs/academic-paper/document/theme/page-surfaces/cover.css +74 -47
- package/template/packs/academic-paper/document/theme/page-surfaces/toc.css +19 -9
- package/template/packs/claude-document/document/components/Page.tsx +24 -14
- package/template/packs/claude-document/document/design.md +2 -2
- package/template/packs/claude-document/document/index.tsx +67 -62
- package/template/packs/claude-document/document/theme/page-surfaces/toc.css +19 -7
- package/template/packs/editorial-monograph/document/components/Page.tsx +24 -14
- package/template/packs/editorial-monograph/document/design.md +2 -2
- package/template/packs/editorial-monograph/document/index.tsx +71 -47
- package/template/packs/editorial-monograph/document/theme/page-surfaces/toc.css +19 -9
- package/template/core/engine/commands/migrate-to-react.mjs +0 -27
- package/template/core/engine/page-renderer.mjs +0 -217
- package/template/core/engine/react/migrate-to-react.mjs +0 -355
- package/template/core/engine/source-workspace.mjs +0 -76
- package/template/core/src/openpress/core/basePages.tsx +0 -87
- package/template/core/src/openpress/pagination.ts +0 -845
- package/template/packs/claude-document/document/chapters/01-document-shape/chapter.tsx +0 -30
- package/template/packs/claude-document/document/chapters/02-review-loop/chapter.tsx +0 -30
- /package/template/core/engine/{chrome-pdf.d.mts → output/chrome-pdf.d.mts} +0 -0
- /package/template/core/engine/{katex-assets.mjs → output/katex-assets.mjs} +0 -0
- /package/template/core/engine/{page-block.mjs → output/page-block.mjs} +0 -0
- /package/template/core/engine/{pdf-media.mjs → output/pdf-media.mjs} +0 -0
- /package/template/core/engine/{config.d.mts → runtime/config.d.mts} +0 -0
- /package/template/core/engine/{issue-report.mjs → runtime/issue-report.mjs} +0 -0
|
@@ -33,18 +33,14 @@ import {
|
|
|
33
33
|
ProjectEntryPanel,
|
|
34
34
|
type ProjectMentionItem,
|
|
35
35
|
} from "./projectWorkspace";
|
|
36
|
-
import {
|
|
36
|
+
import { createAnchorPageMap, resolveAnchorPageIndex } from "./anchorMap";
|
|
37
37
|
import { scheduleBrowserFrame } from "./frameScheduler";
|
|
38
38
|
import {
|
|
39
|
-
createAnchorPageMap,
|
|
40
|
-
numberSourceHeadings,
|
|
41
39
|
PUBLIC_DRAWER_BREAKPOINT,
|
|
42
40
|
PublicPage,
|
|
43
|
-
resolveAnchorPageIndex,
|
|
44
41
|
useViewMode,
|
|
45
42
|
} from "./publicPage";
|
|
46
43
|
import { getProjectIdentity } from "./projectIdentity";
|
|
47
|
-
import { hasBuildTimePagination } from "./reactDocumentMetadata";
|
|
48
44
|
import { buildPublicPreviewHref, isLocalWorkspaceHost } from "./runtimeMode";
|
|
49
45
|
import { useReaderRuntime } from "./readerRuntime";
|
|
50
46
|
import type { DeploymentInfo, ReaderDocument, HtmlPageBlock, SourceBlock } from "./types";
|
|
@@ -123,14 +119,9 @@ export function HtmlWorkbench({
|
|
|
123
119
|
deploymentInfo: DeploymentInfo;
|
|
124
120
|
}) {
|
|
125
121
|
const sourceContainerRef = useRef<HTMLDivElement | null>(null);
|
|
126
|
-
const
|
|
122
|
+
const displayPages = pages;
|
|
127
123
|
const viewModeState = useViewMode();
|
|
128
124
|
const { viewMode } = viewModeState;
|
|
129
|
-
const buildTimePaginated = hasBuildTimePagination(document);
|
|
130
|
-
const [paginatedPages, setPaginatedPages] = useState<PaginatedPage[] | null>(null);
|
|
131
|
-
const displayPages: DisplayPage[] = viewMode === "paged" && !buildTimePaginated
|
|
132
|
-
? (paginatedPages ?? numberedPages)
|
|
133
|
-
: numberedPages;
|
|
134
125
|
const mediaAssets = useMemo(() => collectMediaAssetIndex(displayPages), [displayPages]);
|
|
135
126
|
const anchorPageMap = useMemo(() => createAnchorPageMap(displayPages), [displayPages]);
|
|
136
127
|
const projectComponentUsages = useMemo(() => createProjectComponentUsages(displayPages), [displayPages]);
|
|
@@ -163,7 +154,6 @@ export function HtmlWorkbench({
|
|
|
163
154
|
const pdfButtonText = workbenchPdfButtonText(localDeployEnabled, pdfActionStatus, staticPdfHref);
|
|
164
155
|
const pdfStatusMessage = workbenchPdfStatusMessage(localDeployEnabled, pdfActionStatus);
|
|
165
156
|
const pdfButtonDisabled = localDeployEnabled ? pdfActionStatus === "generating" || pdfActionStatus === "opening" : !staticPdfHref;
|
|
166
|
-
const activePaginatedReady = viewMode === "reading" || buildTimePaginated || Boolean(paginatedPages);
|
|
167
157
|
const inspectorSelectionLabel = formatInspectorSelection(inspector.selectedBlock);
|
|
168
158
|
const activeInlineSavedComment = getInlineSavedCommentForTarget(inlineSavedComment, inspector.selectedTarget);
|
|
169
159
|
const inspectorCommentDisabled = !inspector.selectedBlock || !inspectorCommentText.trim() || inspectorCommentStatus === "submitting";
|
|
@@ -392,10 +382,6 @@ export function HtmlWorkbench({
|
|
|
392
382
|
scheduleBrowserFrame(() => reader.setPage(reader.currentPageIndex, { behavior: "auto" }));
|
|
393
383
|
};
|
|
394
384
|
|
|
395
|
-
useLayoutEffect(() => {
|
|
396
|
-
setPaginatedPages(null);
|
|
397
|
-
}, [numberedPages]);
|
|
398
|
-
|
|
399
385
|
useEffect(() => {
|
|
400
386
|
setInspectorCommentStatus("idle");
|
|
401
387
|
setInspectorCommentError("");
|
|
@@ -407,24 +393,6 @@ export function HtmlWorkbench({
|
|
|
407
393
|
void refreshPendingComments();
|
|
408
394
|
}, [devMode, refreshPendingComments, workspaceView]);
|
|
409
395
|
|
|
410
|
-
useLayoutEffect(() => {
|
|
411
|
-
if (buildTimePaginated) return undefined;
|
|
412
|
-
if (viewMode !== "paged" || paginatedPages) return undefined;
|
|
413
|
-
const sourceContainer = sourceContainerRef.current;
|
|
414
|
-
if (!sourceContainer) return undefined;
|
|
415
|
-
|
|
416
|
-
let cancelled = false;
|
|
417
|
-
const cancelFrame = scheduleBrowserFrame(() => {
|
|
418
|
-
const nextPages = paginateSourcePages(sourceContainer, numberedPages);
|
|
419
|
-
if (!cancelled) setPaginatedPages(nextPages);
|
|
420
|
-
});
|
|
421
|
-
|
|
422
|
-
return () => {
|
|
423
|
-
cancelled = true;
|
|
424
|
-
cancelFrame();
|
|
425
|
-
};
|
|
426
|
-
}, [buildTimePaginated, numberedPages, paginatedPages, viewMode]);
|
|
427
|
-
|
|
428
396
|
const actionSection = (
|
|
429
397
|
<section className="openpress-public-action-section" aria-label="輸出">
|
|
430
398
|
<span className="openpress-public-action-heading">輸出</span>
|
|
@@ -512,7 +480,6 @@ export function HtmlWorkbench({
|
|
|
512
480
|
className={`reader-app openpress-reader-app openpress-public-viewer openpress-dev-public-viewer is-ready${reader.rightPanelOpen ? "" : " is-closed-right"}`}
|
|
513
481
|
data-openpress-react-runtime="true"
|
|
514
482
|
data-openpress-view-mode={viewMode}
|
|
515
|
-
data-openpress-pagination={activePaginatedReady ? "ready" : "pending"}
|
|
516
483
|
data-openpress-inspector-mode={inspector.inspectorMode ? "on" : "off"}
|
|
517
484
|
data-active-workspace={workspaceView}
|
|
518
485
|
>
|
|
@@ -533,7 +500,6 @@ export function HtmlWorkbench({
|
|
|
533
500
|
pages={displayPages}
|
|
534
501
|
currentPageIndex={reader.currentPageIndex}
|
|
535
502
|
devMode={devMode}
|
|
536
|
-
paginatedReady={activePaginatedReady}
|
|
537
503
|
sourceContainerRef={sourceContainerRef}
|
|
538
504
|
registerPage={reader.registerPage}
|
|
539
505
|
exposeSourceData={devMode}
|
|
@@ -269,12 +269,6 @@
|
|
|
269
269
|
box-shadow: none;
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
.openpress-public-viewer.openpress-reader-app[data-openpress-pagination="pending"] .openpress-public-navigation {
|
|
273
|
-
transform: translateX(-110%);
|
|
274
|
-
pointer-events: none;
|
|
275
|
-
box-shadow: none;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
272
|
.openpress-public-viewer.openpress-reader-app .openpress-public-scrim {
|
|
279
273
|
position: fixed;
|
|
280
274
|
inset: 0;
|
|
@@ -309,14 +303,6 @@
|
|
|
309
303
|
display: block;
|
|
310
304
|
}
|
|
311
305
|
|
|
312
|
-
.openpress-public-viewer.openpress-reader-app[data-openpress-pagination="pending"] .openpress-public-scrim {
|
|
313
|
-
display: none;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
.openpress-public-viewer.openpress-reader-app[data-openpress-pagination="pending"] .openpress-public-fab {
|
|
317
|
-
display: flex;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
306
|
.openpress-public-viewer[data-openpress-view-mode="paged"] .reader-pages {
|
|
321
307
|
--openpress-public-page-width: min(
|
|
322
308
|
var(--openpress-page-width),
|
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
"noEmit": true,
|
|
18
18
|
"jsx": "react-jsx",
|
|
19
19
|
"paths": {
|
|
20
|
-
"@
|
|
20
|
+
"@open-press/core": ["./src/openpress/core/index.tsx"],
|
|
21
|
+
"@open-press/core/mdx": ["./src/openpress/mdx/index.ts"],
|
|
22
|
+
"@open-press/core/manuscript": ["./src/openpress/manuscript/index.tsx"],
|
|
23
|
+
"@open-press/core/numbering": ["./src/openpress/numbering/index.ts"],
|
|
21
24
|
"@/components": ["./document/components/index.ts", "./document/components/index.tsx"],
|
|
22
25
|
"@/components/*": ["./document/components/*"],
|
|
23
26
|
"@/*": ["./src/*"]
|
|
@@ -5,7 +5,7 @@ import path from "node:path";
|
|
|
5
5
|
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
6
6
|
import { defineConfig } from "vite";
|
|
7
7
|
import react from "@vitejs/plugin-react";
|
|
8
|
-
import { loadConfig, publicPdfHref } from "./engine/config.mjs";
|
|
8
|
+
import { loadConfig, publicPdfHref } from "./engine/runtime/config.mjs";
|
|
9
9
|
import { handleCommentRequest } from "./engine/react/comment-endpoint.mjs";
|
|
10
10
|
import { handleProjectAssetRequest } from "./engine/react/project-asset-endpoint.mjs";
|
|
11
11
|
|
|
@@ -15,8 +15,11 @@ const workspaceRoot = process.env.OPENPRESS_WORKSPACE_ROOT
|
|
|
15
15
|
: frameworkRoot;
|
|
16
16
|
const sourceRoot = path.join(frameworkRoot, "src");
|
|
17
17
|
const openpressCliPath = path.join(frameworkRoot, "engine", "cli.mjs");
|
|
18
|
-
const staticServerPath = path.join(frameworkRoot, "engine", "static-server.mjs");
|
|
18
|
+
const staticServerPath = path.join(frameworkRoot, "engine", "output", "static-server.mjs");
|
|
19
19
|
const openpressCoreEntry = path.join(frameworkRoot, "src", "openpress", "core", "index.tsx");
|
|
20
|
+
const openpressMdxEntry = path.join(frameworkRoot, "src", "openpress", "mdx", "index.ts");
|
|
21
|
+
const openpressManuscriptEntry = path.join(frameworkRoot, "src", "openpress", "manuscript", "index.tsx");
|
|
22
|
+
const openpressNumberingEntry = path.join(frameworkRoot, "src", "openpress", "numbering", "index.ts");
|
|
20
23
|
const openpressConfig = await loadConfig(workspaceRoot);
|
|
21
24
|
const outputDir = openpressConfig.paths.outputDir;
|
|
22
25
|
const reactDocumentRoot = openpressConfig.paths.documentRoot;
|
|
@@ -55,7 +58,11 @@ export default defineConfig({
|
|
|
55
58
|
resolve: {
|
|
56
59
|
dedupe: ["react", "react-dom", "@mdx-js/react"],
|
|
57
60
|
alias: {
|
|
58
|
-
|
|
61
|
+
// Subpaths must come before the base path so resolution matches longest first.
|
|
62
|
+
"@open-press/core/mdx": openpressMdxEntry,
|
|
63
|
+
"@open-press/core/manuscript": openpressManuscriptEntry,
|
|
64
|
+
"@open-press/core/numbering": openpressNumberingEntry,
|
|
65
|
+
"@open-press/core": openpressCoreEntry,
|
|
59
66
|
"@/components": reactDocumentComponentsRoot,
|
|
60
67
|
"@": sourceRoot,
|
|
61
68
|
...workspaceAliases,
|
package/template/packs/academic-paper/document/chapters/01-introduction/content/01-introduction.mdx
CHANGED
|
@@ -1,21 +1,35 @@
|
|
|
1
1
|
## Introduction
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The purpose of this paper template is to provide a compact, readable structure for a
|
|
4
|
+
machine-learning research manuscript written in a formal journal style.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
### Background and Motivation
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Recent studies have shown that modern experiments produce larger datasets and richer
|
|
9
|
+
artifact pipelines, but the writing process is often bottlenecked by repeated formatting
|
|
10
|
+
adjustments. A lightweight drafting layer can decouple scientific reasoning from
|
|
11
|
+
typesetting concerns and let the author focus on experimental validity first.
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
### Problem Statement
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- `05-references/` — numbered `[1]`, `[2]` references.
|
|
15
|
+
The key challenge addressed in this draft is to keep the manuscript internally
|
|
16
|
+
consistent while moving from scratch notes to a submission-ready narrative. The
|
|
17
|
+
workflow should preserve section hierarchy, citation order, and figure/table integrity
|
|
18
|
+
without requiring manual renumbering.
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
### Contribution
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
This demo paper includes the following contributions:
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
- A reproducible chapter flow (`Introduction → Methods → Results and Discussion →
|
|
25
|
+
Conclusion`),
|
|
26
|
+
- Consistent heading levels for major and minor sections,
|
|
27
|
+
- Placeholder media and tables that can be swapped with real results,
|
|
28
|
+
- A reference block and placeholder metadata for a clean handoff to final publication
|
|
29
|
+
tooling.
|
|
30
|
+
|
|
31
|
+
### Paper Organization
|
|
32
|
+
|
|
33
|
+
The paper is organized as follows: Section 2 details the methodology,
|
|
34
|
+
Section 3 reports results and discusses representative scenarios,
|
|
35
|
+
Section 4 summarizes conclusions and practical recommendations.
|
|
@@ -1,30 +1,50 @@
|
|
|
1
1
|
## Methods
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This section describes a hypothetical experimental design suitable for an applied
|
|
4
|
+
machine-learning paper.
|
|
4
5
|
|
|
5
|
-
###
|
|
6
|
+
### Data and Problem Setup
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
We assume a synthetic dataset with 3,200 anonymized samples collected under three
|
|
9
|
+
operational conditions. Each sample includes paired feature vectors, timestamped
|
|
10
|
+
metadata, and a binary outcome label. The baseline split is 70/15/15 for training,
|
|
11
|
+
validation, and held-out test sets.
|
|
8
12
|
|
|
9
|
-
###
|
|
13
|
+
### Core Pipeline
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
The pipeline has three stages:
|
|
12
16
|
|
|
13
|
-
1.
|
|
14
|
-
2.
|
|
15
|
-
3.
|
|
16
|
-
4. State randomness control (seeds, repeats, confidence reporting).
|
|
17
|
+
1. **Preprocessing**: normalization, missing-value handling, and feature screening.
|
|
18
|
+
2. **Modeling**: training a compact baseline model and a comparison ablation set.
|
|
19
|
+
3. **Evaluation**: calibration-aware scoring and bootstrapped confidence intervals.
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
For this draft, preprocessing includes clipping extreme values and aligning all
|
|
22
|
+
continuous fields to SI-style unit notation.
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
### Equations
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
The main objective is written as:
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
$$
|
|
29
|
+
\mathcal{L}(\theta) = \sum_{i=1}^{N}\left(\hat{y}_{i}(\theta)-y_{i}\right)^2
|
|
30
|
+
$$
|
|
25
31
|
|
|
26
|
-
|
|
32
|
+
where $\theta$ are trainable parameters and the objective is minimized on the
|
|
33
|
+
training subset.
|
|
27
34
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
### Evaluation Protocol
|
|
36
|
+
|
|
37
|
+
Model quality is measured by macro-averaged F1, AUROC, and an uncertainty-aware
|
|
38
|
+
calibration score. Reproducibility is ensured by fixing the random seed and logging
|
|
39
|
+
all preprocessing parameters.
|
|
40
|
+
|
|
41
|
+
### Implementation Notes
|
|
42
|
+
|
|
43
|
+
- All runs were executed on a dual-socket compute node with two GPUs.
|
|
44
|
+
- Checkpoints were stored every 5 epochs.
|
|
45
|
+
- Logging followed a single JSON schema shared across all experiments.
|
|
46
|
+
|
|
47
|
+
### Validation and Quality Control
|
|
48
|
+
|
|
49
|
+
Validation is automated through a script that checks missing captions, file path
|
|
50
|
+
consistency, and reference formatting before final export.
|
|
@@ -1,29 +1,47 @@
|
|
|
1
1
|
## Results and Discussion
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
### Benchmark Results
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The synthetic experiment yields a consistent improvement trend across three datasets.
|
|
6
|
+
Performance gains are modest but stable after hyperparameter tuning.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
| Metric | Baseline | Proposed | Improvement |
|
|
9
|
+
| --- | --- | --- | --- |
|
|
10
|
+
| Macro-F1 | 0.61 | 0.67 | +9.8% |
|
|
11
|
+
| AUROC | 0.74 | 0.81 | +9.5% |
|
|
12
|
+
| Calibration Error | 0.082 | 0.043 | -47.6% |
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
The proposed model retains a similar variance profile while improving score
|
|
15
|
+
stability in low-sample conditions.
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
### Representative Visualization
|
|
18
|
+
|
|
19
|
+
<img
|
|
20
|
+
src="media/figure-placeholder.svg"
|
|
21
|
+
alt="Example of a figure placeholder"
|
|
22
|
+
style={{ maxWidth: "420px", width: "100%", height: "auto" }}
|
|
23
|
+
/>
|
|
24
|
+
|
|
25
|
+
Figure 1. Example of a result trend visualization (placeholder image).
|
|
26
|
+
|
|
27
|
+
### Error Analysis
|
|
16
28
|
|
|
17
|
-
|
|
29
|
+
Some error cases cluster around edge classes with incomplete metadata. These cases
|
|
30
|
+
benefit from better augmentation and a revised class-balanced loss.
|
|
18
31
|
|
|
19
|
-
###
|
|
32
|
+
### Sensitivity Study
|
|
20
33
|
|
|
21
|
-
|
|
34
|
+
- Training set size below 40% causes a steeper drop in recall.
|
|
35
|
+
- Early stopping thresholds above 3 epochs reduce overfitting in our setting.
|
|
36
|
+
- Calibrated post-processing improves confidence robustness.
|
|
22
37
|
|
|
23
|
-
###
|
|
38
|
+
### Discussion
|
|
24
39
|
|
|
25
|
-
|
|
40
|
+
The most practical takeaway is that small engineering changes in preprocessing and
|
|
41
|
+
evaluation discipline can produce measurable gains even when architecture changes are
|
|
42
|
+
minimal.
|
|
26
43
|
|
|
27
|
-
###
|
|
44
|
+
### Limitations
|
|
28
45
|
|
|
29
|
-
|
|
46
|
+
This section reports synthetic results only; real-world deployment would require
|
|
47
|
+
cross-domain validation, privacy checks, and a stronger external benchmark suite.
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
##
|
|
1
|
+
## Conclusions
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This template run shows that a simple methodology with consistent evaluation
|
|
4
|
+
accounting can achieve reliable gains without dramatic architectural complexity.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
### Key Takeaways
|
|
6
7
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
|
|
8
|
+
- Keep preprocessing and metric reporting deterministic.
|
|
9
|
+
- Use a calibrated validation protocol before reporting final headline scores.
|
|
10
|
+
- Reserve model complexity for problems that cannot be solved with better data
|
|
11
|
+
discipline.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
### Practical Recommendations
|
|
14
|
+
|
|
15
|
+
Authors are encouraged to replace each placeholder paragraph with real study details,
|
|
16
|
+
including hardware, code provenance, and full reproducibility statements.
|
|
17
|
+
|
|
18
|
+
### Limitations and Future Work
|
|
19
|
+
|
|
20
|
+
The current draft is synthetic; external generalization remains to be demonstrated.
|
|
21
|
+
Future work should add domain transfer tests and a public benchmark release.
|
|
22
|
+
|
|
23
|
+
### Acknowledgments
|
|
24
|
+
|
|
25
|
+
We thank the hypothetical reviewers and platform contributors who would have reviewed
|
|
26
|
+
this draft in a real submission round.
|
package/template/packs/academic-paper/document/chapters/05-references/content/01-references.mdx
CHANGED
|
@@ -1,27 +1,32 @@
|
|
|
1
1
|
## References
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Unless there are six authors or more, give all authors' names; do not use `et al.`. Papers not yet published should be cited as *unpublished*; accepted but not yet published as *in press*. Capitalize only the first word in a paper title, except for proper nouns and element symbols.
|
|
6
|
-
|
|
7
|
-
For papers published in translation journals, give the English citation first, followed by the original foreign-language citation.
|
|
3
|
+
Please number references consecutively within brackets `[1]`.
|
|
4
|
+
Sentence punctuation follows the bracketed number.
|
|
8
5
|
|
|
9
6
|
---
|
|
10
7
|
|
|
11
|
-
[1] G. Eason, B. Noble, and I. N. Sneddon,
|
|
8
|
+
[1] G. Eason, B. Noble, and I. N. Sneddon, “On certain integrals of
|
|
9
|
+
Lipschitz-Hankel type involving products of Bessel functions,” *Phil. Trans. Roy.
|
|
10
|
+
Soc. London*, vol. A247, pp. 529–551, April 1955.
|
|
12
11
|
|
|
13
|
-
[2] J. Clerk Maxwell, *A Treatise on Electricity and Magnetism*, 3rd ed., vol. 2.
|
|
12
|
+
[2] J. Clerk Maxwell, *A Treatise on Electricity and Magnetism*, 3rd ed., vol. 2.
|
|
13
|
+
Oxford: Clarendon, 1892, pp. 68–73.
|
|
14
14
|
|
|
15
|
-
[3] I. S. Jacobs and C. P. Bean,
|
|
15
|
+
[3] I. S. Jacobs and C. P. Bean, “Fine particles, thin films and exchange anisotropy,”
|
|
16
|
+
in *Magnetism*, vol. III, G. T. Rado and H. Suhl, Eds. New York: Academic,
|
|
17
|
+
1963, pp. 271–350.
|
|
16
18
|
|
|
17
|
-
[4] K. Elissa,
|
|
19
|
+
[4] K. Elissa, “Title of paper if known,” unpublished.
|
|
18
20
|
|
|
19
|
-
[5] R. Nicole,
|
|
21
|
+
[5] R. Nicole, “Title of paper with only first word capitalized,” *J. Name Stand.
|
|
22
|
+
Abbrev.*, in press.
|
|
20
23
|
|
|
21
|
-
[6] Y. Yorozu, M. Hirano, K. Oka, and Y. Tagawa,
|
|
24
|
+
[6] Y. Yorozu, M. Hirano, K. Oka, and Y. Tagawa, “Electron spectroscopy studies
|
|
25
|
+
on magneto-optical media and plastic substrate interface,” *IEEE Trans. J. Magn.
|
|
26
|
+
Japan*, vol. 2, pp. 740–741, August 1987.
|
|
22
27
|
|
|
23
|
-
[7] M. Young, *The Technical Writer
|
|
24
|
-
|
|
25
|
-
---
|
|
28
|
+
[7] M. Young, *The Technical Writer's Handbook*. Mill Valley, CA: University
|
|
29
|
+
Science, 1989.
|
|
26
30
|
|
|
27
|
-
>
|
|
31
|
+
> Open-press is used for iteration. Remove all template placeholder text and replace
|
|
32
|
+
> references before submission.
|
|
@@ -1,27 +1,60 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Frame, MdxArea } from "@open-press/core";
|
|
2
|
+
import type { SectionsPageProps } from "@open-press/core/manuscript";
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
2
4
|
|
|
3
5
|
export default function Page({
|
|
6
|
+
frameKey,
|
|
7
|
+
chainId,
|
|
4
8
|
pageIndex,
|
|
5
9
|
totalPages,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}:
|
|
10
|
+
sectionSlug,
|
|
11
|
+
sectionTitle,
|
|
12
|
+
sectionTone,
|
|
13
|
+
}: SectionsPageProps) {
|
|
14
|
+
const pageBodyRef = useRef<HTMLElement | null>(null);
|
|
15
|
+
|
|
16
|
+
const runningHeader =
|
|
17
|
+
"This is a non-peer reviewed Express letter submitted to J SEDI";
|
|
18
|
+
const runningRight = "Your short title goes here";
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
const area = pageBodyRef.current?.querySelector(".openpress-mdx-area");
|
|
22
|
+
if (!area) return;
|
|
23
|
+
|
|
24
|
+
area.querySelectorAll<HTMLElement>("h2[data-chapter]").forEach((heading) => {
|
|
25
|
+
const chapterValue = heading.getAttribute("data-chapter");
|
|
26
|
+
if (!chapterValue) return;
|
|
27
|
+
if (!/^\d+$/.test(chapterValue)) return;
|
|
28
|
+
const normalized = String(Number.parseInt(chapterValue, 10));
|
|
29
|
+
heading.setAttribute("data-chapter", normalized);
|
|
30
|
+
});
|
|
31
|
+
}, [chainId]);
|
|
32
|
+
|
|
10
33
|
return (
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
34
|
+
<Frame
|
|
35
|
+
frameKey={frameKey}
|
|
36
|
+
role="manuscript.content"
|
|
37
|
+
className="reader-page--content"
|
|
15
38
|
data-page-index={pageIndex}
|
|
16
39
|
data-total-pages={totalPages}
|
|
17
|
-
data-
|
|
18
|
-
data-chapter-tone={
|
|
40
|
+
data-section-id={sectionSlug}
|
|
41
|
+
data-chapter-tone={sectionTone}
|
|
19
42
|
>
|
|
20
43
|
<div className="page-frame">
|
|
21
|
-
<header className="page-header" aria-hidden="true"
|
|
22
|
-
|
|
23
|
-
|
|
44
|
+
<header className="page-header" aria-hidden="true">
|
|
45
|
+
<span className="running-head-left">{runningHeader}</span>
|
|
46
|
+
<span className="running-head-right">{runningRight}</span>
|
|
47
|
+
</header>
|
|
48
|
+
<main className="page-body" ref={pageBodyRef}>
|
|
49
|
+
<MdxArea chainId={chainId} overflow="extend" />
|
|
50
|
+
</main>
|
|
51
|
+
<footer className="page-footer" aria-hidden="true">
|
|
52
|
+
<span className="footer-left">{sectionTitle}</span>
|
|
53
|
+
<span className="footer-right">
|
|
54
|
+
{totalPages > 1 ? `${pageIndex + 1}/${totalPages}` : pageIndex + 1}
|
|
55
|
+
</span>
|
|
56
|
+
</footer>
|
|
24
57
|
</div>
|
|
25
|
-
</
|
|
58
|
+
</Frame>
|
|
26
59
|
);
|
|
27
60
|
}
|
|
@@ -112,7 +112,7 @@ Block-level 強調(callout / warning / note)目前不在 design system 範圍;
|
|
|
112
112
|
|
|
113
113
|
### Chapter & Section Numbering
|
|
114
114
|
|
|
115
|
-
Engine 不在 h2/h3 內容前注入任何編號或前綴;
|
|
115
|
+
Engine 不在 h2/h3 內容前注入任何編號或前綴;export pipeline 會在 build-time 寫入 `data-chapter` / `data-section` attribute(值是 `01`、`1.1` 這種兩位數阿拉伯格式)。實際顯示樣式由 theme 的 `::before content` 決定,這讓不同文件能挑不同 numbering vocabulary 而不動 reader runtime。
|
|
116
116
|
|
|
117
117
|
預設(editorial-monograph 起手樣式):
|
|
118
118
|
|
|
@@ -258,7 +258,7 @@ body 內容區的 page padding(content margin)由 `.reader-page` 內的 `--page-
|
|
|
258
258
|
| 資料歸資料 | chart data 透過 React props 或鄰近的 typed data module 傳入,不寫死在 CSS |
|
|
259
259
|
| 樣式歸樣式 | chart frame 等通用規則放在 `document/theme/patterns/`;變體 CSS 放在元件自己的 `style.css` |
|
|
260
260
|
| 元件歸元件 | 一個視覺 = 一個 `document/components/ComponentName/` 包;MDX 只保留 `<ComponentName />` 呼叫 |
|
|
261
|
-
| Caption 必填 | caption 只寫說明文字,不手寫圖號或表號;
|
|
261
|
+
| Caption 必填 | caption 只寫說明文字,不手寫圖號或表號;export pipeline 會替 content pages 的 figure/table 自動編號 |
|
|
262
262
|
| PDF-safe | 圖表需 `break-inside: avoid`,高度不可壓到 footer |
|
|
263
263
|
|
|
264
264
|
如果使用者要求新的視覺元件,Agent 應先更新本檔說明,再改對應的 `document/components/<name>/style.css` 或 `document/theme/` CSS,最後用 reader 預覽檢查 PDF 輸出。
|