From c7ffdacfcc0f081d5e937d67b52f504a19a18cc1 Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Wed, 3 Aug 2022 09:55:45 +0200 Subject: [PATCH] JKQTMathText: added support for \\bigl,\\bigr,\\Bigr,... commands for fixed-size but enlarged paramtheses --- doc/dox/jkqtmathtext_supportedlatex.dox | 17 ++- doc/dox/todo.dox | 1 - doc/dox/whatsnew.dox | 1 + .../jkqtmathtext/jkqtmathtext_brace_bbig.png | Bin 0 -> 3316 bytes .../jkqtmathtext/jkqtmathtext_brace_bbigg.png | Bin 0 -> 4848 bytes .../jkqtmathtext/jkqtmathtext_brace_big.png | Bin 0 -> 3207 bytes .../jkqtmathtext_brace_bigfamily.png | Bin 0 -> 6557 bytes .../jkqtmathtext/jkqtmathtext_brace_bigg.png | Bin 0 -> 4125 bytes .../jkqtmathtext_brace_lcorner.png | Bin 0 -> 748 bytes .../jkqtmathtext_brace_ucorner.png | Bin 0 -> 731 bytes examples/jkqtmathtext_test/testform.cpp | 4 + lib/jkqtmathtext/jkqtmathtext.cpp | 94 +++++++++++++++- lib/jkqtmathtext/jkqtmathtext.h | 4 + lib/jkqtmathtext/jkqtmathtexttools.cpp | 33 ++++-- lib/jkqtmathtext/jkqtmathtexttools.h | 2 +- .../nodes/jkqtmathtextinstructionnode.cpp | 26 +++++ .../nodes/jkqtmathtextwhitespacenode.cpp | 101 +++++++++++++++++- .../nodes/jkqtmathtextwhitespacenode.h | 51 ++++++++- 18 files changed, 312 insertions(+), 22 deletions(-) create mode 100644 doc/images/jkqtmathtext/jkqtmathtext_brace_bbig.png create mode 100644 doc/images/jkqtmathtext/jkqtmathtext_brace_bbigg.png create mode 100644 doc/images/jkqtmathtext/jkqtmathtext_brace_big.png create mode 100644 doc/images/jkqtmathtext/jkqtmathtext_brace_bigfamily.png create mode 100644 doc/images/jkqtmathtext/jkqtmathtext_brace_bigg.png create mode 100644 doc/images/jkqtmathtext/jkqtmathtext_brace_lcorner.png create mode 100644 doc/images/jkqtmathtext/jkqtmathtext_brace_ucorner.png diff --git a/doc/dox/jkqtmathtext_supportedlatex.dox b/doc/dox/jkqtmathtext_supportedlatex.dox index a1cb01dcce..d92a1299d1 100644 --- a/doc/dox/jkqtmathtext_supportedlatex.dox +++ b/doc/dox/jkqtmathtext_supportedlatex.dox @@ -109,13 +109,24 @@ - \c \\left( \c \\right) : default meaning (), \image html jkqtmathtext/jkqtmathtext_brace_round.png - \c \\left[ \c \\right] : default meaning [], \image html jkqtmathtext/jkqtmathtext_brace_rect.png - \c \\left\\{ \c \\right\\} : default meaning {}, \image html jkqtmathtext/jkqtmathtext_brace_curly.png - - \c \\left< \c \\right> : "averaging" braces , \image html jkqtmathtext/jkqtmathtext_brace_tri.png + - \c \\left\\langle \c \\right\\rangle : "averaging" braces , \image html jkqtmathtext/jkqtmathtext_brace_tri.png - \c \\left\\lfloor \c \\right\\rfloor : floor braces , \image html jkqtmathtext/jkqtmathtext_brace_floor.png - - \c \\left~ \c \\right~ \c \\left\\lceil \c \\right\\rceil : ceil braces , \image html jkqtmathtext/jkqtmathtext_brace_ceil.png - - \c \\left| \c \\right| : absolute value braces | |, \image html jkqtmathtext/jkqtmathtext_brace_oneline.png + - \c \\left\\lceil \c \\right\\rceil : ceil braces , \image html jkqtmathtext/jkqtmathtext_brace_ceil.png + - \c \\left| \c \\right| : absolute value braces | |, \image html jkqtmathtext/jkqtmathtext_bracejkqtmathtext_brace_ucorner_oneline.png - \c \\left\\| \c \\right\\| \endcode : norm braces || ||, \image html jkqtmathtext/jkqtmathtext_brace_dblline.png + - \c \\left\\llcorner \c \\right\\lrcorner : lower corner braces , \image html jkqtmathtext/jkqtmathtext_brace_lcorner.png + - \c \\left\\ulcorner \c \\right\\urcorner : upper corner braces , \image html jkqtmathtext/.png - You can use \c \\left. or \c \\right. to have only right or only left brace . + + In additional fixed-size parantheses are available with the following family of instructions: + - \c \\bigl([\\{\\langle... , \c \\big([\\{\\langle... and \c \\bigr)]\\}\\rangle... \image html jkqtmathtext/jkqtmathtext_brace_big.png + - \c \\Bigl([\\{\\langle... , \c \\Big([\\{\\langle... and \c \\Bigr)]\\}\\rangle... \image html jkqtmathtext/jkqtmathtext_brace_bbig.png + - \c \\biggl([\\{\\langle... , \c \\bigg([\\{\\langle... and \c \\biggr)]\\}\\rangle... \image html jkqtmathtext/jkqtmathtext_brace_bigg.png + - \c \\Biggl([\\{\\langle... , \c \\Bigg([\\{\\langle... and \c \\Biggr)]\\}\\rangle... \image html jkqtmathtext/jkqtmathtext_brace_bbigg.png + . + They use the same rendering code as the standard \c \\left and \c \\right instructions. Here is an example: + \image html jkqtmathtext/jkqtmathtext_brace_bigfamily.png generated by $\Biggl\langle\biggl\{\Bigl[\bigl( r^{123}\bigr)\Bigr]\biggr\}\Biggr\rangle$ \subsection JKQTMathTextSuppoertedLaTeXRoots Roots There are also instructions that allow to write roots: diff --git a/doc/dox/todo.dox b/doc/dox/todo.dox index 558cb9ce4f..e29a488cf0 100644 --- a/doc/dox/todo.dox +++ b/doc/dox/todo.dox @@ -40,7 +40,6 @@ This page lists several todos and wishes for future version of JKQTPlotter
  • JKQTMathText:
  • diff --git a/doc/images/jkqtmathtext/jkqtmathtext_brace_bbig.png b/doc/images/jkqtmathtext/jkqtmathtext_brace_bbig.png new file mode 100644 index 0000000000000000000000000000000000000000..21940b3f4c3ae69609769349765a0448d69dabf0 GIT binary patch literal 3316 zcmYLMc{r3`8%9aVk~O<9WSNi>#=aY}jcx4Agqk18-eQm?nFwQ_NErJvhDg-d_iP!) zWG_py@1gkK{`&qn@43!-&-+~0d7k^epZkroFf(LkA`?G2N>{+bimWi z9q|H~Xait|Iy6;-0xQ7cyqC7AHVq9i@$w&cdSHF&k&%4>4Gp*Wzd;Lyfwq86_CS4j zpp~y@V2HcF2aTb>hsVQ!`@VrLHWz_UnEr$6Xg6MGX|$4ovkZvwHIrq>ClY075;Pj`G`D(Lo%o)eDoEp}+wT)BqSmQ60_?=tg-P({9k$$FpF+2(K~ zqn@dc0Z^O1muz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)LVPic$QiqW5qPD8qVRQcHT?MaM>ngdw5OK;EXykl1`E4l zxt|#w<~>kmkw@2muPdGxv`u`ny97WL**-ixY@Vx;+{b)$e6T(VV2oK<;=sWU9R|1$Jq7Gc@Kay5yUu0JndbsIfl>oy7qt-8@i zIr4KiO9kSEHHF>)EiMId1mClv{vuxd|Dq`>V&R6!3nVA{TcAko>uC8vOUW0GXn~y}CVD~}D zLQgU{p`}F&`+GQ>FfuX%6OAk`z79R&87(0D%NgGvqyT2YDDI^s>2@Bg!mV4=)6>*E z<)?d+rJ=yP_;{w#94W=z=cBY#J2XJH>;D9W@!JPqxyAggG4tu_@UyUB0Tj7J`=5BF zp=&QK?3)bmweO*7BjvpBk5GWtXuR@LSa0MoRkg?c z$j>*zMj4<@&CLmLqUfEFpdeEd6EVfvh~$^*r;%oGs;El=iSD2SV(~{O_6OoAx&ZK0 zpkBQuk^~53RC-DM>E1P|*_N3qT1G9SaEwpi|J(hJXK-sG3t_YOP;c)-taMQc>R`41e8#n;;1}`r!Xyp|E7f{KX^x15+2?Q0kJeW^t86B+!D0ASS z43IT?Ms_-XOn*)J~u zJT@YVRva-7x2He;5++2(w;E_ZZtn34`&;(2wl&c{ zuDnXVGts;vA|fb_jV^f2J!pYJ0@;b1axqiV?K>pw&tptl&C`9906ef6vq?E+CJ^YA qx#>y2Qs`Xwq5pUOLcM**!k0faPtj@HI|4r?G*Epry(%5I$o~QBf>`GO literal 0 HcmV?d00001 diff --git a/doc/images/jkqtmathtext/jkqtmathtext_brace_bbigg.png b/doc/images/jkqtmathtext/jkqtmathtext_brace_bbigg.png new file mode 100644 index 0000000000000000000000000000000000000000..6be7aa544b6040520d557c294194332d219ea447 GIT binary patch literal 4848 zcmY*dc|26#`=7zs8cRwHWgSFenCyGjDa06AvW#_9lYN(jm}G);s=iGaq=Xt;1Pn?;lAsZ_nD+mN)LmBCzfqNBDh|F}r zwa%8~D{uq*p$)Hs%Bbg8feHgo$3zDNsz^L_FDn%h2$3wXw5mt%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ftCfk;JdU+L8dOS-@Q&mCft)gIJ|ITmYvrfZc zEMUO4&^E^IpI)*Z{sFi|A-?g)Osk+smS(tW>Ia6WSH`S@gO&f2seViS6&W=*vNhQb zGt@&W2OL|b0bt`?1!x!`H_1$EkxT+P|0FQImBbA2D^m3t2?<`Uf7AMEnU^MNsSm*v zUTC9BtBBSu9LCbJ?dV{RAo!-TCsQjzAdrc0HuYXI4Czi88c^*(fKu$pl(rrnH^1@# z#-xl4*5(hsrDDgkVP3TvSb8XU&}RKYcRY`5LtUNqFO?h!)x*PsnT5qE;?+D05sgTH zu#!tC#NSf?vy#V`umo^{SCu`KD{>bv_Ph#vdrq0Yu&|I<&RNgamM>M`{aatEH+FoQ z2k%|>DDpxVRw~{&G_(O=OD_~`cPsi~+Tr1Uzt;P?I6GgSI>Us0w*BkZqmKB#+V=Sm z@l0%d@O^?ov*e{q(bTAMVSAoDJk1JZ(*YO^XJdQes6Fi4!Z;J6V)v2vd7oM zjF@gRczG%0oW`gj{pDw literal 0 HcmV?d00001 diff --git a/doc/images/jkqtmathtext/jkqtmathtext_brace_big.png b/doc/images/jkqtmathtext/jkqtmathtext_brace_big.png new file mode 100644 index 0000000000000000000000000000000000000000..493bcd06d1682b22843769bf88d225dafae3725a GIT binary patch literal 3207 zcmYjUc{~&RA0LK|60;CvVc5H*(G|5S zP(qR%yp!Bw!;?~i6T$$F31ML|iIK5M0UjU$L~@sCk99vA@cCLG0U8J$G);e2jW8M_ zY31xXSDengVe8I@R?%EZ4jm3NZVL2H&tkCel}>lLvc13hpMh#FLbRXkGB=qsewhf` zzFVs&Cs&rQwzL?vSXw4V)V+S?zp~`8dG-9Ccb3w=jdoe4oXQjxMp8+@0T2sRAcK}s zFq&~6&zOF1G3Nw-`fSB#WxVOt^OH_SXIt6XQD4&xQr#EzTW1VKC%kCEWr&@%-a1~K z(INM0-SR^$st%VSU8_Ok__1^F#m?1!>OGDkp)BBCuKby!*GR`kvSaawdX{g*&8y!JQ-GA|u)4+nDDq67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=&yS1O(6NW?3mBzl(dppnsNl9Z ze-BwTa6Z!O#f>(pQywBgUllONy*|8sq?g%c_kbBFOek!)EJ-v!vISD@?r#6O7 zY-L3Ga?@HFL_bA$Gnaq`rr66KIv;6y9a-rQLMoo6)W&`bD-IgnVsxgqI9q!|O&r$kf0*w>t zjgee9x6v_#n)Q4w(iXrs63znR-;l1KYLtLw*)QGh26Sl`I3m_`&mqovDu{2T`(c5Q zd$HOT3!5W{OYp{B+rWi&UDB_f19)M*Fj__wwcj<*ykOL{S;(q$9#egBx7AX(x3?Dz z1}o&3oA%?OrHd!H7t*?vc2DZPvQRc(-JSdtnURzJuKT;vvXYV#CgjW+-O6a^z(B^> z`1p7q<_;0zQmpsX&(2Q7=Zv$PTh3TjRn<^m5lMXw>z0~oUKtIj-->Bf5}_m|6?;fS zwwuX#eD3?xDAMroumR$~&#mx+p=@Pk<@$`u8q!WwRFn*%qHJy9Mg!{$r$E1`gkl-X z#t+v3NsBYr(5P!{WE|ftURj>eIuiz zDoRSo(*0s$Vh~wb)gTuanM$CAfXU&i7l3)69_U!#NOQIafkf3yJ+j$Awt%WJ7=QBl z@$c~aV5U7Oq6@7!4J^Rg+Pb3l!-sIg8GwZN`y4e-FRxO*SdWKrcTn=XAsGd+`!Vwp zA-tByGO*USiihO_EKO6pAFLH?S}x@{YiP=q?GwPhcKzs4d5Fdi3=X!pw`1pzcpVdo zI&Y<77M4QRmrE}wD#9fo9FB;`{!1VScvUP_F|-T_a1)Y+!Kn*}{y)V=x~m!B+4eyN k&h&1D{~Lh+@$)-;Ul*98uW8&U_$L5}4o>!e;DWOM10KJ>asU7T literal 0 HcmV?d00001 diff --git a/doc/images/jkqtmathtext/jkqtmathtext_brace_bigfamily.png b/doc/images/jkqtmathtext/jkqtmathtext_brace_bigfamily.png new file mode 100644 index 0000000000000000000000000000000000000000..8e8ca580afd7a2ae446f90eb0b9ea591af819579 GIT binary patch literal 6557 zcmb7JS3ncdwoT|l=miYy}dRqt1_f~nM-0-iY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@?E*HZK_{uS6YR#*UFaJpA+L*SA-UV3%4>PSXj@f~QI?%8H4do$6=GOiqOl5!UBB)AfRm zjt;iHJz}aYWMGXfluSa6{SPGX%~pCyFh{t6oHSk8s>Qx0SjS_r8r%!7qNQW%pfhLA zn6C7tiMRo4T0b;26gb!17kzry_#P=j$?$v>5Pv!HH%De3v(o6--~1wZY0LbfZ3ej; zI+~J>U2WLT=(ivfB`xRgX5vOT#<0Pieb4B?f~54u5SS@Z$g=R`ES`z$Tyi@xY4X zQ;EEEYVga*$Xs)D1fFA(*H8d6dA77`Y*tnlM22$FwzOmm)?9huKM`Y* literal 0 HcmV?d00001 diff --git a/doc/images/jkqtmathtext/jkqtmathtext_brace_bigg.png b/doc/images/jkqtmathtext/jkqtmathtext_brace_bigg.png new file mode 100644 index 0000000000000000000000000000000000000000..2c405302512c694a0fc4e820ed5d4a9503e43829 GIT binary patch literal 4125 zcmZvfc{r3&`^W8MLiT-$$&w}6*X+w!#+sCUnF)ijOGqe7gEGcW!cdkJGbvfJg^{s_ zh7ht3LMZF+>HY8bUhlcC^E}siuJdf?-1qnUxl^s7CQOWcj1&|UOb}B;Ti}cZ`h5l} z;Mlf^ga9YXP+Jpyin>98HDEwl@vPf#fA7a$sUaI^WwYriE(8Da5;Ottk51ANh|KI&%1cf4TgUh1SSKZ{Hr zSxR>K3pPUck7u=YazR^QEj=Q-{<~rsYefPk#OiPRKTx-0I?SMG{YN` zN++T*{lA7j)8zjC{*#lFpFe-9hc0`=V3~e&Fc@rpettQJlzOt$D@;jA`R3D^Mg`G* zvd*Qds%q?|mD^kQj*din$hbKIuBxQeo|-9U!o|gf8NS=X^wK0n#R zG}82D2<{yoT3K1W#FPAIThtX4LbhjHG0TQCWb<6PbV1FC_J@?*a?T3z21{&F@WFqwu|hX=M4y z_wUYTPATjX&>#KU@Btnr9<)V8TiXo{jiU)CWQ7vTI=mNX-Q6!vZKmu8i_}B+$8VV! z85L_rW`GfynVIo+Q5zGlffo%7SYYCQv{RZP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OzjfIB*~a28qDKt<=dR9IC^8mtacSc45Mbm~Qa}mn`wl7JrWe1YI@2y?>|0c0aX_u__1p5yz|e0|Mj~)>FVQ;0T$Cww{G)wJ#sT= znceK=mpiwquD<U5?JW U?z(LbFflTCy85}Sb4q9e07OwrbN~PV literal 0 HcmV?d00001 diff --git a/doc/images/jkqtmathtext/jkqtmathtext_brace_ucorner.png b/doc/images/jkqtmathtext/jkqtmathtext_brace_ucorner.png new file mode 100644 index 0000000000000000000000000000000000000000..8513bb52291b5c8292fb9e8ec5c4ed249261e05d GIT binary patch literal 731 zcmeAS@N?(olHy`uVBq!ia0vp^SwL*g!2~3;gFRjXDaPU;cPEB*=VU+}mUKs7M+SzC z{oH>NS%G}c0*}aI1_m)z5N7lYQuzQB6e@9zC<)F_D=AMbN@Z{_N=?lx&d4u`3*`W6 zVG8neaSW-5dwavTugO57#x4dF?mJ>gZUBW3g+aP0)e{{%jMTc zd=b^?H`=oAzhBPGhtHXfjjM}VX7r1Eo|t48bjH2wr-$dh!w)~aepg}hYH4P<)!YY7 z8^8UwU9(#Kr&#yVGk2@@Uh}@3xBKoP*5tF#izC9{AKf0cwr;~Go9o{0t4^eCPK`UH zy~Zg1Rre)Ry=m#Iv!Zt1e*2*5b*`E8#?5ozSM7b}{D11wNBhp1?^?B{fi=w3N_g9b zmABujmHE!`U&UeE{PB-M8^Omh_nr$sGzvA4y^Ur_(UB~}7-S&r+d`5wtwf~{xj};5_rgQIEr~XrIiuwFo z7amrI@h&*?{pWMNynX8`1fHrL>z?VKRlzrjQ6}r(qNkI!t9d4V`~B(V>rC}a_6Zx> z<6CO-b{n0)<#Y8*?fY=|!*@7mZtDzLF3*>rRkPsvCu9D)@T=>tJDv8D%lZ5@SF2`6 zkF7>-nd$6T#T%rGUilpS`M_z_eOcL_4DRFM^TkrX+6jMTW_#%T&RFqlWyuTmi$7TR zR<6xFZPd7Yx$e^2=5IEim)r5foj22D-w$=(Y@K~3UuX1-A>zX&oJ?(w#a<4*$<`0Sgwak~Awk77@dy))|aD-x!&w^EU{~44Y{(igTV|foS?J;<| L`njxgN@xNAc7I&{ literal 0 HcmV?d00001 diff --git a/examples/jkqtmathtext_test/testform.cpp b/examples/jkqtmathtext_test/testform.cpp index 06239d8dcb..272039dd75 100644 --- a/examples/jkqtmathtext_test/testform.cpp +++ b/examples/jkqtmathtext_test/testform.cpp @@ -195,6 +195,7 @@ TestForm::TestForm(QWidget *parent) : ui->cmbTestset->addItem("text/math: brace test: non-left/right top-corner", "text: \\ulcorner\\ulcorner\\ulcorner r^{123}\\urcorner\\urcorner\\urcorner -- math: $\\ulcorner\\ulcorner\\ulcorner r^{123}\\urcorner\\urcorner\\urcorner$"); ui->cmbTestset->addItem("text/math: brace test: non-left/right bottom-corner", "text: \\llcorner\\llcorner\\llcorner r^{123}\\lrcorner\\lrcorner\\lrcorner -- math: $\\llcorner\\llcorner\\llcorner r^{123}\\lrcorner\\lrcorner\\lrcorner$"); ui->cmbTestset->addItem("text/math: brace test: non-left/right { | }", "text: \\{r^{123}|r\\equiv 5\\} -- math: $\\{r^{123}|r\\equiv 5\\}$"); + ui->cmbTestset->addItem("math: brace test: bigl/Bigl/... mixed", "math: $\\Biggl\\langle\\biggl\\{\\Bigl[\\bigl(( r^{123})\\bigr)\\Bigr]\\biggr\\}\\Biggr\\rangle$"); ui->cmbTestset->addItem("text/math: sub-, superscript test", "text: r^{1234}_{321} r_{321}^{1234} -- math: $r^{1234}_{321} r_{321}^{1234} -- \\kappa^2 -- \\kappa_2 -- \\kappa_2^2$"); ui->cmbTestset->addItem("text/math: super-, subscript test", "text: r^{123}_{4321} r_{4321}^{123} -- math: $r^{123}_{4321} r_{4321}^{123} -- \\kappa^2 -- \\kappa_2 -- \\kappa_2^2$"); //ui->cmbTestset->addItem("", ""); @@ -462,6 +463,7 @@ QTreeWidgetItem *TestForm::createTree(JKQTMathTextNode *node, QTreeWidgetItem* p JKQTMathTextFracNode* fracN=dynamic_cast(node); JKQTMathTextMatrixNode* matrixN=dynamic_cast(node); JKQTMathTextDecoratedNode* decoN=dynamic_cast(node); + JKQTMathTextEmptyBoxNode* emptyN=dynamic_cast(node); QTreeWidgetItem* ti=nullptr; if (parent) ti=new QTreeWidgetItem(parent); @@ -527,6 +529,8 @@ QTreeWidgetItem *TestForm::createTree(JKQTMathTextNode *node, QTreeWidgetItem* p name=QString("WhitespaceNode :type=%1, count=%2").arg(spN->Type2String(spN->getWhitespaceType())).arg(spN->getWhitespaceCount()); } else if (txtN) { name=QString("TextNode: \'%1\'").arg(txtN->getText()); + } else if (emptyN) { + name=QString("EmptyBoxNode %1%2 x %3%4").arg(emptyN->getWidth()).arg(JKQTMathTextEmptyBoxNode::Units2String(emptyN->getWidthUnit())).arg(emptyN->getHeight()).arg(JKQTMathTextEmptyBoxNode::Units2String(emptyN->getHeightUnit())); } else { name=QString("unknown"); } diff --git a/lib/jkqtmathtext/jkqtmathtext.cpp b/lib/jkqtmathtext/jkqtmathtext.cpp index 43c62d4b0b..8db92080e2 100644 --- a/lib/jkqtmathtext/jkqtmathtext.cpp +++ b/lib/jkqtmathtext/jkqtmathtext.cpp @@ -1008,8 +1008,10 @@ JKQTMathText::tokenType JKQTMathText::getToken() { auto fAddUml=[](const QString& cmd, const QChar& letter, const QChar& ch) { QString i; if (cmd.size()>0 && !letter.isNull()) { - i="\\"+cmd+letter; - accentLetters[i]=ch; accentLetters_LenBackslash.insert(i.size()); + if (cmd.size()==1 && !cmd[0].isLetter()) { + i="\\"+cmd+letter; + accentLetters[i]=ch; accentLetters_LenBackslash.insert(i.size()); + } i="{\\"+cmd+letter+"}"; accentLetters[i]=ch; accentLetters_LenCurly.insert(i.size()); i="\\"+cmd+"{"+letter+"}"; @@ -1490,6 +1492,11 @@ JKQTMathText::tokenType JKQTMathText::getToken() { return currentToken=MTTnone; } +void JKQTMathText::giveBackToTokenizer(size_t count) +{ + currentTokenID-=count; +} + JKQTMathTextNode* JKQTMathText::parseLatexString(bool get, JKQTMathTextBraceType quitOnClosingBrace, const QString& quitOnEnvironmentEnd, bool quitOnClosingBracket) { //std::cout<<" entering parseLatexString()\n"; JKQTMathTextHorizontalListNode* nl=new JKQTMathTextHorizontalListNode(this); @@ -1499,7 +1506,7 @@ JKQTMathTextNode* JKQTMathText::parseLatexString(bool get, JKQTMathTextBraceType // initialize some static sets for easy and fast character lookup static QSet mathEnvironmentSpecialText; if (mathEnvironmentSpecialText.size()==0) { - mathEnvironmentSpecialText<<"+"<<"-"<<"="<<"*"<<"<"<<">"<<"|"<<"/"; + mathEnvironmentSpecialText<<"+"<<"-"<<"="<<"*"<<"<"<<">"; } bool getNew=true; @@ -1769,6 +1776,28 @@ JKQTMathTextNode* JKQTMathText::parseLatexString(bool get, JKQTMathTextBraceType } JKQTMathTextNode* JKQTMathText::parseInstruction(bool *_foundError, bool* getNew) { + static QHash big_instructions_family; + if (big_instructions_family.size()==0) { + big_instructions_family["big"]=0.85;//1.2; + big_instructions_family["bigl"]=0.85;//1.2; + big_instructions_family["bigm"]=0.85;//1.2; + big_instructions_family["bigr"]=0.85;//1.2; + + big_instructions_family["Big"]=1.15;//1.85; + big_instructions_family["Bigl"]=1.15;//1.85; + big_instructions_family["Bigm"]=1.15;//1.85; + big_instructions_family["Bigr"]=1.15;//1.85; + + big_instructions_family["bigg"]=1.45;//2.4; + big_instructions_family["biggl"]=1.45;//2.4; + big_instructions_family["biggm"]=1.45;//2.4; + big_instructions_family["biggr"]=1.45;//2.4; + + big_instructions_family["Bigg"]=1.75;//3.1; + big_instructions_family["Biggl"]=1.75;//3.1; + big_instructions_family["Biggm"]=1.75;//3.1; + big_instructions_family["Biggr"]=1.75;//3.1; + } if (currentToken!=MTTinstruction) { if (_foundError) *_foundError=true; if (getNew) *getNew=false; @@ -1788,6 +1817,42 @@ JKQTMathTextNode* JKQTMathText::parseInstruction(bool *_foundError, bool* getNew child->setSubSuperscriptAboveBelowNode(true); } if (getNew) *getNew=true; + } else if (big_instructions_family.contains(currentInstructionName)) { + // after \big,\bigl... we expect a symbol-instruction or at least one character of text + while (getToken()==MTTwhitespace);// eat whitespace + + JKQTMathTextBraceType bracetype=MTBTUnknown; + bool openbrace=true; + if (currentToken==MTTinstruction) { + bracetype=TokenName2JKQTMathTextBraceType(currentTokenName, &openbrace); + } else if (currentToken==MTTtext) { + const QString firstTokenChar(currentTokenName[0]); + bracetype=TokenName2JKQTMathTextBraceType(firstTokenChar, &openbrace); + if (bracetype!=MTBTUnknown) { + giveBackToTokenizer(currentTokenName.size()-1); + } else { + giveBackToTokenizer(currentTokenName.size()); + } + } else if (currentToken==MTTopenbracket) { + bracetype=MTBTSquareBracket; + openbrace=true; + } else if (currentToken==MTTclosebracket) { + bracetype=MTBTSquareBracket; + openbrace=false; + } else { + error_list.append(tr("error @ ch. %1: expected symbol-encoding instruction or a character after '\\%2' command, but found token type %3").arg(currentTokenID).arg(currentInstructionName).arg(tokenType2String(currentToken))); + } + if (bracetype!=MTBTUnknown) { + JKQTMathTextEmptyBoxNode* sizeChild=new JKQTMathTextEmptyBoxNode(this, 0, JKQTMathTextEmptyBoxNode::EBUem, big_instructions_family[currentInstructionName], JKQTMathTextEmptyBoxNode::EBUem); + if (openbrace) { + child=new JKQTMathTextBraceNode(this, bracetype, MTBTNone, sizeChild); + } else { + child=new JKQTMathTextBraceNode(this, MTBTNone, bracetype, sizeChild); + } + } else { + error_list.append(tr("error @ ch. %1: expected symbol-encoding instruction or character after '\\%2' command").arg(currentTokenID).arg(currentInstructionName)); + } + if (getNew) *getNew=true; } else if (JKQTMathTextModifiedTextPropsInstructionNode::supportsInstructionName(currentInstructionName)) { const size_t Nparams=JKQTMathTextModifiedTextPropsInstructionNode::countParametersOfInstruction(currentInstructionName); bool foundError=false; @@ -2128,6 +2193,29 @@ JKQTMathTextNode *JKQTMathText::getNodeTree() const { return parsedNode; } +QString JKQTMathText::tokenType2String(tokenType type) +{ + switch(type) { + case MTTnone: return "MTTnone"; + case MTTtext: return "MTTtext"; + case MTTinstruction: return "MTTinstruction"; + case MTTinstructionNewline: return "MTTinstructionNewline"; + case MTTunderscore: return "MTTunderscore"; + case MTThat: return "MTThat"; + case MTTdollar: return "MTTdollar"; + case MTTopenbrace: return "MTTopenbrace"; + case MTTclosebrace: return "MTTclosebrace"; + case MTTopenbracket: return "MTTopenbracket"; + case MTTclosebracket: return "MTTclosebracket"; + case MTTwhitespace: return "MTTwhitespace"; + case MTTampersand: return "MTTampersand"; + case MTThyphen: return "MTThyphen"; + case MTTendash: return "MTTendash"; + case MTTemdash: return "MTTemdash"; + } + return "???"; +} + diff --git a/lib/jkqtmathtext/jkqtmathtext.h b/lib/jkqtmathtext/jkqtmathtext.h index 10b958c200..84877bb8a6 100644 --- a/lib/jkqtmathtext/jkqtmathtext.h +++ b/lib/jkqtmathtext/jkqtmathtext.h @@ -729,9 +729,13 @@ class JKQTMATHTEXT_LIB_EXPORT JKQTMathText : public QObject { MTTendash, /*!< \brief the en-dash character sequence \c "--" in text-mode */ MTTemdash, /*!< \brief the em-dash character sequence \c "---" in text-mode */ }; + /** \biref convert a tokenType into a string, e.g. for debugging output */ + static QString tokenType2String(tokenType type); /** \brief tokenizer for the LaTeX parser */ tokenType getToken(); + /** \brief returns some characters to the Tokenizer */ + void giveBackToTokenizer(size_t count); /** \brief parse a LaTeX string * * \param get if \c true this calls getToken() diff --git a/lib/jkqtmathtext/jkqtmathtexttools.cpp b/lib/jkqtmathtext/jkqtmathtexttools.cpp index 0ca129faa5..124c0558dc 100644 --- a/lib/jkqtmathtext/jkqtmathtexttools.cpp +++ b/lib/jkqtmathtext/jkqtmathtexttools.cpp @@ -358,18 +358,29 @@ QString JKQTMathTextBraceType2String(JKQTMathTextBraceType type) { return "???"; } -JKQTMathTextBraceType TokenName2JKQTMathTextBraceType(const QString &tokenName) +JKQTMathTextBraceType TokenName2JKQTMathTextBraceType(const QString &tokenName, bool* isOpening) { - if (tokenName=="(" || tokenName==")") return MTBTParenthesis; - if (tokenName=="[" || tokenName=="]") return MTBTSquareBracket; - if (tokenName=="{" || tokenName=="}") return MTBTCurlyBracket; - if (tokenName=="|") return MTBTSingleLine; - if (tokenName=="||" || tokenName=="#") return MTBTDoubleLine; - if (tokenName=="<" || tokenName==">" || tokenName=="langle" || tokenName=="rangle") return MTBTAngleBracket; - if (tokenName=="_" || tokenName=="lfloor" || tokenName=="rfloor") return MTBTFloorBracket; - if (tokenName=="~" || tokenName=="lceil" || tokenName=="rceil") return MTBTCeilBracket; - if (tokenName=="ulcorner" || tokenName=="urcorner"||tokenName=="tlcorner" || tokenName=="trcorner") return MTBTTopCorner; - if (tokenName=="blcorner" || tokenName=="brcorner"||tokenName=="llcorner" || tokenName=="lrcorner") return MTBTBottomCorner; + if (tokenName=="(") { if (isOpening) *isOpening=true; return MTBTParenthesis; } + if (tokenName==")") { if (isOpening) *isOpening=false; return MTBTParenthesis; } + if (tokenName=="[") { if (isOpening) *isOpening=true; return MTBTSquareBracket; } + if (tokenName=="]") { if (isOpening) *isOpening=false; return MTBTSquareBracket; } + if (tokenName=="{") { if (isOpening) *isOpening=true; return MTBTCurlyBracket; } + if (tokenName=="}") { if (isOpening) *isOpening=false; return MTBTCurlyBracket; } + if (tokenName=="|") { if (isOpening) *isOpening=true; return MTBTSingleLine; } + if (tokenName=="||" || tokenName=="#") { if (isOpening) *isOpening=true; return MTBTDoubleLine; } + + if (tokenName=="<" || tokenName=="langle") { if (isOpening) *isOpening=true; return MTBTAngleBracket; } + if (tokenName==">" || tokenName=="rangle") { if (isOpening) *isOpening=false; return MTBTAngleBracket; } + if (tokenName=="_" || tokenName=="lfloor") { if (isOpening) *isOpening=true; return MTBTFloorBracket; } + if (tokenName=="_" || tokenName=="rfloor") { if (isOpening) *isOpening=false; return MTBTFloorBracket; } + if (tokenName=="~" || tokenName=="lceil") { if (isOpening) *isOpening=true; return MTBTCeilBracket; } + if (tokenName=="~" || tokenName=="rceil") { if (isOpening) *isOpening=false; return MTBTCeilBracket; } + if (tokenName=="ulcorner" || tokenName=="tlcorner") { if (isOpening) *isOpening=true; return MTBTTopCorner; } + if (tokenName=="urcorner" || tokenName=="trcorner") { if (isOpening) *isOpening=false; return MTBTTopCorner; } + if (tokenName=="blcorner" || tokenName=="llcorner") { if (isOpening) *isOpening=true; return MTBTBottomCorner; } + if (tokenName=="brcorner" || tokenName=="lrcorner") { if (isOpening) *isOpening=false; return MTBTBottomCorner; } + if (isOpening) *isOpening=true; + if (tokenName=="any") return MTBTAny; if (tokenName=="." || tokenName=="" || tokenName=="none") return MTBTNone; return MTBTUnknown; diff --git a/lib/jkqtmathtext/jkqtmathtexttools.h b/lib/jkqtmathtext/jkqtmathtexttools.h index 80944d1eaa..4e564107f3 100644 --- a/lib/jkqtmathtext/jkqtmathtexttools.h +++ b/lib/jkqtmathtext/jkqtmathtexttools.h @@ -169,7 +169,7 @@ JKQTMATHTEXT_LIB_EXPORT QString JKQTMathTextBraceType2String(JKQTMathTextBraceTy /** \brief convert a string \a tokenName describing a LaTeX Token or Instruction into an opening or closing JKQTMathTextBraceType * \ingroup jkqtmathtext_tools */ -JKQTMATHTEXT_LIB_EXPORT JKQTMathTextBraceType TokenName2JKQTMathTextBraceType(const QString& tokenName); +JKQTMATHTEXT_LIB_EXPORT JKQTMathTextBraceType TokenName2JKQTMathTextBraceType(const QString& tokenName, bool *isOpening=nullptr); /** \brief convert a string \a tokenName describing a LaTeX Instruction into an opening JKQTMathTextBraceType * \ingroup jkqtmathtext_tools * diff --git a/lib/jkqtmathtext/nodes/jkqtmathtextinstructionnode.cpp b/lib/jkqtmathtext/nodes/jkqtmathtextinstructionnode.cpp index 36c1fc9eac..84f41cf5ec 100644 --- a/lib/jkqtmathtext/nodes/jkqtmathtextinstructionnode.cpp +++ b/lib/jkqtmathtext/nodes/jkqtmathtextinstructionnode.cpp @@ -591,6 +591,32 @@ void JKQTMathTextModifiedTextPropsInstructionNode::fillInstructions() }, 0); instructions["scriptscriptstyle"]= i; } + + + { + InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { + ev.fontSize=ev.fontSize*1.2; + }, 0); + instructions["bigsize"]= i; + } + { + InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { + ev.fontSize=ev.fontSize*1.85; + }, 0); + instructions["Bigsize"]= i; + } + { + InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { + ev.fontSize=ev.fontSize*2.4; + }, 0); + instructions["biggsize"]= i; + } + { + InstructionProperties i([](JKQTMathTextEnvironment& ev, const QStringList& /*parameters*/) { + ev.fontSize=ev.fontSize*3.1; + }, 0); + instructions["Biggsize"]= i; + } } JKQTMathTextModifiedTextPropsInstructionNode::InstructionProperties::InstructionProperties(): diff --git a/lib/jkqtmathtext/nodes/jkqtmathtextwhitespacenode.cpp b/lib/jkqtmathtext/nodes/jkqtmathtextwhitespacenode.cpp index 16aaf27427..ad053203e9 100644 --- a/lib/jkqtmathtext/nodes/jkqtmathtextwhitespacenode.cpp +++ b/lib/jkqtmathtext/nodes/jkqtmathtextwhitespacenode.cpp @@ -102,8 +102,9 @@ size_t JKQTMathTextWhitespaceNode::getWhitespaceCount() const return whitespace.count; } -double JKQTMathTextWhitespaceNode::draw(QPainter &painter, double x, double /*y*/, JKQTMathTextEnvironment currentEv, const JKQTMathTextNodeSize *prevNodeSize) +double JKQTMathTextWhitespaceNode::draw(QPainter &painter, double x, double y, JKQTMathTextEnvironment currentEv, const JKQTMathTextNodeSize *prevNodeSize) { + doDrawBoxes(painter, x,y,currentEv); double width=0, bh=0, oh=0, sp=0; getSize(painter, currentEv, width, bh, oh, sp, prevNodeSize); return x+width; @@ -215,3 +216,101 @@ QString JKQTMathTextWhitespaceNode::Type2HTML(Types type) return " "; } + +QString JKQTMathTextEmptyBoxNode::Units2String(Units type) +{ + switch(type) { + case EBUem: return "em"; + case EBUex: return "ex"; + } + return "?"; +} + +JKQTMathTextEmptyBoxNode::Units JKQTMathTextEmptyBoxNode::String2Units(QString type) +{ + type=type.toLower().trimmed(); + if (type=="ex") return EBUex; + if (type=="em") return EBUem; + return EBUem; +} + +double JKQTMathTextEmptyBoxNode::Units2PixelWidth(double value, Units unit, JKQTMathTextEnvironment currentEv, QPaintDevice *pd) const +{ + const QFontMetricsF fm(currentEv.getFont(parentMathText), pd); + if (unit==EBUem) { +#if (QT_VERSION>=QT_VERSION_CHECK(5, 15, 0)) + const double em=fm.horizontalAdvance(QChar(0x2003));//currentEv.fontSize; +#else + const double em=fm.width(QChar(0x2003));//currentEv.fontSize; +#endif + return value*em; + } else if (unit==EBUex) { + const double ex=fm.xHeight(); + return value*ex; + } + return 0; +} + +JKQTMathTextEmptyBoxNode::JKQTMathTextEmptyBoxNode(JKQTMathText *parent, double width_, Units widthUnit_, double height_, Units heightUnit_): + JKQTMathTextNode(parent), + width(width_), widthUnit(widthUnit_), + height(height_),heightUnit(heightUnit_) +{ + +} + +JKQTMathTextEmptyBoxNode::~JKQTMathTextEmptyBoxNode() +{ + +} + +QString JKQTMathTextEmptyBoxNode::getTypeName() const +{ + return QString("JKQTMathTextEmptyBoxNode(%1%2 x %3%4)").arg(getWidth()).arg(JKQTMathTextEmptyBoxNode::Units2String(getWidthUnit())).arg(getHeight()).arg(JKQTMathTextEmptyBoxNode::Units2String(getHeightUnit())); +} + +bool JKQTMathTextEmptyBoxNode::toHtml(QString &html, JKQTMathTextEnvironment currentEv, JKQTMathTextEnvironment defaultEv) +{ + return true; +} + +JKQTMathTextEmptyBoxNode::Units JKQTMathTextEmptyBoxNode::getWidthUnit() const +{ + return widthUnit; +} + +double JKQTMathTextEmptyBoxNode::getWidth() const +{ + return width; +} + +JKQTMathTextEmptyBoxNode::Units JKQTMathTextEmptyBoxNode::getHeightUnit() const +{ + return heightUnit; +} + +double JKQTMathTextEmptyBoxNode::getHeight() const +{ + return height; +} + +double JKQTMathTextEmptyBoxNode::draw(QPainter &painter, double x, double y, JKQTMathTextEnvironment currentEv, const JKQTMathTextNodeSize *prevNodeSize) +{ + doDrawBoxes(painter, x,y,currentEv); + double width=0, bh=0, oh=0, sp=0; + getSize(painter, currentEv, width, bh, oh, sp, prevNodeSize); + return x+width; +} + +void JKQTMathTextEmptyBoxNode::getSizeInternal(QPainter &painter, JKQTMathTextEnvironment currentEv, double &width, double &baselineHeight, double &overallHeight, double &strikeoutPos, const JKQTMathTextNodeSize */*prevNodeSize*/) +{ + const QFontMetricsF fm(currentEv.getFont(parentMathText), painter.device()); + width=Units2PixelWidth(width, widthUnit, currentEv, painter.device()); + overallHeight=Units2PixelWidth(height, heightUnit, currentEv, painter.device()); + if (height>0) { + baselineHeight=overallHeight; + } else { + baselineHeight=0; + } + strikeoutPos=fm.strikeOutPos(); +} diff --git a/lib/jkqtmathtext/nodes/jkqtmathtextwhitespacenode.h b/lib/jkqtmathtext/nodes/jkqtmathtextwhitespacenode.h index 1080946b6f..7275acf754 100644 --- a/lib/jkqtmathtext/nodes/jkqtmathtextwhitespacenode.h +++ b/lib/jkqtmathtext/nodes/jkqtmathtextwhitespacenode.h @@ -76,9 +76,9 @@ class JKQTMATHTEXT_LIB_EXPORT JKQTMathTextWhitespaceNode: public JKQTMathTextNod virtual QString getTypeName() const override; /** \copydoc JKQTMathTextNode::toHtml() */ virtual bool toHtml(QString& html, JKQTMathTextEnvironment currentEv, JKQTMathTextEnvironment defaultEv) override; - /** \brief copydoc WhitespaceProps::type */ + /** \copydoc WhitespaceProps::type */ Types getWhitespaceType() const; - /** \brief copydoc WhitespaceProps::count */ + /** \copydoc WhitespaceProps::count */ size_t getWhitespaceCount() const; /** \copydoc JKQTMathTextNode::draw() */ virtual double draw(QPainter& painter, double x, double y, JKQTMathTextEnvironment currentEv, const JKQTMathTextNodeSize* prevNodeSize=nullptr) override; @@ -103,6 +103,53 @@ class JKQTMATHTEXT_LIB_EXPORT JKQTMathTextWhitespaceNode: public JKQTMathTextNod static void fillSupportedInstructions(); }; + +/** \brief subclass representing an empty bbox with defined width/height in the syntax tree + * \ingroup jkqtmathtext_items + * + */ +class JKQTMATHTEXT_LIB_EXPORT JKQTMathTextEmptyBoxNode: public JKQTMathTextNode { + public: + enum Units { + EBUem, /*!< \brief 1em = width('M') */ + EBUex, /*!< \brief 1ex = xHeight */ + }; + /** \brief converts Types \a type into a string */ + static QString Units2String(Units type); + /** \brief converts Types \a type into a string */ + static Units String2Units(QString type); + /** \brief converts Types \a type into its width in pixels, based on \a currentEv and \a pd */ + double Units2PixelWidth(double value, Units unit, JKQTMathTextEnvironment currentEv, QPaintDevice *pd) const; + /** \brief constructs a node */ + explicit JKQTMathTextEmptyBoxNode(JKQTMathText* parent, double width_, Units widthUnit_, double height_, Units heightUnit_); + virtual ~JKQTMathTextEmptyBoxNode() override; + /** \copydoc JKQTMathTextNode::getTypeName() */ + virtual QString getTypeName() const override; + /** \copydoc JKQTMathTextNode::toHtml() */ + virtual bool toHtml(QString& html, JKQTMathTextEnvironment currentEv, JKQTMathTextEnvironment defaultEv) override; + /** \copydoc widthUnit */ + Units getWidthUnit() const; + /** \copydoc width */ + double getWidth() const; + /** \copydoc heightUnit */ + Units getHeightUnit() const; + /** \copydoc height */ + double getHeight() const; + /** \copydoc JKQTMathTextNode::draw() */ + virtual double draw(QPainter& painter, double x, double y, JKQTMathTextEnvironment currentEv, const JKQTMathTextNodeSize* prevNodeSize=nullptr) override; + protected: + /** \copydoc JKQTMathTextNode::getSizeInternal() */ + virtual void getSizeInternal(QPainter& painter, JKQTMathTextEnvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos, const JKQTMathTextNodeSize* prevNodeSize=nullptr) override; + /** \brief width of the (empty) box, units of this value defined in widthUnit */ + double width; + /** \biref units to interpret width */ + Units widthUnit; + /** \brief height of the (empty) box, units of this value defined in heightUnit */ + double height; + /** \biref units to interpret height */ + Units heightUnit; +}; + #endif // JKQTMATHTEXTWHITESPACENODE_H