on building the book with pdflatex

22 views
Skip to first unread message

Qian Yun

unread,
May 7, 2024, 7:51:24 AM5/7/24
to fricas-devel
Some decisions need to be made in order to build book with pdflatex.

1. src/doc/ps/ images.

These are hyperdoc images. They are in ps format, but actually are
bitmap images. pdflatex can't handle ps format directly, so I
suggest to convert them into png format.

2. If the answer to previous question is yes, then shall we convert
from ps format, or shall we do the screenshots again to create
a higher resolution of those images.

- Qian

Waldek Hebisch

unread,
May 7, 2024, 8:05:34 AM5/7/24
to fricas...@googlegroups.com
On Tue, May 07, 2024 at 07:51:18PM +0800, Qian Yun wrote:
> Some decisions need to be made in order to build book with pdflatex.
>
> 1. src/doc/ps/ images.
>
> These are hyperdoc images. They are in ps format, but actually are
> bitmap images. pdflatex can't handle ps format directly, so I
> suggest to convert them into png format.

OK.

> 2. If the answer to previous question is yes, then shall we convert
> from ps format, or shall we do the screenshots again to create
> a higher resolution of those images.

It would be good to do fresh screenshots as old images are no
longer up to date.

--
Waldek Hebisch

Ralf Hemmecke

unread,
May 7, 2024, 8:07:02 AM5/7/24
to fricas...@googlegroups.com
I am definitely for recreating the HyperDoc picture from screenshots in
a reasonably good resolution.

Currently there are some .ps files there that you now can create like
knot3.ps ribbon*.pd SEGBIND.ps. These should go away.

Ralf

Dima Pasechnik

unread,
May 7, 2024, 9:46:02 AM5/7/24
to fricas...@googlegroups.com
On Tue, May 7, 2024 at 12:51 PM Qian Yun <oldk...@gmail.com> wrote:
>
> Some decisions need to be made in order to build book with pdflatex.
>
> 1. src/doc/ps/ images.
>
> These are hyperdoc images. They are in ps format, but actually are
> bitmap images. pdflatex can't handle ps format directly, so I
> suggest to convert them into png format.

pdflatex/xelatex/lualatex can handle eps images just fine.
You can first run ps2eps on the ps files.

E.g. I can take knot3.ps - one of the files, (which is not bitmap, but
a proper postscript) run

ps2pdf knot3.ps

producing knot3.eps, move knot3.ps out of the way, and then

\documentclass{article}
\usepackage{graphics}
\begin{document}
\includegraphics{knot3}
\end{document}

works just fine.
Or, perhaps, you prefer xelatex, then you'd need
\usepackage[xetex]{graphics}

Dutto for lualatex, you'd use
\usepackage[luatex]{graphics}

IMHO one should not use pdflatex, which is obsolete, but switch to
lualatex or xelatex.

Dima




>
> 2. If the answer to previous question is yes, then shall we convert
> from ps format, or shall we do the screenshots again to create
> a higher resolution of those images.
>
> - Qian
>
> --
> You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/0768deef-035e-474f-a14f-9cc5e59cf902%40gmail.com.

Qian Yun

unread,
May 7, 2024, 9:56:48 AM5/7/24
to fricas...@googlegroups.com


On 5/7/24 21:45, Dima Pasechnik wrote:
> On Tue, May 7, 2024 at 12:51 PM Qian Yun <oldk...@gmail.com> wrote:
>>
>> Some decisions need to be made in order to build book with pdflatex.
>>
>> 1. src/doc/ps/ images.
>>
>> These are hyperdoc images. They are in ps format, but actually are
>> bitmap images. pdflatex can't handle ps format directly, so I
>> suggest to convert them into png format.
>
> pdflatex/xelatex/lualatex can handle eps images just fine.
> You can first run ps2eps on the ps files.
>
> E.g. I can take knot3.ps - one of the files, (which is not bitmap, but
> a proper postscript) run
>
> ps2pdf knot3.ps
>
> producing knot3.eps, move knot3.ps out of the way, and then

You used both eps and pdf. I think you meant pdf here?

knot3.ps (and a few other vector images) will be removed very soon,
because we'll be able to generate them during build. And yes,
to build with pdflatex, those ps images will be converted to pdf
format by epstopdf.

The rest ps images are all bitmaps.

> \documentclass{article}
> \usepackage{graphics}
> \begin{document}
> \includegraphics{knot3}
> \end{document}
>
> works just fine.
> Or, perhaps, you prefer xelatex, then you'd need
> \usepackage[xetex]{graphics}
>
> Dutto for lualatex, you'd use
> \usepackage[luatex]{graphics}
>
> IMHO one should not use pdflatex, which is obsolete, but switch to
> lualatex or xelatex.
>
> Dima
>

I think it'll be easy to support pdflatex/lualatex/xelatex all
at current stage, because there's no breaking features that
are used in tex source files, for example unicode support.

- Qian

Dima Pasechnik

unread,
May 7, 2024, 10:08:47 AM5/7/24
to fricas...@googlegroups.com
On Tue, May 7, 2024 at 2:56 PM Qian Yun <oldk...@gmail.com> wrote:
>
>
>
> On 5/7/24 21:45, Dima Pasechnik wrote:
> > On Tue, May 7, 2024 at 12:51 PM Qian Yun <oldk...@gmail.com> wrote:
> >>
> >> Some decisions need to be made in order to build book with pdflatex.
> >>
> >> 1. src/doc/ps/ images.
> >>
> >> These are hyperdoc images. They are in ps format, but actually are
> >> bitmap images. pdflatex can't handle ps format directly, so I
> >> suggest to convert them into png format.
> >
> > pdflatex/xelatex/lualatex can handle eps images just fine.
> > You can first run ps2eps on the ps files.
> >
> > E.g. I can take knot3.ps - one of the files, (which is not bitmap, but
> > a proper postscript) run
> >
> > ps2pdf knot3.ps
> >
> > producing knot3.eps, move knot3.ps out of the way, and then
>
> You used both eps and pdf. I think you meant pdf here?

sorry, typo, I meant

ps2eps knot3.ps

>
> knot3.ps (and a few other vector images) will be removed very soon,
> because we'll be able to generate them during build. And yes,
> to build with pdflatex, those ps images will be converted to pdf
> format by epstopdf.

as I said, it's not needed. (eps is smaller than pdf)

>
> The rest ps images are all bitmaps.
>
> > \documentclass{article}
> > \usepackage{graphics}
> > \begin{document}
> > \includegraphics{knot3}
> > \end{document}
> >
> > works just fine.
> > Or, perhaps, you prefer xelatex, then you'd need
> > \usepackage[xetex]{graphics}
> >
> > Dutto for lualatex, you'd use
> > \usepackage[luatex]{graphics}
> >
> > IMHO one should not use pdflatex, which is obsolete, but switch to
> > lualatex or xelatex.
> >
> > Dima
> >
>
> I think it'll be easy to support pdflatex/lualatex/xelatex all
> at current stage, because there's no breaking features that
> are used in tex source files, for example unicode support.
>
> - Qian
>
> --
> You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/7ca24f5f-3f3b-4ded-b48a-e85c0cda8689%40gmail.com.

Qian Yun

unread,
May 7, 2024, 10:21:54 AM5/7/24
to fricas...@googlegroups.com


On 5/7/24 22:08, Dima Pasechnik wrote:
>
> sorry, typo, I meant
>
> ps2eps knot3.ps
>

Thanks, I didn't know about this ps2eps tool.
It does convert knot3.ps to a proper eps format.

>> knot3.ps (and a few other vector images) will be removed very soon,
>> because we'll be able to generate them during build. And yes,
>> to build with pdflatex, those ps images will be converted to pdf
>> format by epstopdf.
>
> as I said, it's not needed. (eps is smaller than pdf)
>

Yes, pdflatex+graphics can use this eps file directly,
(but looks like it uses package epstopdf-pkg to do the
conversion in the background automatically.)

But eps is not smaller than pdf, for knot3, eps is 1.2MB
(same as ps format), pdf is 148KB.


So it looks like we have to use one of ps2eps or epstopdf.
And epstopdf is used in the background if we use ps2eps first.
So it still looks like using only epstopdf is the better
solution here.

- Qian
Reply all
Reply to author
Forward
0 new messages