Re: How to access the Date Field from Koma Letter in the (LaTeX) preamble.
Turned out to be really easy. Looked into /Applications/LyX.app//Contents/Resources/layouts/scrlttr2.layout and see that it does something like Style Date CopyStyle Name LatexName setkomavar LatexParam{date} LabelString "Date:" End exported to LuaLaTeX and see that if I use a date in the LyX file it exports to something like \setkomavar{date}{2021-09-01} Quick look in TFM (scrguien.pdf) and it turns out I can just use \usekomavar{date} in the stamp instead of \ISOToday as per the enclosed diff: *** bookoff.2021-09-28.lyx 2021-09-28 17:35:19.0 +0200 --- bookoff.lyx2021-09-28 17:40:36.0 +0200 *** *** 33,39 \tiny\myStampProf\\ \scriptsize\myStampPO\\ \myStampNo\\ ! \footnotesize\usekomavar{date} } \setsansfont{IBM Plex Sans} } --- 33,39 \tiny\myStampProf\\ \scriptsize\myStampPO\\ \myStampNo\\ ! \footnotesize\ISOToday } \setsansfont{IBM Plex Sans} } *** *** 185,194 2021-08-01 \end_layout - \begin_layout Date - 2021-09-01 - \end_layout - \begin_layout Signature Dr Eberhard W Lisse \end_layout --- 185,190 If I don't, LyX (or rather Koma) sets up a default date (into the Koma variable), which then also comes up on the stamp. Complete files enclosed again. el On 28/09/2021 17:12, Dr Eberhard Lisse wrote: Herbert, thanks. I seem to recall having asked this particular question a few years ago, but can't find the post. However, you helped me in 2017 with some luacode, to be accessed via a local layout which Philip Pirrip helped me with. Adapting this should a project for one of my next weekends greetings, el On 25/09/2021 12:27, Herbert Voss wrote: Am 24.09.21 um 07:58 schrieb Dr Eberhard Lisse: here is the complete letter with the accompanying Koma Letter Class Option file, which either needs to be in the same directory or in one which texhash (which MUST be run after each change) can find. Look into the document's preamble (at the end). The command \myISOdate should be set in your document as a date field and not in the preamble. I never used scrlettr2 so I do not know how to define such a field in LyX. Then you can input a date different from \today Herbert -- To email me replace 'nospam' with 'el'#LyX 2.3 created this file. For more info see http://www.lyx.org/ \lyxformat 544 \begin_document \begin_header \save_transient_properties true \origin unavailable \textclass scrlttr2 \begin_preamble \usepackage{noto} %% 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\usekomavar{date} } \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
Re: How to access the Date Field from Koma Letter in the (LaTeX) preamble.
Herbert, thanks. I seem to recall having asked this particular question a few years ago, but can't find the post. However, you helped me in 2017 with some luacode, to be accessed via a local layout which Philip Pirrip helped me with. Adapting this should a project for one of my next weekends greetings, el On 25/09/2021 12:27, Herbert Voss wrote: Am 24.09.21 um 07:58 schrieb Dr Eberhard Lisse: here is the complete letter with the accompanying Koma Letter Class Option file, which either needs to be in the same directory or in one which texhash (which MUST be run after each change) can find. Look into the document's preamble (at the end). The command \myISOdate should be set in your document as a date field and not in the preamble. I never used scrlettr2 so I do not know how to define such a field in LyX. Then you can input a date different from \today Herbert -- To email me replace 'nospam' with 'el' -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: How to access the Date Field from Koma Letter in the (LaTeX) preamble.
Am 24.09.21 um 07:58 schrieb Dr Eberhard Lisse: here is the complete letter with the accompanying Koma Letter Class Option file, which either needs to be in the same directory or in one which texhash (which MUST be run after each change) can find. Look into the document's preamble (at the end). The command \myISOdate should be set in your document as a date field and not in the preamble. I never used scrlettr2 so I do not know how to define such a field in LyX. Then you can input a date different from \today Herbert % % Load EITHER the DIN Letter from Koma Script or the US one by commenting % out the other % \LoadLetterOption{DIN} % %\LoadLetterOption{UScommercial9} % % Options % \KOMAoptions{% addrfield=true%print an address field? ,backaddress=true% print the back address? ,enlargefirstpage=true% ,foldmarks=true% print foldmarks? ,footsepline=false%separate the footer with a line on page >1 ,fromalign=center% alignment of the address ,fromemail=false% print sender e-mail address ,fromfax=false%print sender fax number ,fromlogo=false% print a logo (position depends on fromalign) ,fromphone=false% print sender phone number ,fromrule=afteraddress%separate the address with a line? ,fromurl=false%print sender URL ,headsepline=false%separate the header with a line on page >1 ,pagenumber=botright% position of the page number (see docu) ,parskip=half% Use indent instead of skip ,refline=wide% layout of the refline ,paper=a4% pagesize } % % set some lengths for the letter % \makeatletter \@setplength{sigindent}{0mm} \@setplength{specialmailindent}{0truecm} \@setplength{specialmailrightindent}{\fill} \@setplength{refvpos}{89mm} \@setplength{refaftervskip}{10pt} \@setplength{firstfootvpos}{7cm} \@addtoplength{firstfootvpos}{\textheight} % % NEW % \@addtoplength{firstfootvpos}{\footskip} \makeatother % % Load some packages % % If I want to test the letter output % \usepackage{lipsum} % % to get to the URLs with proper breaking, needs some work % to survive turning this on in LyX % \usepackage{hyperref} \hypersetup{% breaklinks=true, colorlinks=true, linkcolor=black, pdfborder={0 0 0}, pdfborderstyle={}, urlcolor=blue, } \usepackage{xurl} % \KOMAoptions{DIV=13} % % I like the ISO Date % \providecommand*{\LCORequirePackage}[2][]{% \if@atdocument \scr@ifundefinedorrelax{ver@#2.sty}{% \GenericError{% (nanicmict.lco)\@spaces\@spaces\@spaces\@spaces }{% LCO-File nanicmict.lco Error: Package `#2' not loaded% }{% See the documentation of nanicmict.lco for explanation.% }{% This lco-file needs serveral packages. But packages can be loaded only before\MessageBreak \string\begin{document}. You've used the lco-file after \string\begin{document} so it cannot\MessageBreak load the needed packages.\MessageBreak You should either add \string\LoadLetterOption{nanic} before \string\begin{document}\MessageBreak or load package `#2' using \string\usepackage[#1]{#2} before\MessageBreak \string\begin{document}. }% }{}% \else \RequirePackage[#1]{#2}% \fi } \LCORequirePackage{scrdate} % % page # of ## pages % \usepackage{lastpage} % % for the fancy header and footer formatting % \usepackage[automark]{scrlayer-scrpage} \pagestyle{scrheadings} \firstfoot{% \centering{% \hrulefill\newline \footnotesize{% \textsf{% Practice Nr: 016-000-141135\\ SWAMed Building 2$^{nd}$ Floor $\cdot$ John Meinert Street $\cdot$ Windhoek $\cdot$ Namibia\\ Telephone: +264 61 236403 $\cdot$ Cell: +264 81 124 6733 $\cdot$ Fax: +264 88 624273 $\cdot$ Email: \href{mailto:d...@lisse.na}{d...@lisse.na}\\ GPG Fingerprint: 7399 BE0B AEFB 4AE5 EDB9 4A54 9705 1DA3 7945 3FAB } } } } \clearscrheadfoot \lohead[\usekomavar{fromname}]{\usekomavar{fromname}} \rohead[\usekomavar{subject}]{\usekomavar{subject}} %\ofoot[Page \pagemark\ of \pageref{LastPage}] % {Page \pagemark\ of \pageref{LastPage}} \ofoot{Page \pagemark\ of \pageref{LastPage}} % % Sender's Name, in LARGE font, then practice details, since the % address goes into the footer % \setkomavar{fromname}{\textsc{Dr Eberhard W Lisse}} \setkomafont{fromname}{\LARGE} \setkomavar{fromaddress}{Obstetrician \& Gynaecologist} \setkomafont{fromaddress}{\large} % % default signature, left justified % \setkomavar{signature}{Dr Eberhard W Lisse} \renewcommand*{\raggedsignature}{\raggedright} % % This goes in the Window of the envelope with a
Re: How to access the Date Field from Koma Letter in the (LaTeX) preamble.
John, the Phillies are almost still in it. And the Blue Jays :-)-O Was the LCO in the same directory? And did you install the lipsum package? But the stamp is more or less working, which is the main thing. el On 24. Sep 2021, 18:49 +0200, John White , wrote: > On Thursday, September 23, 2021 10:58:42 PM PDT Dr Eberhard Lisse wrote: > > John, all > > > > here is the complete letter with the accompanying Koma Letter Class > > Option file, which either needs to be in the same directory or in one > > which texhash (which MUST be run after each change) can find. > > > > I am vacationing in Philadelphia for a while and will look into this upon my > return to Reno. > But just for the fun of it I ran your bookoff.lys on my stock lyx, making no > changes, and here attach the resulting pdf. -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: How to access the Date Field from Koma Letter in the (LaTeX) preamble.
On Thursday, September 23, 2021 10:58:42 PM PDT Dr Eberhard Lisse wrote: > John, all > > here is the complete letter with the accompanying Koma Letter Class > Option file, which either needs to be in the same directory or in one > which texhash (which MUST be run after each change) can find. > I am vacationing in Philadelphia for a while and will look into this upon my return to Reno. But just for the fun of it I ran your bookoff.lys on my stock lyx, making no changes, and here attach the resulting pdf. bookoff.pdf Description: Adobe PDF document -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: How to access the Date Field from Koma Letter in the (LaTeX) preamble.
John, all here is the complete letter with the accompanying Koma Letter Class Option file, which either needs to be in the same directory or in one which texhash (which MUST be run after each change) can find. On MacTeX the file to look for is /usr/local/texlive/2021basic/texmf.cnf on linux something like find /usr -name texmf.cnf might help. The variable to look for is TEXMFLOCAL = /usr/local/texlive/texmf-local which in my case yields something like [...] 32 /usr/local/texlive/texmf-local/tex/latex/misc 1496/usr/local/texlive/texmf-local/tex/latex/koma-script 240 /usr/local/texlive/texmf-local/tex/latex/rangen [...] and I have my own adapted *.lco in there, as homebrew (on the mac) makes me own the tree below /usr/local and so I don't need sudo. I think you can set up a similar tree below $HOME somehow, but I don't use LyX/LaTeX on linux, so I don't know. The letter is currently set up for DIN A4. In the LyX file as Document -? Settings... -> Page Layout (Default) where for US formats it would need to be adapted, and in the LCO at the top where you should comment out the DIN and un-comment the UScommercial9. If you want to know where they are The letter and stamp require a number packages, so at the very least do: tlmgr install pgf xpatch lipsum hyperref xurl lastpage koma-script \ luacode packages that are installed already will cause a warning message. I hope it's a complete list. I like Google's NOTO fonts but if you don't, just change in the document preamble (this is required for the stamp to work, but I have never bothered to try to understand why it doesn't work properly when put directly into the LyX Font page). Iso you may need to tlmgr install noto sudo may be required (of course). I have put two paragraphs worth of lorem ipsum text in there, and if you really want to play with it, wait for at least a minute, make small change to the LyX file and regenerate, while the PDF viewer has it open. You should see that the stamp will slightly rotate and move :-)-O I also enclose a PDF for comparison, which was generated from the command line using lyx -f -e pdf5 bookoff.lyx It needs LUATEX (LuaLaTeX), pdflatex does NOT work (it uses LUA internally to calculate some randomness). I find really cool, that you can have seriously involved and complicated LaTeX Voodoo without a single line of it bothering the (casual) user :-)-O as it is all hidden in the preamble or in the LCO. I am quite interested in positive comments and improvements to make it faster, better or both. I would be EXTREMELY interested in someone doing this over as a LyX module, i.e. so that you can get additional fields in the LyX window and that the stamp dimensions are then calculated dynamically, and this sordid mess could perhaps even join the LyX project properly :-)-O I have not the faintest clue how to do that, myself :-)-O and as it works for me, no interested in hopping on that particular learning curve :-)-O greetings, el On 2021-09-23 18:43 , Dr Eberhard W Lisse wrote: john, I'll share a complete example [...] On 23. Sep 2021, 17:43 +0200, John White , wrote: On Thursday, September 23, 2021 4:25:57 AM PDT Dr Eberhard Lisse wrote: [...] 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 2.3 created this file. For more info see http://www.lyx.org/ \lyxformat 544 \begin_document \begin_header \save_transient_properties true \origin unavailable \textclass scrlttr2 \begin_preamble \usepackage{noto} %% 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
Re: How to access the Date Field from Koma Letter in the (LaTeX) preamble.
john, I'll share a complete example — Sent from Dr Lisse’s iPhone On 23. Sep 2021, 17:43 +0200, John White , 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
Re: How to access the Date Field from Koma Letter in the (LaTeX) preamble.
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); > %% > %%% -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: How to access the Date Field from Koma Letter in the (LaTeX) preamble.
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); > %% > %%% -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users