コード例 #1
0
ファイル: kjv.cpp プロジェクト: postiffm/bibledit-gtk
void kjv_detailed_page (HtmlWriter2& htmlwriter)
{
  htmlwriter.heading_open (3);
  htmlwriter.text_add (_("Sword King James Bible with Strong's lemmata"));
  htmlwriter.heading_close ();
  htmlwriter.paragraph_open();
  htmlwriter.text_add (_("The King James Bible from the Sword project is useful for its Strong's numbers tagged in the text. Bibledit-Desktop uses this to find related verses, among other things. Importing consists of two steps: exporting it from Sword and creating a database out of it."));
  htmlwriter.paragraph_close();
  htmlwriter.heading_open (4);
  htmlwriter.text_add (_("1. Exporting the text from Sword"));
  htmlwriter.heading_close ();
  htmlwriter.paragraph_open();
  htmlwriter.text_add (_("To export the text from the Sword library, it is supposed that the KJV Bible has been installed. Open a terminal, and type the following command:"));
  htmlwriter.paragraph_close();
  htmlwriter.paragraph_open();
  htmlwriter.text_add ("mod2osis KJV > kjv.txt");
  htmlwriter.paragraph_close();
  htmlwriter.paragraph_open();
  htmlwriter.text_add (_("This will take a while. It should give no errors. Once it finishes there will be a file called kjv.txt in the home directory."));
  htmlwriter.paragraph_close();
  htmlwriter.heading_open (4);
  htmlwriter.text_add (_("2. Creating the database"));
  htmlwriter.heading_close ();
  htmlwriter.paragraph_open();
  htmlwriter.hyperlink_add (kjv_create_database_url (), _("Create database"));
  htmlwriter.paragraph_close();
  htmlwriter.paragraph_open();
  htmlwriter.text_add (_("Creating the database should take a while. Once done there will be a file called kjv.sql in the home directory. This file should be added to the bibledit package, replacing the one it currently has."));
  htmlwriter.paragraph_close();
}
コード例 #2
0
ファイル: kjv.cpp プロジェクト: postiffm/bibledit-gtk
void kjv_action_page (HtmlWriter2& htmlwriter)
{
  htmlwriter.heading_open (3);
  htmlwriter.text_add (_("Database creation from King James Bible exported from the Sword library"));
  htmlwriter.heading_close ();

  vector <ustring> messages;
  bool keep_going = true;

  // Locate the kjv.txt file.
  ustring kjv_txt_file = gw_build_filename (g_get_home_dir (), "kjv.txt");
  messages.push_back ("Looking for file " + kjv_txt_file);
  if (!g_file_test (kjv_txt_file.c_str(), G_FILE_TEST_IS_REGULAR)) {
    kjv_txt_file.clear();
  }
  if (kjv_txt_file.empty()) {
    messages.push_back (_("Can't find the input file"));
    keep_going = false;
  }
  if (keep_going) {
    messages.push_back (_("Using file ") + kjv_txt_file);
  }

  // The database.
  ustring kjv_sql_file = gw_build_filename (g_get_home_dir (), "kjv.sql");

  // Importing data into the database.
  if (keep_going) {
    messages.push_back (_("Importing data into the database at ") + kjv_sql_file);
    kjv_import_sword (kjv_txt_file, kjv_sql_file);
  }

  // Write accumulated messages.
  htmlwriter.heading_open (3);
  if (keep_going) {
    htmlwriter.text_add (_("Success! The database was created"));
  } else {
    htmlwriter.text_add (_("Error!"));
  }
  htmlwriter.heading_close ();
  if (keep_going) {
    htmlwriter.paragraph_open ();
    htmlwriter.text_add (_("To use the database, copy the file kjv.sql into the Bibledit-Desktop package and re-install."));
    htmlwriter.paragraph_close ();
  }
  for (unsigned int i = 0; i < messages.size(); i++) {
    htmlwriter.paragraph_open ();
    htmlwriter.text_add (messages[i]);
    htmlwriter.paragraph_close ();
  }  

  // Write OK.
  htmlwriter.paragraph_open ();
  htmlwriter.hyperlink_add ("ok", _("Ok"));
  htmlwriter.paragraph_close ();
}
コード例 #3
0
void WindowCheckKeyterms::html_write_keyterms (HtmlWriter2& htmlwriter, unsigned int keyword_id)
{
  // Get data about the project.
  extern Settings *settings;
  ustring project = settings->genconfig.project_get();
  ProjectConfiguration *projectconfig = settings->projectconfig(project);
  ustring versification = projectconfig->versification_get();

  // Add action links.
  htmlwriter.paragraph_open ();
  htmlwriter.hyperlink_add ("index", "[Index]");
  htmlwriter.text_add (" ");
  htmlwriter.hyperlink_add ("send", _("[Send to references window]"));
  htmlwriter.paragraph_close ();

  // Add the keyterm itself.
  ustring keyterm;
  keyterms_get_term(keyword_id, keyterm);
  htmlwriter.heading_open (3);
  htmlwriter.text_add (keyterm);
  htmlwriter.heading_close();
  
  // Retrieve the renderings.
  vector <ustring> renderings;
  vector <bool> wholewords;
  vector <bool> casesensitives;
  get_renderings(renderings, wholewords, casesensitives);

  // Get the data for the keyword identifier.
  ustring dummy;
  ustring information;
  keyterms_get_data(keyword_id, dummy, information, references);

  // Divide the information into lines.
  ParseLine parseline (information);
  
  // Write the information.
  for (unsigned int i = 0; i < parseline.lines.size(); i++) {
 
    information = parseline.lines[i];
    htmlwriter.paragraph_open ();
    size_t pos = information.find (keyterms_reference_start_markup ());
    while (pos != string::npos) {
      htmlwriter.text_add (information.substr (0, pos));
      information.erase (0, pos + keyterms_reference_start_markup ().length());
      pos = information.find (keyterms_reference_end_markup ());
      if (pos != string::npos) {
        // Extract the reference.
        htmlwriter.paragraph_close ();
        ustring original_reference_text = information.substr (0, pos);
        Reference reference = get_reference (original_reference_text);
        // Remap the reference.
        {
          Mapping mapping(versification, reference.book_get());
          vector <int> chapters;
          vector <int> verses;
          mapping.original_to_me(reference.chapter_get(), reference.verse_get(), chapters, verses);
          if (!chapters.empty()) {
            reference.chapter_set(chapters[0]);
            reference.verse_set(convert_to_string (verses[0]));
          }
        }
        ustring remapped_reference_text = reference.human_readable ("");
        ustring displayed_reference_text (remapped_reference_text);
        if (remapped_reference_text != original_reference_text) {
          displayed_reference_text.append (" (");
          displayed_reference_text.append (original_reference_text);
          displayed_reference_text.append (")");
        }
        // Add the reference with hyperlink.
        htmlwriter.hyperlink_add ("goto " + remapped_reference_text, remapped_reference_text);
        information.erase (0, pos + keyterms_reference_end_markup ().length());
        // Add the reference's text.
        ustring verse = project_retrieve_verse(project, reference);
        if (verse.empty()) {
          verse.append(_("<empty>"));
        } else {
          CategorizeLine cl(verse);
          cl.remove_verse_number(reference.verse_get());
          verse = cl.verse;
        }
        htmlwriter.text_add (" ");

        // Add the verse plus markup for approved text.
        vector <size_t> startpositions;
        vector <size_t> lengths;
        size_t processposition = 0;
        if (find_renderings (verse, renderings, wholewords, casesensitives, &startpositions, &lengths)) {
          quick_sort (startpositions, lengths, 0, startpositions.size());
          // Overlapping items need to be combined to avoid crashes.
          xml_combine_overlaps (startpositions, lengths);
          for (unsigned int i = 0; i < startpositions.size(); i++) {
            htmlwriter.text_add (verse.substr (0, startpositions[i] - processposition));
            htmlwriter.bold_open();
            htmlwriter.text_add (verse.substr (startpositions[i] - processposition, lengths[i]));
            htmlwriter.bold_close();
            verse.erase (0, startpositions[i] - processposition + lengths[i]);
            processposition = startpositions[i] + lengths[i];
          }
          // Add whatever is left over of the verse. This could be the full verse in case it wasn't processed.
          htmlwriter.text_add (verse);
        }
        else
        {
        	htmlwriter.highlight_open();
        	htmlwriter.text_add (verse);
        	htmlwriter.highlight_close();
        }

        // Proceed to next.
        htmlwriter.paragraph_open ();
        pos = information.find (keyterms_reference_start_markup ());
      }
    }
    htmlwriter.text_add (information);
    htmlwriter.paragraph_close ();
  }
}
コード例 #4
0
ファイル: kjv.cpp プロジェクト: postiffm/bibledit-gtk
void kjv_home_entry (HtmlWriter2& htmlwriter)
{
  htmlwriter.paragraph_open ();
  htmlwriter.hyperlink_add (kjv_html_entry_url (), _("Sword King James Bible with Strong's lemmata"));
  htmlwriter.paragraph_close ();
}
コード例 #5
0
void WindowCheckKeyterms::html_link_clicked (const gchar * url)
{
  // Store scrolling position for the now active url.
  GtkAdjustment * adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolledwindow_terms));
  scrolling_position[active_url] = gtk_adjustment_get_value (adjustment);

  // New url.
  active_url = url;

  // Whether to show some widgets.
  bool show_collections = false;
  bool show_renderings = false;
    
  // Start writing a html page.
  HtmlWriter2 htmlwriter ("");
  bool display_another_page = false;

  if (active_url.find (_("keyterm ")) == 0) {
    // Store url of this keyterm.
    last_keyword_url = active_url;
    // Get the keyterm identifier.
    ustring url = active_url;
    url.erase (0, 8);
    keyword_id = convert_to_int (url);
    // Load the renderings. 
    // To be done before displaying the verses themselves since the latter depends on the former.
    load_renderings ();
    // Write extra bits.
    html_write_keyterms (htmlwriter, keyword_id);
    show_renderings = true;
    display_another_page = true;
  }

  else if (active_url.find (_("goto ")) == 0) {
    // Signal the editors to go to a reference.
    ustring url = active_url;
    url.erase (0, 5);
    myreference.assign (get_reference (url));
    new_reference_showing = &myreference;
    gtk_button_clicked(GTK_BUTTON(signal));
  }
  
  else if (active_url.find (_("send")) == 0) {
    // Send the references to the references window.
    ustring url = active_url;
    new_reference_showing = NULL;
    gtk_button_clicked(GTK_BUTTON(signal));
  }
  
  else {
    // Give the starting page with all keyterms of the active selection.
    show_collections = true;
    if (collection().find (_("Biblical")) != string::npos) {
      if (collection().find (_("Hebrew")) != string::npos) {
        htmlwriter.paragraph_open ();
        htmlwriter.text_add (_("Key Terms in Biblical Hebrew: The entries are an experimental sample set, not yet fully reviewed and approved. The KTBH team would welcome feed-back to [email protected]."));
        htmlwriter.paragraph_close ();
      }
    }
    vector <ustring> terms;
    vector <unsigned int> ids;
    keyterms_get_terms("", collection(), terms, ids);
    for (unsigned int i = 0; i < terms.size(); i++) {
      htmlwriter.paragraph_open();
      htmlwriter.hyperlink_add (_("keyterm ") + convert_to_string (ids[i]), terms[i]);
      htmlwriter.paragraph_close();
    }
    display_another_page = true;
    // No renderings.
    clear_renderings ();
  }
  
  htmlwriter.finish();
  if (display_another_page) {
    // Load the page.
    webkit_web_view_load_string (WEBKIT_WEB_VIEW (webview_terms), htmlwriter.html.c_str(), NULL, NULL, NULL);
    // Scroll to the position that possibly was stored while this url was last active.
    GtkAdjustment * adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolledwindow_terms));
    gtk_adjustment_set_value (adjustment, scrolling_position[active_url]);
    // Whether to show collections.
    if (show_collections)
      gtk_widget_show (hbox_collection);
    else
      gtk_widget_hide (hbox_collection);
    if (show_renderings)
      gtk_widget_show (treeview_renderings);
    else
      gtk_widget_hide (treeview_renderings);
  }
}
コード例 #6
0
ファイル: mechonmamre.cpp プロジェクト: postiffm/bibledit-gtk
void mechon_mamre_action_page (HtmlWriter2& htmlwriter)
{
  htmlwriter.heading_open (3);
  htmlwriter.text_add (_("Hebrew import from Mechon Mamre"));
  htmlwriter.heading_close ();

  vector <ustring> messages;
  bool keep_going = true;

  // Locate the downloaded file.
  ustring ct005zipfilename = gw_build_filename (g_get_home_dir (), "ct005.zip");
  messages.push_back (_("Looking for file ") + ct005zipfilename);
  if (!g_file_test (ct005zipfilename.c_str(), G_FILE_TEST_IS_REGULAR)) {
    ct005zipfilename.clear();
  }
  if (ct005zipfilename.empty()) {
    ct005zipfilename = gw_build_filename (g_get_home_dir (), "Desktop", "ct005.zip");
    messages.push_back (_("Looking for file ") + ct005zipfilename);
    if (!g_file_test (ct005zipfilename.c_str(), G_FILE_TEST_IS_REGULAR)) {
      ct005zipfilename.clear();
    }
  }
  if (ct005zipfilename.empty()) {
    ct005zipfilename = gw_build_filename (g_get_home_dir (), "Downloads", "ct005.zip");
    messages.push_back (_("Looking for file ") + ct005zipfilename);
    if (!g_file_test (ct005zipfilename.c_str(), G_FILE_TEST_IS_REGULAR)) {
      ct005zipfilename.clear();
    }
  }
  if (ct005zipfilename.empty()) {
    messages.push_back (_("Can't find Hebrew input file"));
    keep_going = false;
  }
  if (keep_going) {
    messages.push_back (_("Using file ") + ct005zipfilename);
  }

  // Unpack the zipped file.
  ustring directory;
  if (keep_going) {
    directory = gw_build_filename (Directories->get_temp (), "uncompress");
    unix_rmdir (directory);
    gw_mkdir_with_parents (directory);
    if (!uncompress (ct005zipfilename, directory)) {
      messages.push_back (_("Could not unpack the file"));
      keep_going = false;
    }
    messages.push_back (_("Unpacking into folder ") + directory);
  }

  // Show the readme file.
  if (keep_going) {
    ustring readmefile = gw_build_filename (directory, "readme.txt");
    ReadText rt (readmefile, true, true);
    ustring line;
    for (unsigned int i = 0; i < rt.lines.size(); i++) {
      if (rt.lines[i].empty()) {
        if (!line.empty()) {
          messages.push_back (line);
          line.clear();
        }
      } else {
        line.append (rt.lines[i] + " ");
      }
    }
    messages.push_back (line);
  }

  // Look for the directory where all the html files reside.
  if (keep_going) {
    directory = gw_build_filename (directory, "c", "ct");
    if (!g_file_test (directory.c_str(), G_FILE_TEST_IS_DIR)) {
      messages.push_back (_("Can't find data in directory ") + directory);
    }
    messages.push_back (_("Looking for data in directory ") + directory);
  }
  
  // Get a list of the html files that have the data.
  vector <ustring> files;
  if (keep_going) {
    ReadFiles rf (directory, "c", ".htm");
    for (unsigned int i = 0; i < rf.files.size(); i++) {
      ustring filename = gw_build_filename (directory, rf.files[i]);
      // Check on a few characteristics.
      if (mechon_mamre_copyright(filename)) {
        unsigned int digitcount = digit_count_in_string(rf.files[i]);
        if ((digitcount == 3) || (digitcount == 4)) {
          files.push_back(filename);
        }
      }
    }
  }

  // Create a new Bible into which to import the data.
  ustring bible = _("Hebrew Mechon Mamre");
  if (keep_going) {
    if (project_exists (bible)) {
      messages.push_back (_("A Bible already exists by this name: ") + bible);
      keep_going = false;      
    } else {
      project_create_restore (bible, "");
      messages.push_back (_("Creating a new Bible called \"") + bible + "\"");
      // Make a couple of settings.
      extern Settings * settings;
      ProjectConfiguration * projectconfig = settings->projectconfig (bible);
      projectconfig->versification_set ("Original");
      projectconfig->editable_set (false);
      projectconfig->right_to_left_set (true);
      projectconfig->spelling_check_set (false);
    }
  }

  // Store all the chapters 0 in each book.
  if (keep_going) {
    vector <unsigned int> books = books_type_to_ids(btOldTestament);
    ProgressWindow progresswindow (_("Creating books"), false);
    progresswindow.set_iterate (0, 1, books.size());
    for (unsigned int bk = 0; bk < books.size(); bk++) {
      progresswindow.iterate ();
      vector <ustring> usfm;
      usfm.push_back ("\\id " + books_id_to_paratext (books[bk]));
      CategorizeChapterVerse ccv (usfm);      
      project_store_chapter (bible, books[bk], ccv);
    }  
  }

  // Store all the chapters.
  if (keep_going) {
    ProgressWindow progresswindow (_("Importing chapters"), false);
    progresswindow.set_iterate (0, 1, files.size());
    for (unsigned int i = 0; i < files.size(); i++) {
      progresswindow.iterate ();
      unsigned int book = 0;
      unsigned int chapter = 0;
      mechon_mamre_extract_book_chapter (files[i], book, chapter);
      vector <ustring> contents = mechon_mamre_extract_contents (files[i], chapter);
      CategorizeChapterVerse ccv (contents);
      project_store_chapter (bible, book, ccv);
      messages.push_back (_("Importing ") + books_id_to_localname (book) + " " + convert_to_string (chapter) + _(" from file ") + files[i]);
    }
  }

  // Write accumulated messages.
  htmlwriter.heading_open (3);
  if (keep_going) {
    htmlwriter.text_add (_("Success! Bible was created: ") + bible);
  } else {
    htmlwriter.text_add (_("Error!"));
  }
  htmlwriter.heading_close ();
  if (keep_going) {
    htmlwriter.paragraph_open ();
    htmlwriter.text_add (_("To view the Hebrew text, open the Bible in the editor. Optionally set the font for better display of the Hebrew text. A donation made to Mechon Mamre will support their work."));
    htmlwriter.paragraph_close ();
  }
  for (unsigned int i = 0; i < messages.size(); i++) {
    htmlwriter.paragraph_open ();
    htmlwriter.text_add (messages[i]);
    htmlwriter.paragraph_close ();
  }  
  
  // Write OK.
  htmlwriter.paragraph_open ();
  htmlwriter.hyperlink_add ("ok", _("Ok"));
  htmlwriter.paragraph_close ();
}
コード例 #7
0
ファイル: mechonmamre.cpp プロジェクト: postiffm/bibledit-gtk
void mechon_mamre_detailed_page (HtmlWriter2& htmlwriter)
{
  htmlwriter.heading_open (3);
  htmlwriter.text_add (_("Hebrew Bible with cantillation marks from Mechon Mamre"));
  htmlwriter.heading_close ();
  htmlwriter.paragraph_open();
  htmlwriter.text_add (_("The Hebrew Bible from Mechon Mamre provides a Hebrew text that can be useful for translating the Bible. Bibledit-Desktop can import this text. This consists of two steps: downloading it and importing it."));
  htmlwriter.paragraph_close();
  htmlwriter.heading_open (4);
  htmlwriter.text_add (_("1. Downloading the text"));
  htmlwriter.heading_close ();
  htmlwriter.paragraph_open();
  htmlwriter.text_add (_("When you click on the link below, a web browser will open, which will download the Hebrew text. The file will be called ct005.zip. Please save this file in the home directory, on your Desktop, or in the Downloads folder."));
  htmlwriter.paragraph_close();
  htmlwriter.paragraph_open();
  htmlwriter.hyperlink_add (mechon_mamre_download_url (), _("Download it"));
  htmlwriter.paragraph_close();
  htmlwriter.heading_open (4);
  htmlwriter.text_add (_("2. Importing the text"));
  htmlwriter.heading_close ();
  htmlwriter.paragraph_open();
  htmlwriter.text_add (_("When you click on the link below, a new Bible will be created, and the file that you have downloaded will be imported into it."));
  htmlwriter.paragraph_close();
  htmlwriter.paragraph_open();
  htmlwriter.hyperlink_add (mechon_mamre_import_url (), "Import it");
  htmlwriter.paragraph_close();
}
コード例 #8
0
ファイル: mechonmamre.cpp プロジェクト: postiffm/bibledit-gtk
void mechon_mamre_home_entry (HtmlWriter2& htmlwriter)
{
  htmlwriter.paragraph_open ();
  htmlwriter.hyperlink_add (mechon_mamre_html_entry_url (), _("Hebrew Bible with cantillation marks from Mechon Mamre"));
  htmlwriter.paragraph_close ();
}
コード例 #9
0
void WindowShowRelatedVerses::load_webview (const gchar * url)
{
  // New url.
  active_url = url;

  // Start writing a html page.
  HtmlWriter2 htmlwriter ("");
  bool display_another_page = true;

  if (active_url.find ("keyterm ") == 0) {
    item_type = ritKeytermId;
    item_id = active_url.substr (8, 100);
    gtk_button_clicked (GTK_BUTTON (button_item));
    display_another_page = false;
  }

  else if (active_url.find ("strong ") == 0) {
    item_type = ritStrongNumber;
    item_id = active_url.substr (7, 100);
    gtk_button_clicked (GTK_BUTTON (button_item));
    display_another_page = false;
  }

  else if (active_url.find ("parallels") == 0) {
    item_type = ritParallels;
    gtk_button_clicked (GTK_BUTTON (button_item));
    display_another_page = false;
  }

  else {

    // Display the keyterms in the verse, and their renderings.
    htmlwriter.heading_open (3);
    htmlwriter.text_add (_("Keyterms in verse ") + myreference.verse);
    htmlwriter.heading_close ();
    vector <int> keyterms = keyterms_get_terms_in_verse(myreference);
    for (unsigned int i = 0; i < keyterms.size(); i++) {

      htmlwriter.paragraph_open();

      // Display the keyterm.
      ustring term;
      keyterms_get_term(keyterms[i], term);
      htmlwriter.text_add ("* ");
      ustring url = "keyterm " + convert_to_string (keyterms[i]);
      htmlwriter.hyperlink_add (url, term);
      htmlwriter.text_add (": ");

      // Display the renderings.
      vector <ustring> renderings;
      vector <bool> wholewords;
      vector <bool> casesensitives;
      ustring category;
      {
        ustring dummy1;
        vector < Reference > dummy2;
        keyterms_get_data(keyterms[i], category, dummy1, dummy2);
      }
      keyterms_retrieve_renderings(myproject, term, category, renderings, wholewords, casesensitives);
      for (unsigned int i2 = 0; i2 < renderings.size(); i2++) {
        if (i2)
          htmlwriter.text_add (", ");
        htmlwriter.text_add (renderings[i2]);
      }

      htmlwriter.paragraph_close();
    }
    
    // If there are no keyterms, mention this.
    if (keyterms.empty()) {
      htmlwriter.paragraph_open ();
      htmlwriter.text_add ("none");
      htmlwriter.paragraph_close ();
    }

    // Terms derived from the Strong's numbers in this verse.
    htmlwriter.heading_open (3);
    htmlwriter.text_add (_("Similar words in other verses"));
    htmlwriter.heading_close ();

    // Get the data.
    vector <ustring> strongs;
    vector <ustring> words;
    kjv_get_strongs_data (myreference, strongs, words);

    // Display the data.
    for (unsigned int i = 0; i < strongs.size(); i++) {
      htmlwriter.paragraph_open ();
      Parse parse (strongs[i]);
      for (unsigned int i2 = 0; i2 < parse.words.size (); i2++) {
        htmlwriter.text_add (words[i]);
        htmlwriter.text_add (" ");
        ustring url = "strong " + parse.words[i2];
        htmlwriter.hyperlink_add (url, parse.words[i2]);
      }
      htmlwriter.paragraph_close ();
    }
    
    // Parallel passages.
    vector <Reference> parallel_references;
    vector <ustring> parallel_comments;
    parallel_passages_retrieve (myreference, parallel_references, parallel_comments);
    if (!parallel_references.empty()) {
      extern Settings *settings;
      ProjectConfiguration *projectconfig = settings->projectconfig(myproject);
      ustring language = projectconfig->language_get();
      htmlwriter.heading_open (3);
      htmlwriter.text_add (_("Parallel passages"));
      htmlwriter.heading_close ();
      for (unsigned int i = 0; i < parallel_references.size(); i++) {
        htmlwriter.paragraph_open ();
        htmlwriter.text_add (parallel_references[i].human_readable (language) + " " + parallel_comments[i]);
        htmlwriter.paragraph_close ();
      }
      htmlwriter.paragraph_open ();
      htmlwriter.hyperlink_add ("parallels", _("Send to references window"));
      htmlwriter.paragraph_close ();
    }    

  }
  
  htmlwriter.finish();
  if (display_another_page) {
    // Load the page.
    webkit_web_view_load_string (WEBKIT_WEB_VIEW (webview), htmlwriter.html.c_str(), NULL, NULL, NULL);
    // Scroll to the position that possibly was stored while this url was last active.
    GtkAdjustment * adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolledwindow));
    gtk_adjustment_set_value (adjustment, scrolling_position[active_url]);
  }
}