Coder Social home page Coder Social logo

Comments (8)

StevenClontz avatar StevenClontz commented on June 30, 2024 1

Yep... this is Firefox 81.x on Windows:

image

Updating to 93.0 didn't help.

I'll report upstream to PreTeXt. For now, we'll need to start using the <li><p><me>x</me></p></li> pattern (which will be required by CheckIt anyway soon enough).

from checkit.

StevenClontz avatar StevenClontz commented on June 30, 2024

This might be a bug in PreTeXt. I believe they intend to support bare <me> tags in <li>s. I'm guessing you found this when pasting a CheckIt exercise's PreTeXt output into our PreTeXt textbook source? (Screenshot/link me if you can.)

Here's what it looks like in the CheckIt Viewer (which handles PreTeXt-to-HTML differently than the PreTeXt app):

image

In CheckIt 0.2 I intend to restrict the subset of PreTeXt we support (e.g. you must use <p> around any mathematics) to avoid these bugs, and explicitly document what that subset is. Then if you use incompatible or invalid PreTeXt, it won't appear in the dashboard when previewing. As part of this process I'll port all the banks linked at https://checkit.clontz.org to 0.2 and fix these kinds of issues (I've been sprinkling in <p>s in the linear algebra bank throughout the semester to anticipate this, but missed this one...).

from checkit.

siwelwerd avatar siwelwerd commented on June 30, 2024

Yeah, that's exactly where I encountered it. I corrected it manually in the activity book. My references above were to the HTML output and PreTeXt output displayed by the Dashboard preview (I assumed the viewer was using this same HTML). Here's an example from LE1, note the <p class="math math-display"> in the HTML output, but not <p> in PreTeXt output.

PreTeXt source
------------
<exercise checkit-seed="4419" checkit-slug="LE1" checkit-title="Linear systems, vector equations, and augmented matrices">
  <statement>
        <p>Consider the vector equation.</p>
              <me>x_{1} \left[\begin{array}{c}
1 \\
3 \\
0 \\
-3
\end{array}\right] + x_{2} \left[\begin{array}{c}
2 \\
4 \\
-1 \\
-4
\end{array}\right] + x_{3} \left[\begin{array}{c}
1 \\
0 \\
-2 \\
-1
\end{array}\right] = \left[\begin{array}{c}
2 \\
9 \\
3 \\
-6
\end{array}\right]</me>
        <ol>
            <li> Write a system of scalar equations corresponding to this vector equation. </li>
            <li> Write an augmented matrix corresponding to this vector equation. </li>
        </ol>
  </statement>

  <answer>
     <ol>
                <li><me>\begin{matrix}
 x &amp;  +  &amp; 2 \, y &amp;  +  &amp; z &amp; = &amp; 2 \\
 3 \, x &amp;  +  &amp; 4 \, y &amp;  &amp;  &amp; = &amp; 9 \\
 &amp;  -  &amp; y &amp;  -  &amp; 2 \, z &amp; = &amp; 3 \\
 -3 \, x &amp;  -  &amp; 4 \, y &amp;  -  &amp; z &amp; = &amp; -6 \\
 \end{matrix}</me></li>
                <li><me>\left[\begin{array}{ccc|c}
1 &amp; 2 &amp; 1 &amp; 2 \\
3 &amp; 4 &amp; 0 &amp; 9 \\
0 &amp; -1 &amp; -2 &amp; 3 \\
-3 &amp; -4 &amp; -1 &amp; -6
\end{array}\right]</me></li>
      </ol>
    </answer>
</exercise>


HTML source
-----------
<div class="checkit exercise" data-checkit-slug="LE1" data-checkit-title="Linear systems, vector equations, and augmented matrices" data-checkit-seed="4419"> <div class="exercise-statement"> <p>Consider the vector equation.</p> <p class="math math-display">\[x_{1} \left[\begin{array}{c}
1 \\
3 \\
0 \\
-3
\end{array}\right] + x_{2} \left[\begin{array}{c}
2 \\
4 \\
-1 \\
-4
\end{array}\right] + x_{3} \left[\begin{array}{c}
1 \\
0 \\
-2 \\
-1
\end{array}\right] = \left[\begin{array}{c}
2 \\
9 \\
3 \\
-6
\end{array}\right]\]</p> <ol type="a"><li> Write a system of scalar equations corresponding to this vector equation. </li><li> Write an augmented matrix corresponding to this vector equation. </li></ol> </div> <div class="exercise-answer"><p><b>Answer:</b></p> <ol type="a"><li><p class="math math-display">\[\begin{matrix}
 x &amp;  +  &amp; 2 \, y &amp;  +  &amp; z &amp; = &amp; 2 \\
 3 \, x &amp;  +  &amp; 4 \, y &amp;  &amp;  &amp; = &amp; 9 \\
 &amp;  -  &amp; y &amp;  -  &amp; 2 \, z &amp; = &amp; 3 \\
 -3 \, x &amp;  -  &amp; 4 \, y &amp;  -  &amp; z &amp; = &amp; -6 \\
 \end{matrix}\]</p></li><li><p class="math math-display">\[\left[\begin{array}{ccc|c}
1 &amp; 2 &amp; 1 &amp; 2 \\
3 &amp; 4 &amp; 0 &amp; 9 \\
0 &amp; -1 &amp; -2 &amp; 3 \\
-3 &amp; -4 &amp; -1 &amp; -6
\end{array}\right]\]</p></li></ol> </div> </div>

from checkit.

StevenClontz avatar StevenClontz commented on June 30, 2024

I cannot replicate the bug you reported with things not numbering correctly in the PreTeXt build (the below is the code you pasted above in a book where "exercise" is renamed to "Checkpoint"):

image

Can you provide more context and a screenshot?

from checkit.

siwelwerd avatar siwelwerd commented on June 30, 2024

This is from the Sample Exercises in the appendix of the dev version of the LA book (in Cocalc, have not published)

Screenshot:
screenshot

Relevant code:

    <example>
        <title>LE1</title>
        <statement>
            <p>
Consider the scalar system of equations 
    <md alignment="alignat" alignat-columns="5">
    <mrow>
3x_1 &amp;\,+\,&amp; 2x_2 &amp;\,\,&amp; &amp;\,+\,&amp;x_4 &amp;= 1 </mrow><mrow>
-x_1 &amp;\,-\,&amp; 4x_2 &amp;\,+\,&amp;x_3&amp;\,-\,&amp;7x_4 &amp;= 0 </mrow><mrow>
        &amp;\,\,&amp; x_2 &amp;\,-\,&amp;x_3 &amp;\,\,&amp;  &amp;= -2</mrow>
    </md>
            </p>
            <ol>
                <li>
Rewrite this system as a vector equation.
                </li>
                <li>
Write an augmented matrix corresponding to this system.
                </li>
            </ol>
        </statement>
        <solution>
            <ol>
                <li>
<me> x_1\left[\begin{array}{c} 3 \\ -1 \\ 0 \end{array}{}\right] +
    x_2 \left[\begin{array}{c}2 \\ -4 \\ 1 \end{array}{}\right]+
    x_3 \left[\begin{array}{c} 1 \\ 1 \\ -1 \end{array}{}\right] 
    + x_4 \left[\begin{array}{c} 1 \\ -7 \\ 0 \end{array}{}\right] 
    = \left[\begin{array}{c} 1 \\ 0 \\ -2 \end{array}{}\right] </me>
                </li>
                <li>
<me>
\left[\begin{array}{cccc|c}
3 &amp; 2 &amp; 0 &amp; 1 &amp; 1 \\
-1 &amp; -4 &amp; 1 &amp; -7 &amp; 0 \\
0 &amp; 1 &amp; -1 &amp; 0 &amp; -2
\end{array}\right]
    </me>
                </li>
            </ol>
        </solution>
</example>
``

from checkit.

StevenClontz avatar StevenClontz commented on June 30, 2024

Oh boy this is a fun one. I just re-built to be sure, and I see the numbers.

image

What browser/OS/etc are you using?

from checkit.

siwelwerd avatar siwelwerd commented on June 30, 2024

Very odd. This is in Firefox 88.0 on Ubuntu .

from checkit.

StevenClontz avatar StevenClontz commented on June 30, 2024

Reported at https://groups.google.com/g/pretext-dev/c/Jq8OZ8tFpsY

from checkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.