zsh-workers
 help / color / mirror / code / Atom feed
* zsh manual - missing bookmarks in pdf file?
@ 2016-03-01 14:26 Greg Klanderman
       [not found] ` <DE24867B-712C-46A4-85B4-BDD290E91154@kba.biglobe.ne.jp>
  0 siblings, 1 reply; 13+ messages in thread
From: Greg Klanderman @ 2016-03-01 14:26 UTC (permalink / raw)
  To: Zsh list


Hi, I just grabbed the current zsh 5.2 manual off the website the
other day and notice that compared to the 5.0.2 manual I had
previously downloaded, the new pdf is missing the bookmarks which
helps immensely with navigation.  Anyone know how the bookmarks were
lost?

thanks,
Greg


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: zsh manual - missing bookmarks in pdf file?
       [not found] ` <DE24867B-712C-46A4-85B4-BDD290E91154@kba.biglobe.ne.jp>
@ 2016-03-02  3:52   ` Greg Klanderman
  2016-03-02  5:20     ` Jun T.
  0 siblings, 1 reply; 13+ messages in thread
From: Greg Klanderman @ 2016-03-02  3:52 UTC (permalink / raw)
  To: Zsh list


>>>>> On March 1, 2016 Jun T <takimoto-j@kba.biglobe.ne.jp> wrote:

> What do you mean by bookmarks?

> Clickable links to other locations in the pdf are now in
> black color (they were in dark red in 5.0.2), so it is
> somewhat difficult to notice them. I guess we can change
> the link color if it causes no problem when printing
> by a B&W printer.

> Or are you talking about a different kind of "bookmark"?

Hi Jun, I don't mean the links within the text, I mean the bookmarks
panel to the left of the document text in acroread which is like a
table of contents that you can click on and open/close subtrees of.

The menu item View -> Navigation Panels -> Bookmarks does not appear
with the latest 5.2 docs, but did with the 5.0.2 docs which were the
next most recent I had downloaded.

Greg


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: zsh manual - missing bookmarks in pdf file?
  2016-03-02  3:52   ` Greg Klanderman
@ 2016-03-02  5:20     ` Jun T.
  2016-03-02 15:40       ` Greg Klanderman
  0 siblings, 1 reply; 13+ messages in thread
From: Jun T. @ 2016-03-02  5:20 UTC (permalink / raw)
  To: zsh-workers


On 2016/03/02, at 12:52, Greg Klanderman <gak@klanderman.net> wrote:
> I mean the bookmarks
> panel to the left of the document text in acroread which is like a
> table of contents that you can click on and open/close subtrees of.
> 
> The menu item View -> Navigation Panels -> Bookmarks does not appear
> with the latest 5.2 docs, but did with the 5.0.2 docs which were the
> next most recent I had downloaded.

I don't have acroread on Linux, but all of the following readers
can show the "bookmark" (or table of contents) panel with 5.2 pdf:
  Preview.app (OS X)
  Acrobat Reader (Windows 7)
  Document Viewer/Evince (Fedora)

Could you try another pdf viewer?


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: zsh manual - missing bookmarks in pdf file?
  2016-03-02  5:20     ` Jun T.
@ 2016-03-02 15:40       ` Greg Klanderman
  2016-03-03  5:03         ` Jun T.
  0 siblings, 1 reply; 13+ messages in thread
From: Greg Klanderman @ 2016-03-02 15:40 UTC (permalink / raw)
  To: zsh-workers

>>>>> On March 2, 2016 Jun T <takimoto-j@kba.biglobe.ne.jp> wrote:

> I don't have acroread on Linux, but all of the following readers
> can show the "bookmark" (or table of contents) panel with 5.2 pdf:
>   Preview.app (OS X)
>   Acrobat Reader (Windows 7)
>   Document Viewer/Evince (Fedora)

> Could you try another pdf viewer?

Hi Jun, I've got evince 3.10.3 on Ubuntu Trusty 14.04.

In the menu I selected View -> Side Pane, then in the side pane
pull-down menu, selected Bookmarks, and I see nothing.

To be clear, this is the zsh manual which I have downloaded:

http://zsh.sourceforge.net/Doc/zsh_us.pdf

Greg


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: zsh manual - missing bookmarks in pdf file?
  2016-03-02 15:40       ` Greg Klanderman
@ 2016-03-03  5:03         ` Jun T.
  2016-03-03 14:39           ` Greg Klanderman
  0 siblings, 1 reply; 13+ messages in thread
From: Jun T. @ 2016-03-03  5:03 UTC (permalink / raw)
  To: zsh-workers


On 2016/03/03, at 0:40, Greg Klanderman <gak@klanderman.net> wrote:
> To be clear, this is the zsh manual which I have downloaded:
> 
> http://zsh.sourceforge.net/Doc/zsh_us.pdf

This US version has no bookmarks. The A4 version is OK:

http://zsh.sourceforge.net/Doc/zsh_a4.pdf

I don't know how the US version was created.

Is it important for you that the paper size is US Letter?


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: zsh manual - missing bookmarks in pdf file?
  2016-03-03  5:03         ` Jun T.
@ 2016-03-03 14:39           ` Greg Klanderman
  2016-03-04  3:33             ` Jun T.
  0 siblings, 1 reply; 13+ messages in thread
From: Greg Klanderman @ 2016-03-03 14:39 UTC (permalink / raw)
  To: zsh-workers


>>>>> On March 3, 2016 Jun T <takimoto-j@kba.biglobe.ne.jp> wrote:

> This US version has no bookmarks. The A4 version is OK:

> http://zsh.sourceforge.net/Doc/zsh_a4.pdf

> I don't know how the US version was created.

> Is it important for you that the paper size is US Letter?

A4 is fine, it's not like I'm actually going to print it..  but if
we're going to put these up for download it would be nice to post
complete pdfs with the table of contents/bookmarks..

Looking at the Makefile, maybe pdfetex vs texi2pdf?

    zsh.pdf: $(sdir)/zsh.texi
            if [ x$(TEXI2PDF) != x ]; then \
              $(TEXI2PDF) $(sdir)/zsh.texi; \
            else \
              PDFTEX=$(PDFETEX) $(TEXI2DVI) --pdf $(sdir)/zsh.texi; \
            fi

My machine has texi2pdf and is creating a pdf with the bookmarks.
So I'll just use that :-)  At one point years ago I had stopped being
able to build the pdfs locally and resorted to downloading them.  It
appears to work for me now, but the pdfs are not generated by default
with just "make" so I hadn't realized it was working.

I'm building out of a git checkout, but if you need me to download
official 5.2 and build a US pdf with bookmarks to post, LMK.

Greg


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: zsh manual - missing bookmarks in pdf file?
  2016-03-03 14:39           ` Greg Klanderman
@ 2016-03-04  3:33             ` Jun T.
  2016-03-04  4:16               ` Mikael Magnusson
  0 siblings, 1 reply; 13+ messages in thread
From: Jun T. @ 2016-03-04  3:33 UTC (permalink / raw)
  To: zsh-workers


On 2016/03/03, at 23:39, Greg Klanderman <gak@klanderman.net> wrote:

> Looking at the Makefile, maybe pdfetex vs texi2pdf?

No, texi2pdf is just a simple wrapper script which calls
'texi2dvi --pdf', which in tern calls pdfetex.

>>>>>> On March 3, 2016 Jun T <takimoto-j@kba.biglobe.ne.jp> wrote:
>> I don't know how the US version was created.

It seems zsh_us.pdf was created from zsh.dvi (so it is not
surprising that it has no bookmarks).

In order to create a US-sized PDF with bookmarks, we need to modify
zsh.texi because a command @afourpaper is embedded in it and
it seems there is no texinfo command to cancel it (or to change the
paper size to US letter).

The patch below removes the @afourpaper from zsh.texi, and
add it by "-t @afourpaper" when A4 output is required.

A few minor points to discuss:
(1) A4 and US versions are named zsh_a4.pdf and zsh_us.pdf,
    as in the download page. Other possibility is
    zsh.a4.pdf and zsh.us.pdf (as intro.{a4,us}.pdf).
    Also we can use zsh.pdf for A4 version.
(2) 'make pdf' creates both zsh_a4.pdf and zsh_us.pdf.
    Is it better to create just on of them by default?
(3) zsh.dvi is for A4 paper, as before.
(4) Is it really necessary to have both A4 and US?
    Or just A4 is enough?


diff --git a/Doc/Makefile.in b/Doc/Makefile.in
index d589991..e61777b 100644
--- a/Doc/Makefile.in
+++ b/Doc/Makefile.in
@@ -93,16 +93,24 @@ dvi: zsh.dvi
 .PHONY: dvi
 
 zsh.dvi: $(sdir)/zsh.texi
-	$(TEXI2DVI) $(sdir)/zsh.texi
+	$(TEXI2DVI) -t '@afourpaper' $(sdir)/zsh.texi
 
-pdf: zsh.pdf intro.a4.pdf intro.us.pdf
+pdf: zsh_a4.pdf zsh_us.pdf intro.a4.pdf intro.us.pdf
 .PHONY: pdf
 
-zsh.pdf: $(sdir)/zsh.texi
+zsh_a4.pdf: $(sdir)/zsh.texi
 	if [ x$(TEXI2PDF) != x ]; then \
-	  $(TEXI2PDF) $(sdir)/zsh.texi; \
+	  $(TEXI2PDF) -t '@afourpaper' -o $@ $(sdir)/zsh.texi; \
 	else \
-	  PDFTEX=$(PDFETEX) $(TEXI2DVI) --pdf $(sdir)/zsh.texi; \
+	  PDFTEX=$(PDFETEX) \
+	    $(TEXI2DVI) --pdf -t '@afourpaper' -o $@ $(sdir)/zsh.texi; \
+	fi
+
+zsh_us.pdf: $(sdir)/zsh.texi
+	if [ x$(TEXI2PDF) != x ]; then \
+	  $(TEXI2PDF) -o $@ $(sdir)/zsh.texi; \
+	else \
+	  PDFTEX=$(PDFETEX) $(TEXI2DVI) --pdf -o $@ $(sdir)/zsh.texi; \
 	fi
 
 # Use roff2ps / ps2pdf because pdfroff produces doubled output.
diff --git a/Doc/ztexi.yo b/Doc/ztexi.yo
index e878345..7d52e6e 100644
--- a/Doc/ztexi.yo
+++ b/Doc/ztexi.yo
@@ -53,7 +53,6 @@ def(texinfo)(2)(\
   NOTRANS(\input texinfo.tex)+NL()\
   NOTRANS(@c %**start of header)+NL()\
   NOTRANS(@iftex)+NL()\
-  NOTRANS(@afourpaper)+NL()\
   NOTRANS(@setchapternewpage off)+NL()\
   NOTRANS(@end iftex)+NL()\
   NOTRANS(@setfilename )ARG1+NL()\




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: zsh manual - missing bookmarks in pdf file?
  2016-03-04  3:33             ` Jun T.
@ 2016-03-04  4:16               ` Mikael Magnusson
  2016-03-04 14:25                 ` Jun T.
  0 siblings, 1 reply; 13+ messages in thread
From: Mikael Magnusson @ 2016-03-04  4:16 UTC (permalink / raw)
  To: Jun T.; +Cc: zsh-workers

On Fri, Mar 4, 2016 at 4:33 AM, Jun T. <takimoto-j@kba.biglobe.ne.jp> wrote:
>
> On 2016/03/03, at 23:39, Greg Klanderman <gak@klanderman.net> wrote:
>
>> Looking at the Makefile, maybe pdfetex vs texi2pdf?
>
> No, texi2pdf is just a simple wrapper script which calls
> 'texi2dvi --pdf', which in tern calls pdfetex.
>
>>>>>>> On March 3, 2016 Jun T <takimoto-j@kba.biglobe.ne.jp> wrote:
>>> I don't know how the US version was created.
>
> It seems zsh_us.pdf was created from zsh.dvi (so it is not
> surprising that it has no bookmarks).
>
> In order to create a US-sized PDF with bookmarks, we need to modify
> zsh.texi because a command @afourpaper is embedded in it and
> it seems there is no texinfo command to cancel it (or to change the
> paper size to US letter).
>
> The patch below removes the @afourpaper from zsh.texi, and
> add it by "-t @afourpaper" when A4 output is required.
>
> A few minor points to discuss:
> (1) A4 and US versions are named zsh_a4.pdf and zsh_us.pdf,
>     as in the download page. Other possibility is
>     zsh.a4.pdf and zsh.us.pdf (as intro.{a4,us}.pdf).
>     Also we can use zsh.pdf for A4 version.
> (2) 'make pdf' creates both zsh_a4.pdf and zsh_us.pdf.
>     Is it better to create just on of them by default?
> (3) zsh.dvi is for A4 paper, as before.
> (4) Is it really necessary to have both A4 and US?
>     Or just A4 is enough?

We could somehow use LC_PAPER to determine which to build, and allow
overriding/building both with a configure option?

-- 
Mikael Magnusson


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: zsh manual - missing bookmarks in pdf file?
  2016-03-04  4:16               ` Mikael Magnusson
@ 2016-03-04 14:25                 ` Jun T.
  2016-03-04 15:08                   ` Peter Stephenson
  2016-03-04 18:45                   ` Greg Klanderman
  0 siblings, 2 replies; 13+ messages in thread
From: Jun T. @ 2016-03-04 14:25 UTC (permalink / raw)
  To: zsh-workers


On 2016/03/04, at 13:16, Mikael Magnusson <mikachu@gmail.com> wrote:
> 
> We could somehow use LC_PAPER to determine which to build, and allow
> overriding/building both with a configure option?


In the revised patch below, configure uses LC_PAPER to determine
PAPERSIZE, and it is used as the paper size for both zsh.pdf and
intro.pdf. A user can always use (without re-configure)
% cd Doc
% make zsh_a4.pdf  # or zsh_us.pdf, intro.a4.pdf, intro.us.pdf
to create a pdf with specific paper size. And
% make everything
will create both a4 and us pdf files (and two dvi files).

# If LC_PAPER is not available (OS X, for example), then
# paper size is set to a4.


There is another minor problem:
If pdfetex is not found, the original code sets PDFETEX to
': pdfetex', but this may not work because PDFETEX is used as
PDFTEX=$(PDFETEX) $(TEXI2DVI) --pdf $(sdir)/zsh.texi;

The patch includes a possible fix for this, but is it really
necessary to check for pdfetex? Since texi2dvi checks for
pdfetex by itself, probably PDFTEX=$(PDFETEX) is not necessary.
Or it may be there for a (very) old texi2dvi?


diff --git a/Config/defs.mk.in b/Config/defs.mk.in
index 3c84610..2bc1748 100644
--- a/Config/defs.mk.in
+++ b/Config/defs.mk.in
@@ -79,8 +79,6 @@ ANSI2KNR        = @ANSI2KNR@
 YODL            = @YODL@ @YODL_OPTIONS@
 YODL2TXT        = @YODL@2txt
 YODL2HTML       = @YODL@2html
-PDFETEX		= @PDFETEX@
-TEXI2PDF	= @TEXI2PDF@
 
 # install utility
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
diff --git a/Doc/Makefile.in b/Doc/Makefile.in
index d589991..08dfd5d 100644
--- a/Doc/Makefile.in
+++ b/Doc/Makefile.in
@@ -39,9 +39,11 @@ LN_S            = @LN_S@
 @DEFS_MK@
 
 MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+TEXI2DVI = @TEXI2DVI@
 DVIPS = dvips
+TEXI2PDF  = @TEXI2PDF@
 TEXI2HTML = @TEXI2HTML@
+PAPERSIZE = @PAPERSIZE@
 
 .SUFFIXES: .yo .1
 
@@ -86,33 +88,41 @@ Zsh/seealso.yo Zsh/tcpsys.yo Zsh/zftpsys.yo Zsh/zle.yo
 all: man $(runhelp) texi ../META-FAQ
 .PHONY: all
 
-everything: all dvi html pdf info
+everything: all html info zsh_a4.dvi zsh_us.dvi zsh_a4.pdf zsh_us.pdf \
+            intro.a4.pdf intro.us.pdf
 .PHONY: everything
 
 dvi: zsh.dvi
 .PHONY: dvi
 
-zsh.dvi: $(sdir)/zsh.texi
-	$(TEXI2DVI) $(sdir)/zsh.texi
+zsh.dvi zsh_a4.dvi zsh_us.dvi: $(sdir)/zsh.texi
+	if test $@ = zsh_us.dvi || \
+	  { test $@ = zsh.dvi && test "$(PAPERSIZE)" = us; }; then \
+	  $(TEXI2DVI) -o $@ $(sdir)/zsh.texi; \
+	else \
+	  $(TEXI2DVI) -o $@ -t @afourpaper $(sdir)/zsh.texi; \
+	fi
 
-pdf: zsh.pdf intro.a4.pdf intro.us.pdf
+pdf: zsh.pdf intro.pdf
 .PHONY: pdf
 
-zsh.pdf: $(sdir)/zsh.texi
-	if [ x$(TEXI2PDF) != x ]; then \
-	  $(TEXI2PDF) $(sdir)/zsh.texi; \
+zsh.pdf zsh_a4.pdf zsh_us.pdf: $(sdir)/zsh.texi
+	if test $@ = zsh_us.pdf || \
+	  { test $@ = zsh.pdf && test "$(PAPERSIZE)" = us; }; then \
+	  $(TEXI2PDF) -o $@ $(sdir)/zsh.texi; \
 	else \
-	  PDFTEX=$(PDFETEX) $(TEXI2DVI) --pdf $(sdir)/zsh.texi; \
+	  $(TEXI2PDF) -o $@ -t @afourpaper $(sdir)/zsh.texi; \
 	fi
 
 # Use roff2ps / ps2pdf because pdfroff produces doubled output.
-intro.a4.pdf: $(sdir)/intro.ms
-	roff2ps -ms -P-pa4 < $(sdir)/intro.ms > intro.a4.ps
-	ps2pdf intro.a4.ps
-
-intro.us.pdf: $(sdir)/intro.ms
-	roff2ps -ms -P-pletter < $(sdir)/intro.ms > intro.us.ps
-	ps2pdf intro.us.ps
+intro.pdf intro.a4.pdf intro.us.pdf: $(sdir)/intro.ms
+	if test $@ = intro.us.pdf || \
+	  { test $@ = intro.pdf && test "$(PAPERSIZE)" = us; }; then \
+	  roff2ps -ms -P-pletter < $(sdir)/intro.ms > intro.ps; \
+	else \
+	  roff2ps -ms -P-pa4 < $(sdir)/intro.ms > intro.ps; \
+	fi; \
+	ps2pdf -sOutputFile=$@ intro.ps
 
 texi: $(sdir)/zsh.texi
 .PHONY: texi
diff --git a/Doc/ztexi.yo b/Doc/ztexi.yo
index e878345..7d52e6e 100644
--- a/Doc/ztexi.yo
+++ b/Doc/ztexi.yo
@@ -53,7 +53,6 @@ def(texinfo)(2)(\
   NOTRANS(\input texinfo.tex)+NL()\
   NOTRANS(@c %**start of header)+NL()\
   NOTRANS(@iftex)+NL()\
-  NOTRANS(@afourpaper)+NL()\
   NOTRANS(@setchapternewpage off)+NL()\
   NOTRANS(@end iftex)+NL()\
   NOTRANS(@setfilename )ARG1+NL()\
diff --git a/configure.ac b/configure.ac
index c3bd713..c5be36b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -632,14 +632,33 @@ if test "x$ac_cv_prog_YODL" = xyodl; then
 fi
 AC_SUBST(YODL_OPTIONS)
 
-AC_CHECK_PROGS([PDFETEX], [pdfetex], [: pdfetex])
-AC_CHECK_PROGS([TEXI2PDF], [texi2pdf], [])
+AC_CHECK_PROGS([PDFETEX], [pdfetex], [])
+AC_CHECK_PROGS([TEXI2DVI], [texi2dvi], [: texi2dvi])
+AC_CHECK_PROGS([TEXI2PDF], [texi2pdf], [: texi2pdf])
 AC_CHECK_PROGS([TEXI2HTML], [texi2any texi2html], [: texi2html])
 
+if test x"$TEXI2PDF" != xtexi2pdf && test x"$TEXI2DVI" = xtexi2dvi; then
+  if test x"$PDFETEX" != x; then
+    TEXI2PDF="PDFTEX=$PDFETEX texi2dvi --pdf"
+  else
+    TEXI2PDF='texi2dvi --pdf'
+  fi
+fi
+
 if test x"$TEXI2HTML" = xtexi2any; then
   TEXI2HTML='texi2any -c TEXI2HTML=1'
 fi
 
+case "$LC_PAPER" in
+  ??_US*)
+    PAPERSIZE=us
+    ;;
+  *)
+    PAPERSIZE=a4
+    ;;
+esac
+AC_SUBST(PAPERSIZE)
+
 AC_CHECK_PROGS([ANSI2KNR], [ansi2knr], [: ansi2knr])
 
 if test x"$ansi2knr" = xyes && test x"$ANSI2KNR" = x": ansi2knr"; then



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: zsh manual - missing bookmarks in pdf file?
  2016-03-04 14:25                 ` Jun T.
@ 2016-03-04 15:08                   ` Peter Stephenson
  2016-03-07  3:15                     ` Jun T.
  2016-03-04 18:45                   ` Greg Klanderman
  1 sibling, 1 reply; 13+ messages in thread
From: Peter Stephenson @ 2016-03-04 15:08 UTC (permalink / raw)
  To: zsh-workers

On Fri, 4 Mar 2016 23:25:40 +0900
Jun T. <takimoto-j@kba.biglobe.ne.jp> wrote:
> The patch includes a possible fix for this, but is it really
> necessary to check for pdfetex? Since texi2dvi checks for
> pdfetex by itself, probably PDFTEX=$(PDFETEX) is not necessary.
> Or it may be there for a (very) old texi2dvi?

It probably was originally there for older versions of texi2dvi, but
that doesn't mean it's necessarily still needed.  We have prepackaged
documentation for systems that can't keep up with tools.

pws


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: zsh manual - missing bookmarks in pdf file?
  2016-03-04 14:25                 ` Jun T.
  2016-03-04 15:08                   ` Peter Stephenson
@ 2016-03-04 18:45                   ` Greg Klanderman
  2016-03-04 19:23                     ` Jun T.
  1 sibling, 1 reply; 13+ messages in thread
From: Greg Klanderman @ 2016-03-04 18:45 UTC (permalink / raw)
  To: zsh-workers

Hi Jun,

So would I have to set $LC_PAPER to have it build the US version by
default, or is 'locale' getting run somewhere to set $LC_PAPER from
my $LANG setting?

Greg


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: zsh manual - missing bookmarks in pdf file?
  2016-03-04 18:45                   ` Greg Klanderman
@ 2016-03-04 19:23                     ` Jun T.
  0 siblings, 0 replies; 13+ messages in thread
From: Jun T. @ 2016-03-04 19:23 UTC (permalink / raw)
  To: zsh-workers


2016/03/05 03:45, Greg Klanderman <gak@klanderman.net> wrote:

> So would I have to set $LC_PAPER to have it build the US version by
> default, or is 'locale' getting run somewhere to set $LC_PAPER from
> my $LANG setting?

That depends on your OS. Just type

% locale

to your shell prompt. If it doesn't show LC_PAPER, then you need
either

% LC_PAPER=en_US ./configure .... # or ./configure LC_PAPER=en_US ...
% make pdf

or

% ./configure
% cd Doc
% make zsh_us.pdf



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: zsh manual - missing bookmarks in pdf file?
  2016-03-04 15:08                   ` Peter Stephenson
@ 2016-03-07  3:15                     ` Jun T.
  0 siblings, 0 replies; 13+ messages in thread
From: Jun T. @ 2016-03-07  3:15 UTC (permalink / raw)
  To: zsh-workers


On 2016/03/05, at 0:08, Peter Stephenson <p.stephenson@samsung.com> wrote:

> On Fri, 4 Mar 2016 23:25:40 +0900
> Jun T. <takimoto-j@kba.biglobe.ne.jp> wrote:
>> is it really
>> necessary to check for pdfetex?
> 
> It probably was originally there for older versions of texi2dvi, but
> that doesn't mean it's necessarily still needed.

I've removed the check for pdfetex.

Also added a fix to use zsh_{a4,us}.dvi for creating zsh_{a4,us}.ps.
# Currently, zsh_us.ps has almost zero bottom margin.

diff --git a/Config/defs.mk.in b/Config/defs.mk.in
index 3c84610..2bc1748 100644
--- a/Config/defs.mk.in
+++ b/Config/defs.mk.in
@@ -79,8 +79,6 @@ ANSI2KNR        = @ANSI2KNR@
 YODL            = @YODL@ @YODL_OPTIONS@
 YODL2TXT        = @YODL@2txt
 YODL2HTML       = @YODL@2html
-PDFETEX		= @PDFETEX@
-TEXI2PDF	= @TEXI2PDF@
 
 # install utility
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
diff --git a/Doc/Makefile.in b/Doc/Makefile.in
index d589991..2752096 100644
--- a/Doc/Makefile.in
+++ b/Doc/Makefile.in
@@ -39,9 +39,11 @@ LN_S            = @LN_S@
 @DEFS_MK@
 
 MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+TEXI2DVI = @TEXI2DVI@
 DVIPS = dvips
+TEXI2PDF  = @TEXI2PDF@
 TEXI2HTML = @TEXI2HTML@
+PAPERSIZE = @PAPERSIZE@
 
 .SUFFIXES: .yo .1
 
@@ -86,33 +88,41 @@ Zsh/seealso.yo Zsh/tcpsys.yo Zsh/zftpsys.yo Zsh/zle.yo
 all: man $(runhelp) texi ../META-FAQ
 .PHONY: all
 
-everything: all dvi html pdf info
+everything: all html info zsh_a4.dvi zsh_us.dvi zsh_a4.pdf zsh_us.pdf \
+            intro.a4.pdf intro.us.pdf
 .PHONY: everything
 
 dvi: zsh.dvi
 .PHONY: dvi
 
-zsh.dvi: $(sdir)/zsh.texi
-	$(TEXI2DVI) $(sdir)/zsh.texi
+zsh.dvi zsh_a4.dvi zsh_us.dvi: $(sdir)/zsh.texi
+	if test $@ = zsh_us.dvi || \
+	  { test $@ = zsh.dvi && test "$(PAPERSIZE)" = us; }; then \
+	  $(TEXI2DVI) -o $@ $(sdir)/zsh.texi; \
+	else \
+	  $(TEXI2DVI) -o $@ -t @afourpaper $(sdir)/zsh.texi; \
+	fi
 
-pdf: zsh.pdf intro.a4.pdf intro.us.pdf
+pdf: zsh.pdf intro.pdf
 .PHONY: pdf
 
-zsh.pdf: $(sdir)/zsh.texi
-	if [ x$(TEXI2PDF) != x ]; then \
-	  $(TEXI2PDF) $(sdir)/zsh.texi; \
+zsh.pdf zsh_a4.pdf zsh_us.pdf: $(sdir)/zsh.texi
+	if test $@ = zsh_us.pdf || \
+	  { test $@ = zsh.pdf && test "$(PAPERSIZE)" = us; }; then \
+	  $(TEXI2PDF) -o $@ $(sdir)/zsh.texi; \
 	else \
-	  PDFTEX=$(PDFETEX) $(TEXI2DVI) --pdf $(sdir)/zsh.texi; \
+	  $(TEXI2PDF) -o $@ -t @afourpaper $(sdir)/zsh.texi; \
 	fi
 
 # Use roff2ps / ps2pdf because pdfroff produces doubled output.
-intro.a4.pdf: $(sdir)/intro.ms
-	roff2ps -ms -P-pa4 < $(sdir)/intro.ms > intro.a4.ps
-	ps2pdf intro.a4.ps
-
-intro.us.pdf: $(sdir)/intro.ms
-	roff2ps -ms -P-pletter < $(sdir)/intro.ms > intro.us.ps
-	ps2pdf intro.us.ps
+intro.pdf intro.a4.pdf intro.us.pdf: $(sdir)/intro.ms
+	if test $@ = intro.us.pdf || \
+	  { test $@ = intro.pdf && test "$(PAPERSIZE)" = us; }; then \
+	  roff2ps -ms -P-pletter < $(sdir)/intro.ms > intro.ps; \
+	else \
+	  roff2ps -ms -P-pa4 < $(sdir)/intro.ms > intro.ps; \
+	fi; \
+	ps2pdf -sOutputFile=$@ intro.ps
 
 texi: $(sdir)/zsh.texi
 .PHONY: texi
@@ -149,14 +159,14 @@ ps: us_ps a4_ps
 us_ps: zsh_us.ps
 .PHONY: us_ps
 
-zsh_us.ps: zsh.dvi
-	$(DVIPS) -t letter -o $@ zsh.dvi
+zsh_us.ps: zsh_us.dvi
+	$(DVIPS) -t letter -o $@ zsh_us.dvi
 
 a4_ps: zsh_a4.ps
 .PHONY: a4_ps
 
-zsh_a4.ps: zsh.dvi
-	$(DVIPS) -t a4 -o $@ zsh.dvi
+zsh_a4.ps: zsh_a4.dvi
+	$(DVIPS) -t a4 -o $@ zsh_a4.dvi
 
 html: zsh_toc.html
 .PHONY: html
diff --git a/Doc/ztexi.yo b/Doc/ztexi.yo
index e878345..7d52e6e 100644
--- a/Doc/ztexi.yo
+++ b/Doc/ztexi.yo
@@ -53,7 +53,6 @@ def(texinfo)(2)(\
   NOTRANS(\input texinfo.tex)+NL()\
   NOTRANS(@c %**start of header)+NL()\
   NOTRANS(@iftex)+NL()\
-  NOTRANS(@afourpaper)+NL()\
   NOTRANS(@setchapternewpage off)+NL()\
   NOTRANS(@end iftex)+NL()\
   NOTRANS(@setfilename )ARG1+NL()\
diff --git a/configure.ac b/configure.ac
index 9947b16..9ce3a45 100644
--- a/configure.ac
+++ b/configure.ac
@@ -632,14 +632,24 @@ if test "x$ac_cv_prog_YODL" = xyodl; then
 fi
 AC_SUBST(YODL_OPTIONS)
 
-AC_CHECK_PROGS([PDFETEX], [pdfetex], [: pdfetex])
-AC_CHECK_PROGS([TEXI2PDF], [texi2pdf], [])
+AC_CHECK_PROGS([TEXI2DVI], [texi2dvi], [: texi2dvi])
+AC_CHECK_PROGS([TEXI2PDF], [texi2pdf], [: texi2pdf])
 AC_CHECK_PROGS([TEXI2HTML], [texi2any texi2html], [: texi2html])
 
+if test x"$TEXI2PDF" != xtexi2pdf && test x"$TEXI2DVI" = xtexi2dvi; then
+  TEXI2PDF='texi2dvi --pdf'
+fi
+
 if test x"$TEXI2HTML" = xtexi2any; then
   TEXI2HTML='texi2any -c TEXI2HTML=1'
 fi
 
+case "$LC_PAPER" in
+  ??_US*) PAPERSIZE=us ;;
+  *)      PAPERSIZE=a4 ;;
+esac
+AC_SUBST(PAPERSIZE)
+
 AC_CHECK_PROGS([ANSI2KNR], [ansi2knr], [: ansi2knr])
 
 if test x"$ansi2knr" = xyes && test x"$ANSI2KNR" = x": ansi2knr"; then



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-03-07  3:15 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-01 14:26 zsh manual - missing bookmarks in pdf file? Greg Klanderman
     [not found] ` <DE24867B-712C-46A4-85B4-BDD290E91154@kba.biglobe.ne.jp>
2016-03-02  3:52   ` Greg Klanderman
2016-03-02  5:20     ` Jun T.
2016-03-02 15:40       ` Greg Klanderman
2016-03-03  5:03         ` Jun T.
2016-03-03 14:39           ` Greg Klanderman
2016-03-04  3:33             ` Jun T.
2016-03-04  4:16               ` Mikael Magnusson
2016-03-04 14:25                 ` Jun T.
2016-03-04 15:08                   ` Peter Stephenson
2016-03-07  3:15                     ` Jun T.
2016-03-04 18:45                   ` Greg Klanderman
2016-03-04 19:23                     ` Jun T.

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).