diff --git a/lisp/my/my-org-article.el b/lisp/my/my-org-article.el index 7ef0d6d9..1a007d1b 100644 --- a/lisp/my/my-org-article.el +++ b/lisp/my/my-org-article.el @@ -46,6 +46,7 @@ \\usepackage{xcolor} \\definecolor{color0}{HTML}{ffffff} \\definecolor{color1}{HTML}{0071bc} + \\usepackage{pgfplots} \\usepgflibrary{shapes.geometric} \\usetikzlibrary{ @@ -61,10 +62,144 @@ shadows.blur, mindmap, } -\\tikzset{every path/.style={color=white}} + +% based on soul +% \\highlight[tikz-opts]{...} like: +% \\highlight{} +% \\highlight[red]{} +% \\highlight[green, draw=blue]{} \\makeatletter -\\tikzset{clip/.code={\\let\\tikz@mode=\\pgfutil@empty\\let\\tikz@preactions=\\pgfutil@empty\\let\\tikz@postactions=\\pgfutil@empty\\let\\tikz@options=\\pgfutil@empty\\tikz@addmode{\\tikz@mode@cliptrue}},} -\\makeatother"))) +\\newcommand{\\defhighlighter}[3][]{% + \\tikzset{every highlighter/.style={color=#2, fill opacity=#3, #1}}% +} +\\defhighlighter{yellow}{.5} +\\newcommand{\\highlight@DoHighlight}{ + \\fill [ decoration = {random steps, amplitude=1pt, segment length=15pt} + , outer sep = -15pt, inner sep = 0pt, decorate + , every highlighter, this highlighter ] + ($(begin highlight)+(0,8pt)$) rectangle ($(end highlight)+(0,-3pt)$) ; +} +\\newcommand{\\highlight@BeginHighlight}{ + \\coordinate (begin highlight) at (0,0) ; +} +\\newcommand{\\highlight@EndHighlight}{ + \\coordinate (end highlight) at (0,0) ; +} +\\newdimen\\highlight@previous% +\\newdimen\\highlight@current% +\\DeclareRobustCommand*\\highlight[1][]{% + \\tikzset{this highlighter/.style={#1}}% + \\SOUL@setup% + % + \\def\\SOUL@preamble{% + \\begin{tikzpicture}[overlay, remember picture] + \\highlight@BeginHighlight + \\highlight@EndHighlight + \\end{tikzpicture}% + }% + % + \\def\\SOUL@postamble{% + \\begin{tikzpicture}[overlay, remember picture] + \\highlight@EndHighlight + \\highlight@DoHighlight + \\end{tikzpicture}% + }% + % + \\def\\SOUL@everyhyphen{% + \\discretionary{% + \\SOUL@setkern\\SOUL@hyphkern% + \\SOUL@sethyphenchar% + \\tikz[overlay, remember picture] \\highlight@EndHighlight ;% + }{% + }{% + \\SOUL@setkern\\SOUL@charkern% + }% + }% + % + \\def\\SOUL@everyexhyphen##1{% + \\SOUL@setkern\\SOUL@hyphkern% + \\hbox{##1}% + \\discretionary{% + \\tikz[overlay, remember picture] \\highlight@EndHighlight ;% + }{% + }{% + \\SOUL@setkern\\SOUL@charkern% + }% + }% + % + \\def\\SOUL@everysyllable{% + \\begin{tikzpicture}[overlay, remember picture] + \\path let \\p0 = (begin highlight), \\p1 = (0,0) in \\pgfextra + \\global\\highlight@previous=\\y0 + \\global\\highlight@current =\\y1 + \\endpgfextra (0,0) ; + \\ifdim\\highlight@current < \\highlight@previous + \\highlight@DoHighlight + \\highlight@BeginHighlight + \\fi + \\end{tikzpicture}% + \\the\\SOUL@syllable% + \\tikz[overlay, remember picture] \\highlight@EndHighlight ;% + }% + \\SOUL@% +} +\\makeatother + +\\pgfplotsset{ + % or newest, + compat=1.17, + % Komma statt Punkt als Dezimaltrennzeichen + x tick label style={/pgf/number format/use comma}, + y tick label style={/pgf/number format/use comma}, + every node near coord/.style={/pgf/number format/use comma}, + /pgfplots/annot/js fillColor={[\"RGB\",1,1,1]}, + every semilogy axis/.append style={/pgfplots/annot/point format={(\\%.1f,\\%.1e)}}, + every semilogx axis/.append style={/pgfplots/annot/point format={(\\%.1e,\\%.1f)}}, + every loglog axis/.append style={/pgfplots/annot/point format={(\\%.1e,\\%.1e)}} +} + +% this must be under the configuration of x tick label +% legend position outer south +\\makeatletter +\\pgfplotsset{ + every axis x label/.append style={ + alias=current axis xlabel + }, + legend pos/outer south/.style={ + /pgfplots/legend style={ + at={% + (% + \\@ifundefined{pgf@sh@ns@current axis xlabel}% + {xticklabel cs:0.5}% + {current axis xlabel.south}% + )% + }, + anchor=north + } + } +} +\\makeatother + +% !!!! in tikzset sind keine Leerzeilen erlaubt !!!! +\\tikzset{ + %scale a tikzpicture including texts + global scale/.style={ + scale=#1, + every node/.style={scale=#1} + }, + %Define standard arrow tip + >=stealth', + %Define standard node + %every text node part/.style={align=left}, + % Colors +} + +\\tikzset{ + every pin/.style={fill=white,rectangle,rounded corners=3pt,font=\\small}, + small dot/.style={fill=black,circle,scale=0.3}, +} + +"))) (:packages . "\\usepackage{xcolor} \\definecolor{color0}{HTML}{ffffff} \\definecolor{color1}{HTML}{0071bc} @@ -1548,7 +1683,7 @@ IMPORTANT en version must be defined") \\usepackage{tikz} \\usepackage{gnuplot-lua-tikz} % ,pgfmath -\\usepackage{pgfplots} +\\usepackage{pgfplots} % for \\begin{axis} \\usepgflibrary{shapes.geometric} \\usepackage{tabularx} \\usetikzlibrary{ @@ -1562,7 +1697,7 @@ IMPORTANT en version must be defined") decorations.pathmorphing, % need package pgfplots backgrounds, - %after pgfplots + %after pgfplots, for /pgfplots/annot/js fillColor pgfplotsclickable, shadows, shadows.blur, @@ -2164,8 +2299,8 @@ default." :menu-entry '(?h ?a - ((?a "To HTML file" my-org-article-html-export-to-html) - (?A "To HTML file and open" + ((?a "To HTML-article file" my-org-article-html-export-to-html) + (?A "To HTML-article file and open" (lambda (a s v b) (if a (my-org-article-html-export-to-html t s v b) (org-open-file (my-org-article-html-export-to-html nil s v b)))))))