Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IterativeAmplitudeEstimation pages crashing due to bad Latex #486

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

Eric-Arellano
Copy link
Collaborator

@Eric-Arellano Eric-Arellano commented Dec 6, 2023

The pages were crashing because we had a bad | character inside a $latex$ expression in a table. Normally the | would be okay to represent the pipe character, but Markdown thought that it was saying the table column was done.

Result:

Screenshot 2023-12-06 at 3 06 56 PM

Note that I had to use \vert for the pipe character. Using \| resulted in the Latex interpreting as ||, which results in the parallel symbol being used:

Screenshot 2023-12-06 at 3 08 45 PM

--

While this PR hotfixes the bad files, we should fix the underlying generation script to handle this edge case. See #488

--

This change was generated with:

rg -F '\$\mathcal' -l | xargs sd -s '\$\mathcal{Q}^k \mathcal{A} | 0\rangle\$' '$\mathcal{Q}^k \mathcal{A} \vert0\rangle$'

rg -F '\$\mathcal' -l | xargs sd -s '\$\mathcal{Q}^k \mathcal{A}                                                                                 | 0\rangle\$' '$\mathcal{Q}^k \mathcal{A} \vert0\rangle$'

Copy link
Collaborator

@arnaucasau arnaucasau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I tested it locally, and all works well!

@Eric-Arellano Eric-Arellano added this pull request to the merge queue Dec 7, 2023
Merged via the queue into main with commit 7216e30 Dec 7, 2023
4 checks passed
@Eric-Arellano Eric-Arellano deleted the EA/fix-math branch December 7, 2023 16:01
frankharkins pushed a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
…iskit#486)

The pages were crashing because we had a bad `|` character inside a
`$latex$` expression in a table. Normally the `|` would be okay to
represent the pipe character, but Markdown thought that it was saying
the table column was done.

Result:

<img width="723" alt="Screenshot 2023-12-06 at 3 06 56 PM"
src="https://github.com/Qiskit/documentation/assets/14852634/8e15b026-da67-4dcc-8528-e07a514e67ec">

Note that I had to use `\vert` for the pipe character. Using `\|`
resulted in the Latex interpreting as `||`, which results in the
`parallel` symbol being used:

<img width="249" alt="Screenshot 2023-12-06 at 3 08 45 PM"
src="https://github.com/Qiskit/documentation/assets/14852634/86e8c756-4639-404e-95fb-efb8c71e3532">

--

While this PR hotfixes the bad files, we should fix the underlying
generation script to handle this edge case. See
Qiskit#488

--

This change was generated with:

```bash
rg -F '\$\mathcal' -l | xargs sd -s '\$\mathcal{Q}^k \mathcal{A} | 0\rangle\$' '$\mathcal{Q}^k \mathcal{A} \vert0\rangle$'

rg -F '\$\mathcal' -l | xargs sd -s '\$\mathcal{Q}^k \mathcal{A}                                                                                 | 0\rangle\$' '$\mathcal{Q}^k \mathcal{A} \vert0\rangle$'
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants