File tree Expand file tree Collapse file tree 4 files changed +23
-3
lines changed Expand file tree Collapse file tree 4 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 11set (CADABRA_VERSION_MAJOR 2)
22set (CADABRA_VERSION_MINOR 3)
33set (CADABRA_VERSION_PATCH 9)
4- set (CADABRA_VERSION_TWEAK 4 )
4+ set (CADABRA_VERSION_TWEAK 5 )
55set (COPYRIGHT_YEARS "2001-2022" )
66math (EXPR SYSTEM_BITS "${CMAKE_SIZEOF_VOID_P} * 8" )
77find_program (GIT git PATHS ${GIT_DIR} )
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ namespace cadabra {
3333 class Properties ;
3434 class Kernel ;
3535 class Accent ;
36+ class LaTeXForm ;
3637 class Ex_comparator ;
3738
3839 class pattern {
@@ -375,7 +376,8 @@ namespace cadabra {
375376 // tree, because it would lead to an endless recursion (and it would
376377 // not make sense anyway). At the moment, this is only for Accent.
377378 bool ignore_properties=false ;
378- if (std::is_same<T, Accent>::value) ignore_properties=true ;
379+ if (std::is_same<T, Accent>::value)
380+ ignore_properties=true ;
379381
380382 for (;;) {
381383 property_map_t ::const_iterator walk=pit.first ;
@@ -410,6 +412,11 @@ namespace cadabra {
410412 else break ;
411413 }
412414
415+ // Do not walk down the tree if the property cannot be passed up the tree.
416+ // FIXME: see issue/259.
417+ if (std::is_same<T, LaTeXForm>::value)
418+ inherits=false ;
419+
413420 // If no property was found, figure out whether a property is inherited from a child node.
414421 if (!ret.first && inherits) {
415422 // std::cout << "no match but perhaps inheritance?" << std::endl;
Original file line number Diff line number Diff line change 11
22def test01():
3+ __cdbkernel__ = create_scope()
34 ex:= 3 A_{m n} B^{m n} + q(x) r s;
45 tst=Ex(repr(ex))
56 assert(tst==ex)
67 print("Test 01 passed")
78
89test01()
910
11+ def test02():
12+ __cdbkernel__ = create_scope()
13+ \psia::LaTeXForm("\psi_{a}").
14+ \bar{#}::DiracBar.
15+ ex:= \bar{\psia};
16+ print(ex._latex_())
17+ assert(ex._latex_()==r"\bar{\psi_{a}}")
18+ print("Test 02 passed")
1019
20+ test02()
21+
Original file line number Diff line number Diff line change @@ -29,7 +29,9 @@ <h3>github master (2.3.9)</h3>
2929 < li > Fix for automatic cleanup of < tt > Diagonal</ tt > objects.</ li >
3030 < li > Fix crash with tab-completion.</ li >
3131 < li > Make '+' operator add lists component-wise, and introduce the
32- tie operator '~' to join lists.</ li >
32+ tie operator '~' and < tt > join</ tt > function to join lists.</ li >
33+ < li > Fix printing of objects with < tt > LaTeXForm</ tt > which are
34+ wrapped in another LaTeX operator.</ li >
3335</ ul >
3436
3537< a name ="2.3.8 "> </ a >
You can’t perform that action at this time.
0 commit comments