Tweaking Latex rendering (for GitHub pages)

  • LaTeX
  • Thread starter ibkev
  • Start date
  • Tags
    Latex
In summary, I'm experimenting with using GitHub pages in combination with Jekyll to make a blog that allows me to write Latex equations. I've noticed that the rendered output looks slightly different, spacing-wise, from latex rendering here. I think this is due to the use of MathJax, which is a different rendering backend than PhysicsForums. I've played around with Wordpress but by default they add drop-shadows to all equations whether they're mid-paragraph or not (!) I've learned that to remove the shadows you have to pay in order to get the level of control you need. So I switched to Github Pages - which is pretty slick actually, especially since everything you write is in a git repo and therefore
  • #1
ibkev
131
60
Hi there - I'm experimenting with using GitHub pages in combination with Jekyll to make a blog that allows me to write Latex equations. I've noticed is that the rendered output looks slightly different, spacing-wise, from latex rendering here. In particular I find that a \frac will actually touch what follows it when there needs to be a bit of space in between.

To solve I've used a \<space> after the \frac but does anyone know what config setting physicsforums use? I'd like to dig around to see what tweaking is possible on GitHub pages but I'm not sure what to look for.

It's worth mentioning that I'm a total Latex newb as well.
 
Physics news on Phys.org
  • #2
Perhaps @Greg Bernhardt can answer this question.

Our site uses MathPad for latex rendering so that's another place where you can look for answers.
 
  • #3
jedishrfu said:
Our site uses MathPad for latex rendering so that's another place where you can look for answers.
I think you mean MathJax :wink:
 
  • Like
Likes Greg Bernhardt
  • #4
Check Wordpress, they have a good implementation for LaTeX
 
  • #5
I played around with Wordpress but by default they add drop-shadows to all equations whether they're mid-paragraph or not (!) I've learned that to remove the shadows you have to pay in order to get the level of control you need. So I switched to Github Pages - which is pretty slick actually, especially since everything you write is in a git repo and therefore you can have a local copy at all times. I like it because you write in a simplified grammar called "Markdown" which is much like editing a wiki but adding MathJax equations is similar to adding equations here on PhysicsForums ... use $$ <equation> $$

Anyways, does anyone know what little tweaks to the default MathJax rendering configuration were done here at physicsforums? @Greg Bernhardt?
 
  • #6
ibkev said:
Anyways, does anyone know what little tweaks to the default MathJax rendering configuration were done here at physicsforums?
The config is available by viewing the source of any PF page (nearly). It's between the head tags.
 
  • #7
Greg Bernhardt said:
The config is available by viewing the source of any PF page (nearly). It's between the head tags.

Doh! Thanks - as you can see I'm still learning how all this www stuff works LOL!
 

1. How do I change the font size in my LaTeX rendering for GitHub pages?

To change the font size in your LaTeX rendering for GitHub pages, you can use the \fontsize{size}{skip} command before your text. The size parameter determines the font size, while the skip parameter determines the distance between the lines. You can experiment with different values until you achieve the desired font size.

2. Can I use custom LaTeX packages in my GitHub pages?

Yes, you can use custom LaTeX packages in your GitHub pages by including the \usepackage{package name} command in your LaTeX code. However, keep in mind that GitHub pages only supports a limited number of packages, so make sure to check the list of supported packages before using them.

3. How can I add mathematical symbols and equations in my GitHub pages using LaTeX?

To add mathematical symbols and equations in your GitHub pages using LaTeX, you can use the $ symbol to enclose your mathematical expression. For example, $\sum_{i=1}^{n} i$ will render as i=1n i. You can also use the equation environment for more complex equations.

4. Is it possible to include images in my LaTeX rendering for GitHub pages?

Yes, you can include images in your LaTeX rendering for GitHub pages by using the \includegraphics{image file name} command. Make sure to upload the image file to your GitHub repository and specify the correct file path in the command. You can also adjust the size and position of the image using additional parameters in the command.

5. How do I troubleshoot issues with my LaTeX rendering in GitHub pages?

If you encounter issues with your LaTeX rendering in GitHub pages, make sure to check for any typos or errors in your code. Also, make sure that you are using supported packages and commands. If the issue persists, you can try clearing your browser's cache or using a different browser. You can also seek help from the GitHub community or refer to their documentation for further troubleshooting steps.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
278
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
2
Replies
39
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
Back
Top