1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! OLE and MTEF header structures
//!
//! This module defines the binary header structures for MTEF equation data.
//! Based on rtf2latex2e EQN_OLE_FILE_HDR and related structures.
//!
//! MTEF data embedded in OLE documents starts with a 28-byte OLE header,
//! followed by the MTEF header and equation data.
use FromBytes;
/// MTEF OLE file header (28 bytes)
///
/// This header precedes MTEF equation data when embedded in OLE documents.
/// The structure matches the EQN_OLE_FILE_HDR from rtf2latex2e.
///
/// Note: This structure is kept for reference and future zerocopy-based parsing.
/// Current implementation uses manual parsing for better error handling.
// Kept for reference and future zerocopy parsing
/// MTEF header (variable length, minimum 5 bytes)
///
/// The MTEF header starts with a signature and version information.
/// This structure is used for reference but actual parsing is done
/// manually in the parser to handle version differences.
///
/// Note: Kept for reference and documentation. Parser uses manual parsing
/// to handle different MTEF versions (1-5) with varying header layouts.
// Kept for reference and documentation