mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-25 01:51:49 +08:00
JKQTMathText: added \dashbox() and \dotbox{}
This commit is contained in:
parent
66f71ca606
commit
b38ccc5fbc
@ -64,6 +64,8 @@ Changes, compared to \ref page_whatsnew_V4_0_0 "v4.0.0" include:
|
||||
<li>NEW: added top-corner (\c \\ulcorner/\c \\urcorner ) and bottom-corner brackets (\c \\llcorner/\c \\lrcorner )</li>
|
||||
<li>NEW: added \c \\overbracket and \c \\underbracket</li>
|
||||
<li>NEW: added \c \\shaded{color}{...} </li>
|
||||
<li>NEW: added \c \\dashbox{...} </li>
|
||||
<li>NEW: added \c \\dottedbox{...} </li>
|
||||
<li>NEW: added \c \\acute{X}, \c \\grave{X}, \c \\acute{X}</li>
|
||||
<li>NEW: added functions to set the font-size in pixels (as alternative to the existing functions that set them in points), implements request <a href="https://github.com/jkriege2/JKQtPlotter/issues/76">#76</a> from <a href="https://github.com/igormironchik">user:igormironchik</a> </li>
|
||||
<li>NEW: added \c \\userfont{SystemFontName}{Text} instruction</li>
|
||||
|
BIN
doc/images/jkqtmathtext/jkqtmathtext_dashbox.png
Normal file
BIN
doc/images/jkqtmathtext/jkqtmathtext_dashbox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
doc/images/jkqtmathtext/jkqtmathtext_dottedbox.png
Normal file
BIN
doc/images/jkqtmathtext/jkqtmathtext_dottedbox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
@ -207,7 +207,7 @@ TestForm::TestForm(QWidget *parent) :
|
||||
ui->cmbTestset->addItem("math: operator test (textmode)", "x=0\\ \\ y>0\\ \\ x+y\\ \\ -1\\ \\ x-2\\ \\ x\\cdot y\\ \\ x\\geq 4\\ \\ x~4");
|
||||
ui->cmbTestset->addItem("math: operator test (mathmode)", "$x=0\\ \\ y>0\\ \\ x+y\\ \\ -1\\ \\ x-2\\ \\ x\\cdot y\\ \\ x\\geq 4\\ \\ x~4$");
|
||||
ui->cmbTestset->addItem("text: color test", "\\textcolor{red}{RED}\\textcolor{blue}{BLUE}");
|
||||
ui->cmbTestset->addItem("text: boxed test", "test: {\\backslash}boxed: \\boxed{boxed text} {\\backslash}doublebox: \\doublebox{boxed text} {\\backslash}ovalbox: \\ovalbox{boxed text} {\\backslash}Ovalbox: \\Ovalbox{boxed text} {\\backslash}ovaldoublebox: \\ovaldoublebox{boxed text} {\\backslash}colorbox\\{red\\}: \\colorbox{red}{boxed text} {\\backslash}shaded\\{AliceBlue\\}: \\shaded{AliceBlue}{boxed text} {\\backslash}fcolorbox\\{red\\}\\{AliceBlue\\}: \\fcolorbox{red}{AliceBlue}{boxed text} in the middle");
|
||||
ui->cmbTestset->addItem("text: boxed test", "test: {\\backslash}boxed: \\boxed{boxed text} {\\backslash}doublebox: \\doublebox{boxed text} {\\backslash}ovalbox: \\ovalbox{boxed text} {\\backslash}Ovalbox: \\Ovalbox{boxed text} {\\backslash}ovaldoublebox: \\ovaldoublebox{boxed text} {\\backslash}dashbox\\{...\\}: \\dashbox{boxed text} {\\backslash}dottedbox\\{...\\}: \\dottedbox{boxed text} {\\backslash}colorbox\\{red\\}: \\colorbox{red}{boxed text} {\\backslash}shaded\\{AliceBlue\\}: \\shaded{AliceBlue}{boxed text} {\\backslash}fcolorbox\\{red\\}\\{AliceBlue\\}: \\fcolorbox{red}{AliceBlue}{boxed text} in the middle");
|
||||
ui->cmbTestset->addItem("mathboxed test", "$\\fbox{2^{2^{\\colorbox{red}{2^{x}}}}}$");
|
||||
ui->cmbTestset->addItem("axiom of power test", "$\\forall A \\, \\exists P \\, \\forall B \\, [B \\in P \\iff \\forall C \\, (C \\in B \\Rightarrow C \\in A)]$");
|
||||
ui->cmbTestset->addItem("math: De Morgan's law", "$\\neg(P\\land Q)\\iff(\\neg P)\\lor(\\neg Q)$ or $\\overline{\\bigcap_{i \\in I} A_{i}}\\equiv\\bigcup_{i \\in I} \\overline{A_{i}}$ or $\\overline{A \\cup B}\\equiv\\overline{A} \\cap \\overline{B}$");
|
||||
|
@ -127,6 +127,8 @@ class JKQTMathTextNode; // forward
|
||||
- \c \\doublebox{...} : draw text with a rounded box around it \image html jkqtmathtext/jkqtmathtext_doublebox.png
|
||||
- \c \\ovalbox{...} : draw text with a rounded box around it \image html jkqtmathtext/jkqtmathtext_ovalboxed.png
|
||||
- \c \\Ovalbox{...} : draw a thick oval box \image html jkqtmathtext/jkqtmathtext_oovalbox.png
|
||||
- \c \\dashbox{...} , \c \\dbox{...} : draw a dashed box \image html jkqtmathtext/jkqtmathtext_dashbox.png
|
||||
- \c \\dottedbox{...} : draw a dottted box \image html jkqtmathtext/jkqtmathtext_dottedbox.png
|
||||
- \c \\ovaldoublebox{...} : draw a double oval box \image html jkqtmathtext/jkqtmathtext_doubleovalbox.png
|
||||
- \c \\colorbox{bordercolor}{...} : draw a colored box \image html jkqtmathtext/jkqtmathtext_colorbox.png
|
||||
- \c \\shaded{backgroundcolor}{...} : draw a filled box \image html jkqtmathtext/jkqtmathtext_shaded.png
|
||||
|
@ -788,6 +788,33 @@ void JKQTMathTextBoxInstructionNode::fillInstructions()
|
||||
/*Nparams=*/1);
|
||||
instructions["colorbox"] = i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i(InstructionProperties::NoModification,
|
||||
[](JKQTMathTextEnvironment& ev, const QStringList& parameters, JKQTMathText* parent){
|
||||
QPen p=InstructionProperties::DefaultPen(ev, parameters, parent);
|
||||
p.setStyle(Qt::DashLine);
|
||||
return p;
|
||||
},
|
||||
InstructionProperties::NoBrush,
|
||||
InstructionProperties::DefaultPadding,
|
||||
/*Nparams=*/0);
|
||||
instructions["dashbox"] = i;
|
||||
instructions["dashedbox"] = i;
|
||||
instructions["dbox"] = i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i(InstructionProperties::NoModification,
|
||||
[](JKQTMathTextEnvironment& ev, const QStringList& parameters, JKQTMathText* parent){
|
||||
QPen p=InstructionProperties::DefaultPen(ev, parameters, parent);
|
||||
p.setStyle(Qt::DotLine);
|
||||
return p;
|
||||
},
|
||||
InstructionProperties::NoBrush,
|
||||
InstructionProperties::DefaultPadding,
|
||||
/*Nparams=*/0);
|
||||
instructions["dottedbox"] = i;
|
||||
instructions["dotbox"] = i;
|
||||
}
|
||||
{
|
||||
InstructionProperties i(InstructionProperties::NoModification,
|
||||
InstructionProperties::NoPen,
|
||||
|
Loading…
Reference in New Issue
Block a user