H1: Main Heading Test
This is a test post to showcase all the markdown and special features supported on this site. Let’s explore each capability systematically.
H2: Mathematical Equations with LaTeX
Inline math works great: is Einstein’s famous equation. Here’s the quadratic formula: .
Block equations are even more impressive:
Here’s a more complex example showing the Fourier Transform:
H3: Matrix Notation
Matrices work beautifully with KaTeX:
H4: Summation and Products
Greek letters and operators are fully supported:
H2: Code Highlighting
Let’s test syntax highlighting across multiple languages.
H3: Python Example
def fibonacci(n):
"""Generate Fibonacci sequence up to n terms."""
if n <= 0:
return []
elif n == 1:
return [0]
sequence = [0, 1]
while len(sequence) < n:
sequence.append(sequence[-1] + sequence[-2])
return sequence
# Calculate and print first 10 Fibonacci numbers
result = fibonacci(10)
print(f"First 10 Fibonacci numbers: {result}")
H3: JavaScript Example
// Modern JavaScript with async/await
async function fetchUserData(userId) {
try {
const response = await fetch(`https://api.example.com/users/${userId}`);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
return data;
} catch (error) {
console.error('Failed to fetch user data:', error);
return null;
}
}
// Usage
const user = await fetchUserData(123);
console.log(user);
H3: TypeScript Example
interface User {
id: number;
name: string;
email: string;
role: 'admin' | 'user' | 'guest';
}
class UserManager {
private users: Map<number, User> = new Map();
addUser(user: User): void {
this.users.set(user.id, user);
}
getUser(id: number): User | undefined {
return this.users.get(id);
}
getAllAdmins(): User[] {
return Array.from(this.users.values())
.filter(user => user.role === 'admin');
}
}
H3: Rust Example
use std::collections::HashMap;
fn word_frequency(text: &str) -> HashMap<String, usize> {
let mut freq_map = HashMap::new();
for word in text.split_whitespace() {
let word = word.to_lowercase();
*freq_map.entry(word).or_insert(0) += 1;
}
freq_map
}
fn main() {
let text = "hello world hello rust world";
let frequencies = word_frequency(text);
for (word, count) in frequencies.iter() {
println!("{}: {}", word, count);
}
}
H2: Mermaid Diagrams
Mermaid allows us to create beautiful diagrams from text descriptions.
H3: Flowchart Example
graph TD
A[Start] --> B{Is it working?}
B -->|Yes| C[Great!]
B -->|No| D[Debug]
D --> E[Fix the bug]
E --> B
C --> F[Deploy]
F --> G[End]
H3: Sequence Diagram
sequenceDiagram
participant User
participant Browser
participant Server
participant Database
User->>Browser: Enter URL
Browser->>Server: HTTP Request
Server->>Database: Query data
Database-->>Server: Return results
Server-->>Browser: HTTP Response
Browser-->>User: Display page
H3: Class Diagram
classDiagram
class Animal {
+String name
+int age
+makeSound()
+eat()
}
class Dog {
+String breed
+bark()
+fetch()
}
class Cat {
+String color
+meow()
+purr()
}
Animal <|-- Dog
Animal <|-- Cat
H3: State Diagram
stateDiagram-v2
[*] --> Idle
Idle --> Processing: Start Task
Processing --> Success: Task Completed
Processing --> Failed: Error Occurred
Success --> Idle: Reset
Failed --> Idle: Retry
Failed --> [*]: Give Up
H2: Text Formatting
Let’s verify standard markdown formatting works properly:
- Bold text for emphasis
- Italic text for subtle emphasis
Inline codefor technical termsStrikethroughfor corrections
H3: Lists
Unordered lists:
- First item
- Second item
- Nested item 1
- Nested item 2
- Third item
Ordered lists:
- First step
- Second step
- Sub-step A
- Sub-step B
- Third step
H3: Blockquotes
This is a blockquote. It’s useful for highlighting important passages or quotes from other sources.
Multiple paragraphs in a blockquote work too!
H3: Horizontal Rules
Use horizontal rules to separate sections:
H2: Conclusion
This test post demonstrates that all core features are working correctly:
- ✅ Headings from H1 to H4
- ✅ LaTeX equations (inline and block)
- ✅ Syntax highlighting for multiple languages
- ✅ Mermaid diagrams (flowchart, sequence, class, state)
- ✅ Standard markdown formatting
- ✅ Lists and blockquotes
Everything looks great!
Correspondence
Reader Comments & Discussion
This is a test comment.
Join the Discussion