General ⇒ compil \pbox with pdflatex
compil \pbox with pdflatex
I have a latex file I can smoothly compil using pslatex. I would like to compil it with pdflatex, however, because the latex file is containing some \pbox sequences, I can't.
Is there a way to make pdflatex understand the \pbox sequences ? Or maybe I can replace the \pbox sequences by a pdflatex equivalent ?
And no, I don't want to play with ps2pdf (long story...)
Regards.
Is there a way to make pdflatex understand the \pbox sequences ? Or maybe I can replace the \pbox sequences by a pdflatex equivalent ?
And no, I don't want to play with ps2pdf (long story...)
Regards.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
compil \pbox with pdflatex
It's not really clear to me where the problem is, but I think that using PSNFSS is the better way to get access to postscript fonts. To clarify this issue you should provide some code in the sense of a minimal working example (MWE). Please read carefully the advices on the linked page when creating this MWE.
Best regards and welcome to the board
Thorsten¹
Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
compil \pbox with pdflatex
I don't see how my problem is related to a font problem.localghost wrote:It's not really clear to me where the problem is, but I think that using PSNFSS is the better way to get access to postscript fonts. To clarify this issue you should provide some code in the sense of a minimal working example (MWE). Please read carefully the advices on the linked page when creating this MWE.
here is a sample:
Code: Select all
\pbox{0.95\textwidth}{}{linewidth=2mm,framearc=0.3,linecolor=lightblue,fillstyle=gradient,gradangle=0,gradbegin=white,gradend=whiteblue,gradmidpoint=1.0,framesep=1em}
{
\begin{minipage}[c][9cm][c]{0.78\textwidth}
\begin{center}
{\sc \Huge Hello World !}\\[10mm]
{\Large From me\\[7.5mm]for you}
\end{center}
\end{minipage}
}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
compil \pbox with pdflatex
That's because your understanding of pslatex is very misleading. What you call "pslatex" is simply the latex compiler. The pslatex package I expected is font related. Therefore I requested a MWE, which is still necessary because I don't know where the \pbox command comes from. But as I now see from this code snippet, there are some arguments which are normally used with PSTricks. And that is the reason why this can't be compiled with pdflatex.jcdemay wrote:[...] I don't see how my problem is related to a font problem. [...]
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10347
- Joined: Mon Mar 10, 2008 9:44 pm
compil \pbox with pdflatex
Hi,
Stefan
you could try pgf/TikZ. I've made this short example for you, compile it with pdflatex:jcdemay wrote:if there is a pdflatex compatible sequence that could do the same job.
Code: Select all
\documentclass[a4paper,10pt,svgnames]{article}
\usepackage{tikz}
\usetikzlibrary{shadows}
\newcommand{\pbox}[4]{%
\begin{tikzpicture}
\node[#3] {\begin{minipage}[t][#2][t]{#1}%
#4
\end{minipage}};
\end{tikzpicture}}
\begin{document}
\pbox{5cm}{}{rectangle,drop shadow,rounded corners=18pt,inner sep=10pt,
shade,top color=LightSlateBlue, bottom color=AliceBlue}
{\centering{\Huge Test}\par This is just a test.}
\pbox{3cm}{}{rectangle,drop shadow,rounded corners=5pt,inner sep=10pt,
shade,top color=DarkOrange, bottom color=LightGoldenrod}
{\centering{\Large Test}\par Another one.}
\bigskip
\pbox{.7\textwidth}{}{rectangle,drop shadow,rounded corners=5pt,inner sep=5pt,
shade,left color=DarkRed, right color=Tomato}
{\centering\textcolor{white}{\textbf{This is the last line for this demonstration.}}}
\end{document}
LaTeX.org admin
compil \pbox with pdflatex
Well on my system, latex is a symbolic link to either pslatex or pdflatex depending on which one is your default compiler, but you were right, it's not like I knew what I was doing, after a few minutes of inspection, I got to know that pbox is a newcommand used in the academic poster class I downloaded, newcommand which is using psshadowbox, which is from the pstricks package, and which therefore can't be used with pdflatex.localghost wrote:That's because your understanding of pslatex is very misleading. What you call "pslatex" is simply the latex compiler. The pslatex package I expected is font related.jcdemay wrote:[...] I don't see how my problem is related to a font problem. [...]
compil \pbox with pdflatex
Impressive, with this few information (my bad, see previous post), you managed to provide a perfect replacement ! Great job, thank you ^^.Stefan_K wrote:you could try pgf/TikZ. I've made this short example for you, compile it with pdflatex:StefanCode: Select all
\documentclass[a4paper,10pt,svgnames]{article} \usepackage{tikz} \usetikzlibrary{shadows} \newcommand{\pbox}[4]{% \begin{tikzpicture} \node[#3] {\begin{minipage}[t][#2][t]{#1}% #4 \end{minipage}}; \end{tikzpicture}} \begin{document} \pbox{5cm}{}{rectangle,drop shadow,rounded corners=18pt,inner sep=10pt, shade,top color=LightSlateBlue, bottom color=AliceBlue} {\centering{\Huge Test}\par This is just a test.} \pbox{3cm}{}{rectangle,drop shadow,rounded corners=5pt,inner sep=10pt, shade,top color=DarkOrange, bottom color=LightGoldenrod} {\centering{\Large Test}\par Another one.} \bigskip \pbox{.7\textwidth}{}{rectangle,drop shadow,rounded corners=5pt,inner sep=5pt, shade,left color=DarkRed, right color=Tomato} {\centering\textcolor{white}{\textbf{This is the last line for this demonstration.}}} \end{document}
So, tikz is the pdflatex equivalent of pstricks. I'll try to port the class to it, thanks for the tips.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
compil \pbox with pdflatex
In the meantime I found out that a \pbox command is also provided by the pbox package. So, you can see that there is a lot potential for confusion.jcdemay wrote:Well on my system, latex is a symbolic link to either pslatex or pdflatex depending on which one is your default compiler, but you were right, it's not like I knew what I was doing, after a few minutes of inspection, I got to know that pbox is a newcommand used in the academic poster class I downloaded, newcommand which is using psshadowbox, which is from the pstricks package, and which therefore can't be used with pdflatex.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10