john, I'll share a complete example
— Sent from Dr Lisse’s iPhone On 23. Sep 2021, 17:43 +0200, John White <j...@whitelawchartered.com>, wrote: > On Thursday, September 23, 2021 4:25:57 AM PDT Dr Eberhard Lisse wrote: > > Hi, > > > > I have hacked me a Stamp in LaTeX which works very well in the Koma > > Letter (by way of putting it in LyX's preamble. > > > > The stamp gets placed next to the signature block, slightly randomly > > placed, then slightly randomly rotated and by way of some roation of the > > frame achieving a realistic look (smudged corners). I wrote an article > > about this in the German TeX Usergroup's Die Technische Kommödie 2/2017. > > > > I use the \ISOtoday ERT from Koma Script's scrdate package. > > > > > > I do not remember whether I have asked this before, and I have looked, > > but is there a way of using the date that Lyx uses in the blue Date: > > field? So that if I put a fixed date in the letter, the same should > > appear in the stamp (i.e. I do not want to have today's stamp on > > yesterday's letter :-)-O > > > > greetings, el > > > > > > PS: In case someone is interested, here is what I use in my Practice, > > copy and paste into the preamble: > > > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > % You can do whatever you want with this, other than bothering us but > > % if you make money from it, you must send us some. > > % > > % Copyright, -wrong -left, and -center 2017, 2021 SPF Lisse Private > > % Family Foundation best...@spflisseff.nl > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > %% LUA: Winkel des Gesamtstempels -- willk\"{u}rlich > > %% zwischen -5 und +5 Grad -- bei jedem Dokument anders > > \usepackage{luacode} > > \newcommand\rot{\directlua{tex.sprint(math.random(-5,5))}} > > > > > > \usepackage{tikz} > > \usepackage{xpatch} > > > > %% XCOLOR: Farbdefinitionen > > \definecolor{stampink}{RGB}{122 150 165} > > > > %% LATEX: Individuelle Definitionen f\"{u}r den Stempel > > %% (Formatierung Gr\"{o}{\ss}e und Schriftstil) > > %% > > \newcommand\myStampName{Dr Eberhard W Lisse} > > \newcommand\myStampProf{Obstetrician \& Gynecologist} > > \newcommand\myStampPO{PO Box 8421 Bachbrecht} > > \newcommand\myStampNo{016-000-0141135} > > > > \newcommand\myStampArrangement{% > > \setsansfont{Linux Biolinum O} > > \parbox{3cm}{% > > \centering\sffamily > > \footnotesize\myStampName\\ > > \tiny\myStampProf\\ > > \scriptsize\myStampPO\\ > > \myStampNo\\ > > \footnotesize\ISOToday > > } > > \setsansfont{IBM Plex Sans} > > } > > > > %% TIKZ: Laden notwendiger Styles > > \usetikzlibrary{fit} > > > > %% Erstellen eines Befehls f\"{u}r den Stempel in einer > > %% Gr\"{o}{\ss}e von 6 cm x 3 cm skaliert > > \newcommand\Stamper{% > > \resizebox{8cm}{3cm}{% > > \begin{tikzpicture} > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > %% > > %% TIKZ: Setzen der linken unteren und rechten oberen Ecke > > %% des Rechtecks > > \coordinate (dm1) at (0,0); > > \coordinate (dm2) at (2.6,1.4); > > %% > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > %% TIKZ: Schleife f\"{u}r drei Winkel > > %% > > \foreach \r in {-0.9,0,0.9}{% > > %% > > %% TIKZ: Rahmmen des Stempels: Rechteck, Farbe=stampink, > > %% Transparenz=0.4,Linienst\"{a}rke des Rahmens=1pt und > > einen %% Knoten namens (bx4) definieren > > %% > > \node[rectangle,draw,stampink,opacity=.4,line width=1.2pt, > > rotate=\r, rounded corners=1pt][fit=(dm1)(dm2)](bx4){}; > > %% > > %% TIKZ: Stempeltext: Farbe=stampink, gedreht um den Winkel > > \r %% mit Transparenz=0.4 in Knoten (bx4) gesetzt > > %% > > \node[stampink,rotate=\r,opacity=.4] at > > (bx4){\myStampArrangement}; } > > \end{tikzpicture} > > } > > } > > > > %% SCRLTTR2 & XPATCH: Erstellen einer neuen Variablen f\"{u}r den Brief > > %% zur Positionierung des Stempels rechts von \closing > > \newkomavar{rightbesidesignature} > > \newlength{\normalparskip} > > \xapptocmd{\closing}{% > > \setlength{\normalparskip}{\parskip}% > > \noindent\parbox[b][0pt]{\linewidth}{\raggedleft > > \setlength{\parskip}{\normalparskip}% > > \usekomavar{rightbesidesignature}\ifhmode\unskip\strut\fi > > \vspace{-1.8\baselineskip}% > > \vspace{\parskip}% > > \vspace{\lineskip}% > > }% > > }{}{} > > > > %% SCRLTTR2: Einf\"{u}gen des Stempels mit der jeweiligen willk\"{u}rlichen > > %% Gesamtdrehung \rot > > %% > > \setkomavar{rightbesidesignature}{\rotatebox[origin=c]{\rot}{\Stamper}} > > % > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > % Thanks to Peter Flynn, Markus Kohm and Juergen Gilg > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > Thanks Doc, > I have marked this email "important" and "action item." When I get some time > I will try to figure it out. It prints your letterhead with some extraneous > code. Do not try to tell me how to fix it. I need to figure that out for > myself. > Best, > John
-- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users