Hi, I was informed that I could send an email here to have this
investigated. As a beginner in both LaTex and LuaTex, please forgive me
if I seem to lack knowledge. When I attempted to use LuaTex to create a
gift certificate, it began to fill up the Swap partition and used 60 GB
of RAM out of 62 GB. Then TeXstudio crashed (being killed by the Linux
Kernel).
Thank you very much.
The error it gave was:
"Memory Shortage Avoided.
TeXstudio has been terminated by the Linux kernel because the system is
low on memory."
Here is the source that you could use to reproduce the problem:
\documentclass[11pt]{article}
\usepackage[paperwidth=11in,paperheight=3.5in,margin=0.25in]{geometry}
\usepackage{fontspec}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{tikzpagenodes}
\usetikzlibrary{shadows,patterns,decorations.text}
% Set main fonts
\setmainfont{Palatino Linotype}[
BoldFont={Palatino Linotype Bold},
ItalicFont={Palatino Linotype Italic}
]
% Define colors - using CMYK for print
\definecolor{darkred}{cmyk}{0,0.85,0.75,0.35}
\definecolor{gold}{cmyk}{0,0.17,0.74,0.17}
\definecolor{cream}{cmyk}{0,0.02,0.06,0.01}
\definecolor{shadowgray}{cmyk}{0,0,0,0.3}
% Remove page numbers
\pagestyle{empty}
\begin{document}
\pagecolor{cream}
\noindent
% STUB SECTION with shadow
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at
([xshift=0.25in,yshift=-0.25in]current page.north west) {
\begin{tikzpicture}
% Shadow
\filldraw[shadowgray,opacity=0.3] (0.02in,-0.02in) rectangle
(2.22in,-2.92in);
% Main border
\filldraw[darkred,draw=darkred,line width=2pt,fill=cream] (0,0)
rectangle (2.2in,-2.9in);
% Inner decorative border
\draw[gold,line width=0.8pt] (0.05in,-0.05in) rectangle (2.15in,-2.85in);
\end{tikzpicture}
};
\end{tikzpicture}
% STUB CONTENT
\begin{minipage}[t][3in]{2.3in}
\vspace{0.1in}
\begin{center}
{\fontspec{Palatino Linotype Bold}\small\color{darkred} GIFT CERTIFICATE
STUB}\\[0.02in]
% Logo in stub
\includegraphics[width=0.85in]{logo.png}\\[0.01in]
{\fontspec{Palatino Linotype Bold}\LARGE Sakura}\\[-0.01in]
{\fontspec{Palatino Linotype Italic}\normalsize\color{darkred} Japanese
Restaurant}\\[0.02in]
\begin{tikzpicture}
\node[draw=gold,line width=1pt,inner sep=0.05in,fill=white,fill
opacity=0.8] {
\begin{minipage}{1.8in}
\scriptsize
\textbf{Cert No:} GC-2025-001\\[2pt]
\textbf{Amount:} \$100.00\\[2pt]
\textbf{To:} \rule{1.2in}{0.4pt}\\[2pt]
\textbf{From:} \rule{1.1in}{0.4pt}\\[2pt]
\textbf{Purchase Date:} \rule{0.85in}{0.4pt}\\[2pt]
\textbf{Expires:} One year from purchase\\[2pt]
\textbf{Sold By:} \rule{1in}{0.4pt}
\end{minipage}
};
\end{tikzpicture}
\vspace{0.05in}
{\fontspec{Palatino Linotype Italic}\tiny\color{darkred} Keep this
portion for records}
\end{center}
\end{minipage}
% PERFORATION
\hspace{0.05in}
\begin{tikzpicture}
\foreach \y in {0,0.1,...,2.9} {
\fill[darkred] (0,\y) circle (0.3pt);
}
\end{tikzpicture}
\hspace{0.05in}
% MAIN CERTIFICATE with shadow
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at
([xshift=2.65in,yshift=-0.25in]current page.north west) {
\begin{tikzpicture}
% Shadow
\filldraw[shadowgray,opacity=0.3] (0.03in,-0.03in) rectangle
(7.88in,-2.93in);
% Main border
\filldraw[darkred,draw=darkred,line width=3pt,fill=cream] (0,0)
rectangle (7.85in,-2.9in);
% Inner decorative border
\draw[gold,line width=1.5pt] (0.05in,-0.05in) rectangle (7.8in,-2.85in);
% Corner decorations
\foreach \corner in {(0.1in,-0.1in), (7.75in,-0.1in), (0.1in,-2.8in),
(7.75in,-2.8in)} {
\draw[gold,line width=1pt] \corner circle (0.05in);
}
\end{tikzpicture}
};
\end{tikzpicture}
% MAIN CERTIFICATE CONTENT
\hspace{2.4in}
\begin{minipage}[t][3in]{7.9in}
\vspace{0.15in}
\begin{center}
% Header with better spacing
\begin{tabular}{@{}c@{\hspace{0.15in}}c@{}}
% Logo on left
\includegraphics[width=1.0in]{logo.png} &
% Text on right
\begin{tabular}{c}
{\fontspec{Palatino Linotype Bold}\LARGE\color{darkred} GIFT
CERTIFICATE}\\[0.02in]
{\fontspec{Palatino Linotype Bold}\Large Sakura Japanese
Restaurant}\\[0.01in]
{\fontspec{Palatino Linotype Italic}\small\color{darkred} Your Favorite
Japanese Food Since 1995}
\end{tabular}
\end{tabular}\\[0.15in]
% Three columns
\begin{minipage}[t]{2.6in}
% Left column
\vspace{0pt}
\raggedleft
% To box with gradient
\begin{tikzpicture}
\shade[left color=white,right color=gold!10] (0,0) rectangle (2.5in,0.3in);
\draw[gold,line width=1pt] (0,0) rectangle (2.5in,0.3in);
\node[anchor=west] at (0.05,0.15) {\fontspec{Palatino Linotype
Bold}\scriptsize\color{darkred} To:};
\draw[darkred!50,line width=0.4pt] (0.9,0.15) -- (2.45,0.15);
\end{tikzpicture}\\[0.05in]
{\fontspec{Palatino Linotype Italic}\small is invited to enjoy}\\
{\fontspec{Palatino Linotype Italic}\small delicious Japanese food with
us!}\\[0.05in]
% From/Message box with gradient
\begin{tikzpicture}
\shade[left color=white,right color=gold!10] (0,0) rectangle (2.5in,0.6in);
\draw[gold,line width=1pt] (0,0) rectangle (2.5in,0.6in);
\node[anchor=west] at (0.05,0.45) {\fontspec{Palatino Linotype
Bold}\scriptsize\color{darkred} From:};
\draw[darkred!50,line width=0.4pt] (1.0,0.45) -- (2.45,0.45);
\node[anchor=west] at (0.05,0.25) {\fontspec{Palatino Linotype
Bold}\scriptsize\color{darkred} Message:};
\draw[darkred!50,line width=0.4pt] (1.1,0.25) -- (2.45,0.25);
\draw[darkred!50,line width=0.4pt] (1.1,0.08) -- (2.45,0.08);
\end{tikzpicture}
\end{minipage}
\hfill
\begin{minipage}[t]{1.8in}
% Center column - Enhanced circle
\vspace{0.15in}
\centering
\begin{tikzpicture}
% Outer shadow
\draw[shadowgray,line width=3pt,opacity=0.3] (0.02,-0.02) circle (0.66in);
% Main circles with gradient effect
\shade[ball color=darkred!90!black,opacity=0.9] (0,0) circle (0.65in);
\draw[darkred,line width=2.5pt] (0,0) circle (0.65in);
\shade[ball color=gold!30!white,opacity=0.7] (0,0) circle (0.61in);
\draw[gold,line width=1.5pt] (0,0) circle (0.61in);
% Text
\node at (0,0.25in) {\fontspec{Palatino Linotype
Bold}\scriptsize\color{darkred} GIFT};
\node at (0,0) {\fontspec{Palatino Linotype Bold}\Large\color{darkred}
\$100};
\node at (0,-0.25in) {\fontspec{Palatino Linotype
Bold}\scriptsize\color{darkred} VALUE};
\end{tikzpicture}
\vspace{0.05in}
{\fontspec{Palatino Linotype Italic}\scriptsize\color{darkred} Enjoy
your meal!}
\end{minipage}
\hfill
\begin{minipage}[t]{2.1in}
% Right column
\vspace{0pt}
\raggedright
% Location boxes with shadows
\begin{tikzpicture}
\node[draw=gold,line width=1pt,inner sep=0pt,drop shadow={opacity=0.3}] {
\begin{minipage}{1.9in}
\centering\scriptsize
\vspace{0.02in}
{\fontspec{Palatino Linotype Bold}\color{darkred} DOWNTOWN}\\
123 Cherry Blossom Lane\\
Anytown, ST 12345\\
(555) 123-4567
\vspace{0.02in}
\end{minipage}
};
\end{tikzpicture}\\[0.05in]
\begin{tikzpicture}
\node[draw=gold,line width=1pt,inner sep=0pt,drop shadow={opacity=0.3}] {
\begin{minipage}{1.9in}
\centering\scriptsize
\vspace{0.02in}
{\fontspec{Palatino Linotype Bold}\color{darkred} WESTSIDE}\\
456 Bamboo Garden Way\\
Anytown, ST 12346\\
(555) 555-5555
\vspace{0.02in}
\end{minipage}
};
\end{tikzpicture}\\[0.08in]
% Certificate details
\centering
{\fontspec{Palatino Linotype Bold}\tiny\color{darkred} Certificate No:}
GC-2024-001\\[0.02in]
{\fontspec{Palatino Linotype Bold}\tiny\color{darkred} Valid For:} One
year from purchase\\[0.03in]
{\fontspec{Palatino Linotype Bold}\tiny\color{darkred} Sold By:}
\rule{0.7in}{0.4pt}\\[0.02in]
{\fontspec{Palatino Linotype Bold}\tiny\color{darkred} Date:}
\rule{0.55in}{0.4pt}
\end{minipage}
\vspace{0.1in}
% Bottom section with decorative line
\begin{tikzpicture}
\draw[gold,line width=0.6pt,decoration={snake,amplitude=0.5pt,segment
length=10pt},decorate] (-3.5in,0) -- (3.5in,0);
\end{tikzpicture}\\[0.02in]
{\fontspec{Palatino Linotype}\scriptsize\color{darkred}
www.sakurarestaurant.com}\\[0.02in]
{\fontspec{Palatino Linotype Italic}\tiny\color{darkred} Terms: Valid at
both locations • Dine-in or takeout • Cannot combine with other offers •
Come hungry!}
\end{center}
\end{minipage}
\end{document}