jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven Doxia Tools
  • Maven Doxia Tools
  • DOXIATOOLS-24

Add images to example-book

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: Doxia Book Renderer
  • Labels:
    None
  • Number of attachments :
    0

Description

Images are an important feature of a technical manual or book, yet try as I might, I cannot get them to work with a Doxia book. Could someone please update the example-book to include at least one image, so that the rest of the world may benefit from knowing how to properly add images to a Doxia book?

It would be beneficial if the example could show how to add an image from a local file as well as from a URL.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Lukas Theussl added a comment - 30/Jul/09 3:34 AM

This is not possible yet out of the box, see DOXIA-355. As a workaround you could use the antrun-plugin to copy any resources before the book is built, for instance:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>book</id>
            <phase>pre-site</phase>
            <configuration>
              <tasks>
                <copy todir="${project.build.directory}/generated-site/pdf/">
                  <fileset dir="${basedir}/src/books/resources/"/>
                </copy>
                <copy todir="${project.build.directory}/generated-site/rtf/">
                  <fileset dir="${basedir}/src/books/resources/"/>
                </copy>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

(this will only work if you build the book during the site phase)

Assuming that you have an images/ folder in /src/books/resources/, you can then include an image in an apt file like that:

[../images/architecture.png]
Show
Lukas Theussl added a comment - 30/Jul/09 3:34 AM This is not possible yet out of the box, see DOXIA-355. As a workaround you could use the antrun-plugin to copy any resources before the book is built, for instance: <plugin> <groupId> org.apache.maven.plugins </groupId> <artifactId> maven-antrun-plugin </artifactId> <executions> <execution> <id> book </id> <phase> pre-site </phase> <configuration> <tasks> <copy todir= "${project.build.directory}/generated-site/pdf/" > <fileset dir= "${basedir}/src/books/resources/" /> </copy> <copy todir= "${project.build.directory}/generated-site/rtf/" > <fileset dir= "${basedir}/src/books/resources/" /> </copy> </tasks> </configuration> <goals> <goal> run </goal> </goals> </execution> </executions> </plugin> (this will only work if you build the book during the site phase) Assuming that you have an images/ folder in /src/books/resources/, you can then include an image in an apt file like that: [../images/architecture.png]

People

  • Assignee:
    Unassigned
    Reporter:
    Steven Swor
Vote (1)
Watch (1)

Dates

  • Created:
    29/Jul/09 2:16 PM
    Updated:
    05/Apr/12 1:46 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.