reference_ru = """
<table style="
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 20px 0;
">
    <thead>
        <tr>
            <th style="
                text-align: left;
                padding: 12px 15px;
                background: #f8f9fa;
                color: #333;
                font-weight: 600;
                border: 1px solid #ddd;
            ">Параметр</th>
            <th style="
                text-align: left;
                padding: 12px 15px;
                background: #f8f9fa;
                color: #333;
                font-weight: 600;
                border: 1px solid #ddd;
            ">Описание</th>
            <th style="
                text-align: left;
                padding: 12px 15px;
                background: #f8f9fa;
                color: #333;
                font-weight: 600;
                border: 1px solid #ddd;
            ">Единицы измерения</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">D</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Эквивалентный диаметр (диаметр круга с той же площадью)</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">пиксели, мкм или нм</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">Dₘₐₓ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Максимальный диаметр Ферета</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">пиксели, мкм или нм</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">Dₘᵢₙ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Минимальный диаметр Ферета</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">пиксели, мкм или нм</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">Dₘₑₐₙ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Средний диаметр Ферета</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">пиксели, мкм или нм</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">θₘₐₓ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Угол при максимальном диаметре</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">градусы (°)</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">θₘᵢₙ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Угол при минимальном диаметре</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">градусы (°)</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">S</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Площадь частицы</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">пиксели², мкм² или нм²</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">P</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Периметр частицы</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">пиксели, мкм или нм</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">e</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Эксцентриситет (мера вытянутости)</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">безразмерная величина</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">I</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Интенсивность (значения в градациях серого)</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">условные единицы</td>
        </tr>
    </tbody>
</table>
"""

reference_en = """
<table style="
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 20px 0;
">
    <thead>
        <tr>
            <th style="
                text-align: left;
                padding: 12px 15px;
                background: #f8f9fa;
                color: #333;
                font-weight: 600;
                border: 1px solid #ddd;
            ">Parameter</th>
            <th style="
                text-align: left;
                padding: 12px 15px;
                background: #f8f9fa;
                color: #333;
                font-weight: 600;
                border: 1px solid #ddd;
            ">Description</th>
            <th style="
                text-align: left;
                padding: 12px 15px;
                background: #f8f9fa;
                color: #333;
                font-weight: 600;
                border: 1px solid #ddd;
            ">Units</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">D</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Equivalent diameter (diameter of circle with same area)</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">pixels, µm or nm</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">Dₘₐₓ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Maximum Feret diameter</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">pixels, µm or nm</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">Dₘᵢₙ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Minimum Feret diameter</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">pixels, µm or nm</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">Dₘₑₐₙ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Mean Feret diameter</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">pixels, µm or nm</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">θₘₐₓ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Angle at maximum diameter</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">degrees (°)</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">θₘᵢₙ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Angle at minimum diameter</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">degrees (°)</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">S</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Particle area</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">pixels², µm² or nm²</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">P</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Particle perimeter</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">pixels, µm or nm</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">e</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Eccentricity (elongation measure)</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">dimensionless</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">I</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">Intensity (grayscale values)</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">arbitrary units</td>
        </tr>
    </tbody>
</table>
"""

reference_zh_tw = """
<table style="
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 20px 0;
">
    <thead>
        <tr>
            <th style="
                text-align: left;
                padding: 12px 15px;
                background: #f8f9fa;
                color: #333;
                font-weight: 600;
                border: 1px solid #ddd;
            ">參數</th>
            <th style="
                text-align: left;
                padding: 12px 15px;
                background: #f8f9fa;
                color: #333;
                font-weight: 600;
                border: 1px solid #ddd;
            ">描述</th>
            <th style="
                text-align: left;
                padding: 12px 15px;
                background: #f8f9fa;
                color: #333;
                font-weight: 600;
                border: 1px solid #ddd;
            ">單位</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">D</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">等效直徑（相同面積的圓直徑）</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">像素、微米或納米</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">Dₘₐₓ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">最大費雷特直徑</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">像素、微米或納米</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">Dₘᵢₙ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">最小費雷特直徑</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">像素、微米或納米</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">Dₘₑₐₙ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">平均費雷特直徑</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">像素、微米或納米</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">θₘₐₓ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">最大直徑角度</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">度數 (°)</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">θₘᵢₙ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">最小直徑角度</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">度數 (°)</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">S</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">粒子面積</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">像素²、微米²或納米²</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">P</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">粒子周長</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">像素、微米或納米</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">e</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">離心率（伸長度量）</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">無單位</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">I</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">強度（灰階值）</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">任意單位</td>
        </tr>
    </tbody>
</table>
"""

reference_zh_cn = """
<table style="
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 20px 0;
">
    <thead>
        <tr>
            <th style="
                text-align: left;
                padding: 12px 15px;
                background: #f8f9fa;
                color: #333;
                font-weight: 600;
                border: 1px solid #ddd;
            ">参数</th>
            <th style="
                text-align: left;
                padding: 12px 15px;
                background: #f8f9fa;
                color: #333;
                font-weight: 600;
                border: 1px solid #ddd;
            ">描述</th>
            <th style="
                text-align: left;
                padding: 12px 15px;
                background: #f8f9fa;
                color: #333;
                font-weight: 600;
                border: 1px solid #ddd;
            ">单位</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">D</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">等效直径（相同面积的圆直径）</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">像素、微米或纳米</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">Dₘₐₓ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">最大费雷特直径</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">像素、微米或纳米</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">Dₘᵢₙ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">最小费雷特直径</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">像素、微米或纳米</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">Dₘₑₐₙ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">平均费雷特直径</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">像素、微米或纳米</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">θₘₐₓ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">最大直径角度</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">度数 (°)</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">θₘᵢₙ</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">最小直径角度</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">度数 (°)</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">S</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">粒子面积</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">像素²、微米²或纳米²</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">P</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">粒子周长</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">像素、微米或纳米</td>
        </tr>
        <tr>
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">e</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">离心率（伸长度量）</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">无单位</td>
        </tr>
        <tr style="background: #f8f9fa;">
            <td style="
                padding: 12px 15px;
                border: 1px solid #ddd;
                font-weight: 600;
                color: #333;
            ">I</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd;">强度（灰度值）</td>
            <td style="padding: 12px 15px; border: 1px solid #ddd; color: #666;">任意单位</td>
        </tr>
    </tbody>
</table>
"""
