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

Parse \(....\) just like $....$ #986

Open
RaphaelArkadyMeyerNYU opened this issue Nov 21, 2022 · 1 comment
Open

Parse \(....\) just like $....$ #986

RaphaelArkadyMeyerNYU opened this issue Nov 21, 2022 · 1 comment

Comments

@RaphaelArkadyMeyerNYU
Copy link
Contributor

When I write latex, I'm used to using (....) for inline math. It's a low-importance quality-of-life change, but how hard would it be to add this notation into the franklinjl parsing?

I'd be happy to do the work myself for what it's worth.

Thanks!

tlienart added a commit that referenced this issue Nov 25, 2022
@tlienart
Copy link
Owner

tlienart commented Nov 25, 2022

Hello @RaphaelArkadyMeyerNYU,

If you get Franklin off the branch pmath-i986 you can do the following:

julia> using Franklin
julia> Franklin.enable_pmath()
julia> fd2html(raw"""
       * old way $x=y$
       * new way \(x=y\)
       """) |> println
<ul>
<li><p>old way \(x=y\)</p>
</li>
<li><p>new way \(x=y\)</p>
</li>
</ul>

julia> Franklin.disable_pmath()
julia> fd2html(raw"""
       * old way $x=y$
       * new way \(x=y\)
       """) |> println
<ul>
<li><p>old way \(x=y\)</p>
</li>
<li><p>new way &#40;x&#61;y&#41;</p>
</li>
</ul>

So you'd just call enable_pmath() before calling serve.

I likely won't put this into master though as I'm refraining from putting new stuff in Franklin lest it should break other things, the new stuff should ultimately all go in Xranklin (which is more or less done bar gaps in docs which I'm struggling to find time to fill).

I hope this will be somewhat helpful to you though

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

No branches or pull requests

2 participants