Skip to content

Paper Editor Guide

Generate publication-ready manuscripts with inline statistics that link back to source data.


Overview

The Paper Editor is a block-based writing environment where every statistic is traceable—click any number to see exactly where it came from.

┌─────────────────────────────────────────────────────────────────┐
│  📄 Paper Editor                                    [Export ▾]  │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  # Results                                                      │
│                                                                 │
│  A total of [1,247 patients]¹ were included in the analysis.   │
│  The mean age was [64.2 ± 12.3 years]² and [58.4%]³ were male. │
│                                                                 │
│  In multivariable analysis, elevated HbA1c was associated      │
│  with increased mortality ([HR 1.42, 95% CI 1.18-1.71]⁴).      │
│                                                                 │
│  ────────────────────────────────────────────────────────────  │
│  ¹ Source: master_dataset.patient_count                        │
│  ² Source: analysis_run_3.demographics.age                     │
│  ³ Source: analysis_run_3.demographics.sex_male_pct            │
│  ⁴ Source: analysis_run_3.cox_results.hba1c                    │
└─────────────────────────────────────────────────────────────────┘

Generating Sections

AI-Generated Sections

MedTWIN can draft entire sections based on your analysis results.

Available sections:

Section What AI Generates
Abstract Structured summary (Background, Methods, Results, Conclusions)
Introduction Literature context, research gap, objectives
Methods Study design, population, statistical methods
Results Narrative with inline statistics, table references
Discussion Interpretation, limitations, conclusions

Generate a Section

  1. Click + Add Section
  2. Select section type (e.g., "Results")
  3. Click Generate with AI
  4. Review and edit the draft

Generation Options

Generation Settings:

  # Style
  journal_style: "JAMA"  # NEJM, Lancet, JAMA, BMJ, custom
  voice: "passive"       # active, passive

  # Content
  include_all_results: true
  highlight_significant: true  # p < 0.05

  # References
  auto_cite: true
  citation_style: "Vancouver"  # Vancouver, APA, Harvard

Block-Based Editing

Block Types

The editor uses blocks, like Notion:

Block Shortcut Use
Paragraph Just type Regular text
Heading # Section headers
Table /table Data tables
Figure /figure Charts, images
Equation /equation LaTeX math
Citation /cite Literature references
Statistic /stat Linked statistics

Keyboard Shortcuts

Action Mac Windows
Bold ⌘B Ctrl+B
Italic ⌘I Ctrl+I
Link ⌘K Ctrl+K
Command palette ⌘/ Ctrl+/
Insert citation ⌘⇧C Ctrl+Shift+C
Insert statistic ⌘⇧S Ctrl+Shift+S

Inline Statistics

Inserting Statistics

Type /stat or press ⌘⇧S to open the statistics picker:

┌─────────────────────────────────────────────────┐
│  Insert Statistic                    [Search]   │
├─────────────────────────────────────────────────┤
│  📊 From: Analysis Run #3                       │
│                                                 │
│  Demographics                                   │
│    ├── n = 1,247                               │
│    ├── age: 64.2 ± 12.3                        │
│    ├── male: 58.4%                             │
│    └── ...                                      │
│                                                 │
│  Cox Regression                                 │
│    ├── hba1c: HR 1.42 (1.18-1.71), p<0.001    │
│    ├── age: HR 1.04 (1.02-1.06), p<0.001      │
│    └── ...                                      │
│                                                 │
│  [Insert Selected]                              │
└─────────────────────────────────────────────────┘

Statistic Properties

Each inserted statistic has:

  • Display format: How it appears in text
  • Source reference: Which analysis/variable
  • Lock status: Whether it updates with new analyses

Formatting Options

Click a statistic to customize:

HR 1.42 (95% CI: 1.18-1.71)
├── Format: [HR with CI]  ▾
│           HR only
│           HR with CI
│           HR with CI and p-value
│           Full (HR, CI, p, n)
├── Decimals: [2] ▾
└── Lock to run: [Run #3] ▾
                 Latest run
                 Run #3
                 Run #2

Tables

Auto-Generated Tables

Tables are generated from your analysis:

Table 1: Baseline Characteristics

Overall (N=1,247) Survived (N=935) Died (N=312) P-value
Age, years 64.2 ± 12.3 62.1 ± 11.8 70.5 ± 11.2 <0.001
Male, n (%) 728 (58.4) 534 (57.1) 194 (62.2) 0.12
HbA1c, % 7.8 ± 1.4 7.5 ± 1.2 8.6 ± 1.5 <0.001

Editing Tables

  • Add/remove columns: Right-click header
  • Sort rows: Click column header
  • Format cells: Select cells → format menu
  • Add footnotes: Click cell → Add note

Table Traceability

Every cell links to its source:

Cell: "64.2 ± 12.3"
├── Variable: age
├── Statistic: mean ± SD
├── Source: analysis_run_3.demographics
├── N: 1,247
└── [View computation details]

Figures

Insert Figures

Type /figure to insert:

  1. From Analysis: Charts generated by your analysis
  2. Upload Image: Your own figures
  3. Create Chart: Build a new visualization

Figure Types from Analysis

Type When Generated
Kaplan-Meier curves Survival analysis
Forest plots Regression results
ROC curves Classification models
Box plots Descriptive statistics
Bar charts Categorical comparisons

Figure Options

┌────────────────────────────────────────────┐
│  Figure Settings                           │
├────────────────────────────────────────────┤
│  Title: Kaplan-Meier Survival Curves       │
│  Caption: [Auto-generated] ✓               │
│  Size: [Column width] ▾                    │
│  Resolution: [300 DPI] ▾                   │
│  Format: [PNG] ▾                           │
│                                            │
│  Include in:                               │
│    ☑ Main text                             │
│    ☐ Supplementary                         │
│                                            │
│  [Update from Latest Analysis]             │
└────────────────────────────────────────────┘

Citations

Add Citations

Type /cite or ⌘⇧C:

┌─────────────────────────────────────────────────┐
│  Insert Citation                     [Search]   │
├─────────────────────────────────────────────────┤
│  📚 Your Library (23 papers)                    │
│                                                 │
│  Recently Added                                 │
│    ├── Smith et al. (2023) - Diabetes outcomes  │
│    ├── Jones et al. (2022) - HbA1c mortality    │
│    └── ...                                      │
│                                                 │
│  🔍 Search PubMed                               │
│  [                                    ] [Search]│
│                                                 │
│  [Insert Selected]                              │
└─────────────────────────────────────────────────┘

Citation Styles

MedTWIN auto-formats citations:

Style Example
Vancouver Smith et al.¹
APA (Smith et al., 2023)
Harvard (Smith et al. 2023)
Numbered [1]

Smart Citations

AI suggests relevant citations as you write:

You typed: "Previous studies have shown that HbA1c is associated..."

💡 Suggested citations:
   • Stratton IM et al. BMJ 2000 - HbA1c and complications
   • Nathan DM et al. NEJM 2005 - Intensive glucose control
   [Insert] [Dismiss]

Collaboration

Comments

Add comments to any block:

  1. Select text or block
  2. Click comment icon (or ⌘⇧M)
  3. Type your comment
  4. Mention collaborators with @

Track Changes

Enable track changes to see edits:

The mean age was [64.2]{+65.1+} ± 12.3 years
                  ↑ deleted  ↑ inserted

By: Dr. Smith | Jan 15, 2024
[Accept] [Reject]

Version History

Access previous versions:

  1. Click History in toolbar
  2. See all saved versions
  3. Preview any version
  4. Restore if needed

Export

Export Formats

Format Best For
Word (.docx) Journal submission, editing
PDF Sharing, final review
LaTeX Journals requiring LaTeX
Markdown Version control, GitHub
HTML Web publishing

Journal Templates

Export with journal-specific formatting:

  • JAMA
  • NEJM
  • Lancet
  • BMJ
  • PLOS ONE
  • Nature Medicine
  • Custom template

Export Options

Export Settings:

  format: "docx"
  template: "JAMA"

  include:
    title_page: true
    abstract: true
    main_text: true
    references: true
    tables: true          # inline or end
    figures: true         # inline or end
    supplementary: true

  figures:
    resolution: 300       # DPI
    format: "TIFF"        # PNG, TIFF, EPS

  track_changes: false    # include tracked changes

  traceability:
    include_source_notes: false  # for internal review

Best Practices

Writing

  • ✅ Let AI generate first draft, then edit
  • ✅ Use inline statistics instead of typing numbers
  • ✅ Add citations as you write, not after
  • ✅ Use comments for collaboration

Statistics

  • ✅ Lock statistics to specific analysis runs for submission
  • ✅ Check that all statistics have valid sources
  • ✅ Use consistent decimal places throughout

Before Submission

  • ✅ Run Consistency Check to verify all stats match
  • ✅ Export with journal template
  • ✅ Download traceability report for your records
  • ✅ Archive the analysis bundle

Troubleshooting

"Statistic not found"

The linked analysis may have been deleted. Options:

  1. Re-run the analysis
  2. Link to a different run
  3. Convert to plain text (loses traceability)

"Table won't format"

Tables must follow structure rules:

  1. First row = headers
  2. Consistent column count
  3. No merged cells (export handles merging)

"Export failed"

Check:

  1. All figures have valid sources
  2. No broken citation links
  3. File isn't too large (>50MB)

Next Steps