Back to index

texmacs  1.0.7.15
convert.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : convert.hpp
00004 * DESCRIPTION: various conversion routines
00005 * COPYRIGHT  : (C) 1999  Joris van der Hoeven
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #ifndef CONVERT_H
00013 #define CONVERT_H
00014 #include "analyze.hpp"
00015 #include "hashmap.hpp"
00016 typedef tree scheme_tree;
00017 class url;
00018 
00019 /*** Miscellaneous ***/
00020 bool   is_snippet (tree doc);
00021 string get_texmacs_path ();
00022 void   set_file_focus (url u);
00023 url    get_file_focus ();
00024 
00025 /*** Generic ***/
00026 string suffix_to_format (string suffix);
00027 string format_to_suffix (string format);
00028 string get_format (string s, string suffix);
00029 tree   generic_to_tree (string s, string format);
00030 string tree_to_generic (tree doc, string format);
00031 
00032 /*** Texmacs ***/
00033 tree   texmacs_to_tree (string s);
00034 tree   texmacs_document_to_tree (string s);
00035 string tree_to_texmacs (tree t);
00036 tree   extract (tree doc, string attr);
00037 tree   extract_document (tree doc);
00038 tree   change_doc_attr (tree doc, string attr, tree val);
00039 hashmap<string,int> get_codes (string version);
00040 tree   string_to_tree (string s, string version);
00041 tree   upgrade (tree t, string version);
00042 
00043 /*** Scheme ***/
00044 string scheme_tree_to_string (scheme_tree t);
00045 string scheme_tree_to_block (scheme_tree t);
00046 scheme_tree tree_to_scheme_tree (tree t);
00047 string tree_to_scheme (tree t);
00048 scheme_tree string_to_scheme_tree (string s);
00049 scheme_tree block_to_scheme_tree  (string s);
00050 tree   scheme_tree_to_tree (scheme_tree t);
00051 tree   scheme_tree_to_tree (scheme_tree t, string version);
00052 tree   scheme_to_tree (string s);
00053 tree   scheme_document_to_tree (string s);
00054 
00055 /*** Verbatim ***/
00056 string tree_to_verbatim (tree t, bool wrap= false, string enc= "default");
00057 tree   verbatim_to_tree (string s, bool wrap= false, string enc= "default");
00058 tree   verbatim_document_to_tree (string s, bool w= false, string e= "default");
00059 
00060 /*** Latex ***/
00061 tree   parse_latex (string s, bool change= false);
00062 tree   parse_latex_document (string s, bool change= false);
00063 tree   latex_to_tree (tree t);
00064 tree   latex_document_to_tree (string s);
00065 tree   latex_class_document_to_tree (string s);
00066 
00067 /*** Xml / Html / Mathml ***/
00068 tree   parse_xml (string s);
00069 tree   parse_html (string s);
00070 tree   tmml_upgrade (scheme_tree t);
00071 tree   upgrade_mathml (tree t);
00072 
00073 /*** BibTeX ***/
00074 tree   parse_bib (string s);
00075 
00076 #endif // defined CONVERT_H