Initial commit
675
LICENSE.md
Normal file
|
@ -0,0 +1,675 @@
|
|||
### GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
<https://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
### Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom
|
||||
to share and change all versions of a program--to make sure it remains
|
||||
free software for all its users. We, the Free Software Foundation, use
|
||||
the GNU General Public License for most of our software; it applies
|
||||
also to any other work released this way by its authors. You can apply
|
||||
it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you
|
||||
have certain responsibilities if you distribute copies of the
|
||||
software, or if you modify it: responsibilities to respect the freedom
|
||||
of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the
|
||||
manufacturer can do so. This is fundamentally incompatible with the
|
||||
aim of protecting users' freedom to change the software. The
|
||||
systematic pattern of such abuse occurs in the area of products for
|
||||
individuals to use, which is precisely where it is most unacceptable.
|
||||
Therefore, we have designed this version of the GPL to prohibit the
|
||||
practice for those products. If such problems arise substantially in
|
||||
other domains, we stand ready to extend this provision to those
|
||||
domains in future versions of the GPL, as needed to protect the
|
||||
freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish
|
||||
to avoid the special danger that patents applied to a free program
|
||||
could make it effectively proprietary. To prevent this, the GPL
|
||||
assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
### TERMS AND CONDITIONS
|
||||
|
||||
#### 0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds
|
||||
of works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of
|
||||
an exact copy. The resulting work is called a "modified version" of
|
||||
the earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user
|
||||
through a computer network, with no transfer of a copy, is not
|
||||
conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices" to
|
||||
the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
#### 1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work for
|
||||
making modifications to it. "Object code" means any non-source form of
|
||||
a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can
|
||||
regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same
|
||||
work.
|
||||
|
||||
#### 2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey,
|
||||
without conditions so long as your license otherwise remains in force.
|
||||
You may convey covered works to others for the sole purpose of having
|
||||
them make modifications exclusively for you, or provide you with
|
||||
facilities for running those works, provided that you comply with the
|
||||
terms of this License in conveying all material for which you do not
|
||||
control copyright. Those thus making or running the covered works for
|
||||
you must do so exclusively on your behalf, under your direction and
|
||||
control, on terms that prohibit them from making any copies of your
|
||||
copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the
|
||||
conditions stated below. Sublicensing is not allowed; section 10 makes
|
||||
it unnecessary.
|
||||
|
||||
#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such
|
||||
circumvention is effected by exercising rights under this License with
|
||||
respect to the covered work, and you disclaim any intention to limit
|
||||
operation or modification of the work as a means of enforcing, against
|
||||
the work's users, your or third parties' legal rights to forbid
|
||||
circumvention of technological measures.
|
||||
|
||||
#### 4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
#### 5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these
|
||||
conditions:
|
||||
|
||||
- a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
- b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under
|
||||
section 7. This requirement modifies the requirement in section 4
|
||||
to "keep intact all notices".
|
||||
- c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
- d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
#### 6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms of
|
||||
sections 4 and 5, provided that you also convey the machine-readable
|
||||
Corresponding Source under the terms of this License, in one of these
|
||||
ways:
|
||||
|
||||
- a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
- b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the Corresponding
|
||||
Source from a network server at no charge.
|
||||
- c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
- d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
- e) Convey the object code using peer-to-peer transmission,
|
||||
provided you inform other peers where the object code and
|
||||
Corresponding Source of the work are being offered to the general
|
||||
public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal,
|
||||
family, or household purposes, or (2) anything designed or sold for
|
||||
incorporation into a dwelling. In determining whether a product is a
|
||||
consumer product, doubtful cases shall be resolved in favor of
|
||||
coverage. For a particular product received by a particular user,
|
||||
"normally used" refers to a typical or common use of that class of
|
||||
product, regardless of the status of the particular user or of the way
|
||||
in which the particular user actually uses, or expects or is expected
|
||||
to use, the product. A product is a consumer product regardless of
|
||||
whether the product has substantial commercial, industrial or
|
||||
non-consumer uses, unless such uses represent the only significant
|
||||
mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to
|
||||
install and execute modified versions of a covered work in that User
|
||||
Product from a modified version of its Corresponding Source. The
|
||||
information must suffice to ensure that the continued functioning of
|
||||
the modified object code is in no case prevented or interfered with
|
||||
solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or
|
||||
updates for a work that has been modified or installed by the
|
||||
recipient, or for the User Product in which it has been modified or
|
||||
installed. Access to a network may be denied when the modification
|
||||
itself materially and adversely affects the operation of the network
|
||||
or violates the rules and protocols for communication across the
|
||||
network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
#### 7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders
|
||||
of that material) supplement the terms of this License with terms:
|
||||
|
||||
- a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
- b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
- c) Prohibiting misrepresentation of the origin of that material,
|
||||
or requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
- d) Limiting the use for publicity purposes of names of licensors
|
||||
or authors of the material; or
|
||||
- e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
- f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions
|
||||
of it) with contractual assumptions of liability to the recipient,
|
||||
for any liability that these contractual assumptions directly
|
||||
impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions; the
|
||||
above requirements apply either way.
|
||||
|
||||
#### 8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
#### 9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or run
|
||||
a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
#### 10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
#### 11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims owned
|
||||
or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within the
|
||||
scope of its coverage, prohibits the exercise of, or is conditioned on
|
||||
the non-exercise of one or more of the rights that are specifically
|
||||
granted under this License. You may not convey a covered work if you
|
||||
are a party to an arrangement with a third party that is in the
|
||||
business of distributing software, under which you make payment to the
|
||||
third party based on the extent of your activity of conveying the
|
||||
work, and under which the third party grants, to any of the parties
|
||||
who would receive the covered work from you, a discriminatory patent
|
||||
license (a) in connection with copies of the covered work conveyed by
|
||||
you (or copies made from those copies), or (b) primarily for and in
|
||||
connection with specific products or compilations that contain the
|
||||
covered work, unless you entered into that arrangement, or that patent
|
||||
license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
#### 12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under
|
||||
this License and any other pertinent obligations, then as a
|
||||
consequence you may not convey it at all. For example, if you agree to
|
||||
terms that obligate you to collect a royalty for further conveying
|
||||
from those to whom you convey the Program, the only way you could
|
||||
satisfy both those terms and this License would be to refrain entirely
|
||||
from conveying the Program.
|
||||
|
||||
#### 13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
#### 14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in
|
||||
detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies that a certain numbered version of the GNU General Public
|
||||
License "or any later version" applies to it, you have the option of
|
||||
following the terms and conditions either of that numbered version or
|
||||
of any later version published by the Free Software Foundation. If the
|
||||
Program does not specify a version number of the GNU General Public
|
||||
License, you may choose any version ever published by the Free
|
||||
Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions
|
||||
of the GNU General Public License can be used, that proxy's public
|
||||
statement of acceptance of a version permanently authorizes you to
|
||||
choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
#### 15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
|
||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||
CORRECTION.
|
||||
|
||||
#### 16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
|
||||
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
||||
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
|
||||
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
|
||||
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
||||
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
#### 17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
### How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these
|
||||
terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to
|
||||
attach them to the start of each source file to most effectively state
|
||||
the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper
|
||||
mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands \`show w' and \`show c' should show the
|
||||
appropriate parts of the General Public License. Of course, your
|
||||
program's commands might be different; for a GUI interface, you would
|
||||
use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. For more information on this, and how to apply and follow
|
||||
the GNU GPL, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your
|
||||
program into proprietary programs. If your program is a subroutine
|
||||
library, you may consider it more useful to permit linking proprietary
|
||||
applications with the library. If this is what you want to do, use the
|
||||
GNU Lesser General Public License instead of this License. But first,
|
||||
please read <https://www.gnu.org/licenses/why-not-lgpl.html>.
|
98
README.md
Normal file
|
@ -0,0 +1,98 @@
|
|||
# Installation
|
||||
|
||||
This repository only contains PHP source files, it doesn't contain configuration for running them on a web server.
|
||||
|
||||
PHP 7+ is required.
|
||||
|
||||
If you'd like to set up a development environment on your local machine, then you'll have to configure your own local web server to serve PHP files.
|
||||
|
||||
You'll also need to ensure the following:
|
||||
|
||||
- The path `/standardebooks.org/` exists and is the root of this project. (Configurable in `./lib/Constants.php`.)
|
||||
|
||||
- Your PHP installation must be configured to have `/standardebooks.org//lib/` in its include path.
|
||||
|
||||
- The URL `^/ebooks/([^\.]+?)/?$` must redirect to `/standardebooks.org/ebooks/ebook.php?url-path=$1`
|
||||
|
||||
- The URL `^/ebooks/([^\./]+?)/$` must redirect to `/standardebooks.org/ebooks/author.php?url-path=$1`
|
||||
|
||||
# Filesystem layout
|
||||
|
||||
- `/standardebooks.org/ebooks/` contains one directory per SE ebook, arranged in a flat hierarchy. These directories look like the URL-safe identifier for the ebook, end in `.git`, and are bare Git repos; they are the "source of truth" for SE ebooks.
|
||||
|
||||
For example:
|
||||
|
||||
````
|
||||
/standardebooks.org/ebooks/algis-budrys_short-fiction.git/
|
||||
/standardebooks.org/ebooks/omar-khayyam_the-rubaiyat-of-omar-khayyam_edward-fitzgerald_edmund-dulac.git/
|
||||
````
|
||||
|
||||
- `/standardebooks.org/www/ebooks/` contains a nested hierarchy of deployed ebook files, that are read by the website for display and download. For example, we might have:
|
||||
|
||||
````
|
||||
/standardebooks.org/www/ebooks/maurice-leblanc/
|
||||
/standardebooks.org/www/ebooks/maurice-leblanc/the-hollow-needle/
|
||||
/standardebooks.org/www/ebooks/maurice-leblanc/the-hollow-needle/alexander-teixeira-de-mattos/
|
||||
/standardebooks.org/www/ebooks/maurice-leblanc/813/
|
||||
/standardebooks.org/www/ebooks/maurice-leblanc/813/alexander-teixeira-de-mattos/
|
||||
````
|
||||
|
||||
These directories contain the full ebook source, as if it was pulled from Git. (But they are not actual Git repositories.) Additionally each one contains a `./dist/` folder containing built ebook files for distribution.
|
||||
|
||||
The website pulls all ebook information from what is contained in `/standardebooks.org/www/ebooks/`. It does not inspect `/standardebooks.org/ebooks/`. Therefore it is possible for one or the other to hold different catalogs if they become out of sync.
|
||||
|
||||
# Contributing
|
||||
|
||||
Before submitting design contributions, please discuss them with the Standard Ebooks lead. While we encourage discussion and contributions, we can't guarantee that unsoliticed design contributions will be accepted. You can open an issue to discuss potential design contributions with us before you begin.
|
||||
|
||||
## Code style
|
||||
|
||||
- Indent with tabs.
|
||||
|
||||
- Use single quotes (`'`) for strings, unless the string must contain a printable escape character (`"Foo\n"`).
|
||||
|
||||
- Variable names are in camelCase.
|
||||
|
||||
````php
|
||||
$fooBar = 'baz';
|
||||
````
|
||||
|
||||
- Object members are in PascalCase.
|
||||
|
||||
````php
|
||||
$myObject->FooBar = 'baz';
|
||||
````
|
||||
|
||||
- Output to HTML is done using `<?= $var ?>`, not `print($var)` or any other printing function.
|
||||
|
||||
- Check for `null` using `===` and `!==`.
|
||||
|
||||
- Where possible, include type hints for functions.
|
||||
|
||||
- If using regex to parse HTML, use `|` as the regex delimiter instead of `/`.
|
||||
|
||||
````php
|
||||
preg_replace('|</foo>|ius', '</bar>', $text);
|
||||
````
|
||||
|
||||
- Language constructs that can optionally have curly braces (like `if`) should always have curly braces.
|
||||
|
||||
Good:
|
||||
|
||||
````php
|
||||
if(true){
|
||||
print('Foo!');
|
||||
}
|
||||
else{
|
||||
print('Bar!');
|
||||
}
|
||||
````
|
||||
|
||||
Bad:
|
||||
|
||||
````php
|
||||
if(true)
|
||||
print('Foo!');
|
||||
else
|
||||
print('Bar!');
|
||||
````
|
33
lib/Constants.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?
|
||||
const EBOOKS_PER_PAGE = 12;
|
||||
const SORT_NEWEST = 'newest';
|
||||
const SORT_AUTHOR_ALPHA = 'author-alpha';
|
||||
|
||||
const GET = 0;
|
||||
const POST = 1;
|
||||
const COOKIE = 2;
|
||||
|
||||
const HTTP_VAR_INT = 0;
|
||||
const HTTP_VAR_STR = 1;
|
||||
const HTTP_VAR_BOOL = 2;
|
||||
const HTTP_VAR_DEC = 3;
|
||||
|
||||
const SOURCE_PROJECT_GUTENBERG = 0;
|
||||
const SOURCE_HATHI_TRUST = 1;
|
||||
const SOURCE_WIKISOURCE = 2;
|
||||
const SOURCE_INTERNET_ARCHIVE = 3;
|
||||
const SOURCE_GOOGLE_BOOKS = 4;
|
||||
const SOURCE_OTHER = 5;
|
||||
|
||||
const AVERAGE_READING_WORDS_PER_MINUTE = 275;
|
||||
|
||||
// No trailing slash on any of the below constants.
|
||||
const SITE_URL = 'https://standardebooks.org';
|
||||
const SITE_ROOT = '/standardebooks.org';
|
||||
const TEMPLATES_PATH = SITE_ROOT . '/templates';
|
||||
const REPOS_PATH = SITE_ROOT . '/ebooks';
|
||||
|
||||
const GITHUB_SECRET_FILE_PATH = SITE_ROOT . '/config/secrets/se-vcs-bot@github.com'; // Set in the GitHub organization global webhook settings.
|
||||
const GITHUB_WEBHOOK_LOG_FILE_PATH = '/var/log/local/webhooks-github.log'; // Must be writable by `www-data` Unix user.
|
||||
const GITHUB_IGNORED_REPOS = ['tools', 'manual', 'web']; // If we get GitHub push requests featuring these repos, silently ignore instead of returning an error.
|
||||
?>
|
19
lib/Contributor.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?
|
||||
class Contributor{
|
||||
public $Name;
|
||||
public $UrlName;
|
||||
public $SortName;
|
||||
public $WikipediaUrl;
|
||||
public $MarcRole;
|
||||
public $FullName;
|
||||
|
||||
public function __construct(string $name, string $sortName = null, string $fullName = null, string $wikipediaUrl = null, string $marcRole = null){
|
||||
$this->Name = str_replace('\'', '’', $name);
|
||||
$this->UrlName = Formatter::MakeUrlSafe($name);
|
||||
$this->SortName = $sortName;
|
||||
$this->FullName = $fullName;
|
||||
$this->WikipediaUrl = $wikipediaUrl;
|
||||
$this->MarcRole = $marcRole;
|
||||
}
|
||||
}
|
||||
?>
|
50
lib/Core.php
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?
|
||||
mb_internal_encoding('UTF-8');
|
||||
mb_http_output('UTF-8');
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
require_once('Constants.php');
|
||||
|
||||
// Convenience alias of var_dump.
|
||||
function vd($var){
|
||||
var_dump($var);
|
||||
}
|
||||
|
||||
// var_dump($var) then die().
|
||||
function vdd($var){
|
||||
var_dump($var);
|
||||
die();
|
||||
}
|
||||
|
||||
// var_dump into a string.
|
||||
function vds($var){
|
||||
ob_start();
|
||||
var_dump($var);
|
||||
$str = ob_get_contents();
|
||||
ob_end_clean();
|
||||
return $str;
|
||||
}
|
||||
|
||||
spl_autoload_register(function($class){
|
||||
try{
|
||||
include_once($class . '.php');
|
||||
}
|
||||
catch(\Exception $ex){
|
||||
}
|
||||
});
|
||||
|
||||
// Custom error handler to output more details about the specific Apache request that caused an exception.
|
||||
set_exception_handler(function($ex){
|
||||
$errorString = "----------------------------------------\n";
|
||||
$errorString .= trim(vds(array_intersect_key($_SERVER, array('REQUEST_URI' => '', 'QUERY_STRING' => '', 'REQUEST_METHOD' => '', 'REDIRECT_QUERY_STRING' => '', 'REDIRECT_URL' => '', 'SCRIPT_FILENAME' => '', 'REMOTE_ADDR' => '', 'HTTP_COOKIE' => '', 'HTTP_USER_AGENT' => '', 'SCRIPT_URI' => ''))));
|
||||
|
||||
if(isset($_POST) && sizeof($_POST) > 0){
|
||||
$errorString .= "POST DATA:\n";
|
||||
$errorString .= vds($_POST);
|
||||
}
|
||||
|
||||
error_log($errorString);
|
||||
|
||||
throw $ex; // Send the exception back to PHP for its usual logging routine.
|
||||
});
|
||||
?>
|
482
lib/Ebook.php
Normal file
|
@ -0,0 +1,482 @@
|
|||
<?
|
||||
class Ebook{
|
||||
public $WwwFilesystemPath;
|
||||
public $RepoFilesystemPath;
|
||||
public $Url;
|
||||
public $KindleCoverUrl;
|
||||
public $EpubUrl;
|
||||
public $Epub3Url;
|
||||
public $KepubUrl;
|
||||
public $Azw3Url;
|
||||
public $HasDownloads;
|
||||
public $GitCommits = [];
|
||||
public $Tags = [];
|
||||
public $LocTags = [];
|
||||
public $Identifier;
|
||||
public $UrlSafeIdentifier;
|
||||
public $HeroImageUrl;
|
||||
public $HeroImage2xUrl;
|
||||
public $CoverImageUrl;
|
||||
public $CoverImage2xUrl;
|
||||
public $Title;
|
||||
public $FullTitle;
|
||||
public $Description;
|
||||
public $LongDescription;
|
||||
public $Language;
|
||||
public $WordCount;
|
||||
public $ReadingEase;
|
||||
public $ReadingEaseDescription;
|
||||
public $ReadingTime;
|
||||
public $GitHubUrl;
|
||||
public $WikipediaUrl;
|
||||
public $SourceUrls = [];
|
||||
public $Authors = []; // Array of Contributors
|
||||
public $AuthorsHtml;
|
||||
public $AuthorsUrl; // This is a single URL even if there are multiple authors; for example, /ebooks/karl-marx_friedrich-engels/
|
||||
public $Illustrators = []; // Array of Contributors
|
||||
public $Translators = []; // Array of Contributors
|
||||
public $Contributors = []; // Array of Contributors
|
||||
public $ContributorsHtml;
|
||||
public $TitleWithCreditsHtml = '';
|
||||
public $Timestamp;
|
||||
|
||||
public function __construct($wwwFilesystemPath){
|
||||
// First, construct a source repo path from our WWW filesystem path.
|
||||
$this->RepoFilesystemPath = str_replace(SITE_ROOT . '/www/ebooks/', '', $wwwFilesystemPath);
|
||||
$this->RepoFilesystemPath = SITE_ROOT . '/ebooks/' . str_replace('/', '_', $this->RepoFilesystemPath) . '.git';
|
||||
|
||||
if(!is_dir($this->RepoFilesystemPath)){ // On dev systems we might not have the bare repos, so make an adjustment
|
||||
$this->RepoFilesystemPath = preg_replace('/\.git$/ius', '', $this->RepoFilesystemPath);
|
||||
}
|
||||
|
||||
if(!is_dir($wwwFilesystemPath)){
|
||||
throw new InvalidEbookException('Invalid www filesystem path: ' . $wwwFilesystemPath);
|
||||
}
|
||||
|
||||
if(!is_dir($this->RepoFilesystemPath)){
|
||||
throw new InvalidEbookException('Invalid repo filesystem path: ' . $this->RepoFilesystemPath);
|
||||
}
|
||||
|
||||
if(!is_file($wwwFilesystemPath . '/src/epub/content.opf')){
|
||||
throw new InvalidEbookException('Invalid content.opf file: ' . $wwwFilesystemPath . '/src/epub/content.opf');
|
||||
}
|
||||
|
||||
$this->WwwFilesystemPath = $wwwFilesystemPath;
|
||||
$this->Url = str_replace(SITE_ROOT . '/www', '', $this->WwwFilesystemPath);
|
||||
|
||||
$rawMetadata = file_get_contents($wwwFilesystemPath . '/src/epub/content.opf');
|
||||
|
||||
// Get the SE identifier.
|
||||
preg_match('|<dc:identifier[^>]*?>(.+?)</dc:identifier>|ius', $rawMetadata, $matches);
|
||||
if(sizeof($matches) != 2){
|
||||
throw new EbookParsingException('Invalid <dc:identifier> element.');
|
||||
}
|
||||
$this->Identifier = $matches[1];
|
||||
|
||||
$this->UrlSafeIdentifier = str_replace(['url:https://standardebooks.org/ebooks/', '/'], ['', '_'], $this->Identifier);
|
||||
|
||||
// Generate the Kindle cover URL.
|
||||
$tempPath = glob($this->WwwFilesystemPath . '/dist/*_EBOK_portrait.jpg');
|
||||
if(sizeof($tempPath) > 0){
|
||||
$this->KindleCoverUrl = $this->Url . '/dist/' . basename($tempPath[0]);
|
||||
}
|
||||
|
||||
// Generate the epub URL.
|
||||
$tempPath = glob($this->WwwFilesystemPath . '/dist/*.epub');
|
||||
if(sizeof($tempPath) > 0){
|
||||
$this->EpubUrl = $this->Url . '/dist/' . basename($tempPath[0]);
|
||||
}
|
||||
|
||||
// Generate the epub3 URL
|
||||
$tempPath = glob($this->WwwFilesystemPath . '/dist/*.epub3');
|
||||
if(sizeof($tempPath) > 0){
|
||||
$this->Epub3Url = $this->Url . '/dist/' . basename($tempPath[0]);
|
||||
}
|
||||
|
||||
// Generate the Kepub URL
|
||||
$tempPath = glob($this->WwwFilesystemPath . '/dist/*.kepub.epub');
|
||||
if(sizeof($tempPath) > 0){
|
||||
$this->KepubUrl = $this->Url . '/dist/' . basename($tempPath[0]);
|
||||
}
|
||||
|
||||
// Generate the azw3 URL.
|
||||
$tempPath = glob($this->WwwFilesystemPath . '/dist/*.azw3');
|
||||
if(sizeof($tempPath) > 0){
|
||||
$this->Azw3Url = $this->Url . '/dist/' . basename($tempPath[0]);
|
||||
}
|
||||
|
||||
$this->HasDownloads = $this->EpubUrl || $this->Epub3Url || $this->KepubUrl || $this->Azw3Url;
|
||||
|
||||
// Fill in the short history of this repo.
|
||||
$historyEntries = explode("\n", shell_exec('cd ' . escapeshellarg($this->RepoFilesystemPath) . ' && git log -n5 --pretty=format:"%ct %s"'));
|
||||
|
||||
foreach($historyEntries as $entry){
|
||||
$array = explode(' ', $entry, 2);
|
||||
$this->GitCommits[] = new GitCommit($array[0], $array[1]);
|
||||
}
|
||||
|
||||
// Get cover image URLs.
|
||||
$gitFolderPath = $this->RepoFilesystemPath;
|
||||
if(stripos($this->RepoFilesystemPath, '.git') === false){
|
||||
$gitFolderPath = $gitFolderPath . '/.git';
|
||||
}
|
||||
$hash = substr(sha1($this->GitCommits[0]->Timestamp->format('U') . ' ' . $this->GitCommits[0]->Message), 0, 8);
|
||||
$this->CoverImageUrl = '/images/covers/' . $this->UrlSafeIdentifier . '-' . $hash . '-cover.jpg';
|
||||
$this->CoverImage2xUrl = '/images/covers/' . $this->UrlSafeIdentifier . '-' . $hash . '-cover@2x.jpg';
|
||||
$this->HeroImageUrl = '/images/covers/' . $this->UrlSafeIdentifier . '-' . $hash . '-hero.jpg';
|
||||
$this->HeroImage2xUrl = '/images/covers/' . $this->UrlSafeIdentifier . '-' . $hash . '-hero@2x.jpg';
|
||||
|
||||
// Now do some heavy XML lifting!
|
||||
$xml = new SimpleXmlElement(str_replace('xmlns=', 'ns=', $rawMetadata));
|
||||
$xml->registerXPathNamespace('dc', 'http://purl.org/dc/elements/1.1/');
|
||||
|
||||
$this->Title = $this->NullIfEmpty($xml->xpath('/package/metadata/dc:title'));
|
||||
if($this->Title === null){
|
||||
throw new EbookParsingException('Invalid <dc:title> element.');
|
||||
}
|
||||
|
||||
$this->Title = str_replace('\'', '’', $this->Title);
|
||||
|
||||
$this->FullTitle = $this->NullIfEmpty($xml->xpath('/package/metadata/dc:title[@id="fulltitle"]'));
|
||||
|
||||
$this->Timestamp = new \DateTime((string)$xml->xpath('/package/metadata/dc:date')[0]);
|
||||
|
||||
// Get SE tags
|
||||
foreach($xml->xpath('/package/metadata/meta[@property="meta-auth"]') as $tag){
|
||||
$this->Tags[] = (string)$tag;
|
||||
}
|
||||
|
||||
// Get LoC tags
|
||||
foreach($xml->xpath('/package/metadata/dc:subject') as $tag){
|
||||
$this->LocTags[] = (string)$tag;
|
||||
}
|
||||
|
||||
// Figure out authors and contributors.
|
||||
foreach($xml->xpath('/package/metadata/dc:creator') as $author){
|
||||
$id = $author->attributes()->id;
|
||||
$this->Authors[] = new Contributor( (string)$author,
|
||||
(string)$xml->xpath('/package/metadata/meta[@property="file-as"][@refines="#' . $id . '"]')[0],
|
||||
$this->NullIfEmpty($xml->xpath('/package/metadata/meta[@property="se:name.person.full-name"][@refines="#' . $id . '"]')),
|
||||
$this->NullIfEmpty($xml->xpath('/package/metadata/meta[@property="se:url.encyclopedia.wikipedia"][@refines="#' . $id . '"]'))
|
||||
);
|
||||
}
|
||||
|
||||
if(sizeof($this->Authors) == 0){
|
||||
throw new EbookParsingException('Invalid <dc:creator> element.');
|
||||
}
|
||||
|
||||
$this->AuthorsUrl = preg_replace('|url:https://standardebooks.org/ebooks/([^/]+)/.*|ius', '/ebooks/\1/', $this->Identifier);
|
||||
|
||||
foreach($xml->xpath('/package/metadata/dc:contributor') as $contributor){
|
||||
$id = $contributor->attributes()->id;
|
||||
foreach($xml->xpath('/package/metadata/meta[@property="role"][@refines="#' . $id . '"]') as $role){
|
||||
$c = new Contributor(
|
||||
(string)$contributor,
|
||||
$this->NullIfEmpty($xml->xpath('/package/metadata/meta[@property="file-as"][@refines="#' . $id . '"]')),
|
||||
$this->NullIfEmpty($xml->xpath('/package/metadata/meta[@property="se:name.person.full-name"][@refines="#' . $id . '"]')),
|
||||
$this->NullIfEmpty($xml->xpath('/package/metadata/meta[@property="se:url.encyclopedia.wikipedia"][@refines="#' . $id . '"]'))
|
||||
);
|
||||
|
||||
if($role == 'trl'){
|
||||
$this->Translators[] = $c;
|
||||
}
|
||||
|
||||
if($role == 'ill'){
|
||||
$this->Illustrators[] = $c;
|
||||
}
|
||||
|
||||
if($role == 'ctb'){
|
||||
$this->Contributors[] = $c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Some basic data.
|
||||
$this->Description = $this->NullIfEmpty($xml->xpath('/package/metadata/dc:description'));
|
||||
$this->Language = $this->NullIfEmpty($xml->xpath('/package/metadata/dc:language'));
|
||||
$this->LongDescription = $this->NullIfEmpty($xml->xpath('/package/metadata/meta[@property="se:long-description"]'));
|
||||
$this->WordCount = (int)$xml->xpath('/package/metadata/meta[@property="se:word-count"]')[0] ?? 0;
|
||||
$this->ReadingEase = (float)$xml->xpath('/package/metadata/meta[@property="se:reading-ease.flesch"]')[0] ?? 0;
|
||||
|
||||
if($this->ReadingEase !== null){
|
||||
if($this->ReadingEase >= 90){
|
||||
$this->ReadingEaseDescription = 'very easy';
|
||||
}
|
||||
|
||||
if($this->ReadingEase >= 79 && $this->ReadingEase <= 89){
|
||||
$this->ReadingEaseDescription = 'easy';
|
||||
}
|
||||
|
||||
if($this->ReadingEase > 69 && $this->ReadingEase <= 79){
|
||||
$this->ReadingEaseDescription = 'fairly easy';
|
||||
}
|
||||
|
||||
if($this->ReadingEase > 59 && $this->ReadingEase <= 69){
|
||||
$this->ReadingEaseDescription = 'average difficulty';
|
||||
}
|
||||
|
||||
if($this->ReadingEase > 49 && $this->ReadingEase <= 59){
|
||||
$this->ReadingEaseDescription = 'fairly difficult';
|
||||
}
|
||||
|
||||
if($this->ReadingEase > 39 && $this->ReadingEase <= 49){
|
||||
$this->ReadingEaseDescription = 'difficult';
|
||||
}
|
||||
|
||||
if($this->ReadingEase < 39){
|
||||
$this->ReadingEaseDescription = 'very difficult';
|
||||
}
|
||||
}
|
||||
|
||||
// Figure out the reading time.
|
||||
$readingTime = ceil($this->WordCount / AVERAGE_READING_WORDS_PER_MINUTE);
|
||||
$this->ReadingTime = $readingTime;
|
||||
|
||||
if($readingTime < 60){
|
||||
$this->ReadingTime .= ' minute';
|
||||
if($readingTime != 1){
|
||||
$this->ReadingTime .= 's';
|
||||
}
|
||||
}
|
||||
else{
|
||||
$readingTimeHours = floor($readingTime / 60);
|
||||
$readingTimeMinutes = ceil($readingTime % 60);
|
||||
$this->ReadingTime = $readingTimeHours . ' hour';
|
||||
if($readingTimeHours != 1){
|
||||
$this->ReadingTime .= 's';
|
||||
}
|
||||
|
||||
if($readingTimeMinutes != 0){
|
||||
$this->ReadingTime .= ' ' . $readingTimeMinutes . ' minute';
|
||||
if($readingTimeMinutes != 1){
|
||||
$this->ReadingTime .= 's';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Figure out ancillary links.
|
||||
|
||||
// First the Wikipedia URLs.
|
||||
$this->WikipediaUrl = $this->NullIfEmpty($xml->xpath('/package/metadata/meta[@property="se:url.encyclopedia.wikipedia"][not(@refines)]'));
|
||||
|
||||
// Next the page scan source URLs.
|
||||
foreach($xml->xpath('/package/metadata/dc:source') as $element){
|
||||
if(mb_stripos((string)$element, '//www.gutenberg.org/') !== false){
|
||||
$this->SourceUrls[] = ['source' => SOURCE_PROJECT_GUTENBERG, 'url' => (string)$element];
|
||||
}
|
||||
elseif(mb_stripos((string)$element, '//archive.org/') !== false){
|
||||
$this->SourceUrls[] = ['source' => SOURCE_INTERNET_ARCHIVE, 'url' => (string)$element];
|
||||
}
|
||||
elseif(mb_stripos((string)$element, 'hathitrust.org/') !== false){
|
||||
$this->SourceUrls[] = ['source' => SOURCE_HATHI_TRUST, 'url' => (string)$element];
|
||||
}
|
||||
elseif(mb_stripos((string)$element, 'wikisource.org/') !== false){
|
||||
$this->SourceUrls[] = ['source' => SOURCE_WIKISOURCE, 'url' => (string)$element];
|
||||
}
|
||||
elseif(mb_stripos((string)$element, 'books.google.com/') !== false){
|
||||
$this->SourceUrls[] = ['source' => SOURCE_GOOGLE_BOOKS, 'url' => (string)$element];
|
||||
}
|
||||
else{
|
||||
$otherUrls[] = [SOURCE_OTHER, (string)$element];
|
||||
}
|
||||
}
|
||||
|
||||
// Next the GitHub URLs.
|
||||
$this->GitHubUrl = $this->NullIfEmpty($xml->xpath('/package/metadata/meta[@property="se:url.vcs.github"][not(@refines)]'));
|
||||
|
||||
// Put together the full contributor string.
|
||||
$titleContributors = '';
|
||||
if(sizeof($this->Contributors) > 0){
|
||||
$titleContributors .= '. With ' . $this->GenerateContributorList($this->Contributors);
|
||||
$this->ContributorsHtml .= ' with ' . $this->GenerateContributorList($this->Contributors) . ';';
|
||||
}
|
||||
|
||||
if(sizeof($this->Translators) > 0){
|
||||
$titleContributors .= '. Translated by ' . $this->GenerateContributorList($this->Translators);
|
||||
$this->ContributorsHtml .= ' translated by ' . $this->GenerateContributorList($this->Translators) . ';';
|
||||
}
|
||||
|
||||
if(sizeof($this->Illustrators) > 0){
|
||||
$titleContributors .= '. Illustrated by ' . $this->GenerateContributorList($this->Illustrators);
|
||||
$this->ContributorsHtml .= ' illustrated by ' . $this->GenerateContributorList($this->Illustrators) . ';';
|
||||
}
|
||||
|
||||
if($this->ContributorsHtml !== null){
|
||||
$this->ContributorsHtml = ucfirst(rtrim(trim($this->ContributorsHtml), ';')) . '.';
|
||||
}
|
||||
|
||||
$this->AuthorsHtml = $this->GenerateContributorList($this->Authors);
|
||||
|
||||
// Now the complete title with credits.
|
||||
$this->TitleWithCreditsHtml = Formatter::ToPlainText($this->Title) . ', by ' . $this->AuthorsHtml . $titleContributors;
|
||||
}
|
||||
|
||||
public function Contains(string $query): bool{
|
||||
// When searching an ebook, we search the title, author(s), SE tags, and LoC tags.
|
||||
|
||||
$searchString = $this->FullTitle ?? $this->Title;
|
||||
|
||||
foreach($this->Authors as $author){
|
||||
$searchString .= ' ' . $author->Name;
|
||||
}
|
||||
|
||||
foreach($this->Tags as $tag){
|
||||
$searchString .= ' ' . $tag;
|
||||
}
|
||||
|
||||
foreach($this->LocTags as $tag){
|
||||
$searchString .= ' ' . $tag;
|
||||
}
|
||||
|
||||
// Remove diacritics and non-alphanumeric characters
|
||||
$searchString = trim(preg_replace('|[^a-zA-Z0-9 ]|ius', ' ', @iconv('UTF-8', 'ASCII//TRANSLIT', $searchString)));
|
||||
$query = trim(preg_replace('|[^a-zA-Z0-9 ]|ius', ' ', @iconv('UTF-8', 'ASCII//TRANSLIT', $query)));
|
||||
|
||||
if(mb_stripos($searchString, $query) !== false){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function GenerateJsonLd(): string{
|
||||
$output = new stdClass();
|
||||
$output->{'@context'} = 'https://schema.org';
|
||||
$output->{'@type'} = 'Book';
|
||||
$output->bookFormat = 'EBook';
|
||||
|
||||
$organizationObject = new stdClass();
|
||||
$organizationObject->{'@type'} = 'Organization';
|
||||
$organizationObject->name = 'Standard Ebooks';
|
||||
$organizationObject->logo = 'https://standardebooks.org/images/logo-full.svg';
|
||||
$organizationObject->url = 'https://standardebooks.org';
|
||||
$output->publisher = $organizationObject;
|
||||
|
||||
$output->name = $this->Title;
|
||||
$output->image = SITE_URL . $this->Url . '/dist/cover.jpg';
|
||||
$output->thumbnailUrl = SITE_URL . $this->Url . '/dist/cover-thumbnail.jpg';
|
||||
$output->url = SITE_URL . $this->Url;
|
||||
$output->{'@id'} = SITE_URL . $this->Url;
|
||||
$output->description = $this->Description;
|
||||
$output->inLanguage = $this->Language;
|
||||
|
||||
if($this->WikipediaUrl){
|
||||
$output->sameAs = $this->WikipediaUrl;
|
||||
}
|
||||
|
||||
$output->author = [];
|
||||
|
||||
foreach($this->Authors as $contributor){
|
||||
$output->author[] = $this->GenerateContributorJsonLd($contributor);
|
||||
}
|
||||
|
||||
$output->encoding = [];
|
||||
|
||||
if($this->EpubUrl){
|
||||
$encodingObject = new stdClass();
|
||||
$encodingObject->{'@type'} = 'MediaObject';
|
||||
$encodingObject->encodingFormat = 'epub';
|
||||
$encodingObject->contentUrl = SITE_URL . $this->EpubUrl;
|
||||
$output->encoding[] = $encodingObject;
|
||||
}
|
||||
|
||||
if($this->KepubUrl){
|
||||
$encodingObject = new stdClass();
|
||||
$encodingObject->{'@type'} = 'MediaObject';
|
||||
$encodingObject->encodingFormat = 'kepub';
|
||||
$encodingObject->contentUrl = SITE_URL . $this->KepubUrl;
|
||||
$output->encoding[] = $encodingObject;
|
||||
}
|
||||
|
||||
if($this->Epub3Url){
|
||||
$encodingObject = new stdClass();
|
||||
$encodingObject->{'@type'} = 'MediaObject';
|
||||
$encodingObject->encodingFormat = 'epub3';
|
||||
$encodingObject->contentUrl = SITE_URL . $this->Epub3Url;
|
||||
$output->encoding[] = $encodingObject;
|
||||
}
|
||||
|
||||
if($this->Azw3Url){
|
||||
$encodingObject = new stdClass();
|
||||
$encodingObject->{'@type'} = 'MediaObject';
|
||||
$encodingObject->encodingFormat = 'azw3';
|
||||
$encodingObject->contentUrl = SITE_URL . $this->Azw3Url;
|
||||
$output->encoding[] = $encodingObject;
|
||||
}
|
||||
|
||||
if(sizeof($this->Translators) > 0){
|
||||
$output->translator = [];
|
||||
foreach($this->Translators as $contributor){
|
||||
$output->translator[] = $this->GenerateContributorJsonLd($contributor);
|
||||
}
|
||||
}
|
||||
|
||||
if(sizeof($this->Illustrators) > 0){
|
||||
$output->illustrator = [];
|
||||
foreach($this->Illustrators as $contributor){
|
||||
$output->illustrator[] = $this->GenerateContributorJsonLd($contributor);
|
||||
}
|
||||
}
|
||||
|
||||
return json_encode($output, JSON_PRETTY_PRINT);
|
||||
}
|
||||
|
||||
private function GenerateContributorJsonLd(Contributor $contributor): stdClass{
|
||||
$object = new stdClass();
|
||||
$object->{'@type'} = 'Person';
|
||||
$object->name = $contributor->Name;
|
||||
|
||||
if($contributor->WikipediaUrl){
|
||||
$object->sameAs = $contributor->WikipediaUrl;
|
||||
}
|
||||
|
||||
if($contributor->FullName){
|
||||
$object->alternateName = $contributor->FullName;
|
||||
}
|
||||
|
||||
return $object;
|
||||
}
|
||||
|
||||
private function GenerateContributorList(array $contributors): string{
|
||||
// Inputs: An array of Contributor objects.
|
||||
|
||||
$string = '';
|
||||
$i = 0;
|
||||
foreach($contributors as $contributor){
|
||||
if($contributor->WikipediaUrl){
|
||||
$string .= '<a href="' . Formatter::ToPlainText($contributor->WikipediaUrl) .'">' . Formatter::ToPlainText($contributor->Name) . '</a>';
|
||||
}
|
||||
else{
|
||||
$string .= Formatter::ToPlainText($contributor->Name);
|
||||
}
|
||||
|
||||
if($i == sizeof($contributors) - 2 && sizeof($contributors) > 2){
|
||||
$string .= ', and ';
|
||||
}
|
||||
elseif($i == sizeof($contributors) - 2){
|
||||
$string .= ' and ';
|
||||
}
|
||||
elseif($i != sizeof($contributors) - 1){
|
||||
$string .= ', ';
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
private function NullIfEmpty(array $elements){ // Can't use type hinting until PHP 7.1 which supports nullable return types
|
||||
// Helper function when getting values from SimpleXml.
|
||||
// Checks if the result is set, and returns the value if so; if the value is the empty string, return null.
|
||||
if(isset($elements[0])){
|
||||
$str = (string)$elements[0];
|
||||
if($str !== ''){
|
||||
return $str;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
?>
|
4
lib/EbookParsingException.php
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?
|
||||
class EbookParsingException extends \Exception{
|
||||
}
|
||||
?>
|
29
lib/Formatter.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?
|
||||
class Formatter{
|
||||
public static function MakeUrlSafe(string $text): string{
|
||||
// Remove accent characters
|
||||
$text = @iconv('UTF-8', 'ASCII//TRANSLIT', $text);
|
||||
|
||||
// Trim and convert to lowercase
|
||||
$text = mb_strtolower(trim($text));
|
||||
|
||||
// Remove apostrophes
|
||||
$text = preg_replace("/['’]/ius", '', $text);
|
||||
|
||||
// Then convert any non-digit, non-letter character to a space
|
||||
$text = preg_replace('/[^0-9a-zA-Z]/ius', ' ', $text);
|
||||
|
||||
// Then convert any instance of one or more space to dash
|
||||
$text = preg_replace('/\s+/ius', '-', $text);
|
||||
|
||||
// Finally, trim dashes
|
||||
$text = trim($text, '-');
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
public static function ToPlainText(string $text): string{
|
||||
return htmlspecialchars(trim($text), ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
}
|
||||
?>
|
11
lib/GitCommit.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?
|
||||
class GitCommit{
|
||||
public $Timestamp;
|
||||
public $Message;
|
||||
|
||||
public function __construct(string $unixTimestamp, string $message){
|
||||
$this->Timestamp = new \DateTimeImmutable('@' . $unixTimestamp);
|
||||
$this->Message = $message;
|
||||
}
|
||||
}
|
||||
?>
|
82
lib/HttpInput.php
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?
|
||||
class HttpInput{
|
||||
public static function GetString(string $variable, bool $allowEmptyString = true, $default = null){ // Can't type hint return values because it might return null
|
||||
$var = self::GetHttpVar($variable, HTTP_VAR_STR, GET, $default);
|
||||
|
||||
if(!$allowEmptyString && $var === ''){
|
||||
return null;
|
||||
}
|
||||
|
||||
return $var;
|
||||
}
|
||||
|
||||
public static function GetInt(string $variable, $default = null){ // Can't type hint return values because it might return null
|
||||
return self::GetHttpVar($variable, HTTP_VAR_INT, GET, $default);
|
||||
}
|
||||
|
||||
public static function GetBool(string $variable, $default = null){ // Can't type hint return values because it might return null
|
||||
return self::GetHttpVar($variable, HTTP_VAR_BOOL, GET, $default);
|
||||
}
|
||||
|
||||
public static function GetDec(string $variable, $default = null){ // Can't type hint return values because it might return null
|
||||
return self::GetHttpVar($variable, HTTP_VAR_DEC, GET, $default);
|
||||
}
|
||||
|
||||
private static function GetHttpVar(string $variable, int $type, int $set, $default){
|
||||
$vars = array();
|
||||
|
||||
switch($set){
|
||||
case GET:
|
||||
$vars = $_GET;
|
||||
break;
|
||||
case POST:
|
||||
$vars = $_POST;
|
||||
break;
|
||||
case COOKIE:
|
||||
$vars = $_COOKIE;
|
||||
break;
|
||||
}
|
||||
|
||||
if(isset($vars[$variable])){
|
||||
$var = trim($vars[$variable]);
|
||||
|
||||
switch($type){
|
||||
case HTTP_VAR_STR:
|
||||
return $var;
|
||||
break;
|
||||
case HTTP_VAR_INT:
|
||||
// Can't use ctype_digit because we may want negative integers
|
||||
if(is_numeric($var) && mb_strpos($var, '.') === false){
|
||||
try{
|
||||
return intval($var);
|
||||
}
|
||||
catch(\Exception $ex){
|
||||
return $default;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HTTP_VAR_BOOL:
|
||||
if($var === '0' || strtolower($var) == 'false' || strtolower($var) == 'off'){
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case HTTP_VAR_DEC:
|
||||
if(is_numeric($var)){
|
||||
try{
|
||||
return floatval($var);
|
||||
}
|
||||
catch(\Exception $ex){
|
||||
return $default;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $default;
|
||||
}
|
||||
}
|
||||
?>
|
4
lib/InvalidAuthorException.php
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?
|
||||
class InvalidAuthorException extends \Exception{
|
||||
}
|
||||
?>
|
4
lib/InvalidEbookException.php
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?
|
||||
class InvalidEbookException extends \Exception{
|
||||
}
|
||||
?>
|
116
lib/Library.php
Normal file
|
@ -0,0 +1,116 @@
|
|||
<?
|
||||
class Library{
|
||||
public static function GetEbooks(string $sort = null): array{
|
||||
$ebooks = [];
|
||||
|
||||
switch($sort){
|
||||
case SORT_AUTHOR_ALPHA:
|
||||
// Get all ebooks, sorted by author alpha first.
|
||||
$ebooks = apcu_fetch('ebooks-alpha', $success);
|
||||
|
||||
if(!$success){
|
||||
$ebooks = Library::GetEbooks();
|
||||
|
||||
usort($ebooks, function($a, $b){
|
||||
return strcmp(mb_strtolower($a->Authors[0]->SortName), mb_strtolower($b->Authors[0]->SortName));
|
||||
});
|
||||
|
||||
apcu_store('ebooks-alpha', $ebooks);
|
||||
}
|
||||
break;
|
||||
|
||||
case SORT_NEWEST:
|
||||
// Get all ebooks, sorted by newest first.
|
||||
$ebooks = apcu_fetch('ebooks-newest', $success);
|
||||
|
||||
if(!$success){
|
||||
$ebooks = Library::GetEbooks();
|
||||
|
||||
usort($ebooks, function($a, $b){
|
||||
if($a->Timestamp < $b->Timestamp){
|
||||
return -1;
|
||||
}
|
||||
elseif($a->Timestamp == $b->Timestamp){
|
||||
return 0;
|
||||
}
|
||||
else{
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
|
||||
$ebooks = array_reverse($ebooks);
|
||||
|
||||
apcu_store('ebooks-newest', $ebooks);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// Get all ebooks, unsorted.
|
||||
$ebooks = apcu_fetch('ebooks', $success);
|
||||
|
||||
if(!$success){
|
||||
foreach(explode("\n", trim(shell_exec('find ' . SITE_ROOT . '/www/ebooks/ -name "content.opf"'))) as $filename){
|
||||
$ebookWwwFilesystemPath = preg_replace('|/src/.+|ius', '', $filename);
|
||||
$ebook = apcu_fetch('ebook-' . $ebookWwwFilesystemPath, $success);
|
||||
|
||||
if(!$success){
|
||||
$ebook = new Ebook($ebookWwwFilesystemPath);
|
||||
apcu_store('ebook-' . $ebookWwwFilesystemPath, $ebook);
|
||||
}
|
||||
|
||||
$ebooks[] = $ebook;
|
||||
}
|
||||
|
||||
apcu_store('ebooks', $ebooks);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return $ebooks;
|
||||
}
|
||||
|
||||
public static function GetEbooksByAuthor(string $wwwFilesystemPath): array{
|
||||
// Do we have the author's ebooks cached?
|
||||
$ebooks = apcu_fetch('author-' . $wwwFilesystemPath, $success);
|
||||
|
||||
if(!$success){
|
||||
$ebooks = [];
|
||||
|
||||
foreach(explode("\n", trim(shell_exec('find ' . escapeshellarg($wwwFilesystemPath) . ' -name "content.opf"'))) as $filename){
|
||||
try{
|
||||
$ebookWwwFilesystemPath = preg_replace('|/src/.+|ius', '', $filename);
|
||||
$ebook = apcu_fetch('ebook-' . $ebookWwwFilesystemPath, $success);
|
||||
|
||||
if(!$success){
|
||||
$ebook = new Ebook($ebookWwwFilesystemPath);
|
||||
apcu_store('ebook-' . $ebookWwwFilesystemPath, $ebook);
|
||||
}
|
||||
|
||||
$ebooks[] = $ebook;
|
||||
|
||||
}
|
||||
catch(\Exception $ex){
|
||||
// An error in a book isn't fatal; just carry on.
|
||||
}
|
||||
}
|
||||
|
||||
apcu_store('author-' . $wwwFilesystemPath, $ebooks);
|
||||
}
|
||||
|
||||
return $ebooks;
|
||||
}
|
||||
|
||||
public static function Search(string $query): array{
|
||||
$ebooks = Library::GetEbooks();
|
||||
$matches = [];
|
||||
|
||||
foreach($ebooks as $ebook){
|
||||
if($ebook->Contains($query)){
|
||||
$matches[] = $ebook;
|
||||
}
|
||||
}
|
||||
|
||||
return $matches;
|
||||
}
|
||||
}
|
||||
?>
|
13
lib/Logger.php
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?
|
||||
class Logger{
|
||||
public static function WriteGithubWebhookLogEntry(string $requestId, string $text){
|
||||
$fp = fopen(GITHUB_WEBHOOK_LOG_FILE_PATH, 'a+');
|
||||
fwrite($fp, gmdate('Y-m-d H:i:s') . "\t" . $requestId . "\t" . $text . "\n");
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
public static function WriteErrorLogEntry(string $text){
|
||||
error_log($text);
|
||||
}
|
||||
}
|
||||
?>
|
4
lib/NoopException.php
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?
|
||||
class NoopException extends \Exception{
|
||||
}
|
||||
?>
|
10
lib/SeeOtherEbookException.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?
|
||||
class SeeOtherEbookException extends \Exception{
|
||||
public $Url;
|
||||
|
||||
public function __construct($url = ''){
|
||||
$this->Url = $url;
|
||||
parent::__construct('This ebook is at a different URL: ' . $url);
|
||||
}
|
||||
}
|
||||
?>
|
37
lib/Template.php
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?
|
||||
class Template{
|
||||
protected static $Cache = [];
|
||||
|
||||
protected static function Get(string $templateName, array $arguments = []): string{
|
||||
// Expand the passed variables
|
||||
// Use these funny names so that we can use 'name' and 'value' as template variables
|
||||
foreach($arguments as $innerName => $innerValue){
|
||||
$$innerName = $innerValue;
|
||||
}
|
||||
|
||||
if(array_key_exists($templateName, self::$Cache)){
|
||||
$fileContents = self::$Cache[$templateName];
|
||||
}
|
||||
else{
|
||||
$fileContents = file_get_contents(TEMPLATES_PATH . '/' . $templateName . '.php');
|
||||
self::$Cache[$templateName] = $fileContents;
|
||||
}
|
||||
|
||||
ob_start();
|
||||
eval(' ?>' . $fileContents . '<? ');
|
||||
$contents = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
return $contents;
|
||||
}
|
||||
|
||||
public static function __callStatic(string $function, array $arguments): string{
|
||||
if(isset($arguments[0])){
|
||||
return self::Get($function, $arguments[0]);
|
||||
}
|
||||
else{
|
||||
return self::Get($function, $arguments);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
10
lib/WebhookException.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?
|
||||
class WebhookException extends \Exception{
|
||||
public $PostData;
|
||||
|
||||
public function __construct($message = '', $data = null){
|
||||
$this->PostData = $data;
|
||||
parent::__construct($message);
|
||||
}
|
||||
}
|
||||
?>
|
5
templates/ContributeAlert.php
Normal file
|
@ -0,0 +1,5 @@
|
|||
<aside class="alert">
|
||||
<p>Is there an out-of-copyright book you’d like to read, but that we don’t have in our catalog?</p>
|
||||
<p><a href="/contribute/">Help us produce that ebook</a> so that others can read it in the future! There’s probably a basic transcription available at <a href="https://www.gutenberg.org">Project Gutenberg</a>—<a href="/contribute/">get in touch with us</a> and we’ll help you make it meet Standard Ebooks standards.</p>
|
||||
<p>Any skill level, from simple proofreading to complete ebook production, is welcome. We’re here to help!</p>
|
||||
</aside>
|
11
templates/EbookGrid.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<ol>
|
||||
<? foreach($ebooks as $ebook){ ?>
|
||||
<li>
|
||||
<a href="<?= $ebook->Url ?>"><img src="<?= $ebook->CoverImage2xUrl ?>" title="<?= Formatter::ToPlainText($ebook->Title) ?>" alt="The cover for the Standard Ebooks edition of <?= Formatter::ToPlainText($ebook->Title) ?>" /></a>
|
||||
<p><a href="<?= $ebook->Url ?>"><?= Formatter::ToPlainText($ebook->Title) ?></a></p>
|
||||
<? foreach($ebook->Authors as $author){ ?>
|
||||
<p class="author"><a href="<?= Formatter::ToPlainText($ebook->AuthorsUrl) ?>"><?= Formatter::ToPlainText($author->Name) ?></a></p>
|
||||
<? } ?>
|
||||
</li>
|
||||
<? } ?>
|
||||
</ol>
|
27
templates/Footer.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<footer>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/ebooks/">Ebooks</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/about/">About</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/contribute/">Get Involved</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/standardebooks">Github</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/opds/">OPDS</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/rss/new-releases">New Releases RSS Feed</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Content produced by or for the Standard Ebooks project is dedicated to the <a href="https://en.wikipedia.org/wiki/Public_domain">public domain</a> via the <a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0 1.0 Universal Public Domain Dedication</a>.</p>
|
||||
<p>Content not produced by or for the Standard Ebooks project but displayed on this website may be subject to copyright.</p>
|
||||
<p><a href="/">Standard Ebooks</a></p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
71
templates/Header.php
Normal file
|
@ -0,0 +1,71 @@
|
|||
<?
|
||||
|
||||
if(!isset($title)){
|
||||
$title = '';
|
||||
}
|
||||
|
||||
if(!isset($highlight)){
|
||||
$highlight = '';
|
||||
}
|
||||
|
||||
if(!isset($description)){
|
||||
$description = '';
|
||||
}
|
||||
|
||||
if(!isset($js)){
|
||||
$js = false;
|
||||
}
|
||||
|
||||
?><!doctype html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><? if($title != ''){ ?><?= Formatter::ToPlainText($title) ?> - <? } ?>Standard Ebooks: Free and liberated ebooks, carefully produced for the true book lover.</title>
|
||||
<? if($description != ''){ ?><meta content="<?= Formatter::ToPlainText($description) ?>" name="description"><? } ?>
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport">
|
||||
<link href="/css/core.css" media="screen" rel="stylesheet" type="text/css">
|
||||
<link href="/apple-touch-icon-120x120.png" rel="apple-touch-icon" sizes="120x120">
|
||||
<link href="/apple-touch-icon-152x152.png" rel="apple-touch-icon" sizes="152x152">
|
||||
<link href="/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180">
|
||||
<link href="/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png">
|
||||
<link href="/favicon-16x16.png" rel="icon" sizes="16x16" type="image/png">
|
||||
<link href="/manifest.json" rel="manifest">
|
||||
<link rel="alternate" type="application/rss+xml" title="Standard Ebooks - New Releases" href="https://standardebooks.org/rss/new-releases">
|
||||
<link color="#394451" href="/safari-pinned-tab.svg" rel="mask-icon">
|
||||
<meta content="#394451" name="theme-color">
|
||||
<? if($js){ ?>
|
||||
<link href="/js/highlight.js/styles/paraiso-dark.css" rel="stylesheet">
|
||||
<script src="/js/jquery-3.3.1.min.js"></script>
|
||||
<script src="/js/highlight.js/highlight.pack.js"></script>
|
||||
<script src="/js/core.js"></script>
|
||||
<? } ?>
|
||||
<meta content="Standard Ebooks" property="og:title">
|
||||
<meta content="website" property="og:type">
|
||||
<meta content="https://standardebooks.org" property="og:url">
|
||||
<meta content="https://standardebooks.org/images/logo.png" property="og:image">
|
||||
<meta content="summary_large_image" name="twitter:card">
|
||||
<meta content="@standardebooks" name="twitter:site">
|
||||
<meta content="@standardebooks" name="twitter:creator">
|
||||
<? if(isset($jsonld)){ ?>
|
||||
<script type="application/ld+json">
|
||||
<?= $jsonld ?>
|
||||
</script>
|
||||
<? } ?>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<a href="/">Standard Ebooks</a>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<a<? if($highlight == 'ebooks'){ ?> class="highlighted"<? } ?> href="/ebooks/">Ebooks</a>
|
||||
</li>
|
||||
<li>
|
||||
<a<? if($highlight == 'about'){ ?> class="highlighted"<? } ?> href="/about/">About</a>
|
||||
</li>
|
||||
<li>
|
||||
<a<? if($highlight == 'contribute'){ ?> class="highlighted"<? } ?> href="/contribute/">Get Involved</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
5
templates/SearchForm.php
Normal file
|
@ -0,0 +1,5 @@
|
|||
<form action="/ebooks/" method="get">
|
||||
<label class="search">
|
||||
Search ebooks: <input type="search" name="query" placeholder="Search ebooks..." value="<?= Formatter::ToPlainText($query ?? '') ?>" />
|
||||
</label>
|
||||
</form>
|
7
www/404.php
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'We couldn’t find that document', 'description' => 'We couldn’t find that document.']) ?>
|
||||
<main class="center">
|
||||
<h1>We couldn’t find that document.</h1>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
65
www/about/index.php
Normal file
|
@ -0,0 +1,65 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'About Standard Ebooks', 'highlight' => 'about', 'description' => 'The Standard Ebooks project is a volunteer driven, not-for-profit effort to produce a collection of high quality, carefully formatted, accessible, open source, and free public domain ebooks that meet or exceed the quality of commercially produced ebooks. The text and cover art in our ebooks is already believed to be in the public domain, and Standard Ebook dedicates its own work to the public domain, thus releasing whole ebooks files themselves into the public domain.']) ?>
|
||||
<main>
|
||||
<article>
|
||||
<h1>About Standard Ebooks</h1>
|
||||
<section id="goals">
|
||||
<h2>Goals</h2>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Produce ebooks that embrace the latest ebook technology standards.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Produce ebooks aimed at the sensibilities of modern readers that rival commercially-available ebooks in typography and formatting.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Produce ebooks with strict code formatting standards and patterns, so that they can be used as a base for other ebook projects.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Produce ebooks with rich semantic data and predictable structure that can be easily machine-processed.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Enrich and evangelize the worldwide public domain.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
<section id="the-short-blurb">
|
||||
<h2>The short blurb</h2>
|
||||
<p>The Standard Ebooks project is a volunteer driven, not-for-profit effort to produce a collection of high quality, carefully formatted, accessible, open source, and free public domain ebooks that meet or exceed the quality of commercially produced ebooks. The text and cover art in our ebooks is already believed to be in the public domain, and Standard Ebook dedicates its own work to the public domain, thus releasing whole ebooks files themselves into the public domain.</p>
|
||||
<h2>How’s this different from Project Gutenberg or other free ebook sites?</h2>
|
||||
<p>While there are plenty of places where you can download free and accurately-transcribed public domain ebooks, we feel the <em>quality</em> of those ebooks can often be greatly improved.</p>
|
||||
<p>For example, <a href="https://gutenberg.org">Project Gutenberg</a>, a major producer of public-domain ebooks, hosts epub and Kindle files that sometimes lack basic typographic necessities like curly quotes; some of those ebooks are automatically generated and can't take full advantage of modern ereader technology like popup footnotes or popup tables of contents; they sometimes lack niceties like cover images and title pages; and the quality of individual ebook productions varies greatly.</p>
|
||||
<p>Archival sites like the <a href="https://archive.org">Internet Archive</a> (and even Project Gutenberg, to some extent) painstakingly preserve entire texts word-for-word, including original typos and ephemera that are of limited interest to modern readers: everything including centuries-old publishing marks, advertisements for long-vanished publishers, author bios, deeply archaic spellings, and so on. Sometimes all you get is a scan of the actual book pages. That’s great for researchers, archivists, and special-interest readers, but not that great for casual, modern readers.</p>
|
||||
<p>The Standard Ebooks project differs from those etext projects in that we aim to make free public domain ebooks that are carefully typeset, cleaned of ancient and irrelevant ephemera, take full advantage of modern ereading technology, are formatted according to a detailed style guide, and that are each held to a standard of quality and internal consistency. Standard Ebooks include carefully chosen cover art based on public domain artwork, and are presented in an attractive way on your ebookshelf. For technically-inclined readers, Standard Ebooks conform to a rigorous coding style, are completely open source, and are <a href="https://github.com/standardebooks/">hosted on Github</a>, so anyone can contribute corrections or improvements easily and directly without having to deal with baroque forums or opaque processes.</p>
|
||||
</section>
|
||||
<section id="what-makes-se-different">
|
||||
<h2>What makes a Standard Ebook different?</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p><b>Design:</b> Consistent and clean cover art designs that make your ebook look good on the shelf, and attention to layout like section breaks, indentation, and chapter headings.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>Typography:</b> Details like <a href="https://practicaltypography.com/straight-and-curly-quotes.html">curly quotes</a>, <a href="https://practicaltypography.com/ellipses.html">ellipses</a>, <a href="https://practicaltypography.com/hyphens-and-dashes.html">en-, em-, and double-em-dashes</a>, <a href="https://practicaltypography.com/first-line-indents.html">indentation</a>, <a href="https://practicaltypography.com/hyphenation.html">hyphenation</a>, and more make for the smooth reading experience you’d expect from a printed book.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>Ebook best practices:</b> Tables of contents and chapter breaks your ereader can understand, detailed and consistent metadata, popup footnotes, and more. Minimal markup and styling that lets your ereader’s personality shine—but consistency, so all of our ebooks look familiar.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>Programming best practices:</b> The stuff you can’t see, but that makes for a professional product: semantic markup, minimal and elegant code, smooth build processes, and source control.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="se-and-the-public-domain">
|
||||
<h2>Standard Ebooks and the public domain</h2>
|
||||
<p>All of our ebooks are texts that are thought to be in the public domain in the United States. We base our cover art designs on art that is also thought to be in the public domain in the United States.</p>
|
||||
<p>Standard Ebooks puts significant work into designing, formatting, marking up, and hosting our ebooks. While some think we could, or even <em>should</em>, release our work with some kind of copyright notice, instead <strong>Standard Ebooks dedicates the entirety of each of our ebook files, including markup, cover art, and everything in between, to the public domain</strong>.</p>
|
||||
<p>The public domain is a priceless resource for all of us, and for the generations after us. It’s a free repository of our culture going back centuries—a way for us to see where we came from and to chart where we’re going. It represents our collective cultural heritage.</p>
|
||||
<p>In the past, copyright was a limited boon, designed not to enrich a creator and their children’s children a hundred years from now, but rather to allow a creator to profit by granting a <em>temporary</em> monopoly on reproduction, in exchange for their work to be returned to the public after a few years. Our ancestors—in fact, the framers of the US Constitution—recognized that art builds on art, and that locking up culture benefits a handful but harms the the greater public.</p>
|
||||
<p>Today, large corporations are putting a lot of money into twisting our laws to slowly but surely strangle the public domain, making it increasingly remote and inaccessible so they can continue seeking rent on ideas and culture nearly a century old. Today laws lock up work not just for the author’s entire lifetime, but for the lifetime of their children, and <em>their</em> children. Copyright can’t enrich the dead, but it <em>can</em> enrich powerful corporations … at our—at <em>everyone’s</em>—expense.</p>
|
||||
<p>Dedicating the work Standard Ebooks produces to the public domain is our small way of letting the world know how important it is to fight that. If corporations have their way, the last liberated and free culture you’ll ever have is what was published before 1923.</p>
|
||||
<p>What a sad world that would be.</p>
|
||||
</section>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
79
www/contribute/a-basic-standard-ebooks-source-folder.php
Normal file
|
@ -0,0 +1,79 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'A Basic Standard Ebooks Source Folder', 'highlight' => 'contribute', 'description' => 'All Standard Ebooks source folders have the same basic structure, described here.']) ?>
|
||||
<main>
|
||||
<article id="a-basic-standard-ebooks-source-folder">
|
||||
<h1>A Basic Standard Ebooks Source Folder</h1>
|
||||
<section>
|
||||
<p>All Standard Ebooks source folders have the same basic structure. It looks a little like this:</p>
|
||||
<figure>
|
||||
<img alt="A tree view of a new Standard Ebooks draft folder" src="/images/epub-draft-tree.png">
|
||||
</figure>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code class="path">dist/</code> is where our <code class="program">build</code> script will put the finished ebook files. Right now it’s empty.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">images/</code> contains the raw image files used in an ebook. For ebooks without illustrations, you’ll have the following three files:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code class="path">images/cover.svg</code>, the raw cover image complete with title and author.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">images/titlepage.svg</code>, the raw titlepage image.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">images/cover.source.jpg</code>, not pictured; the raw, high-resolution artwork we’ve picked as the cover image background, kept here for future reference but not actually used in the final epub file.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">images/cover.jpg</code>, not pictured; the scaled-down version of <code class="path">cover.source.jpg</code> that will be referenced by <code class="path">cover.svg</code> and included in the final epub file.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">src/</code> contains the actual source of the epub. This is the folder that’ll be zipped up as the final epub file, and where the bulk of our work will happen.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code class="path">src/META-INF/</code>, <code class="path">src/META-INF/container.xml</code>, and <code class="path">src/mimetype</code> are required by the epub spec; don’t edit them.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">src/epub/css/</code> contains the CSS files used in the epub.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code class="path">src/epub/css/core.css</code> is the common CSS file used across all Standard Ebooks; don’t edit it.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">src/epub/css/local.css</code> is the CSS file that contains styles for this specific ebook. This is the one you’ll be editing, <em>if necessary</em>. Not all ebooks need custom CSS—the less custom CSS, the better!</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">src/epub/images/</code> contains the images used in the final epub. Right now it contains the Standard Ebooks logo file used in the colophon; don’t edit the logo. Once you’ve finished the cover and titlepage images in <code class="path">./images/</code>, the <code class="program">build-images</code> script will compile them and put them here.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">src/epub/text/</code> is the meat and potatoes of the ebook! You’ll place the source XHTML files here, alongside the templates the draft script created for you:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code class="path">src/epub/text/colophon.xhtml</code> is the template for the Standard Ebooks colophon that appears at the end of every ebook. Usually you’ll edit this last, once you’ve finalized the cover page and metadata.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">src/epub/text/titlepage.xhtml</code> is the template for the titlepage. The only thing to edit here is the title and author in the titlepage <code class="html">alt</code> attribute. Leave the rest alone.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">src/epub/text/unlicense.xhtml</code> is the Standard Ebooks public domain dedication. Don’t edit this at all.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">src/epub/content.opf</code> is the file that contains all of the epub’s metadata. You’ll be editing this heavily.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">src/epub/onix.xml</code> is a file containing accessibility information. Don’t edit this.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
54
www/contribute/accepted-ebooks.php
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'Ebooks We Do and Don’t Accept', 'highlight' => 'contribute', 'description' => 'Standard Ebooks only accepts certain kinds of ebooks for production and hosting. This is the full list.']) ?>
|
||||
<main>
|
||||
<article>
|
||||
<h1>Ebooks We Do and Don’t Accept</h1>
|
||||
<h2>Types of ebooks we do accept</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Most long fiction, including plays.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Most short fiction, when presented in individual collections or omnibus forms.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Most philosophy and other “timeless” non-fiction.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Types of ebooks we don’t accept</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Ebooks that are not clearly in the U.S. public domain. If it’s not on <a href="https://www.gutenberg.org">Gutenberg</a>, we’ll probably decline it.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Extremely short works, like pamphlets or individual short stories. For example, we wouldn’t accept Jonathan Swift’s “<a href="https://www.gutenberg.org/ebooks/1080">A Modest Proposal</a>” or Philip K. Dick’s “<a href="https://www.gutenberg.org/ebooks/32522">Mr. Spaceship</a>.” However we <em>are</em> interested in <em>complete compilations</em> of short stories, for example our <a href="/ebooks/philip-k-dick/short-fiction">ebook of all of Philip K. Dick’s public domain short stories</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Non-fiction that is “dated” or not relevant to a modern reader. This includes obscure histories that are not otherwise notable and have been superceded by modern research, old-timey cookbooks, books of medicine, and textbooks, biographies of long-forgotten people that are not notable, non-fiction periodicals or journals, and so on. Note that “notable” means we may make exceptions, for example for <i>The History of the Decline and Fall of the Roman Empire</i> or <i>The Gallic Wars</i> or <i>The Life of Samuel Johnson</i>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Ebooks which are not “notable” literature. While this one is a little subjective, we don’t want to become a dumping ground for any kind of transcription of any kind of public domain work. If, in our opinion, the author is extremely obscure, or the subject matter is of little interest to a general modern reader, we may decline it. For example, we would decline to host the <i><a href="https://www.gutenberg.org/ebooks/53371">Haslemere Museum Gazette</a></i>, or <i><a href="https://www.gutenberg.org/ebooks/53409">Ocean Gardens: The History of the Marine Aquarium</a></i>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Modern books that have been self-published and released to the public domain.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Major religious texts from modern world religions, like the Bible or the Koran, will not be accepted. Texts <em>about</em> religion will usually be accepted. Texts from historical religious movements that were culturally influential but are now defunct, or are otherwise not significant in modern times, <em>might</em> be accepted; ask first.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>“The complete works”-type ebooks, in which an author who wrote in various styles (like poetry, short stories, and novels) has their entire corpus compiled into one ebook. However we <em>are</em> interested in complete collections of <em>single types of writing</em>. For example, Anton Chekhov wrote many plays, short stories, novels, and novellas. We <em>wouldn’t</em> accept “The Complete Works of Anton Chekhov,” but we <em>would</em> accept <i><a href="/ebooks/anton-chekhov/short-fiction/constance-garnett">Anton Chekhov’s Complete Short Fiction</a></i>, or individual novels or plays he wrote.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Ebooks in translation for which we already have a translation. We aim to host one “best” version of books; for example, we already have a modern translation of <i><a href="/ebooks/jules-verne/twenty-thousand-leagues-under-the-seas/f-p-walter">Twenty Thousand Leagues Under the Seas</a></i>, so we won’t be accepting a different translation.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Non-English-language books. Translations to English are, of course, OK.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Translations into English which are severely abridged, Bowlderized, wildly archaic or near-unreadable to modern readers, or which scholars agree are poor translations.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
554
www/contribute/art.php
Normal file
|
@ -0,0 +1,554 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'Art Manual', 'js' => true, 'highlight' => 'contribute', 'description' => 'The Standard Ebooks Art Manual, containing details on cover and titlepage images, cover art requirements, and public domain research requirements and tips.']) ?>
|
||||
<main>
|
||||
<article>
|
||||
<h1>Art Manual</h1>
|
||||
<aside class="alert">
|
||||
<p>Standard Ebooks is a brand-new project—this manual is a pre-alpha, and much of it is incomplete. If you have a question, need clarification, or run in to an issue not yet covered here, please <a href="https://groups.google.com/forum/#!forum/standardebooks">contact us</a> so we can update this manual.</p>
|
||||
</aside>
|
||||
<section id="general-notes">
|
||||
<h2>General notes</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>When you create a new Standard Ebooks draft using the <code class="program">create-draft</code> tool, you’ll already have templates for the cover and titlepage images present in <code class="path">DRAFT-ROOT/images/</code>. The text in the <abbr class="initialism">SVG</abbr> files is represented as text, not paths, so you can edit them using a text editor and not an <abbr class="initialism">SVG</abbr> editor. Then, the <code class="program">build-images</code> tool converts these text-based source images into path-based compiled images, for distribution in the final epub file. We do this so to avoid having to distribute the font files along with the epub.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>To develop cover and titlepage images, you must have the free <a href="https://github.com/theleagueof/league-spartan">League Spartan</a> and <a href="https://github.com/theleagueof/sorts-mill-goudy">Sorts Mill Goudy</a> fonts installed on your system.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="list-of-files">
|
||||
<h2>Complete list of files</h2>
|
||||
<p>A complete set of image source files consists of:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code class="path">DRAFT-ROOT/images/cover.source.jpg</code>: The full source image used for the cover art, in as high a resolution as possible. Can be of any image format, but typically we end up with <abbr class="initialism">JPG</abbr>s.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">DRAFT-ROOT/images/cover.jpg</code>: A cropped part of the source image that will serve as the actual image file we use in the cover. Must be exactly 1400w × 2100h.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">DRAFT-ROOT/images/cover.svg</code>: The <abbr class="initialism">SVG</abbr> source file for the cover, with any text represented as actual, editable text. Must be exactly 1400w × 2100h pixels. Since the final cover image <abbr class="initialism">SVG</abbr> has the text converted to paths, we keep this file around to make it easier to make changes to the cover in the future.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">DRAFT-ROOT/src/epub/images/cover.svg</code>: The final <abbr class="initialism">SVG</abbr> cover image. This image should be exactly like <code class="path">DRAFT-ROOT/images/cover.svg</code>, but with the text converted to paths.</p>
|
||||
<p>This image is generated by the <code class="path">build-images</code> tool.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">DRAFT-ROOT/images/titlepage.svg</code>: The <abbr class="initialism">SVG</abbr> source file for the titlepage, with any text represented as actual, editable text. Must be exactly 1400 pixels wide, but the height must exactly match the text height plus some padding (described below).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">DRAFT-ROOT/src/epub/images/titlepage.svg</code>: The final <abbr class="initialism">SVG</abbr> titlepage image, with text converted to paths just like the cover page.</p>
|
||||
<p>This image is generated by the <code class="path">build-images</code> tool.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="cover-image">
|
||||
<h2>The cover image</h2>
|
||||
<aside class="alert">
|
||||
<p>The SE Editor-in-Chief must review and approve of the cover art you select before you can commit it to your repository.</p>
|
||||
<p><strong>Do not commit cover art without contacting the mailing list first!</strong></p>
|
||||
</aside>
|
||||
<p>There are three cover image templates available to you based on how long the ebook’s title is. <code class="path">create-draft</code> tries to guess which one to use, but it may not be correct. If your novel title is too long to fit in the template <code class="path">create-draft</code> picked for you, you can try a different cover image template. They’re located in the <a href="https://github.com/standardebooks/tools">Standard Ebooks tools</a> <code class="path">templates/</code> folder.</p>
|
||||
<p>To edit <code class="path">DRAFT-ROOT/images/cover.svg</code>, simply open it with your favorite text editor. Replace “NOVEL” with your novel’s title and “AUTHOR” with the author.</p>
|
||||
<p>Only use a text editor to edit <code class="path">cover.svg</code>, not an SVG editing program like Inkscape. <abbr class="initialism">SVG</abbr> editors like Inkscape often reformat <abbr class="initialism">SVG</abbr>s and insert all sorts of useless metadata.</p>
|
||||
<p>You must have the free <a href="https://github.com/theleagueof/league-spartan">League Spartan</a> font installed on your system for the cover to render and build correctly.</p>
|
||||
<h3>Cover image SVG rules</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Both the title and author are in League Spartan font with 5px letter spacing in ALL CAPS.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The left and right sides of the black title box must have at least 40px padding. More padding is preferrable over cramming the title in.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>For the title lines:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>One-line titles: the line is 80px tall. <a href="/ebooks/niccolo-machiavelli/the-prince/w-k-marriott">Example.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Two-line titles: each line is 80px tall, and the second title line is 20px below the first line. <a href="/ebooks/fyodor-dostoevsky/crime-and-punishment/constance-garnett">Example.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Two-line, very long titles: each line is 60px tall, and the second line is 20px below the first line. <a href="/ebooks/selma-lagerlof/the-wonderful-adventures-of-nils/velma-swanston-howard">Example.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Two-line, extremely long titles: each line is 50px tall, and the second line is 20px below the first line. <a href="/ebooks/rudolph-erich-raspe/the-surprising-adventures-of-baron-munchausen">Example.</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>For the author lines:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>The first author line begins 60px below the last title line.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>One-line authors: the line is 40px tall.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Two-line authors: each line is 40px tall, and the second author line is 20px below the first line.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>Once the author and title lines are the correct distance from each other, the group of both should be horizontally centered in the black title box.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">cover.svg</code> uses <code class="path">cover.jpg</code> as the canvas background.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">cover.jpg</code> is exactly 1400w × 2100h pixels, and should be compressed to be no larger than one megabyte. This might not always be possible while maintining an acceptable level of image quality, but keeping the file size of <code class="path">cover.jpg</code> as small as possible is desirable.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Because <code class="path">cover.jpg</code> is a large image, you should source it from a high-quality scan. This might not always be possible, so it’s allowed to upscale the source image a small amount. But, for example, don’t use a 300w × 500h image as a source; that wouldn’t scale up well.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Cover image artwork rules</h3>
|
||||
<p>Once you’ve set up <code class="path">cover.svg</code>, it’s time to find a suitable fine art painting to use for the cover image.</p>
|
||||
<p>The paintings we use are all in the U.S. public domain (PD). Your task is to locate a painting suitable for the kind of book you’re producing, and then demonstrate that the painting is indeed in the U.S. public domain.</p>
|
||||
<p>U.S. copyright law is complicated. Because of this, <strong>we <em>require</em> that you provide a link to a page scan of a 1922-or-older book that reproduces the painting you selected.</strong> <em>This is a hard requirement</em> to demonstrate that the painting you selected is in fact in the U.S. public domain. Just because a painting is very old, or Wikipedia says it’s PD, or it’s PD in a country besides the U.S., doesn’t necessarily mean it actually <em>is</em> PD in the U.S.</p>
|
||||
<p>The painting you select must be a fine-art oil painting. We require this to maintain a consistency in the overall style of all of our covers.</p>
|
||||
<h3>Tips for location 1922-or-older reproductions of cover art</h3>
|
||||
<p>To actually demonstrate that a painting is PD, you must locate a reproduction of that painting in a 1922-or-older book.</p>
|
||||
<p>This can be quite difficult. Many people find this to be the most time-consuming part of the ebook production process.</p>
|
||||
<p>Because of the difficulty, finding suitable cover at is <em>all about compromise</em>. You’re unlikely to find the perfect cover image. You’ll find a lot of paintings that would be great matches, but that you can’t find reproductions of and thus we can’t use. So, be ready to compromise.</p>
|
||||
<h4>General tips</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Before you can go looking for a reproduction of a specific painting to prove its PD status, you have to find a suitable painting to begin with. <a href="https://www.wikiart.org/">Wikiart.org</a> is a great resource to search paintings by keyword. Museum online collections are another good place to look for inspiration. Once you find a potential candidate, then you can start researching its PD status.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>When searching for cover art, remember that artist names and painting titles may be spelled in many different ways. Often a painting went by multiple titles, or if the title was not in English, by many different translations. Your best bet is to simply search for an artist’s last name, and not the painting title.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Once you locate a book with reproductions, open the book up in thumbnail view and quickly eyeball the pages to see if the artwork is reproduced there.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Note that if your IP address is not in the U.S., many book archives like Google Books and HathiTrust may disable book previews.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Many museum online catalogs have a “bibliography” or “references” section for each painting in their collection. This is usually a list of books in which the painting was either mentioned or reproduced. This is a good shortcut to finding the names of books in which a painting was reproduced, and if you’re lucky, a search for the book title in Google Books will turn up scans.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>In <code class="path">cover.svg</code>, the black title and author box always goes in the lower half of the work. Thus, paintings in which some important detail would be obscured by the box cannot be used.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4>Gotchas</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Sometimes the catalog record for a book has an incorrect publication year. Please verify the page scan of the copyright page to ensure the book is 1922 or older.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>In older books it was common to have <em>etchings</em> of paintings. Etchings are not strict reproductions, and so we cannot count them when researching PD status.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Oftentimes painters would produce several different versions of the same artwork. You must carefully compare the reproduction in the page scan with the high-resolution artwork scan you found to ensure they are the same painting. Small details like the position of trees, clouds, reflections, or water are good ways to check if the painting is identical, or if you’re looking at a different version.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4>PD research step-by-step</h4>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Your first stop should be Google Books. Google Books allows you to filter results so that you only see 1922-or-older books. <a href="https://www.google.com/webhp?tbs=cdr:1,cd_min:,cd_max:1922&tbm=bks">You can use this shortcut to search Google Books for 1922-or-older books.</a></p>
|
||||
<p>Google Books is a convenient first stop because its thumbnail view is very fast, and it does a better job of highlighting search results than HathiTrust or Internet Archive.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>If you can’t find anything on Google Books, next go to HathiTrust. HathiTrust’s thumbnail view is much slower, but it has a different catalog than Google Books does. <a href="https://babel.hathitrust.org/cgi/ls?a=srchls&anyall1=all&q1=&field1=ocr&op3=AND&yop=before&pdate_end=1922">You can use this shortcut to search HathiTrust for 1922-or-older books.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Lastly, try the Internet Archive. IA has a similar catalog as Google Books, but you may still find something there. <a href="https://archive.org/search.php?query=+date%3A%5B1850-01-01+TO+1922-12-31%5D&sin=TXT&sort=-date">You can use this shortcut to search the Internet Archive for 1922-or-older books.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Once you’ve found a reproduction of your artwork in a 1922-or-older book, you need to find a high-resolution color scan that we can use for the cover. Various museum sites can be good for this, along with <a href="https://commons.wikimedia.org">Wikimedia Commons</a>, <a href="https://www.google.com/culturalinstitute/project/art-project">Google Art Project</a>, and <a href="https://www.wikiart.org">Wikiart.org</a>.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<h4 id="pd-research-resources">PD research resources</h4>
|
||||
<p>You may find these resources helpful in your PD research:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=Q3YoAAAAYAAJ">Art Studies for Schools: Or, Hints on the Use of Reproductions of High Art ...</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=gri.ark:/13960/t7xm3q676;view=thumb;seq=13">Catalogue of the ... annual exhibition / The Pennsylvania ... 1912</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/009438195">Catalog Record: Art at the Royal Academy, London, 1897</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/100913061">Catalog Record: The work of John S. Sargent, R.A.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/100344701">Catalog Record: Cubists and post-impressionism</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=uc2.ark:/13960/t8cf9x30t;view=thumb;seq=229">The Luxembourg museum; its paintings. Three hundred and eighty-nine ...</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/009438136">Catalog Record: Illustrated catalogue : paintings in the...</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=Qn1FAQAAMAAJ">A.L.A. Portrait Index: Index to Portraits Contained in Printed Books and ...</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=njp.32101066379189;view=thumb;seq=5">The Nicolas Roerich exhibition, with introduction and catalogue ...</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=NBgtAAAAYAAJ">Art of the British Empire Overseas - Charles Holme</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=i6hEAQAAMAAJ">The International Studio</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/008018731">Catalog Record: Royal Academy pictures and sculpture</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/100237187">Catalog Record: Paris-Salon, 1883</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/000352339">Catalog Record: Farbige Tierbilder</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/000287970">Catalog Record: Catalogue of the Berlin Photographic Company...</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=uc1.b3068561;view=thumb;seq=165">Katalog der Grossen Berliner Kunstausstellung, 1912.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=umn.31951p00149881h;view=thumb;seq=161">Grosse Berliner Kunst-Ausstellung, 1900 : Katalog.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=wu.89056204787;view=thumb;seq=161">Illustrirter Katalog / Grosse Berliner Kunst-Ausstellung. ... 1903.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=umn.31951000746060s;view=thumb;seq=1">La Ilustración ibérica. t.14 (1896).</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=gri.ark:/13960/t08w61g82;view=thumb;seq=349">Entwickelungsgeschichte der modernen Kunst : ... 3.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=nnc1.ar62882988;view=thumb;seq=1">Illustrated catalogue of highly important old and modern paintings ...</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=mdp.39015015820817;view=thumb;seq=541">Pittura, scultura futuriste (dinamismo plastico) Con 51 riproduzioni ...</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="http://www.twainquotes.com/UniformEds/UniformEdsCh33.html">Harper and Brothers Pictorial Hardcover and Gift Editions</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="http://brandywine.doetech.net/Detlobjps.cfm?ParentListID=126891&ObjectID=1531590&rec_num=175">Object Detail</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=yale.39002088545273;view=thumb;seq=57">(this is a whole series) Royal Academy pictures and sculpture. 1900</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/011254573">Catalog Record: The art of the Hon. John Collier</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=_0w4AAAAMAAJ">The Story of American Painting: The Evolution of Painting in America from ... - Charles Henry Caffin</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://archive.org/details/diekunstmonatshe21mnuoft">Die Kunst : Monatsheft für freie und angewandte Kunst</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://archive.org/stream/cubistesfuturist00coquuoft#page/267/mode/thumb">Cubistes, futuristes, passéistes; essai sur la ...</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://archive.org/stream/einblickin00wald#page/23/mode/thumb">Einblick in Kunst: Expressionismus, Futurismus,...</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://archive.org/stream/studiointernatio54lond#page/8/mode/thumb">Studio international</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=q7GUsAXiiA4C">The Magazine of Art</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=sdJAAAAAYAAJ">Cubists and Post-impressionism - Arthur Jerome Eddy</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/100344340">Catalog Record: L'art flamand</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/100445834">Catalog Record: L'école belge de peinture, 1830-1905</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/100578657">Catalog Record: Fernand Khnopff</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/000640739">Catalog Record: Gazette des beaux-arts (FULL SERIES)</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://archive.org/stream/catalogueofficiel00expo#page/40/mode/thumb">Catalogue officiel illustré de l'Exposition cen...</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=njp.32101067654994;view=1up;seq=6">Offizieller Katalog der Internationalen Kunst-Ausstellung ... (1899).</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=wu.89057259921;view=1up;seq=23">British painting, by Irene Maguinness.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=Jl9OAQAAMAAJ">Illustrated Catalogue: Paintings in the Metropolitan Museum of Art, New York - George Henry Story</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://archive.org/stream/bub_gb_yxRaAAAAYAAJ#page/n54/mode/thumb">Impressionisten Guys, Manet, Van Gogh, Pissarro...</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/000636935">Catalog Record: The Royal Academy illustrated</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/000071454">Catalog Record: The Art journal</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/100585480">Catalog Record: Handbuch der Kunstgeschichte</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=nyp.33433082172564;view=thumb;seq=9">Catalogue of the annual exhibition. v. 70-71 (1901-1902).</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/000521207">Catalog Record: Catalogue of the annual exhibition of...</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=mEpGAQAAIAAJ">Meissonier, his life and his art - Jean Louis Ernest Meissonier, Octave Gréard</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=gri.ark:/13960/t4fn6k42j;view=thumb;seq=41">Catalogue of the ... annual exhibition / The Pennsylvania ... 1905.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=xCtAAAAAYAAJ">Zur Geschichte der Düsseldorfer Kunst insbesondere im xix. Jahrhundert - Friedrich Schaarschmidt</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=v7hHAQAAIAAJ">Bryan's dictionary of painters and engravers - Michael Bryan, George Charles Williamson</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://archive.org/details/memorialexhibiti00eaki">Memorial exhibition of the works of the late Thomas Eakins, beginning December 23, 1917 and continuing through January 13, 1918 : Eakins, Thomas, 1844-1916</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=CSFbAAAAYAAJ">Kunst und Künstler: Illustrierte Monatsschrift für bildende Kunst und ... - Karl Scheffler</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/000415396">Catalog Record: Gauguin et le groupe de Pont-Aven. Documents...</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/000062223">Catalog Record: Salon of the &quot;Nationale</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=JAcrAAAAYAAJ">Academy Notes</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=etcwAQAAMAAJ">Great Painters of the XLX Century and Their Paintings - Léonce Bénédite</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/005722615">Catalog Record: Catalogue of paintings and drawings</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=nH9HAQAAMAAJ">The International Studio</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=B6saAAAAYAAJ&">Exhibition: Oil Paintings by Contemporary American Artists</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=oYdLAQAAMAAJ">Catalogue of the ... Annual Exhibition of the Pennsylvania Academy of the ...</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/000523379">Catalog Record: Studio international</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=xCtAAAAAYAAJ">Zur Geschichte der Düsseldorfer Kunst insbesondere im xix. Jahrhundert</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=njp.32101079835656;view=thumb;seq=1">Catalogue of the paintings and sketches of the late Thomas Hill</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=iau.31858028830473;view=thumb;seq=1">Picturesque California</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/000417706">Hubert Robert</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/100439727">The Copley prints; reproductions of notable paintings</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://archive.org/details/cu31924014892024">Scottish painting past and present, 1620-1908</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://archive.org/stream/cyclopediaofpain03chamuoft">Cyclopedia of Painters and Paintings</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/009437624">Art in Australia (series)</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://archive.org/stream/julianashtonbook00asht#page/14/mode/thumb">The Julian Ashton Book</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://catalog.hathitrust.org/Record/100951925">Das Museum (11 volume series, see Hathi catalog listing for other volumes</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://babel.hathitrust.org/cgi/pt?id=umn.31951001591477w;view=thumb">Belgian Art in Exile</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://archive.org/stream/expositiongn1907expo">Exposition Generale des Beaux-Arts Bruxelles 1907</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com/books?id=91FJAQAAMAAJ">Grützner</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 id="faq">Cover art FAQs</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><b>I found a great painting, and Wikipedia says it’s public domain, but I can’t find a reproduction in a book. Can I use it?</b></p>
|
||||
<p>No. You must find a reproduction of your selected painting in a book published in 1922 or earlier.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>I found a great painting, and it’s really old, and the author died a long time ago, but I can’t find a reproduction in a book. Can I use it?</b></p>
|
||||
<p>No. You must find a reproduction of your selected painting in a book published in 1922 or earlier.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>I’ve found a reproduction in a book, but the book is from 1923. Is that OK?</b></p>
|
||||
<p>No. You must find a reproduction of your selected painting in a book published in 1922 or earlier.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>I’ve found scan on a museum site. Is that OK?</b></p>
|
||||
<p>No. You must find a reproduction of your selected painting in a book published in 1922 or earlier.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>But...</b></p>
|
||||
<p>No. You must find a reproduction of your selected painting in a book published in 1922 or earlier.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 id="museums">Museums with explicit CC0 collections</h4>
|
||||
<p>Images that are explicitly marked as CC0 from these museums can be used without further research. Not all of their images are CC0, you must confirm the presence of a CC0 license on the specific image you want to use.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="https://www.rijksmuseum.nl/en/search?q=&f=1&p=1&ps=12&type=painting&imgonly=True&st=Objects">Rijksmuseum</a> (Open the "Object Data" section and check they "Copyright" entry under the "Acquisition and right" section to confirm CC0)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.europeana.eu/portal/en/collections/art?f%5BDATA_PROVIDER%5D%5B%5D=Finnish+National+Gallery&f%5BREUSABILITY%5D%5B%5D=open&f%5BRIGHTS%5D%5B%5D=http%2A%3A%2F%2Fcreativecommons.org%2F%2Apublicdomain%2Fzero%2A&per_page=96&view=grid">Finnish National Gallery via Europeana</a> (Use the "View at" link under the "Find out more" header to confirm CC0 license at the museum's site)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.metmuseum.org/art/collection/search#!/search?material=Paintings&showOnly=withImage%7Copenaccess&sortBy=Relevance&sortOrder=asc&perPage=20&offset=0&pageSize=0">Met Museum</a> (CC0 items have the CC0 logo under the image)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.nationalmuseum.se/">National Museum Sweden</a> (CC-PD items have the CC-PD mark in the lower left of the item's detail view)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://art.thewalters.org/">The Walters Art Museum</a> (Public domain items are listed as "CC Creative Commons License" which links to a CC0 rights page)</p></li>
|
||||
<li><p><a href="https://www.artic.edu/collection?q=test&is_public_domain=1">Art Institute of Chicago</a> (CC0 items say CC0 in the lower left of the painting in the art detail page)</p></li>
|
||||
<li>
|
||||
<p>
|
||||
|
||||
|
||||
</ul>
|
||||
<h2>Cover image step-by-step</h2>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Locate an appropriate high-resolution public domain work to use as the cover image background. Name this unchanged file <code class="path">DRAFT-ROOT/images/cover.source.jpg</code> (or .png, or .bmp, or whatever the original file format is).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Crop or scale the source image to create a 1400w × 2100h image that will be the actual cover background. Name this file <code class="path">DRAFT-ROOT/images/cover.jpg</code> and save it at 75% compression (if that looks good enough).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>If you used the <code class="progam">create-draft</code> script to initialize your repository, then <code class="path">DRAFT-ROOT/images/cover.svg</code> is initialized with the work title and author and what should be the correct font size. If not, copy the cover image template from <code class="path">SE-ROOT/tools/templates/cover.svg</code> into the same directory as <code class="path">cover.jpg</code>. Open your working copy of <code class="path">DRAFT-ROOT/images/cover.svg</code> with a text editor and edit the work name and author, and remove any unused template CSS.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Finally, generate <code class="path">DRAFT-ROOT/src/epub/images/cover.svg</code> by running the <code class="program">build-images</code> tool. (This script also generates the titlepage images, if available.)</p>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
<section id="titlepage-image">
|
||||
<h2>The titlepage image</h2>
|
||||
<p><code class="path">create-draft</code> creates a titlepage image template for you that is correctly sized and arranged, and no more editing should be necessary. If you prefer to create one by hand, here are the various requirements for titlepage images.</p>
|
||||
<p>To edit <code class="path">DRAFT-ROOT/images/titlepage.svg</code>, simply open it with your favorite text editor.</p>
|
||||
<p>Only use a text editor to edit <code class="path">cover.svg</code>, not an SVG editing program like Inkscape. <abbr class="initialism">SVG</abbr> editors like Inkscape often reformat <abbr class="initialism">SVG</abbr>s and insert all sorts of useless metadata.</p>
|
||||
<p>You must have the free <a href="https://github.com/theleagueof/league-spartan">League Spartan</a> and <a href="https://github.com/theleagueof/sorts-mill-goudy">Sorts Mill Goudy Italic</a> font installed on your system for the titlepage to render and build correctly.</p>
|
||||
<h3>Titlepage image SVG rules</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>The title, author, and the names of other contributors are in League Spartan font with 5px letter spacing in ALL CAPS.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Do not include subtitles in the titlepage. For example, the titlepage would contain “THE MAN WHO WAS THURSDAY”, but not “THE MAN WHO WAS THURSDAY: A NIGHTMARE”.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>If there are other contributors besides the author (for example a translator or illustrator), their names are preceded by “translated by” or “illustrated by”, set in lowercase Sorts Mill Goudy Italic font.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Only include the author, translator, and illustrator on the titlepage. Do not include other contributors like writers of introductions or annotators.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The titlepage canvas must have a padding of 50px vertically and 100px horizontally. Text must not enter the padding area.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The titlepage viewbox width must be exactly 1400px wide.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The titlepage viewbox height must <em>precisely fit the titlepage contents, plus 50px padding</em>. Don’t simply edit the template titlepage and leave the viewbox the same; you must customize the viewbox to fit. You can do this by either copying-and-pasting a viewbox from a completed Standard Ebooks ebook that has the same dimensions as yours, or by doing some simple math to calculate the correct height.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Title lines:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Title lines are each 80px tall.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>You may split the title into as many lines as necessary to fit.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Title lines are separated by a 20px margin between each line.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>Author lines:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>The first author line begins 100px below the last title line.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Each author line is 60px tall.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>If an author line must be split, the next line begins 20px below the previous one.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>For works with multiple authors, subsequent author lines begin 20px below the last author line.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>Contributor lines (like translator, illustrator):</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Contributors are both a “contributor descriptor”, like “translated by”, followed by the name on a new line.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The first contributor descriptor line begins 150px below the last author line.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Contributor descriptor lines are 40px tall, all lowercase, in the Sorts Mill Goudy Italic font.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The contributor name begins 20px below the contributor descriptor line.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The contributor name is 40px tall, ALL CAPS, in the League Spartan font.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>If there is more than one contributor of the same type (like multiple translators), they are listed on one line. If there are two, separate them with AND. If there are more than two, separate them with commas, and AND after the final comma. <a href="/ebooks/hermann-hesse/siddhartha/gunther-olesch_anke-dreher_amy-coulter_stefan-langer_semyon-chaichenets">Example.</a></p>
|
||||
<li>
|
||||
<p>If there is more than one contributor type (like both a translator and an illustrator), the next contributor descriptor begins 80px after the last contributor name.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Titlepage diagram</h3>
|
||||
<figure>
|
||||
<img alt="Spacing in a Standard Ebooks titlepage image" src="/images/titlepage-layout.png">
|
||||
</figure>
|
||||
<aside class="alert">
|
||||
<p>Standard Ebooks is a brand-new project—this manual is a pre-alpha, and much of it is incomplete. If you have a question, need clarification, or run in to an issue not yet covered here, please <a href="https://groups.google.com/forum/#!forum/standardebooks">contact us</a> so we can update this manual.</p>
|
||||
</aside>
|
||||
</section>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
85
www/contribute/index.php
Normal file
|
@ -0,0 +1,85 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'Get Involved', 'highlight' => 'contribute', 'description' => 'Details on how to contribute your time and talent to the volunteer-driven Standard Ebooks project.']) ?>
|
||||
<main>
|
||||
<article>
|
||||
<h1>Get Involved</h1>
|
||||
<section id="intro">
|
||||
<h2>Help create ebooks that are a pleasure to read</h2>
|
||||
<p>Standard Ebooks is a volunteer driven project, and there’s room for people of all skill levels to contribute.</p>
|
||||
<p>At the most basic level, anyone can <a href="https://groups.google.com/forum/#!forum/standardebooks">contribute feedback via our mailing list</a>. Day-to-day readers can <a href="/contribute/report-errors">tell us about errors they spot in our ebooks</a>. People with an eye for typography and a talent for editing can proofread whole ebooks. Technically inclined readers can produce ebooks themselves, or <a href="https://github.com/standardebooks">contribute via Github</a>.</p>
|
||||
</section>
|
||||
<section id="everyone">
|
||||
<h2>Everyone</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="https://groups.google.com/forum/#!forum/standardebooks">Join the Standard Ebooks mailing list.</a></p>
|
||||
<p>The mailing list is the best way to contact the Standard Ebooks project about any question, suggestion, concern, or contribution you might have. We’re just an email away!</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/report-errors">Report a typo, formatting error, or typography error in any Standard Ebook.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Help us catalog fine art paintings from scans of old art books. We have links to complete book scans that you can browse, and we need your help to catalog the art in each book for use as cover art in future ebooks.</p>
|
||||
<p>No technical experience is necessary. <a href="https://groups.google.com/forum/#!forum/standardebooks">Contact the mailing list if you want to help.</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="editors-and-readers">
|
||||
<h2>Editors and readers of existing ebooks</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="/contribute/report-errors">Report a typo, formatting error, or typography error in any Standard Ebook.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/tips-for-editors-and-proofreaders">Tips for editors and proofreaders.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/typography">The Standard Ebooks Typography Manual.</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="technical-contributors">
|
||||
<h2>Technical contributors and producers of new ebooks</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="/contribute/accepted-ebooks">Ebooks we do and don’t accept.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/wanted-ebooks">Our Wanted Ebooks list, including suggestions for first-time productions.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/producers">The process of producing an ebook for Standard Ebooks.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/producing-an-ebook-step-by-step">A technical step-by-step guide to producing a new ebook, from start to finish.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/typography">The Standard Ebooks Typography Manual.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/semantics">The Standard Ebooks XHTML Structure and Semantics Manual.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/metadata">The Standard Ebooks Metadata Manual.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/art">The Standard Ebooks Art Manual for cover art and titlepages.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/a-basic-standard-ebooks-source-folder">Descriptions of the files in a fresh Standard Ebooks source folder.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/toolset">Guidelines for contributing to the Standard Ebooks toolset.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://github.com/standardebooks">All Standard Ebooks ebook source files on Github.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://github.com/standardebooks/tools">The Standard Ebooks toolset on Github.</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
808
www/contribute/manual.php
Normal file
|
@ -0,0 +1,808 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'Style Manual', 'js' => true, 'highlight' => 'contribute', 'description' => 'The working draft of the new Standard Ebooks Style Manual.']) ?>
|
||||
<main>
|
||||
<article class="manual">
|
||||
<h1>Style Manual</h1>
|
||||
|
||||
<aside class="alert">
|
||||
<p>This manual is an incomplete draft. Do not use this for production work. Formatting is a work-in-progress.</p>
|
||||
</aside>
|
||||
<h2>Table of Contents</h2>
|
||||
<p>Coming soon...</p>
|
||||
|
||||
<section>
|
||||
<h2>XHTML and CSS code formatting style</h2>
|
||||
<p>The <code class="path">clean</code> tool in the Standard Ebooks toolset formats XHTML code according to our style guidelines. The vast majority of the time its output is correct and no further modifications to code style are necessary.</p>
|
||||
<section>
|
||||
<h3>XHTML formatting</h3>
|
||||
<ol>
|
||||
<li>
|
||||
<p>The first line of all XHTML files is:</p>
|
||||
<figure>
|
||||
<code class="html"><?xml version="1.0" encoding="utf-8"?></code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>The second line of all XHTML files is (replace <code class="html">LANG</code> with the <a href="https://en.wikipedia.org/wiki/IETF_language_tag">appropriate language tag</a> for the file):</p>
|
||||
<figure>
|
||||
<code class="html"><html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/, se: https://standardebooks.org/vocab/1.0" xml:lang="LANG"></code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Tabs are used for indentation.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Tag names are lowercase.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Tags whose content is <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content">phrasing content</a> are on a single line, with no whitespace between the opening and closing tags and the content.</p>
|
||||
<figure class="wrong">
|
||||
<code class="html"><p>
|
||||
It was a dark and stormy night...
|
||||
</p></code>
|
||||
</figure>
|
||||
<figure class="corrected">
|
||||
<code class="html"><p>It was a dark and stormy night...</p></code>
|
||||
</figure>
|
||||
</li>
|
||||
</ol>
|
||||
<section>
|
||||
<h3>Attributes</h3>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Attributes are in alphabetical order.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Attributes, their namespaces, and their values are lowercase, except for values which are IETF language tags, where subtags are capitalized.</p>
|
||||
<figure class="wrong">
|
||||
<code class="html"><section EPUB:TYPE="CHAPTER" XML:LANG="EN-US">...</section></code>
|
||||
</figure>
|
||||
<figure class="corrected">
|
||||
<code class="html"><section epub:type="chapter" xml:lang="en-US">...</section></code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>The string <code class="html">utf-8</code> is lowercase.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
</section>
|
||||
<section>
|
||||
<h3>CSS formatting</h3>
|
||||
<ol>
|
||||
<li>
|
||||
<p>The first two lines of all CSS files are:</p>
|
||||
<figure>
|
||||
<code class="css">@charset "utf-8";
|
||||
@namespace epub "http://www.idpf.org/2007/ops";</code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Tabs are used for indentation.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Selectors, properties, and values are lowercase.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<section>
|
||||
<h3>Selectors</h3>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Selectors are each on their own line, directly followed by a comma or a brace with no whitespace inbetween.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Complete selectors are separated by exactly one blank line.</p>
|
||||
<figure class="wrong">
|
||||
<code class="css">abbr.name{
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
|
||||
strong{
|
||||
font-weight: normal;
|
||||
font-variant: small-caps;
|
||||
}</code>
|
||||
</figure>
|
||||
<figure class="corrected">
|
||||
<code class="css">abbr.name{
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
strong{
|
||||
font-weight: normal;
|
||||
font-variant: small-caps;
|
||||
}</code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Closing braces are on their own line.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
<section>
|
||||
<h3>Properties</h3>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Properties are each on their own line (even if the selector only has one property) and indented with a single tab.</p>
|
||||
<figure class="wrong">
|
||||
<code class="css">abbr.name{ white-space; nowrap; }</code>
|
||||
</figure>
|
||||
<figure class="corrected">
|
||||
<code class="css">abbr.name{
|
||||
white-space: nowrap;
|
||||
}</code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Properties are in alphabetical order, <em>where possible</em>.</p>
|
||||
<p>This isn’t always possible if you’re attempting to override a previous style in the same selector, and in some other cases.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Properties are directly followed by a colon, then a single space, then the property value.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Property values are directly followed by a semicolon, even if it's the last value in a selector.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Filesystem layout</h2>
|
||||
<section>
|
||||
<h3>How to name files</h3>
|
||||
<ol>
|
||||
|
||||
<li>
|
||||
<p>Works that are divided into larger parts (sometimes called "parts", "books", "volumes", "sections", etc.) have their part divisions contained in individual files named after the type of part, followed by a number starting at <code class="html">1</code>.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected"><code class="path">book-1.xhtml</code></p>
|
||||
<p class="corrected"><code class="path">book-2.xhtml</code></p>
|
||||
<p class="corrected"><code class="path">part-1.xhtml</code></p>
|
||||
<p class="corrected"><code class="path">part-2.xhtml</code></p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Works that are composed of chapters, short stories, essays, or other short- to medium-length sections have each of those sections in an individual file.</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Chapters <em>not</em> contained in separate volumes are named <code class="path">chapter-N.xhtml</code>, where <code class="path">N</code> is the chapter number starting at <code class="html">1</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Chapters contained in separate volumes, where the chapter number starts at 1 for each separate volume, are named <code class="path">chapter-X-N.xhtml</code>, where <code class="path">X</code> is the part number starting at <code class="html">1</code>, and <code class="path">N</code> is the chapter number <em>within the part</em>, starting at <code class="html">1</code>.</p>
|
||||
<figure class="text">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><p>Example</p></td>
|
||||
<td><p>Filename</p></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Part 1</td>
|
||||
<td><code class="path">part-1.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Chapter 1</td>
|
||||
<td><code class="path">chapter-1-1.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Chapter 2</td>
|
||||
<td><code class="path">chapter-1-2.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Chapter 3</td>
|
||||
<td><code class="path">chapter-1-3.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Part 2</td>
|
||||
<td><code class="path">part-2.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Chapter 1</td>
|
||||
<td><code class="path">chapter-2-1.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Chapter 2</td>
|
||||
<td><code class="path">chapter-2-2.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Chapter 3</td>
|
||||
<td><code class="path">chapter-2-3.xhtml</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Chapters contained in separate volumes, where the chapter number does not re-start at 1 in each volume, are named <code class="path">chapter-N.xhtml</code>, where <code class="path">N</code> is the chapter number, starting at <code class="html">1</code>.</p>
|
||||
<figure class="text">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><p>Example</p></td>
|
||||
<td><p>Filename</p></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Part 1</td>
|
||||
<td><code class="path">part-1.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Chapter 1</td>
|
||||
<td><code class="path">chapter-1.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Chapter 2</td>
|
||||
<td><code class="path">chapter-2.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Chapter 3</td>
|
||||
<td><code class="path">chapter-3.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Part 2</td>
|
||||
<td><code class="path">part-2.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Chapter 4</td>
|
||||
<td><code class="path">chapter-4.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Chapter 5</td>
|
||||
<td><code class="path">chapter-5.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Chapter 6</td>
|
||||
<td><code class="path">chapter-6.xhtml</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
</li>
|
||||
</ol>
|
||||
<li>
|
||||
<p>Files containing a short story, essay, or other short work in a larger collection, are named with the URL-safe title of the work, excluding any subtitles.</p>
|
||||
<figure class="text">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><p>Example</p></td>
|
||||
<td><p>Filename</p></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>A short story named "The Variable Man"</p></td>
|
||||
<td><code class="path">the-variable-man.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>A short story named "The Sayings of Limpang-Tung (The God of Mirth and of Melodious Minstrels)"</p></td>
|
||||
<td><code class="path">the-sayings-of-limpang-tung.xhtml</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Works that are composed of extremely short sections, like a volume of short poems, are in a single file containing all of those short sections. The filename is the URL-safe name of the work.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected"><code class="path">north-of-boston.xhtml</code></p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Frontmatter and backmatter sections have filenames that are named after the type of section, regardless of what the actual title of the section is.</p>
|
||||
<figure class="text">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><p>Example</p></td>
|
||||
<td><p>Filename</p></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>A preface titled "Note from the author"</p></td>
|
||||
<td><code class="path">preface.xhtml</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
<ol>
|
||||
<li>
|
||||
<p>If an ebook contains more than one section of the same type (for example multiple prefaces), the filename is followed by <code class="html">-N</code>, where <code class="html">N</code> is a number representing the order of the section, starting at <code class="html">1</code>.</p>
|
||||
<figure class="text">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><p>Example</p></td>
|
||||
<td><p>Filename</p></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>The first preface in an ebook, titled "Preface to the 1850 Edition"</p></td>
|
||||
<td><code class="path">preface-1.xhtml</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>The second preface in an ebook, titled "Preface to the Charles Dickens Edition"</p></td>
|
||||
<td><code class="path">preface-2.xhtml</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Semantic inflection</h2>
|
||||
<p>The epub spec allows for <a href="http://www.idpf.org/accessibility/guidelines/content/semantics/epub-type.php">semantic inflection</a>, which is a way of adding pertinent semantic metadata to certain elements. For example, you may want to convey that the contents of a certain <code class="html"><section></code> are actually a part of a chapter. You would do that by using the <code class="html">epub:type</code> attribute:</p>
|
||||
<figure>
|
||||
<code class="html"><section epub:type="chapter">...</section></code>
|
||||
</figure>
|
||||
<ol>
|
||||
<li>
|
||||
<p>The epub spec includes a <a href="http://www.idpf.org/epub/vocab/structure/">list of supported keywords</a> that you can use in the <code class="html">epub:type</code> attribute. Use this vocabulary first, even if other vocabularies contain the same keyword.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>If there's no appropriate keyword in the epub spec, next consult the <a href="http://www.daisy.org/z3998/2012/vocab/structure/">z3998 vocabulary</a>.</p>
|
||||
<p>Keywords using this vocabulary are preceded by the <code class="html">z3998</code> namespace.</p>
|
||||
<figure>
|
||||
<code class="html"><blockquote epub:type="z3998:letter">...</blockquote></code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>If the z3998 vocabulary doesn't have an appropriate keyword, next consult the <a href="/vocab/1.0">Standard Ebooks vocabulary</a>.</p>
|
||||
<p>Keywords using this vocabulary are preceded by the <code class="html">se</code> namespace.</p>
|
||||
<p>Unlike other vocabularies, the Standard Ebooks vocabulary is organized heirarchally. A complete vocabulary entry begins with the root vocabulary entry, with subsequent children separated by <code class="html">.</code>.</p>
|
||||
<figure>
|
||||
<code class="html">The <i epub:type="se:name.vessel.ship"><abbr class="initialism">HMS</abbr> Bounty</i>.</code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>The <code class="html">epub:type</code> attribute can have multiple keywords separated by spaces, even if the vocabularies are different.</p>
|
||||
<figure>
|
||||
<code class="html"><section epub:type="chapter z3998:letter">...</section></code>
|
||||
</figure>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
<section>
|
||||
<h2>General XHTML patterns</h2>
|
||||
<section>
|
||||
<h3>The id attribute</h3>
|
||||
<section>
|
||||
<h4>ids of <section>s</h4>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Each <code class="html"><section></code> has an <code class="html">id</code> attribute identical to the filename containing the <code class="html"><section></code>, without the trailing extension.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>In files containing multiple <code class="html"><section></code>s, each <code class="html"><section></code> has an <code class="html">id</code> attribute identical to what the filename <em>would</em> be if the section was in an individual file, without the trailing extension.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
<section>
|
||||
<h4>ids of other elements</h4>
|
||||
<p>Generally, elements that are not <code class="html"><section></code>s do not have an <code class="html">id</code> attribute. However an <code class="html">id</code> attribute might be necessary if a particular element is referenced in a link in a different location in the ebook; for example, if a certain paragraph is linked from an endnote.</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>If an element requires an <code class="html">id</code> attribute, the attribute's value is the name of the tag followed by <code class="path">-N</code>, where <code class="path">N</code> is the sequence number of the tag start at <code class="html">1</code>.</p>
|
||||
<figure class="corrected">
|
||||
<code class="html"><p>See <a href="#p-4">this paragraph</a> for more details.</p>
|
||||
<p>...</p>
|
||||
<p>...</p>
|
||||
<p id="p-4">...</p>
|
||||
<p>...</p></code>
|
||||
</figure>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
</section>
|
||||
<section>
|
||||
<h3><title> tags</h3>
|
||||
<ol>
|
||||
<li>
|
||||
<p>The <code class="html"><title></code> tag contains an appropriate description of the local file only. It does not contain the book title.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<section>
|
||||
<h4>Titles of files that are an individual chapter or part division</h4>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Convert chapter or part numbers that are in Roman numerals to decimal numbers. Do not convert other Roman numerals that may be in the chapter title.</p>
|
||||
<figure>
|
||||
<code class="html"><title>Chapter 10</title></code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>If a chapter or part has no subtitle, the <code class="html"><title></code> tag contains <code class="html">Chapter</code> followed by the chapter number.</p>
|
||||
<figure>
|
||||
<code class="html"><title>Chapter 4</title></code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>If a chapter or part has a subtitle, the <code class="html"><title></code> tag contains <code class="html">Chapter</code>, followed by the chapter number, followed by a colon and a single space, followed by the subtitle.</p>
|
||||
<figure>
|
||||
<code class="html"><title>Chapter 4: The Reign of Louis XVI</title></code>
|
||||
</figure>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
<section>
|
||||
<h4>Titles of files that are not chapter or part divisions</h4>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Files that are not a chapter or a part division, like a preface, introduction, or epigraph, have a <code class="html"><title></code> tag that contains the complete title of the section.</p>
|
||||
<figure>
|
||||
<code class="html"><title>Preface</title></code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>If a file contains a section with a subtitle, the <code class="html"><title></code> tag contains the title, followed by a colon and a single space, followed by the subtitle.</p>
|
||||
<figure>
|
||||
<code class="html"><title>Quevedo and His Works: With an Essay on the Picaresque Novel</title></code>
|
||||
</figure>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
</section>
|
||||
<section>
|
||||
<h3>Ordered/numbered and unordered lists</h3>
|
||||
<p>All <code class="html"><li></code> children of <code class="html"><ol></code> and <code class="html"><ul></code> tags have at least one direct child block-level tag. This is usually a <code class="html"><p></code> tag. (But not necessarily; for example, a <code class="html"><blockquote></code> tag might also be appropriate.)</p>
|
||||
<figure class="wrong">
|
||||
<code class="html"><ul>
|
||||
<li>Don’t forget to feed the pigs.</li>
|
||||
</ul></code>
|
||||
</figure>
|
||||
<figure class="corrected">
|
||||
<code class="html"><ul>
|
||||
<li>
|
||||
<p>Don’t forget to feed the pigs.</p>
|
||||
</li>
|
||||
</ul></code>
|
||||
</figure>
|
||||
</section>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Sectioning</h2>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Structural divisions in an ebook are each contained in their own <code class="html"><section></code> tag.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>In <code class="html"><section></code>s that have titles, the first child element is an <code class="html"><h#></code> or a <code class="html"><header></code> element containing the section's title.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Typically an epub is divided into many different files. However, these files must be "recomposable" into a single HTML file by the <code class="path">recompose-epub</code> tool.</p>
|
||||
<p>To achieve recomposability, individual files that contain subsections also contain all of the direct parent <code class="html"><section></code> tags, with <code class="html">id</code> and <code class="html">epub:type</code> attributes identical to those parents.</p>
|
||||
<p>For example, consider an ebook containing both a file named <code class="path">part-1.xhtml</code>, the first part, and a file named <code class="path">chapter-1-1.xhtml</code>, the first chapter of the first part. <code class="path">chapter-1-1.xhtml</code> contains a <code class="html"><section></code> element for <em>both</em> the parent part, <em>and</em> the actual chapter:</p>
|
||||
<figure class="corrected">
|
||||
<code class="html"><section id="part-1" epub:type="part">
|
||||
<section id="chapter-1-1" epub:type="chapter">
|
||||
<h3 epub:type="title z3998:roman">I</h3>
|
||||
...
|
||||
</section>
|
||||
</section></code>
|
||||
</figure>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Parts of an ebook and their order</h2>
|
||||
<section>
|
||||
<h3>Frontmatter</h3>
|
||||
<p>Frontmatter includes these parts of a book, in no particular order:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Titlepage: An SE template containing an image with the title, author, and translator.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Imprint: An SE template containing information about Standard Ebooks and links to the source transcription and scans used to produce this ebook.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Dedication: A dedication from the author.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Epigraph: An opening poem or quotation.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Acknowledgements: A list of people that the author wishes to thank.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Foreword: An introduction to the text, written by someone besides the author.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Preface: An introduction to the text but standing outside of the text itself, written by the author. Often describes how a book came into being or to establish the author's credentials. "About the book as a book."</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Introduction: An introduction to the text written, by the author. "About the content of the book."</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Prologue: An opening to the text that establishes setting or mood, usually in the voice of the text.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Note that in a Standard Ebooks ebook, the copyright page is part of the backmatter and not the frontmatter.</p>
|
||||
</section>
|
||||
<section>
|
||||
<h3>Backmatter</h3>
|
||||
<p>Backmatter includes these parts of a book, in no particular order:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Epilogue: A conclusion to the text, usually in the voice of the text..</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Afterword: A note from the author to conclude the text, outside of the text itself.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Endnotes: Any supplementary notes referenced in the text.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Colophon: A description of publishing details regarding the specific edition of the text, including credits or contributors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Copyright page: Usually considered frontmatter in print texts, but considered backmatter in Standard Ebooks ebooks.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h3>Ordering of sections</h3>
|
||||
<ol>
|
||||
<li>
|
||||
<p>The first section of an ebook is <code class="path">titlepage.xhtml</code>. This file is auto-generated by <code class="path">create-draft</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The second section of an ebook is <code class="path">imprint.xhtml</code>. The imprint contains links to the source transcription and scans used to produce the Standard Ebooks edition.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Any frontmatter relevant to the text follows.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>If there is frontmatter, then a half title page follows.</p>
|
||||
<section>
|
||||
<h4>Half title page patterns</h4>
|
||||
<p>The half title page contains the work title and subtitle.</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Half title pages without subtitles:</p>
|
||||
<figure>
|
||||
<code class="html full"><?xml version="1.0" encoding="UTF-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/, se: http://standardebooks.org/vocab/1.0" xml:lang="en-GB">
|
||||
<head>
|
||||
<title>Half Title</title>
|
||||
<link href="../css/core.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../css/local.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body epub:type="frontmatter">
|
||||
<section id="halftitlepage" epub:type="halftitlepage">
|
||||
<h1 epub:type="fulltitle">Don Quixote</h1>
|
||||
</section>
|
||||
</body>
|
||||
</html></code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Half title pages with subtitles:</p>
|
||||
<figure>
|
||||
<code class="css full">section[epub|type~="halftitlepage"] span[epub|type~="subtitle"]{
|
||||
display: block;
|
||||
font-size: .75em;
|
||||
font-weight: normal;
|
||||
}</code>
|
||||
<code class="html full"><?xml version="1.0" encoding="UTF-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/, se: http://standardebooks.org/vocab/1.0" xml:lang="en-GB">
|
||||
<head>
|
||||
<title>Half Title</title>
|
||||
<link href="../css/core.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../css/local.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body epub:type="frontmatter">
|
||||
<section id="halftitlepage" epub:type="halftitlepage">
|
||||
<h1 epub:type="fulltitle">
|
||||
<span epub:type="title">The Book of Wonder</span>
|
||||
<span epub:type="subtitle">A Chronicle of Little Adventures at the Edge of the World</span>
|
||||
</h1>
|
||||
</section>
|
||||
</body>
|
||||
</html></code>
|
||||
</figure>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<p>Bodymatter (the main text) follows the frontmatter and half title page.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>After the bodymatter, backmatter within the text follows, for example an afterword, epilogue, or conclusion.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Endnotes follow the text's backmatter. Endnotes files are named <code class="path">endnotes.xhtml</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The colophon follows.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The uncopyright page follows the colophon.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Headers</h2>
|
||||
<ol>
|
||||
<li>
|
||||
<p><code class="html"><h#></code> tags (i.e., <code class="html"><h1></code>–<code class="html"><h6></code>) are used for headers of sections that are structural divisions of a document.</p>
|
||||
<p><code class="html"><h#></code> tags <em>are not</em> used for headers of components that are not in the table of contents. For example, they would not be used to mark up the the title of a short poem in a chapter, where the poem itself is not a structural component of the larger ebook.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>A section containing an <code class="html"><h#></code> appears in the table of contents.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The book's title is implicitly at the <code class="html"><h1></code> level, even if not present in the ebook. Because of the implicit <code class="html"><h1></code>, all other sections begin at <code class="html"><h2></code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Each <code class="html"><h#></code> tag uses the correct number for the section's heading level in the overall book, <em>not</em> the section's heading level in the individual file.</p>
|
||||
<p>For example, given an ebook with a file named <code class="path">part-2.xhtml</code> containing:</p>
|
||||
<figure>
|
||||
<code class="html"><section id="part-2" epub:type="part">
|
||||
<h2 epub:type="title">Part <span epub:type="z3998:roman">II</span></h2>
|
||||
</section></code>
|
||||
</figure>
|
||||
<p>Consider this example for the file <code class="path">chapter-2-3.xhtml</code>:</p>
|
||||
<figure class="wrong">
|
||||
<code class="html"><section id="part-2" epub:type="part">
|
||||
<section id="chapter-2-3" epub:type="chapter">
|
||||
<h1 epub:type="title z3998:roman">III</h1>
|
||||
...
|
||||
</section>
|
||||
</section></code>
|
||||
</figure>
|
||||
<figure class="corrected">
|
||||
<code class="html"><section id="part-2" epub:type="part">
|
||||
<section id="chapter-2-3" epub:type="chapter">
|
||||
<h3 epub:type="title z3998:roman">III</h3>
|
||||
...
|
||||
</section>
|
||||
</section></code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Each <code class="html"><h#></code> tag has a direct parent <code class="html"><section></code> tag.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<section>
|
||||
<h3>Header HTML patterns</h3>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Sections without titles:</p>
|
||||
<figure class="corrected">
|
||||
<code class="html"><h2 epub:type="title z3998:roman">XI</h2></code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Sections with titles but no ordinal (i.e. chapter) numbers:</p>
|
||||
<figure class="corrected">
|
||||
<code class="html"><h2 epub:type="title">A Daughter of Albion</h2></code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Sections with titles and ordinal (i.e. chapter) numbers:</p>
|
||||
<figure>
|
||||
<code class="css full">span[epub|type~="subtitle"]{
|
||||
display: block;
|
||||
font-weight: normal;
|
||||
}</code>
|
||||
<code class="html full"><h2 epub:type="title">
|
||||
<span epub:type="z3998:roman">XI</span>
|
||||
<span epub:type="subtitle">Who Stole the Tarts?</span>
|
||||
</h2></code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Sections titles and subtitles but no ordinal (i.e. chapter) numbers:</p>
|
||||
<figure>
|
||||
<code class="css full">span[epub|type~="subtitle"]{
|
||||
display: block;
|
||||
font-weight: normal;
|
||||
}</code>
|
||||
<code class="html full"><h2 epub:type="title">
|
||||
<span>An Adventure</span>
|
||||
<span epub:type="subtitle">(A Driver’s Story)</span>
|
||||
</h2></code>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Sections that require titles, but that are not in the table of contents:</p>
|
||||
<figure>
|
||||
<code class="css full">header{
|
||||
font-variant: small-caps;
|
||||
margin: 1em;
|
||||
text-align: center;
|
||||
}</code>
|
||||
<code class="html full"><header>
|
||||
<p>The Title of a Short Poem</p>
|
||||
</header></code>
|
||||
</figure>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
Play CSS:
|
||||
|
||||
|
||||
[epub|type~="z3998:drama"]{
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
[epub|type~="z3998:drama"] tr:first-child td{
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
[epub|type~="z3998:drama"] tr:last-child td{
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
[epub|type~="z3998:drama"] td{
|
||||
vertical-align: top;
|
||||
padding: .5em;
|
||||
}
|
||||
|
||||
[epub|type~="z3998:drama"] td:last-child{
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
[epub|type~="z3998:drama"] td:first-child{
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
[epub|type~="z3998:drama"] td[epub|type~="z3998:persona"]{
|
||||
hyphens: none;
|
||||
text-align: right;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
[epub|type~="z3998:drama"] td p{
|
||||
text-indent: 0;
|
||||
}
|
||||
|
||||
table[epub|type~="z3998:drama"],
|
||||
[epub|type~="z3998:drama"] table{
|
||||
margin: 1em auto;
|
||||
}
|
||||
|
||||
[epub|type~="z3998:stage-direction"]{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
[epub|type~="z3998:stage-direction"]::before{
|
||||
content: "(";
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
[epub|type~="z3998:stage-direction"]::after{
|
||||
content: ")";
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
[epub|type~="z3998:persona"]{
|
||||
font-variant: all-small-caps;
|
||||
}
|
||||
|
||||
</section>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
324
www/contribute/metadata.php
Normal file
|
@ -0,0 +1,324 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['Metadata Manual' => 'title', 'js' => true, 'highlight' => 'contribute', 'description' => 'The Standard Ebooks Metadata Manual, containing requirements and directives for the epub metadata file.']) ?>
|
||||
<main>
|
||||
<article>
|
||||
<h1>Metadata Manual</h1>
|
||||
<aside class="alert">
|
||||
<p>Standard Ebooks is a brand-new project—this manual is a pre-alpha, and much of it is incomplete. If you have a question, need clarification, or run in to an issue not yet covered here, please <a href="https://groups.google.com/forum/#!forum/standardebooks">contact us</a> so we can update this manual.</p>
|
||||
</aside>
|
||||
<h2>General principles</h2>
|
||||
<p>Metadata in a Standard Ebooks epub is stored in the <code class="path">./src/epub/content.opf</code> file. The file contains some boilerplate that you won’t have to touch, and a lot of information that you <em>will</em> have to touch as you produce your ebook.</p>
|
||||
<p>You should follow the general structure of the <code class="path">content.opf</code> file present in the tools <code class="path">./templates/</code> directory. Don't rearrange the order of anything in there and you should be fine.</p>
|
||||
<h2>The <code class="html"><dc:identifier></code> element</h2>
|
||||
<p>The <code class="html"><dc:identifier></code> element contains the unique identifier for this ebook. That identifier is always the Standard Ebooks URL for that ebook, prefaced by <code class="html">url:</code>.</p>
|
||||
<figure>
|
||||
<code class="html"><dc:identifier id="uid">url:https://standardebooks.org/ebooks/anton-chekhov/short-fiction/constance-garnett</dc:identifier></code>
|
||||
</figure>
|
||||
<h3>Forming the SE identifier</h3>
|
||||
<p>The SE identifier is formed by the following algorithm. A string can be made URL-safe using the <code class="program">make-url-safe</code> tool.</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Start with the URL-safe author of the work, as it appears on the titlepage. If there is more than one author, continue appending subsequent URL-safe authors, separated by an underscore. Do not alpha-sort the author name.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Append a forward slash, then the URL-safe title of the work. Again, do not alpha-sort the title.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>If the work is translated, append a forward slash, then the URL-safe translator. If there is more than one translator, continue appending subsequent URL-safe translators, separated by an underscore. Do not alpha-sort translator names.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>If the work is illustrated, append a foreward slash, then the URL-safe illustrator. If there is more than one illustrator, continue appending subsequent URL-safe illustrators, separated by an underscore. Do not alpha-sort illustrator names.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Finally, <em>do not</em> append a trailing forward slash.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<h2>The <code class="html"><dc:date></code>, <code class="html"><meta property="dcterms:modified"></code>, and <code class="html"><meta property="se:revision-number"></code> elements</h2>
|
||||
<p>There are several elements in the metadata describing the publication date, updated date, and revision number of the ebook. Generally you don’t have to update these by hand; instead, use the <code class="program">prepare-release</code> tool to update them automatically both in <code class="path">content.opf</code> and in <code class="path">colophon.xhtml</code>.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code class="html"><dc:date></code> is a timestamp representing the first publication date of this ebook file. Once the ebook is released to the public, this value doesn’t change.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="html"><meta property="dcterms:modified"></code> is a timestamp representing the last time this ebook file was modified. This changes often.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="html"><meta property="se:revision-number"></code> is a special SE extension representing the revision number of this ebook file. During production, this number will be 0. When the ebook is first released to the public, the number will increment to 1. Each time <code class="html"><meta property="dcterms:modified"></code> changes, the revision number must be incremented.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>The ebook title</h2>
|
||||
<p>Usually titles are fairly easy to represent with the <code class="html"><dc:title></code> element.</p>
|
||||
<h3>Books without subtitles</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Add a <code class="html"><dc:title></code> element to contain the title.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Add an accompanying <code class="html">file-as</code> element with the title alpha-sorted, even if the <code class="html">file-as</code> value is the same as the title.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>These examples shows how to mark up a simple title like <i><a href="/ebooks/abraham-merritt/the-moon-pool">The Moon Pool</a></i> or <i><a href="/ebooks/anton-chekhov/short-fiction/constance-garnett">Chekhov’s Short Fiction</a></i>.</p><code class="html full"><dc:title id="title">The Moon Pool</dc:title> <meta property="file-as" refines="#title">Moon Pool, The</meta></code> <code class="html full"><dc:title id="title">Short Fiction</dc:title> <meta property="file-as" refines="#title">Short Fiction</meta></code>
|
||||
<h3>Books with subtitles</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Add a <code class="html"><meta property="title-type"></code> element with the value of <code class="html">main</code> to identify the main part of the title.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Add a second <code class="html"><dc:title></code> element to contain the subtitle, and refine it with <code class="html"><meta property="title-type"></code> set to <code class="html">subtitle</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Add a third <code class="html"><dc:title></code> element to contain the complete title on one line, with the main title and subtitle separated by a colon and space. Refine it with <code class="html"><meta property="title-type"></code> set to <code class="html">extended</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>All three of these <code class="html"><dc:title></code> elements must have an accompanying <code class="html">file-as</code> element, even if the <code class="html">file-as</code> value is the same as the title.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>This example shows how to mark up <i><a href="/ebooks/g-k-chesterton/the-man-who-was-thursday">The Man Who Was Thursday: A Nightmare</a></i>.</p><code class="html full"><dc:title id="title">The Man Who Was Thursday</dc:title> <meta property="file-as" refines="#title">Man Who Was Thursday, The</meta> <meta property="title-type" refines="#title">main</meta> <dc:title id="subtitle">A Nightmare</dc:title> <meta property="file-as" refines="#subtitle">Nightmare, A</meta> <meta property="title-type" refines="#subtitle">subtitle</meta> <dc:title id="fulltitle">The Man Who Was Thursday: A Nightmare</dc:title> <meta property="file-as" refines="#fulltitle">Man Who Was Thursday, The</meta> <meta property="title-type" refines="#fulltitle">extended</meta></code>
|
||||
<h3>Books with a more popularly-known alternative title</h3>
|
||||
<p>Some books are commonly referred to by a shorter name than their actual title. For example, <i><a href="/ebooks/mark-twain/the-adventures-of-huckleberry-finn">The Adventures of Huckleberry Finn</a></i> is often simply known as <i>Huck Finn</i>.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Add an additional <code class="html"><dc:title></code> element to contain the common title, and refine it with <code class="html"><meta property="title-type"></code> set to <code class="html">short</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Do not include a <code class="html">file-as</code> element for the short title.</p>
|
||||
</li>
|
||||
</ul><code class="html full"><dc:title id="title-short">Huck Finn</dc:title> <meta property="title-type" refines="#title-short">short</meta></code>
|
||||
<h2>Ebook subjects</h2>
|
||||
<p>The <code class="html"><dc:subject></code> elements allow us to categorize the ebook. We use the Library of Congress categories assigned to the book for this purpose.</p>
|
||||
<p>If you’re working on a book that has a Project Gutenberg transcription, you can almost always find these categorizations in the ebook’s “bibrec” tab, saving you effort.</p>
|
||||
<p>If your ebook doesn’t have a Project Gutenberg page, then you can search the <a href="https://catalog.loc.gov">Library of Congress catalog</a> to find the categories for your ebook.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Each <code class="html"><dc:subject></code> has the <code class="html">id</code> attribute set to <code class="html">subject-#</code>, where # is a number starting at 1, without leading zeros, that increments with each subject.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Arrange the <code class="html"><dc:subject></code> elements sequentially in a block.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>After the block of <code class="html"><dc:subject></code> elements, include a block of <code class="html"><meta property="meta-auth"></code> elements with values representing the URL at which you found the categorizations for each individual subject.</p>
|
||||
<p>For example, if we found the Library of Congress categories for an ebook at the Project Gutenberg ebook’s “bibrec” tab, then you would use the URL of the Project Gutenberg ebook.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The <code class="html"><meta property="meta-auth"></code> element must refine each individual <code class="html"><dc:subject></code> element, even if the URL is the same for all of them.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>This example shows how to mark up the subjects for <i><a href="/ebooks/david-lindsay/a-voyage-to-arcturus">A Voyage to Arcturus</a></i>:</p><code class="html full"><dc:subject id="subject-1">Science fiction</dc:subject> <dc:subject id="subject-2">Psychological fiction</dc:subject> <dc:subject id="subject-3">Quests (Expeditions) -- Fiction</dc:subject> <dc:subject id="subject-4">Life on other planets -- Fiction</dc:subject> <meta property="meta-auth" refines="#subject-1">https://www.gutenberg.org/ebooks/1329</meta> <meta property="meta-auth" refines="#subject-2">https://www.gutenberg.org/ebooks/1329</meta> <meta property="meta-auth" refines="#subject-3">https://www.gutenberg.org/ebooks/1329</meta> <meta property="meta-auth" refines="#subject-4">https://www.gutenberg.org/ebooks/1329</meta></code>
|
||||
<h2>SE subjects</h2>
|
||||
<p>Along the Library of Congress categories, we include a custom list of SE subjects in the ebook metadata. Unlike Library of Congress categories, SE subjects are purposefully broad. They’re more like subject categories you’d find a medium-sized bookstore, as opposed to the precise, detailed, heirarchal Library of Congress categories.</p>
|
||||
<p>It’s your task to select appropriate SE subjects for your ebook. Usually just one or two of these categories will suffice.</p>
|
||||
<p>If you strongly feel like your book deserves a new category, please contact us to discuss it.</p>
|
||||
<p>Below is a list of all of the recognized SE subjects:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code class="tag">Adventure</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Autobiography</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Childrens</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Comedy</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Fantasy</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Fiction</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Horror</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Memoir</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Mystery</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Nonfiction</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Philosophy</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Poetry</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Satire</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Science Fiction</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Shorts</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Spirituality</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="tag">Travel</code></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Required subjects for specific kinds of ebooks</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Ebooks that are collections of short stories must have the SE subject <code class="tag">Shorts</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Ebooks that are young adult or children’s books must have the SE subject <code class="tag">Childrens</code>.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Ebook descriptions</h2>
|
||||
<p>An ebook has two kinds of descriptions: a short <code class="html"><dc:description></code> element, and a much longer <code class="html"><meta property="se:long-description"></code> element.</p>
|
||||
<h3>The short description</h3>
|
||||
<p>The <code class="html"><dc:description></code> element contains a short, single-sentence summary of the ebook.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>The description must be a single complete sentence ending in a period, not a sentence fragment or restatment of the title. Do not use more than one sentence.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The description must be typogrified, i.e. it must contain Unicode curly quotes, em-dashes, and the like.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>The long description</h3>
|
||||
<p>The <code class="html"><meta property="se:long-description"></code> element contains a much longer description of the ebook.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>The long description must be a non-biased, encyclopedia-like description of the ebook, including any relevant publication history, backstory, or historical notes. It must be as detailed as possible, without giving away plot spoilers. It must not impart the producer’s opinions of the book. Think along the lines of a Wikipedia-like summary of the book and its history, <em>but under no circumstances can you copy and paste from Wikipedia!</em></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The long descriptions must be typogrified, i.e. it must contain Unicode curly quotes, em-dashes, and the like.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The long description must be in <em>escaped</em> HTML, with the HTML beginning on its own line after the <code class="html"><meta property="se:long-description"></code> element.</p>
|
||||
<p>An easy way to escape your HTML is to compose your long description in regular HTML, then insert it into the <code class="html"><meta property="se:long-description"></code> element surrounded by a <code class="html"><![CDATA[ ... ]]></code> element. Once you’re done, run the <code class="path">clean</code> tool, which will remove the <code class="html"><![CDATA[ ... ]]></code> element and escape the contained HTML for you.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Include the following element directly after the long description: <code class="html"><meta property="meta-auth" refines="#long-description">https://standardebooks.org</meta></code></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>The <code class="html"><dc:language></code> element</h2>
|
||||
<p>The <code class="html"><dc:language></code> element follows the long description block. It contains the IETF language tag for the language that the work is in. Usually this is either <code class="ietf">en-US</code> or <code class="ietf">en-GB</code>.</p>
|
||||
<h2>The <code class="html"><dc:source></code> elements</h2>
|
||||
<p>The <code class="html"><dc:source></code> elements represent URLs to sources for both the transcription we based this ebook off of, and page scans of the print sources used to correct or work on the transcriptions.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Where possible, these URLs should use https.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>A Standard Ebooks ebook typically contains more than one <code class="html"><dc:source></code> element, and can contain more than one such element if multiple sources for page scans were used.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>The <code class="html"><meta property="se:production-notes"></code> elements</h2>
|
||||
<p>This element can be used by the ebook producers to convey production notes relevant to the production process. For example, a producer might note that page scans were not available, so an editorial decision was made to add commas to sentences deemed to be transcription typos.</p>
|
||||
<p>If there are no production notes, remove this element.</p>
|
||||
<h2>The <code class="html"><meta property="se:word-count"></code> and <code class="html"><meta property="se:reading-ease.flesch"></code> elements</h2>
|
||||
<p>These elements are automatically computed by the <code class="program">prepare-release</code> tool. Don’t compute them by hand.</p>
|
||||
<h2>SE-specific metadata for the ebook</h2>
|
||||
<p>Next, Standard Ebooks also includes two additional custom metadata items about the ebook:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p><code class="html"><meta property="se:url.encyclopedia.wikipedia"></code> contains the Wikipedia URL for this ebook. If there isn’t one, remove this element.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="html"><meta property="se:url.vcs.github"></code> contains the GitHub URL for this ebook. This is calculated by taking the string “https://github.com/standardebooks/” and appending the ebook identifier (calculated above), without “https://standardebooks.org/ebooks/”, and with forward slashes replaced by underscores.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<h2>Author metadata</h2>
|
||||
<p>Next, we include the author metadata block.</p>
|
||||
<p>The author metadata block always has the ID of “author”. If there is more than one author, the first author is “author-1”, the second “author-2”, and so on. Each block of the following, in this order:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p><code class="html"><dc:creator id="author"></code>: the author’s name as it appears on the cover.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="html"><meta property="file-as" refines="#author"></code>: the author’s name as filed alphabetically. Include this even if it’s identical to <code class="html"><dc:creator></code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="html"><meta property="se:name.person.full-name" refines="#author"></code>: the author’s full name, with any initials or middle names expanded. If this is identical to <code class="html"><dc:creator></code>, remove this element.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="html"><meta property="alternate-script" refines="#author"></code>: the author’s name as it appears on the cover, but transliterated into their native alphabet if applicable. For example, Anton Chekhov’s name would be contained here in the Cyrillic alphabet. Remove this element if not applicable.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="html"><meta property="se:url.encyclopedia.wikipedia" refines="#author"></code>: the URL of the author’s Wikipedia page. Remove this element if not applicable.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="html"><meta property="se:url.authority.nacoaf" refines="#author"></code>: the URL of the author’s Library of Congress Names Database page.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>This is easily found by visiting the person’s Wikipedia page and looking at the very bottom in the “Authority Control” section, under “LCCN”.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>If you can’t find it in Wikipedia, you can find it directly by visiting <a href="http://id.loc.gov/authorities/names.html">http://id.loc.gov/authorities/names.html</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Note that the canonical URLs <em>do not</em> include a trailing <code class="path">.html</code> (the LoC site performs a silent redirect when you load it to append <code class="path">.html</code> to the URL it considers canonical). Remove this element if not applicable.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="html"><meta property="role" refines="#author" scheme="marc:relators"></code>: the <a href="http://www.loc.gov/marc/relators/relacode.html">MARC relator tag</a> for the roles the author played in creating this book. You will always have one element with the value of <code class="marc">aut</code>. You can have additional elements for additional values, if applicable. For example, if the author also illustrated the book, you would include an additional element with the value of <code class="marc">ill</code>.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<h3>An example of a complete author metadata block</h3><code class="html full"><dc:creator id="author">Anton Chekhov</dc:creator> <meta property="file-as" refines="#author">Chekhov, Anton</meta> <meta property="se:name.person.full-name" refines="#author">Anton Pavlovich Chekhov</meta> <meta property="alternate-script" refines="#author">Анто́н Па́влович Че́хов</meta> <meta property="se:url.encyclopedia.wikipedia" refines="#author">https://en.wikipedia.org/wiki/Anton_Chekhov</meta> <meta property="se:url.authority.nacoaf" refines="#author">http://id.loc.gov/authorities/names/n79130807</meta> <meta property="role" refines="#author" scheme="marc:relators">aut</meta></code>
|
||||
<h2>Translator metadata</h2>
|
||||
<p>If the work is translated, the translator metadata block follows.</p>
|
||||
<p>The translator metadata block always has the ID of “translator”. If there is more than one translator, the first translator is “translator-1”, the second “translator-2”, and so on. Each block is identical to the author metadata block, but using <code class="html"><dc:contributor id="translator"></code> instead of <code class="html"><dc:creator></code>. The <a href="http://www.loc.gov/marc/relators/relacode.html">MARC relator tag</a> will be <code class="marc">trl</code>. Translators often annotate the work; if this is the case, also include the <a href="http://www.loc.gov/marc/relators/relacode.html">MARC relator tag</a> <code class="marc">ann</code>.</p>
|
||||
<h2>Illustrator metadata</h2>
|
||||
<p>If the work is illustrated by a person who is not the author, the illustrator metadata block follows.</p>
|
||||
<p>The illustrator metadata block always has the ID of “illustrator”. If there is more than one author, the first illustrator is “illustrator-1”, the second “illustrator-2”, and so on. Each block is identical to the author metadata block, but using <code class="html"><dc:contributor id="illustrator"></code> instead of <code class="html"><dc:creator></code>. The <a href="http://www.loc.gov/marc/relators/relacode.html">MARC relator tag</a> will be <code class="marc">ill</code>.</p>
|
||||
<h2>Cover artist metadata</h2>
|
||||
<p>The cover artist metadata block follows.</p>
|
||||
<p>The cover artist metadata block always has the ID of “artist”. Each block is identical to the author metadata block, but using <code class="html"><dc:contributor id="artist"></code> instead of <code class="html"><dc:creator></code>. The <a href="http://www.loc.gov/marc/relators/relacode.html">MARC relator tag</a> will be <code class="marc">art</code>.</p>
|
||||
<h2>Transcriber metadata</h2>
|
||||
<p>If you based this ebook on a transcription by someone else, like Project Gutenberg, then transcriber blocks follow. The first transcriber is “transcriber-1”, the second “transcriber-2”, and so on. Usually, trancribers only have the following two elements:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p><code class="html"><meta property="file-as" refines="#transcriber-1"></code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="html"><meta property="role" refines="#transcriber-1" scheme="marc:relators"></code> with the value of <code class="marc">trc</code>.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<h2>Producer metadata</h2>
|
||||
<p>This block is for information about you, the producer of this Standard Ebook. It contains the same type of elements as the author block, but with <code class="html"><dc:contributor id="producer-1"></code>.</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>You can include the <code class="html"><meta property="se:url.homepage" refines="#producer-1"></code> element with a link to your personal homepage. This must be a link to a personal homepage only; no products, services, or other endorsements, commercial or otherwise.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Your MARC relator roles will usually be the following:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code class="marc">bkp</code>: you are the producer of this ebook.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="marc">blw</code>: you wrote the blurb (the long description).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="marc">cov</code>: you selected the cover art.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="marc">mrk</code>: you wrote HTML markup for this ebook.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="marc">pfr</code>: you proofread the ebook.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="marc">tyg</code>: you reviewed the typography of the ebook.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<h2>The <code class="html"><manifest></code> element</h2>
|
||||
<p>The <code class="html"><manifest></code> element is a required part of the epub spec. This should usually be generated by the <code class="program">print-manifest-and-spine</code> tool and copy-and-pasted into the <code class="path">content.opf</code> file. It must be in alphabetical order, which is handled for you by the <code class="program">print-manifest-and-spine</code> tool.</p>
|
||||
<h2>The <code class="html"><spine></code> element</h2>
|
||||
<p>The <code class="html"><spine></code> element is a required part of the epub spec that defines the reading order of the files in the ebook. You can use the <code class="program">print-manifest-and-spine</code> tool to generate a draft of the spine. The tool makes a best guess as to the spine order, but it cannot be 100% correct; please review the output and adjust the reading order accordingly.</p>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
36
www/contribute/producers.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'Producing an ebook for Standard Ebooks', 'highlight' => 'contribute', 'description' => 'A high-level outline of the process of producing an ebook for the Standard Ebooks project.']) ?>
|
||||
<main>
|
||||
<article>
|
||||
<h1>Producing an ebook for Standard Ebooks</h1>
|
||||
<p>Our tools and processes are all open source, so anyone with the right technical and editorial knowledge can produce a new Standard Ebooks ebook!</p>
|
||||
<p>Here’s what the process of getting an ebook on Standard Ebooks looks like.</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Review the <a href="/contribute/accepted-ebooks">kinds of ebooks we do and don’t accept</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Find a good first production in our <a href="/contribute/wanted-ebooks">Wanted Ebooks list</a>, or if there’s nothing there that interests you, find a straightforward book of no longer than about 40–60,000 words, without much complex formatting like poetry, letters, diagrams, or illustrations. After your first production, you can move on to working on longer or more complex works.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Contact the <a href="https://groups.google.com/forum/#!forum/standardebooks">Standard Ebooks mailing list</a> to pitch the ebook you’ve selected, <em>before you begin production</em>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Carefully review the entirety of the Standard Ebooks <a href="/contribute/typography">Typography Manual</a>, <a href="/contribute/semantics">Semantics Manual</a>, and <a href="/contribute/metadata">Metadata Manual</a>.</p>
|
||||
<li>
|
||||
<p>Once we’ve OK’d your selection and you’ve read the style manuals, you can get started! Follow the steps in our <a href="/contribute/producing-an-ebook-step-by-step">step-by-step guide to producing an ebook</a> to take your ebook from start to finish.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Once you’ve finished your ebook and completed a complete cover-to-cover proofread, contact the <a href="https://groups.google.com/forum/#!forum/standardebooks">Standard Ebooks mailing list</a> and we’ll assign a reviewer to review your work.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Most first productions have a significant amount of errors. Not to worry! Once you've fixed them, contact the mailing list again.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Your ebook will be released! Congratulations, and now it's time for others to enjoy the fruits of your hard work!</p>
|
||||
</li>
|
||||
</ol>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
411
www/contribute/producing-an-ebook-step-by-step.php
Normal file
|
@ -0,0 +1,411 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'Producing an Ebook, Step by Step', 'js' => true, 'highlight' => 'contribute', 'description' => 'A detailed step-by-step description of the complete process of producing an ebook for the Standard Ebooks project, start to finish.']) ?>
|
||||
<main>
|
||||
<article id="producing-an-ebook">
|
||||
<h1>Producing an Ebook, Step by Step</h1>
|
||||
<aside class="alert">
|
||||
<p>Our tools are GNU/Linux-based, and producing an ebook from scratch currently requires working knowledge of the epub file format and of Unix-like systems like Mac or Linux.</p>
|
||||
<p>Our toolset doesn’t yet work natively on Windows, but there are <a href="https://www.howtogeek.com/170870/5-ways-to-run-linux-software-on-windows/">many ways to run Linux from within Windows</a>.</p>
|
||||
<p>If you don’t have this kind of technical expertise, you can still contribute! <a href="/contribute/">Check out our contributors page for details.</a></p>
|
||||
</aside>
|
||||
<p>This guide is meant to take you step-by-step through the creation of a complete Standard Ebook. While it might seem a little long, most of the text is a description of how to use various automated scripts. It can take just an hour or two for an experienced producer to produce a draft ebook for proofreading (depending on the complexity of the ebook, of course).</p>
|
||||
<ol class="full">
|
||||
<li>
|
||||
<h2>Download and set up the Standard Ebooks production tools</h2>
|
||||
<p>The Standard Ebooks project has a series of tools that will help you produce an ebook. You can <a href="https://github.com/standardebooks/tools">download them at Github</a>:</p><code class="terminal"><span>cd ~/</span> <span>git clone https://github.com/standardebooks/tools.git</span></code>
|
||||
<p>Check the <code class="path">README.md</code> file for instructions on how to install the few dependencies the tools require.</p>
|
||||
<p>We’ll assume you’ve installed the SE tools to <code class="path">~/tools/</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Select an ebook to produce</h2>
|
||||
<p>The best place to look for public domain ebooks to produce is <a href="https://www.gutenberg.org">Project Gutenberg</a>. If downloading from Gutenberg, be careful of the following:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>There may be different versions of the same publication on Gutenberg, and <em>the best one might not be the one with the most downloads</em>. In particular, there could be a better translation that has fewer downloads because it was produced later, or there could be a version with better HTML markup. A great example of this phenomenon is the Gutenberg version of <i>20,000 Leagues Under the Seas</i>. The most-downloaded version is an <a href="https://www.gutenberg.org/ebooks/164" rel="nofollow">old translation widely criticized as being slapdash and inaccurate</a>. The less popular version is a <a href="https://www.gutenberg.org/ebooks/2488">fresh, modern translation dedicated to the public domain</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Gutenberg usually offers both an HTML version and an epub version of the same ebook. Note that <em>one is not always exactly the same as the other!</em> A casual reader might assume that the HTML version is generated from the epub version, or the other way around; but for some reason the HTML and epub versions often differ in important ways, with the HTML version typically using fewer useless CSS classes, and including <code class="html"><em></code> tags that the epub version is often missing.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Picking either the HTML or the epub version is fine as a starting point, but make sure to pick the one that appears to be the most accurate.</p>
|
||||
<p>For this guide, we’ll use <i>The Strange Case of Dr. Jekyll and Mr. Hyde</i>, by Robert Louis Stevenson. If you search for it on Gutenberg, you’ll find that there are two versions; the <a href="https://www.gutenberg.org/ebooks/42" rel="nofollow">most popular one</a> is a poor choice to produce, because the transcriber included the page numbers smack in the middle of the text! What a pain those’d be to remove. The <a href="https://www.gutenberg.org/ebooks/43">less popular one</a> is a better choice to produce, because it’s a cleaner transcription.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Locate page scans of your book online</h2>
|
||||
<p>As you produce your book, you’ll want to check your work against the actual page scans. Often the scans contain formatting that is missing from the source transcription. For example, older transcriptions sometimes throw away italics entirely, and you’d never know unless you looked at the page scans. So finding page scans is essential.</p>
|
||||
<p>Below are some good sources for page scans:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="https://archive.org">The Internet Archive</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.hathitrust.org">The HathiTrust Digital library</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://books.google.com">Google Books</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Each of those sources allows you to filter results by publication date, so make sure you select 1922 and earlier to ensure they’re in the US public domain.</p>
|
||||
<p>If you can’t find scans of your book at the above sources, and you’re using a Project Gutenberg transcription as source material, there’s a good chance that PGDP (the sister project of Project Gutenberg that does the actual transcriptions) <a href="https://www.pgdp.org/ols/">has a copy of the scans they used accessible in their archives</a>. You should only use the PGDP archives as a last resort; because their scans are not searchable, verifying typos becomes extremely time-consuming.</p>
|
||||
<p>Please keep the following important notes in mind when searching for page scans:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Make sure the scans you find are <em>published in 1922 or earlier.</em> You <em>must verify the copyright page in the page scans</em> before proceeding.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Often you’ll find different editions, published at different times by different publishers, for the same book. It’s worth the effort to quickly browse through each different one to get an idea of the kinds of changes the different publishers introduced. Maybe one edition is better than another!</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>You’ll enter a link to the page scans you used in the <code class="path">content.opf</code> metadata as a <code class="html"><dc:source></code> element.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Create a Standard Ebooks epub skeleton</h2>
|
||||
<p>An epub file is just a bunch of files arranged in a particular folder structure, then all zipped up. That means editing an epub file is as easy as editing a bunch of text files within a certain folder structure, then creating a zip file out of that folder.</p>
|
||||
<p>You can’t just arrange files willy-nilly, though—the epub standard expects certain files in certain places. So once you’ve picked a book to produce, create the basic epub skeleton in a working directory. The <code class="program">create-draft</code> tool will create a basic Standard Ebooks epub folder structure, initialize a <code class="program">git</code> repository within it, and prefill a few fields in <code class="path">content.opf</code> (the file that contains the ebook’s metadata).</p>
|
||||
<ol>
|
||||
<li>
|
||||
<h3>With the <code class="program">--gutenberg-ebook-url</code> option</h3>
|
||||
<p>You can pass the <code class="program">create-draft</code> tool the URL for the Project Gutenberg ebook, and the tool will try to download the ebook into <code class="path">./src/epub/text/body.xhtml</code> and prefill a lot of metadata for you:</p><code class="terminal"><span>~/tools/create-draft --author="Robert Louis Stevenson" --title="The Strange Case of Dr. Jekyll and Mr. Hyde" --gutenberg-ebook-url="https://www.gutenberg.org/ebooks/43"</span> <span>cd robert-louis-stevenson_the-strange-case-of-dr-jekyll-and-mr-hyde/</span></code>
|
||||
<p>Because Project Gutenberg ebooks are produced in different ways by different people, <code class="program">create-draft</code> has to make some guesses and it might guess wrong. Make sure to carefully review the data it prefills into <code class="path">./src/epub/text/body.xhtml</code>, <code class="path">./src/epub/text/colophon.xhtml</code>, and <code class="path">./src/epub/content.opf</code>.</p>
|
||||
<p>In particular, make sure that the Project Gutenberg license is stripped from <code class="path">./src/epub/text/body.xhtml</code>, and that the original transcribers in <code class="path">./src/epub/text/colophon.xhtml</code> and <code class="path">./src/epub/content.opf</code> are presented correctly.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h3>Without the <code class="program">--gutenberg-ebook-url</code> option</h3>
|
||||
<p>If you prefer to do things by hand, that’s an option too.</p><code class="terminal"><span>~/tools/create-draft --author="Robert Louis Stevenson" --title="The Strange Case of Dr. Jekyll and Mr. Hyde"</span> <span>cd robert-louis-stevenson_the-strange-case-of-dr-jekyll-and-mr-hyde/</span></code>
|
||||
<p>Now that we have the skeleton up, we’ll download Gutenberg’s HTML file for <i>Jekyll</i> directly into <code class="path">text/</code> folder and name it <code class="path">body.xhtml</code>.</p><code class="terminal"><span>wget -O src/epub/text/body.xhtml https://www.gutenberg.org/files/43/43-h/43-h.htm</span></code>
|
||||
<p>Many Gutenberg books were produced before UTF-8 became a standard, so we may have to convert to UTF-8 before we start work. First, check the encoding of the file we just downloaded. (Mac OS users, try <code class="program">file -I</code>.)</p><code class="terminal"><span>file -bi src/epub/text/body.xhtml</span></code>
|
||||
<p>The output is <code class="program">text/html; charset=iso-8859-1</code>. That’s the wrong encoding!</p>
|
||||
<p>We can convert that to UTF-8 with <code class="program">iconv</code>:</p><code class="terminal"><span>iconv --from-code="ISO-8859-1" --to-code="UTF-8" < src/epub/text/body.xhtml > src/epub/text/tmp</span> <span>mv src/epub/text/tmp src/epub/text/body.xhtml</span></code>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Do a rough cleanup of the source text and perform the first commit</h2>
|
||||
<p>If you inspect the folder we just created, you’ll see it looks something like this:</p>
|
||||
<figure>
|
||||
<img alt="A tree view of a new Standard Ebooks draft folder" src="/images/epub-draft-tree.png">
|
||||
</figure>
|
||||
<p>You can <a href="/contribute/a-basic-standard-ebooks-source-folder">learn more about what the files in a basic Standard Ebooks source folder are all about</a> before you continue.</p>
|
||||
<p>Now that we’ve got the source text, we have to do some very broad cleanup before we perform our first commit:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Remove the header markup and everything, including any Gutenberg text and the work title, up to the beginning of the actual public domain text. We’ll add our own header markup to replace what we’ve removed later.</p>
|
||||
<p><i>Jekyll</i> doesn’t include front matter like an epigraph or introduction; if it did, that sort of stuff would be left in, since it’s part of the main text.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>This edition of <i>Jekyll</i> includes a table of contents; remove that too. Standard Ebooks uses the <abbr class="initialism">ToC</abbr> generated by the ereader, and doesn’t include one in the readable text.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Remove any footer text and markup after the public domain text ends. This includes the Gutenberg license—but don’t worry, we’ll credit Gutenberg in the colophon and metadata later. If you used the <code class="program">--gutenberg-ebook-url</code> option with the <code class="program">create-draft</code> tool, then it may have already stripped the license for you, and included some Gutenberg metadata already.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Now our source file looks something like this:</p>
|
||||
<code class="html full"><h2> STORY OF THE DOOR </h2>
|
||||
<p> Mr. Utterson the lawyer was a man of a rugged countenance that was never lighted by a smile; cold, scanty and embarrassed in discourse; backward in <!--snip all the way to the end...--> proceed to seal up my confession, I bring the life of that unhappy Henry Jekyll to an end. </p></code>
|
||||
<p>Now that we’ve removed all the cruft from the top and bottom of the file, we’re ready for our first commit.</p>
|
||||
<p>Please use the following commit message for consistency with the rest of our ebooks:</p><code class="terminal"><span>git add -A</span> <span>git commit -m "Initial commit"</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Split the source text at logical divisions</h2>
|
||||
<p>The file we downloaded contains the entire work. <i>Jekyll</i> is a short work, but for longer work it quickly becomes impractical to have the entire text in one file. Not only is it a pain to edit, but ereaders often have trouble with extremely large files.</p>
|
||||
<p>The next step is to split the file at logical places; that usually means at each chapter break. For works that are contain their chapters in larger “parts,” the part division should also be its own file. For example, see <i><a href="/ebooks/robert-louis-stevenson/treasure-island/milo-winter">Treasure Island</a></i>.</p>
|
||||
<p>To split the work, we use the <code class="program">split-file</code> tool. <code class="program">split-file</code> takes a single file and breaks it in to a new file every time it encounters the markup <code class="html"><!--se:split--></code>. The tool automatically includes basic header and footer markup in each split file.</p>
|
||||
<p>Notice that in our source file, each chapter is marked with an <code class="html">h2</code> tag. We can use that to our advantage and save ourselves the trouble of adding the <code class="html"><!--se:split--></code> markup by hand:</p><code class="terminal"><span>perl -pi -e "s/<h2/<\!--se:split--><h2/g" src/epub/text/body.xhtml</span></code>
|
||||
<p>(Note the slash before the ! for compatibility with some shells.)</p>
|
||||
<p>Now that we’ve added our markers, we split the file. <code class="program">split-file</code> puts the results in our current directory and conveniently names them by chapter number.</p><code class="terminal"><span>~/tools/split-file src/epub/text/body.xhtml</span> <span>mv chapter* src/epub/text/</span></code>
|
||||
<p>Once we’re happy that the source file has been split correctly, we can remove it.</p><code class="terminal"><span>rm src/epub/text/body.xhtml</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Clean up the source text</h2>
|
||||
<p>If you open up any of the chapter files we now have in the <code class="path">src/epub/text/</code> folder, you’ll notice that the code isn’t very clean. Paragraphs are split over multiple lines, indentation is all wrong, and so on.</p>
|
||||
<p>If you try opening a chapter in a web browser, you’ll also likely get an error if the chapter includes any HTML entities, like <code class="html">&mdash;</code>. This is because Gutenberg uses plain HTML, which allows entities, but epub uses XHTML, which doesn’t.</p>
|
||||
<p>We can fix all of this pretty quickly using the <code class="program">clean</code> tool. <code class="program">clean</code> accepts as its argument the root of a Standard Ebook directory, and with the <code class="program">--single-lines</code> option it’ll remove the hard line wrapping that Gutenberg is fond of. We’re already in the root, so we pass it <code class="path">.</code>.</p><code class="terminal"><span>~/tools/clean --single-lines .</span></code>
|
||||
<p>Things look much better now, but we’re not perfect yet. If you open a chapter you’ll notice that the <code class="html"><p></code> and <code class="html"><h2></code> tags have a space between the tag and the text. We can clean that up with a few <code class="program">perl</code> commands.</p><code class="terminal"><span>perl -pi -e "s/<(p|h2)>\s+/<\1>/g" src/epub/text/chapter*</span> <span>perl -pi -e "s/\s+<\/(p|h2)>/<\/\1>/g" src/epub/text/chapter*</span></code>
|
||||
<p>Finally, we have to do a quick runthrough of each file by hand to cut out any lingering Gutenberg markup that doesn’t belong. In <i>Jekyll</i>, notice that each chapter ends with some extra empty <code class="html">div</code>s and <code class="html">p</code>s. These were used by the original transcriber to put spaces between the chapters, and they’re not necessary anymore, so remove them before continuing.</p>
|
||||
<p>Now our chapter 1 source looks like this:</p>
|
||||
<code class="html full"><?xml version="1.0" encoding="UTF-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/, se: http://standardebooks.org/vocab/1.0" xml:lang="en-US">
|
||||
<head>
|
||||
<title>Chapter 1</title>
|
||||
<link href="../css/core.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../css/local.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body epub:type="bodymatter z3998:fiction">
|
||||
<section id="chapter-1" epub:type="chapter">
|
||||
<h2>STORY OF THE DOOR</h2>
|
||||
<p>Mr. Utterson the lawyer was a man of a rugged countenance...</p>
|
||||
<!--snip all the way to the end...-->
|
||||
<p>"With all my heart," said the lawyer. "I shake hands on that, Richard."</p>
|
||||
</section>
|
||||
</body>
|
||||
</html></code>
|
||||
<p>If you look carefully, you’ll notice that the <code class="html"><html></code> tag has the <code class="html">xml:lang="en-US"</code> attribute, even though our source text uses British spelling! We have to change the <code class="html">xml:lang</code> attribute for the source files to match the actual language, which in this case is en-GB. Let’s do that now:</p><code class="terminal"><span>perl -pi -e "s|en-US|en-GB|g" src/epub/text/chapter*</span></code>
|
||||
<p>Note that we <em>don’t</em> change the language for the metadata or front/back matter files, like <code class="path">content.opf</code>, <code class="path">titlepage.xhtml</code>, or <code class="path">colophon.xhtml</code>. Those must always be in American spelling, so they’ll always have the en-US language tag.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Typogrify the source text and perform the second commit</h2>
|
||||
<p>Now that we have a clean starting point, we can start getting the <em>real</em> work done. The <code class="program">typogrify</code> tool can do a lot of the heavy lifting necessary to bring an ebook up to Standard Ebooks typography standards.</p>
|
||||
<p>Like <code class="program">clean</code>, <code class="program">typogrify</code> accepts as its argument the root of a Standard Ebook directory.</p><code class="terminal"><span>~/tools/typogrify .</span></code>
|
||||
<p>Among other things, <code class="program">typogrify</code> does the following:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Converts straight quotes to curly quotes;</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Adds no-break spaces where appropriate for some common abbreviations;</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Normalizes ellipses;</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Normalizes spacing in em-, en-, and double-em-dashes, as well as between nested quotation marks, and adds word joiners.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>You can run <code class="program">typogrify</code> as many times as you want on a source directory; it should always produce the same result, regardless of what state the source directory was in when you ran it.</p>
|
||||
<p>While <code class="program">typogrify</code> does a lot of work for you, each ebook is totally different so there’s almost always more work to do that can only be done by hand. In <i>Jekyll</i>, you’ll notice that the chapter titles are in all caps. The SE standard requires chapter titles to be in title case, and the <code class="program">titlecase</code> tool can do that for us.</p>
|
||||
<p><code class="program">titlecase</code> accepts a string as its argument, and outputs the string in title case. Many text editors allow you to configure external macros—perfect for creating a keyboard shortcut to run <code class="program">titlecase</code> on selected text.</p>
|
||||
<h3>Typography checklist</h3>
|
||||
<p>There are many things that <code class="program">typogrify</code> isn’t well suited to do automatically. Check <a href="/contribute/typography">our complete typography manual</a> to see exactly how to format the work. Below is a brief, but incomplete, list of common issues that arise in ebooks:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="/contribute/typography#coordinates">Typography rules for coordinates</a>. Use the prime and double prime glyphs for coordinates. These regexes helps match and replace coordinates: <code class="regex">|([0-9])+’|\1′|g</code>, <code class="regex">|([0-9])+”|\1″|g</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/typography#ampersands-in-names">Typography rules for ampersands in names</a>. This regex helps match candidates: <code class="regex">[a-zA-Z]\.?\s*&\s*[a-zA-Z]</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/typography#text-in-all-caps">Typography rules for text in all caps</a>. Text in all caps is almost never correct, and should either be converted to lowercase with the <code class="html"><em></code> tag (for spoken emphasis), <code class="html"><strong></code> (for extreme spoken emphasis), or <code class="html"><b></code> (for unsemantic small caps, like in storefront signs). This regex helps find candidates: <code class="regex">[A-Z]{3,}</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Sometimes <code class="program">typogrify</code> doesn’t close quotation marks near em-dashes correctly. Try to find such instances with this regex: <code class="regex">—[’”][^<\s]</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/typography#dashes">Two-em dashes should be used for elision</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Commas and periods should generally be inside quotation marks, not outside. This regex helps find them: <code class="regex">[’”][,.]</code></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>The second commit</h3>
|
||||
<p>Once you’ve run <code class="program">typogrify</code> and you’ve searched the work for the common issues above, you can perform your second commit.</p><code class="terminal"><span>git add -A</span> <span>git commit -m "Typogrify"</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Convert footnotes to endnotes and add a list of illustrations</h2>
|
||||
<p>Works often include footnotes, either added by an annotator or as part of the work itself. Since ebooks don’t have a concept of a “page,” there’s no place for footnotes to go. Instead, we convert footnotes to a single endnotes file, which will provide popup references in the final epub.</p>
|
||||
<p>The endnotes file and the format for endnote links are <a href="/contribute/semantics#endnotes">standardized in the semantics manual</a>.</p>
|
||||
<p>If a work has illustrations besides the cover and title pages, we include a “list of illustrations” at the end of the book, after the endnotes but before the colophon. The <abbr class="initialism">LoI</abbr> file is also <a href="/contribute/semantics#loi">standardized in the semantics manual</a>.</p>
|
||||
<p><i>Jekyll</i> doesn’t have any footnotes, endnotes, or illustrations, so we skip this step.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Converting British quotation to American quotation</h2>
|
||||
<p>If the work you’re producing uses <a href="http://www.thepunctuationguide.com/british-versus-american-style.html">British quotation style</a> (single quotes for dialog versus double quotes in American), we have to convert it to American style. We use American style in part because it’s easier to programmatically convert from American to British than it is to convert the other way around. <em>Skip this step if your work is already in American style.</em></p>
|
||||
<p>Standard Ebooks has a tool called <code class="program">british2american</code> that helps with the conversion. Your work must already be typogrified (the previous step in this guide) for the script to work.</p><code class="terminal"><span>~/tools/british2american .</span></code>
|
||||
<p>While <code class="program">british2american</code> tries its best, thanks to the quirkiness of English punctuation rules it’ll invariably mess some stuff up. Proofreading is required after running the conversion.</p>
|
||||
<p>After you’ve run the conversion, do another commit.</p><code class="terminal"><span>git add -A</span> <span>git commit -m "Convert from British-style quotation to American style"</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Add semantics</h2>
|
||||
<p>Part of the Standard Ebooks project is adding meaningful semantics wherever possible in the text. The <code class="program">semanticate</code> tool does a little of that for us—for example, for some common abbreviations—but much of it has to be done by hand.</p>
|
||||
<p>Adding semantics means two things:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Using meaningful tags to mark up the work: <code class="html"><em></code> when conveying emphatic speech instead of <code class="html"><i></code>, <code class="html"><abbr></code> to wrap abbreviations, <code class="html"><section></code> to mark structural divisions, using the <code class="html">xml:lang</code> attribute to specify the language of a word or passage, and so on.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Using the <a href="http://www.idpf.org/epub/30/spec/epub30-contentdocs.html#sec-xhtml-semantic-inflection">epub3 semantic inflection language</a> to add deeper meaning to tags.</p>
|
||||
<p>Currently we use a mix of <a href="http://www.idpf.org/epub/vocab/structure/">epub3 structural semantics</a>, <a href="http://www.daisy.org/z3998/2012/vocab/structure/">z3998 structural semantics</a> for when the epub3 vocabulary isn’t enough, and our own <a href="/vocab/1.0">SE semantics</a> for when z3998 isn’t enough.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<p>Use the <code class="program">semanticate</code> tool to do some common cases for you:</p><code class="terminal"><span>~/tools/semanticate .</span></code>
|
||||
<p><code class="program">semanticate</code> tries its best to correctly add semantics, but sometimes it’s wrong. For that reason you should review the changes it made before accepting them:</p><code class="terminal"><span>git difftool</span></code>
|
||||
<p>Beyond that, adding semantics is mostly a by-hand process. See our <a href="/contribute/semantics">semantics manual</a> for a detailed list of the kinds of semantics we expect in a Standard Ebook.</p>
|
||||
<p>Here’s a short list of some of the more common semantic issues you’ll encounter:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Semantics for italics: <code class="html"><em></code> should be used for when a passage is emphasized, as in when dialog is shouted or whispered. <code class="html"><i></code> is used for all other italics, <a href="/contribute/semantics#semantic-inflection">with the appropriate semantic inflection</a>. Older transcriptions usually use just <code class="html"><i></code> for both, so you must change them manually if necessary.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/typography#chapters">Semantics rules for chapter titles</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/semantics#abbreviations">Semantics rules for abbreviations</a>. Abbreviations should always be wrapped in the <code class="html">abbr</code> tag and with the correct <code class="html">class</code> attribute.</p>
|
||||
<p>Specifically, see the <a href="/contribute/typography#initials">typography rules for initials</a>. Wrap people’s initials in <code class="html"><abbr class="name"></code>. This regex helps match initials: <code class="regex">[A-Z]\.\s*([A-Z]\.\s*)+</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/contribute/typography#times">Typography rules for times</a>. Wrap a.m. and p.m. in <code class="html"><abbr class="time"></code> and add a no-break space between digits and a.m. or p.m.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Words or phrases in foreign languages should always be marked up with <code class="html"><i xml:lang="TAG"></code>, where TAG is an <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag</a>. <a href="https://r12a.github.io/app-subtags/">This app can help you look them up</a>. If the text uses fictional or unspecific languages, use the “x-” prefix and make up a subtag yourself.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Semantics for poetry, verse, and song: Many Gutenberg productions use the <code class="html"><pre></code> tag to format poetry, verse, and song. This is, of course, semantically incorrect. <a href="/contribute/semantics#poetry">See the Poetry section of our semantics manual</a> for templates on how to semantically format poetry, verse, and song.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>After you’ve added semantics according to the <a href="/contribute/semantics">semantics manual</a>, do another commit.</p><code class="terminal"><span>git add -A</span> <span>git commit -m "Semanticate"</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Modernize spelling and hyphenation</h2>
|
||||
<p>Many older works use outdated spelling and hyphenation that would distract a modern reader. (For example, “to-night” instead of “tonight”). <code class="program">modernize-spelling</code> is a tool to automatically remove hyphens from words that used to be compounded, but aren’t anymore in modern English spelling.</p>
|
||||
<p><em>Do</em> run this tool on prose. <em>Don’t</em> run this tool on poetry.</p><code class="terminal"><span>~/tools/modernize-spelling .</span></code>
|
||||
<p>After you run the tool, <em>you must check what the tool did to confirm that each removed hyphen is correct</em>. Sometimes the tool will remove a hyphen that needs to be included for clarity, or one that changes the meaning of the word, or it may result in a word that just doesn’t seem right. Re-introducing a hyphen is OK in these cases.</p>
|
||||
<p>Here’s a real-world example of where <code class="program">modernize-spelling</code> made the wrong choice: In <i><a href="/ebooks/oscar-wilde/the-picture-of-dorian-gray">The Picture of Dorian Gray</a></i> chapter 11, Oscar Wilde writes:</p>
|
||||
<blockquote>
|
||||
<p>He possessed a gorgeous cope of crimson silk and gold-thread damask…</p>
|
||||
</blockquote>
|
||||
<p><code class="program">modernize-spelling</code> would replace the dash in <code class="html">gold-thread</code> so that it reads <code class="html">goldthread</code>. Well <code class="html">goldthread</code> is an actual word, which is why it’s in our dictionary, and why the script makes a replacement—but it’s the name of a type of flower, <em>not</em> a golden fabric thread! In this case, <code class="program">modernize-spelling</code> made an incorrect replacement, and we have to change it back.</p>
|
||||
<p><code class="program">git</code> provides a handy way for us to visualize these differences:</p><code class="terminal"><span>git difftool</span></code>
|
||||
<p>After you’ve reviewed the changes that the tool made, do another commit. This commit is important, because it gives purists an avenue to revert modernizing changes to the original text.</p>
|
||||
<p>Note how we preface this commit with "[Editorial]". Any change you make to the source text that can be considered a modernization or editorial change should be prefaced like this, so that the <code class="program">git</code> history can be easily searched by people looking to revert changes.</p><code class="terminal"><span>git add -A</span> <span>git commit -m "[Editorial] Modernize hyphenation and spelling"</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Modernize spacing in select words</h2>
|
||||
<p>Over time, spelling of certain common two-word phrases has evolved into a single word. For example, “someone” used to be the two-word phrase “some one,” which would read awkwardly to modern readers. This is our chance to modernize such phrases.</p>
|
||||
<p>Note that we use the <code class="program">interactive-sr</code> tool to perform an interactive search and replace, instead of doing a global, non-interactive search and replace. This is because some phrases caught by the regular expression should not be changed, depending on context. For example, "some one" in the following snippet from <a href="/ebooks/anton-chekhov/short-fiction/constance-garnett/">Anton Chekhov’s short fiction</a> <em>should not</em> be corrected:</p>
|
||||
<blockquote>
|
||||
<p>He wanted to think of some one part of nature as yet untouched...</p>
|
||||
</blockquote>
|
||||
<p>Use the following regular expression invocations to correct a certain set of such phrases:</p><code class="terminal"><span>~/tools/interactive-sr "/\v([Ss])ome one/\1omeone/" src/epub/text/*</span> <span>git add -A</span> <span>git commit -m "[Editorial] some one -> someone"</span></code> <code class="terminal"><span>~/tools/interactive-sr "/\v(<[Aa])ny one/\1nyone/" src/epub/text/*</span> <span>git add -A</span> <span>git commit -m "[Editorial] any one -> anyone"</span></code> <code class="terminal"><span>~/tools/interactive-sr "/\v([Ee])very one(\s+of)@\!/\1veryone/" src/epub/text/*</span> <span>git add -A</span> <span>git commit -m "[Editorial] every one -> everyone"</span></code> <code class="terminal"><span>~/tools/interactive-sr "/\v([Ee])very thing/\1verything/" src/epub/text/*</span> <span>git add -A</span> <span>git commit -m "[Editorial] every thing -> everything"</span></code> <code class="terminal"><span>~/tools/interactive-sr "/\v(<[Aa])ny thing/\1nything/" src/epub/text/*</span> <span>git add -A</span> <span>git commit -m "[Editorial] any thing -> anything"</span></code> <code class="terminal"><span>~/tools/interactive-sr "/\v([Ff])or ever(>)/\1orever\2/" src/epub/text/*</span> <span>git add -A</span> <span>git commit -m "[Editorial] for ever -> forever"</span></code> <code class="terminal"><span>~/tools/interactive-sr "/\v(in\s+)@<\!(<[Aa])ny way/\1nyway/" src/epub/text/*</span> <span>git add -A</span> <span>git commit -m "[Editorial] any way -> anyway"</span></code> <code class="terminal"><span>~/tools/interactive-sr "/\v([Yy])our self/\1ourself/" src/epub/text/*</span> <span>git add -A</span> <span>git commit -m "[Editorial] your self -> yourself"</span></code> <code class="terminal"><span>~/tools/interactive-sr "/\v([Mm])ean time/\1eantime/" src/epub/text/*</span> <span>git add -A</span> <span>git commit -m "[Editorial] mean time -> meantime"</span></code> <code class="terminal"><span>~/tools/interactive-sr "/\v([Aa])ny how/\1nyhow/" src/epub/text/*</span> <span>git add -A</span> <span>git commit -m "[Editorial] any how -> anyhow"</span></code>
|
||||
|
||||
<code class="terminal"><span>~/tools/interactive-sr "/\v([Aa])ny body/\1nybody/" src/epub/text/*</span> <span>git add -A</span> <span>git commit -m "[Editorial] any body -> anybody"</span></code>
|
||||
|
||||
<code class="terminal"><span>~/tools/interactive-sr "/\v([Ee])very body/\1verybody/" src/epub/text/*</span> <span>git add -A</span> <span>git commit -m "[Editorial] every body -> everybody"</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Create the cover image</h2>
|
||||
<aside class="alert">
|
||||
<p class="warning">!!! STOP !!!</p>
|
||||
<p><strong>Do not commit cover art to your repository’s history until you have <a href="https://groups.google.com/forum/#!forum/standardebooks">cleared your selection with the SE Editor-in-Chief.</a></strong></p>
|
||||
<p>If you commit non-public-domain cover art, you’ll have to rebase your repository to remove the art from its history. This is complicated, dangerous, and annoying, and you’ll be tempted to give up.</p>
|
||||
<p><a href="https://groups.google.com/forum/#!forum/standardebooks">Contact us first</a> with page scans verifying your cover art’s public domain status before you commit your cover art!</p>
|
||||
</aside>
|
||||
<p>Cover images for Standard Ebooks books have a standardized layout. The bulk of the work you’ll be doing is locating a suitable public domain painting to use. See our complete <a href="https://standardebooks.org/contribute/art">art manual</a> for details on assembling a cover image.</p>
|
||||
<p>As you search for an image, keep the following in mind:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Cover images must be in the public domain. Thanks to quirks in copyright law, this is harder to decide for paintings than it is for published writing. In general, Wikipedia is a good starting point for deciding if a work is in the public domain, but very careful research is required to confirm that status.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Find the largest possible cover image you can. Since the final image is 1400 × 2100, having to resize a small image will greatly reduce the quality of the final cover.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The image you pick should be a “fine art” oil painting so that all Standard Ebooks have a consistent cover style. This is actually easier than you think, because it turns out most public domain artwork is from the era of fine art.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>You must provide proof of public domain status to the SE Editor-in-Chief in the form of a page scan of the painting from a 1922-or-older book, and the Editor-in-Chief must approve your selection before you can commit it to your repository.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The Standard Ebooks lead has the final say on the cover image you pick, and it may be rejected for, among other things, poor public domain status research, being too low resolution, or not fitting in with the “fine art” style.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>What can we use for <i>Jekyll</i>? In 1885 Albert Edelfelt painted a <a href="https://en.wikipedia.org/wiki/File:Albert_Edelfelt_-_Louis_Pasteur_-_1885.jpg">portrait of Louis Pasteur</a> in a laboratory. A crop of the lab equipment would be a good way to represent Dr. Jekyll’s lab.</p>
|
||||
<p>The cover file itself, <code class="path">cover.svg</code>, is easy to edit. It automatically links to <code class="path">cover.jpg</code>. All you have to do is open <code class="path">cover.svg</code> with a text editor and edit the title and author. Make sure you have the League Spartan font installed on your system!</p>
|
||||
<p>After we’re done with the cover, we’ll have three files in <code class="path">./images/</code>:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code class="path">cover.source.jpg</code> is the raw image file we used for the cover. We keep it in case we want to make adjustments later. For <i>Jekyll</i>, this would be the raw Pasteur portrait downloaded from Wikipedia.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">cover.jpg</code> is the scaled cover image that <code class="path">cover.svg</code> links to. This file is exactly 1400 × 2100. For <i>Jekyll</i>, this is a crop of <code class="path">cover.source.jpg</code> that includes just the lab equipment, and resized up to our target resolution.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">cover.svg</code> is the completed cover image with the title and author. The <code class="program">build-images</code> tool will take <code class="path">cover.svg</code>, embed <code class="path">cover.jpg</code>, convert the text to paths, and place the result in <code class="path">./src/epub/images/</code> for inclusion in the final epub.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Create the titlepage image, build both the cover and titlepage, and commit</h2>
|
||||
<p>Titlepage images for Standard Ebooks books are also standardized. See our the <a href="https://standardebooks.org/contribute/art">art manual</a> for details.</p>
|
||||
<p>The <code class="program">create-draft</code> tool already created a completed titlepage for you. If the way it arranged the lines doesn’t look great, you can always edit the titlepage to make the arrangement of words on each line more aesthetically pleasing. Don’t use a vector editing program like Inkscape to edit it. Instead, open it up in your favorite text editor and type the values in directly.</p>
|
||||
<p>The source images for both the cover and the titlepage are kept in <code class="path">./images/</code>. Since the source images refer to installed fonts, and since we can’t include those fonts in our final ebook without having to include a license, we have to convert that text to paths for final distribution. The <code class="program">build-images</code> tool does just that.</p><code class="terminal"><span>~/tools/build-images .</span></code>
|
||||
<p>This tool takes both <code class="path">./images/cover.svg</code> and <code class="path">./images/titlepage.svg</code>, converts text to paths, and embeds the cover jpg. The output goes to <code class="path">./src/epub/images/</code>.</p>
|
||||
<p>Once we built the images successfully, perform a commit.</p><code class="terminal"><span>git add -A</span> <span>git commit -m "Add cover and titlepage images"</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Complete the table of contents</h2>
|
||||
<p>The table of contents is a structured document that should let the reader easily navigate the book. In a Standard Ebook, it’s stored outside of the readable text directory with the assumption that the reading system will parse it and display a navigable representation for the user.</p>
|
||||
<p>For now, you can copy and paste a <abbr class="initialism">ToC</abbr> file from a different Standard Ebook to get an idea of what they should look like. Once you’re done, commit.</p><code class="terminal"><span>git add -A</span> <span>git commit -m "Add ToC"</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Complete content.opf</h2>
|
||||
<p><code class="path">content.opf</code> is the file that contains the ebook metadata like author, title, description, and reading order. Most of it will be filling in that basic information, and including links to various resources related to the text.</p>
|
||||
<p>The <code class="path">content.opf</code> is standardized. Please <a href="/contribute/metadata">see our extensive Metadata Manual</a> for details on how to fill out <code class="path">content.opf</code>.</p>
|
||||
<p>As you complete the metadata, you’ll have to order the spine and the manifest in this file. Fortunately, Standard Ebooks has a tool for that too: <code class="program">print-manifest-and-spine</code>. Run this on our source directory and, as you can guess, it’ll print out the <code class="html"><manifest></code> and <code class="html"><spine></code> tags for this work.</p><code class="terminal raw"><span>~/tools/print-manifest-and-spine .</span><manifest> <item href="css/core.css" id="core.css" media-type="text/css"/> <item href="css/local.css" id="local.css" media-type="text/css"/> <item href="images/cover.svg" id="cover.svg" media-type="image/svg+xml" properties="cover-image"/> <item href="images/logo.svg" id="logo.svg" media-type="image/svg+xml"/> <item href="images/titlepage.svg" id="titlepage.svg" media-type="image/svg+xml"/> <!--snip all the way to the end..--> <item href="text/colophon.xhtml" id="colophon.xhtml" media-type="application/xhtml+xml"/> <item href="text/titlepage.xhtml" id="titlepage.xhtml" media-type="application/xhtml+xml" properties="svg"/> <item href="text/unlicense.xhtml" id="unlicense.xhtml" media-type="application/xhtml+xml"/> </manifest> <spine> <itemref idref="titlepage.xhtml"/> <!--snip all the way to the end..--> <itemref idref="colophon.xhtml"/> <itemref idref="unlicense.xhtml"/> </spine></code>
|
||||
<p>The manifest is already in the correct order and doesn’t need to be edited. The spine, however, will have to be reordered to be in the correct reading order. Once we’ve done that, paste it in to <code class="path">content.opf</code> and commit.</p><code class="terminal"><span>git add -A</span> <span>git commit -m "Complete content.opf"</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Complete the colophon</h2>
|
||||
<p>The <code class="program">create-draft</code> tool put a skeleton <code class="path">colophon.xhtml</code> file in the <code class="path">./src/epub/text/</code> folder. Now that we have the cover image and artist, we can fill out the various fields there. Make sure to credit the original transcribers of the text (generally we assume them to be whoever’s name is on the file we download from Gutenberg) and to include a link back to the Gutenberg text we used, along with a link to any scans we used (from archive.org or hathitrust.org, for example).</p>
|
||||
<p>You can also include your own name as the producer of this Standard Ebooks edition. Besides that, the colophon is standardized; don’t get too creative with it.</p>
|
||||
<p>The release and updated dates should be the same for the first relase, and they should match the dates in <code class="path">content.opf</code>. For now, leave them unchanged, as the <code class="program">prepare-release</code> tool will automatically fill them in for you as we’ll describe later in this guide.</p><code class="terminal"><span>git add -A</span> <span>git commit -m "Complete the colophon"</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Complete the imprint</h2>
|
||||
<p>There’s also a skeleton <code class="path">imprint.xhtml</code> file in the <code class="path">./src/epub/text/</code> folder. All you’ll have to change here is the links to the transcription and page scans you used.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Clean and lint before building</h2>
|
||||
<p>Before you build the final ebook for you to proofread, it’s a good idea to check the ebook for some common problems you might run in to during production.</p>
|
||||
<p>First, run <code class="program">clean</code> one more time to both clean up the source files, and to alert you if there are XHTML parsing errors. Even though we ran the <code class="program">clean</code> tool before, it’s likely that in the course of production the ebook got in to less-than-perfect markup formatting. Remember you can run <code class="program">clean</code> as many times as you want—it should always produce the same output.</p>
|
||||
<p>If you’re using a Mac, and thus the badly-behaved Finder program, you may find that it has carelessly polluted your work directory with useless <code class="path">.DS_Store</code> files. Before continuing, you should <a href="https://duckduckgo.com/?q=mac+alternative+file+manager">find a better file manager program</a>, then delete all of that litter with the following command:</p>
|
||||
<code class="terminal"><span>find . -name ".DS_Store" -type f -delete</span></code>
|
||||
<p>Next, run the <code class="program">lint</code> tool. If your ebook has any problems, you’ll see some output listing them. If everything’s OK, then <code class="program">lint</code> will complete silently.</p><code class="terminal"><span>~/tools/clean .</span> <span>~/tools/lint .</span></code>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Build and proofread, proofread, proofread!</h2>
|
||||
<p>At this point we’re just about ready to build our proofreading draft! The <code class="program">build</code> tool does this for us. We’ll run it with the <code class="program">--check</code> flag to make sure the epub we produced is valid, and with the <code class="program">--kindle</code> and <code class="program">--kobo</code> flag to build a file for Kindles and Kobos too. If you won’t be using a Kindle or Kobo, you can omit those flags.</p>
|
||||
<code class="terminal"><span>~/tools/build --output-dir=$HOME/dist/ --kindle --kobo --check .</span></code>
|
||||
<p>If there are no errors, we’ll see five files in the brand-new <code class="path">~/dist/</code> folder in our home directory:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code class="path">the-strange-case-of-dr-jekyll-and-mr-hyde.epub3</code> is a pure epub3 file—basically just a zipped up version of our source. Unfortunately most ebook readers don’t fully support all of epub3’s capabilities yet, so we’re more interested in…</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">the-strange-case-of-dr-jekyll-and-mr-hyde.epub</code>, the epub2 version of our ebook. If you don’t have a Kindle, this is the file you’ll be using to proofread.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">the-strange-case-of-dr-jekyll-and-mr-hyde.kepub.epub</code> is the Kobo version of our ebook. You can copy this to a Kobo using a USB cable.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">the-strange-case-of-dr-jekyll-and-mr-hyde.azw3</code> is the Kindle version of our ebook. You can copy this to a Kindle using a USB cable.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="path">thumbnail_xxxx_EBOK_portrait.jpg</code> is a thumbnail file you can copy to your Kindle to have the cover art appear in your reader. A bug in Amazon’s software prevents the Kindle from reading cover imags in side-loaded files; contact Amazon to complain.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>This is the step where you read the ebook and make adjustments to the text so that it conforms to our <a href="/contribute/typography">typography manual</a>.</p>
|
||||
<p>All Standard Ebooks productions must be proofread at this stage to confirm that there are no typos, formatting errors, or typography errors. It’s extremely common for transcriptions sourced from Gutenberg to have various typos and formatting errors (like missing italics), and it’s also not uncommon for one of Standard Ebook’s tools to make the wrong guess about things like a closing quotation mark somewhere. As you proofread, it’s extremely handy to have a print copy of the book with you. For famous books that might just be a trip to your local library. For rarer books, or for those without a library nearby, there are several sites that provide free digital scans of public domain writing:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="http://www.hathitrust.org/">The HathiTrust Digital Library</a> is a comprehensive collection of Google’s book scanning project. They have a vast catalog and a feature-rich search and reading interface.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://archive.org/">The Internet Archive</a> is another collection of scans of public domain books.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>If you end up using scans from one of these sources, you <em>must</em> mention it in the ebook’s colophon and as a <code class="html"><dc:source></code> item in <code class="path">content.opf</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Initial publication</h2>
|
||||
<p>Now that we’ve proofread the work and corrected any errors we’ve found, we’re ready to release the finished ebook!</p>
|
||||
<p>It’s a good idea to run <code class="program">typogrify</code> and <code class="program">clean</code> one more time before releasing. Make sure to review the changes with <code class="program">git difftool</code> before accepting them—<code class="program">typogrify</code> is usually right, but not always!</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><b>If you’re submitting your ebook to Standard Ebooks for review:</b></p>
|
||||
<p><em>Don’t run <code class="program">prepare-release</code> on an ebook you’re submitting for review!</em></p>
|
||||
<p>Contact the mailing list with a link to your GitHub repository to let them know you’re finished. A reviewer will review your production and work with you to fix any issues. They’ll then release the ebook for you.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>If you’re producing this ebook for yourself, not for release at Standard Ebooks:</b></p>
|
||||
<p>Complete the initial publication by adding a release date, modification date, and final word count to <code class="path">content.opf</code> and <code class="path">colophon.xhtml</code>. The <code class="program">prepare-release</code> tool does all of that for us.</p>
|
||||
<code class="terminal"><span>~/tools/prepare-release .</span></code>
|
||||
<p>With that done, we commit again using a commit message of “Initial publication” to signify that we’re all done with production, and now expect only proofreading corrections to be committed. (This may not actually be the case in reality, but it’s still a nice milestone to have.)</p><code class="terminal"><span>git add -A</span> <span>git commit -m "Initial publication"</span></code>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Finally, build everything again.</p><code class="terminal"><span>~/tools/build --output-dir=$HOME/dist/ --kindle --kobo --check .</span></code>
|
||||
<p>If the build completed successfully, congratulations! You’ve just finished producing a Standard Ebook!</p>
|
||||
</li>
|
||||
</ol>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
31
www/contribute/report-errors.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'Report Errors', 'highlight' => 'contribute', 'description' => 'How to report a typo or error you’ve found in a Standard Ebooks ebook.']) ?>
|
||||
<main>
|
||||
<article>
|
||||
<h1>Report Errors</h1>
|
||||
<p>You can report any kind of error in a Standard Ebook to the Standard Ebooks project and we’ll do our best to get it corrected as soon as we can.</p>
|
||||
<p>If you’re a software developer or you’re comfortable with technology, you can fix the error yourself at the ebook’s <a href="https://www.github.com/standardebooks/">GitHub repository</a>, and submit a pull request.</p>
|
||||
<p>If you’d rather not do that, then you can report an error directly to us and we’ll take care of it. To report an error, you’ll need:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p><b>The author and title of the ebook in question.</b> Even better is a direct link to the Standard Ebooks page for that ebook. You can find that link in the ebook’s colophon, which is accessible via the table of contents and is always found at the end of the ebook.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>The word immediately before and after the word that contains the error.</b> Usually three words is enough for us to quickly locate the error in the ebook, but if you think only three words isn’t enough, a few more won’t hurt.</p>
|
||||
<p>If the error doesn’t include a word, just send us a quick description of what’s going on.</p>
|
||||
<p>For example, say you’ve spotted the incorrectly curled quotation mark in the text below:</p>
|
||||
<blockquote>
|
||||
<p>He rose excitedly. “Go get <mark class="error">‘</mark>em, tiger!” he cried.</p>
|
||||
</blockquote>
|
||||
<p>All you’d have to send us is:</p>
|
||||
<blockquote>
|
||||
<p>get ‘em, tiger</p>
|
||||
</blockquote>
|
||||
<p>And we’ll be able to find the section you’re talking about and correctly curl the quotation mark.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<p>Once you have these two items, <a href="https://groups.google.com/forum/#!forum/standardebooks">contact us via our mailing list</a> with that information and we’ll get right on it!</p>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
763
www/contribute/semantics.php
Normal file
|
@ -0,0 +1,763 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'Structure and Semantics Manual', 'js' => true, 'highlight' => 'contribute', 'description' => 'The Standard Ebooks Structure and Semantics Manual, containing details on semantic patterns used in ebook production.']) ?>
|
||||
<main>
|
||||
<article>
|
||||
<h1>Structure and Semantics Manual</h1>
|
||||
<aside class="alert">
|
||||
<p>Standard Ebooks is a brand-new project—this manual is a pre-alpha, and much of it is incomplete. If you have a question, need clarification, or run in to an issue not yet covered here, please <a href="https://groups.google.com/forum/#!forum/standardebooks">contact us</a> so we can update this manual.</p>
|
||||
</aside>
|
||||
<section id="general">
|
||||
<h2>General do’s and don’ts</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Don’t wrap source code to a certain column width. This makes it difficult to search through source code for a particular sentence, because a line break could be anywhere. Instead, use the <code class="program">clean</code> tool in the <a href="https://github.com/standardebooks/tools">Standard Ebooks toolset</a> to format <abbr class="initialism">XHTML</abbr> source code, and the word wrap feature in your text editor to make long paragraphs readable in the source code.</p>
|
||||
</li>
|
||||
|
||||
<li><p>You have the full vocabulary of <abbr class="initialism">HTML5</abbr> at your disposal, so use semantically-appropriate elements whenever possible. Don’t settle for a <code class="html"><div></code> when a <code class="html"><blockquote></code> or <code class="html"><section></code> would be more descriptive.</p>
|
||||
<figure class="text">
|
||||
<p class="wrong"><div class="quotation"></p>
|
||||
<p class="corrected"><blockquote></p>
|
||||
</figure>
|
||||
|
||||
<li><p>Don’t style elements with inline <abbr class="initialism">CSS</abbr>. Prefer clever <abbr class="initialism">CSS</abbr> selectors first, then prefer <abbr class="initialism">CSS</abbr> classes.</p></li>
|
||||
<li><p>When styling with <abbr class="initialism">CSS</abbr> classes, use semantic class names. Name classes based on what they’re styling, not based on a description of how their style looks.</p>
|
||||
<figure class="text">
|
||||
<p class="wrong"><div class="small-caps"></p>
|
||||
<p class="corrected"><blockquote class="inscription"></p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Don’t use <code class="html"><pre></code> elements to format text requiring tricky spacing, like poetry. There should never be a <code class="html"><pre></code> element in a Standard Ebook. See the <a href="#poetry">poetry section</a> for patterns to use to format poetry. Anything can be formatted with <abbr class="initialism">CSS</abbr> if you give it a little thought!</p>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
<section id="semantics-inflection">
|
||||
<h2>Semantic inflection</h2>
|
||||
<p>The epub spec allows for <a href="http://www.idpf.org/accessibility/guidelines/content/semantics/epub-type.php">semantic inflection</a>, which is a way of adding pertinent semantic metadata to certain elements. For example, you may want to convey that the contents of a certain <code class="html"><section></code> are actually a part of a chapter. You would do that by using the <code class="html">epub:type</code> attribute:</p>
|
||||
<figure>
|
||||
<code class="html"><section epub:type="chapter">...</section></code>
|
||||
</figure>
|
||||
<p>The epub spec includes a <a href="http://www.idpf.org/epub/vocab/structure/">list of supported keywords</a> that you can use in the <code class="html">epub:type</code> attribute. Many of these keywords apply to content divisions, like chapter breaks, prefaces, introductions, and so on.</p>
|
||||
<p>An additional spec, the sexily-named <a href="http://www.daisy.org/z3998/2012/vocab/structure/">z39.98-2012 Structural Semantics vocabulary</a>, gives us a more robust vocabulary for adding semantic inflection. This vocabulary includes ways of marking fiction vs. non-fiction, letters, poetry, and so on. All Standard Ebooks include a reference to this vocabulary by default, so you should use it if the regular epub vocabulary isn’t enough.</p>
|
||||
<p>Finally, Standard Ebooks <a href="/vocab/1.0">has its own vocabulary</a> to add even more finely grained semantics. For example, names of ships are italicized with the <code class="html"><i></code> element. But to convey that the otherwise-meaningless <code class="html"><i></code> element contains the name of a ship, we would add the Standard Ebooks semantic inflection of <code class="html">se:name.vessel.ship</code>:</p>
|
||||
<figure>
|
||||
<code class="html">They set sail on the <abbr class="initialism">HMS</abbr> <i epub:type="se:name.vessel.ship">Bounty</i>.</code>
|
||||
</figure>
|
||||
<p>In a perfect world, Standard Ebooks wouldn’t have to maintain its own list of semantic vocabulary. We’re actively looking for a suitable replacement—if you have a suggestion, <a href="/contribute/">get in touch</a>!</p>
|
||||
<h3>Semantic inflection in Standard Ebooks</h3>
|
||||
<p>Part of the Standard Ebooks mission is to add as much semantic information to ebooks as possible. To that end, use semantic inflection liberally and in detail. Since we have so many vocabulary options to use, use them in this order of preference:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p><a href="http://www.idpf.org/epub/vocab/structure/">The built-in epub vocabulary</a>. If what you’re trying to mark up is here, use this first.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="http://www.daisy.org/z3998/2012/vocab/structure/">The z3998 vocabulary</a>. If something isn’t included in the regular epub vocabulary, stop here next.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/vocab/1.0">The Standard Ebooks vocabulary</a>. If neither the regular epub vocabulary nor the z33998 vocabulary have a keyword you’re looking for, check our own vocabulary. You can also <a href="/contribute/">suggest additions to this vocabulary</a>.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
<section id="style">
|
||||
<h2>XHTML and CSS code formatting style</h2>
|
||||
<h3>In XHTML</h3>
|
||||
<p>The <code class="path">clean</code> tool does a good job of pretty-printing your XHTML according to our requirements, so make sure to run it often. In case you want to review the style requirements, they are:</p>
|
||||
<ul>
|
||||
<li><p>Use tabs for indentation.</p></li>
|
||||
<li><p>Tags whose content is <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content">phrasing content</a> should be on a single line. So, don’t open a <code class="html"><p></code> tag, then move to the next line for the tag’s contents; put it all on the same line.</p></li>
|
||||
<li><p>Attributes should be in alphabetical order.</p></li>
|
||||
</ul>
|
||||
<h3>In CSS</h3>
|
||||
<ul>
|
||||
<li><p>Use tabs for indentation.</p></li>
|
||||
<li><p>Always move to a new line for CSS properties. Even if the selector only has one property, don’t put the selector and the property on one line.</p></li>
|
||||
<li><p>Where possible, properties should be in alphabetical order. (This isn’t always possible if you’re attempting to override a previous style in the same selector; in those cases that’s OK.)</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="abbreviations">
|
||||
<h2>Abbreviation semantic patterns</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>There are three types of abbreviations:</p>
|
||||
<p>An acronym is a term made up of initials and pronounced as one word: <abbr class="acronym">NASA</abbr>, <abbr class="acronym">SCUBA</abbr>, <abbr class="acronym">TASER</abbr>.</p>
|
||||
<p>An initialism is a term made up of initials in which each initial is pronounced separately: <abbr class="initialism">ABC</abbr>, <abbr class="initialism">HTML</abbr>, <abbr class="initialism">CSS</abbr>.</p>
|
||||
<p>A contraction is an abbreviation of a longer word: Mr., Mrs., lbs.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>All abbreviations must be wrapped in an <code class="html"><abbr></code> element.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>All abbreviations that include periods (for example, <a href="/contribute/typography#latinisms">Latinisms</a>) <em>and</em> terminate a clause must include the “eoc” (end-of-clause) class in the <code class="html"><abbr></code> element. Since a clause ending in an abbreviation omits the trailing period, it’s useful for us to know when such an abbreviation marks the end of a clause.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Result</td>
|
||||
<td>Code</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
He wanted to meet at 6:40
|
||||
<abbr class="time eoc">p.m.</abbr> I was excited to see him!</td>
|
||||
<td>
|
||||
<code class="html full">He wanted to meet at 6:40<span class="utf">nbsp</span><abbr class="time eoc">p.m.</abbr> I was excited to see him!</code>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li>
|
||||
<p>Certain abbreviations should be marked up with a semantic class:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<h3>Acronyms</h3>
|
||||
<p>Any acronym (defined above) that doesn’t fit in the categories below.</p>
|
||||
<figure><code class="html"><abbr class="acronym">NASA</abbr> received less funding than usual this year.</code></figure>
|
||||
</li>
|
||||
<li>
|
||||
<h3>Initialisms</h3>
|
||||
<p>Any initialism (defined above) that doesn’t fit in the categories below.</p>
|
||||
<figure><code class="html">There are harder languages than <abbr class="initialism">HTML</abbr>.</code></figure>
|
||||
</li>
|
||||
<li>
|
||||
<h3>Abbreviated compass directions</h3>
|
||||
<p>For example: <abbr>N.</abbr>, <abbr>S.</abbr>, <abbr>S.W.</abbr></p>
|
||||
<figure><code class="html">He traveled <abbr class="compass">N. W.</abbr>, then <abbr class="compass eoc">E. S. E.</abbr></code></figure>
|
||||
<p>This regex is helpful in finding compass directions: <code class="regex">[NESW]\.([NESW]\.)*?</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<h3>Compounds</h3>
|
||||
<p>Molecular compounds.</p>
|
||||
<figure><code class="html"><abbr class="compound">H<sub>2</sub>O</abbr></code></figure>
|
||||
</li>
|
||||
<li>
|
||||
<h3>Academic degrees</h3>
|
||||
<p>Academic degrees, <em>except</em> ones that, like PhD, include a lowercase letter: BA, BD, BFA, BM, BS, DB, DD, DDS, DO, DVM, JD, LHD, LLB, LLD, LLM, MA, MBA, MD, MFA, MS, MSN.</p>
|
||||
<figure><code class="html">Judith Douglas, <abbr class="degree">DDS</abbr>.</code></figure>
|
||||
</li>
|
||||
<li>
|
||||
<h3>Eras</h3>
|
||||
<p>The abbreviations
|
||||
<abbr class="era">AD</abbr>,
|
||||
<abbr class="era">BC</abbr>,
|
||||
<abbr class="era">CE</abbr>,
|
||||
<abbr class="era">BCE</abbr>.</p>
|
||||
<figure><code class="html">Julius Caesar was born around 100 <abbr class="era">BC</abbr>.</code></figure>
|
||||
</li>
|
||||
<li>
|
||||
<h3>Initialized names</h3>
|
||||
<p>A person’s initials, either first name, last name, or both.</p>
|
||||
<figure><code class="html"><abbr class="name">J. P.</abbr> Morgan was a wealthy man.</code></figure>
|
||||
</li>
|
||||
<li>
|
||||
<h3>State names and postal codes</h3>
|
||||
<p>Abbreviated state names and postal codes: NY, Washington DC.</p>
|
||||
<figure><code class="html">Washington <abbr class="postal">DC</abbr></code></figure>
|
||||
</li>
|
||||
<li>
|
||||
<h3>Temperatures</h3>
|
||||
<p>Abbreviated temperature scales: F, C. Also see the <a href="/contribute/typography#temperatures">typography manual</a>.</p>
|
||||
<figure><code class="html">It was 5°<span class="utf">hairsp</span><abbr class="temperature">C</abbr> last night.</code></figure>
|
||||
</li>
|
||||
<li>
|
||||
<h3>Times</h3>
|
||||
<p>Time-related Latinisms: a.m., p.m. Also see the <a href="/contribute/typography#times">typography manual</a>.</p>
|
||||
<figure><code class="html">5<span class="utf">nbsp</span><abbr class="time">p.m.</abbr></code></figure>
|
||||
</li>
|
||||
<li>
|
||||
<h3>Timezones</h3>
|
||||
<p>PST, CST, EST, etc.</p>
|
||||
<figure><code class="html">5<span class="utf">nbsp</span><abbr class="time">p.m.</abbr> <abbr class="timezone">PST</abbr></code></figure>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="titles">
|
||||
<h2>The <title> tag</h2>
|
||||
<p>The <code class="html"><title></code> tag should contain an appropriate description of the local file only.</p>
|
||||
<h3>Titles for files that are an individual chapter</h3>
|
||||
<p>In most ebook productions, each chapter will be its own file. In that case, follow these rules:</p>
|
||||
<ul>
|
||||
<li><p>Don’t include the book title in individual chapter <code class="html"><title></code> tags.</p></li>
|
||||
<li><p>Convert chapter numbers that are in Roman numerals to decimal numbers:</p>
|
||||
<code class="html full"><title>Chapter 10</title></code>
|
||||
</li>
|
||||
|
||||
<li><p>If a chapter has a subtitle, add a colon after the chapter number and place the subtitle after that:</p>
|
||||
<code class="html full"><title>Chapter 10: A Dark and Stormy Night</title></code>
|
||||
</li>
|
||||
<li><p>Subtitles may often contain subtags, like <code class="html"><i></code>. Because <code class="html"><title></code> can’t contain subtags, simply remove them when copying into <code class="html"><title></code>:</p>
|
||||
<code class="html full"><title>Chapter 8: Mobilis in Mobili</title></code></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="ids">
|
||||
<h2>Ids</h2>
|
||||
<p>Each <code class="html"><section></code> should have an <code class="html">id</code> attribute corresponding to a URL-friendly version of the <code class="html"><section></code>’s name. For example:</p>
|
||||
<code class="html full"><section id="introduction" epub:type="introduction">
|
||||
<h2 epub:type="title">Introduction</h2>
|
||||
<!--snip-->
|
||||
</section></code>
|
||||
<p>Occasionally you might need to give other elements IDs, for example when an endnote references a specific line or paragraph in the work. In these cases, name the IDs by their tag name, then a dash, then a number representing the tag’s sequential numerical order from the beginning of the containing document.</p>
|
||||
<code class="html full"><section id="introduction" epub:type="introduction">
|
||||
<h2 epub:type="title">Introduction</h2>
|
||||
<p>Some text...</p>
|
||||
<!--snip 10 more <p> tags-->
|
||||
<p id="p-12">Some text...</p>
|
||||
</section></code>
|
||||
|
||||
</section>
|
||||
<section id="lists">
|
||||
<h2>Ordered/numbered and unordered lists</h2>
|
||||
<p>All <code class="html"><li></code> children of <code class="html"><ol></code> and <code class="html"><ul></code> tags <em>must</em> have at least one direct child block-level tag. This is usually a <code class="html"><p></code> tag. (But not necessarily; for example, a <code class="html"><blockquote></code> tag might also be appropriate.)</p>
|
||||
<code class="html full"><ul>
|
||||
<li>
|
||||
<p><b>Miss Oranthy Bluggage</b>, the accomplished Strong-Minded Lecturer, will deliver her famous Lecture on “<b>Woman and Her Position</b>,” at Pickwick Hall, next Saturday Evening, after the usual performances.</p>
|
||||
</li>
|
||||
</ul></code>
|
||||
</section>
|
||||
<section id="blockquotes">
|
||||
<h2>Blockquotes</h2>
|
||||
<p>In most prose works, we generally want to offset long quotations in the <code class="html"><blockquote></code> element. However, we want to be able to distinguish when a quotation is from a real-life source (like a quotation from a Shakespeare play), and when the quotation is fictional within the context of the work. To make this distinction, we assume that the <code class="html"><blockquote></code> inherits the <code class="html">z3998:fiction</code> or <code class="html">z3998:non-fiction</code> semantic inflection of its parent. Thus, if the <code class="html"><blockquote></code> contents differ from that inherited semantic inflection, we specify whether it’s <code class="html">z3998:fiction</code> or <code class="html">z3998:non-fiction</code> in the blockquote element itself.</p>
|
||||
<p>For example, if a <code class="html"><blockquote></code> doesn’t have semantic inflection specified, and it’s within a <code class="html"><section epub:type="z3998:fiction"></code> parent, then the <code class="html"><blockquote></code> is <em>also</em> fictional within the context of the work.</p>
|
||||
<p>In this first example from <i><a href="/ebooks/bram-stoker/dracula">Dracula</a></i>, we have a fictional character quoting a real-life source. Since <i>Dracula</i> is fiction but the quotation source <a href="https://en.wikipedia.org/wiki/Lenore_%28ballad%29">exists in the real world</a>, we include the <code class="html">z3998:non-fiction</code> semantic inflection:</p>
|
||||
<code class="html full"><section epub:type="chapter z3998:fiction">
|
||||
<p>One of my companions whispered to another the line from Burger’s “Lenore”:―</p>
|
||||
<blockquote epub:type="z3998:non-fiction">
|
||||
<p>“<span xml:lang="de">Denn die Todten reiten schnell</span>”—<br/>
|
||||
(“For the dead travel fast.”)</p>
|
||||
</blockquote>
|
||||
</section></code>
|
||||
<p>In this second example from <i><a href="/ebooks/jules-verne/twenty-thousand-leagues-under-the-seas/f-p-walter">Twenty Thousand Leagues Under the Seas</a></i>, a fictional character quotes another fictional character. We still use the <code class="html"><blockquote></code> element, but since the work itself is fiction, the <code class="html"><blockquote></code> “inherits” the semantic inflection of <code class="html">z3998:fiction</code>:</p>
|
||||
<code class="html full"><section epub:type="chapter z3998:fiction">
|
||||
<p>Every morning, it was repeated under the same circumstances. It ran like this:</p>
|
||||
<blockquote xml:lang="x-nemo">
|
||||
<p>“Nautron respoc lorni virch.”</p>
|
||||
</blockquote>
|
||||
</section></code>
|
||||
</section>
|
||||
<section id="halftitlepages">
|
||||
<h2>Half title pages</h2>
|
||||
<p>When a work contains frontmatter like an epigraph or introduction, a half title page is required before the body matter begins.</p>
|
||||
<h3>Half title pages without subtitles</h3>
|
||||
<code class="html full"><?xml version="1.0" encoding="UTF-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/, se: http://standardebooks.org/vocab/1.0" xml:lang="en-GB">
|
||||
<head>
|
||||
<title>Half Title</title>
|
||||
<link href="../css/core.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../css/local.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body epub:type="frontmatter">
|
||||
<section id="halftitlepage" epub:type="halftitlepage">
|
||||
<h1 epub:type="fulltitle">Don Quixote</h1>
|
||||
</section>
|
||||
</body>
|
||||
</html></code>
|
||||
|
||||
<h3>Half title pages with subtitles</h3>
|
||||
<code class="css full">section[epub|type~="halftitlepage"] span[epub|type~="subtitle"]{
|
||||
display: block;
|
||||
font-size: .75em;
|
||||
font-weight: normal;
|
||||
}</code>
|
||||
<code class="html full"><?xml version="1.0" encoding="UTF-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/, se: http://standardebooks.org/vocab/1.0" xml:lang="en-GB">
|
||||
<head>
|
||||
<title>Half Title</title>
|
||||
<link href="../css/core.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../css/local.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body epub:type="frontmatter">
|
||||
<section id="halftitlepage" epub:type="halftitlepage">
|
||||
<h1 epub:type="fulltitle">
|
||||
<span epub:type="title">The Book of Wonder</span>
|
||||
<span epub:type="subtitle">A Chronicle of Little Adventures at the Edge of the World</span>
|
||||
</h1>
|
||||
</section>
|
||||
</body>
|
||||
</html></code>
|
||||
</section>
|
||||
<section id="endnotes">
|
||||
<h2>Footnotes and endnotes</h2>
|
||||
<p>Since there’s no concept of a “page” in an ebook, the concept of “footnotes” isn’t very useful. (Where would a footnote go if there’s no bottom of the page?)</p>
|
||||
<p>Modern ereading systems do, however, offer popup notes. Our task is to combine all footnotes present in a source text into a single endnotes file that provides popup notes to supported readers, and clearly listed notes for other readers.</p>
|
||||
<p>Endnotes must be numbers that are sequential throughout the entire text. Since many books just used “*” to denote a footnote, when converting to endnotes we have to assign those a number.</p>
|
||||
<h3>Linking to endnotes</h3>
|
||||
<p>In the body text, you refer to an endnote using this pattern:</p>
|
||||
<code class="html full"><p>This is some text followed by a reference to an endnote.<a href="../text/endnotes.xhtml#note-1" id="noteref-1" epub:type="noteref">1</a></p></code>
|
||||
<ul>
|
||||
<li><p>The <code class="html">id</code> attribute is always “noteref-N” where N is the number of the endnote.</p></li>
|
||||
<li><p>The <code class="html">epub:type</code> attribute is set to “noteref”.</p></li>
|
||||
<li><p>The endnote goes after ending punctuation.</p></li>
|
||||
</ul>
|
||||
<h3>The endnotes file</h3>
|
||||
<p>The endnotes file is called <code class="path">endnotes.xhtml</code> and looks like this:</p>
|
||||
<code class="html full"><?xml version="1.0" encoding="UTF-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/, se: http://standardebooks.org/vocab/1.0" xml:lang="en-GB">
|
||||
<head>
|
||||
<title>Endnotes</title>
|
||||
<link href="../css/core.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../css/local.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body epub:type="backmatter z3998:fiction">
|
||||
<section id="endnotes" epub:type="rearnotes">
|
||||
<h2 epub:type="title">Endnotes</h2>
|
||||
<ol>
|
||||
<li id="note-1" epub:type="rearnote">
|
||||
<p>The first endnote goes here.</p>
|
||||
<p>Here's another line for the first endnote. <a href="../text/chapter-1.xhtml#noteref-1" epub:type="se:referrer">↩</a></p>
|
||||
</li>
|
||||
<li id="note-2" epub:type="rearnote">
|
||||
<p>The second endnote goes here. <a href="../text/chapter-1.xhtml#noteref-2" epub:type="se:referrer">↩</a></p>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
</body>
|
||||
</html></code>
|
||||
<h3>An endnote dissected</h3>
|
||||
<ul>
|
||||
<li><p>Each individual endnote is a <code class="html"><li></code> element containing one or more <code class="html"><p></code> elements.</p></li>
|
||||
<li><p>Each <code class="html"><li></code> requires the following attributes:</p>
|
||||
<ul>
|
||||
<li><p><code class="html">id</code> is set to the string “note-” followed by the sequential endnote number, beginning with 1.</p></li>
|
||||
<li><p><code class="html">epub:type</code> is set to “rearnote”.</p></li>
|
||||
|
||||
</ul>
|
||||
<li><p>The <code class="html">href</code> attribute points to the direct anchor reference to the endnote. </p></li>
|
||||
|
||||
<li><p>If an endnote contains a citation offset with a dash (for example, “—Ed.”), separate the citation from the text with a single space and enclose it in the <code class="html"><cite></code> tag:</p>
|
||||
<code class="html full"><li id="note-1" epub:type="rearnote">
|
||||
<p>Here’s an endnote. <cite>—<abbr class="eoc">Ed.</abbr></cite> <a href="../text/chapter-1.xhtml#note-1" epub:type="se:referrer">↩</a></p>
|
||||
</li></code>
|
||||
</li>
|
||||
|
||||
<li><p>The final <code class="html"><p></code> element in an endnote contains a link back to the referring anchor. Don’t just point it to the file, make sure it points to the exact link that we came from. For example, <code class="path">chapter-1.xhtml#note-1</code>, <em>not</em> <code class="path">chapter-1.xhtml</code>. If the link is the last element in a longer <code class="html"><p></code> tag, it must be preceded by one space character; if it is the only child of a <code class="html"><p></code> tag (for example if the previous text was a <code class="html"><blockquote></code>) then it can be on its own line. It must have the <code class="html">epub:type</code> set to <code class="html">se:referrer</code>. The text of the link is always the “↩” character.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="thought-and-section-breaks">
|
||||
<h2>Thought and section breaks</h2>
|
||||
<p>In printed material, thought and section breaks are typically denoted with a large space between paragraphs, or by a symbol like “* * *”. In Standard Ebooks, use the <code class="html"><hr/></code> element to denote thought and section breaks.</p>
|
||||
</section>
|
||||
<section id="chapter-headers">
|
||||
<h2>Section header semantic patterns</h2>
|
||||
<p>There’s a lot of ways authors choose to format chapter headers. Below are patterns for all of the types of chapter headers we’ve encountered so far. If nothing in this list fits the book you’re producing, <a href="/contribute/">contact us</a> and we’ll work on a new standard.</p>
|
||||
<h3>General outline</h3>
|
||||
<ul>
|
||||
<li><p>The title of the book is an implied <code class="html"><h1></code> element. Therefore, all chapters titles are <code class="html"><h2></code> elements or lower.</p></li>
|
||||
<li><p>It’s extremely rare to go down to <code class="html"><h3></code> and below, but you may do so if, for example, the chapter is part of a volume whose title would occupy the <code class="html"><h2></code> level. Otherwise, if you feel the need to use <code class="html"><h3></code>, ask yourself if the header is a structural division of the document. For example, in a work of fiction where a fictional newspaper clipping is presented, the headline <em>would not</em> be set in an <code class="html"><h3></code> element, because the clipping is part of the body text, not a structural division of the book.</p></li>
|
||||
</ul>
|
||||
<h3>Sections without titles</h3>
|
||||
<code class="html full"><h2 epub:type="title z3998:roman">XI</h2></code>
|
||||
<h3>Sections with titles but no chapter numbers</h3>
|
||||
<code class="html full"><h2 epub:type="title">A Daughter of Albion</h2></code>
|
||||
<h3>Sections with titles and chapter numbers</h3>
|
||||
<code class="html full"><h2 epub:type="title">
|
||||
<span epub:type="z3998:roman">XI</span>
|
||||
<span epub:type="subtitle">Who Stole the Tarts?</span>
|
||||
</h2></code>
|
||||
<code class="css full">span[epub|type~="subtitle"]{
|
||||
display: block;
|
||||
font-weight: normal;
|
||||
}</code>
|
||||
<h3>Sections with unnumbered titles and subtitles</h3>
|
||||
<code class="html full"><h2 epub:type="title">
|
||||
<span>An Adventure</span>
|
||||
<span epub:type="subtitle">(A Driver’s Story)</span>
|
||||
</h2></code>
|
||||
<code class="css full">span[epub|type~="subtitle"]{
|
||||
display: block;
|
||||
font-weight: normal;
|
||||
}</code>
|
||||
<h3>Sections with bridgeheads</h3>
|
||||
<p>Note that we include trailing punctuation at the end of the bridgehead. If it’s not present in the source text, add it.</p>
|
||||
<p>Since the text in the bridgehead is italicized, we include <abbr class="initialism">CSS</abbr> to render actual <code class="html"><i></code> elements contained in the bridgehead as normal text.</p>
|
||||
|
||||
<code class="html full"><header>
|
||||
<h2 epub:type="title z3998:roman">I</h2>
|
||||
<p epub:type="bridgehead">Which treats of the character and pursuits of the famous gentleman Don Quixote of La Mancha.</p>
|
||||
</header></code>
|
||||
<code class="css full">[epub|type~="bridgehead"]{
|
||||
display: inline-block;
|
||||
font-style: italic;
|
||||
max-width: 60%;
|
||||
text-align: justify;
|
||||
text-indent: 0;
|
||||
}
|
||||
|
||||
[epub|type~="bridgehead"] i{
|
||||
font-style: normal;
|
||||
}</code>
|
||||
<h3>Sections with epigraph in section headers</h3>
|
||||
|
||||
<!-- Once RMSDK supports display: table; we can do this much nicer combination:
|
||||
/* All epigraphs */
|
||||
section > header blockquote[epub|type~="epigraph"],
|
||||
section[epub|type~="epigraph"] > *{
|
||||
display: table;
|
||||
margin: auto;
|
||||
max-width: 60%;
|
||||
margin-top: 3em;
|
||||
}
|
||||
|
||||
[epub|type~="epigraph"]{
|
||||
font-style: italic;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
[epub|type~="epigraph"] i{
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
[epub|type~="epigraph"] cite{
|
||||
margin-top: 1em;
|
||||
font-style: normal;
|
||||
font-variant: small-caps;
|
||||
}
|
||||
|
||||
[epub|type~="epigraph"] cite i{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Full-page epigraphs */
|
||||
@supports(display: flex){
|
||||
section[epub|type~="epigraph"]{
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
min-height: calc(98vh - 3em);
|
||||
padding-top: 3em;
|
||||
}
|
||||
|
||||
section[epub|type~="epigraph"] > *{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
section[epub|type~="epigraph"] > * + *{
|
||||
margin-top: 3rem;
|
||||
}
|
||||
}
|
||||
-->
|
||||
|
||||
<code class="html full"><header>
|
||||
<h2 epub:type="title z3998:roman">XXVIII</h2>
|
||||
<blockquote epub:type="epigraph">
|
||||
<p>Brief, I pray for you; for you see, ’tis a busy time with me.</p>
|
||||
<cite><i epub:type="se:name.publication.play">Much Ado About Nothing</i></cite>
|
||||
</blockquote>
|
||||
</header></code>
|
||||
<code class="css full">/* All epigraphs */
|
||||
[epub|type~="epigraph"]{
|
||||
font-style: italic;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
[epub|type~="epigraph"] em,
|
||||
[epub|type~="epigraph"] i{
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
[epub|type~="epigraph"] cite{
|
||||
margin-top: 1em;
|
||||
font-style: normal;
|
||||
font-variant: small-caps;
|
||||
}
|
||||
|
||||
[epub|type~="epigraph"] cite i{
|
||||
font-style: italic;
|
||||
}
|
||||
/* End all epigraphs */
|
||||
|
||||
/* Epigraphs in section headers */
|
||||
section > header [epub|type~="epigraph"]{
|
||||
display: inline-block;
|
||||
margin: auto;
|
||||
max-width: 80%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
section > header [epub|type~="epigraph"] + *{
|
||||
margin-top: 3em;
|
||||
}
|
||||
|
||||
@supports(display: table){
|
||||
section > header [epub|type~="epigraph"]{
|
||||
display: table;
|
||||
}
|
||||
}
|
||||
/* End epigraphs in section headers */</code>
|
||||
</section>
|
||||
<section id="epigraphs">
|
||||
<h2>Full-page epigraphs</h2>
|
||||
<p>Full-page epigraphs have the epigraph centered on the page, for ereaders who support advanced CSS. For all other ereaders, the epigraph is horizontally centered with a small margin above it.</p>
|
||||
<p>Additional epigraphs on the same page can be represented with additional <code class="html"><blockquote></code> elements.</p>
|
||||
<code class="html full"><body epub:type="frontmatter">
|
||||
<section id="epigraph" epub:type="epigraph">
|
||||
<blockquote>
|
||||
<p>“I was born in Boston, New England, and owe my first instructions in literature to the free grammar-schools established there. I therefore give one hundred pounds sterling to my executors, to be by them … paid over to the managers or directors of the free schools in my native town of Boston, to be by them … put out to interest, and so continued at interest forever, which interest annually shall be laid out in silver medals, and given as honorary rewards annually by the directors of the said free schools belonging to the said town, in such manner as to the discretion of the selectmen of the said town shall seem meet.”</p>
|
||||
</blockquote>
|
||||
</section>
|
||||
</body></code>
|
||||
<code class="css full">/* All epigraphs */
|
||||
[epub|type~="epigraph"]{
|
||||
font-style: italic;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
[epub|type~="epigraph"] em,
|
||||
[epub|type~="epigraph"] i{
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
[epub|type~="epigraph"] cite{
|
||||
margin-top: 1em;
|
||||
font-style: normal;
|
||||
font-variant: small-caps;
|
||||
}
|
||||
|
||||
[epub|type~="epigraph"] cite i{
|
||||
font-style: italic;
|
||||
}
|
||||
/* End all epigraphs */
|
||||
|
||||
/* Full-page epigraphs */
|
||||
section[epub|type~="epigraph"]{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
section[epub|type~="epigraph"] > *{
|
||||
display: inline-block;
|
||||
margin: auto;
|
||||
margin-top: 3em;
|
||||
max-width: 80%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@supports(display: flex){
|
||||
section[epub|type~="epigraph"]{
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
min-height: calc(98vh - 3em);
|
||||
padding-top: 3em;
|
||||
}
|
||||
|
||||
section[epub|type~="epigraph"] > *{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
section[epub|type~="epigraph"] > * + *{
|
||||
margin-top: 3em;
|
||||
}
|
||||
}
|
||||
/* End full-page epigraphs */</code>
|
||||
|
||||
</section>
|
||||
<section id="letters">
|
||||
<h2>Letter semantic patterns</h2>
|
||||
<p>Coming soon!</p>
|
||||
</section>
|
||||
<section id="poetry">
|
||||
<h2>Poetry, verse, and song semantic patterns</h2>
|
||||
<p>Unfortunately there’s no great way to semantically format poetry in <abbr class="initialism">HTML</abbr>. We have to conscript unrelated elements for use in poetry.</p>
|
||||
<h3>General outline</h3>
|
||||
<ul>
|
||||
<li><p>A stanza is represented by a <code class="html"><p></code> element.</p></li>
|
||||
<li><p>Each stanza contains <code class="html"><span></code> elements, each one representing a line in the stanza. Delimiting lines in <code class="html"><span></code> elements allows us to use <abbr class="initialism">CSS</abbr> to automatically indent long lines that wrap across the page.</p></li>
|
||||
<li><p>Each line is followed by a <code class="html"><br/></code> element, <em>except</em> for the last line in a stanza. Since <code class="html"><span></code> is an inline element, unstyled <code class="html"><span></code>s don’t have line breaks. Including a <code class="html"><br/></code> emulates line breaks for readers that for some crazy reason might not support <abbr class="initialism">CSS</abbr>.</p></li>
|
||||
<li><p>For indented lines, add the <code class="html">i1</code> class to the <code class="html"><span></code> element. <em>Do not</em> use <span class="utf">nbsp</span> for indentation. You can indent to multiple levels by incrementing the class to <code class="html">i2</code>, <code class="html">i3</code>, and so on, and including the appropriate <abbr class="initialism">CSS</abbr>.</p></li>
|
||||
<li><p>If the poem is a shorter part of a longer work, like a novel, then wrap the stanzas in a <code class="html"><blockquote></code> element.</p></li>
|
||||
<li><p>If the poem is a standalone composition and part of a larger collection of poetry, wrap it in an <code class="html"><article></code> element instead. The semantics of <code class="html"><article></code> imply that the poem can be pulled out of the collection as a standalone item.</p></li>
|
||||
<li><p>Give the containing element the semantic inflection of <code class="html">z3998:poem</code>, <code class="html">z3998:verse</code>, or <code class="html">z3998:song</code>.</p></li>
|
||||
</ul>
|
||||
<h3>Complete <abbr class="initialism">HTML</abbr> and <abbr class="initialism">CSS</abbr> markup examples</h3>
|
||||
<p>Note that below we include <abbr class="initialism">CSS</abbr> for the <code class="html">i2</code> class, even though it’s not used in the example; it’s included to demonstrate how to adjust the CSS for indentation levels after the first.</p>
|
||||
<code class="css full">[epub|type~="z3998:poem"] p{
|
||||
text-align: left;
|
||||
text-indent: 0;
|
||||
}
|
||||
|
||||
[epub|type~="z3998:poem"] p > span{
|
||||
display: block;
|
||||
text-indent: -1em;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
[epub|type~="z3998:poem"] p > span + br{
|
||||
display: none;
|
||||
}
|
||||
|
||||
[epub|type~="z3998:poem"] p + p{
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
[epub|type~="z3998:poem"] + p{
|
||||
text-indent: 0;
|
||||
}
|
||||
|
||||
p span.i1{
|
||||
text-indent: -1em;
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
p span.i2{
|
||||
text-indent: -1em;
|
||||
padding-left: 3em;
|
||||
}</code>
|
||||
<code class="html full"><blockquote epub:type="z3998:poem">
|
||||
<p>
|
||||
<span>“How doth the little crocodile</span>
|
||||
<br/>
|
||||
<span class="i1">Improve his shining tail,</span>
|
||||
<br/>
|
||||
<span>And pour the waters of the Nile</span>
|
||||
<br/>
|
||||
<span class="i1">On every golden scale!</span>
|
||||
</p>
|
||||
<p>
|
||||
<span>“How cheerfully he seems to grin,</span>
|
||||
<br/>
|
||||
<span class="i1">How neatly spread his claws,</span>
|
||||
<br/>
|
||||
<span>And welcome little fishes in</span>
|
||||
<br/>
|
||||
<span class="i1"><em>With gently smiling jaws!</em>”</span>
|
||||
</p>
|
||||
</blockquote></code>
|
||||
<h3>Elision in poetry</h3>
|
||||
<p>If a poem is quoted with one or more lines removed, the removed lines are represented with a vertical ellipses (⋮, U+22EE) in <code class="html"><span class="elision"></code>, styled like so:</p>
|
||||
<code class="html full"><blockquote epub:type="z3998:verse">
|
||||
<p>
|
||||
<span>O Lady! we receive but what we give,</span>
|
||||
<br/>
|
||||
<span>And in our life alone does nature live:</span>
|
||||
<br/>
|
||||
<span>Ours is her wedding garments, ours her shroud!</span>
|
||||
<br/>
|
||||
<span class="elision">⋮</span>
|
||||
<br/>
|
||||
<span class="i1">Ah! from the soul itself must issue forth</span>
|
||||
<br/>
|
||||
<span>A light, a glory, a fair luminous cloud,</span>
|
||||
</p>
|
||||
</blockquote></code>
|
||||
<code class="css full">span.elision{
|
||||
margin: .5em;
|
||||
margin-left: 3em;
|
||||
}
|
||||
|
||||
/* If eliding within an epigraph, include this additional style: */
|
||||
[epub|type~="epigraph"] span.elision{
|
||||
font-style: normal;
|
||||
}</code>
|
||||
</section>
|
||||
<section id="images">
|
||||
<h2>Images</h2>
|
||||
<ul>
|
||||
<li><p>All <code class="html"><img></code> tags are required to have an <code class="html">alt</code> attribute that uses prose to describe the image in detail; this is what screen reading software will be read aloud.</p>
|
||||
<ul>
|
||||
<li><p>Describe the image itself in words, which is not the same as writing a caption or describing its place in the book.</p></li>
|
||||
<li><p>Alt text must be full sentences ended with periods or other appropriate punctuation. Sentence fragments, or complete sentences without ending punctuation, are not acceptable.</p></li>
|
||||
</ul>
|
||||
<p>For example:</p>
|
||||
<figure class="text">
|
||||
<p class="wrong"><img alt="The illustration for chapter 10" src="..."></p>
|
||||
<p class="wrong"><img alt="Pierre's fruit-filled dinner" src="..."></p>
|
||||
<p class="corrected"><img alt="An apple and a pear inside a bowl, resting on a table." src="..."></p>
|
||||
</figure>
|
||||
<p>Note that the <code class="html">alt</code> text does not necessarily have to be the same as text in the image’s <code class="html"><figcaption></code> element. You can use <code class="html"><figcaption></code> to write a concise context-dependent caption.</p>
|
||||
</li>
|
||||
<li><p>Include an <code class="html">epub:type</code> attribute to denote the type of image. Common values are <code class="html">z3998:illustration</code> or <code class="html">z3998:photograph</code>.</p></li>
|
||||
<li><p>For some images, it’s helpful to invert their colors when the ereader enters night mode. This is particularly true for black-and-white line art and woodcuts. (Note <em>black-and-white</em>, i.e. only two colors, <strong>not</strong> grayscale!) Include the <code class="html">se:image.color-depth.black-on-transparent</code> semantic in the <code class="html"><img></code> tag’s <code class="html">epub:type</code> to enable color inversion in some ereaders.</p>
|
||||
<p>For that sort of art, save the images as PNG files with a transparent background. You can make the background transparent by using the “Color to alpha” tool available in many image editing programs, like <a href="https://www.gimp.org/">the GIMP</a>.</p></li>
|
||||
<li><p><code class="html"><img></code> tags that are meant to be aligned on the block level should be contained in a parent <code class="html"><figure></code> tag, with an optional <code class="html"><figcaption></code> sibling.</p>
|
||||
<ul>
|
||||
<li><p>If contained in a <code class="html"><figure></code> tag, the image’s <code class="html">id</code> attribute must be on the <code class="html"><figure></code> tag.</p></li></ul>
|
||||
</li>
|
||||
<li><p>Some sources of illustrations may have scanned them directly from the page of an old book, resulting in yellowed, dingy-looking scans of grayscale art. In these cases, convert the image to grayscale to remove the yellow tint.</p></li>
|
||||
</ul>
|
||||
<h3>Complete <abbr class="initialism">HTML</abbr> and <abbr class="initialism">CSS</abbr> markup examples</h3>
|
||||
<code class="css full">/* If the image is meant to be on its own page, use this selector... */
|
||||
figure.full-page{
|
||||
margin: 0;
|
||||
max-height: 100%;
|
||||
page-break-before: always;
|
||||
page-break-after: always;
|
||||
page-break-inside: avoid;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* If the image is meant to be inline with the text, use this selector... */
|
||||
figure{
|
||||
margin: 1em auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* In all cases, also include the below styles */
|
||||
figure img{
|
||||
display: block;
|
||||
margin: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
figure + p{
|
||||
text-indent: 0;
|
||||
}
|
||||
|
||||
figcaption{
|
||||
font-size: .75em;
|
||||
font-style: italic;
|
||||
}</code>
|
||||
<code class="html full"><figure id="image-10">
|
||||
<img alt="An apple and a pear inside a bowl, resting on a table." src="../images/image-10.jpg" epub:type="z3998:photograph"/>
|
||||
<figcaption>The Monk’s Repast</figcaption>
|
||||
</figure></code>
|
||||
<code class="html full"><figure class="full-page" id="image-11">
|
||||
<img alt="A massive whale breaching the water, with a sailor floating in the water directly within the whale’s mouth." src="../images/image-11.jpg" epub:type="z3998:illustration"/>
|
||||
<figcaption>The Whale eats Sailor Jim.</figcaption>
|
||||
</figure></code>
|
||||
</section>
|
||||
<section id="loi">
|
||||
<h2>List of Illustrations (the LoI)</h2>
|
||||
<p>If an ebook has any illustrations that are major structural components of the work (even just one!), then we must include an <code class="path">loi.xhtml</code> file at the end of the ebook. This file lists the illustrations in the ebook, along with a short caption or description.</p>
|
||||
<p>An illustration is a major strucutral component if, for example: it is an illustration of events in the book, like a full-page drawing or end-of-chapter decoration; it is essential to the plot, like a diagram of a murder scene or a map; or it is a component of the text, like photographs in a documentary narrative.</p>
|
||||
<p>Illustration that are <em>not</em> major structural components would be, for example: drawings used to represent a person's signature, like an X mark; inline drawings representing text in alien languages; drawings used as layout elements to illustrate diagrams.</p>
|
||||
<p>If the image has a <code class="html"><figcaption></code> element, then use that caption in the LoI. If not, use the image’s <code class="html">alt</code> tag, which should be a short prose description of the image used by screen readers.</p>
|
||||
<p>Links to the images should go directly to their IDs, not just the top of the containing file.</p>
|
||||
<p>The code below is the template for a basic LoI skeleton. Please copy and paste the entire thing as a starting point for your own LoI:</p>
|
||||
<code class="html full"><?xml version="1.0" encoding="UTF-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/, se: http://standardebooks.org/vocab/1.0" xml:lang="en-GB">
|
||||
<head>
|
||||
<title>List of Illustrations</title>
|
||||
<link href="../css/core.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../css/local.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body epub:type="backmatter">
|
||||
<section id="loi" epub:type="loi">
|
||||
<nav epub:type="loi">
|
||||
<h2 epub:type="title">List of Illustrations</h2>
|
||||
<ol>
|
||||
<li>
|
||||
<a href="../text/preface.xhtml#the-edge-of-the-world">The Edge of the World</a>
|
||||
</li>
|
||||
|
||||
<!--snip all the way to the end-->
|
||||
</ol>
|
||||
</nav>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
</code>
|
||||
</section>
|
||||
<aside class="alert">
|
||||
<p>Standard Ebooks is a brand-new project—this manual is a pre-alpha, and much of it is incomplete. If you have a question, need clarification, or run in to an issue not yet covered here, please <a href="https://groups.google.com/forum/#!forum/standardebooks">contact us</a> so we can update this manual.</p>
|
||||
</aside>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
83
www/contribute/tips-for-editors-and-proofreaders.php
Normal file
|
@ -0,0 +1,83 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'Tips for Editors and Proofreaders', 'js' => true, 'highlight' => 'contribute', 'description' => 'A list of tips and tricks for people who’d like to proofread a Standard Ebooks ebook.']) ?>
|
||||
<main>
|
||||
<article>
|
||||
<h1>Tips for Editors and Proofreaders</h1>
|
||||
<p>Advances in ereading devices and software have made proofreading ebooks a whole lot easier than in the past.</p>
|
||||
<p>Most ereading software allows you to highlight text and add notes to those highlights. If you’re using a device like a Kindle or a phone or tablet with the Google Play Books app, try holding your finger on some text. It’ll become highlighted, and you can drag the highlight to include more text if you like.</p>
|
||||
<p>That means the quickest way for you to proofread an ebook is to <a href="/help/how-to-use-our-ebooks">transfer it to your ereader</a> and start reading! Once you find an error, use the highlight feature to mark it, and keep on reading. Many errors, like mis-curled quotation marks or obvious spelling errors, don’t need a written note to accompany the highlight. But you should make a brief written note if the error wouldn’t be clear to a passing reader.</p>
|
||||
<p>Once you’ve finished the ebook, use your ereader’s “view all notes” option to find all of your highlights in one place. Then you can either <a href="/contribute/report-errors">report them to us</a>, or if you’re technically-minded, correct them directly in the ebook’s <a href="http://github.com/standardebooks">Github repository</a>. Remember to read our <a href="/contribute/typography">typography manual</a> to make sure the error you found is covered.</p>
|
||||
<section id="common-errors">
|
||||
<h2>Common errors to watch out for</h2>
|
||||
<p>Lots of different errors can occur during the long and complex process of digitizing a print book, but here are some of the more common ones:</p>
|
||||
<ul>
|
||||
<li><h3>Mis-curled quotation marks</h3>
|
||||
<p>Here we see two frequent errors: a mis-curled double quotation mark following the em-dash, and a mis-curled single quotation mark before the “n”:</p>
|
||||
<figure class="text">
|
||||
<p class="wrong">I was putting on some Bach when he interrupted with—”Put on some rock ‘n’ roll!”</p>
|
||||
<p class="corrected">I was putting on some Bach when he interrupted with—“Put on some rock ’n’ roll!”</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li><h3>Incorrect or archaic use of quotation marks</h3>
|
||||
<p>Older texts frequently use quotation marks for names of books and periodicals, or for the names of pubs, inns, and other places. Our <a href="/contribute/typography">typography manual</a> requires that certain standalone media be in italics instead, and that place names <em>not</em> be set in quotes.</p>
|
||||
<figure class="text">
|
||||
<p class="wrong">He read “Candide” while having a pint at the “King’s Head.”</p>
|
||||
<p class="corrected">He read <i>Candide</i> while having a pint at the King’s Head.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<h3>Missing italics</h3>
|
||||
<p>Often transcribers just don’t include italics at all in their work. A very quick visual scan of a HathiTrust or Google Books copy of the book you’re proofing should bring any sections in italics to your attention. Make sure to confirm them in the transcription, so that we’re not missing italics that should be there.</p>
|
||||
|
||||
<li>
|
||||
<h3>Ending dialog with a double-em-dash</h3>
|
||||
<p>Some authors were in the habit of showing a sudden break in dialog with an extra-wide double-em-dash. Our <a href="/contribute/typography">typography manual</a> requires that these be replaced by single em-dashes, so mark them for correction.</p>
|
||||
<figure class="text">
|
||||
<p class="wrong">“Why, I never——” she cried.</p>
|
||||
<p class="corrected">“Why, I never—” she cried.</p>
|
||||
</figure>
|
||||
<p>Note that a double-em-dash is appropriate when purposefully obscuring a word or place. In this case, use the two-em-dash glyph (⸻ or U+2E3A) instead of two consecutive em-dashes:</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">Sally J⸺ walked through the town of ⸻ in the year 19—.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<h3>Using &c. instead of etc.</h3>
|
||||
<p>“etc.” is an abbreviation of the Latin <i>et cetera</i>; In Latin, <i>et</i> means “and”, so older texts often abbreviated <i>et cetera</i> as “&c.”</p>
|
||||
<p>Our <a href="/contribute/typography">typography manual</a> requires a change from &c. to etc., so make sure to mark these corrections.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h3>Use of “ibid.” in footnotes or endnotes</h3>
|
||||
<p>In work with footnotes or endnotes, “ibid.” means that the source for this note is the same as the previous note on the page.</p>
|
||||
<p>Since Standard Ebooks consolidate all footnotes and endnotes into popup footnotes, ibid. becomes meaningless—there’s no concept of a “page” anymore. If you encounter ibid., replace it with the complete reference from the previous note so readers using popup footnotes won’t get confused.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h3>Text in all caps</h3>
|
||||
<p>Many transcriptions of older texts were made in a time when rich <abbr class="initialism">HTML</abbr> markup wasn’t yet available. Those transcriptions sometimes used ALL CAPS to indicate small caps or boldface in the source text.</p>
|
||||
<p>All caps is almost never correct typography. Mark text in all caps for conversion to small caps or boldface.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h3>Section dividers as text instead of as markup</h3>
|
||||
<p>There are lots of ways authors mark section breaks in text. A common way to do this is with three or more asterisks:</p>
|
||||
<figure class="text">
|
||||
<code class="html full"><p>Some text in the first section...</p>
|
||||
<p>***</p>
|
||||
<p>The second section begins...</p>
|
||||
</code>
|
||||
</figure>
|
||||
<p>In Standard Ebooks, sections must be marked with the <code class="html"><hr/></code> tag:</p>
|
||||
<figure class="text">
|
||||
<code class="html full"><p>Some text in the first section...</p>
|
||||
<hr/>
|
||||
<p>The second section begins...</p>
|
||||
</code>
|
||||
</figure>
|
||||
<p>As you’re reading, the <code class="html"><hr/></code> tag appears as a short black line dividing sections.</p>
|
||||
<p>Mark for correction any section breaks that don’t use the <code class="html"><hr/></code> tag.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
14
www/contribute/toolset.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'Toolset Guidelines', 'highlight' => 'contribute', 'description' => 'Guidelines for programming language and code style used in the Standard Ebooks toolset.']) ?>
|
||||
<main>
|
||||
<article>
|
||||
<h1>Toolset Guidelines</h1>
|
||||
<p>You can <a href="https://github.com/standardebooks/tools">view our toolset on Github</a>.</p>
|
||||
<p>Contributions should be in Python 3.</p>
|
||||
<p>In general we follow a relaxed version of <a href="https://www.python.org/dev/peps/pep-0008/">PEP 8</a>. In particular, we use tabs instead of spaces, and there is no line length limit.</p>
|
||||
<p>Always use the <code class="path">regex</code> module instead of the <code class="path">re</code> module.</p>
|
||||
<p>At the minimum, scripts should use programs available for installation on Ubuntu 18.04 LTS systems, either via <code class="program">apt</code> or <code class="program">pip3</code>.</p>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
856
www/contribute/typography.php
Normal file
|
@ -0,0 +1,856 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'Typography Manual', 'js' => true, 'highlight' => 'contribute', 'description' => 'The Standard Ebooks Typography Manual, containing details on specific typographic requirements for Standard Ebooks ebooks.']) ?>
|
||||
<main>
|
||||
<article>
|
||||
<h1>Typography Manual</h1>
|
||||
<aside class="alert">
|
||||
<p>Standard Ebooks is a brand-new project—this manual is a pre-alpha, and much of it is incomplete. If you have a question, need clarification, or run in to an issue not yet covered here, please <a href="https://groups.google.com/forum/#!forum/standardebooks">contact us</a> so we can update this manual.</p>
|
||||
</aside>
|
||||
<h2>The Standard Ebooks Style Philosophy</h2>
|
||||
<p>Standard Ebooks’ goal is to bring classic public domain literature into the digital era by making it accessible, attractive, and by maintaining a high standard of quality. To that end we’re not interested in slavishly reproducing the formatting quirks, transcription errors, publisher’s ephemera, or other inconsequential style decisions of the past. While we strive to be good custodians of the literature entrusted to the public, we recognize that the freedom of the public domain intersects with the Internet era in a way that allows us to present that literature in an attractive, modern, and and high-quality way.</p>
|
||||
<h2>Your task</h2>
|
||||
<p>As an editor, proofreader, or producer of a Standard Ebook, part of your task is to take the source transcription of your ebook and apply this typography manual to it. This manual outlines various standardizations and modernizations to old typography practices, making older texts easier to read for modern readers.</p>
|
||||
<p>Many of the rules below have been accepted standards for a hundred years or more. That means that many of the ebooks you produce may not need that much adjustment. The <code class="program">typogrify</code> tool in the <a href="https://github.com/standardebooks/tools">Standard Ebooks toolset</a> also automatically takes care of some (but not all!) of these rules. Typically, the older the source, the more of these rules you’ll have to check during production.</p>
|
||||
<h2>Normalizing different formatting styles</h2>
|
||||
<p>Our general rule is: <b>If it doesn’t affect the meaning of the work, then normalize it according to these standards.</b></p>
|
||||
<section id="common-problems">
|
||||
<h2>Common problems to keep an eye out for</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Some sources use a two-em-dash to interrupt dialog. You should replace such two-em-dashes with a single em-dash according to the <a href="#dashes">section on dashes</a>.</p>
|
||||
<figure class="text">
|
||||
<p class="wrong">“Why, I never——” she cried.</p>
|
||||
<p class="corrected">“Why, I never—” she cried.</p>
|
||||
</figure>
|
||||
<p>Note that a two-em-dash is <em>also</em> used to signify a missing or purposefully obscured word. This is correct, but you should ensure that instead of two consecutive em-dashes, you use the two-em-dash glyph (⸺ or U+2E3A) for <em>partially</em>-obscured words, the three-em-dash glyph (⸻ or U+2E3B) for <em>completely</em>-obscured words, and a single em-dash for partially-obscured <em>years</em>.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">Sally J⸺ walked through the town of ⸻ in the year 19—.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Small caps are commonly used instead of italics for emphasis in older texts, and some transcriptions use all caps instead of italics. These should generally be converted to regular case and wrapped in <code class="html"><em></code> tags. If a text truly does call for extreme emphasis, the <code class="html"><strong></code> tag can be used—but think twice about using it, and use it sparingly. See the <a href="#text-in-all-caps">section on text in all caps</a>.</p>
|
||||
<figure class="text">
|
||||
<p class="wrong">That donut was DELICIOUS!</p>
|
||||
<p class="corrected">That donut was <em>delicious</em>!</p>
|
||||
</figure>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="general">
|
||||
<h2>General</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Our general style guide is the Chicago Manual of Style, 16th edition, with a few tweaks outlined below. Work following a different style guide should be converted to conform to ours, unless it changes the meaning of the work.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Do</em> convert from logical punctuation to American punctuation where possible.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Do</em> convert from British quotation to American quotation where possible. The <code class="program">british2american</code> script is helpful for automating most (but not all!) of this.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="section-endings">
|
||||
<h2>Section endings</h2>
|
||||
<p>Some older books end with “The End”, “Fin”, or some other equivalent. Remove these.</p>
|
||||
<p>Some books also end individual sections or chapters with “The end of such-and-such section”. Remove these as well.</p>
|
||||
</section>
|
||||
<section id="chapters">
|
||||
<h2>Chapter names and titles</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>In the body text, always use Roman numerals for chapter numbers instead of Arabic numerals. But in an individual file’s <code class="html"><title></code> tag, <em>do</em> use Arabic numbers instead of Roman numerals.</p>
|
||||
<p><em>Do not</em> use the Unicode Roman numeral glyphs, as they are deprecated; use regular letters.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Convert all-caps or small-caps titles to title case. Use the <code class="program">titlecase</code> script in the <a href="https://github.com/standardebooks/tools">Standard Ebooks toolset</a> for consisent titlecasing.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Remove trailing periods from chapter titles.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Omit the word “Chapter” from chapter titles.</p>
|
||||
<p>Some ebooks should keep “Chapter” in titles if clarity is necessary: for example, <i><a href="/ebooks/mary-shelley/frankenstein/">Frankenstein</a></i> has “Chapter” in titles to differentiate between the “Letter” sections.</p>
|
||||
<figure class="text">
|
||||
<p class="wrong">Chapter 33</p>
|
||||
<p class="corrected">XXXIII</p>
|
||||
</figure>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="italics-or-quotes">
|
||||
<h2>Italicizing or quoting newly-used words</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>When introducing new terms, italicize foreign or technical terms, but use quotation marks for terms composed of regular English.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">English whalers have given this the name “ice blink.”</p>
|
||||
<p class="corrected">The soil consisted of that igneous gravel called <i>tuff</i>.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Don’t italicize English neologisms in works where a special vocabulary is a regular part of the narrative; specifically, science fiction works that may necessarily contain made-up English technology words. However, <em>do</em> italicize “alien” language in such works.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Including <em>both</em> italics <em>and</em> quotes, outside of the context of quoted dialog, is usually not necessary. Use one or the other based on the rules above.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="names-and-titles">
|
||||
<h2>Names and titles: Italicize or quote?</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Names and titles are usually <em>either</em> italicized <em>or</em> quoted, but almost never both. Pick one or the other based on the rules below.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Older work may pick the opposite of the rules below; change such texts to match this manual.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Older work may use quotation marks around proper names, like pub, bar, building, or company names. Remove those quotes.</p>
|
||||
<figure class="text">
|
||||
<p class="wrong">He read “Candide” while having a pint at the “King’s Head.”</p>
|
||||
<p class="corrected">He read <i>Candide</i> while having a pint at the King’s Head.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>In general, italicize things that can stand alone. Specifically:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Magazines</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Plays</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Books and novels <em>except</em> “holy texts,” like the Bible or books within the Bible</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Long musical compositions, like operas</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Albums</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Films</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>TV shows</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Radio shows</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Titles of artwork</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Long poems and ballads, like the <i>Iliad</i></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Pamphlets</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Journals</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Newspapers</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Names of ships</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Names of sculptures</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>In general, quote things that are short or parts of longer work. Specifically:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Short musical compositions, like pop songs</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Chapter titles</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Short stories</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Individual newspaper or journal articles</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Essays</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Short films</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Episodes in a TV or radio series</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="capitalization">
|
||||
<h2>Capitalization</h2>
|
||||
<section id="capitalization-general">
|
||||
<h3>General</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Some very old works frequently capitalize nouns that today we no longer capitalize. In general, only capitalize the beginnings of clauses, and proper nouns in the way that you would in modern English writing. Remove archaic capitalization unless doing so would change the meaning of the work.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="text-in-all-caps">
|
||||
<h3>Text in all caps</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Text in all caps is almost never correct typography. Instead, convert such text to the correct case and surround it with a semantically-meaningful tag like <code class="html"><em></code> (for emphasis), <code class="html"><strong></code> (for strong emphasis, like shouting) or <code class="html"><b></code> (for unsemantic formatting required by the text). Then, use <code class="css">font-weight: normal; font-variant: small-caps;</code> styling to render those tags in small caps.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<figure class="text">
|
||||
<p class="corrected">The sign read <b>Bob’s Restaurant</b>.</p>
|
||||
<p class="corrected">“<strong>Charge!</strong>” he cried.</p>
|
||||
</figure>
|
||||
</section>
|
||||
<section>
|
||||
<h3>Apostrophes</h3>
|
||||
<p>When addressing something as an apostrophe, “O” is capitalized.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">I carried the bodies into the sea, O walker in the sea!</p>
|
||||
</figure>
|
||||
</section>
|
||||
</section>
|
||||
<section id="spacing">
|
||||
<h2>Spacing</h2>
|
||||
<ul>
|
||||
<li>Sentences should be single-spaced. Convert double-spaced sentences to single-space.</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="italics">
|
||||
<h2>Italics</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Italics should generally be used for emphasis. Some older texts make frequent use of small caps for emphasis; change these to italics. Italics indicating emphasis must be wrapped with the <code class="html"><em></code> tag.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Set individual letters that are read as letters in italics...</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">He often rolled his <i>r</i>’s.</p>
|
||||
</figure>
|
||||
<p><em>Unless</em> referring to a name that happens to be a single letter or composed of single letters, or if that letter is standing in for a name...</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">...due to the loss of what is known in New England as the “L”: that long deep roofed adjunct usually built at right angles to the main house...</p>
|
||||
<p class="corrected">She was learning her A B Cs.</p>
|
||||
</figure>
|
||||
<p>Or if the letter is meant to be a comparison to a shape:</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">His trident had the shape of an E.</p>
|
||||
</figure>
|
||||
<p>When using the ordinal “nth,” italicize the n, and do not include a hyphen:</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">The <i>n</i>th degree.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Words written to be read as sounds are set in italics using <code class="html"><i></code>:</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">He could hear the dog barking: <i>Ruff, ruff, ruff!</i></p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="#names-and-titles">See here for italicizing names and titles</a>.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<section id="italics-language">
|
||||
<h3>Italics for foreign languages</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Set foreign words and phrases <em>that are not in the <a href="http://www.merriam-webster.com/">Merriam-Webster</a> dictionary</em> in italics. If the foreign word or phrase <em>is</em> in Merriam-Webster, <em>don’t</em> set it in italics.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">The pièce de résistance of the dessert course was a <i>mousse au chocolat</i>.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Don’t</em> italicize foreign words in proper names, unless the name itself would be italicized according to the rules for <a href="#names-and-titles">italicizing or quoting names and titles</a>.</p>
|
||||
<figure class="text">
|
||||
<p class="wrong">She got off the metro at the <i>Place de Clichy</i> stop, next to the <i>Le Bon Petit Déjeuner</i> restaurant.</p>
|
||||
<p class="corrected">“<i>Où est le métro?</i>” he asked, and she pointed to Place de Clichy, next to the Le Bon Petit Déjeuner restaurant.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>If a certain foreign word is used so frequently in the text that italicizing it would be distracting to the reader, then only italicize the first instance. However, wrap the following instances in <code class="html"><span xml:lang="LANGUAGE"></code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Certain exceptions to italicizing foreign words can be made if a specific word is in Merriam-Webster, but in the producer’s opinion is still too obscure for the general reader and thus should be italicized anyway. In this case ask the Standard Ebooks editor-in-chief for how to proceed.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="italics-punctuation">
|
||||
<h3>Punctuation in italics</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>If italicizing a short phrase within a longer clause, don’t italicize trailing punctuation that may belong to the containing clause.</p>
|
||||
<figure class="text">
|
||||
<p class="wrong">“Look at <em>that!</em>” she shouted.</p>
|
||||
<p class="corrected">“Look at <em>that</em>!” she shouted.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>However, if an entire clause is italicized for emphasis, then <em>do</em> include the trailing punctuation in the italics, <em>unless</em> that trailing punctuation is a comma at the end of some dialog.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Result</td>
|
||||
<td>Code</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>“<em>Charge!</em>” she shouted.</p>
|
||||
</td>
|
||||
<td><code class="html full">“<em>Charge!</em>” she shouted.</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p><em>“But I want to</em>,” she said.</p>
|
||||
</td>
|
||||
<td><code class="html full">“<em>But I want to</em>,” she said.</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="taxonomy">
|
||||
<h3>Taxonomy</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Binomial names (generic, specific, and subspecific) are italicized with the <code class="html"><i></code> tag and with the <code class="html">z3998:taxonomy</code> semantic inflection.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Result</td>
|
||||
<td>Code</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>A bonobo monkey is <i>Pan paniscus</i>.</p>
|
||||
</td>
|
||||
<td><code class="html full">A bonobo monkey is <i epub:type="z3998:taxonomy">Pan paniscus</i>.</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li>
|
||||
<p>Family, order, class, phylum or division, and kingdom names are capitalized but not italicized.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">A bonobo monkey is in the phylum Chordata, class Mammalia, order Primates.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Modern usage requires that the second part in a binomial name be set in lowercase. Older texts may set it in uppercase. Use the style in the source text.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
<section id="indentation">
|
||||
<h2>Indentation</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Body text in a new paragraph that directly follows earlier body text is indented by 1em.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The initial line of body text in a section, or any text following a visible break in text flow, like a header, a scene break, a figure, a block quotation, etc., is not indented.</p>
|
||||
<p>For example: in a block quotation, there is a margin before the quotation and after the quotation. Thus, the first line of the quotation is not indented, and the first line of body text after the block quotation is also not indented.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="punctuation">
|
||||
<h2>Punctuation</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="#italics-punctuation">See here for punctuation in italics</a>.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<section id="spaces">
|
||||
<h3>Spaces</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Use single spaces between sentences.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="quotation-marks">
|
||||
<h3>Quotation marks</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>“Curly” or typographer’s quotes should always be used.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">“Don’t do it!” she shouted.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Quotation marks that are directly side-by-side must be separated by a hair space (U+200A) character.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">“<span class="utf">hairsp</span>‘Green?’ Is that what you said?” asked Dave.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Words with missing letters should use the right single quotation mark (’ or U+2019) character to indicate ommission.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">He had pork ’n’ beans for dinner</p>
|
||||
</figure>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="ellipses">
|
||||
<h3>Ellipses</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Use the ellipses (U+2026) glyph instead of consecutive or spaced periods.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>When used as suspension points (for example, to indicate dialog that pauses or trails off), don’t precede the ellipses with a comma. Commas followed by ellipses were sometimes used in older texts, but are now redundant to modern readers; remove them.</p>
|
||||
<p>Note that ellipses used to indicate missing words in a quotation still require keeping surrounding punctuation, including commas, because that punctuation is in the original quotation.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Place a hair space (U+200A) glyph before all ellipses that are not directly preceded by punctuation, or that are directly preceded by an em-dash or a two- or three-em-dash. Place a regular space after all ellipses that are not followed by punctuation. If the ellipses is followed by punctuation, place a hair space between the ellipses and punctuation, <em>unless</em> the punctuation is a quotation mark, in which case don’t put a space at all.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">“I’m so hungry<span class="utf">hairsp</span>… What were you saying about eating<span class="utf">hairsp</span>…<span class="utf">hairsp</span>?”</p>
|
||||
</figure>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="dashes">
|
||||
<h3>Dashes</h3>
|
||||
<p>There are many kinds of dashes, and your run-of-the-mill hyphen is often not what you should use. In particular, don’t use the hyphen for things like date ranges, phone numbers, or negative numbers.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Do not put spaces around em-dashes. Remove spaces if in the original text.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Use em-dashes (— or U+2014) to offset parenthetical phrases. These are usually the most common kind of dash.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Use an em-dash for partially-obscured years.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">It was the year 19— in the town of Metrolopis.</p>
|
||||
</figure>
|
||||
<p>Use a regular hyphen if only the last digit of the year is obscured.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">It was the year 186- in the town of Metrolopis.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Some older texts use two em-dashes to indicate an interruption in thought or speech. Our style is to replace two em-dashes used as an interruption marker with a single em-dash. However, <em>don’t</em> replace two em-dashes used to indicate the omission of a word (like an anonymous name or an expletive); see below.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Use a two-em-dash glyph (⸺ or U+2E3A) to signify a purposefully <em>partially</em> obscured word. The two-em-dash glyph isn’t available in some fonts, but include it anyway; our build process will convert it later.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">Sally J⸺ walked through town.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Use a three-em-dash glyph (⸻ or U+2E3B) for <em>completely</em> obscured words.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">It was night in the town of ⸻.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>En-dashes (– or U+2013) are used to indicate a numerical or date range; when you can substitute the word “to,” for example between locations; or to indicate a connection in location between two places.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">We talked 2–3 days ago.</p>
|
||||
<p class="corrected">We took the Berlin–Munich train yesterday.</p>
|
||||
<p class="corrected">I saw the torpedo-boat in the Ems–Jade Canal.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Figure dashes (‒ or U+2012) are used to indicate a dash in numbers that aren’t a range, like phone numbers.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">His number is 555‒1234.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Minus dashes (− or U+2212) are used to indicate negative numbers and are used in mathematical equations instead of hyphens.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">It was −5° out yesterday!</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Many older texts use archaic spelling and hyphenate compound words that are no longer hyphenated today. Use the <code class="program">modernize-spelling</code> script to automatically find and correct candidates. Note that this script isn’t perfect, and proofreading is required after using it to make sure it didn’t wrongly remove a hyphen!</p>
|
||||
<p><em>Do not</em> use the <code class="program">modernize-spelling</code> script on poetry.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
<section id="latinisms">
|
||||
<h2>Latinisms</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p><em>Don’t</em> italicize Latinisms that can be found in a modern dictionary, like e.g., i.e., ad hoc, viz., ibid., etc. <em>except</em> sic, which should always be italicized. Some older works might italicize these kinds of Latinisms; remove the italics.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Do</em> italicize whole passages of Latin language (as you would italicize any passages of foreign text in a work) and Latinisms that <em>aren’t</em> found in a modern dictionary.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Latinisms that are abbreviations should be set in lowercase with periods between words and no spaces between them, <em>except</em>:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><abbr class="era">BC</abbr>, <abbr class="era">AD</abbr>, <abbr class="era">BCE</abbr>, and <abbr class="era">CE</abbr> should be set without periods and in small caps and wrapped with the <code class="html"><abbr class="era"></code> tag.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Result</td>
|
||||
<td>Code</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>Julius Caesar was born around 100 <abbr class="era">BC</abbr>.</p>
|
||||
</td>
|
||||
<td><code class="css full">abbr.era{
|
||||
font-variant: all-small-caps;
|
||||
}</code> <code class="html full">Julius Caesar was born around 100 <abbr class="era">BC</abbr>.</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>Always use “etc.” instead of “&c;”. Some older works use the latter; convert them to the former.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>For “Ibid.,” see <a href="#endnotes">endnotes</a>.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="initials">
|
||||
<h2>Initials and Abbreviations</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="#temperatures">See here for temperatures</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="#times">See here for times</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="#latinisms">See here for Latinisms</a> including <abbr class="era">BC</abbr> and <abbr class="era">AD</abbr>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>“OK” is set without periods or spaces. It is <em>not</em> an abbreviation.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>An acronym is a term made up of initials and pronounced as one word: <abbr class="acronym long">NASA</abbr>, <abbr class="acronym long">SCUBA</abbr>, <abbr class="acronym long">TASER</abbr>.</p>
|
||||
<p>An initialism is a term made up of initials in which each initial is pronounced separately: <abbr class="initialism">ABC</abbr>, <abbr class="initialism">HTML</abbr>, <abbr class="initialism">CSS</abbr>.</p>
|
||||
<p>A contraction is an abbreviation of a longer word: Mr., Mrs., lbs.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>In general, abbreviations ending in a lowercase letter should be set without spaces and followed by a period. Abbreviations without lowercase letters should be set without spaces and without a trailing period. Always use a no-break space after an abbreviation that describes the next word, like Mr., Mrs., Mt., St., etc. A few exceptions follow.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Initials of people’s names should be separated by periods and spaces. Wrap such initials in <code class="html"><abbr class="name"></code>.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Result</td>
|
||||
<td>Code</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p><abbr class="name">H. P.</abbr> Lovecraft</p>
|
||||
</td>
|
||||
<td><code class="html full"><abbr class="name">H. P.</abbr> Lovecraft</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li>
|
||||
<p>Compass directions should be wrapped in <code class="html"><abbr class="compass"></code>, with periods and spaces.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Result</td>
|
||||
<td>Code</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>He traveled <abbr class="compass">N. W.</abbr>, then <abbr class="compass eoc">E. S. E.</abbr></p>
|
||||
</td>
|
||||
<td><code class="html full">He traveled <abbr class="compass">N. W.</abbr>, then <abbr class="compass eoc">E. S. E.</abbr></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li>
|
||||
<p>For acronyms, initialisms, postal codes, temperatures, and abbreviated US states, remove periods and spaces. All of these are set in caps, except for temperatures and acronyms, which are set in small caps. The source code should represent the abbreviations in caps, but wrapped in an <code class="html"><abbr></code> tag.</p>
|
||||
<p>All acronyms are set in small caps. Because acroynms are capitalized in the source code, use the <abbr class="initialism">CSS</abbr> style <code class="css">font-variant: all-small-caps;</code> to properly set them in small caps.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Result</td>
|
||||
<td>Code</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p><abbr>Dr.</abbr> <abbr class="name">J. D.</abbr> Ross, <abbr class="degree">MD</abbr>, served on the <abbr class="initialism">HMS</abbr> <i epub:type="se:name.vessel.ship">Bounty</i> as a <abbr class="acronym">NASA</abbr> liaison.</p>
|
||||
</td>
|
||||
<td><code class="css full">abbr.acronym{
|
||||
font-variant: all-small-caps;
|
||||
}</code> <code class="html full"><abbr>Dr.</abbr> <abbr class="name">J. D.</abbr> Ross, <abbr class="degree">MD</abbr>, served on the <abbr class="initialism">HMS</abbr> <i epub:type="se:name.vessel.ship">Bounty</i> as a <abbr class="acronym">NASA</abbr> laison.</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li>
|
||||
<p>Unless mentioned above, <em>do not</em> set initialisms in small caps.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="chemicals-and-compounds">
|
||||
<h2>Chemicals and compounds</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Set molecular compounds in regular type without spaces.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Elements should be capitalized according to their listing in the periodic table.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Amounts of an element should be set in subscript using the <code class="html"><sub></code> tag.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Result</td>
|
||||
<td>Code</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>H<sub>2</sub>O</p>
|
||||
</td>
|
||||
<td><code class="html full">H<sub>2</sub>O</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<section id="temperatures">
|
||||
<h2>Temperatures</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Use the minus glyph (− or U+2212), not the hyphen glyph, to indicate negative numbers.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Using either the degree glyph (° or U+00B0) or the word “degrees” is acceptable, but if a work uses both methods, normalize the work to use the dominant method.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>If listing temperature as a digit followed by “F.”, “C.”, or another abbreviation, remove the trailing period and precede the letter by a hair space (U+200A). Wrap the letter in <code class="html"><abbr class="temperature"></code> styled with <code class="css">abbr.temperature{ font-variant: all-small-caps; }</code></p>
|
||||
</li>
|
||||
</ul>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Result</td>
|
||||
<td>Code</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>It was −23.33° Celsius (or −10° <abbr class="temperature">F</abbr>) last night.</p>
|
||||
</td>
|
||||
<td><code class="css full">abbr.temperature{
|
||||
font-variant: all-small-caps;
|
||||
}</code> <code class="html full">It was −23.33° Celsius (or −10°<span class="utf">hairsp</span><abbr class="temperature">F</abbr>) last night.</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<section id="epigraphs">
|
||||
<h2>Epigraphs in chapter headers</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>The source of the epigraph is set in small caps, without a leading em-dash and without a trailing period.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="bridgehead">
|
||||
<h2>Bridgeheads in chapter headers</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Bridgeheads are centered in the header.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Always include a trailing period at the end of the bridgehead.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="times">
|
||||
<h2>Times</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Times in a.m. and p.m. format should have the letters a.m. and p.m. set in lowercase, with periods, and without spaces. “a.m.” and “p.m.” should be wrapped in an <code class="html"><abbr class="time"></code> tag. If “a.m.” or “p.m.” are the last word in a sentence, omit a second period, but add the “eoc” (end-of-clause) class to the <code class="html"><abbr></code> tag.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Seperate times written in digits followed by a.m. or p.m. with a no-break space. If the time is written out in words, use a regular space.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Separate the hour and minute with a colon, not a period or comma.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Do not hyphenate times when spelled out, unless they appear before a noun.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">He arrived at five thirty.</p>
|
||||
<p class="corrected">They took the twelve-thirty train.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Military time that is spelled out (for example, in dialog) is set with dashes. Leading zeros are spelled out as “oh”.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">He arrived at oh-nine-hundred.</p>
|
||||
</figure>
|
||||
</li>
|
||||
</ul>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Result</td>
|
||||
<td>Code</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>He called at 6:40 <abbr class="time">a.m.</abbr>, but she wasn’t up till seven <abbr class="time eoc">a.m.</abbr></p>
|
||||
</td>
|
||||
<td>
|
||||
<code class="html full">He called at 6:40<span class="utf">nbsp</span><abbr class="time">a.m.</abbr>, but she wasn’t up till seven <abbr class="time eoc">a.m.</abbr></code>
|
||||
<p class="note">Note how the last <abbr> contains the period for the entire sentence, and consequently also has the “eoc” (end-of-clause) class.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<section id="ampersands-in-names">
|
||||
<h2>Ampersands in names</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Ampersands in names of things like firms should be separated by no-break spaces.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">The firm of Hawkins<span class="utf">nbsp</span>&amp;<span class="utf">nbsp</span>Harker.</p>
|
||||
</figure>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="ligatures">
|
||||
<h2>Ligatures</h2>
|
||||
<p>Ligatures are symbols which combine two or more characters into one.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Some older texts use ligatures like æ and œ to represent dipthongs. The modernize-spelling tool will replace many of these for you, but keep an eye out for other instances, particularly in Latin phrases and in classical names such as Œdipus. These should be either be replaced with “ae” and “oe” or with alternative modern spellings of the word they are in (check Merriam-Webster for these).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>It’s very unlikely that you will encounter stylistic ligatures such as fl or ffi in the source text, but if you do they should be replaced by the individual characters they represent.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="numbers-measurements-and-math">
|
||||
<h2>Numbers, measurements, and math</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Roman numerals should not be followed by periods, unless the period is there for grammatical reasons. Some European texts include a trailing period after Roman numerals as a matter of course; remove them.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Fractions should be written using the Unicode glyphs (½, ¼, ¾, etc., or U+00BC–U+00BE and U+2150–U+2189), if a glyph exists for your fraction.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">I need ¼ cup of sugar.</p>
|
||||
</figure>
|
||||
<p>If a glyph for a fraction doesn’t exist, compose it using the fraction slash Unicode glyph (⁄ or U+2044) and superscript/subscript Unicode numbers. See <a href="https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts">this Wikipedia entry for more details</a>.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">Roughly ⁶⁄₁₀ of a mile.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Dimensions and equations should use the Unicode multiplication glyph (× or U+00D7) instead of the letters x or X.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">The board was 4 × 3 × 7 feet.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>Feet and inches in shorthand are set with the prime (′ or U+2032) or double prime (″ or U+2033) glyphs, <em>not</em> single or double quotes, and with a no-break space separating feet and inches.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">He was 6′<span class="utf">nbsp</span>1″ in height.</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li id="coordinates">
|
||||
<p>Coordinates should be noted with the prime (′ or U+2032) or double prime (″ or U+2033) glyphs, <em>not</em> single or double quotes.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">lat. 27° 0′ N., long. 20° 1′ W.</p>
|
||||
</figure>
|
||||
<p>(Note that in the above example your font might render the two glyphs in the same way, but they’re different Unicode glyphs.)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Operators and operands in mathematical equations should be separated by a space.</p>
|
||||
<p>Remember to use minus dashes (− or U+2212) instead of regular hyphens, both for negative numbers and for mathematical operations.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">6 − 2 + 2 = 6</p>
|
||||
</figure>
|
||||
</li>
|
||||
<li>
|
||||
<p>When forming a compound of a number + unit of measurement, and the measurement is abbreviated, separate the two with a no-break space, <em>not</em> a dash.</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">A 12<span class="utf">nbsp</span>mm pistol.</p>
|
||||
</figure>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="endnotes">
|
||||
<h2>Footnotes and endnotes</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>All footnotes should be converted to a single endnotes file. For more information on the structure of that file, see our <a href="/contribute/semantics#endnotes">structure and semantics manual</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>“Ibid.” is a Latinism commonly used in endnotes to indicate that the source for a quotation or reference is the same as the last-mentioned source.</p>
|
||||
<p>In the case where the last-mentioned source is in the previous endnote, we must replace Ibid. by the full reference; since ebooks use popup endnotes, “Ibid.” becomes meaningless in that context.</p>
|
||||
<p>In the case where the last-mentioned source is in the same endnote as Ibid., we can leave Ibid. untouched.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The endnote reference number goes after ending punctuation. If the endnote references an entire sentence in quotation marks, or the last word in a sentence in quotation marks, then the endnote reference number goes outside the quotation marks.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Within an endnote, a backlink to where the endnote occurred in the text must be the last item. It is preceded by exactly one space.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="legal">
|
||||
<h2>Legal cases and terms</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Legal cases are set in italic. Either “versus” or “v.” are acceptable; if using “v.”, a period must follow the “v.”</p>
|
||||
<figure class="text">
|
||||
<p class="corrected">He prosecuted <i>Johnson v. Smith</i>.</p>
|
||||
</figure>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<aside class="alert">
|
||||
<p>Standard Ebooks is a brand-new project—this manual is a pre-alpha, and much of it is incomplete. If you have a question, need clarification, or run in to an issue not yet covered here, please <a href="https://groups.google.com/forum/#!forum/standardebooks">contact us</a> so we can update this manual.</p>
|
||||
</aside>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
336
www/contribute/wanted-ebooks.php
Normal file
|
@ -0,0 +1,336 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'Wanted Ebooks', 'highlight' => 'contribute', 'description' => 'A list of ebooks the Standard Ebooks editor would like to see produced, including suggestions for first-time producers.']) ?>
|
||||
<main>
|
||||
<article>
|
||||
<h1>Wanted Ebooks</h1>
|
||||
<p>If you’re interested in producing an ebook for Standard Ebooks, why not work on one of these books?</p>
|
||||
<p>If something in this list interests you, please <a href="https://groups.google.com/forum/#!forum/standardebooks">contact us at our mailing list</a> for help before you start work.</p>
|
||||
<p>If you want to suggest a different book to produce, please carefully review <a href="/contribute/accepted-ebooks">the kinds of work we will and won’t accept</a>.</p>
|
||||
<h2>For your first production</h2>
|
||||
<p>If nothing on the list below interests you, you can pitch us something else you’d like to work on.</p>
|
||||
<p>First productions should be on the shorter side (around 40–60,000 words maximum) and without complex formatting issues like illustrations, significant endnotes, letters, poems, etc. Most short plain fiction novels fall in this category.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/author/783">Novels by P. G. Wodehouse</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/author/8301">Short fiction and novels by H. Beam Piper</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/author/25421">Short fiction and novels by Fritz Leiber</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/author/7021">Short fiction and novels by Andre Norton</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/9807">Scarhaven Keep</a> by J. S. Fletcher</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/11666">The Conjure Woman</a> by Charles W. Chesnutt</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/50561">The Dark Other</a> by Stanley G. Weinbaum</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/author/25413">Short fiction and novels by Frederick Pohl</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/author/25203">Short fiction and novels by Poul Anderson</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/1267">Kai Lung’s Golden Hours</a> by Ernest Bramah</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://en.wikisource.org/wiki/Brood_of_the_Witch_Queen">Brood of the Witch Queen</a> by Sax Rohmer</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/28948">The Rainbow</a> by D. H. Lawrence</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/20988">Islands of Space</a> by John W. Campbell Jr.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/25438">The Airlords of Han</a> by Philip Francis Nowlan</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/12341">Against the Grain</a> by J.-K. Huysmans</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/1368">When the World Shook</a> by H. Rider Haggard</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/2376">Up From Slavery</a> by Booker T. Washington</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/42914">Gladiator</a> by Philip Wylie</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/5827">The Problems of Philosophy</a> by Bertrand Russell</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/25024">Night of the Long Knives</a> by Fritz Leiber</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/222">The Moon and Sixpence</a> by W. Somerset Maugham</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/4217">A Portrait of the Artist as a Young Man</a> by James Joyce</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/479">Little Lord Fauntleroy</a> by Frances Hodgson Burnett</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="http://classics.mit.edu/Caesar/gallic.html">The Gallic Wars</a> by Julius Caesar</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/541">The Age of Innocence</a> by Edith Wharton</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Moderate-difficulty productions</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/search/?query=Baroness+Orczy">Scarlet Pimpernel novels</a> by Baroness Orczy</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/2944">Essays by Ralph Waldo Emerson</a> (<a href="https://www.gutenberg.org/ebooks/2945">Part 2</a>), to be compiled into a single “Essays”</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/8778">The Water of the Wondrous Isles</a> by William Morris</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/13334">Tales of Soldiers and Civilians</a> by Ambrose Bierce</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/132">The Art of War</a> by Sun Tzu</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="http://www.eldritchpress.org/ez/germinal.html">Germinal</a> by Émile Zola</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/author/1370">Short stories by Algernon Blackwood</a> (To be compiled in an omnibus “Short Fiction”)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="http://hilobrow.com/2013/03/11/theodore-savage-1/">Theodore Savage</a> by Cicely Hamilton</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/1436">A Voyage to Abyssinia</a> by Jerónimo Lobo</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/1156">Babbitt</a> by Sinclair Lewis</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/1164">The Iron Heel</a> by Jack London</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/author/498">Books by Edward Lear</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/2276">The Private Memoirs and Confessions of a Justified Sinner</a> by James Hogg</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/author/2683">Short fiction by Vernon Lee</a> (To be compiled in an omnibus “Short Fiction”)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://en.wikipedia.org/wiki/Thomas_Gray">Poetry of Thomas Gray</a> to be compiled in an omnibus</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/53685">Melmoth the Wanderer</a> by Charles Maturin</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/2044">The Education of Henry Adams</a> by Henry Adams</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://en.wikipedia.org/wiki/Sheridan_Le_Fanu">Short stories and novellas by Sheridan Le Fanu</a> (To be compiled in an omnibus “Short Fiction”)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/17617">David Harum</a> by Edward Noyes Westcott</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/21415">The Young Visiters</a> by Daisy Ashford (Note the purposefully uncorrected spelling and grammar are style choices.)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://en.m.wikipedia.org/wiki/William_McGonagall">Poetry of William McGonagall</a> (To be compiled in an omnibus)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/4057">Marius the Epicurean</a> by Walter Pater (<a href="https://www.gutenberg.org/ebooks/4058">Vol. 2</a>; both as a single production)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/165">McTeague</a> by Frank Norris</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/24353">Wired Love</a> by Ella Cheever Thayer</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/1280">Spoon River Anthology</a> by Edgar Lee Masters</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/2853">Quo Vadis: A Narrative of the Time of Nero</a> by Henryk Sienkiewicz</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/601">The Monk: A Romance</a> by M. G. Lewis (Note this appears to be the 2nd edition, we don’t want the 4th edition)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/51783">The Blazing World</a> by Margaret Cavendish (need significant work lowercasing gratuitous old-timey capitalization)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/37892">The Recollections of Alexis de Tocqueville</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/8486">Ghost Stories of an Antiquary</a> by M. R. James</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="http://www.gutenberg.org/ebooks/1265">Queen Victoria</a> by Lytton Strachey</p>
|
||||
</li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/5247">The Old Wives’ Tale</a> by Arnold Bennett</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/4240">Women in Love</a> by DH Lawrence</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/143">The Mayor of Casterbridge</a> by Thomas Hardy</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/161">Sense and Sensibility</a> by Jane Austen</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/5231">The Way We Live Now</a> by Anthony Trollope</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/829">Gulliver’s Travels</a> by Jonathan Swift</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/110">Tess of the d’Urbervilles</a> by Thomas Hardy</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/821">Dombey and Son</a> by Charles Dickens</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/370">Moll Flanders</a> by Daniel Defoe</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/9182">Villette</a> by Charlotte Brontë</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/153">Jude the Obscure</a> by Thomas Hardy</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/105">Persuasion</a> by Jane Austen</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/2946">Howards End</a> by EM Forster</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/1260">Jane Eyre</a> by Charlotte Brontë</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/1400">Great Expectations</a> by Charles Dickens</p></li>
|
||||
</ul>
|
||||
<h2>Advanced productions</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/23700">The Decameron</a> by Giovanni Boccaccio</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/3600">The Complete Essays of Michel de Montaigne</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/131">The Pilgrim’s Progress</a> by John Bunyan (this will be a complex production, please contact us first for help.)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/3361">The Complete Letters to his Son</a> by Philip Dormer Stanhope</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/4705">A Treatise of Human Nature</a> by David Hume</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="http://www.exclassics.com/gilblas/gbintro.htm">Gil Blas</a> by Alain-Rene LeSage</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/6593">Tom Jones</a> by Henry Fielding</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/10827">Discourses on the First Decade of Titus Livius</a> by Niccolò Machiavelli</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/1564">Boswell’s Life of Johnson</a> by James Boswell</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/10662">The Night Land</a> by William Hope Hodgson</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/39270">Tristram Shandy</a> by Laurence Sterne</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/7373">The Path to Rome</a> by Hilaire Belloc</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="http://docsouth.unc.edu/southlit/cabell/cabell.html">The Cream of the Jest</a> by James Branch Cabell</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/10343">Essays of Elia</a> by Charles Lamb</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/26163">Creative Evolution</a> by Henri Bergson</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/3090">Short Stories by Guy de Maupassant</a> (To be compiled in an omnibus “Short Fiction”)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/11639">Figures of Earth: A Comedy of Appearances</a> by James Branch Cabell</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/2084">The Way of All Flesh</a> by Samuel Butler</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/5267">Sister Carrie</a> by Theodore Dreiser</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/6798">Aesthetical Essays</a> by Friedrich Schiller</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://en.wikipedia.org/wiki/Analects">The Analects</a> by Confucius</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/621">The Varieties of Religious Experience</a> by William James</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/53430">Principia Ethica</a> by George Edward Moore</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="http://www.sacred-texts.com/cla/plato/">Plato’s Dialogues</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/2009">The Origin of Species</a> by Charles Darwin</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/38427">The World as Will and Idea</a> by Arthur Schopenhauer (<a href="https://www.gutenberg.org/ebooks/40097">Vol. 2</a>, <a href="https://www.gutenberg.org/ebooks/40868">Vol. 3</a>)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="http://penelope.uchicago.edu/Thayer/e/roman/texts/suetonius/12caesars/home.html">The Lives of the Caesears</a> by Suetonius (Note: the 1913 JC Rolfe translation, <em>not</em> the older translation available at PG!)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/815">Democracy in America</a> by Alexis de Tocqueville (<a href="https://www.gutenberg.org/ebooks/816">Volume 2</a>, together as a single ebook)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://en.wikisource.org/wiki/The_Complete_Angler,_5th_edition">The Complete Angler</a> by Izaak Walton (Note: the Wikisource transcription will be easier to work with than the PG transcription.)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/7416">The Thirteen</a> by Honoré de Balzac</p>
|
||||
</li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/145">Middlemarch</a> by George Eliot</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/9296">Clarissa</a> by Samuel Richardson (<a href="https://github.com/drgrigg/samuel-richardson_clarissa-harlowe">partially completed</a>, available for finishing but will take a large amount of time)</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/4397">The Forsyte Saga</a> by John Galsworthy</p></li>
|
||||
<li><p><a href="https://www.gutenberg.org/ebooks/7469">Daniel Deronda</a> by George Eliot</p></li>
|
||||
</ul>
|
||||
<h2>Uncategorized lists</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="https://www.theguardian.com/books/2003/oct/12/features.fiction">Public domain entries in the Guardian’s top 100 novels of all time list</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Public domain entries in the <a href="https://en.m.wikipedia.org/wiki/Ballantine_Adult_Fantasy_series">Ballantine Adult Fantasy series</a> (Note that not all of these are in the U.S. public domain)</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Ebooks currently being produced</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/2377">The Son of the Wolf</a> by Jack London: <a href="https://github.com/ryanodor/jack-london_son-of-the-wolf">In progress by ryanodor</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/6753">Psmith in the City</a> by P. G. Wodehouse: <a href="https://github.com/scottcmoore/p-g-wodehouse_psmith-in-the-city">In progress by scottcmoore</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/73">The Red Badge of Courage</a> by Fritz Leiber: <a href="https://github.com/jgerace/stephen-crane_the-red-badge-of-courage">In progress by jgerace</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/search/?query=Baroness+Orczy">Scarlet Pimpernel</a> by Baroness Orczy: <a href="https://github.com/tuskpot/countess-orczy_the-scarlet-pimpernel">In progress by tuskpot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/1709">New Grub Street</a> by George Gissing: <a href="https://github.com/ephaemeradev/george-gissing_new-grub-street">In progress by ephaemeradev</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/16921">Plague Ship</a> by Andre Norton: <a href="https://github.com/paflynn/andre-norton_plague-ship">In progress by paflynn</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/4517">Ethan Frome</a> by Edith Wharton: <a href="https://github.com/csliced/efrome">In progress by csliced</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://www.gutenberg.org/ebooks/42401">Vathek</a> by William Beckford: <a href="https://github.com/bburns/william-beckford_vathek">In progress by bburns</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
1751
www/css/core.css
Normal file
89
www/css/reset.css
Normal file
|
@ -0,0 +1,89 @@
|
|||
html{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
body{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
a{
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
blockquote{
|
||||
margin: 0;
|
||||
quotes: none;
|
||||
}
|
||||
|
||||
p{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
ol{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
h1{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h2{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h3{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h4{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h5{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h6{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
q{
|
||||
quotes: none;
|
||||
}
|
||||
|
||||
figure{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* ie 11 compatibility */
|
||||
header{
|
||||
display: block;
|
||||
}
|
||||
|
||||
nav{
|
||||
display: block;
|
||||
}
|
||||
|
||||
main{
|
||||
display: block;
|
||||
}
|
||||
|
||||
footer{
|
||||
display: block;
|
||||
}
|
||||
/* end ie 11 compatibility */
|
31
www/ebooks/author.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
|
||||
try{
|
||||
$urlPath = trim(str_replace('.', '', HttpInput::GetString('url-path')), '/'); // Contains the portion of the URL (without query string) that comes after https://standardebooks.org/ebooks/
|
||||
$wwwFilesystemPath = SITE_ROOT . '/www/ebooks/' . $urlPath; // Path to the deployed WWW files for this ebook
|
||||
|
||||
if($urlPath == '' || mb_stripos($wwwFilesystemPath, SITE_ROOT . '/www/ebooks/') !== 0 || !is_dir($wwwFilesystemPath)){
|
||||
// Ensure the path exists and that the root is in our www directory
|
||||
throw new InvalidAuthorException();
|
||||
}
|
||||
|
||||
$ebooks = Library::GetEbooksByAuthor($wwwFilesystemPath);
|
||||
|
||||
if(sizeof($ebooks) == 0){
|
||||
throw new InvalidAuthorException();
|
||||
}
|
||||
}
|
||||
catch(\Exception $ex){
|
||||
http_response_code(404);
|
||||
include(SITE_ROOT . '/www/404.php');
|
||||
exit();
|
||||
}
|
||||
?><?= Template::Header(['title' => 'Ebooks by ' . strip_tags($ebooks[0]->AuthorsHtml), 'highlight' => 'ebooks', 'description' => 'All of the Standard Ebooks ebooks by ' . strip_tags($ebooks[0]->AuthorsHtml)]) ?>
|
||||
<main class="ebooks">
|
||||
<h1>Ebooks by <?= $ebooks[0]->AuthorsHtml ?></h1>
|
||||
<?= Template::SearchForm() ?>
|
||||
<?= Template::EbookGrid(['ebooks' => $ebooks]) ?>
|
||||
<?= Template::ContributeAlert() ?>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
180
www/ebooks/ebook.php
Normal file
|
@ -0,0 +1,180 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
|
||||
try{
|
||||
$urlPath = trim(str_replace('.', '', HttpInput::GetString('url-path')), '/'); // Contains the portion of the URL (without query string) that comes after https://standardebooks.org/ebooks/
|
||||
$wwwFilesystemPath = SITE_ROOT . '/www/ebooks/' . $urlPath; // Path to the deployed WWW files for this ebook
|
||||
|
||||
if($urlPath == '' || mb_stripos($wwwFilesystemPath, SITE_ROOT . '/www/ebooks/') !== 0){
|
||||
// Ensure the path exists and that the root is in our www directory
|
||||
throw new InvalidEbookException();
|
||||
}
|
||||
|
||||
// Were we passed the author and a work but not the translator?
|
||||
// For example:
|
||||
// https://standardebooks.org/ebooks/omar-khayyam/the-rubaiyat-of-omar-khayyam
|
||||
// Instead of:
|
||||
// https://standardebooks.org/ebooks/omar-khayyam/the-rubaiyat-of-omar-khayyam/edward-fitzgerald/edmund-dulac
|
||||
// We can tell because if so, the dir we are passed will exist, but there will be no 'src' folder.
|
||||
if(is_dir($wwwFilesystemPath) && !is_dir($wwwFilesystemPath . '/src')){
|
||||
foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($wwwFilesystemPath)) as $file){
|
||||
// This iterator will do a deep scan on the directory. When we hit another directory, the filename will be "." and the path will contain the directory path.
|
||||
// We want to find where the "src" directory is, and the directory directly below that will be the final web URL we're looking for.
|
||||
if($file->getFilename() == '.' && preg_match('/\/src$/ius', $file->getPath())){
|
||||
throw new SeeOtherEbookException(preg_replace(['|' . SITE_ROOT . '/www|ius', '|/src$|ius'], '', $file->getPath()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Do we have the ebook cached?
|
||||
$ebook = apcu_fetch('ebook-' . $wwwFilesystemPath, $success);
|
||||
|
||||
if(!$success){
|
||||
$ebook = new Ebook($wwwFilesystemPath);
|
||||
apcu_store('ebook-' . $wwwFilesystemPath, $ebook);
|
||||
}
|
||||
|
||||
// Generate the bottom carousel.
|
||||
$carousel = [];
|
||||
$ebooks = Library::GetEbooks();
|
||||
shuffle($ebooks);
|
||||
|
||||
for($i = 0; $i < 5; $i++){
|
||||
$carousel[] = $ebooks[$i];
|
||||
}
|
||||
}
|
||||
catch(SeeOtherEbookException $ex){
|
||||
http_response_code(301);
|
||||
header('Location: ' . $ex->Url);
|
||||
exit();
|
||||
}
|
||||
catch(\Exception $ex){
|
||||
http_response_code(404);
|
||||
include(SITE_ROOT . '/www/404.php');
|
||||
exit();
|
||||
}
|
||||
?><?= Template::Header(['title' => strip_tags($ebook->TitleWithCreditsHtml), 'highlight' => 'ebooks', 'description' => 'The Standard Ebooks edition of ' . $ebook->Title . ': ' . $ebook->Description, 'jsonld' => $ebook->GenerateJsonLd()]) ?>
|
||||
<main>
|
||||
<article class="ebook">
|
||||
<header>
|
||||
<div>
|
||||
<h1><?= Formatter::ToPlainText($ebook->Title) ?></h1>
|
||||
<? foreach($ebook->Authors as $author){ ?>
|
||||
<p><?= Formatter::ToPlainText($author->Name) ?></p>
|
||||
<? } ?>
|
||||
</div>
|
||||
<img src="<?= $ebook->HeroImage2xUrl ?>" alt="The cover for the Standard Ebooks edition of <?= $ebook->Title ?>." />
|
||||
</header>
|
||||
|
||||
<aside id="reading-ease">
|
||||
<p><?= number_format($ebook->WordCount) ?> words (<?= $ebook->ReadingTime ?>) with a reading ease of <?= $ebook->ReadingEase ?> (<?= $ebook->ReadingEaseDescription ?>)</p>
|
||||
<? if($ebook->ContributorsHtml !== null){ ?>
|
||||
<p><?= $ebook->ContributorsHtml ?></p>
|
||||
<? } ?>
|
||||
</aside>
|
||||
|
||||
<section id="description">
|
||||
<h2>Description</h2>
|
||||
<? if($ebook->LongDescription === null){ ?>
|
||||
<p><i>There’s no description for this ebook yet.</i></p>
|
||||
<? }else{ ?>
|
||||
<?= $ebook->LongDescription ?>
|
||||
<? } ?>
|
||||
</section>
|
||||
|
||||
<? if($ebook->HasDownloads){ ?>
|
||||
<section id="download">
|
||||
<h2>Free download</h2>
|
||||
<div class="us-pd-warning">
|
||||
<p>This ebook is only thought to be free of copyright restrictions in the United States. It may still be under copyright in other countries. If you’re not located in the United States, you must check your local laws to verify that the contents of this ebook are free of copyright restrictions in the country you’re located in before downloading or using this ebook.</p>
|
||||
</div>
|
||||
<ul>
|
||||
<? if($ebook->EpubUrl !== null){ ?>
|
||||
<li><p><span><a href="<?= $ebook->EpubUrl ?>" class="epub">epub</a> </span><span>—</span> <span>All devices and apps except Amazon Kindle and Kobo.</span></p>
|
||||
</li>
|
||||
<? } ?>
|
||||
|
||||
<? if($ebook->Azw3Url !== null){ ?>
|
||||
<li><p><span><a href="<?= $ebook->Azw3Url ?>" class="amazon">azw3</a></span> <span>—</span> <span>Amazon Kindle devices and apps.<? if(!empty($metadata['kindleCoverFilename'])){ ?> Also download the <a href="<?= $wwwUrl ?>/dist/<?= $metadata['kindleCoverFilename'] ?>">Kindle cover thumbnail</a> to see the cover in your Kindle’s library.<? } ?></span></p>
|
||||
</li>
|
||||
<? } ?>
|
||||
|
||||
<? if($ebook->KepubUrl !== null){ ?>
|
||||
<li><p><span><a href="<?= $ebook->KepubUrl ?>" class="kobo">kepub</a> </span><span>—</span> <span>Kobo devices and apps.</span></p>
|
||||
</li>
|
||||
<? } ?>
|
||||
|
||||
<? if($ebook->Epub3Url !== null){ ?>
|
||||
<li><p><span><a href="<?= $ebook->Epub3Url ?>" class="epub">epub3</a></span> <span>—</span> <span>Advanced format not yet fully compatible with most ereaders.</span></p>
|
||||
</li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
<aside>
|
||||
<p>Read about <a href="/help/how-to-use-our-ebooks#which-file-to-download">which file to download</a> and <a href="/help/how-to-use-our-ebooks#transferring-to-your-ereader">how to transfer them to your ereader</a>.</p>
|
||||
</aside>
|
||||
</section>
|
||||
<? } ?>
|
||||
|
||||
<section id="history">
|
||||
<h2>A brief history of this ebook</h2>
|
||||
<ol>
|
||||
<? foreach($ebook->GitCommits as $commit){ ?>
|
||||
<li>
|
||||
<time datetime="<?= $commit->Timestamp->format(DateTime::RFC3339) ?>"><?= $commit->Timestamp->format('Y-m-d') ?></time>
|
||||
<p><?= Formatter::ToPlainText($commit->Message) ?></p>
|
||||
</li>
|
||||
<? } ?>
|
||||
</ol>
|
||||
<? if($ebook->GitHubUrl !== null){ ?>
|
||||
<aside>
|
||||
<p>Read the <a href="<?= Formatter::ToPlainText($ebook->GitHubUrl) ?>/commits/master">full change history</a>.</p>
|
||||
</aside>
|
||||
<? } ?>
|
||||
</section>
|
||||
|
||||
<section id="details">
|
||||
<h2>More details</h2>
|
||||
<ul>
|
||||
<? if($ebook->GitHubUrl !== null){ ?>
|
||||
<li>
|
||||
<p><a href="<?= Formatter::ToPlainText($ebook->GitHubUrl) ?>" class="github">This ebook’s source code at GitHub</a></p>
|
||||
</li>
|
||||
<? } ?>
|
||||
<? if($ebook->WikipediaUrl !== null){ ?>
|
||||
<li>
|
||||
<p><a href="<?= Formatter::ToPlainText($ebook->WikipediaUrl) ?>" class="wikipedia">This book at Wikipedia</a></p>
|
||||
</li>
|
||||
<? } ?>
|
||||
<? foreach($ebook->SourceUrls as $source){ ?>
|
||||
<li>
|
||||
<p>
|
||||
<? if($source['source'] == SOURCE_PROJECT_GUTENBERG){ ?><a href="<?= Formatter::ToPlainText($source['url']) ?>" class="project-gutenberg">Transcription at Project Gutenberg</a><? } ?>
|
||||
<? if($source['source'] == SOURCE_WIKISOURCE){ ?><a href="<?= Formatter::ToPlainText($source['url']) ?>" class="wikisource">Transcription at Wikisource</a><? } ?>
|
||||
<? if($source['source'] == SOURCE_INTERNET_ARCHIVE){ ?><a href="<?= Formatter::ToPlainText($source['url']) ?>" class="internet-archive">Page scans at the Internet Archive</a><? } ?>
|
||||
<? if($source['source'] == SOURCE_HATHI_TRUST){ ?><a href="<?= Formatter::ToPlainText($source['url']) ?>" class="hathitrust">Page scans at HathiTrust</a><? } ?>
|
||||
<? if($source['source'] == SOURCE_GOOGLE_BOOKS){ ?><a href="<?= Formatter::ToPlainText($source['url']) ?>" class="google">Page scans at Google Books</a><? } ?>
|
||||
<? if($source['source'] == SOURCE_OTHER){ ?><a href="<?= Formatter::ToPlainText($source['url']) ?>" class="globe"><?= Formatter::ToPlainText(preg_replace(['|https?://(en\.)?|', '|/.+$|'], '', $source['url'])) ?></a><? } ?>
|
||||
</p>
|
||||
</li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section id="improve">
|
||||
<h2>Improve this ebook</h2>
|
||||
<p>Anyone can contribute to make a Standard Ebook better for everyone!</p>
|
||||
<p>To report typos, typography errors, or other corrections, see <a href="/contribute/report-errors">how to report errors</a>.</p>
|
||||
<? if($ebook->GitHubUrl !== null){ ?><p>If you’re comfortable with technology and want to contribute directly, check out <a href="<?= Formatter::ToPlainText($ebook->GitHubUrl) ?>">this ebook’s GitHub repository</a> and our <a href="/contribute/">contributors section</a>.</p><? } ?>
|
||||
</section>
|
||||
|
||||
<aside id="more-ebooks">
|
||||
<h2>More free ebooks</h2>
|
||||
<ul>
|
||||
<? foreach($carousel as $carouselEbook){ ?>
|
||||
<li><a href="<?= $carouselEbook->Url ?>"><img src="<?= $carouselEbook->CoverImage2xUrl ?>"<? if(false) { ?> srcset="<?= $carouselEbook->CoverImage2xUrl ?> 2x, <?= $carouselEbook->CoverImageUrl ?> 1x"<? } ?> alt="The cover for the Standard Ebooks edition of <?= Formatter::ToPlainText($carouselEbook->Title) ?>" title="<?= Formatter::ToPlainText($carouselEbook->Title) ?>" /></a></li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
</aside>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
80
www/ebooks/index.php
Normal file
|
@ -0,0 +1,80 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
|
||||
try{
|
||||
$page = HttpInput::GetInt('page') ?? 1;
|
||||
$query = HttpInput::GetString('query', false);
|
||||
$sort = HttpInput::GetString('sort', false) ?? SORT_NEWEST;
|
||||
|
||||
if($page <= 0){
|
||||
$page = 1;
|
||||
}
|
||||
|
||||
if($sort != SORT_AUTHOR_ALPHA && $sort != SORT_NEWEST){
|
||||
$sort = SORT_NEWEST;
|
||||
}
|
||||
|
||||
if($query !== null){
|
||||
$ebooks = Library::Search($query);
|
||||
$pageDescription = 'Search results';
|
||||
}
|
||||
else{
|
||||
$ebooks = Library::GetEbooks($sort);
|
||||
|
||||
$pages = ceil(sizeof($ebooks) / EBOOKS_PER_PAGE);
|
||||
|
||||
$totalEbooks = sizeof($ebooks);
|
||||
|
||||
$ebooks = array_slice($ebooks, ($page - 1) * EBOOKS_PER_PAGE, EBOOKS_PER_PAGE);
|
||||
|
||||
$pageDescription = 'Page ' . $page . ' of the Standard Ebooks ebook library, sorted ';
|
||||
switch($sort){
|
||||
case SORT_NEWEST:
|
||||
$pageDescription .= 'by newest ebooks first.';
|
||||
break;
|
||||
case SORT_AUTHOR_ALPHA:
|
||||
$pageDescription .= 'alphabetically by author name.';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$pageTitle = 'Browse Standard Ebooks';
|
||||
if($query !== null){
|
||||
$pageTitle = 'Search Standard Ebooks';
|
||||
}
|
||||
}
|
||||
catch(\Exception $ex){
|
||||
http_response_code(404);
|
||||
include(SITE_ROOT . '/www/404.php');
|
||||
exit();
|
||||
}
|
||||
?><?= Template::Header(['title' => $pageTitle, 'highlight' => 'ebooks', 'description' => $pageDescription]) ?>
|
||||
<main class="ebooks">
|
||||
<h1><? if($query === null){ ?>Browse<? }else{ ?>Search<? } ?> Ebooks</h1>
|
||||
<?= Template::SearchForm(['query' => $query]) ?>
|
||||
<? if(sizeof($ebooks) == 0){ ?>
|
||||
<p class="no-results">No ebooks matched your search. You can try different search terms, or <a href="/ebooks/">browse all of our ebooks</a>.</p>
|
||||
<? }else{ ?>
|
||||
<?= Template::EbookGrid(['ebooks' => $ebooks]) ?>
|
||||
<? } ?>
|
||||
<? if($query === null){ ?>
|
||||
<nav>
|
||||
<a<? if($page > 1){ ?> href="/ebooks/<? if($page - 1 > 1){ ?>?page=<?= $page - 1 ?><? } ?><? if($sort != SORT_NEWEST){ ?><? if($page - 1 <= 1){ ?>?<? }else{ ?>&<? } ?>sort=<?= $sort ?><? } ?>"<? } ?> rel="previous">Back</a>
|
||||
<ol>
|
||||
<? for($i = 1; $i < $pages + 1; $i++){ ?>
|
||||
<li<? if($page == $i){ ?> class="highlighted"<? } ?>><a href="/ebooks/<? if($i - 1 >= 1){ ?>?page=<?= $i ?><? } ?><? if($sort != SORT_NEWEST){ ?><? if($i - 1 < 1){ ?>?<? }else{ ?>&<? } ?>sort=<?= $sort ?><? } ?>"><?= $i ?></a></li>
|
||||
<? } ?>
|
||||
</ol>
|
||||
<a<? if($page < ceil($totalEbooks / EBOOKS_PER_PAGE)){ ?> href="/ebooks/?page=<?= $page + 1 ?><? if($sort != SORT_NEWEST){ ?>&sort=<?= $sort ?><? } ?>"<? }else{ ?> class="disabled"<? } ?> rel="next">Next</a>
|
||||
</nav>
|
||||
<aside class="sort">
|
||||
<p>Sort by</p>
|
||||
<a class="button<? if($sort == SORT_NEWEST){ ?> check<? } ?>" href="/ebooks/">newest</a>
|
||||
<a class="button<? if($sort == SORT_AUTHOR_ALPHA){ ?> check<? } ?>" href="/ebooks/?sort=<?= SORT_AUTHOR_ALPHA ?>">alpha by author</a>
|
||||
</aside>
|
||||
<? if($page == 1){ ?>
|
||||
<?= Template::ContributeAlert() ?>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
BIN
www/fonts/crimson-text-bold-italic.woff
Executable file
BIN
www/fonts/crimson-text-bold-italic.woff2
Normal file
BIN
www/fonts/crimson-text-bold.woff
Executable file
BIN
www/fonts/crimson-text-bold.woff2
Normal file
BIN
www/fonts/crimson-text-italic.woff
Executable file
BIN
www/fonts/crimson-text-italic.woff2
Normal file
BIN
www/fonts/crimson-text.woff
Executable file
BIN
www/fonts/crimson-text.woff2
Normal file
BIN
www/fonts/font-awesome.woff
Normal file
BIN
www/fonts/font-awesome.woff2
Normal file
BIN
www/fonts/league-spartan-bold.woff
Normal file
BIN
www/fonts/league-spartan-bold.woff2
Normal file
BIN
www/fonts/source-code-pro-bold-italic.woff
Normal file
BIN
www/fonts/source-code-pro-bold-italic.woff2
Normal file
BIN
www/fonts/source-code-pro-bold.woff
Normal file
BIN
www/fonts/source-code-pro-bold.woff2
Normal file
BIN
www/fonts/source-code-pro-italic.woff
Normal file
BIN
www/fonts/source-code-pro-italic.woff2
Normal file
BIN
www/fonts/source-code-pro.woff
Normal file
BIN
www/fonts/source-code-pro.woff2
Normal file
166
www/help/how-to-use-our-ebooks.php
Normal file
|
@ -0,0 +1,166 @@
|
|||
<?
|
||||
require_once('Core.php');
|
||||
?><?= Template::Header(['title' => 'How to Use Our Ebooks', 'highlight' => 'contribute', 'description' => 'Help, tips, and tricks for using the ebook files you download from Standard Ebooks.']) ?>
|
||||
<main>
|
||||
<article>
|
||||
<h1>How to Use Our Ebooks</h1>
|
||||
<section id="which-file-to-download">
|
||||
<h2>Which File Do I Download?</h2>
|
||||
<p>We offer four different kinds of ebook file for you to download. Which one you pick depends on which ereading device and ereading software you’re using.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>For <b>most ereaders</b>, <em>except</em> Amazon Kindle and Kobo devices and software: download the <b>epub</b> file. This epub2-compatible file will work in all ereaders except Kindles. While this file will work on Kobo, it’ll look pretty bad; please download our special Kobo-compatible epub file for Kobo devices and software.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>For <b>Amazon Kindle ereading software or devices</b>: download the <b>azw3</b> file. You can optionally download the Kindle cover thumbnail if you’d like the ebook cover to appear in your library. (Thanks to a long-standing bug in the Kindle software, side-loaded ebooks don’t display cover images automatically. <a href="https://www.amazon.com/help/">Complain to Amazon.</a>)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>For <b>Kobo ereading software or devices</b>: download the <b>kepub</b> file. This file is specially prepared to present the best reading experience for Kobos.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>For advanced ereaders like <a href="https://chrome.google.com/webstore/detail/readium/fepbnnnkkadjhjahcafoaglimekefifl">Readium</a>, and for readers who like bleeding-edge technology: download the <b>pure epub3</b> file. Pure epub3 isn’t compatible with most ereaders yet, so only download this file if you know what you’re doing.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="transferring-to-your-ereader">
|
||||
<h2>Transferring Ebooks to Your Ereader</h2>
|
||||
<p>Once you’ve downloaded the file most appropriate for your ereader, you’ll need to transfer that file to your device.</p>
|
||||
<ul>
|
||||
<li id="kindle">
|
||||
<h3>Amazon Kindle eInk Devices (Paperwhite, Voyage, Oasis, etc. <em>except DX</em>)</h3>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Using a USB cable, connect your Kindle to the computer you downloaded the azw3 file to. Your Kindle will appear as a USB drive that you can browse.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Navigate to the <code class="path">documents</code> folder on your Kindle, then drag and drop the azw3 file into the <code class="path">documents</code> or <code class="path">ebooks</code> folder.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>If you downloaded the Kindle cover thumbnail, now navigate to your Kindle’s <code class="path">system</code> folder.</p>
|
||||
<p><i><strong>If you don’t see a <code class="path">system</code> folder when your Kindle is plugged in</strong>, you may have to tell your computer to show hidden system files. For instructions on how to do that, <a href="http://windows.microsoft.com/en-us/windows/show-hidden-files">see here for Windows</a> or <a href="https://www.lifewire.com/display-hidden-files-in-os-x-153332">see here for Mac</a>.</i></p>
|
||||
<p>Once you’re in the <code class="path">system</code> folder, find the <code class="path">thumbnails</code> folder and drag and drop the thumbnail into there. <em>Make sure to copy the thumbnail <strong>after</strong> copying the azw3 ebook file.</em> Due to a bug in the Kindle software, your Kindle will use a default cover for your ebook if you don’t copy the thumbnail file over. <a href="https://www.amazon.com/help/">Complain to Amazon.</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Eject the Kindle from your computer using your system’s “Safely remove drive” option. Your ebook should now be visible!</p>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li id="kindle-dx">
|
||||
<h3>Kindle DX Devices</h3>
|
||||
<p>Kindle DX devices don’t support Amazon’s latest azw3 format. Instead, download the epub file and use Calibre to convert to mobi and transfer to your device.</p>
|
||||
</li>
|
||||
<li id="kindle-fire">
|
||||
<h3>Amazon Kindle Fire Devices</h3>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Use your device’s web browser to download the azw3 file you want to read.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Tap the 3 dots in the upper-right hand corner, select Downloads, and the book you downloaded.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li id="kobo">
|
||||
<h3>Kobo eInk Devices</h3>
|
||||
<h4>If you’ve download a kepub file</h4>
|
||||
<p><strong><em>Don’t use Calibre to transfer the .kepub.epub file!</em></strong></p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Using a USB cable, connect your Kobo to the computer you downloaded the kepub file to. Your Kobo will appear as a USB drive that you can browse using your computer’s file manager.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Navigate to the Kobo drive and drag and drop the kepub file in. <em>Don’t change the filename of the ebook!</em> Kobo requires that the filename end in “.kepub.epub”.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Eject the Kobo from your computer using your system’s “Safely remove drive” option. Your ebook should now be visible!</p>
|
||||
</li>
|
||||
</ol>
|
||||
<h4>If you’ve download a regular epub file</h4>
|
||||
<p><em>These steps aren’t necessary if you’ve downloaded our special kepub file.</em></p>
|
||||
<p>The best way to transfer our epubs to your Kobo device is to download the kepub file instead of the epub file. If you prefer our epub file, then your best bet is to use the <a href="https://calibre-ebook.com">Calibre ebook management program</a> with a special plugin. Calibre knows how to talk to your Kobo device to ensure our epubs look and function optimally.</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Download and install <a href="https://calibre-ebook.com">Calibre</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Open Calibre, and install the KoboTouchExtended plugin:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Click the “Preferences” button on the toolbar.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Under the “Advanced” heading, click the “Plugins” button.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Click the “Get new plugins” button.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>In the “Filter by name” field, enter “KoboTouchExtended” and double-click the result to install it.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Restart Calibre.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
<p>Add the epub file you downloaded to your Calibre library by clicking the “Add books” button on the toolbar.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Using a USB cable, connect your Kobo device to the computer you downloaded the epub file to.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Highlight the ebook in your library and click the “Send to device” button on the toolbar.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Eject your Kobo and you’re ready to read!</p>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li id="ibooks">
|
||||
<h3>iPad/iBooks</h3>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Open the download page for the ebook you’d like to read and tap on the epub download link.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>On the download screen that appears, tap “open in iBooks”.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li id="nook">
|
||||
<h3>Barnes & Noble Nook eInk Devices (Nook Glowlight, Nook Glowlight Plus, Nook Simple Touch, etc.)</h3>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Using a USB cable, connect your Nook to the computer you downloaded the epub file to. Your Nook will appear as a USB drive that you can browse.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Navigate to the Nook drive and drag and drop the epub file in.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Eject the Nook from your computer using your system’s “Safely remove drive” option. Your ebook should now be visible!</p>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li id="sony">
|
||||
<h3>Sony PRS-T2</h3>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Using a USB cable, connect your Sony PRS-T2 to the computer you downloaded the epub file to.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Download, install, and open the <a href="http://www.sony.com.au/support/download/469196">Sony Reader for PC</a> software.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Drag the epub file you downloaded into the Books tab of the Reader for PC software, and then Sync.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li id="other">
|
||||
<h3>Other Devices</h3>
|
||||
<p>We need help collecting instructions for transferring files to other devices. If you have a non-Kindle device, <a href="/contribute/">get in touch and help write these instructions</a>!</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</article>
|
||||
</main>
|
||||
<?= Template::Footer() ?>
|
11
www/images/amazon.svg
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 10 10"
|
||||
height="10"
|
||||
width="10"
|
||||
version="1.1">
|
||||
<path
|
||||
style="fill:#222222"
|
||||
d="M 8.653711,8.236492 C 8.821205,8.152922 8.9494147,8.281132 8.7765637,8.504339 8.6037128,8.727545 7.2141195,10 4.8817028,10 2.5492861,10 0.76363561,8.403986 0.21686943,7.745795 0.06616053,7.572944 0.23936863,7.494732 0.33972219,7.561516 1.9746638,8.554694 4.5302868,10.189636 8.6540681,8.236849 Z M 9.8090267,7.594729 c 0.08357,0.111781 0,0.602478 -0.1449947,0.959965 C 9.5190372,8.90611 9.3069019,9.151816 9.1897632,9.246455 9.0669105,9.346809 8.977628,9.307885 9.0447684,9.162885 9.1119084,9.01789 9.4743959,8.125065 9.3294011,7.935429 9.1844063,7.75115 8.5037163,7.840429 8.2580108,7.862929 8.0180194,7.885429 7.9680212,7.907569 7.945522,7.857229 7.895167,7.72902 8.4308618,7.51117 8.7826349,7.466529 9.134051,7.427599 9.6976023,7.449749 9.8093837,7.594739 Z M 7.6105339,5.122674 c 0,0.613907 0.7199743,1.177458 0.7199743,1.177458 L 7.0637677,7.550087 C 6.5669998,7.081176 6.1930846,6.690832 6.1930846,6.690832 6.1373723,6.63512 6.092731,6.56798 6.0534467,6.506553 5.0434828,8.085783 1.9575215,7.985429 1.9575215,5.541231 c 0,-2.276705 2.6952609,-2.583479 3.7834364,-2.622764 l 0,-0.708546 c 0,-0.150709 0.055712,-0.837113 -0.7924717,-0.837113 0,0 -0.848184,0 -1.2110282,1.104961 L 2.0968023,2.32706 C 2.0968023,1.227813 3.1403364,0 5.104552,0 7.0630535,0 7.6101768,1.272455 7.6101768,1.836006 l 0,3.286668 z m -3.749866,0.117139 c 0,1.132817 1.8806471,1.400664 1.8806471,-0.384986 l 0,-0.903897 C 4.9881276,3.97343 3.8606679,4.185208 3.8606679,5.239813 Z" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
BIN
www/images/arrow-down.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
www/images/book.jpg
Normal file
After Width: | Height: | Size: 248 KiB |
BIN
www/images/code.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
www/images/covers.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
www/images/devices.png
Normal file
After Width: | Height: | Size: 173 KiB |
85
www/images/divider.svg
Normal file
|
@ -0,0 +1,85 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="535.44727"
|
||||
height="17.678345"
|
||||
id="svg881"
|
||||
version="1.1"
|
||||
inkscape:version="0.48+devel r"
|
||||
sodipodi:docname="border-2.svg">
|
||||
<defs
|
||||
id="defs883" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.35"
|
||||
inkscape:cx="401.29507"
|
||||
inkscape:cy="-351.16083"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="716"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata886">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(239.15221,-163.52301)">
|
||||
<path
|
||||
d="M -24.733526,167.12038 C -28.338226,167.12038 -31.262526,169.5861 -31.337366,172.6492 L -33.868416,172.6492 C -37.956176,172.6492 -45.886776,167.12038 -45.886776,167.12038 -53.973866,171.40273 -88.657296,172.86012 -89.378506,172.89006 L -238.07039,172.89006 C -238.66777,172.89006 -239.15221,173.37314 -239.15221,173.96916 -239.15221,174.56926 -238.66777,175.05233 -238.07039,175.05233 L -89.635696,175.05233 -89.635696,175.05369 C -60.309626,175.53405 -44.444356,178.9006 -44.444356,178.9006 -41.298246,174.91353 -34.497086,174.03992 -31.214896,173.88343 -30.610716,176.4689 -27.939516,178.41889 -24.733526,178.41889 -21.082566,178.41889 -18.122886,175.88921 -18.122886,172.77031 -18.122886,169.65006 -21.082566,167.12038 -24.733526,167.12038 Z M -46.127636,177.45682 C -46.127636,177.45682 -61.030836,174.09163 -73.530916,173.85077 -73.530916,173.85077 -54.300446,172.89006 -46.848846,169.28401 -46.848846,169.28401 -41.559516,172.6492 -39.397236,173.37041 -39.397236,173.37041 -44.686576,175.77354 -46.127636,177.45682 Z M -25.102296,176.73697 C -27.089026,176.73697 -28.698826,175.06866 -28.698826,173.00981 -28.698826,170.95368 -27.089026,169.28537 -25.102296,169.28537 -23.114206,169.28537 -21.503046,170.95368 -21.503046,173.00981 -21.503046,175.06866 -23.114206,176.73697 -25.102296,176.73697"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path22"
|
||||
style="fill:#222222;fill-opacity:1;fill-rule:nonzero;stroke:none" />
|
||||
<path
|
||||
d="M 295.21597,172.89006 146.51728,172.89006 C 145.79607,172.86012 111.114,171.40273 103.02555,167.12038 103.02555,167.12038 95.093594,172.6492 91.007194,172.6492 L 88.477504,172.6492 C 88.398584,169.5861 85.474274,167.12038 81.873664,167.12038 78.221344,167.12038 75.263024,169.65006 75.263024,172.77031 75.263024,175.88921 78.221344,178.41889 81.873664,178.41889 85.079654,178.41889 87.749494,176.4689 88.355034,173.88343 91.634504,174.03992 98.438384,174.91353 101.58313,178.9006 101.58313,178.9006 117.44704,175.53405 146.77583,175.05369 L 146.77583,175.05233 295.21597,175.05233 C 295.81199,175.05233 296.29506,174.56926 296.29506,173.96916 296.29506,173.37314 295.81199,172.89006 295.21597,172.89006 Z M 82.239714,176.73697 C 80.251624,176.73697 78.640464,175.06866 78.640464,173.00981 78.640464,170.95368 80.251624,169.28537 82.239714,169.28537 84.226444,169.28537 85.837604,170.95368 85.837604,173.00981 85.837604,175.06866 84.226444,176.73697 82.239714,176.73697 Z M 103.26777,177.45682 C 101.82399,175.77354 96.534654,173.37041 96.534654,173.37041 98.696924,172.6492 103.98762,169.28401 103.98762,169.28401 111.43922,172.89006 130.66969,173.85077 130.66969,173.85077 118.17234,174.09163 103.26777,177.45682 103.26777,177.45682"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path24"
|
||||
style="fill:#222222;fill-opacity:1;fill-rule:nonzero;stroke:none" />
|
||||
<path
|
||||
d="M 2.9528036,171.71435 C 7.7726636,175.27686 17.353884,172.88054 25.024574,169.5235 32.715674,166.15831 39.927774,163.75518 39.927774,163.75518 35.600514,162.31276 25.639644,167.94228 15.409334,170.96593 6.4880936,173.60311 3.3310936,171.94568 2.9528036,171.71435"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path26"
|
||||
style="fill:#222222;fill-opacity:1;fill-rule:nonzero;stroke:none" />
|
||||
<path
|
||||
d="M 55.069124,173.43029 C 53.806324,172.16749 49.710394,170.82985 41.367474,173.61127 34.879304,175.77218 25.504924,179.55922 25.504924,179.55922 32.534684,180.28043 34.337714,177.21597 43.533834,174.33112 51.834564,171.7266 55.069124,173.43029 55.069124,173.43029"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path28"
|
||||
style="fill:#222222;fill-opacity:1;fill-rule:nonzero;stroke:none" />
|
||||
<path
|
||||
d="M 59.656294,163.69803 C 50.154004,163.00675 42.102294,166.43318 34.317304,169.74531 L 30.948024,171.17412 C 22.844604,174.62505 11.743404,179.3483 1.5620836,179.02035 -7.7401664,178.72098 -13.075766,176.28792 -13.075766,172.34847 -13.075766,168.90027 -9.7731664,166.89721 -3.2577764,166.39508 3.2875536,165.8916 8.9660636,169.77116 9.0218536,169.81063 9.5130936,170.15082 10.185314,170.02971 10.526874,169.53983 10.867064,169.04995 10.748684,168.37773 10.258804,168.03618 10.002974,167.85792 3.9080636,163.67625 -3.4237964,164.23961 -13.188716,164.99076 -15.239406,169.0622 -15.239406,172.34847 -15.239406,175.4456 -13.064886,180.7118 1.4913236,181.18126 12.151634,181.52554 22.984764,177.37926 31.273244,173.85077 L 34.641164,172.42059 C 42.190744,169.21053 50.518694,165.20304 59.497084,165.85485 70.113854,166.62777 71.475984,170.02019 71.475984,172.89006 71.475984,173.71877 71.157564,174.4291 70.504394,175.06186 68.759874,176.7533 64.793224,177.71809 60.152974,177.57657 54.515284,177.40647 50.306404,175.78715 50.251974,175.7613 49.715834,175.50139 49.068104,175.72728 48.806834,176.26614 48.548284,176.80229 48.772814,177.4473 49.310324,177.70857 49.548454,177.82287 53.975054,179.55514 60.086294,179.73884 65.371544,179.89941 69.829444,178.73187 72.010774,176.61586 73.091224,175.56671 73.638254,174.31343 73.638254,172.89006 73.638254,167.31224 69.196684,164.39202 59.656294,163.69803"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path30"
|
||||
style="fill:#222222;fill-opacity:1;fill-rule:nonzero;stroke:none" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.8 KiB |
117
www/images/draft-ribbon.svg
Normal file
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="120"
|
||||
height="120"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48+devel r"
|
||||
sodipodi:docname="draft-ribbon.svg">
|
||||
<defs
|
||||
id="defs4">
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath1537">
|
||||
<rect
|
||||
style="color:#000000;color-interpolation:sRGB;color-interpolation-filters:linearRGB;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;clip-rule:nonzero"
|
||||
id="rect1539"
|
||||
width="120"
|
||||
height="120"
|
||||
x="694.13245"
|
||||
y="623.42175"
|
||||
transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.4142136"
|
||||
inkscape:cx="56.986426"
|
||||
inkscape:cy="49.249982"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="g835"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="716"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-932.36218)">
|
||||
<g
|
||||
id="g1482">
|
||||
<g
|
||||
transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,-694.13244,328.94043)"
|
||||
id="g835">
|
||||
<g
|
||||
id="g1499"
|
||||
clip-path="url(#clipPath1537)"
|
||||
transform="translate(14.142133,-14.14214)">
|
||||
<rect
|
||||
y="989.86218"
|
||||
x="-100"
|
||||
height="25"
|
||||
width="300"
|
||||
id="rect810"
|
||||
style="color:#000000;color-interpolation:sRGB;color-interpolation-filters:linearRGB;fill:#f15549;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;clip-rule:nonzero" />
|
||||
<g
|
||||
id="text812"
|
||||
style="font-size:18.18181801px;font-style:normal;font-weight:normal;line-height:100%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Sans">
|
||||
<path
|
||||
id="path1489"
|
||||
style="font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;font-family:League Spartan;-inkscape-font-specification:League Spartan Bold"
|
||||
d="M 20.146733,994.86218 20.146733,1009.8622 24.492188,1009.8622 C 28.619461,1009.8622 32.055824,1006.7349 32.055824,1002.3531 32.055824,997.98946 28.601279,994.86218 24.492188,994.86218 L 20.146733,994.86218 Z M 23.564915,1006.8076 23.564915,997.91673 24.092188,997.91673 C 26.637642,997.91673 28.364915,999.86218 28.364915,1002.3713 28.346733,1004.8804 26.619461,1006.8076 24.092188,1006.8076 L 23.564915,1006.8076 Z"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path1491"
|
||||
style="font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;font-family:League Spartan;-inkscape-font-specification:League Spartan Bold"
|
||||
d="M 33.570028,994.86218 33.570028,1009.8622 36.98821,1009.8622 36.98821,1003.9349 41.570028,1009.8622 45.915483,1009.8622 40.751846,1003.6622 C 42.58821,1003.0804 43.824574,1001.5713 43.824574,999.31673 43.824574,996.37127 41.715483,994.86218 38.933665,994.86218 L 33.570028,994.86218 Z M 36.98821,1001.5167 36.98821,997.58946 37.38821,997.58946 C 38.679119,997.58946 40.224574,997.68036 40.224574,999.55309 40.224574,1001.4258 38.679119,1001.5167 37.38821,1001.5167 L 36.98821,1001.5167 Z"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path1493"
|
||||
style="font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;font-family:League Spartan;-inkscape-font-specification:League Spartan Bold"
|
||||
d="M 54.22088,994.86218 51.057244,994.86218 45.002698,1009.8622 48.675426,1009.8622 49.784517,1006.8622 55.493607,1006.8622 56.602698,1009.8622 60.275426,1009.8622 54.22088,994.86218 Z M 54.329971,1003.8622 50.948153,1003.8622 52.62088,999.49855 52.657244,999.49855 54.329971,1003.8622 Z"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path1495"
|
||||
style="font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;font-family:League Spartan;-inkscape-font-specification:League Spartan Bold"
|
||||
d="M 69.515483,994.86218 60.842755,994.86218 60.842755,1009.8622 64.260937,1009.8622 64.260937,1003.844 69.115483,1003.844 69.115483,1000.844 64.260937,1000.844 64.260937,997.86218 69.515483,997.86218 69.515483,994.86218 Z"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path1497"
|
||||
style="font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;font-family:League Spartan;-inkscape-font-specification:League Spartan Bold"
|
||||
d="M 69.307812,997.86218 72.871448,997.86218 72.871448,1009.8622 76.28963,1009.8622 76.28963,997.86218 79.853266,997.86218 79.853266,994.86218 69.307812,994.86218 69.307812,997.86218 Z"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6 KiB |
BIN
www/images/endnote.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
www/images/epub-draft-tree.png
Normal file
After Width: | Height: | Size: 94 KiB |
31
www/images/epub.svg
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
id="svg2"
|
||||
viewBox="0 0 10 10"
|
||||
height="10"
|
||||
width="10"
|
||||
version="1.1">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<path
|
||||
id="path4"
|
||||
style="fill:#222222"
|
||||
d="M 4.9999058,8.14262 1.8575383,5 4.9999058,1.85782 6.0474466,2.90517 3.952365,5 4.9998421,6.04754 8.1422094,2.90537 5.4048402,0.168 c -0.2235264,-0.22372 -0.5860876,-0.22372 -0.8098051,0 L 0.16764602,4.59539 c -0.22352635,0.22352 -0.22352635,0.58608 0,0.8098 L 4.5950988,9.83245 c 0.2237175,0.22372 0.5862788,0.22372 0.8098051,0 L 9.8323568,5.40519 c 0.2235262,-0.22372 0.2235262,-0.58628 0,-0.8098 L 9.1896227,3.95284 4.9999058,8.14262 Z" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
BIN
www/images/favicons/android-chrome-192x192.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
www/images/favicons/android-chrome-384x384.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
www/images/favicons/apple-touch-icon-114x114.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
www/images/favicons/apple-touch-icon-120x120.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
www/images/favicons/apple-touch-icon-144x144.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
www/images/favicons/apple-touch-icon-152x152.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
www/images/favicons/apple-touch-icon-180x180.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
www/images/favicons/apple-touch-icon-57x57.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
www/images/favicons/apple-touch-icon-60x60.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
www/images/favicons/apple-touch-icon-72x72.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
www/images/favicons/apple-touch-icon-76x76.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
www/images/favicons/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
9
www/images/favicons/browserconfig.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/mstile-150x150.png"/>
|
||||
<TileColor>#b91d47</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
BIN
www/images/favicons/favicon-16x16.png
Normal file
After Width: | Height: | Size: 456 B |
BIN
www/images/favicons/favicon-32x32.png
Normal file
After Width: | Height: | Size: 736 B |
BIN
www/images/favicons/favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
18
www/images/favicons/manifest.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name": "",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/android-chrome-384x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
BIN
www/images/favicons/mstile-150x150.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
1
www/images/favicons/safari-pinned-tab.svg
Normal file
After Width: | Height: | Size: 8.3 KiB |
25
www/images/git.svg
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1"
|
||||
width="114.8625"
|
||||
height="114.8625"
|
||||
xml:space="preserve">
|
||||
<defs
|
||||
id="defs6"><clipPath
|
||||
id="clipPath18"><path
|
||||
d="M 0,918.855 0,0 l 918.879,0 0,918.855 -918.879,0 z"
|
||||
/></clipPath></defs><g
|
||||
transform="matrix(1.25,0,0,-1.25,0,114.8625)"
|
||||
id="g10"><g
|
||||
transform="scale(0.1,0.1)"
|
||||
id="g12"><g
|
||||
id="g14"><g
|
||||
clip-path="url(#clipPath18)"
|
||||
id="g16"><path
|
||||
d="M 901.543,500.352 500.352,901.527 c -23.094,23.11 -60.567,23.11 -83.692,0 L 333.359,818.211 439.031,712.535 c 24.563,8.293 52.727,2.727 72.297,-16.847 19.688,-19.696 25.203,-48.102 16.699,-72.75 L 629.883,521.094 c 24.648,8.496 53.066,3.004 72.754,-16.711 27.5,-27.492 27.5,-72.059 0,-99.574 -27.52,-27.516 -72.078,-27.516 -99.61,0 -20.683,20.703 -25.8,51.097 -15.312,76.582 l -95,94.992 0,-249.969 c 6.699,-3.32 13.027,-7.742 18.613,-13.312 27.5,-27.497 27.5,-72.059 0,-99.598 -27.5,-27.488 -72.09,-27.488 -99.57,0 -27.5,27.539 -27.5,72.101 0,99.598 6.797,6.789 14.668,11.925 23.066,15.363 l 0,252.281 c -8.398,3.438 -16.25,8.531 -23.066,15.367 -20.828,20.821 -25.84,51.395 -15.156,76.977 L 292.422,777.285 17.3242,502.211 c -23.10545,-23.129 -23.10545,-60.602 0,-83.711 L 418.535,17.3242 c 23.098,-23.10545 60.559,-23.10545 83.692,0 L 901.543,416.641 c 23.113,23.113 23.113,60.605 0,83.711"
|
||||
style="fill:#f03c2e;fill-opacity:1;fill-rule:nonzero;stroke:none" /></g></g></g></g></svg>
|
After Width: | Height: | Size: 1.7 KiB |
11
www/images/github.svg
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1"
|
||||
width="10"
|
||||
height="10"
|
||||
viewBox="0 0 10 10">
|
||||
<path
|
||||
d="m 3.7891667,7.6825 c 0,0.3516667 -0.3191667,0.4295833 -0.6054167,0.4295833 -0.28,0 -0.6966667,-0.045417 -0.6966667,-0.41 0,-0.3579166 0.3516667,-0.4166666 0.6379167,-0.4166666 0.2733333,0 0.6641667,0.045417 0.6641667,0.3970833 z M 3.5545833,4.6483333 c 0,0.3254167 -0.1304166,0.5533334 -0.4816666,0.5533334 -0.3579167,0 -0.50125,-0.2083334 -0.50125,-0.5470834 0,-0.33875 0.1304166,-0.5858333 0.50125,-0.5858333 0.3320833,0 0.4816666,0.2733333 0.4816666,0.5795833 z M 4.6354167,4.16 l 0,-0.81375 C 4.3554167,3.4504167 4.0558333,3.535 3.7566667,3.535 3.5416667,3.41125 3.2945833,3.34625 3.0404167,3.34625 2.2983333,3.34625 1.7125,3.8933333 1.7125,4.6483333 c 0,0.40375 0.2670833,0.9633334 0.6704167,1.1004167 l 0,0.019583 c -0.2083334,0.09125 -0.2475,0.345 -0.2475,0.5533334 0,0.215 0.077917,0.3908333 0.2670833,0.50125 l 0,0.019583 C 1.96,6.9858333 1.6666667,7.2658333 1.6666667,7.7475 c 0,0.8266667 0.7879166,1.06125 1.4779166,1.06125 0.8333334,0 1.4583334,-0.3058333 1.4583334,-1.2241667 0,-0.65125 -0.5925,-0.84625 -1.1329167,-0.9441666 C 3.2875,6.6079167 2.975,6.4775 2.975,6.2495833 2.975,6.0345833 3.0920833,5.94375 3.2941667,5.91125 3.9583333,5.7808333 4.38125,5.2666667 4.38125,4.5833333 4.38125,4.46625 4.355,4.3554167 4.31625,4.245 4.4204167,4.21875 4.53125,4.1929167 4.6354167,4.1604167 Z m 0.3841666,2.7279167 0.8920834,0 C 5.89875,6.7120833 5.89875,6.53 5.89875,6.3541667 l 0,-2.5195834 c 0,-0.1495833 0,-0.2995833 0.012917,-0.4491666 l -0.8920834,0 C 5.0391667,3.535 5.0391667,3.6979167 5.0391667,3.8475 l 0,2.5520833 c 0,0.1629167 0,0.3254167 -0.019583,0.4883334 z m 3.31375,-0.1041667 0,-0.7879167 C 8.2029167,6.0870833 8.0466667,6.1325 7.8908333,6.1325 c -0.2929166,0 -0.345,-0.2929167 -0.345,-0.53375 l 0,-1.465 0.3383334,0 c 0.1170833,0 0.2279166,0.012917 0.345,0.012917 l 0,-0.7616667 -0.68375,0 C 7.5454167,3.16375 7.5325,2.9425 7.565,2.7208333 l -0.9116667,0 C 6.6729167,2.8379167 6.6795833,2.955 6.6795833,3.07875 l 0,0.3058333 -0.3908333,0 0,0.7616667 C 6.366667,4.13958 6.445,4.126667 6.5295833,4.126667 c 0.045417,0 0.0975,0.00667 0.1495834,0.00667 l 0,0.012917 -0.012917,0 0,1.4129167 c 0,0.7029166 0.1041667,1.3804166 0.9633333,1.3804166 0.2408334,0 0.4883334,-0.039167 0.7029167,-0.15625 z m -2.3175,-4.59625 c 0,-0.3058333 -0.2279166,-0.5925 -0.5470833,-0.5925 -0.3191667,0 -0.5533333,0.28 -0.5533333,0.5925 0,0.3058333 0.2408333,0.5795833 0.5533333,0.5795833 0.3125,0 0.5470833,-0.28 0.5470833,-0.5795833 z M 10,1.875 10,8.125 C 10,9.16 9.16,10 8.125,10 l -6.25,0 C 0.84,10 0,9.16 0,8.125 L 0,1.875 C 0,0.84 0.84,0 1.875,0 l 6.25,0 C 9.16,0 10,0.84 10,1.875 Z"
|
||||
style="fill:#222222" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.7 KiB |
11
www/images/globe.svg
Normal file
After Width: | Height: | Size: 9.1 KiB |
11
www/images/google.svg
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1"
|
||||
width="10"
|
||||
height="10"
|
||||
viewBox="0 0 10 10">
|
||||
<path
|
||||
d="m 5.10125,4.28375 4.7200001,0 C 9.8666666,4.5375 9.8991667,4.785 9.8991667,5.1170833 9.8991667,7.96875 7.985,10 5.1008333,10 2.33375,10 0.10083335,7.7670833 0.10083335,5 c 0,-2.7670833 2.23291665,-5 4.99999995,-5 1.3475,0 2.4804167,0.495 3.3529168,1.30875 L 7.0929166,2.6175 C 6.7216666,2.2595833 6.0708333,1.8429167 5.1008333,1.8429167 c -1.7058333,0 -3.0991667,1.4129166 -3.0991667,3.1575 0,1.7445833 1.3933334,3.1575 3.0991667,3.1575 1.9791667,0 2.72125,-1.4191667 2.83875,-2.155 l -2.83875,0 0,-1.71875 z"
|
||||
style="fill:#222222" />
|
||||
</svg>
|
After Width: | Height: | Size: 730 B |
14
www/images/hathitrust.svg
Normal file
After Width: | Height: | Size: 11 KiB |