Skip to content

Commit

Permalink
Added option to disable printing unicode symbols by setting the 'CADA…
Browse files Browse the repository at this point in the history
…BRA_NO_UNICODE' environment variable.
  • Loading branch information
kpeeters committed Oct 14, 2017
1 parent cf87de9 commit 291dd65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions core/DisplayTerminal.cc
Expand Up @@ -448,7 +448,10 @@ void DisplayTerminal::print_intlike(std::ostream& str, Ex::iterator it)
{
if(*it->multiplier!=1)
print_multiplier(str, it);
str << symmap[*it->name] << "(";
if(getenv("CADABRA_NO_UNICODE")!=0)
str << *it->name << "(";
else
str << symmap[*it->name] << "(";
Ex::sibling_iterator sib=tree.begin(it);
dispatch(str, sib);
++sib;
Expand Down Expand Up @@ -557,7 +560,7 @@ void DisplayTerminal::print_other(std::ostream& str, Ex::iterator it)

if(needs_extra_brackets) str << "{"; // to prevent double sup/sub script errors
auto rn = symmap.find(*it->name);
if(rn!=symmap.end())
if(rn!=symmap.end() && getenv("CADABRA_NO_UNICODE")==0)
str << rn->second;
else
str << *it->name;
Expand Down
2 changes: 1 addition & 1 deletion web2/cadabra2/source/help.html
Expand Up @@ -10,7 +10,7 @@ <h1>Help</h1>
<h2>Forum</h2>

<p>All questions about using Cadabra can be posted on
the <a href="http://cadabra.science/qa">Cadabra Q&amp;A</a> forum. The forum accepts LaTeX
the <a href="/qa">Cadabra Q&amp;A</a> forum. The forum accepts LaTeX
formulas and is fully searchable.
</p>

Expand Down

0 comments on commit 291dd65

Please sign in to comment.