Back to index

texmacs  1.0.7.15
Functions | Variables
fromcls.cpp File Reference
#include "Tex/convert_tex.hpp"
#include "vars.hpp"

Go to the source code of this file.

Functions

void extract_class_body (tree &body, tree doc)
tree extract_class_body (tree doc)
tree source_comment (string s)
array< treefilter_setlength (tree doc, string var)
tree latex_class_filter (tree t)
tree latex_class_document_to_tree (string s)

Variables

bool textm_class_flag

Function Documentation

void extract_class_body ( tree body,
tree  doc 
)

Definition at line 22 of file fromcls.cpp.

                                          {
  if (is_func (doc, DOCUMENT) || is_func (doc, CONCAT))
    for (int i=0; i<N(doc); i++)
      extract_class_body (body, doc[i]);
  else if (is_func (doc, WITH))
    extract_class_body (body, doc[N(doc)-1]);
  else if (is_compound (doc))
    body << doc;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 33 of file fromcls.cpp.

                              {
  tree body= extract (doc, "body");
  if (body != tree (DOCUMENT, "")) doc= body;
  body= tree (DOCUMENT);
  extract_class_body (body, doc);
  for (int i=0; i<N(body); i++)
    cout << body[i] << "\n";
  return body;
}

Here is the call graph for this function:

array<tree> filter_setlength ( tree  doc,
string  var 
)

Definition at line 49 of file fromcls.cpp.

                                        {
  for (int i=0; i<N(doc); i++)
    if (is_func (doc[i], ASSIGN, 2))
      if (doc[i][0] == var)
       return A (tuple (doc[i]));
  return array<tree> ();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 94 of file fromcls.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 58 of file fromcls.cpp.

                            {
  t= extract_class_body (t);
  tree   incls = tree (USE_PACKAGE, "article", "std-latex");
  tree   doc   = tree (DOCUMENT);
  string header= "This style file is the result of an automatic conversion";
  doc << source_comment (header)
      << incls
      << source_comment ("Global layout parameters")
      << filter_setlength (t, "tex-odd-side-margin")
      << filter_setlength (t, "tex-even-side-margin")
      << filter_setlength (t, "tex-text-width")
      << filter_setlength (t, "tex-top-margin")
      << filter_setlength (t, "tex-head-height")
      << filter_setlength (t, "tex-top-skip")
      << filter_setlength (t, "tex-text-height")
      << filter_setlength (t, "tex-foot-skip")
      << filter_setlength (t, "tex-footnote-sep")
      << filter_setlength (t, "tex-column-sep")
      << filter_setlength (t, "tex-margin-par-width")
    //<< filter_setlength (t, "par-first")
      << filter_setlength (t, "tex-jot")
      << filter_setlength (t, "tex-math-indent")
      << filter_setlength (t, "tex-above-display-skip")
      << filter_setlength (t, "tex-below-display-skip")
      << filter_setlength (t, "tex-above-display-short-skip")
      << filter_setlength (t, "tex-below-display-short-skip")
      << source_comment ("Headers and footers")
      << source_comment ("Font sizes");
  tree the_style= compound ("style", "source");
  tree preamble = tree (ASSOCIATE, PREAMBLE, "true");
  tree the_init = compound ("initial", tree (COLLECTION, preamble));
  tree the_body = compound ("body", doc);
  return tree (DOCUMENT, the_style, the_init, the_body);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 44 of file fromcls.cpp.

                          {
  return compound ("active*", compound ("src-comment", s));
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 19 of file fromtex.cpp.