 <head>
 {% load static %}
 <script type="text/javascript" id="MathJax-script" async
         src="{% static 'MaRDMO/js/mathjax/es5/tex-mml-chtml.js' %}">
 </script>
 <style>
         table {
           margin-left: 0;
           margin-right: auto;
           margin-bottom: 24px;
           border-spacing: 0;
           border-bottom: 2px solid black;
           border-top: 2px solid black;
         }
         table th {
           padding: 3px 10px;
           background-color: white;
           border-top: none;
           border-left: 1px solid black;
           border-right: 1px solid black;
           border-bottom: 1px solid black;
           text-align: center;
         }
         table td {
           padding: 3px 10px;
           border-top: 1px solid black;
           border-left: 1px solid black;
           border-bottom: 1px solid black;
           border-right: 1px solid black;
           text-align: center;
         }
</style>
</style>
</head>
<body>
<h1 id="title"> {{ title }} </h1>

<h1 id="MathematicalModel"> Mathematical Models </h1>
{% for values in answers.model.values %}
    {% if values.Name %}
        <h2 id="MM{{ forloop.counter }}"> MM{{ forloop.counter }}: {{ values.Name }} </h2>
    {% else %}
        <h2 id="MM{{ forloop.counter }}"> MM{{ forloop.counter }}: <strong style="color:red;">MISSING MODEL NAME</strong> </h2>
    {% endif %}
    <p>
        <b>Short Description</b>:
        {% if values.Description %}
            {% if values.Description|length > 250 %}
                <strong style="color:red;">SHORT DESCRIPTION TOO LONG</strong> <br>
            {% else %}
                {{ values.Description }} <br>
            {% endif %}
        {% else %}
             <strong style="color:red;">MISSING MODEL SHORT DESCRIPTION</strong> <br>
        {% endif %}
        {% if values.descriptionLong %}
            <b>Detailed Description</b>:
            <ol style="margin-left: 1.5em;">
                {% for description in values.descriptionLong.values %}
                    <li style="margin-bottom: 0.5em;">{{ description }}</li>
                {% endfor %}
            </ol>
        {% endif %}
        {% if 'not found' in values.ID %} 
            <b>ID</b>: - 
        {% elif 'mardi' in values.ID %} 
            <b>MaRDI Portal ID</b>: {{ values.ID|cut:"mardi:"}} 
        {% elif 'wikidata' in values.ID %} 
            <b>Wikidata ID</b>: {{ values.ID|cut:"wikidata:"}}
        {% endif %} 
    <br>
    </p>
    <b>Properties</b>:
    {% for value in values.Properties.values %} 
        {% if value == option.is_deterministic %} 
            {% if option.is_stochastic in values.Properties.values %}
                <strong style="color:red;">Is Deterministic</strong>
            {% else %}
                Is Deterministic
            {% endif %} 
	    {% elif value == option.is_stochastic %} 
            {% if option.is_deterministic in values.Properties.values %}
                <strong style="color:red;">Is Stochastic</strong>
            {% else %}
                Is Stochastic 
            {% endif %}
        {% elif value == option.is_dimensionless %}
            {% if option.is_dimensional in values.Properties.values %}
                <strong style="color:red;">Is Dimensionless</strong>
            {% else %}
                Is Dimensionless
            {% endif %}   
	    {% elif value == option.is_dimensional %} 
            {% if option.is_dimensionless in values.Properties.values %}
                <strong style="color:red;">Is Dimensional</strong>
            {% else %}
                Is Dimensional
            {% endif %} 
	    {% elif value == option.is_dynamic %} 
            {% if option.is_static in values.Properties.values %}
                <strong style="color:red;">Is Dynamic</strong>
            {% else %}
                Is Dynamic
            {% endif %}  
	    {% elif value == option.is_static %} 
            {% if option.is_dynamic in values.Properties.values %}
                <strong style="color:red;">Is Static</strong>
            {% else %}
                Is Static
            {% endif %} 
	    {% elif value == option.is_linear %} 
            {% if option.is_not_linear in values.Properties.values %}
                <strong style="color:red;">Is Linear</strong>
            {% else %}
                Is Linear
            {% endif %} 
	    {% elif value == option.is_not_linear %} 
            {% if option.is_linear in values.Properties.values %}
                <strong style="color:red;">Is Not Linear</strong>
            {% else %}
                Is Not Linear
            {% endif %}
	    {% elif value == option.is_space_continuous %}
            {% if option.is_space_discrete in values.Properties.values %}
                <strong style="color:red;">Is Space-Continuous</strong>
            {% else %}
                Is Space-Continuous
            {% endif %} 
	    {% elif value == option.is_space_discrete %}
            {% if option.is_space_continuous in values.Properties.values %}
                <strong style="color:red;">Is Space-Discrete</strong>
            {% else %}
                Is Space-Discrete
            {% endif %}  
	    {% elif value == option.is_time_continuous %}
            {% if option.is_time_discrete in values.Properties.values %}
                <strong style="color:red;">Is Time-Continuous</strong>
            {% else %}
                Is Time-Continuous
            {% endif %}  
	    {% elif value == option.is_time_discrete %} 
            {% if option.is_time_continuous in values.Properties.values %}
                <strong style="color:red;">Is Time-Discrete</strong>
            {% else %}
                Is Time-Discrete
            {% endif %} 
	    {% endif %} 
	    {% if not forloop.last %}
	        , 
	    {% endif %} 
    {% empty %}
        <strong style="color:red;">MISSING MODEL PROPERTIES</strong>
    {% endfor %}

    <h3 id="RelationsToResearchProblems"> Relations to Research Problems </h3>
    {% for models in values.RelationRP.values %}
        models: {{ models }} <br>
    {% empty %}
        <strong style="color:red;">MISSING RESEARCH PROBLEM</strong>
    {% endfor %}

    <h3 id="RelationsToMathematicalFormulations"> Relations to Mathematical Expressions </h3>
    {% for key, relation in values.RelationMF.items %}
        {% if relation.0 == option.assumes %} 
	        assumes: {{relation.1 }} {% if values.formulation_number %} {% if relation.2 %} - order number: {{ relation.2 }} {% else %} - order number: <strong style="color:red;">MISSING ORDER NUMBER</strong><br> {% endif %} {% endif %} <br>
        {% elif relation.0 == option.contains_formulation %}
            contains: {{relation.1 }} {% if values.formulation_number %} {% if relation.2 %} - order number: {{ relation.2 }} {% else %} - order number: <strong style="color:red;">MISSING ORDER NUMBER</strong><br> {% endif %} {% endif %} <br>
        {% elif relation.0 == option.contains_boundary_condition %}
            contains Boundary Condition: {{relation.1 }} {% if values.formulation_number %} {% if relation.2 %} - order number: {{ relation.2 }} {% else %} - order number: <strong style="color:red;">MISSING ORDER NUMBER</strong><br> {% endif %} {% endif %} <br>
        {% elif relation.0 == option.contains_constraint_condition %}
            contains Constraint Condition: {{relation.1 }} {% if values.formulation_number %} {% if relation.2 %} - order number: {{ relation.2 }} {% else %} - order number: <strong style="color:red;">MISSING ORDER NUMBER</strong><br> {% endif %} {% endif %} <br>
        {% elif relation.0 == option.contains_coupling_condition %}
            contains Coupling Condition: {{relation.1 }} {% if values.formulation_number %} {% if relation.2 %} - order number: {{ relation.2 }} {% else %} - order number: <strong style="color:red;">MISSING ORDER NUMBER</strong><br> {% endif %} {% endif %} <br>
        {% elif relation.0 == option.contains_initial_condition %}
            contains Initial Condition: {{relation.1 }} {% if values.formulation_number %} {% if relation.2 %} - order number: {{ relation.2 }} {% else %} - order number: <strong style="color:red;">MISSING ORDER NUMBER</strong><br> {% endif %} {% endif %} <br>
        {% elif relation.0 == option.contains_final_condition %}
            contains Final Condition: {{relation.1 }} {% if values.formulation_number %} {% if relation.2 %} - order number: {{ relation.2 }} {% else %} - order number: <strong style="color:red;">MISSING ORDER NUMBER</strong><br> {% endif %} {% endif %} <br>
        {% elif relation.0 == 'MISSING RELATION TYPE' %}
            <strong style="color:red;">{{ relation.0 }}</strong>: {{ relation.1 }} <br>
        {% endif %}
    {% empty %}
        <strong style="color:red;">MISSING MATHEMATICAL EXPRESSION</strong>
    {% endfor %}

    <h3 id="RelationsToTasks"> Relations to Computational Tasks </h3>
    {% for task in values.RelationT.values %}
        used by: {{ task }} <br>
    {% empty %}
        <strong style="color:red;">MISSING COMPUTATIONAL TASK</strong>
    {% endfor %}

    {% for key, relation in values.RelationMM.items %}
    	{% if forloop.first %}
            <h3 id="RelationsToMathematicalModels"> Relations to Mathematical Models </h3>
        {% endif %}
        {% if relation.0 == option.specialized_by %} 
	        specialized by: {{relation.1 }} {% if values.assumptionMapped %} {% for key2, vals in values.assumptionMapped.items %} {% if key == key2 %} - assumptions (general to special): {% for val in vals.values %} {{ val }} {% if not forloop.last %}, {% endif %} {% endfor %} {% endif %} {% endfor %} {% else %} - assumptions (general to special): <strong style="color:red;">MISSING ASSUMPTIONS</strong> {% endif %} <br>
        {% elif relation.0 == option.specializes %} 
	        specializes: {{relation.1 }} {% if values.assumptionMapped %} {% for key2, vals in values.assumptionMapped.items %} {% if key == key2 %} - assumptions (general to special): {% for val in vals.values %} {{ val }} {% if not forloop.last %}, {% endif %} {% endfor %} {% endif %} {% endfor %} {% else %} - assumptions (general to special): <strong style="color:red;">MISSING ASSUMPTIONS</strong> {% endif %}<br>
        {% elif relation.0 == option.discretized_by %} 
	        discretized by: {{relation.1 }} <br>
        {% elif relation.0 == option.discretizes %} 
	        discretizes: {{relation.1 }} <br>
        {% elif relation.0 == option.contained_in_model %} 
	        contained in: {{relation.1 }} <br>
        {% elif relation.0 == option.contains_model %} 
	        contains: {{relation.1 }} <br>
        {% elif relation.0 == option.approximated_by %} 
	        approximated by: {{relation.1 }} <br>
        {% elif relation.0 == option.approximates %} 
	        approximates: {{relation.1 }} <br>
        {% elif relation.0 == option.linearized_by %} 
	        linearized by: {{relation.1 }} <br>
        {% elif relation.0 == option.linearizes %} 
	        linearizes: {{relation.1 }} <br>
        {% elif relation.0 == option.similar_to %} 
	        similar to: {{relation.1 }} <br>
        {% elif relation.0 == 'MISSING RELATION TYPE' %}
            <strong style="color:red;">{{ relation.0 }}</strong>: {{ relation.1 }} <br>
        {% endif %}
    {% endfor %}
{% empty %}
    <strong style="color:red;">MISSING MATHEMATICAL MODEL</strong>
{% endfor %}

<h1 id="Task"> Computational Tasks </h1> 
{% for values in answers.task.values %}

    {% if values.Name %}
        <h2 id="T{{ forloop.counter }}"> T{{ forloop.counter }}: {{ values.Name }} </h2>
    {% else %}
        <h2 id="T{{ forloop.counter }}"> T{{ forloop.counter }}: <strong style="color:red;">MISSING COMPUTATIONAL TASK NAME</strong> </h2>
    {% endif %}

    <p>
        <b>Short Description</b>:
        {% if values.Description %}
            {% if values.Description|length > 250 %}
                <strong style="color:red;">SHORT DESCRIPTION TOO LONG</strong> <br>
            {% else %}
                {{ values.Description }} <br>
            {% endif %}
        {% else %}
             <strong style="color:red;">MISSING MODEL SHORT DESCRIPTION</strong> <br>
        {% endif %}
        {% if values.descriptionLong %}
            <b>Detailed Description</b>:
            <ol style="margin-left: 1.5em;">
                {% for description in values.descriptionLong.values %}
                    <li style="margin-bottom: 0.5em;">{{ description }}</li>
                {% endfor %}
            </ol>
        {% endif %}
        {% if 'not found' in values.ID %} 
            <b>ID</b>: - 
        {% elif 'mardi' in values.ID %} 
            <b>MaRDI Portal ID</b>: {{ values.ID|cut:"mardi:"}} 
        {% elif 'wikidata' in values.ID %} 
            <b>Wikidata ID</b>: {{ values.ID|cut:"wikidata:"}}
        {% endif %} 
        <br>
    </p>

    <b>Properties</b>:
    {% for value in values.Properties.values %} 
        {% if value == option.is_linear %} 
            {% if option.is_not_linear in values.Properties.values %}
                <strong style="color:red;">Is Linear</strong>
            {% else %}
                Is Linear
            {% endif %} 
        {% elif value == option.is_not_linear %} 
            {% if option.is_linear in values.Properties.values %}
                <strong style="color:red;">Is Not Linear</strong>
            {% else %}
                Is Not Linear
            {% endif %}
            {% elif value == option.is_space_continuous %}
            {% if option.is_space_discrete in values.Properties.values %}
                <strong style="color:red;">Is Space-Continuous</strong>
            {% else %}
                Is Space-Continuous
            {% endif %} 
	    {% elif value == option.is_space_discrete %}
            {% if option.is_space_continuous in values.Properties.values %}
                <strong style="color:red;">Is Space-Discrete</strong>
            {% else %}
                Is Space-Discrete
            {% endif %}  
	    {% elif value == option.is_time_continuous %}
            {% if option.is_time_discrete in values.Properties.values %}
                <strong style="color:red;">Is Time-Continuous</strong>
            {% else %}
                Is Time-Continuous
            {% endif %}  
	    {% elif value == option.is_time_discrete %} 
            {% if option.is_time_continuous in values.Properties.values %}
                <strong style="color:red;">Is Time-Discrete</strong>
            {% else %}
                Is Time-Discrete
            {% endif %} 
	    {% endif %}
        {% if not forloop.last %}
            , 
        {% endif %}
    {% empty %}
        <strong style="color:red;">MISSING COMPUTATIONAL TASK PROPERTIES</strong>
    {% endfor %}

    <h3 id="RelationsToMathematicalFormulations"> Relations to Mathematical Expressions </h3>
    {% for relation in values.RelationMF.values %}
        {% if relation.0 == option.assumes %} 
            assumes: {{relation.1 }} <br>
        {% elif relation.0 == option.contains_formulation %}
            contains: {{relation.1 }} <br>
        {% elif relation.0 == option.contains_boundary_condition %}
            contains Boundary Condition: {{relation.1 }} <br>
        {% elif relation.0 == option.contains_constraint_condition %}
            contains Constraint Condition: {{relation.1 }} <br>
        {% elif relation.0 == option.contains_coupling_condition %}
            contains Coupling Condition: {{relation.1 }} <br>
        {% elif relation.0 == option.contains_initial_condition %}
            contains Initial Condition: {{relation.1 }} <br>
        {% elif relation.0 == option.contains_final_condition %}
            contains Final Condition: {{relation.1 }} <br>
        {% elif relation.0 == 'MISSING RELATION TYPE' %}
            <strong style="color:red;">{{ relation.0 }}</strong>: {{ relation.1 }} <br>
        {% endif %}
    {% empty %}
        <strong style="color:red;">MISSING MATHEMATICAL EXPRESSION</strong>
    {% endfor %}

    <h3 id="RelationsToQuantities"> Relations to Quantities / Quantity Kinds </h3>
    {% for value in values.RelationQQK.values %}
        {% if value.0 == option.contains_input %} 
            contains Input: {{ value.1 }} <br>
        {% elif value.0 == option.contains_output %} 
            contains Output: {{ value.1 }} <br>
        {% elif value.0 == option.contains_objective %} 
            contains Objective: {{ value.1 }} <br>
        {% elif value.0 == option.contains_parameter %} 
            contains Parameter: {{ value.1 }} <br>
        {% elif value.0 == option.contains_constant %}
            contains Constant: {{ value.1 }} <br>
        {% elif value.0 == 'MISSING RELATION TYPE' %}
            <strong style="color:red;">{{ value.0 }}</strong>: {{ value.1 }} <br>
        {% endif %}
    {% empty %}
        <strong style="color:red;">MISSING QUANTITY / QUANTITY KIND</strong>
    {% endfor %}

    {% for key, relation in values.RelationT.items %}
        {% if forloop.counter == 1 %}
            <h3 id="RelationsToTasks"> Relations to Computational Tasks </h3>
        {% endif %}
        {% if relation.0 == option.specialized_by %} 
            specialized by: {{ relation.1 }} {% if values.assumptionMapped %} {% for key2, vals in values.assumptionMapped.items %} {% if key == key2 %} - assumptions (general to special): {% for val in vals.values %} {{ val }} {% if not forloop.last %}, {% endif %} {% endfor %} {% endif %} {% endfor %} {% else %} - assumptions (general to special): <strong style="color:red;">MISSING ASSUMPTIONS</strong> {% endif %} <br>
        {% elif relation.0 == option.specializes %} 
            specializes: {{ relation.1 }} {% if values.assumptionMapped %} {% for key2, vals in values.assumptionMapped.items %} {% if key == key2 %} - assumptions (general to special): {% for val in vals.values %} {{ val }} {% if not forloop.last %}, {% endif %} {% endfor %} {% endif %} {% endfor %} {% else %} - assumptions (general to special): <strong style="color:red;">MISSING ASSUMPTIONS</strong> {% endif %}<br>
        {% elif relation.0 == option.discretized_by %} 
            discretized by: {{ relation.1 }} <br>
        {% elif relation.0 == option.discretizes %} 
            discretizes: {{ relation.1 }} <br>
        {% elif relation.0 == option.contained_in_task %} 
            contained in: {{ relation.1 }} {% if values.task_number %} {% for key2, val in values.task_number.items %} {% if key == key2 %} - order number: {{ val }} {% endif %} {% endfor %} {% else %} - oder number: <strong style="color:red;">MISSING ORDER NUMBER</strong> {% endif %} <br>
        {% elif relation.0 == option.contains_task %} 
            contains: {{ relation.1 }} {% if values.task_number %} {% for key2, val in values.task_number.items %} {% if key == key2 %} - order number: {{ val }} {% endif %} {% endfor %} {% else %} - oder number: <strong style="color:red;">MISSING ORDER NUMBER</strong> {% endif %} <br>
        {% elif relation.0 == option.approximated_by %} 
            approximated by: {{ relation.1 }} <br>
        {% elif relation.0 == option.approximates %} 
            approximates: {{ relation.1 }} <br>
        {% elif relation.0 == option.linearized_by %} 
            linearized by: {{ relation.1 }} <br>
        {% elif relation.0 == option.linearizes %} 
            linearizes: {{ relation.1 }} <br>
        {% elif relation.0 == option.similar_to %} 
            similar to: {{ relation.1 }} <br>
        {% elif relation.0 == 'MISSING RELATION TYPE' %}
            <strong style="color:red;">{{ relation.0 }}</strong>: {{ relation.1 }} <br>
        {% endif %}
    {% endfor %}
{% empty %}
    <strong style="color:red;">MISSING COMPUTATIONAL TASK</strong>
{% endfor %}

<h1 id="MathematicalFormulations"> Mathematical Expressions </h1>
{% for values in answers.formulation.values %}
        
    {% if values.Name %}
        <h2 id="MF{{ forloop.counter }}"> ME{{ forloop.counter }}: {{ values.Name }} </h2>
    {% else %}
        <h2 id="MF{{ forloop.counter }}"> ME{{ forloop.counter }}: <strong style="color:red;">MISSING MATHEMATICAL EXPRESSION NAME</strong> </h2>
    {% endif %}

    <p>
        <b>Short Description</b>:
        {% if values.Description %}
            {% if values.Description|length > 250 %}
                <strong style="color:red;">SHORT DESCRIPTION TOO LONG</strong> <br>
            {% else %}
                {{ values.Description }} <br>
            {% endif %}
        {% else %}
             <strong style="color:red;">MISSING MODEL SHORT DESCRIPTION</strong> <br>
        {% endif %}
        {% if values.descriptionLong %}
            <b>Detailed Description</b>:
            <ol style="margin-left: 1.5em;">
                {% for description in values.descriptionLong.values %}
                    <li style="margin-bottom: 0.5em;">{{ description }}</li>
                {% endfor %}
            </ol>
        {% endif %}
        {% if 'not found' in values.ID %} 
            <b>ID</b>: - 
        {% elif 'mardi' in values.ID %} 
            <b>MaRDI Portal ID</b>: {{ values.ID|cut:"mardi:"}} 
        {% elif 'wikidata' in values.ID %} 
            <b>Wikidata ID</b>: {{ values.ID|cut:"wikidata:"}}
        {% endif %} 
        <br>
    </p>

    <b>Properties</b>:  
    {% for value in values.Properties.values %} 
        {% if value == option.is_deterministic %} 
            {% if option.is_stocastic in values.Properties.values %}
                <strong style="color:red;">Is Deterministic</strong>
            {% else %}
                Is Deterministic
            {% endif %} 
        {% elif value == option.is_stochastic %} 
            {% if option.is_deterministic in values.Properties.values %}
                <strong style="color:red;">Is Stochastic</strong>
            {% else %}
                Is Stochastic
            {% endif %}
        {% elif value == option.is_dimensionless %} 
            {% if option.is_dimensional in values.Properties.values %}
                <strong style="color:red;">Is Dimensionless</strong>
            {% else %}
                Is Dimensionless
            {% endif %}
        {% elif value == option.is_dimensional %} 
            {% if option.is_dimensionless in values.Properties.values %}
                <strong style="color:red;">Is Dimensional</strong>
            {% else %}
                Is Dimensional
            {% endif %} 
        {% elif value == option.is_dynamic %} 
            {% if option.is_static in values.Properties.values %}
                <strong style="color:red;">Is Dynamic</strong>
            {% else %}
                Is Dynamic
            {% endif %} 
        {% elif value == option.is_static %} 
            {% if option.is_dynamic in values.Properties.values %}
                <strong style="color:red;">Is Static</strong>
            {% else %}
                Is Static
            {% endif %}  
        {% elif value == option.is_linear %} 
            {% if option.is_not_linear in values.Properties.values %}
                <strong style="color:red;">Is Linear</strong>
            {% else %}
                Is Linear
            {% endif %}    
        {% elif value == option.is_not_linear %} 
            {% if option.is_linear in values.Properties.values %}
                <strong style="color:red;">Is Not Linear</strong>
            {% else %}
                Is Not Linear
            {% endif %} 
        {% elif value == option.is_space_continuous %} 
            {% if option.is_space_discrete in values.Properties.values %}
                <strong style="color:red;">Is Space-Continuous</strong>
            {% else %}
                Is Space-Continuous
            {% endif %} 
        {% elif value == option.is_space_discrete %}
            {% if option.is_space_continuous in values.Properties.values %}
                <strong style="color:red;">Is Space-Discrete</strong>
            {% else %}
                Is Space-Discrete
            {% endif %}  
        {% elif value == option.is_time_continuous %} 
            {% if option.is_time_discrete in values.Properties.values %}
                <strong style="color:red;">Is Time-Continuous</strong>
            {% else %}
                Is Time-Continuous
            {% endif %}  
        {% elif value == option.is_time_discrete %} 
            {% if option.is_time_continuous in values.Properties.values %}
                <strong style="color:red;">Is Time-Discrete</strong>
            {% else %}
                Is Time-Discrete
            {% endif %} 
        {% endif %} 
        {% if not forloop.last %}
            , 
        {% endif %} 
    {% empty %}
        <strong style="color:red;">MISSING MATHEMATICAL EXPRESSION PROPERTIES</strong>
    {% endfor %}
        
    <p> 
        <b>Defining formulations</b>:
        <ol style="margin-left: 1.5em;">
            {% for value in values.Formula.values %}
                <li style="margin-bottom: 0.5em;">&nbsp;&nbsp; {% if 'math' in value %} {{ value|safe }} {% else %} \( {{ value }} \) {% endif %}</li>
            {% empty %}
                <strong style="color:red;">MISSING MATHEMATICAL EXPRESSION FORMULA</strong>
            {% endfor %}
        </ol>
    </p>
    <br>
    {% if values.element.values %}
        <table border="1">
            <colgroup>
                <col style="width: 10%" />
                <col style="width: 15%" />
                <col style="width: 15%" />
                <col style="width: 15%" />
                <col style="width: 15%" />
                <col style="width: 30%" />
            </colgroup>
            <thead>
                <tr class="header">
                    <th style="text-align: center; vertical-align: middle;">Symbol</th>
                    <th style="text-align: center; vertical-align: middle;">Quantity</th>
                    <th style="text-align: center; vertical-align: middle;">Quantity ID</th>
                    <th style="text-align: center; vertical-align: middle;">Quantity Kind</th>
                    <th style="text-align: center; vertical-align: middle;">Quantity Kind ID</th>
                    <th style="text-align: center; vertical-align: middle;">Description</th>
                </tr>
            </thead>
            <tbody>
                {% for value in values.element.values %}
                    {% if value.Info.Type == option.Quantity %}
                        <tr>{% if 'math' in value.symbol %}
                                <td style="text-align: center; vertical-align: middle;">{{ value.symbol|safe }} {% if value.symbol %} {% else %} <strong style="color:red;">MISSING SYMBOL</strong> {% endif %} </td>
                            {% else %}
                                <td style="text-align: center; vertical-align: middle;">\( {{ value.symbol }} \) {% if value.symbol %} {% else %} <strong style="color:red;">MISSING SYMBOL</strong> {% endif %} </td>
                            {% endif %}
                            <td style="text-align: center; vertical-align: middle;">{{ value.Info.Name }} {% if value.Info.Name %} {% else %} <strong style="color:red;">MISSING NAME</strong> {% endif %} </td>
                            <td style="text-align: center; vertical-align: middle;">{{ value.Info.ID }}</td>
                            <td style="text-align: center; vertical-align: middle;">{{ value.Info.QKName }}</td>
                            <td style="text-align: center; vertical-align: middle;">{{ value.Info.QKID }}</td>
                            <td style="text-align: center; vertical-align: middle;">{{ value.Info.Description }} {% if value.Info.Description %} {% else %} <strong style="color:red;">MISSING DESCRIPTION</strong> {% endif %}</td>				
                        </tr>
                    {% elif value.Info.Type == option.QuantityKind %}
                        <tr>{% if 'math' in value.symbol %}
                                <td style="text-align: center; vertical-align: middle;">{{ value.symbol|safe }} {% if value.symbol %} {% else %} <strong style="color:red;">MISSING SYMBOL</strong> {% endif %} </td>
                            {% else %}
                                <td style="text-align: center; vertical-align: middle;">\( {{ value.symbol }} \) {% if value.symbol %} {% else %} <strong style="color:red;">MISSING SYMBOL</strong> {% endif %} </td>
                            {% endif %}
                            <td style="text-align: center; vertical-align: middle;"></td>
                            <td style="text-align: center; vertical-align: middle;"></td>
                            <td style="text-align: center; vertical-align: middle;">{{ value.Info.Name }} {% if value.Info.Name %} {% else %} <strong style="color:red;">MISSING NAME</strong> {% endif %}</td>
                            <td style="text-align: center; vertical-align: middle;">{{ value.Info.ID }}</td>
                            <td style="text-align: center; vertical-align: middle;">{{ value.Info.Description }} {% if value.Info.Description %} {% else %} <strong style="color:red;">MISSING DESCRIPTION</strong> {% endif %}</td>				
                        </tr>
                    {% else %}
                        <tr>
                            {% if 'math' in value.symbol %}
                                    <td style="text-align: center; vertical-align: middle;">{{ value.symbol|safe }} {% if value.symbol %} {% else %} <strong style="color:red;">MISSING SYMBOL</strong> {% endif %} </td>
                                {% else %}
                                    <td style="text-align: center; vertical-align: middle;">\( {{ value.Info.Name }} \) {% if value.Info.Name %} {% else %} <strong style="color:red;">MISSING NAME</strong> {% endif %} </td>
                                {% endif %}
                            <td colspan="5" style="text-align: center; vertical-align: middle;"> <strong style="color:red;">MISSING QUANTITY OR QUANTITY KIND</strong> </td>
                        </tr>
                    {% endif %}
                {% endfor %}
            </tbody>
        </table>
    {% else %}
        <strong style="color:red;">MISSING MATHEMATICAL EXPRESSION ELEMENT INFORMATION</strong>
    {% endif %}

    {% for values in values.RelationMF1.values %}
        {% if forloop.first %}
            <h3 id="RelationsToOtherMathematicalFormulationsI1"> Relations to other Mathematical Expressions I </h3>
        {% endif %}
        {% if values.0 == option.assumes %} 
	        assumes: {{ values.1 }} <br>
        {% elif values.0 == option.contains_formulation %} 
	        contains: {{ values.1 }} <br>
        {% elif values.0 == option.contains_boundary_condition %} 
	        contains Boundary Condition: {{ values.1 }} <br>
        {% elif values.0 == option.contains_constraint_condition %} 
	        contains Constraint Condition: {{ values.1 }} <br>
        {% elif values.0 == option.contains_coupling_condition %} 
	        contains Coupling Condition: {{ values.1 }} <br>
        {% elif values.0 == option.contains_initial_condition %} 
	        contains Initial Condition: {{ values.1 }} <br>
        {% elif values.0 == option.contains_final_condition %} 
	        contains Final Condition: {{ values.1 }} <br>
        {% elif values.0 == 'MISSING RELATION TYPE' %}
            <strong style="color:red;">{{ values.0 }}</strong>: {{ values.1 }} <br>
        {% endif %}
    {% endfor %}

    {% for key, relation in values.RelationMF2.items %}
        {% if forloop.first %}
            <h3 id="RelationsToOtherMathematicalFormulationsII1"> Relations to other Mathematical Expressions II </h3>
        {% endif %}
        {% if relation.0 == option.approximated_by %} 
	        approximated by: {{ relation.1 }} <br>
        {% elif relation.0 == option.approximates %} 
	        approximates: {{ relation.1 }} <br>
        {% elif relation.0 == option.discretized_by %} 
	        discretized by: {{ relation.1 }} <br>
        {% elif relation.0 == option.discretizes %} 
	        discretizes: {{ relation.1 }} <br>
        {% elif relation.0 == option.specialized_by %} 
	        specialized by: {{ relation.1 }} {% if values.assumptionMapped %} {% for key2, vals in values.assumptionMapped.items %} {% if key == key2 %} - assumptions (general to special): {% for val in vals.values %} {{ val }} {% if not forloop.last %}, {% endif %} {% endfor %} {% endif %} {% endfor %} {% else %} - assumptions (general to special): <strong style="color:red;">MISSING ASSUMPTIONS</strong> {% endif %} <br>
        {% elif relation.0 == option.specializes %} 
	        specializes: {{ relation.1 }} {% if values.assumptionMapped %} {% for key2, vals in values.assumptionMapped.items %} {% if key == key2 %} - assumptions (general to special): {% for val in vals.values %} {{ val }} {% if not forloop.last %}, {% endif %} {% endfor %} {% endif %} {% endfor %} {% else %} - assumptions (general to special): <strong style="color:red;">MISSING ASSUMPTIONS</strong> {% endif %}<br>
        {% elif relation.0 == option.nondimensionalized_by %} 
	        nondimensionalized by: {{ relation.1 }} <br>
        {% elif relation.0 == option.nondimensionalzes %} 
	        nondimensionalizes: {{ relation.1 }} <br>
        {% elif relation.0 == option.linearized_by %} 
	        linearized by: {{ relation.1 }} <br>
        {% elif relation.0 == option.linearizes %} 
	        linearizes: {{ relation.1 }} <br>
        {% elif relation.0 == option.similar_to %} 
	        similar to: {{ relation.1 }} <br>
        {% elif relation.0 == 'MISSING RELATION TYPE' %}
            <strong style="color:red;">{{ relation.0 }}</strong>: {{ relation.1 }} <br>
        {% endif %}  
    {% endfor %}
{% empty %}
    <strong style="color:red;">MISSING MATHEMATICAL EXPRESSION</strong>
{% endfor %}
    
<h1 id="Publication"> Publications </h1>
{% for values in answers.publication.values %}
    {% if values.Name %}
        <h2 id="P{{ forloop.counter }}"> P{{ forloop.counter }}: {{ values.Name }} </h2>
    {% else %}
        <h2 id="P{{ forloop.counter }}"> P{{ forloop.counter }}: <strong style="color:red;">MISSING PUBLICATION NAME</strong> </h2>
    {% endif %}
    <p> {% if 'not found' in values.ID %} 
            <b>ID</b>: - 
        {% elif 'mardi' in values.ID %} 
            <b>MaRDI Portal ID</b>: {{ values.ID|cut:"mardi:"}} 
        {% elif 'wikidata' in values.ID %} 
            <b>Wikidata ID</b>: {{ values.ID|cut:"wikidata:"}}
        {% endif %}
        <br>
        {% for reference in values.reference.values %}
            {% if reference.0 == option.DOI %}
                <b>DOI</b>: {{ reference.1 }} <br>
	        {% endif %} 
            {% if reference.0 == option.URL %}
                <b>URL</b>: {{ reference.1 }} <br>
	        {% endif %}
        {% empty %}
            {% if 'not found' in values.ID %}
                <strong style="color:red;">MISSING PUBLICATION DOI OR URL</strong>
            {% endif %}
        {% endfor %}
    </p>
    {% for values in values.RelationP.values %}
        {% if forloop.counter == 1 %}
            <h3 id="RelationsToEntitiesOfTheMathematicalModels"> Relations to Entities of the Mathematical Models </h3>
        {% endif %}
        {% if values.0 == option.documents %} 
	        documents: {{ values.1 }} <br>
        {% elif values.0 == option.invents %} 
	        invents: {{ values.1 }} <br>
        {% elif values.0 == option.studies %} 
	        studies: {{ values.1 }} <br>
        {% elif values.0 == option.surveys %} 
	        surveys: {{ values.1 }} <br>
        {% elif values.0 == option.uses %} 
	        uses: {{ values.1 }} <br>
        {% elif values.0 == 'MISSING RELATION TYPE' %}
            <strong style="color:red;">{{ values.0 }}</strong>: {{ values.1 }} <br>
        {% endif %}
    {% empty %}
        <strong style="color:red;">MISSING MATHEMATICAL MODEL ENTITY</strong>
    {% endfor %}
{% empty %}
    <strong style="color:red;">MISSING PUBLICATION</strong>
{% endfor %}

<h1 id="ResearchField"> Academic Disciplines </h1>
{% for values in answers.field.values %}
    
    {% if values.Name %}
        <h2 id="RF{{ forloop.counter }}"> AD{{ forloop.counter }}: {{ values.Name }} </h2>
    {% else %}
        <h2 id="RF{{ forloop.counter }}"> AD{{ forloop.counter }}: <strong style="color:red;">MISSING ACADEMIC DISCIPLINE NAME</strong> </h2>
    {% endif %}

    <p>
        <b>Short Description</b>:
        {% if values.Description %}
            {% if values.Description|length > 250 %}
                <strong style="color:red;">SHORT DESCRIPTION TOO LONG</strong> <br>
            {% else %}
                {{ values.Description }} <br>
            {% endif %}
        {% else %}
             <strong style="color:red;">MISSING ACADEMIC DISCIPLINE SHORT DESCRIPTION</strong> <br>
        {% endif %}
        {% if values.descriptionLong %}
            <b>Detailed Description</b>:
            <ol style="margin-left: 1.5em;">
                {% for description in values.descriptionLong.values %}
                    <li style="margin-bottom: 0.5em;">{{ description }}</li>
                {% endfor %}
            </ol>
        {% endif %}
        {% if 'not found' in values.ID %} 
            <b>ID</b>: - 
        {% elif 'mardi' in values.ID %} 
            <b>MaRDI Portal ID</b>: {{ values.ID|cut:"mardi:"}} 
        {% elif 'wikidata' in values.ID %} 
            <b>Wikidata ID</b>: {{ values.ID|cut:"wikidata:"}}
        {% endif %} 
        <br>
    </p>

    {% for relation in values.RelationRF.values %}
        {% if forloop.first %}
            <h3 id="RelationsToOtherResearchFields"> Relations to other Academic Disciplines </h3>
	    {% endif %}
        {% if relation.0 == option.specialized_by %} 
            specialized by: {{relation.1 }} <br>
        {% elif relation.0 == option.specializes %} 
            specializes: {{relation.1 }} <br>
        {% elif relation.0 == option.similar_to %} 
            similar to: {{relation.1 }} <br>
        {% elif relation.0 == 'MISSING RELATION TYPE' %}
            <strong style="color:red;">{{ relation.0 }}</strong>: {{ relation.1 }} <br>
        {% endif %}
    {% endfor %}
{% empty %}
    <strong style="color:red;">MISSING ACADEMIC DISCIPLINE</strong>
{% endfor %}

<h1 id="ResearchProblem"> Research Problems </h1>
{% for values in answers.problem.values %}
    
    {% if values.Name %}
        <h2 id="RP{{ forloop.counter }}"> RP{{ forloop.counter }}: {{ values.Name }} </h2>
    {% else %}
        <h2 id="RP{{ forloop.counter }}"> RP{{ forloop.counter }}: <strong style="color:red;">MISSING RESEARCH PROBLEM NAME</strong> </h2>
    {% endif %}

    <p>
        <b>Short Description</b>:
        {% if values.Description %}
            {% if values.Description|length > 250 %}
                <strong style="color:red;">SHORT DESCRIPTION TOO LONG</strong> <br>
            {% else %}
                {{ values.Description }} <br>
            {% endif %}
        {% else %}
             <strong style="color:red;">MISSING RESEARCH PROBLEM SHORT DESCRIPTION</strong> <br>
        {% endif %}
        {% if values.descriptionLong %}
            <b>Detailed Description</b>:
            <ol style="margin-left: 1.5em;">
                {% for description in values.descriptionLong.values %}
                    <li style="margin-bottom: 0.5em;">{{ description }}</li>
                {% endfor %}
            </ol>
        {% endif %}
        {% if 'not found' in values.ID %} 
            <b>ID</b>: - 
        {% elif 'mardi' in values.ID %} 
            <b>MaRDI Portal ID</b>: {{ values.ID|cut:"mardi:"}} 
        {% elif 'wikidata' in values.ID %} 
            <b>Wikidata ID</b>: {{ values.ID|cut:"wikidata:"}}
        {% endif %} 
        <br>
    </p>

    <h3 id="RelationsToResearchFields"> Relations to Academic Disciplines </h3>
    {% for researchfield in values.RelationRF.values %}
        contained in Field: {{ researchfield }} <br>
    {% empty %}
        <strong style="color:red;">MISSING ACADEMIC DISCIPLINE</strong>
    {% endfor %}

    {% for relation in values.RelationRP.values %}
        {% if forloop.first %}
            <h3 id="RelationsToOtherResearchProblems"> Relations to other Research Problems </h3>
        {% endif %}
        {% if relation.0 == option.specialized_by %} 
	        specialized by: {{relation.1 }} <br>
        {% elif relation.0 == option.specializes %} 
	        specializes: {{relation.1 }} <br>
        {% elif relation.0 == option.similar_to %} 
	        similar to: {{relation.1 }} <br>
        {% elif relation.0 == 'MISSING RELATION TYPE' %}
            <strong style="color:red;">{{ relation.0 }}</strong>: {{ relation.1 }} <br>
        {% endif %}
    {% endfor %}
{% empty %}
    <strong style="color:red;">MISSING RESEARCH PROBLEM</strong>
{% endfor %}

<h1 id="QuantityQuantityKind"> Quantities / Quantity Kinds </h1>
{% for values in answers.quantity.values %}
    
    {% if values.Name %}
        <h2 id="QQK{{ forloop.counter }}"> QQK{{ forloop.counter }}: {{ values.Name }} </h2>
    {% else %}
        <h2 id="QQK{{ forloop.counter }}"> QQK{{ forloop.counter }}: <strong style="color:red;">MISSING QUANTITY / QUANTITY KIND NAME</strong> </h2>
    {% endif %}

    <p>
        <b>Short Description</b>:
        {% if values.Description %}
            {% if values.Description|length > 250 %}
                <strong style="color:red;">SHORT DESCRIPTION TOO LONG</strong> <br>
            {% else %}
                {{ values.Description }} <br>
            {% endif %}
        {% else %}
             <strong style="color:red;">MISSING QUANTITY / QUANTITY KIND SHORT DESCRIPTION</strong> <br>
        {% endif %}
        {% if values.descriptionLong %}
            <b>Detailed Description</b>:
            <ol style="margin-left: 1.5em;">
                {% for description in values.descriptionLong.values %}
                    <li style="margin-bottom: 0.5em;">{{ description }}</li>
                {% endfor %}
            </ol>
        {% endif %}
        <b>Class</b>: 
        {% if values.QorQK == option.Quantity %}
            Quantity
        {% elif values.QorQK == option.QuantityKind %}
            Quantity Kind
        {% else %}
            <strong style="color:red;">MISSING QUANTITY / QUANTITY KIND CLASS</strong> <br>
        {% endif %} <br>
        {% if 'not found' in values.ID %} 
            <b>ID</b>: - 
        {% elif 'mardi' in values.ID %} 
            <b>MaRDI Portal ID</b>: {{ values.ID|cut:"mardi:"}} 
        {% elif 'wikidata' in values.ID %} 
            <b>Wikidata ID</b>: {{ values.ID|cut:"wikidata:"}}
        {% endif %} 
        <br>
        
        {% if values.reference %}
            {% for reference in values.reference.values %}
                {% if reference.0 == option.QUDT %}
                    <b>QUDT ID</b>: {{ reference.1 }} <br>
                {% endif %} 
            {% endfor %}
        {% endif %}
        <br>
    </p>
        
    <b>Properties</b>: 
    {% for value in values.Properties.values %} 
        {% if value == option.is_chemical_constant %} 
            {% if option.is_mathematical_constant in values.Properties.values %}
                <strong style="color:red;">Is Chemical Constant</strong>
            {% else %}
                Is Chemical Constant
            {% endif %}
        {% elif value == option.is_mathematical_constant %} 
            {% if option.is_chemical_constant in values.Properties.values or option.is_physical_constant in values.Properties.values %}
                <strong style="color:red;">Is Mathematical Constant</strong>
            {% else %}
                Is Mathematical Constant
            {% endif %}
        {% elif value == option.is_physical_constant %} 
            {% if option.is_mathematical_constant in values.Properties.values %}
                <strong style="color:red;">Is Physical Constant</strong>
            {% else %}
                Is Physical Constant
            {% endif %}
        {% elif value == option.is_deterministic %} 
            {% if option.is_stocastic in values.Properties.values %}
                <strong style="color:red;">Is Deterministic</strong>
            {% else %}
                Is Deterministic
            {% endif %} 
        {% elif value == option.is_stochastic %} 
            {% if option.is_deterministic in values.Properties.values %}
                <strong style="color:red;">Is Stochastic</strong>
            {% else %}
                Is Stochastic
            {% endif %}
        {% elif value == option.is_dimensionless %} 
            {% if option.is_dimensional in values.Properties.values %}
                <strong style="color:red;">Is Dimensionless</strong>
            {% else %}
                Is Dimensionless
            {% endif %}
        {% elif value == option.is_dimensional %} 
            {% if option.is_dimensionless in values.Properties.values %}
                <strong style="color:red;">Is Dimensional</strong>
            {% else %}
                Is Dimensional
            {% endif %} 
        {% elif value == option.is_dynamic %} 
            {% if option.is_static in values.Properties.values %}
                <strong style="color:red;">Is Dynamic</strong>
            {% else %}
                Is Dynamic
            {% endif %} 
        {% elif value == option.is_static %} 
            {% if option.is_dynamic in values.Properties.values %}
                <strong style="color:red;">Is Static</strong>
            {% else %}
                Is Static
            {% endif %}  
        {% elif value == option.is_space_continuous %} 
            {% if option.is_space_discrete in values.Properties.values %}
                <strong style="color:red;">Is Space-Continuous</strong>
            {% else %}
                Is Space-Continuous
            {% endif %} 
        {% elif value == option.is_space_discrete %}
            {% if option.is_space_continuous in values.Properties.values %}
                <strong style="color:red;">Is Space-Discrete</strong>
            {% else %}
                Is Space-Discrete
            {% endif %}  
        {% elif value == option.is_time_continuous %} 
            {% if option.is_time_discrete in values.Properties.values %}
                <strong style="color:red;">Is Time-Continuous</strong>
            {% else %}
                Is Time-Continuous
            {% endif %}  
        {% elif value == option.is_time_discrete %} 
            {% if option.is_time_continuous in values.Properties.values %}
                <strong style="color:red;">Is Time-Discrete</strong>
            {% else %}
                Is Time-Discrete
            {% endif %} 
        {% endif %}
        {% if not forloop.last %}
            , 
        {% endif %}
    {% empty %}
        <strong style="color:red;">MISSING QUANTITY / QUANTITY KIND PROPERTIES</strong>
    {% endfor %}

    {% if values.Formula %}
        <h3 id="QuantityOrQuantityKindDefinition"> Definition of {% if values.QorQK == option.Quantity %} Quantity {% elif values.QorQK == option.QuantityKind %} Quantity Kind {% endif %} </h3>
        <p>
            <b>Defining formulations</b>:
            <ol style="margin-left: 1.5em;">
                {% for value in values.Formula.values %}
                    {% if '>≡</' in value or '>&#x2261;</' in value or '>&equiv;</' in value or '\\equiv' in value or '\\Equiv' in value %}
                        <li style="margin-bottom: 0.5em;">&nbsp;&nbsp; {% if 'math' in value %} {{ value|safe }} {% else %} \( {{ value }} \) {% endif %}</li>
                    {% else %}
                        <li style="margin-bottom: 0.5em;">&nbsp;&nbsp; {% if 'math' in value %} {{ value|safe }} {% else %} \( {{ value }} \) {% endif %} <strong style="color:red;">&nbsp;&nbsp;&nbsp;&nbsp;Inconsistent Quantity / Quantity Kind Definition (missing equivalent sign)</li>
                    {% endif %}
                {% empty %}
                    <strong style="color:red;">MISSING MATHEMATICAL EXPRESSION FORMULA</strong>
                {% endfor %}
            </ol>
        </p>
        <br>
        {% if values.element.values %}
            <table border="1">
                <colgroup>
                    <col style="width: 10%" />
                    <col style="width: 15%" />
                    <col style="width: 15%" />
                    <col style="width: 15%" />
                    <col style="width: 15%" />
                    <col style="width: 30%" />
                </colgroup>
                <thead>
                    <tr class="header">
                        <th style="text-align: center; vertical-align: middle;">Symbol</th>
                        <th style="text-align: center; vertical-align: middle;">Quantity</th>
                        <th style="text-align: center; vertical-align: middle;">Quantity ID</th>
                        <th style="text-align: center; vertical-align: middle;">Quantity Kind</th>
                        <th style="text-align: center; vertical-align: middle;">Quantity Kind ID</th>
                        <th style="text-align: center; vertical-align: middle;">Description</th>
                    </tr>
                </thead>
                <tbody>
                    {% for value in values.element.values %}
                        {% if value.Info.Type == option.Quantity %}
                            <tr>{% if 'math' in value.symbol %}
                                    <td style="text-align: center; vertical-align: middle;">{{ value.symbol|safe }} {% if value.symbol %} {% else %} <strong style="color:red;">MISSING SYMBOL</strong> {% endif %} </td>
                                {% else %}
                                    <td style="text-align: center; vertical-align: middle;">\( {{ value.symbol }} \) {% if value.symbol %} {% else %} <strong style="color:red;">MISSING SYMBOL</strong> {% endif %} </td>
                                {% endif %}
                                <td style="text-align: center; vertical-align: middle;">{{ value.Info.Name }} {% if value.Info.Name %} {% else %} <strong style="color:red;">MISSING NAME</strong> {% endif %} </td>
                                <td style="text-align: center; vertical-align: middle;">{{ value.Info.ID }}</td>
                                <td style="text-align: center; vertical-align: middle;">{{ value.Info.QKName }}</td>
                                <td style="text-align: center; vertical-align: middle;">{{ value.Info.QKID }}</td>
                                <td style="text-align: center; vertical-align: middle;">{{ value.Info.Description }} {% if value.Info.Description %} {% else %} <strong style="color:red;">MISSING DESCRIPTION</strong> {% endif %}</td>				
                            </tr>
                        {% elif value.Info.Type == option.QuantityKind %}
                            <tr>{% if 'math' in value.symbol %}
                                    <td style="text-align: center; vertical-align: middle;">{{ value.symbol|safe }} {% if value.symbol %} {% else %} <strong style="color:red;">MISSING SYMBOL</strong> {% endif %} </td>
                                {% else %}
                                    <td style="text-align: center; vertical-align: middle;">\( {{ value.symbol }} \) {% if value.symbol %} {% else %} <strong style="color:red;">MISSING SYMBOL</strong> {% endif %} </td>
                                {% endif %}
                                <td style="text-align: center; vertical-align: middle;"></td>
                                <td style="text-align: center; vertical-align: middle;"></td>
                                <td style="text-align: center; vertical-align: middle;">{{ value.Info.Name }} {% if value.Info.Name %} {% else %} <strong style="color:red;">MISSING NAME</strong> {% endif %}</td>
                                <td style="text-align: center; vertical-align: middle;">{{ value.Info.ID }}</td>
                                <td style="text-align: center; vertical-align: middle;">{{ value.Info.Description }} {% if value.Info.Description %} {% else %} <strong style="color:red;">MISSING DESCRIPTION</strong> {% endif %}</td>				
                            </tr>
                        {% else %}
                            <tr>
                                {% if 'math' in value.symbol %}
                                    <td style="text-align: center; vertical-align: middle;">{{ value.symbol|safe }} {% if value.symbol %} {% else %} <strong style="color:red;">MISSING SYMBOL</strong> {% endif %} </td>
                                {% else %}
                                    <td style="text-align: center; vertical-align: middle;">\( {{ value.symbol }} \) {% if value.symbol %} {% else %} <strong style="color:red;">MISSING SYMBOL</strong> {% endif %} </td>
                                {% endif %}
                                <td colspan="5" style="text-align: center; vertical-align: middle;"> <strong style="color:red;">MISSING QUANTITY OR QUANTITY KIND</strong> </td> 
                            </tr>
                        {% endif %}
                    {% endfor %}
                </tbody>
            </table>
        {% else %}
            <strong style="color:red;">MISSING MATHEMATICAL EXPRESSION ELEMENT INFORMATION</strong>
        {% endif %}
    {% endif %}

    {% if values.QorQK == option.Quantity %}
        {% for values in values.RelationQQ.values %}
            {% if forloop.counter == 1 %}
	            <h3 id="RelationsToOtherQuantities"> Relations to other Quantities </h3>
            {% endif %}
            {% if values.0 == option.specialized_by %} 
	            specialized by: {{ values.1 }} <br>
            {% elif values.0 == option.specializes %} 
	            specializes: {{ values.1 }} <br>
            {% elif values.0 == option.approximated_by %} 
	            approximated by: {{ values.1 }} <br>
            {% elif values.0 == option.approximates %} 
	            approximates: {{ values.1 }} <br>
            {% elif values.0 == option.linearized_by %} 
	            linearized by: {{ values.1 }} <br>
            {% elif values.0 == option.linearizes %} 
	            linearizes: {{ values.1 }} <br>
            {% elif values.0 == option.nondimensionalized_by %} 
	            nondimensionalized by: {{ values.1 }} <br>
            {% elif values.0 == option.nondimensionalizes %} 
	            nondimensionalizes: {{ values.1 }} <br>
            {% elif values.0 == option.similar_to %} 
	            similar to: {{ values.1 }} <br>
            {% elif values.0 == 'MISSING RELATION TYPE' %}
                <strong style="color:red;">{{ values.0 }}</strong>: {{ values.1 }} <br>
            {% endif %}
        {% endfor %}
        {% for values in values.RelationQQK.values %}
            {% if forloop.counter == 1 %}
	            <h3 id="RelationsToQuantityKinds"> Relations to Quantity Kinds </h3>
            {% endif %}
            {% if values.0 == option.specializes %} 
	            specializes: {{ values.1 }} <br>
            {% elif values.0 == 'MISSING RELATION TYPE' %}
                <strong style="color:red;">{{ values.0 }}</strong>: {{ values.1 }} <br>
            {% endif %}
        {% endfor %}
    {% elif values.QorQK == option.QuantityKind %}
        {% for values in values.RelationQKQK.values %}
            {% if forloop.counter == 1 %}
                <h3 id="RelationsToOtherQuantityKinds"> Relations to other Quantity Kinds </h3>
            {% endif %}
            {% if values.0 == option.nondimensionalized_by %} 
                nondimensionalized: {{ values.1 }} <br>
            {% elif values.0 == option.nondimensionalizes %} 
                nondimensionalizes: {{ values.1 }} <br>
            {% elif values.0 == option.similar_to %} 
                similar to: {{ values.1 }} <br>
            {% elif values.0 == 'MISSING RELATION TYPE' %}
                <strong style="color:red;">{{ values.0 }}</strong>: {{ values.1 }} <br>
            {% endif %}
        {% endfor %}
        {% for values in values.RelationQKQ.values %}
            {% if forloop.counter == 1 %}
                <h3 id="RelationsToOtherQuantities3"> Relations to Quantities </h3>
            {% endif %}
            {% if values.0 == option.specialized_by %} 
                specialized by: {{ values.1 }} <br>
            {% elif values.0 == 'MISSING RELATION TYPE' %}
                <strong style="color:red;">{{ values.0 }}</strong>: {{ values.1 }} <br>
            {% endif %}
        {% endfor %}
    {% endif %}
{% empty %}
    <strong style="color:red;">MISSING QUANTITY / QUANTITY KIND</strong>
{% endfor %}

</body>


