@wentorai/research-plugins 1.2.2 → 1.3.0
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/README.md +16 -8
- package/openclaw.plugin.json +10 -3
- package/package.json +2 -5
- package/skills/analysis/dataviz/SKILL.md +25 -0
- package/skills/analysis/dataviz/chart-image-generator/SKILL.md +1 -1
- package/skills/analysis/econometrics/SKILL.md +23 -0
- package/skills/analysis/econometrics/robustness-checks/SKILL.md +1 -1
- package/skills/analysis/statistics/SKILL.md +21 -0
- package/skills/analysis/statistics/data-anomaly-detection/SKILL.md +1 -1
- package/skills/analysis/statistics/ml-experiment-tracker/SKILL.md +1 -1
- package/skills/analysis/statistics/{senior-data-scientist-guide → modeling-strategy-guide}/SKILL.md +5 -5
- package/skills/analysis/wrangling/SKILL.md +21 -0
- package/skills/analysis/wrangling/csv-data-analyzer/SKILL.md +1 -1
- package/skills/analysis/wrangling/data-cog-guide/SKILL.md +1 -1
- package/skills/domains/ai-ml/SKILL.md +37 -0
- package/skills/domains/biomedical/SKILL.md +28 -0
- package/skills/domains/biomedical/genomas-guide/SKILL.md +1 -1
- package/skills/domains/biomedical/med-researcher-guide/SKILL.md +1 -1
- package/skills/domains/biomedical/medgeclaw-guide/SKILL.md +1 -1
- package/skills/domains/business/SKILL.md +17 -0
- package/skills/domains/business/architecture-design-guide/SKILL.md +1 -1
- package/skills/domains/chemistry/SKILL.md +19 -0
- package/skills/domains/chemistry/computational-chemistry-guide/SKILL.md +1 -1
- package/skills/domains/cs/SKILL.md +21 -0
- package/skills/domains/ecology/SKILL.md +16 -0
- package/skills/domains/economics/SKILL.md +20 -0
- package/skills/domains/economics/post-labor-economics/SKILL.md +1 -1
- package/skills/domains/economics/pricing-psychology-guide/SKILL.md +1 -1
- package/skills/domains/education/SKILL.md +19 -0
- package/skills/domains/education/academic-study-methods/SKILL.md +1 -1
- package/skills/domains/education/edumcp-guide/SKILL.md +1 -1
- package/skills/domains/finance/SKILL.md +19 -0
- package/skills/domains/finance/akshare-finance-data/SKILL.md +1 -1
- package/skills/domains/finance/options-analytics-agent-guide/SKILL.md +1 -1
- package/skills/domains/finance/stata-accounting-research/SKILL.md +1 -1
- package/skills/domains/geoscience/SKILL.md +17 -0
- package/skills/domains/humanities/SKILL.md +16 -0
- package/skills/domains/humanities/history-research-guide/SKILL.md +1 -1
- package/skills/domains/humanities/political-history-guide/SKILL.md +1 -1
- package/skills/domains/law/SKILL.md +19 -0
- package/skills/domains/math/SKILL.md +17 -0
- package/skills/domains/pharma/SKILL.md +17 -0
- package/skills/domains/physics/SKILL.md +16 -0
- package/skills/domains/social-science/SKILL.md +17 -0
- package/skills/domains/social-science/sociology-research-methods/SKILL.md +1 -1
- package/skills/literature/discovery/SKILL.md +20 -0
- package/skills/literature/discovery/paper-recommendation-guide/SKILL.md +1 -1
- package/skills/literature/discovery/semantic-paper-radar/SKILL.md +1 -1
- package/skills/literature/fulltext/SKILL.md +26 -0
- package/skills/literature/metadata/SKILL.md +35 -0
- package/skills/literature/metadata/doi-content-negotiation/SKILL.md +4 -0
- package/skills/literature/metadata/doi-resolution-guide/SKILL.md +4 -0
- package/skills/literature/metadata/orcid-api/SKILL.md +4 -0
- package/skills/literature/metadata/orcid-integration-guide/SKILL.md +4 -0
- package/skills/literature/search/SKILL.md +43 -0
- package/skills/literature/search/paper-search-mcp-guide/SKILL.md +1 -1
- package/skills/research/automation/SKILL.md +21 -0
- package/skills/research/deep-research/SKILL.md +24 -0
- package/skills/research/deep-research/auto-deep-research-guide/SKILL.md +1 -1
- package/skills/research/deep-research/in-depth-research-guide/SKILL.md +1 -1
- package/skills/research/funding/SKILL.md +20 -0
- package/skills/research/methodology/SKILL.md +24 -0
- package/skills/research/paper-review/SKILL.md +19 -0
- package/skills/research/paper-review/paper-critique-framework/SKILL.md +1 -1
- package/skills/tools/code-exec/SKILL.md +18 -0
- package/skills/tools/diagram/SKILL.md +20 -0
- package/skills/tools/document/SKILL.md +21 -0
- package/skills/tools/knowledge-graph/SKILL.md +21 -0
- package/skills/tools/ocr-translate/SKILL.md +18 -0
- package/skills/tools/ocr-translate/handwriting-recognition-guide/SKILL.md +2 -0
- package/skills/tools/ocr-translate/latex-ocr-guide/SKILL.md +2 -0
- package/skills/tools/scraping/SKILL.md +17 -0
- package/skills/writing/citation/SKILL.md +33 -0
- package/skills/writing/citation/zotfile-attachment-guide/SKILL.md +2 -0
- package/skills/writing/composition/SKILL.md +22 -0
- package/skills/writing/composition/research-paper-writer/SKILL.md +1 -1
- package/skills/writing/composition/scientific-writing-wrapper/SKILL.md +1 -1
- package/skills/writing/latex/SKILL.md +22 -0
- package/skills/writing/latex/academic-writing-latex/SKILL.md +1 -1
- package/skills/writing/latex/latex-drawing-guide/SKILL.md +1 -1
- package/skills/writing/polish/SKILL.md +20 -0
- package/skills/writing/polish/chinese-text-humanizer/SKILL.md +1 -1
- package/skills/writing/templates/SKILL.md +22 -0
- package/skills/writing/templates/beamer-presentation-guide/SKILL.md +1 -1
- package/skills/writing/templates/scientific-article-pdf/SKILL.md +1 -1
- package/skills/analysis/dataviz/citation-map-guide/SKILL.md +0 -184
- package/skills/analysis/dataviz/data-visualization-principles/SKILL.md +0 -171
- package/skills/analysis/econometrics/empirical-paper-analysis/SKILL.md +0 -192
- package/skills/analysis/econometrics/panel-data-regression-workflow/SKILL.md +0 -267
- package/skills/analysis/econometrics/stata-regression/SKILL.md +0 -117
- package/skills/analysis/statistics/general-statistics-guide/SKILL.md +0 -226
- package/skills/analysis/statistics/infiagent-benchmark-guide/SKILL.md +0 -106
- package/skills/analysis/statistics/pywayne-statistics-guide/SKILL.md +0 -192
- package/skills/analysis/statistics/quantitative-methods-guide/SKILL.md +0 -193
- package/skills/analysis/wrangling/claude-data-analysis-guide/SKILL.md +0 -100
- package/skills/analysis/wrangling/open-data-scientist-guide/SKILL.md +0 -197
- package/skills/domains/ai-ml/annotated-dl-papers-guide/SKILL.md +0 -159
- package/skills/domains/humanities/digital-humanities-methods/SKILL.md +0 -232
- package/skills/domains/law/legal-research-methods/SKILL.md +0 -190
- package/skills/domains/social-science/sociology-research-guide/SKILL.md +0 -238
- package/skills/literature/discovery/arxiv-paper-monitoring/SKILL.md +0 -233
- package/skills/literature/discovery/paper-tracking-guide/SKILL.md +0 -211
- package/skills/literature/fulltext/zotero-scihub-guide/SKILL.md +0 -168
- package/skills/literature/search/arxiv-osiris/SKILL.md +0 -199
- package/skills/literature/search/deepgit-search-guide/SKILL.md +0 -147
- package/skills/literature/search/multi-database-literature-search/SKILL.md +0 -198
- package/skills/literature/search/papers-chat-guide/SKILL.md +0 -194
- package/skills/literature/search/pasa-paper-search-guide/SKILL.md +0 -138
- package/skills/literature/search/scientify-literature-survey/SKILL.md +0 -203
- package/skills/research/automation/ai-scientist-guide/SKILL.md +0 -228
- package/skills/research/automation/coexist-ai-guide/SKILL.md +0 -149
- package/skills/research/automation/foam-agent-guide/SKILL.md +0 -203
- package/skills/research/automation/research-paper-orchestrator/SKILL.md +0 -254
- package/skills/research/deep-research/academic-deep-research/SKILL.md +0 -190
- package/skills/research/deep-research/cognitive-kernel-guide/SKILL.md +0 -200
- package/skills/research/deep-research/corvus-research-guide/SKILL.md +0 -132
- package/skills/research/deep-research/deep-research-pro/SKILL.md +0 -213
- package/skills/research/deep-research/deep-research-work/SKILL.md +0 -204
- package/skills/research/deep-research/research-cog/SKILL.md +0 -153
- package/skills/research/methodology/academic-mentor-guide/SKILL.md +0 -169
- package/skills/research/methodology/deep-innovator-guide/SKILL.md +0 -242
- package/skills/research/methodology/research-pipeline-units-guide/SKILL.md +0 -169
- package/skills/research/paper-review/paper-compare-guide/SKILL.md +0 -238
- package/skills/research/paper-review/paper-digest-guide/SKILL.md +0 -240
- package/skills/research/paper-review/paper-research-assistant/SKILL.md +0 -231
- package/skills/research/paper-review/research-quality-filter/SKILL.md +0 -261
- package/skills/tools/code-exec/contextplus-mcp-guide/SKILL.md +0 -110
- package/skills/tools/diagram/clawphd-guide/SKILL.md +0 -149
- package/skills/tools/diagram/scientific-graphical-abstract/SKILL.md +0 -201
- package/skills/tools/document/md2pdf-xelatex/SKILL.md +0 -212
- package/skills/tools/document/openpaper-guide/SKILL.md +0 -232
- package/skills/tools/document/weknora-guide/SKILL.md +0 -216
- package/skills/tools/knowledge-graph/mimir-memory-guide/SKILL.md +0 -135
- package/skills/tools/knowledge-graph/open-webui-tools-guide/SKILL.md +0 -156
- package/skills/tools/ocr-translate/formula-recognition-guide/SKILL.md +0 -367
- package/skills/tools/ocr-translate/math-equation-renderer/SKILL.md +0 -198
- package/skills/tools/scraping/api-data-collection-guide/SKILL.md +0 -301
- package/skills/writing/citation/academic-citation-manager-guide/SKILL.md +0 -182
- package/skills/writing/composition/opendraft-thesis-guide/SKILL.md +0 -200
- package/skills/writing/composition/paper-debugger-guide/SKILL.md +0 -143
- package/skills/writing/composition/paperforge-guide/SKILL.md +0 -205
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: clawphd-guide
|
|
3
|
-
description: "Agent for converting papers to diagrams, posters, and videos"
|
|
4
|
-
metadata:
|
|
5
|
-
openclaw:
|
|
6
|
-
emoji: "🎬"
|
|
7
|
-
category: "tools"
|
|
8
|
-
subcategory: "diagram"
|
|
9
|
-
keywords: ["paper visualization", "poster generation", "research video", "diagram agent", "visual abstract", "presentation"]
|
|
10
|
-
source: "https://github.com/ZhihaoAIRobotic/ClawPhD"
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# ClawPhD Guide
|
|
14
|
-
|
|
15
|
-
## Overview
|
|
16
|
-
|
|
17
|
-
ClawPhD is an AI agent that converts research papers into visual formats — architecture diagrams, research posters, visual abstracts, and video presentations. It reads paper PDFs, extracts key concepts and results, and generates publication-ready visual materials. Useful for conference presentations, social media dissemination, and research communication.
|
|
18
|
-
|
|
19
|
-
## Features
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
Paper PDF / LaTeX
|
|
23
|
-
↓
|
|
24
|
-
Content Extraction Agent
|
|
25
|
-
├── Key contributions
|
|
26
|
-
├── Architecture / method
|
|
27
|
-
├── Results tables and figures
|
|
28
|
-
└── Abstract and conclusions
|
|
29
|
-
↓
|
|
30
|
-
Visual Generation Agent
|
|
31
|
-
├── Architecture diagram (SVG/PNG)
|
|
32
|
-
├── Research poster (A0 PDF)
|
|
33
|
-
├── Visual abstract (social media)
|
|
34
|
-
├── Slide deck (Beamer/PPTX)
|
|
35
|
-
└── Video narration (MP4)
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Usage
|
|
39
|
-
|
|
40
|
-
```python
|
|
41
|
-
from clawphd import ClawPhD
|
|
42
|
-
|
|
43
|
-
agent = ClawPhD(llm_provider="anthropic")
|
|
44
|
-
|
|
45
|
-
# Generate architecture diagram
|
|
46
|
-
diagram = agent.generate_diagram(
|
|
47
|
-
paper="paper.pdf",
|
|
48
|
-
style="clean", # clean, detailed, minimal
|
|
49
|
-
format="svg",
|
|
50
|
-
focus="method", # method, pipeline, architecture
|
|
51
|
-
)
|
|
52
|
-
diagram.save("architecture.svg")
|
|
53
|
-
|
|
54
|
-
# Generate research poster
|
|
55
|
-
poster = agent.generate_poster(
|
|
56
|
-
paper="paper.pdf",
|
|
57
|
-
template="academic", # academic, conference, minimal
|
|
58
|
-
size="A0",
|
|
59
|
-
color_scheme="blue",
|
|
60
|
-
)
|
|
61
|
-
poster.save("poster.pdf")
|
|
62
|
-
|
|
63
|
-
# Generate visual abstract
|
|
64
|
-
abstract = agent.generate_visual_abstract(
|
|
65
|
-
paper="paper.pdf",
|
|
66
|
-
format="png",
|
|
67
|
-
dimensions=(1200, 630), # Twitter/LinkedIn optimal
|
|
68
|
-
)
|
|
69
|
-
abstract.save("visual_abstract.png")
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Diagram Styles
|
|
73
|
-
|
|
74
|
-
```python
|
|
75
|
-
# Architecture diagram
|
|
76
|
-
diagram = agent.generate_diagram(
|
|
77
|
-
paper="paper.pdf",
|
|
78
|
-
style="clean",
|
|
79
|
-
components={
|
|
80
|
-
"show_data_flow": True,
|
|
81
|
-
"show_dimensions": True,
|
|
82
|
-
"show_loss_functions": False,
|
|
83
|
-
"annotation_level": "medium",
|
|
84
|
-
},
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
# Pipeline diagram
|
|
88
|
-
pipeline = agent.generate_diagram(
|
|
89
|
-
paper="paper.pdf",
|
|
90
|
-
focus="pipeline",
|
|
91
|
-
layout="horizontal", # horizontal, vertical, circular
|
|
92
|
-
)
|
|
93
|
-
|
|
94
|
-
# Comparison diagram
|
|
95
|
-
comparison = agent.generate_comparison(
|
|
96
|
-
papers=["paper_a.pdf", "paper_b.pdf"],
|
|
97
|
-
aspects=["architecture", "performance", "complexity"],
|
|
98
|
-
)
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Poster Generation
|
|
102
|
-
|
|
103
|
-
```python
|
|
104
|
-
# Conference poster with full customization
|
|
105
|
-
poster = agent.generate_poster(
|
|
106
|
-
paper="paper.pdf",
|
|
107
|
-
template="neurips",
|
|
108
|
-
sections=[
|
|
109
|
-
"title_block",
|
|
110
|
-
"motivation",
|
|
111
|
-
"method",
|
|
112
|
-
"key_results",
|
|
113
|
-
"conclusions",
|
|
114
|
-
"qr_code",
|
|
115
|
-
],
|
|
116
|
-
style={
|
|
117
|
-
"font_family": "Helvetica",
|
|
118
|
-
"heading_color": "#2563EB",
|
|
119
|
-
"background": "#FFFFFF",
|
|
120
|
-
"columns": 3,
|
|
121
|
-
},
|
|
122
|
-
)
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
## Slide Generation
|
|
126
|
-
|
|
127
|
-
```python
|
|
128
|
-
# Generate presentation slides
|
|
129
|
-
slides = agent.generate_slides(
|
|
130
|
-
paper="paper.pdf",
|
|
131
|
-
format="beamer", # beamer, pptx, reveal_js
|
|
132
|
-
num_slides=15,
|
|
133
|
-
include_speaker_notes=True,
|
|
134
|
-
style="metropolis", # Beamer theme
|
|
135
|
-
)
|
|
136
|
-
slides.save("presentation.tex")
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## Use Cases
|
|
140
|
-
|
|
141
|
-
1. **Conference posters**: Generate posters from papers
|
|
142
|
-
2. **Social media**: Visual abstracts for paper promotion
|
|
143
|
-
3. **Presentations**: Quick slide decks from papers
|
|
144
|
-
4. **Architecture diagrams**: Clean method visualizations
|
|
145
|
-
5. **Teaching**: Visual explanations of research papers
|
|
146
|
-
|
|
147
|
-
## References
|
|
148
|
-
|
|
149
|
-
- [ClawPhD GitHub](https://github.com/ZhihaoAIRobotic/ClawPhD)
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: scientific-graphical-abstract
|
|
3
|
-
description: "Design effective graphical abstracts and scientific figures for papers"
|
|
4
|
-
metadata:
|
|
5
|
-
openclaw:
|
|
6
|
-
emoji: "🎨"
|
|
7
|
-
category: "tools"
|
|
8
|
-
subcategory: "diagram"
|
|
9
|
-
keywords: ["graphical abstract", "scientific illustration", "figure design", "paper figures", "visual abstract", "publication graphics"]
|
|
10
|
-
source: "https://clawhub.ai/scientific-graphical-abstract"
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# Scientific Graphical Abstract and Figure Design
|
|
14
|
-
|
|
15
|
-
## Overview
|
|
16
|
-
|
|
17
|
-
A graphical abstract is a single-panel visual summary of a paper's key finding or methodology. Increasingly required by journals (Cell, Elsevier, ACS, Wiley), a good graphical abstract increases paper visibility, social media engagement, and citation rates. This guide covers design principles, tools, and workflows for creating effective graphical abstracts and publication-quality scientific figures.
|
|
18
|
-
|
|
19
|
-
## Graphical Abstract Design Principles
|
|
20
|
-
|
|
21
|
-
### The 10-Second Rule
|
|
22
|
-
|
|
23
|
-
A graphical abstract must communicate the core message in under 10 seconds:
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
Layout formula:
|
|
27
|
-
[Input/Problem] → [Method/Process] → [Output/Result]
|
|
28
|
-
|
|
29
|
-
Visual flow: left-to-right or top-to-bottom
|
|
30
|
-
Maximum elements: 5-7 distinct visual components
|
|
31
|
-
Text: minimal labels only (no sentences)
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### Composition Templates
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
Template 1: Linear Pipeline
|
|
38
|
-
┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐
|
|
39
|
-
│Input │ → │Step 1│ → │Step 2│ → │Result│
|
|
40
|
-
└──────┘ └──────┘ └──────┘ └──────┘
|
|
41
|
-
|
|
42
|
-
Template 2: Comparison
|
|
43
|
-
┌──────────────┐ ┌──────────────┐
|
|
44
|
-
│ Before/ │ │ After/ │
|
|
45
|
-
│ Baseline │ │ Proposed │
|
|
46
|
-
│ [visual] │ │ [visual] │
|
|
47
|
-
└──────────────┘ └──────────────┘
|
|
48
|
-
|
|
49
|
-
Template 3: Central Method
|
|
50
|
-
┌────────┐
|
|
51
|
-
┌────┐ │ │ ┌────────┐
|
|
52
|
-
│Data├───→│ Method ├───→│Results │
|
|
53
|
-
└────┘ │ │ └────────┘
|
|
54
|
-
└────────┘
|
|
55
|
-
┌────────────────────────────────┐
|
|
56
|
-
│ Key Finding Statement │
|
|
57
|
-
└────────────────────────────────┘
|
|
58
|
-
|
|
59
|
-
Template 4: Multi-panel
|
|
60
|
-
┌─────────────────────────────┐
|
|
61
|
-
│ (a) Problem │ (b) Solution │
|
|
62
|
-
├─────────────┼───────────────┤
|
|
63
|
-
│ (c) Results │ (d) Impact │
|
|
64
|
-
└─────────────┴───────────────┘
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Color and Typography
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
Color rules:
|
|
71
|
-
- Maximum 4-5 colors per figure
|
|
72
|
-
- Use colorblind-friendly palette (avoid red-green only)
|
|
73
|
-
- Suggested palettes:
|
|
74
|
-
* IBM Design: #648FFF, #785EF0, #DC267F, #FE6100, #FFB000
|
|
75
|
-
* Tol Bright: #EE6677, #228833, #4477AA, #CCBB44, #66CCEE
|
|
76
|
-
* Okabe-Ito: #E69F00, #56B4E9, #009E73, #F0E442, #0072B2
|
|
77
|
-
|
|
78
|
-
Typography:
|
|
79
|
-
- Sans-serif for labels (Arial, Helvetica, Calibri)
|
|
80
|
-
- Minimum 8pt font in final printed size
|
|
81
|
-
- Consistent font size hierarchy (title > labels > annotations)
|
|
82
|
-
- Bold for emphasis, not underlining or italics
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## Tools and Software
|
|
86
|
-
|
|
87
|
-
| Tool | Type | Best For | Price |
|
|
88
|
-
|------|------|----------|-------|
|
|
89
|
-
| **BioRender** | Web app | Biological/medical illustrations | $0-39/mo |
|
|
90
|
-
| **Adobe Illustrator** | Desktop | Professional vector graphics | $23/mo |
|
|
91
|
-
| **Inkscape** | Desktop (free) | Vector graphics (Illustrator alternative) | Free |
|
|
92
|
-
| **Figma** | Web app | Collaborative design, templates | Free tier |
|
|
93
|
-
| **PowerPoint/Keynote** | Desktop | Quick diagrams, accessible | Bundled |
|
|
94
|
-
| **draw.io (diagrams.net)** | Web/Desktop | Flowcharts, architecture diagrams | Free |
|
|
95
|
-
| **Matplotlib/Seaborn** | Python | Data-driven figures | Free |
|
|
96
|
-
| **Mermaid** | Text-based | Simple flowcharts in Markdown | Free |
|
|
97
|
-
| **TikZ/PGF** | LaTeX | Publication-quality technical diagrams | Free |
|
|
98
|
-
|
|
99
|
-
## Publication Figure Standards
|
|
100
|
-
|
|
101
|
-
### Journal Requirements
|
|
102
|
-
|
|
103
|
-
| Aspect | Standard |
|
|
104
|
-
|--------|---------|
|
|
105
|
-
| **Resolution** | 300 DPI (print), 150 DPI (screen) |
|
|
106
|
-
| **Format** | TIFF/EPS for print; PDF for vector; PNG for web |
|
|
107
|
-
| **Size** | Single column: 85 mm; Double column: 170 mm; Full page: 170 × 225 mm |
|
|
108
|
-
| **Color mode** | RGB for digital, CMYK for print |
|
|
109
|
-
| **Font** | Arial, Helvetica, or Times; 7-10 pt at final size |
|
|
110
|
-
| **Line width** | Minimum 0.5 pt at final size |
|
|
111
|
-
| **Panel labels** | (a), (b), (c) — bold, top-left corner |
|
|
112
|
-
|
|
113
|
-
### Multi-Panel Figure Construction
|
|
114
|
-
|
|
115
|
-
```python
|
|
116
|
-
import matplotlib.pyplot as plt
|
|
117
|
-
import matplotlib.gridspec as gridspec
|
|
118
|
-
|
|
119
|
-
fig = plt.figure(figsize=(7, 4)) # inches (double column ≈ 7")
|
|
120
|
-
gs = gridspec.GridSpec(1, 3, width_ratios=[1, 1.5, 1],
|
|
121
|
-
wspace=0.3)
|
|
122
|
-
|
|
123
|
-
ax1 = fig.add_subplot(gs[0])
|
|
124
|
-
ax2 = fig.add_subplot(gs[1])
|
|
125
|
-
ax3 = fig.add_subplot(gs[2])
|
|
126
|
-
|
|
127
|
-
# Panel labels
|
|
128
|
-
for ax, label in zip([ax1, ax2, ax3], ['a', 'b', 'c']):
|
|
129
|
-
ax.text(-0.1, 1.05, f'({label})', transform=ax.transAxes,
|
|
130
|
-
fontsize=12, fontweight='bold', va='top')
|
|
131
|
-
|
|
132
|
-
# Your plots here...
|
|
133
|
-
ax1.set_title("Input Data")
|
|
134
|
-
ax2.set_title("Method Overview")
|
|
135
|
-
ax3.set_title("Results")
|
|
136
|
-
|
|
137
|
-
plt.savefig("figure1.pdf", dpi=300, bbox_inches='tight')
|
|
138
|
-
plt.savefig("figure1.tiff", dpi=300, bbox_inches='tight')
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
### Colorblind-Accessible Design
|
|
142
|
-
|
|
143
|
-
```python
|
|
144
|
-
# Okabe-Ito colorblind-safe palette
|
|
145
|
-
COLORS = {
|
|
146
|
-
'orange': '#E69F00',
|
|
147
|
-
'sky_blue': '#56B4E9',
|
|
148
|
-
'green': '#009E73',
|
|
149
|
-
'yellow': '#F0E442',
|
|
150
|
-
'blue': '#0072B2',
|
|
151
|
-
'vermilion':'#D55E00',
|
|
152
|
-
'purple': '#CC79A7',
|
|
153
|
-
'black': '#000000'
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
# Use shapes AND colors to encode categories
|
|
157
|
-
markers = ['o', 's', '^', 'D', 'v'] # circle, square, triangle, diamond, inverted triangle
|
|
158
|
-
|
|
159
|
-
# Test: convert to grayscale to verify distinguishability
|
|
160
|
-
from PIL import Image
|
|
161
|
-
img = Image.open("figure1.png").convert("L")
|
|
162
|
-
img.save("figure1_grayscale.png")
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
## Workflow: From Concept to Final Figure
|
|
166
|
-
|
|
167
|
-
```markdown
|
|
168
|
-
1. Sketch on paper (5 min)
|
|
169
|
-
- Layout, flow direction, key elements
|
|
170
|
-
- Don't start in software without a plan
|
|
171
|
-
|
|
172
|
-
2. Identify visual metaphors
|
|
173
|
-
- Data table → heatmap or bar chart
|
|
174
|
-
- Process → arrows and boxes
|
|
175
|
-
- Comparison → side-by-side panels
|
|
176
|
-
- Network → node-edge graph
|
|
177
|
-
|
|
178
|
-
3. Create in vector software (30-60 min)
|
|
179
|
-
- Build at the final print size (not zoomed in)
|
|
180
|
-
- Use layers: background, main elements, labels, annotations
|
|
181
|
-
- Align elements to grid
|
|
182
|
-
|
|
183
|
-
4. Apply consistent styling
|
|
184
|
-
- Same font throughout all figures in the paper
|
|
185
|
-
- Same color scheme throughout
|
|
186
|
-
- Same line widths, marker sizes, label formats
|
|
187
|
-
|
|
188
|
-
5. Export and verify
|
|
189
|
-
- Export at 300 DPI
|
|
190
|
-
- Check at actual print size (100% zoom)
|
|
191
|
-
- Verify readability of smallest text
|
|
192
|
-
- Verify in grayscale for colorblind accessibility
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
## References
|
|
196
|
-
|
|
197
|
-
- Rougier, N. P., et al. (2014). "Ten Simple Rules for Better Figures." *PLOS Computational Biology*, 10(9), e1003833.
|
|
198
|
-
- Tufte, E. R. (2001). *The Visual Display of Quantitative Information*. Graphics Press.
|
|
199
|
-
- [BioRender Templates](https://biorender.com/)
|
|
200
|
-
- [Inkscape Documentation](https://inkscape.org/doc/)
|
|
201
|
-
- [Colorbrewer 2.0](https://colorbrewer2.org/)
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: md2pdf-xelatex
|
|
3
|
-
description: "Convert Markdown to publication-ready PDF with LaTeX math and CJK support"
|
|
4
|
-
metadata:
|
|
5
|
-
openclaw:
|
|
6
|
-
emoji: "📄"
|
|
7
|
-
category: "tools"
|
|
8
|
-
subcategory: "document"
|
|
9
|
-
keywords: ["markdown to pdf", "xelatex", "document conversion", "CJK support", "math rendering", "pandoc"]
|
|
10
|
-
source: "https://clawhub.ai/huaruoji/md2pdf-xelatex"
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# Markdown to PDF Conversion with XeLaTeX
|
|
14
|
-
|
|
15
|
-
## Overview
|
|
16
|
-
|
|
17
|
-
Converting Markdown documents to publication-quality PDF is a common research workflow need. This guide covers using Pandoc with XeLaTeX as the PDF engine, which provides full Unicode support (including CJK characters), LaTeX math rendering, custom fonts, and professional typography. This is the recommended approach when your document contains mathematical formulas, non-Latin scripts, or requires precise typographic control.
|
|
18
|
-
|
|
19
|
-
## Prerequisites
|
|
20
|
-
|
|
21
|
-
### Installation
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
# macOS
|
|
25
|
-
brew install pandoc
|
|
26
|
-
brew install --cask mactex # or: brew install --cask basictex (smaller)
|
|
27
|
-
|
|
28
|
-
# Ubuntu/Debian
|
|
29
|
-
sudo apt install pandoc texlive-xetex texlive-fonts-recommended texlive-lang-cjk
|
|
30
|
-
|
|
31
|
-
# Windows (via Chocolatey)
|
|
32
|
-
choco install pandoc miktex
|
|
33
|
-
|
|
34
|
-
# Verify installation
|
|
35
|
-
pandoc --version
|
|
36
|
-
xelatex --version
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### CJK Font Setup
|
|
40
|
-
|
|
41
|
-
For Chinese/Japanese/Korean documents, install appropriate fonts:
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
# macOS — system fonts usually sufficient (PingFang, Hiragino)
|
|
45
|
-
# Ubuntu — install Noto CJK
|
|
46
|
-
sudo apt install fonts-noto-cjk fonts-noto-cjk-extra
|
|
47
|
-
|
|
48
|
-
# Verify available CJK fonts
|
|
49
|
-
fc-list :lang=zh family | sort | uniq
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Basic Conversion
|
|
53
|
-
|
|
54
|
-
### Simple Markdown to PDF
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
# Default conversion (pdflatex engine)
|
|
58
|
-
pandoc input.md -o output.pdf
|
|
59
|
-
|
|
60
|
-
# With XeLaTeX engine (required for Unicode/CJK)
|
|
61
|
-
pandoc input.md -o output.pdf --pdf-engine=xelatex
|
|
62
|
-
|
|
63
|
-
# With custom font
|
|
64
|
-
pandoc input.md -o output.pdf --pdf-engine=xelatex \
|
|
65
|
-
-V mainfont="Times New Roman" \
|
|
66
|
-
-V monofont="Fira Code"
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### CJK Document
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
# Chinese document with proper font
|
|
73
|
-
pandoc input.md -o output.pdf --pdf-engine=xelatex \
|
|
74
|
-
-V mainfont="Noto Serif CJK SC" \
|
|
75
|
-
-V CJKmainfont="Noto Serif CJK SC" \
|
|
76
|
-
-V monofont="Noto Sans Mono CJK SC" \
|
|
77
|
-
-V geometry:margin=2.5cm
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### Document with Math
|
|
81
|
-
|
|
82
|
-
Markdown with LaTeX math renders natively:
|
|
83
|
-
|
|
84
|
-
```markdown
|
|
85
|
-
The quadratic formula is:
|
|
86
|
-
|
|
87
|
-
$$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$
|
|
88
|
-
|
|
89
|
-
Inline math works too: $E = mc^2$.
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
pandoc math_doc.md -o output.pdf --pdf-engine=xelatex
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
## Advanced Configuration
|
|
97
|
-
|
|
98
|
-
### YAML Front Matter
|
|
99
|
-
|
|
100
|
-
Add a YAML header to your Markdown for fine-grained control:
|
|
101
|
-
|
|
102
|
-
```yaml
|
|
103
|
-
---
|
|
104
|
-
title: "Research Report Title"
|
|
105
|
-
author: "Author Name"
|
|
106
|
-
date: "2026-03-10"
|
|
107
|
-
documentclass: article
|
|
108
|
-
fontsize: 11pt
|
|
109
|
-
geometry: margin=2.5cm
|
|
110
|
-
mainfont: "Libertinus Serif"
|
|
111
|
-
CJKmainfont: "Noto Serif CJK SC"
|
|
112
|
-
monofont: "Fira Code"
|
|
113
|
-
linestretch: 1.25
|
|
114
|
-
header-includes:
|
|
115
|
-
- \usepackage{amsmath}
|
|
116
|
-
- \usepackage{booktabs}
|
|
117
|
-
- \usepackage{hyperref}
|
|
118
|
-
- \usepackage{fancyhdr}
|
|
119
|
-
- \pagestyle{fancy}
|
|
120
|
-
---
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Custom LaTeX Template
|
|
124
|
-
|
|
125
|
-
For full control, create a custom Pandoc template:
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
# Export default template as starting point
|
|
129
|
-
pandoc -D latex > custom-template.tex
|
|
130
|
-
|
|
131
|
-
# Use custom template
|
|
132
|
-
pandoc input.md -o output.pdf --pdf-engine=xelatex \
|
|
133
|
-
--template=custom-template.tex
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### Table of Contents and Numbering
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
# Add table of contents
|
|
140
|
-
pandoc input.md -o output.pdf --pdf-engine=xelatex --toc
|
|
141
|
-
|
|
142
|
-
# Number sections
|
|
143
|
-
pandoc input.md -o output.pdf --pdf-engine=xelatex --toc -N
|
|
144
|
-
|
|
145
|
-
# TOC depth (default 3)
|
|
146
|
-
pandoc input.md -o output.pdf --pdf-engine=xelatex --toc --toc-depth=2
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Syntax-Highlighted Code Blocks
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
# List available highlight styles
|
|
153
|
-
pandoc --list-highlight-styles
|
|
154
|
-
|
|
155
|
-
# Use a specific style
|
|
156
|
-
pandoc input.md -o output.pdf --pdf-engine=xelatex \
|
|
157
|
-
--highlight-style=tango
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### Bibliography and Citations
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
# With BibTeX bibliography
|
|
164
|
-
pandoc input.md -o output.pdf --pdf-engine=xelatex \
|
|
165
|
-
--citeproc --bibliography=references.bib \
|
|
166
|
-
--csl=ieee.csl
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
In the Markdown file, cite as `[@smith2024]` or `@smith2024`.
|
|
170
|
-
|
|
171
|
-
## Batch Conversion Script
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
#!/bin/bash
|
|
175
|
-
# Convert all .md files in current directory to PDF
|
|
176
|
-
|
|
177
|
-
FONT_MAIN="Libertinus Serif"
|
|
178
|
-
FONT_CJK="Noto Serif CJK SC"
|
|
179
|
-
FONT_MONO="Fira Code"
|
|
180
|
-
|
|
181
|
-
for f in *.md; do
|
|
182
|
-
echo "Converting: $f"
|
|
183
|
-
pandoc "$f" -o "${f%.md}.pdf" \
|
|
184
|
-
--pdf-engine=xelatex \
|
|
185
|
-
-V mainfont="$FONT_MAIN" \
|
|
186
|
-
-V CJKmainfont="$FONT_CJK" \
|
|
187
|
-
-V monofont="$FONT_MONO" \
|
|
188
|
-
-V geometry:margin=2.5cm \
|
|
189
|
-
-V fontsize=11pt \
|
|
190
|
-
--toc -N \
|
|
191
|
-
--highlight-style=tango
|
|
192
|
-
done
|
|
193
|
-
echo "Done. Converted $(ls *.pdf | wc -l) files."
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
## Troubleshooting
|
|
197
|
-
|
|
198
|
-
| Problem | Cause | Solution |
|
|
199
|
-
|---------|-------|---------|
|
|
200
|
-
| CJK characters show as boxes | Missing CJK font | Install `fonts-noto-cjk` and set `CJKmainfont` |
|
|
201
|
-
| `! LaTeX Error: File 'xxx.sty' not found` | Missing LaTeX package | `tlmgr install xxx` or install full texlive |
|
|
202
|
-
| Math formulas not rendering | Using pdflatex engine | Switch to `--pdf-engine=xelatex` |
|
|
203
|
-
| Emoji not displaying | Font missing emoji glyphs | Add `-V mainfont="Noto Color Emoji"` as fallback |
|
|
204
|
-
| PDF too large | Embedded bitmap images | Convert images to vector (SVG→PDF) before inclusion |
|
|
205
|
-
| Line breaks in CJK text | Pandoc treats newlines as spaces | Use `\newline` or blank lines between paragraphs |
|
|
206
|
-
|
|
207
|
-
## References
|
|
208
|
-
|
|
209
|
-
- [Pandoc User's Guide](https://pandoc.org/MANUAL.html)
|
|
210
|
-
- [XeLaTeX on Overleaf](https://www.overleaf.com/learn/latex/XeLaTeX)
|
|
211
|
-
- [Noto CJK Fonts](https://github.com/googlefonts/noto-cjk)
|
|
212
|
-
- [Pandoc Templates](https://pandoc.org/MANUAL.html#templates)
|