<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:five="http://namespaces.zope.org/five"
    xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
    xmlns:i18n="http://namespaces.zope.org/i18n"
    i18n_domain="ftw.book">

  <!-- Include configuration for dependencies listed in setup.py -->
  <includeDependencies package="." />

  <five:registerPackage package="." initialize=".initialize" />

  <i18n:registerTranslations directory="locales" />

  <!-- Include the sub-packages that use their own configure.zcml files. -->
  <include file="permissions.zcml" />
  <include package=".latex" />
  <include package=".browser" />
  <include package=".content" />
  <include package=".portlets" />
  <include package=".upgrades" />

  <include file="skins.zcml" />

  <!-- Register the installation GenericSetup extension profile -->
  <genericsetup:registerProfile
      name="default"
      title="ftw.book"
      directory="profiles/default"
      description=""
      provides="Products.GenericSetup.interfaces.EXTENSION"
      />

  <subscriber
      for=".interfaces.IBook
           Products.Archetypes.interfaces.IObjectInitializedEvent"
      handler=".eventhandler.add_navigation_portlet" />

  <adapter factory="ftw.book.layer.BookTraverse" />

  <!-- ILaTeXCodeInjectionEnabled schema extender adapter -->
  <adapter
      name="ftw.book.latexcodeinjection"
      factory=".latexinjection.LaTeXCodeInjectionExtender"
      provides="archetypes.schemaextender.interfaces.ISchemaExtender" />

  <class class="Products.Archetypes.BaseObject.BaseObject">
    <implements interface="ftw.book.interfaces.ILaTeXCodeInjectionEnabled" />
  </class>

</configure>
