-
-
Notifications
You must be signed in to change notification settings - Fork 89
/tex should support inline TeX #386
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
Labels
enhance command
Modify or improve an existing command or group of commands of the bot
priority: normal
valid
This issue/PR is validated and ready to be picked. This auto adds items to TJ project board.
Milestone
Comments
Can I be assigned to this I want to give it a try? |
DevSerendipity
added a commit
to DevSerendipity/TJ-Bot
that referenced
this issue
Feb 23, 2022
DevSerendipity
added a commit
to DevSerendipity/TJ-Bot
that referenced
this issue
Feb 28, 2022
Adding the changes which were requested from the review Added constants, and helper method Improving the naming, splitting up regular expressions, removing methods Adding comment for Math regex Added Comments, annotations, and if statement Added comments describing the method and the regex expressions, annotations for the method parameter and if statement for not doing unnecessary operations SonarLint and improving the comments adding space at bottom (spotless) Improving the Java doc Fixed the regex bug and spacing Regex bug which was, that it would register the first dollar sign and the last one in whole sentence, and it would place everything between as a match, improved spacing Improving Regex and adding fail if statement
DevSerendipity
added a commit
to DevSerendipity/TJ-Bot
that referenced
this issue
Feb 28, 2022
Adding the changes which were requested from the review Added constants, and helper method Improving the naming, splitting up regular expressions, removing methods Adding comment for Math regex Added Comments, annotations, and if statement Added comments describing the method and the regex expressions, annotations for the method parameter and if statement for not doing unnecessary operations SonarLint and improving the comments adding space at bottom (spotless) Improving the Java doc Fixed the regex bug and spacing Regex bug which was, that it would register the first dollar sign and the last one in whole sentence, and it would place everything between as a match, improved spacing Improving Regex and adding fail if statement
DevSerendipity
added a commit
to DevSerendipity/TJ-Bot
that referenced
this issue
Feb 28, 2022
This issue is stale because it has been open 30 days with no activity. Remove stale label, comment or add the valid label or this will be closed in 5 days. |
Taking over |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhance command
Modify or improve an existing command or group of commands of the bot
priority: normal
valid
This issue/PR is validated and ready to be picked. This auto adds items to TJ project board.
Overview
The
/tex
command should support inline TeX, for example using the idiomatic $-notation:Right now, the command interprets the whole content as TeX and renders it accordingly:

It should instead be rendered as:

Implementation hint
This could be solved by identifying the
$...$
areas. If not present, simply use the existing flow. But if present, wrap the part to the left and right of it inside\text{...}
blocks.So
A$B$C
would be turned into\text{A}B\text{C}
.Be careful though, that there could be multiple
$
-sections.See $\frac{x}{2}$ and also $\frac{y}{2}$
.$\frac{x}{2}$ nice
See $\frac{x}{2}$
.The previous example
Hello, look at this $\frac{x}{2}$, nice stuff!
would then be turned intoand send like that to the TeX-engine.
The text was updated successfully, but these errors were encountered: