utils/kuhy_credit/latex/kuhy-credit.sty
Krzysztof kuhy Rudnicki c394641272
Some checks are pending
file length / file-length (push) Waiting to run
kuhy_credit drift / drift (push) Waiting to run
kuhy_credit tests / python (push) Waiting to run
kuhy_credit tests / web (push) Waiting to run
kuhy_credit tests / flutter (push) Waiting to run
kuhy_credit tests / godot (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
kuhy_credit: LaTeX page-corner logo, 0.3.0
\kuhycreditcorner[<inset>] puts the linked logo on every page's
bottom-right corner via the shipout/foreground hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 22:30:30 +01:00

147 lines
8.7 KiB
TeX

% The kuhy credit for LaTeX (generated by kuhy_credit/generator/generate.py; DO NOT EDIT).
% \kuhycredit[<size>] draws the logo linked to the site (needs hyperref);
% \kuhycreditlogo[<size>] draws it without a link. Size defaults to
% \kuhycreditsize (12mm, about the web stack's 48px). Needs LaTeX 2020-10+.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{kuhy-credit}[kuhy credit]
\RequirePackage{tikz}
\definecolor{kuhycreditfield}{HTML}{211D1B}
\definecolor{kuhycreditfill1}{HTML}{B8862E}
\definecolor{kuhycreditfill2}{HTML}{ECEAE9}
\newcommand*\kuhycreditURL{https://kuhy.duckdns.org}
\newcommand*\kuhycreditText{Created by kuhy}
\newlength\kuhycreditsize
\setlength\kuhycreditsize{12mm}
\newcommand\kuhycreditlogo[1][\kuhycreditsize]{%
\pgfmathsetmacro\kuhycredit@unit{(#1)/512}%
\begin{tikzpicture}[x=\kuhycredit@unit pt,y=-\kuhycredit@unit pt,
baseline=(current bounding box.south)]
\fill[kuhycreditfield] (0,0) rectangle (512,512);
\fill[kuhycreditfill1] plot coordinates {
(232.45,126.71) (235.4,121.83) (236.86,117.46) (237.16,113.16)
(236.11,108.55) (233.71,104.34) (230.14,100.74) (225.62,97.95)
(220.41,96.16) (214.75,95.51) (208.86,96.11) (202.89,97.96)
(196.97,101.02) (191.8,104.61) (186.14,109.43) (168.83,127.05)
(163.79,131.69) (158.86,135.08) (156.85,135.91) (155.0,136.26)
(153.32,136.1) (151.51,135.26) (150.17,134.03) (148.74,131.95)
(146.53,126.68) (142.68,113.58) (140.39,107.28) (137.47,101.8)
(134.17,98.03) (131.62,96.28) (129.3,95.34) (126.82,94.91)
(124.22,94.99) (121.55,95.59) (118.85,96.69) (116.18,98.26)
(113.59,100.29) (110.67,103.26) (108.46,106.12) (104.82,112.71)
(103.46,116.33) (102.26,120.85) (101.33,129.4) (101.51,134.83)
(102.18,140.16) (107.16,161.56) (107.92,166.59) (108.16,170.93)
(107.96,175.3) (107.23,180.39) (103.3,196.89) (102.03,203.6)
(101.44,209.71) (101.57,215.83) (102.56,221.84) (104.46,227.54)
(106.85,232.14) (110.3,236.77) (113.3,239.71) (117.11,242.44)
(120.52,244.13) (124.51,245.27) (128.36,245.46) (131.44,244.86)
(134.25,243.55) (137.1,241.19) (138.84,238.98) (140.33,236.37)
(142.79,229.46) (144.26,222.2) (146.91,203.45) (149.0,195.46)
(150.82,191.74) (152.78,189.39) (155.06,187.98) (157.64,187.54)
(160.46,188.07) (163.46,189.54) (166.57,191.89) (170.18,195.54)
(176.49,203.82) (187.93,221.96) (192.91,229.15) (198.18,235.26)
(203.3,239.57) (207.07,241.74) (210.4,243.03) (213.78,243.76)
(217.74,243.92) (221.07,243.47) (224.8,242.29) (228.25,240.44)
(230.89,238.38) (233.17,235.92) (235.02,233.11) (236.37,230.0)
(237.18,226.63) (237.42,223.07) (237.07,219.35) (236.13,215.54)
(234.6,211.66) (230.9,205.16) (225.43,198.15) (219.02,191.41)
(205.04,178.08) (200.57,173.11) (197.35,167.98) (196.49,165.31)
(196.29,163.13) (196.57,160.98) (197.54,158.44) (199.16,155.9)
(201.39,153.37) (206.78,148.63) (224.45,135.06) (228.82,130.95)
} -- cycle;
\fill[kuhycreditfill1] plot coordinates {
(439.15,304.62) (441.35,299.45) (442.51,294.18) (442.42,288.99)
(441.16,284.54) (438.79,280.56) (435.43,277.23) (431.27,274.73)
(426.09,273.1) (421.13,272.75) (416.7,273.37) (412.03,275.08)
(407.76,277.8) (404.33,280.97) (400.93,285.13) (391.39,300.46)
(387.52,305.61) (384.97,308.13) (382.62,309.84) (379.82,311.14)
(377.32,311.67) (374.44,311.56) (371.59,310.69) (368.84,309.1)
(366.22,306.86) (361.68,301.2) (353.72,288.2) (349.9,282.87)
(345.1,278.03) (339.97,274.81) (336.22,273.46) (332.8,272.84)
(328.82,272.8) (324.89,273.46) (321.18,274.78) (317.81,276.73)
(314.92,279.23) (312.64,282.19) (311.36,284.65) (310.49,287.28)
(310.02,290.04) (309.96,292.87) (310.28,295.74) (311.1,299.1)
(313.73,305.2) (316.79,310.09) (321.01,315.47) (337.3,332.65)
(344.34,340.99) (350.25,349.71) (354.13,357.71) (356.15,364.64)
(356.94,371.76) (356.69,378.61) (354.92,395.62) (354.93,400.36)
(355.46,405.02) (356.78,409.97) (358.95,414.48) (361.98,418.37)
(365.77,421.42) (369.24,423.14) (372.98,424.16) (376.83,424.43)
(380.67,423.95) (384.34,422.72) (387.71,420.81) (390.68,418.27)
(393.42,414.79) (394.87,412.17) (396.16,408.88) (397.04,405.4)
(397.53,401.79) (397.58,394.42) (395.86,378.48) (395.63,371.63)
(396.54,364.05) (398.85,356.69) (402.9,348.74) (408.61,340.49)
(415.36,332.56) (431.64,315.37) (435.86,309.98)
} -- cycle;
\fill[kuhycreditfill2] plot coordinates {
(272.87,180.5) (273.78,191.15) (275.43,199.68) (277.93,207.24)
(281.46,214.32) (286.01,220.83) (291.97,227.15) (298.81,232.68)
(306.29,237.38) (314.83,241.44) (323.65,244.37) (331.97,245.96)
(340.33,246.39) (348.69,245.62) (356.98,243.7) (365.74,240.46)
(374.17,236.11) (379.85,232.38) (385.15,228.16) (389.95,223.48)
(393.76,218.86) (397.03,213.89) (399.73,208.6) (401.84,203.03)
(403.53,196.59) (404.61,189.99) (405.3,181.99) (405.89,159.12)
(407.09,137.35) (407.21,129.01) (406.69,121.27) (405.6,115.09)
(403.79,109.27) (401.53,104.61) (398.24,100.21) (394.25,96.96)
(389.72,95.06) (385.41,94.63) (381.04,95.41) (376.28,97.71)
(371.95,101.35) (368.3,106.12) (366.03,110.43) (364.13,115.78)
(363.07,120.69) (362.53,126.4) (362.58,131.38) (363.12,136.95)
(366.62,155.29) (367.54,162.94) (367.32,171.38) (366.55,176.01)
(365.5,179.98) (363.26,185.87) (360.61,190.86) (357.41,195.43)
(353.74,199.38) (349.69,202.52) (345.92,204.46) (342.02,205.56)
(338.06,205.77) (334.12,205.08) (330.28,203.52) (326.61,201.16)
(322.73,197.62) (319.27,193.35) (316.32,188.55) (313.95,183.43)
(312.21,178.16) (310.8,170.23) (310.73,162.45) (311.59,155.45)
(315.0,137.8) (315.74,128.01) (315.47,123.01) (314.68,118.04)
(313.31,113.22) (311.38,108.68) (308.91,104.56) (305.95,101.0)
(302.59,98.14) (298.95,96.07) (295.15,94.89) (291.33,94.64)
(287.61,95.31) (284.11,96.89) (281.8,98.52) (279.7,100.54)
(277.81,102.91) (275.86,106.15) (273.2,112.94) (271.66,120.41)
(271.11,126.72) (271.03,133.73) (272.32,158.32)
} -- cycle;
\fill[kuhycreditfill2] plot coordinates {
(142.5,408.93) (144.93,412.86) (148.33,416.82) (151.62,419.58)
(155.73,421.94) (159.96,423.33) (164.11,423.69) (168.0,423.04)
(171.46,421.41) (173.61,419.69) (175.81,417.09) (177.3,414.53)
(178.71,411.07) (180.34,403.92) (181.9,389.45) (182.76,384.3)
(184.38,379.06) (186.6,375.03) (188.42,372.84) (190.56,370.93)
(193.02,369.3) (196.36,367.72) (203.33,365.93) (207.41,365.55)
(211.54,365.59) (218.2,366.61) (224.14,368.79) (226.71,370.32)
(228.97,372.13) (232.2,376.09) (234.21,380.29) (235.51,385.06)
(237.68,403.4) (239.06,409.98) (241.43,415.72) (243.06,418.13)
(244.99,420.16) (247.7,422.03) (250.76,423.22) (254.12,423.7)
(257.08,423.52) (260.7,422.61) (263.71,421.29) (267.19,419.06)
(269.9,416.7) (273.71,412.09) (276.7,406.63) (278.73,400.57)
(279.77,394.13) (279.87,387.57) (279.19,381.08) (277.76,374.06)
(273.42,357.39) (272.7,353.01) (272.43,348.73) (272.65,344.45)
(273.45,339.45) (277.62,323.51) (278.95,317.31) (279.71,311.68)
(279.93,306.77) (279.2,298.62) (277.23,291.66) (274.04,285.39)
(269.78,280.17) (267.06,277.83) (263.57,275.63) (260.56,274.33)
(256.94,273.46) (253.99,273.3) (250.64,273.8) (248.07,274.77)
(245.32,276.56) (243.34,278.53) (241.66,280.88) (239.2,286.54)
(237.66,293.75) (235.48,312.08) (233.95,317.39) (231.82,321.5)
(230.08,323.74) (228.0,325.7) (225.6,327.39) (222.9,328.79)
(216.76,330.71) (209.32,331.48) (201.85,330.81) (198.02,329.85)
(195.07,328.73) (192.39,327.32) (190.0,325.62) (187.94,323.64)
(186.21,321.39) (184.11,317.26) (182.6,311.93) (180.42,293.59)
(179.04,287.01) (177.76,283.44) (176.37,280.76) (174.68,278.43)
(172.69,276.48) (169.92,274.72) (167.34,273.77) (163.98,273.3)
(161.03,273.48) (157.4,274.38) (154.4,275.7) (150.92,277.93)
(148.21,280.29) (143.97,285.54) (141.1,291.09) (139.19,297.22)
(138.23,304.49) (138.34,311.05) (139.18,317.5) (144.55,338.96)
(145.64,347.04) (145.57,351.31) (144.91,356.27) (139.77,376.54)
(138.77,382.07) (138.23,387.76) (138.29,393.51) (139.06,399.17)
(140.59,404.59)
} -- cycle;
\end{tikzpicture}}
\newcommand\kuhycredit[1][\kuhycreditsize]{%
\ifdefined\href{\hypersetup{pdfborder={0 0 0}}%
\href{\kuhycreditURL}{\kuhycreditlogo[#1]}}%
\else\kuhycreditlogo[#1]\fi}
% \kuhycreditcorner[<inset>] (preamble) puts \kuhycredit on every page,
% <inset> (default 4mm) from the bottom-right corner of the paper.
\newcommand\kuhycreditcorner[1][4mm]{\AddToHook{shipout/foreground}{%
\put(\strip@pt\dimexpr\paperwidth-#1-\kuhycreditsize\relax,
\strip@pt\dimexpr#1-\paperheight\relax){\kuhycredit}}}
\AtBeginDocument{\ifdefined\href\else\PackageWarningNoLine{kuhy-credit}%
{hyperref is not loaded: \string\kuhycredit\space draws no link}\fi}
\endinput