Pandoc Syntax Highlighting
A Guide to Creating Memorable Presentations
September 22, 2025
Samantha Monty
Chair for Human-Computer Interaction, University of Würzburg

Custom Highlight Syntax Definition

For examlple: 6502 assembler

Main:
  sei
  clc
  xce

  rep #$10        ;16 bit xy
  sep #$20        ; 8 bit a

  .dw $1C02,$1C02,$1C02,$1C02

lda sincos.l + $80,X

Only works if

  • The name of the syntax in the XML file

    1. is used as the key in extra-highlight-syntax
    2. and as the language identifier on the code block
  • The name in asm6502.xml

    <language name="Asm6502" ... >

source code

## For examlple: 6502 assembler {.left .accent2}

``asm6502
Main:
  sei
  clc
  xce

  rep #$10        ;16 bit xy
  sep #$20        ; 8 bit a

  .dw $1C02,$1C02,$1C02,$1C02

lda sincos.l + $80,X

## Only works if {.right .accent3 }

-   The name of the syntax in the XML file

    1.  is used as the key in `extra-highlight-syntax`
    2.  and as the language identifier on the code block

-   The name in `asm6502.xml`

    <language name="Asm6502" ... >