2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-09-27 12:39:06 +00:00
Commit Graph

7 Commits

Author SHA1 Message Date
Jay Berkenbilt
b764ba95ed Replace things previously marked with <filename> with :file:... 2021-12-13 11:20:14 -05:00
Jay Berkenbilt
15b87d769e Replace command|application with :command:...
Replace @1@...@2@ stuff from prior to the conversion with new
representation.
2021-12-13 11:20:14 -05:00
Jay Berkenbilt
cf3b9a7783 doc: fix whitespace and indentation in pandoc output
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;
}
```
2021-12-13 11:20:14 -05:00
Jay Berkenbilt
3d5d42efaf Fix errors introduced by pandoc
These showed up as warnings from sphinx-build
2021-12-13 11:20:14 -05:00
Jay Berkenbilt
abb6a16ed1 Insert output of pandoc as is
pandoc -f docbook -t rst qpdf-manual.xml >| /tmp/a.rst
Insert /tmp/a.rst into existing index.rst
2021-12-12 16:29:13 -05:00
Jay Berkenbilt
22d53f928f Sphinx docs: tweak output of sphinx-quickstart 2021-12-12 16:29:13 -05:00
Jay Berkenbilt
f8787d9fd8 Create initial sphinx document sources
Run sphinx-quickstart. Throw everything away except conf.py and
index.rst. We will incorporate this into our own build system.
2021-12-12 16:29:13 -05:00