Pandoc indented lists with two spaces after the dash, which is ugly
and messes up emacs fill-paragraph. I transformed the spacing using a
combination of this perl script and manual edits. I verified that the
HTML generated by sphinx was identical before and after the edits and
that this commit contains only whitespace changes. The perl script as
it stands does not do indentation quite right for variable lists, but
there were only about 8 cases that it missed, so I just fixed them
manually.
```perl
#!/usr/bin/env perl
require 5.008;
use warnings;
use strict;
use File::Basename;
my $whoami = basename($0);
my @liststack = ();
while (<>)
{
if (m/^( *- )\S/)
{
my $pre = $1;
while ((scalar(@liststack) > 0) &&
($liststack[-1] >= length($pre)))
{
pop(@liststack);
}
if ((scalar(@liststack) == 0) && ($pre =~ m/^ /))
{
push(@liststack, 1);
}
push(@liststack, length($pre));
my $n = scalar(@liststack);
#print "** $n\n";
my $newpre = (' ' x ($n - 1)) . '- ';
s/^$pre/$newpre/;
}
elsif (scalar(@liststack) > 0)
{
if ($_ ne "\n")
{
while (scalar(@liststack) > 0)
{
my $pre = m/^( *)/;
if (length($1) < $liststack[-1])
{
#print "XXX pop\n";
pop(@liststack);
}
else
{
last;
}
}
my $n = scalar(@liststack);
#print "** $n\n";
my $indent = ' ' x $n;
s/^ +/$indent/;
}
}
print;
}
```
Also remove linearization from qpdf-manual.pdf. It's a small file, and
removing the dependency on the qpdf executable significantly shortens
build times.
We were using SGML entities for various non-ASCII characters so they
could convert properly for both HTML and print, but this is no longer
necessary as we move from docbook to RST, so just replace them. Note
that the conversions done by sphinx automatically handle "smart
quotes", so it works to just use regular quotes in place of &LDQUO;
and &RDQUO;.
Pandoc docbook -> rst fails to convert the following elements, so
change them to @1@tag@1@ ... @2@tag@2@ for later processing. This way,
they will survive the conversion, and we can deal with them later.
<application>
<command>
<filename>
<firstterm>
<option>
<replaceable>
With docbook, this was not converted properly in the PDF version, but
since we are moving out of docbook, we can just put the Unicode
character in the source.
* Handle error conditions that occur when using the object handle
interfaces. In the past, some exceptions were not correctly
converted to errors or warnings.
* Add more detailed information to qpdf-c.h
* Make it possible to work more explicitly with uninitialized objects
The impact on the code would be extremely high, and using it would
clutter the code greatly because it would break chaining like
a.getKey("/B").getKey("/C"). There are better ways to deal with the
issue.
Don't assume endobj is at the beginning of the line. This means we are
looking at tokens for every line, but the odds of n n obj appearing in
the middle of the object are likely much lower than endobj not being
at the beginning of the line or missing entirely. This will probably
have a negative impact on recovery time for very large files.
Hopefully it will be worth it.