[Dwarf-Discuss] [patch] (re)enable pdflatex, fix changebar patch, other tweaks

Joseph Koshy jkoshy@users.sourceforge.net
Wed Jan 1 20:23:50 GMT 2020


Dear Dwarf-Discuss,

The attached patches correct a few issues I
noticed when building the standard from
source.

The patches do not change the text of the
standard itself.

Patch #1: (minor) Removes a redundant \usepackage
command.

Patch #2: Reenables the use of 'pdflatex'.

The pdflatex version distributed in Ubuntu
18.04's 'texlive-latex-base' package seems to
build the standard without issues.

  % pdflatex --version
  pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian)
  kpathsea version 6.2.3
  Copyright 2017 Han The Thanh (pdfTeX) et al.
  There is NO warranty.  Redistribution of this software is
  covered by the terms of both the pdfTeX copyright and
  the Lesser GNU General Public License.
  For more information about these matters, see the file
  named COPYING and the pdfTeX source.
  Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
  Compiled with libpng 1.6.34; using libpng 1.6.34
  Compiled with zlib 1.2.11; using zlib 1.2.11
  Compiled with poppler version 0.62.0

The figures present in the file
'debugsectionrelationships.tex' were rendered
correctly in the output. Would there be anything else
to check?

Patch #3: Removes the 'dwarfchangebarpatch.tex' patch.

This patch seems to interfere with the correct
operation of recent revisions of the 'changebar'
package.

Checked with changebar version
"2018/02/04 v3.6b", which is part of the
'texlive-latex-extra' package in Ubuntu 18.04.

-- 
Joseph Koshy | Volunteer Developer, The Elftoolchain Project
-------------- next part --------------
(Re)enable the use of pdflatex.

---
 dwarf5/latexdoc/Makefile | 22 +++++++++++++++-------
 dwarf5/latexdoc/README   | 12 ++++++++----
 2 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/dwarf5/latexdoc/Makefile b/dwarf5/latexdoc/Makefile
index e34f685..21ba129 100644
--- a/dwarf5/latexdoc/Makefile
+++ b/dwarf5/latexdoc/Makefile
@@ -1,13 +1,20 @@
-
-# Just using pdflatex will not work, the diagrams
-# in the section-relationships appendix will not
-# show up.
-# Do latex multiple times to generate all the references
+# Run (pdf)latex multiple times to generate all the references
 # completely.  Apparently the worst case (TOC using
 # regular page numbers beginning at 1) 
 # up to 4 times might be needed.
-# You need to do makeindex before the final latex!
-all:
+# You need to do makeindex before the final latex run!
+
+all: pdflatex
+
+pdflatex:
+	pdflatex -halt-on-error dwarf5.tex
+	pdflatex -halt-on-error dwarf5.tex
+	makeindex dwarf5
+	pdflatex -halt-on-error dwarf5.tex
+	pdflatex -halt-on-error dwarf5.tex
+
+# Build using latex, dvips and ps2pdf.
+latex:
 	latex -halt-on-error dwarf5.tex
 	latex -halt-on-error dwarf5.tex
 	makeindex dwarf5
@@ -15,6 +22,7 @@ all:
 	latex -halt-on-error dwarf5.tex
 	dvips dwarf5.dvi -o dwarf5.ps
 	ps2pdf dwarf5.ps dwarf5.pdf
+
 clean:
 	-rm -f *.dvi
 	-rm -f *.aux
diff --git a/dwarf5/latexdoc/README b/dwarf5/latexdoc/README
index c2d8020..6a88d04 100644
--- a/dwarf5/latexdoc/README
+++ b/dwarf5/latexdoc/README
@@ -18,8 +18,14 @@ any messages about 'undefined'.
 
 On Linux:
 On modern linux, here is the set of steps to build a pdf.
-While pdflatex might seem simpler to use (than the following)
-it will not correctly generate a pdf as complex as this one.
+
+        pdflatex dwarf5.tex
+        pdflatex dwarf5.tex
+        makeindex dwarf5
+        pdflatex dwarf5.tex
+        pdflatex dwarf5.tex
+
+If pdflatex does not work, plain latex may be used.
 
         latex dwarf5.tex
         latex dwarf5.tex
@@ -29,8 +35,6 @@ it will not correctly generate a pdf as complex as this one.
         dvips dwarf5.dvi -o dwarf5.ps
         ps2pdf dwarf5.ps dwarf5.pdf
 
-
-
 On Windows:
 This Editor has used TeXworks on Windows successfully.
 The About TeXworks tab describes it as "a simple
-------------- next part --------------
Remove the 'dwarfchangebarpatch.tex' patch.

Recent versions of the changebar package will
not work correctly in the presence of this patch.

Checked with: changebar version 2018/02/04 v3.6b.
---
 dwarf5/latexdoc/dwarf5.tex              |  1 -
 dwarf5/latexdoc/dwarfchangebarpatch.tex | 29 -------------------------
 2 files changed, 30 deletions(-)
 delete mode 100644 dwarf5/latexdoc/dwarfchangebarpatch.tex

diff --git a/dwarf5/latexdoc/dwarf5.tex b/dwarf5/latexdoc/dwarf5.tex
index 4c0c085..4ffe328 100644
--- a/dwarf5/latexdoc/dwarf5.tex
+++ b/dwarf5/latexdoc/dwarf5.tex
@@ -62,7 +62,6 @@ escapeinside={\%*}{*)}     % if you want to add a comment within your code
 \usepackage[headheight=16pt,paper=letterpaper]{geometry}
     \setlength{\headheight}{15pt}  % avoids warning from latex
 \usepackage{needspace}     % For assuring space remaining on a page
-\include{dwarfchangebarpatch} % Patch needed for package changebar
 \usepackage{changepage}    % For odd/even page checks
 \usepackage[usenames,dvipsnames]{xcolor}
 \usepackage{lscape}        % For landscape mode (Appendix B)
diff --git a/dwarf5/latexdoc/dwarfchangebarpatch.tex b/dwarf5/latexdoc/dwarfchangebarpatch.tex
deleted file mode 100644
index 2af16f8..0000000
--- a/dwarf5/latexdoc/dwarfchangebarpatch.tex
+++ /dev/null
@@ -1,29 +0,0 @@
-%%%
-% PROBLEM: The changebar package creates a page or two full of ?spsp? 
-% groups at the end of the document.
-%
-% SOLUTION: The following must be invoked in the preamble prior to the
-% \usepackage command for changebar.
-%
-% For further information, see http://tex.stackexchange.com/questions/162332,
-% also known as http://tex.stackexchange.com/questions/162332/why-does-the-changebar-package-create-a-page-full-of-spsp-and-how-can-this-be
-% (or do a web search for "latex spsp").
-%%%
-\makeatletter
-\AtEndDocument{%
-\def\cb at checkPdfxy#1#2#3#4#5{%
-\cb@@findpdfpoint{#1}{#2}%
-\ifdim#3sp=\cb at pdfx\relax      % <<-- original has \ifnum#3=\cb at pdfx
-\ifdim#4sp=\cb at pdfy\relax      % <<-- original has \ifnum#4=\cb at pdfy
-\ifdim#5=\cb at pdfz\relax
-\else
-\cb at error
-\fi
-\else
-\cb at error
-\fi
-\else
-\cb at error
-\fi
-}}
-\makeatother
-------------- next part --------------
Remove a redundant \usepackage, correct a typo in a comment.

---
 dwarf5/latexdoc/dwarf5.tex | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dwarf5/latexdoc/dwarf5.tex b/dwarf5/latexdoc/dwarf5.tex
index 59cf955..4c0c085 100644
--- a/dwarf5/latexdoc/dwarf5.tex
+++ b/dwarf5/latexdoc/dwarf5.tex
@@ -5,7 +5,7 @@
 %
 \newcommand{\docdate}{February 13, 2017}
 %
-\usepackage{ifthen}
+\usepackage{ifthen}        % For conditional processing
     \newcommand{\ifthen}[2]{\ifthenelse{#1}{#2}{}}
     \newboolean{isdraft}\setboolean{isdraft}{false}
     \newboolean{uselinenumbers}\setboolean{uselinenumbers}{true}
@@ -49,7 +49,7 @@ escapeinside={\%*}{*)}     % if you want to add a comment within your code
 \usepackage{amssymb}       % maths
 \usepackage{graphicx}      % For pictures
 \usepackage{epstopdf}      % Autoconvert .eps to .pdf
-    \epstopdfsetup{suffix=-generated} % Mark generaed PDF as such
+    \epstopdfsetup{suffix=-generated} % Mark generated PDF as such
 \usepackage[pagewise]{lineno} % line numbers
     \pagewiselinenumbers
     \setlength\linenumbersep{3em}
@@ -62,7 +62,6 @@ escapeinside={\%*}{*)}     % if you want to add a comment within your code
 \usepackage[headheight=16pt,paper=letterpaper]{geometry}
     \setlength{\headheight}{15pt}  % avoids warning from latex
 \usepackage{needspace}     % For assuring space remaining on a page
-\usepackage{ifthen}        % For conditional processing
 \include{dwarfchangebarpatch} % Patch needed for package changebar
 \usepackage{changepage}    % For odd/even page checks
 \usepackage[usenames,dvipsnames]{xcolor}



More information about the Dwarf-discuss mailing list