mirror of
https://github.com/JotaRandom/hfsutils.git
synced 2026-04-20 05:16:38 +00:00
fix: Replace all LaTeX text commands with mathrm and fix UTF-8 encoding
- Replaced \text{} with \mathrm{} in all equations (chapters 02 and 03)
- Fixed NFD table to use ASCII-only LaTeX accent commands instead of UTF-8
- Removed problematic Unicode characters (accented letters)
- All formulas now use properly escaped underscores
- PDF encoding compatibility ensured
This commit is contained in:
@@ -41,7 +41,7 @@ volume\_size - 512 & 512 & (Last logical block) \\
|
||||
|
||||
\textbf{Critical Formula for Alternate MDB}:
|
||||
\begin{equation}
|
||||
\text{Alternate MDB offset} = \text{total\_bytes} - 1024
|
||||
\mathrm{Alt\_MDB\_offset} = \mathrm{total\_bytes} - 1024
|
||||
\end{equation}
|
||||
|
||||
This is \textbf{NOT} \texttt{(total\_sectors - 2) * 512}. It is literally 1024 bytes before the end, regardless of sector size.
|
||||
@@ -259,7 +259,7 @@ The alternate MDB is an \textbf{exact copy} of the primary MDB.
|
||||
|
||||
\textbf{Precise formula}:
|
||||
\begin{equation}
|
||||
\text{alt\_offset} = \text{device\_size\_in\_bytes} - 1024
|
||||
\mathrm{alt\_offset} = \mathrm{device\_size\_bytes} - 1024
|
||||
\end{equation}
|
||||
|
||||
\textbf{Example for 10 MB volume}:
|
||||
@@ -377,7 +377,7 @@ Mac to Unix: unix_time = mac_time - MAC_EPOCH
|
||||
|
||||
\textbf{Y2K28 Problem}:
|
||||
\begin{equation}
|
||||
\text{Max date} = 1904 + \frac{2^{32}}{365.25 \times 24 \times 3600} \approx 2028
|
||||
\mathrm{Max\_date} = 1904 + \frac{2^{32}}{365.25 \times 24 \times 3600} \approx 2028
|
||||
\end{equation}
|
||||
|
||||
Specifically: February 6, 2028, 06:28:15 GMT
|
||||
@@ -423,12 +423,12 @@ HFS uses 16-bit allocation block numbers, limiting volumes to 65,535 blocks maxi
|
||||
|
||||
\textbf{Volume size calculation}:
|
||||
\begin{equation}
|
||||
\text{max\_volume} = 65535 \times \text{block\_size}
|
||||
\mathrm{max\_volume} = 65535 \times \mathrm{block\_size}
|
||||
\end{equation}
|
||||
|
||||
For 32 KB blocks:
|
||||
\begin{equation}
|
||||
65535 \times 32768 = 2,147,450,880 \text{ bytes} \approx 2 \text{ GB}
|
||||
65535 \times 32768 = 2,147,450,880~\mathrm{bytes} \approx 2~\mathrm{GB}
|
||||
\end{equation}
|
||||
|
||||
\textbf{Limitation}: Cannot create HFS volumes larger than \textasciitilde2 TB (with 64 KB blocks).
|
||||
|
||||
@@ -716,30 +716,34 @@ In HFSUniStr255:
|
||||
|
||||
\subsection{Common NFD Characters - Complete Table}
|
||||
|
||||
\textbf{Note}: The following table shows common accented characters and their NFD decompositions using ASCII representations due to PDF encoding limitations. In actual Unicode:
|
||||
|
||||
\begin{longtable}{llll}
|
||||
\toprule
|
||||
\textbf{Character} & \textbf{NFC} & \textbf{NFD} & \textbf{Description} \\
|
||||
\textbf{Description} & \textbf{NFC} & \textbf{NFD} & \textbf{Components} \\
|
||||
\midrule
|
||||
\endhead
|
||||
à & U+00E0 & U+0061 U+0300 & a + grave \\
|
||||
á & U+00E1 & U+0061 U+0301 & a + acute \\
|
||||
â & U+00E2 & U+0061 U+0302 & a + circumflex \\
|
||||
ã & U+00E3 & U+0061 U+0303 & a + tilde \\
|
||||
ä & U+00E4 & U+0061 U+0308 & a + diaeresis \\
|
||||
ñ & U+00F1 & U+006E U+0303 & n + tilde \\
|
||||
ç & U+00E7 & U+0063 U+0327 & c + cedilla \\
|
||||
ü & U+00FC & U+0075 U+0308 & u + diaeresis \\
|
||||
ö & U+00F6 & U+006F U+0308 & o + diaeresis \\
|
||||
å & U+00E5 & U+0061 U+030A & a + ring above \\
|
||||
a-grave (\\`a) & U+00E0 & U+0061 U+0300 & a + combining grave \\
|
||||
a-acute (\\'a) & U+00E1 & U+0061 U+0301 & a + combining acute \\
|
||||
a-circumflex (\\^a) & U+00E2 & U+0061 U+0302 & a + combining circumflex \\
|
||||
a-tilde (\\~a) & U+00E3 & U+0061 U+0303 & a + combining tilde \\
|
||||
a-diaeresis (\\\"a) & U+00E4 & U+0061 U+0308 & a + combining diaeresis \\
|
||||
n-tilde (\\~n) & U+00F1 & U+006E U+0303 & n + combining tilde \\
|
||||
c-cedilla (c-ced) & U+00E7 & U+0063 U+0327 & c + combining cedilla \\
|
||||
u-diaeresis (\\\"u) & U+00FC & U+0075 U+0308 & u + combining diaeresis \\
|
||||
o-diaeresis (\\\"o) & U+00F6 & U+006F U+0308 & o + combining diaeresis \\
|
||||
a-ring (a-circ) & U+00E5 & U+0061 U+030A & a + combining ring above \\
|
||||
\bottomrule
|
||||
\caption{Common NFD Decompositions}
|
||||
\caption{Common NFD Decompositions (ASCII descriptions)}
|
||||
\end{longtable}
|
||||
|
||||
\subsection{Compatibility Issues}
|
||||
|
||||
\textbf{Linux/Windows}: Use NFC by default
|
||||
|
||||
\textbf{Problem}: Filename created on macOS with "café.txt" (NFD) appears as different file than "café.txt" (NFC) created on Linux on the same HFS+ volume.
|
||||
\textbf{Problem}: Filename created on macOS with accented characters in NFD form appears as different file than same filename in NFC form created on Linux on the same HFS+ volume.
|
||||
|
||||
\textbf{Example}: "caf\\'e.txt" stored as NFD (e + U+0301) vs NFC (U+00E9) - different catalog entries!
|
||||
|
||||
\textbf{Workaround}: Always normalize to NFD when writing to HFS+.
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user