3

For the following code, I don't have the same result in Ubuntu 20.04 and Ubuntu 22.04 with TexLive.

\documentclass{article}
\usepackage[left=2.00cm, right=3.00cm, top=4.00cm, bottom=3.00cm,showframe]{geometry}
\usepackage{pstricks-add}
\usepackage{tikz}

\newlength{\pssize}\setlength{\pssize}{1cm} \newcommand{\logotextformat}{\sffamily \bfseries \large}

\newcommand{\logoimg}[2]{ \begin{pspicture}(#1,-#2) \newrgbcolor{curcolor}{0.88 0.15 0.11} \psset{ unit=0.7pt, linestyle=none, fillstyle=solid, fillcolor=curcolor } \pscustom{ \newpath \moveto(74, 18) \lineto(56, 18) \lineto(56, 12) \lineto(68, 12) \lineto(68, 12) \curveto(67, 7)(63, 5)(57, 5) \curveto(50, 5)(45, 10)(45, 17) \curveto(45, 24)(50, 30)(57, 30) \curveto(63, 30)(67, 27)(69, 23) \lineto(74, 25) \curveto(71, 32)(65, 35)(57, 35) \curveto(47, 35)(39, 27)(39, 17) \curveto(39, 7)(47, 0)(57, 0) \curveto(62, 0)(66, 2)(69, 5) \lineto(69, 1) \lineto(74, 1) \lineto(74, 17) \lineto(74, 17) \lineto(74, 17) \closepath } \pscustom{ \newpath \moveto(27, 61) \lineto(5, 61) \lineto(5, 75) \lineto(0, 75) \lineto(0, 42) \lineto(5, 42) \lineto(5, 56) \lineto(27, 56) \lineto(27, 42) \lineto(33, 42) \lineto(33, 75) \lineto(27, 75) \closepath } \end{pspicture} }

\newcommand{\placelogo}[2]{% \logo{<left>}{<top>} \begin{tikzpicture}[remember picture,overlay, align=center,] \node(logo) at ([xshift=#1, yshift=-#2] current page.north west) [anchor=north west] {\logoimg{#1}{#2}}; \end{tikzpicture}\vspace*{-\baselineskip}}

\begin{document} \placelogo{2cm}{3cm} \end{document}

Build

I build the project with

latexmk -xelatex test.tex

TeX 3.14159265 (TeX Live 2019/Debian)

The logo is visible as expected.

enter image description here

TeX 3.141592653 (TeX Live 2022/dev/Debian)

Logo not displayed.

enter image description here

nowox
  • 1,375
  • 2
    ghostscript added security options. Compile with xelatex-unsafe (or compile with lualatex), see e.g. https://tex.stackexchange.com/a/642533/2388 – Ulrike Fischer Feb 05 '23 at 13:36
  • 2
    Or if xelatex-unsafe is not available you can use xelatex -output-driver="xdvipdfmx -i dvipdfmx-unsafe.cfg -q -E" yourfile.tex as mentioned in the question that Ulrike linked. – Marijn Feb 05 '23 at 13:37

2 Answers2

4

Consider replacing the pstricks code by tikz commands, since you are using tikz anyway. I have transcribed the logo, see below, using How do I achieve this in simple TikZ commands?. The following output is generated by a current TeX distribution using pdflatex, xelatex, or whatever, without the need for additional command-line arguments.

enter image description here

\documentclass{article}
\usepackage[left=2.00cm, right=3.00cm, top=4.00cm, bottom=3.00cm,showframe]{geometry}
\usepackage{tikz}

\newcommand{\logoimg}[2]{% \begin{tikzpicture}[x=0.7pt,y=0.7pt]%\begin{pspicture}(#1,-#2) \definecolor{curcolor}{rgb}{0.88,0.15,0.11} %\newrgbcolor{curcolor}{0.88 0.15 0.11} %\psset{ % unit=0.7pt, % linestyle=none, % fillstyle=solid, % fillcolor=curcolor % } \fill[curcolor] %\pscustom{\newpath (74,18)%\moveto(74, 18) -- (56,18)%\lineto(56, 18) -- (56,12)%\lineto(56, 12) -- (68,12)%\lineto(68, 12) %-- (68,12)%\lineto(68, 12) again??? .. controls (67,7) and (63,5) .. (57,5)%\curveto(67, 7)(63, 5)(57, 5) .. controls (50,5) and (45,10) .. (45,17)%\curveto(50, 5)(45, 10)(45, 17) .. controls (45,24) and (50,30) .. (57,30)%\curveto(45, 24)(50, 30)(57, 30) .. controls (63,30) and (67,27) .. (69,23)%\curveto(63, 30)(67, 27)(69, 23) -- (74,25)% \lineto(74, 25) .. controls (71,32) and (65,35) .. (57,35)%\curveto(71, 32)(65, 35)(57, 35) .. controls (47,35) and (39,27) .. (39, 17)%\curveto(47, 35)(39, 27)(39, 17) .. controls (39,7) and (47,0) .. (57,0)%\curveto(39, 7)(47, 0)(57, 0) .. controls (62,0) and (66,2) .. (69,5)%\curveto(62, 0)(66, 2)(69, 5) -- (69,1)%\lineto(69, 1) -- (74,1)%\lineto(74, 1) -- (74,17)%\lineto(74, 17) %-- (74,17)%\lineto(74, 17) again??? %-- (74,17)%\lineto(74, 17) and again??? -- cycle%\closepath ;%} \fill[curcolor]%\pscustom{\newpath (27,61)%\moveto(27, 61) -- (5,61)%\lineto(5, 61) -- (5,75)%\lineto(5, 75) -- (0,75)%\lineto(0, 75) -- (0,42)%\lineto(0, 42) -- (5,42)%\lineto(5, 42) -- (5,56)%\lineto(5, 56) -- (27,56)%\lineto(27, 56) -- (27,42)%\lineto(27, 42) -- (33,42)%\lineto(33, 42) -- (33,75)%\lineto(33, 75) -- (27,75)%\lineto(27, 75) -- cycle%\closepath ;%} \end{tikzpicture}%\end{pspicture} }

\newcommand{\placelogo}[2]{% \logo{<left>}{<top>} \begin{tikzpicture}[remember picture,overlay, align=center,] \node(logo) at ([xshift=#1, yshift=-#2] current page.north west) [anchor=south west] {\logoimg{#1}{#2}}; \end{tikzpicture}}

\begin{document} \placelogo{2cm}{3.25cm} \end{document}

gernot
  • 49,614
3

Here is a solution with a simple typesetting of the two characters. You can use another fonr to get similar characters to your (complecated) drawing:

\documentclass{article}
\usepackage[left=2.00cm, right=3.00cm, top=4.00cm, bottom=3.00cm,showframe]{geometry}
\usepackage{tikz}
\definecolor{logocolor}{rgb}{0.88,0.15,0.11}

\newcommand\logotextformat{\fontsize{1cm}{1.1cm}\selectfont\sffamily\bfseries}

\newcommand\logoimg{% \makebox(0,0){\logotextformat\sffamily\bfseries\Huge\tabcolsep0pt\tabular{ll} \textcolor{logocolor}{H}\[-12pt] &\textcolor{logocolor}{G}\endtabular}}

\newcommand\placelogo[2]{% \logo{<left>}{<top>} \begin{tikzpicture}[remember picture,overlay, align=center,] \node(logo) at ([xshift=#1, yshift=-#2] current page.north west) [anchor=north west] {\logoimg}; \end{tikzpicture}\vspace*{-\baselineskip}}

\begin{document} \placelogo{2.5cm}{2.5cm} \end{document}

enter image description here

user187802
  • 16,850