Re: [luatex] LuaTex using 60GB of RAM

2025-07-01 Thread Max Chernoff via luatex
Hi Luigi,

On Tue, 2025-07-01 at 10:52 +0200, luigi scarso wrote:
> On Tue, 1 Jul 2025 at 10:47, luigi scarso  wrote:
> > On Tue, 1 Jul 2025 at 10:37, Max Chernoff via luatex 
> > wrote:
> > > On Mon, 2025-06-30 at 21:53 -0700, Lou Chang wrote:
> > > > Here is the source that you could use to reproduce the problem:
> > >
> > > That document does not compile as-is on my system. I had to make the
> > > following changes:
> > >
> > > 1. Replace "Palatino Linotype" with "TeX Gyre Pagella" (since I
> > >don't have Palatino installed on my system).
> > >
> > hm, perhaps we can use the files from there
> > https://aur.archlinux.org/packages/ttf-ms-win11
> >
> Ah no, it requires a full win11 already installed.

I have a Windows 11 VM installed, so I copied over the font files from
there, and the document still compiles correctly. So it looks like the
font probably isn't the issue here.

Thanks,
-- Max



Re: [luatex] LuaTex using 60GB of RAM

2025-07-01 Thread luigi scarso
On Tue, 1 Jul 2025 at 12:03, Max Chernoff  wrote:

> Hi Luigi,
>
> On Tue, 2025-07-01 at 10:52 +0200, luigi scarso wrote:
> > On Tue, 1 Jul 2025 at 10:47, luigi scarso 
> wrote:
> > > On Tue, 1 Jul 2025 at 10:37, Max Chernoff via luatex 
> > > wrote:
> > > > On Mon, 2025-06-30 at 21:53 -0700, Lou Chang wrote:
> > > > > Here is the source that you could use to reproduce the problem:
> > > >
> > > > That document does not compile as-is on my system. I had to make the
> > > > following changes:
> > > >
> > > > 1. Replace "Palatino Linotype" with "TeX Gyre Pagella" (since I
> > > >don't have Palatino installed on my system).
> > > >
> > > hm, perhaps we can use the files from there
> > > https://aur.archlinux.org/packages/ttf-ms-win11
> > >
> > Ah no, it requires a full win11 already installed.
>
> I have a Windows 11 VM installed, so I copied over the font files from
> there, and the document still compiles correctly. So it looks like the
> font probably isn't the issue here.
>
>
indeed, we only need the original logo.png or at least its size --  perhaps
logo.png is broken in some bad way, who knows.

--
luigi


Re: [luatex] LuaTex using 60GB of RAM

2025-07-01 Thread luigi scarso
On Tue, 1 Jul 2025 at 10:47, luigi scarso  wrote:

>
>
> On Tue, 1 Jul 2025 at 10:37, Max Chernoff via luatex 
> wrote:
>
>> Hi Lou,
>>
>> On Mon, 2025-06-30 at 21:53 -0700, Lou Chang wrote:
>> > Here is the source that you could use to reproduce the problem:
>>
>> That document does not compile as-is on my system. I had to make the
>> following changes:
>>
>> 1. Replace "Palatino Linotype" with "TeX Gyre Pagella" (since I
>>don't have Palatino installed on my system).
>>
>
> hm, perhaps we can use the files from there
> https://aur.archlinux.org/packages/ttf-ms-win11
>
>
Ah no, it requires a full win11 already installed.

--
luigi

>


Re: [luatex] LuaTex using 60GB of RAM

2025-07-01 Thread luigi scarso
On Tue, 1 Jul 2025 at 10:37, Max Chernoff via luatex  wrote:

> Hi Lou,
>
> On Mon, 2025-06-30 at 21:53 -0700, Lou Chang wrote:
> > Here is the source that you could use to reproduce the problem:
>
> That document does not compile as-is on my system. I had to make the
> following changes:
>
> 1. Replace "Palatino Linotype" with "TeX Gyre Pagella" (since I
>don't have Palatino installed on my system).
>

hm, perhaps we can use the files from there
https://aur.archlinux.org/packages/ttf-ms-win11

 --
luigi


Re: [luatex] LuaTex using 60GB of RAM

2025-07-01 Thread Max Chernoff via luatex
Hi Lou,

On Mon, 2025-06-30 at 21:53 -0700, Lou Chang wrote:
> Here is the source that you could use to reproduce the problem:

That document does not compile as-is on my system. I had to make the
following changes:

1. Replace "Palatino Linotype" with "TeX Gyre Pagella" (since I
   don't have Palatino installed on my system).

2. Replace "logo.png" with "example-image.png" (an example file
   included with TeX Live).

3. Add "\usetikzlibrary{decorations.pathmorphing}".

After making these changes, the document compiles without any errors,
and used only ~200MiB of memory. So the issue depends either on the
changes that I made, or on something specific to your system.

Thanks,
-- Max



[luatex] LuaTex using 60GB of RAM

2025-07-01 Thread Lou Chang
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)