Fix LaTeX ColorV2 Extension - Greg Bernhardt

  • LaTeX
  • Thread starter pbuk
  • Start date
In summary, the conversation discusses an issue with the color extension in LaTeX not working properly. The solution involves changing the "colorv2" key to lowercase in the "autoload" section of the check-for-tex.js file. Other options, such as using the proper MathJax V3 color module, are also mentioned. The problem is resolved after a force refresh and cache invalidation.
  • #1
pbuk
Science Advisor
Homework Helper
Gold Member
4,602
2,894
@Greg Bernhardt: the ## \LaTeX ## color extension doesn't seem to be working. MathJax is downloading the colorv2 extension but in check-for-tex.js you have
JavaScript:
autoload: {
  color: [],
  colorV2: ['color'],
}
I'm not sure if this will fix it* but I think it shoud be
JavaScript:
autoload: {
  color: [],
  colorv2: ['color'],
}
(note the lower case "v" in line 3).

* Edit: experiments elsewhere indicate that this will fix it.

* Edit2: you could of course delete both the color and colorv2 keys to use the 'proper' MathJax V3 color module which works the same way ## \TeX ## does, but this would break colors in old posts under MathJax V2 (if there are any).
 
Last edited:
  • Like
Likes Greg Bernhardt and robphy
Physics news on Phys.org
  • #3
Greg Bernhardt said:
ok fixed, try now

## \color{red}{x} + \color{blue}{y} ##
 
  • #4
pbuk said:
## \color{red}{x} + \color{blue}{y} ##
I'm still getting the old https://www.physicsforums.com/check-for-tex.js file with colorV2:

JavaScript:
(function(){var body=document.body.textContent;if(body.match(/(\$\$|##|\[tex\]|\[itex\])/)){if(!window.MathJax){window.MathJax={loader:{load:["ui/lazy"],source:{"ui/lazy":"https://www.physicsforums.com/insights/lazy.js"}},tex:{inlineMath:[["[itex]","[/itex]"],["##","##"]],displayMath:[["[tex]","[/tex]"],["$$","$$"]],processEscapes:true,macros:{href:"{}"},tags:"ams",autoload:{color:[],colorV2:["color"]}},options:{skipHtmlTags:["script","noscript","style","textarea","pre","code"],ignoreHtmlClass:"tex2jax_ignore|dno",processHtmlClass:"tex2jax_process"}};}
var script=document.createElement("script");script.src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js";script.async=true;document.head.appendChild(script);}})();
even after a force refresh - may need a cache invalidation?
 
  • #7
All good now :biggrin:
 
  • Love
Likes Greg Bernhardt

Related to Fix LaTeX ColorV2 Extension - Greg Bernhardt

1. What is the "Fix LaTeX ColorV2 Extension - Greg Bernhardt"?

The "Fix LaTeX ColorV2 Extension - Greg Bernhardt" is an extension for the popular typesetting software LaTeX. It aims to fix any issues related to color in LaTeX documents and is maintained by the developer Greg Bernhardt.

2. How does the extension fix color issues in LaTeX?

The extension provides a set of commands and options that allow users to easily define and manipulate colors in their LaTeX documents. It also includes bug fixes and compatibility updates for various LaTeX packages that deal with color.

3. Is the "Fix LaTeX ColorV2 Extension - Greg Bernhardt" free to use?

Yes, the extension is completely free to use and can be downloaded from the official LaTeX package repository. It is also open-source, so users can contribute to its development and suggest improvements.

4. I am new to LaTeX, can I still use this extension?

Yes, the extension is designed to be user-friendly and can be used by both beginners and experienced users. It comes with detailed documentation and examples to help users understand how to use it.

5. How often is the "Fix LaTeX ColorV2 Extension - Greg Bernhardt" updated?

The extension is updated regularly to fix any reported bugs and add new features. Users can check the official repository for updates or subscribe to notifications to stay informed about the latest version.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
288
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
Replies
5
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Sticky
  • Feedback and Announcements
Replies
2
Views
495K
Back
Top