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

LaTeX support? #38

Open
wrshoemaker opened this Issue Jun 26, 2017 · 3 comments

Comments

4 participants
@wrshoemaker

wrshoemaker commented Jun 26, 2017

Love the style. Just made my personal website with it. Are there any plans to support LaTeX in the future? Or is that feature already supported?

@budparr

This comment has been minimized.

Show comment
Hide comment
@budparr

budparr Jun 27, 2017

Owner

Thank you, @wrshoemaker - I don't know how to do that. Maybe @rdwatters knows?

Owner

budparr commented Jun 27, 2017

Thank you, @wrshoemaker - I don't know how to do that. Maybe @rdwatters knows?

@rdwatters

This comment has been minimized.

Show comment
Hide comment
@rdwatters

rdwatters Jun 27, 2017

I have very little knowledge of LaTeX. Sorry @wrshoemaker, @budparr I've used a hack with Pandoc, Word default styles, and some ugly AppleScript when I needed to generate both HTML pages and PDF from a single markdown file.

I'm sure a LaTeX guru could make quick work of this with custom outputs, but in 2017, I feel like it's a better use of time to focus on a solid print stylesheet in the event users want to Ctrl+P>Save to PDF...and most of my use cases don't care printing and print formats, TBH...

rdwatters commented Jun 27, 2017

I have very little knowledge of LaTeX. Sorry @wrshoemaker, @budparr I've used a hack with Pandoc, Word default styles, and some ugly AppleScript when I needed to generate both HTML pages and PDF from a single markdown file.

I'm sure a LaTeX guru could make quick work of this with custom outputs, but in 2017, I feel like it's a better use of time to focus on a solid print stylesheet in the event users want to Ctrl+P>Save to PDF...and most of my use cases don't care printing and print formats, TBH...

@budparr budparr added this to Under Consideration in 2.0 Oct 12, 2017

@budparr budparr added this to the 2.0 milestone Oct 12, 2017

@piever

This comment has been minimized.

Show comment
Hide comment
@piever

piever Feb 23, 2018

Not sure if this can be streamlined, but the following worked for me.

  1. Add this code snippet in the "partials":
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          <!-- inlineMath: [['$','$'], ['\\(','\\)']], -->
          <!-- displayMath: [['$$','$$'], ['\\[','\\]']], -->
          processEscapes: true,
          processEnvironments: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'],
          TeX: { equationNumbers: { autoNumber: "AMS" },
          extensions: ["AMSmath.js", "AMSsymbols.js"] }
          },
        CommonHTML: { linebreaks: { automatic: true } },
        "HTML-CSS": { linebreaks: { automatic: true } },
        SVG: { linebreaks: { automatic: true } }
      });
    </script>
    <script type="text/javascript" async
            src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML">
    </script>
  1. Add markup: mmark at the beginning of the post:
date: 2017-11-15T00:17:23Z
markup: mmark
draft: false
  1. Enclose equations in dollars:

$$\varphi = \frac{1}{\varphi-1}$$

Example is from here, code here.

The only part where the theme could help is in including the code snippet above by default I guess.

piever commented Feb 23, 2018

Not sure if this can be streamlined, but the following worked for me.

  1. Add this code snippet in the "partials":
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          <!-- inlineMath: [['$','$'], ['\\(','\\)']], -->
          <!-- displayMath: [['$$','$$'], ['\\[','\\]']], -->
          processEscapes: true,
          processEnvironments: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'],
          TeX: { equationNumbers: { autoNumber: "AMS" },
          extensions: ["AMSmath.js", "AMSsymbols.js"] }
          },
        CommonHTML: { linebreaks: { automatic: true } },
        "HTML-CSS": { linebreaks: { automatic: true } },
        SVG: { linebreaks: { automatic: true } }
      });
    </script>
    <script type="text/javascript" async
            src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML">
    </script>
  1. Add markup: mmark at the beginning of the post:
date: 2017-11-15T00:17:23Z
markup: mmark
draft: false
  1. Enclose equations in dollars:

$$\varphi = \frac{1}{\varphi-1}$$

Example is from here, code here.

The only part where the theme could help is in including the code snippet above by default I guess.

@budparr budparr self-assigned this Feb 23, 2018

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