### Home Classes Methods

### In Files

- lib/taskjuggler/UserManual.rb

### Parent

RichTextDocument

### Methods

- ::new
- #generate
- #generateHTML
- #generateHTMLCover
- #generateHTMLFooter
- #generateHTMLHeader
- #generateHTMLNavigationBar
- #generateHTMLindex
- #generateStyleSheet

### Included Modules

- TaskJuggler::HTMLElements

### Files

- CHANGELOG
- COPYING
- README.rdoc

### Class/Module Index

Quicksearch

- TaskJuggler
- TaskJuggler::Account
- TaskJuggler::AccountAttribute
- TaskJuggler::AccountCredit
- TaskJuggler::AccountCreditListAttribute
- TaskJuggler::AccountListRE
- TaskJuggler::AccountScenario
- TaskJuggler::AlertLevelDefinition
- TaskJuggler::AlertLevelDefinitions
- TaskJuggler::Allocation
- TaskJuggler::AllocationAttribute
- TaskJuggler::AttributeBase
- TaskJuggler::AttributeDefinition
- TaskJuggler::AttributeOverwrite
- TaskJuggler::BatchProcessor
- TaskJuggler::Booking
- TaskJuggler::BookingListAttribute
- TaskJuggler::BooleanAttribute
- TaskJuggler::CSVFile
- TaskJuggler::CellSettingPattern
- TaskJuggler::CellSettingPatternList
- TaskJuggler::Charge
- TaskJuggler::ChargeListAttribute
- TaskJuggler::ChargeSet
- TaskJuggler::ChargeSetListAttribute
- TaskJuggler::ChartPlotter
- TaskJuggler::ChartPlotterError
- TaskJuggler::CollisionDetector
- TaskJuggler::ColumnListAttribute
- TaskJuggler::ColumnTable
- TaskJuggler::Daemon
- TaskJuggler::DaemonConnector
- TaskJuggler::DaemonConnectorMixin
- TaskJuggler::DataCache
- TaskJuggler::DataCacheEntry
- TaskJuggler::DateAttribute
- TaskJuggler::DefinitionListAttribute
- TaskJuggler::DependencyListAttribute
- TaskJuggler::DurationAttribute
- TaskJuggler::ExportRE
- TaskJuggler::FileList
- TaskJuggler::FileRecord
- TaskJuggler::FixnumAttribute
- TaskJuggler::FlagListAttribute
- TaskJuggler::FloatAttribute
- TaskJuggler::FormatListAttribute
- TaskJuggler::GanttChart
- TaskJuggler::GanttContainer
- TaskJuggler::GanttHeader
- TaskJuggler::GanttHeaderScaleItem
- TaskJuggler::GanttLine
- TaskJuggler::GanttLoadStack
- TaskJuggler::GanttMilestone
- TaskJuggler::GanttRouter
- TaskJuggler::GanttTaskBar
- TaskJuggler::HTMLDocument
- TaskJuggler::HTMLElements
- TaskJuggler::HTMLGraphics
- TaskJuggler::ICalReport
- TaskJuggler::ICalendar
- TaskJuggler::ICalendar::Component
- TaskJuggler::ICalendar::Event
- TaskJuggler::ICalendar::Journal
- TaskJuggler::ICalendar::Person
- TaskJuggler::ICalendar::Todo
- TaskJuggler::Interval
- TaskJuggler::IntervalList
- TaskJuggler::JobInfo
- TaskJuggler::Journal
- TaskJuggler::JournalEntry
- TaskJuggler::JournalEntryList
- TaskJuggler::JournalSortListAttribute
- TaskJuggler::KateSyntax
- TaskJuggler::KeywordArray
- TaskJuggler::KeywordDocumentation
- TaskJuggler::Leave
- TaskJuggler::LeaveAllowance
- TaskJuggler::LeaveAllowanceList
- TaskJuggler::LeaveAllowanceListAttribute
- TaskJuggler::LeaveList
- TaskJuggler::LeaveListAttribute
- TaskJuggler::Limits
- TaskJuggler::Limits::Limit
- TaskJuggler::LimitsAttribute
- TaskJuggler::ListAttributeBase
- TaskJuggler::Log
- TaskJuggler::LogicalAttribute
- TaskJuggler::LogicalExpression
- TaskJuggler::LogicalExpressionAttribute
- TaskJuggler::LogicalExpressionListAttribute
- TaskJuggler::LogicalFlag
- TaskJuggler::LogicalFunction
- TaskJuggler::LogicalOperation
- TaskJuggler::ManagerResponsibilities
- TaskJuggler::ManagerStatusRecord
- TaskJuggler::Message
- TaskJuggler::MessageHandler
- TaskJuggler::MessageHandlerInstance
- TaskJuggler::MspXmlRE
- TaskJuggler::Navigator
- TaskJuggler::NavigatorElement
- TaskJuggler::NikuProject
- TaskJuggler::NikuReport
- TaskJuggler::NikuResource
- TaskJuggler::NodeListAttribute
- TaskJuggler::PTNProxy
- TaskJuggler::Painter
- TaskJuggler::Painter::Circle
- TaskJuggler::Painter::Color
- TaskJuggler::Painter::Element
- TaskJuggler::Painter::Ellipse
- TaskJuggler::Painter::FontMetrics
- TaskJuggler::Painter::FontMetricsData
- TaskJuggler::Painter::Group
- TaskJuggler::Painter::Line
- TaskJuggler::Painter::Points
- TaskJuggler::Painter::PolyLine
- TaskJuggler::Painter::Primitives
- TaskJuggler::Painter::Rect
- TaskJuggler::Painter::SVGSupport
- TaskJuggler::Painter::Text
- TaskJuggler::PlaceHolderCell
- TaskJuggler::ProcessIntercom
- TaskJuggler::ProcessIntercomIface
- TaskJuggler::Project
- TaskJuggler::ProjectBroker
- TaskJuggler::ProjectBrokerIface
- TaskJuggler::ProjectFileParser
- TaskJuggler::ProjectFileScanner
- TaskJuggler::ProjectRecord
- TaskJuggler::ProjectServer
- TaskJuggler::ProjectServerIface
- TaskJuggler::PropertyAttribute
- TaskJuggler::PropertyList
- TaskJuggler::PropertySet
- TaskJuggler::PropertyTreeNode
- TaskJuggler::Query
- TaskJuggler::RTFHandlers
- TaskJuggler::RTFNavigator
- TaskJuggler::RTFQuery
- TaskJuggler::RTFReport
- TaskJuggler::RTFReportLink
- TaskJuggler::RTFWithQuerySupport
- TaskJuggler::RealFormat
- TaskJuggler::RealFormatAttribute
- TaskJuggler::ReferenceAttribute
- TaskJuggler::Report
- TaskJuggler::ReportBase
- TaskJuggler::ReportContext
- TaskJuggler::ReportScenario
- TaskJuggler::ReportServer
- TaskJuggler::ReportServerIface
- TaskJuggler::ReportServerRecord
- TaskJuggler::ReportServlet
- TaskJuggler::ReportTable
- TaskJuggler::ReportTableCell
- TaskJuggler::ReportTableColumn
- TaskJuggler::ReportTableLegend
- TaskJuggler::ReportTableLine
- TaskJuggler::Resource
- TaskJuggler::ResourceListAttribute
- TaskJuggler::ResourceListRE
- TaskJuggler::ResourceScenario
- TaskJuggler::RichText
- TaskJuggler::RichTextAttribute
- TaskJuggler::RichTextDocument
- TaskJuggler::RichTextElement
- TaskJuggler::RichTextFunctionExample
- TaskJuggler::RichTextFunctionHandler
- TaskJuggler::RichTextImage
- TaskJuggler::RichTextIntermediate
- TaskJuggler::RichTextParser
- TaskJuggler::RichTextScanner
- TaskJuggler::RichTextSnip
- TaskJuggler::RichTextSyntaxRules
- TaskJuggler::Scenario
- TaskJuggler::ScenarioData
- TaskJuggler::ScenarioListAttribute
- TaskJuggler::Scoreboard
- TaskJuggler::ScoreboardInterval
- TaskJuggler::SheetHandlerBase
- TaskJuggler::SheetReceiver
- TaskJuggler::SheetSender
- TaskJuggler::Shift
- TaskJuggler::ShiftAssignment
- TaskJuggler::ShiftAssignments
- TaskJuggler::ShiftAssignmentsAttribute
- TaskJuggler::ShiftScenario
- TaskJuggler::SimpleQueryExpander
- TaskJuggler::SortListAttribute
- TaskJuggler::StatusSheetReceiver
- TaskJuggler::StatusSheetReport
- TaskJuggler::StatusSheetSender
- TaskJuggler::StdIoWrapper
- TaskJuggler::StringAttribute
- TaskJuggler::SymbolAttribute
- TaskJuggler::SymbolListAttribute
- TaskJuggler::SyntaxReference
- TaskJuggler::TOCEntry
- TaskJuggler::TSResourceRecord
- TaskJuggler::TSTaskRecord
- TaskJuggler::TableColumnDefinition
- TaskJuggler::TableColumnSorter
- TaskJuggler::TableOfContents
- TaskJuggler::TableReport
- TaskJuggler::TableReportColumn
- TaskJuggler::TagFile
- TaskJuggler::TagFile::TagFileEntry
- TaskJuggler::Task
- TaskJuggler::TaskDepListAttribute
- TaskJuggler::TaskDependency
- TaskJuggler::TaskListAttribute
- TaskJuggler::TaskListRE
- TaskJuggler::TaskScenario
- TaskJuggler::TernarySearchTree
- TaskJuggler::TextFormatter
- TaskJuggler::TextParser
- TaskJuggler::TextParser::Macro
- TaskJuggler::TextParser::MacroTable
- TaskJuggler::TextParser::Pattern
- TaskJuggler::TextParser::Rule
- TaskJuggler::TextParser::Scanner
- TaskJuggler::TextParser::Scanner::BufferStreamHandle
- TaskJuggler::TextParser::Scanner::FileStreamHandle
- TaskJuggler::TextParser::Scanner::MacroStackEntry
- TaskJuggler::TextParser::Scanner::StreamHandle
- TaskJuggler::TextParser::SourceFileInfo
- TaskJuggler::TextParser::StackElement
- TaskJuggler::TextParser::State
- TaskJuggler::TextParser::StateTransition
- TaskJuggler::TextParser::TextParserResultArray
- TaskJuggler::TextParser::TokenDoc
- TaskJuggler::TextReport
- TaskJuggler::TimeInterval
- TaskJuggler::TimeIntervalListAttribute
- TaskJuggler::TimeSheet
- TaskJuggler::TimeSheetReceiver
- TaskJuggler::TimeSheetRecord
- TaskJuggler::TimeSheetReport
- TaskJuggler::TimeSheetSender
- TaskJuggler::TimeSheetSummary
- TaskJuggler::TimeSheets
- TaskJuggler::Tj3
- TaskJuggler::Tj3AppBase
- TaskJuggler::Tj3Client
- TaskJuggler::Tj3Daemon
- TaskJuggler::Tj3Man
- TaskJuggler::Tj3SheetAppBase
- TaskJuggler::Tj3SsReceiver
- TaskJuggler::Tj3SsSender
- TaskJuggler::Tj3TsReceiver
- TaskJuggler::Tj3TsSender
- TaskJuggler::Tj3TsSummary
- TaskJuggler::Tj3WebD
- TaskJuggler::TjException
- TaskJuggler::TjRuntimeError
- TaskJuggler::TjTime
- TaskJuggler::TjpExample
- TaskJuggler::TjpExportRE
- TaskJuggler::TjpSyntaxRules
- TaskJuggler::TraceReport
- TaskJuggler::URLParameter
- TaskJuggler::UserManual
- TaskJuggler::VimSyntax
- TaskJuggler::WebServer
- TaskJuggler::WelcomePage
- TaskJuggler::WorkingHours
- TaskJuggler::WorkingHoursAttribute
- TaskJuggler::XMLBlob
- TaskJuggler::XMLComment
- TaskJuggler::XMLDocument
- TaskJuggler::XMLElement
- TaskJuggler::XMLNamedText
- TaskJuggler::XMLText
- Diff
- Diff::Hunk
- AppConfig
- Diffable
- DiffableString
- Object
- RuntimeConfig
- String

No matching classes.

# TaskJuggler::UserManual

This class specializes the RichTextDocument class for the TaskJuggler user manual. This manual is not only generated from a set of RichTextSnip files, but also contains the SyntaxReference for the TJP syntax.

### Public Class Methods

new() click to toggle source

Create a UserManual object and gather the TJP syntax information.

    # File lib/taskjuggler/UserManual.rb, line 30
    def initialize
      super
      # Don't confuse this with RichTextDocument#references
      @reference = SyntaxReference.new(self)
      registerFunctionHandler(RichTextFunctionExample.new)
      @linkTarget = '_top'
    end

### Public Instance Methods

generate(directory) click to toggle source

    # File lib/taskjuggler/UserManual.rb, line 38
    def generate(directory)
      # Directory where to find the manual RichText sources. Must be relative
      # to lib directory.
      srcDir = AppConfig.dataDirs('manual')[0]
      # Directory where to put the generated HTML files. Must be relative to
      # lib directory.
      destDir = directory + (directory[-1] == '/' ? '' : '/')
      # A list of all source files. The order is important.
      %(
        Intro
        TaskJuggler_2x_Migration
        Reporting_Bugs
        Installation
        How_To_Contribute
        Getting_Started
        Tutorial
        The_TaskJuggler_Syntax
        Rich_Text_Attributes
        Software
        Day_To_Day_Juggling
        TaskJuggler_Internals
        fdl
      ).each do |file|
        snip = addSnip(File.join(srcDir, file))
        snip.cssClass = 'manual'
      end
      # Generate the table of contents
      tableOfContents
      # Generate the HTML files.
      generateHTML(destDir)
      checkInternalReferences
      FileUtils.cp_r(AppConfig.dataDirs('data/css')[0], destDir)
    end

generateHTML(directory) click to toggle source

Generate the manual in HTML format. directory specifies a directory where the HTML files should be put.

    # File lib/taskjuggler/UserManual.rb, line 74
    def generateHTML(directory)
      generateHTMLindex(directory)
      generateHTMLReference(directory)
      # The SyntaxReference only generates the reference list when the HTML is
      # generated. So we have to collect it after the HTML generation.
      @references.merge!(@reference.internalReferences)

      super
    end

generateHTMLCover() click to toggle source

Callback function used by the RichTextDocument class to generate the cover page for the manual.

    # File lib/taskjuggler/UserManual.rb, line 93
    def generateHTMLCover
      [
        DIV.new('align' => 'center',
                'style' => 'margin-top:40px; margin-botton:40px') do
          [
            H1.new { "The #{AppConfig.softwareName} User Manual" },
            EM.new { 'Project Management beyond Gantt Chart drawing' },
            BR.new,
            B.new do
              "Copyright (c) #{AppConfig.copyright.join(', ')} " +
              "by #{AppConfig.authors.join(', ')}"
            end,
            BR.new,
            "Generated on #{TjTime.new.strftime('%Y-%m-%d')}",
            BR.new,
            H3.new { "This manual covers #{AppConfig.softwareName} " +
                     "version #{AppConfig.version}." }
          ]
        end,
        BR.new,
        HR.new,
        BR.new
      ]
    end

generateHTMLFooter() click to toggle source

Callback function used by the RichTextDocument class to generate the footer for the manual pages.

    # File lib/taskjuggler/UserManual.rb, line 135
    def generateHTMLFooter
      DIV.new('align' => 'center', 'style' => 'font-size:10px;') do
        [
          "Copyright (c) #{AppConfig.copyright.join(', ')} by " +
          "#{AppConfig.authors.join(', ')}.",
          A.new('href' => AppConfig.contact) do
            'TaskJuggler'
          end,
          ' is a trademark of Chris Schlaeger.'
        ]
      end
    end

generateHTMLHeader() click to toggle source

Callback function used by the RichTextDocument class to generate the header for the manual pages.

    # File lib/taskjuggler/UserManual.rb, line 120
    def generateHTMLHeader
      DIV.new('align' => 'center') do
        [
          H3.new('align' => 'center') do
            "The #{AppConfig.softwareName} User Manual"
          end,
          EM.new('align' => 'center') do
            'Project Management beyond Gantt Chart Drawing'
          end
        ]
      end
    end

generateHTMLNavigationBar(predLabel, predURL, succLabel, succURL) click to toggle source

Callback function used by the RichTextDocument and KeywordDocumentation classes to generate the navigation bars for the manual pages. predLabel: Text for the reference to the previous page. May be nil. _predURL: URL to the previous page. succLabel: Text for the reference to the next page. May be nil. _succURL: URL to the next page.

    # File lib/taskjuggler/UserManual.rb, line 154
    def generateHTMLNavigationBar(predLabel, predURL, succLabel, succURL)
      html = [ BR.new, HR.new ]
      if predLabel || succLabel
        # We use a tabel to get the desired layout.
        html += [
          TABLE.new('style' => 'width:90%; margin-left:5%; ' +
                                       'margin-right:5%') do
            TR.new do
              [
                TD.new('style' => 'text-align:left; width:35%;') do
                  if predLabel
                    # Link to previous page.
                    [ '<< ', A.new('href' => predURL) { predLabel }, ' <<' ]
                  end
                end,
                # Link to table of contents
                TD.new('style' => 'text-align:center; width:30%;') do
                  A.new('href' => 'toc.html') { 'Table Of Contents' }
                end,
                TD.new('style' => 'text-align:right; width:35%;') do
                  if succLabel
                    # Link to next page.
                    [ '>> ', A.new('href' => succURL) { succLabel }, ' >>' ]
                  end
                end
              ]
            end
          end,
          HR.new
        ]
      end
      html << BR.new

      html
    end

generateHTMLindex(directory) click to toggle source

Generate the top-level file for the HTML user manual.

    # File lib/taskjuggler/UserManual.rb, line 191
    def generateHTMLindex(directory)
      html = HTMLDocument.new(:frameset)
      html.generateHead("The #{AppConfig.softwareName} User Manual",
                        { 'description' =>
                          'A reference and user manual for the ' +
                          'TaskJuggler project management software.',
                          'keywords' => 'taskjuggler, manual, reference'})
      html.html << FRAMESET.new('cols' => '15%, 85%') do
        [
          FRAMESET.new('rows' => '140,*') do
            [
              FRAME.new('src' => 'alphabet.html', 'name' => 'alphabet'),
              FRAME.new('src' => 'navbar.html', 'name' => 'navigator')
            ]
          end,
          FRAME.new('src' => 'toc.html', 'name' => 'display')
        ]
      end

      html.write(directory + 'index.html')
    end

generateStyleSheet() click to toggle source

Callback function used by the RichTextDocument and KeywordDocumentation classes to generate the HTML style sheet for the manual pages.

    # File lib/taskjuggler/UserManual.rb, line 86
    def generateStyleSheet
      XMLElement.new('link', 'rel' => 'stylesheet', 'type' => 'text/css',
                             'href' => 'css/tjmanual.css')
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.