wxMaxima
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
test_IntegralToTeX.cpp File Reference

Pins the LaTeX export of an integral's "d" (GH #972): the "d" of "dx"/ "d\theta"/... must render upright (\mathrm{d}), not in math mode's default italic. More...

#include <wx/app.h>
#include <wx/bitmap.h>
#include <wx/dcmemory.h>
#include <wx/log.h>
#include "Configuration.h"
#include "MathParser.h"
#include "cells/Cell.h"
#include <catch2/catch.hpp>
Include dependency graph for test_IntegralToTeX.cpp:

Data Structures

class  TestApp
 

Functions

 SCENARIO ("A definite integral's LaTeX export renders \"d\" upright")
 
 SCENARIO ("An indefinite integral's LaTeX export renders \"d\" upright")
 
 SCENARIO ("GH #972's own nested double-integral example exports both differentials upright")
 
 wxDECLARE_APP (TestApp)
 
int main (int argc, char **argv)
 

Detailed Description

Pins the LaTeX export of an integral's "d" (GH #972): the "d" of "dx"/ "d\theta"/... must render upright (\mathrm{d}), not in math mode's default italic.

wxMathML.lisp's wxxml-int emits this "d" as its own ("special constant") tag – the same style e/i/pi/inf/minf use – but unlike those, "d" fell all the way through TextCell::ToTeX()'s early-returning TS_SPECIAL_CONSTANT branch as a bare, unstyled character, since none of that branch's specific cases matched it.

The math content is two hand-written <in> (IntCell) XML fragments, parsed through the real MathParser exactly like wxMathML.lisp would emit them for the definite and indefinite forms of integrate() – no live Maxima needed.