示例#1
0
void
reset_pfb_path () {
  string pfb= get_setting ("PFB");
  the_pfb_path=
    url_here () |
    search_sub_dirs ("$TEXMACS_HOME_PATH/fonts/type1") |
    search_sub_dirs ("$TEXMACS_PATH/fonts/type1") |
    "$TEX_PFB_PATH" |
    (pfb == ""? url_none (): url_system (pfb));
  the_pfb_path= expand (factor (the_pfb_path));
}
示例#2
0
void
reset_pk_path (bool rehash) { (void) rehash;
  // if (rehash && (get_setting ("TEXHASH") == "true")) system ("texhash");
  string pk= get_setting ("PK");
  the_pk_path=
    url_here () |
    search_sub_dirs ("$TEXMACS_HOME_PATH/fonts/pk") |
    search_sub_dirs ("$TEXMACS_PATH/fonts/pk") |
    "$TEX_PK_PATH" |
    (pk == ""? url_none (): pk);
  if ((get_setting ("MAKEPK") != "false") ||
      (get_setting ("TEXHASH") == "true"))
    if (get_setting ("KPSEWHICH") != "true")
      the_pk_path= the_pk_path | get_kpsepath ("pk");
  the_pk_path= expand (factor (the_pk_path));
}
示例#3
0
void
reset_tfm_path (bool rehash) { (void) rehash;
  // if (rehash && (get_setting ("TEXHASH") == "true")) system ("texhash");
  string tfm= get_setting ("TFM");
  the_tfm_path=
    url_here () |
    search_sub_dirs ("$TEXMACS_HOME_PATH/fonts/tfm") |
    search_sub_dirs ("$TEXMACS_PATH/fonts/tfm") |
    "$TEX_TFM_PATH" |
    (tfm == ""? url_none (): tfm);
  if ((get_setting ("MAKETFM") != "false") ||
      (get_setting ("TEXHASH") == "true"))
    if (get_setting ("KPSEWHICH") != "true")
      the_tfm_path= the_tfm_path | get_kpsepath ("tfm");
  the_tfm_path= expand (factor (the_tfm_path));
}
示例#4
0
static void
init_env_vars () {
  // Handle binary, library and guile paths for plugins
  url bin_path= get_env_path ("PATH") | plugin_path ("bin");
  set_env_path ("PATH", bin_path);
  url lib_path= get_env_path ("LD_LIBRARY_PATH") | plugin_path ("lib");
  set_env_path ("LD_LIBRARY_PATH", lib_path);

  // Get TeXmacs style and package paths
  url style_root=
    get_env_path ("TEXMACS_STYLE_ROOT",
		  "$TEXMACS_HOME_PATH/styles:$TEXMACS_PATH/styles" |
		  plugin_path ("styles"));
  url package_root=
    get_env_path ("TEXMACS_PACKAGE_ROOT",
		  "$TEXMACS_HOME_PATH/packages:$TEXMACS_PATH/packages" |
		  plugin_path ("packages"));
  url all_root= style_root | package_root;
  url style_path=
    get_env_path ("TEXMACS_STYLE_PATH",
                  search_sub_dirs (all_root));
  url text_root=
    get_env_path ("TEXMACS_TEXT_ROOT",
		  "$TEXMACS_HOME_PATH/texts:$TEXMACS_PATH/texts" |
		  plugin_path ("texts"));
  url text_path=
    get_env_path ("TEXMACS_TEXT_PATH",
                  search_sub_dirs (text_root));

  // Get other data paths
  (void) get_env_path ("TEXMACS_FILE_PATH",text_path | style_path);
  (void) set_env_path ("TEXMACS_DOC_PATH",
		       get_env_path ("TEXMACS_DOC_PATH") |
		       "$TEXMACS_HOME_PATH/doc:$TEXMACS_PATH/doc" |
		       plugin_path ("doc"));
  (void) set_env_path ("TEXMACS_SECURE_PATH",
		       get_env_path ("TEXMACS_SECURE_PATH") |
		       "$TEXMACS_PATH:$TEXMACS_HOME_PATH");
  (void) get_env_path ("TEXMACS_PATTERN_PATH",
		       "$TEXMACS_HOME_PATH/misc/patterns" |
		       url ("$TEXMACS_PATH/misc/patterns") |
		       plugin_path ("misc/patterns"));
  (void) get_env_path ("TEXMACS_PIXMAP_PATH",
		       "$TEXMACS_HOME_PATH/misc/pixmaps" |
		       url ("$TEXMACS_PATH/misc/pixmaps/modern/32x32/settings") |
		       url ("$TEXMACS_PATH/misc/pixmaps/modern/32x32/table") |
		       url ("$TEXMACS_PATH/misc/pixmaps/modern/24x24/main") |
		       url ("$TEXMACS_PATH/misc/pixmaps/modern/20x20/mode") |
		       url ("$TEXMACS_PATH/misc/pixmaps/modern/16x16/focus") |
		       url ("$TEXMACS_PATH/misc/pixmaps/traditional/--x17") |
		       plugin_path ("misc/pixmaps"));
  (void) get_env_path ("TEXMACS_DIC_PATH",
		       "$TEXMACS_HOME_PATH/langs/natural/dic" |
		       url ("$TEXMACS_PATH/langs/natural/dic") |
		       plugin_path ("langs/natural/dic"));
#ifdef OS_WIN32
  set_env ("TEXMACS_SOURCE_PATH", "");
#else
  set_env ("TEXMACS_SOURCE_PATH", TEXMACS_SOURCES);
#endif
}