· 3 min read · 2 comments
Productivity

Test Post: All Features Showcase

A comprehensive test post demonstrating all supported features including headings, LaTeX equations, syntax highlighting, and Mermaid diagrams.

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: E=mc2E = mc^2 is Einstein’s famous equation. Here’s the quadratic formula: x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.

Block equations are even more impressive:

ex2dx=π\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}

Here’s a more complex example showing the Fourier Transform:

F(ω)=f(t)eiωtdtF(\omega) = \int_{-\infty}^{\infty} f(t) e^{-i\omega t} dt

H3: Matrix Notation

Matrices work beautifully with KaTeX:

[abcd][xy]=[ax+bycx+dy]\begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} ax + by \\ cx + dy \end{bmatrix}

H4: Summation and Products

Greek letters and operators are fully supported:

n=11n2=π26\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6} i=1ni=n!\prod_{i=1}^{n} i = n!

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:

H3: Lists

Unordered lists:

Ordered lists:

  1. First step
  2. Second step
    1. Sub-step A
    2. Sub-step B
  3. 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: Footnotes

This blog now supports footnotes1 using GitHub Flavored Markdown syntax. You can add references anywhere in your text2 and the footnotes will automatically appear at the bottom with proper formatting.

Multiple references to the same footnote work too2.

H3: Horizontal Rules

Use horizontal rules to separate sections:


H2: Conclusion

This test post demonstrates that all core features are working correctly:

Everything looks great!

Footnotes

  1. Footnotes are perfect for citations, additional context, or tangential thoughts that would interrupt the main narrative flow.

  2. This is an important note that demonstrates how you can reference the same footnote multiple times throughout your article. 2

Prefer my writing delivered to your inbox? Subscribe here.

Correspondence

Reader Comments & Discussion

Ashwin ·

This is a test comment.

Ashwin ·

Second test comment.

Join the Discussion

Kept private
Live Preview Markdown & LaTeX

Start typing to see how your comment will render.

Comments are moderated and will appear after review.

© 2025 Ashwin Narayan. All rights reserved.