Back to index

texmacs  1.0.7.15
Functions | Variables
edit_typeset.cpp File Reference
#include "edit_typeset.hpp"
#include "tm_buffer.hpp"
#include "convert.hpp"
#include "file.hpp"
#include "analyze.hpp"
#include "timer.hpp"
#include "Bridge/impl_typesetter.hpp"
#include "new_style.hpp"

Go to the source code of this file.

Functions

static bool is_aux (url u)
void use_modules (tree t)
static void restricted_exec (edit_env env, tree t, int end)
static tree simplify_execed (tree t)
static tree expand_references (tree t, hashmap< string, tree > h)
static tree value_to_compound (tree t, hashmap< string, tree > h)

Variables

bool enable_fastenv = false

Function Documentation

static tree expand_references ( tree  t,
hashmap< string, tree h 
) [static]

Definition at line 376 of file edit_typeset.cpp.

                                                   {
  if (is_atomic (t)) return t;
  if (is_func (t, REFERENCE, 1) || is_func (t, PAGEREF)) {
    string ref= as_string (simplify_execed (t[0]));
    if (h->contains (ref)) {
      int which= is_func (t, REFERENCE, 1)? 0: 1;
      return tree (HLINK, copy (h[ref][which]), "#" * ref);
    }
    return tree (HLINK, "?", "#" * ref);
  }
  int i, n= N(t);
  tree r (t, n);
  for (i=0; i<n; i++)
    r[i]= expand_references (t[i], h);
  return r;  
}

Here is the call graph for this function:

Here is the caller graph for this function:

static bool is_aux ( url  u) [static]

Definition at line 32 of file edit_typeset.cpp.

               {
  if (!is_atomic (u->t)) return false;
  string s= u->t->label;
  return starts (s, "* ") && ends (s, " *");
}

Here is the call graph for this function:

static void restricted_exec ( edit_env  env,
tree  t,
int  end 
) [static]

Definition at line 207 of file edit_typeset.cpp.

                                                {
  if (is_func (t, ASSIGN, 2) && end == 2)
    env->exec (t);
  else if (is_document (t) || is_concat (t))
    for (int i=0; i < min (end, 10); i++)
      restricted_exec (env, t[i], arity (t[i]));
  else if (is_compound (t, "hide-preamble", 1) ||
           is_compound (t, "show-preamble", 1))
    env->exec (t[0]);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static tree simplify_execed ( tree  t) [static]

Definition at line 364 of file edit_typeset.cpp.

                         {
  if (is_atomic (t)) return t;
  int i, n= N(t);
  tree r (t, n);
  for (i=0; i<n; i++)
    r[i]= simplify_execed (t[i]);
  if (is_func (r, QUOTE, 1) && is_atomic (r[0]))
    return r[0];
  else return r;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void use_modules ( tree  t)

Definition at line 126 of file edit_typeset.cpp.

                     {
  if (is_tuple (t))
    for (int i=0; i<N(t); i++) {
      string s= as_string (t[i]);
      if (starts (s, "(")) eval ("(use-modules " * s * ")");
      else if (s != "") eval ("(plugin-initialize '" * s * ")");
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static tree value_to_compound ( tree  t,
hashmap< string, tree h 
) [static]

Definition at line 467 of file edit_typeset.cpp.

                                                   {
  if (is_atomic (t)) return t;
  else if (is_func (t, VALUE, 1) &&
          is_atomic (t[0]) &&
          h->contains (t[0]->label))
    return compound (t[0]->label);
  else {
    int i, n= N(t);
    tree r (t, n);
    for (i=0; i<n; i++)
      r[i]= value_to_compound (t[i], h);
    return r;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

bool enable_fastenv = false

Definition at line 25 of file edit_typeset.cpp.