Skip to content

Syntax Broken in "An Introductory Example" #7

Closed

Description

@mmcky

Activity

  1. mmcky commented on Sep 14, 2020

    @mmcky
    ContributorAuthor

    The following rst

    In brief,
    
    * The first line sets the desired length of the time series.
    
    * The next line creates an empty *list* called ``ϵ_values`` that will store the :math:`\epsilon_t` values as we generate them.
    
    * The statement ``# empty list`` is a *comment*, and is ignored by Python's interpreter.
    
    * The next three lines are the ``for`` loop, which repeatedly draws a new random number :math:`\epsilon_t` and appends it to the end of the list ``ϵ_values``.
    
    * The last two lines generate the plot and display it to the user.

    is producing in myst output

    In brief,
    
    $$* The first line sets the desired length of the time series.
    * The next line creates an empty *list* called `ϵ_values` that will store the $\epsilon_t values as we generate them.
    * The statement `# empty list` is a *comment*, and is ignored by Python's interpreter.
    * The next three lines are the `for` loop, which repeatedly draws a new random number $\epsilon_t and appends it to the end of the list `ϵ_values`.
    * The last two lines generate the plot and display it to the user.
    • will need to identify where the extra $$ has come from in sphinxcontrib-tomyst
    • check issues with nested inline math
  2. mmcky commented on Sep 14, 2020

    @mmcky
    ContributorAuthor

    This issue is fixed by executablebooks/sphinx-tomyst#43

  3. sayaikegawa commented on Sep 14, 2020

    @sayaikegawa
    Collaborator

    Hi @mmcky , this $$ issue occurs in lectures of OOP II: Building Classes, Python for Scientific Computing, NumPy, Parallelization and Writing Good Code. I observed all lists and found out that this issue occurs when the lists contains math or $.

    For example, in numpy lecture exercise2

    The standard (inverse transform) algorithm is as follows:
    
    $$$$$$$$$* Divide the unit interval $[0, 1] into $n subintervals $I_0, I_1, \ldots, I_{n-1} such that the length of $I_i is $q_i.
    * Draw a uniform random variable $U on $[0, 1] and return the $i such that $U \in I_i.
    

    the number of $ matches the number of math or $ in the list.(This rule is applied for the same issue in other lectures)
    So, I wonder that

    def visit_math(self):
            return "$"
    

    in sphinxcontrib-tomyst/sphinxcontrib/tomyst/writers/markdown.py may react wrongly.

    But since I don't major in CS, I don't understand well about how convert rst to myst in sphinxcontrib-tomyst. If issues are already fixed, please ignore this message.

  4. mmcky commented on Sep 14, 2020

    @mmcky
    ContributorAuthor

    @sayaikegawa can you check this against the latest build and let me know if its still an issue:

    https://5f5eeb76598fe1f0ed985d58--epic-agnesi-957267.netlify.app/numpy.html

    This link is provided on the PR that brought in the latest set of autobuild files #8

  5. mmcky commented on Sep 14, 2020

    @mmcky
    ContributorAuthor

    @sayaikegawa just updated source files again with latest upstream updates so best to check here:

    https://5f5f3879598fe1455097dc6b--epic-agnesi-957267.netlify.app

  6. sayaikegawa commented on Sep 14, 2020

    @sayaikegawa
    Collaborator

    Thank you @mmcky . I check that the issue is solved in all lectures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions