Back to index

texmacs  1.0.7.15
Defines | Functions | Variables
env_semantics.cpp File Reference
#include "env.hpp"
#include "page_type.hpp"
#include "typesetter.hpp"

Go to the source code of this file.

Defines

#define get_page_par(which)

Functions

void initialize_default_var_type ()
int decode_alpha (string s)
void decompose_length (string s, double &x, string &un)

Variables

hashmap< string, int > default_var_type (Env_User)

Define Documentation

#define get_page_par (   which)
Value:
(get_string (which) == "auto"? \
   as_length (page_get_feature (page_type, which, page_landscape)): \
   get_length (which))

Definition at line 136 of file env_semantics.cpp.


Function Documentation

int decode_alpha ( string  s)

Definition at line 275 of file env_semantics.cpp.

                        {
  if (N(s) == 0) return 255;
  else if (s[N(s)-1] == '%')
    return (int) (2.55 * as_double (s (0, N(s)-1)));
  else return (int) (255.0 * as_double (s));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void decompose_length ( string  s,
double &  x,
string un 
)

Definition at line 444 of file env_semantics.cpp.

                                                   {
  int i;
  for (i=0; i<N(s); i++)
    if ((s[i]>='a') && (s[i]<='z')) break;
  x = as_double (s (0, i));
  un= s (i, N(s));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 23 of file env_semantics.cpp.

                               {
  if (N(default_var_type) != 0) return;
  hashmap<string,int>& var_type= default_var_type;

  var_type (DPI)               = Env_Fixed;
  var_type (SFACTOR)           = Env_Fixed;
  var_type (PREAMBLE)          = Env_Preamble;
  var_type (SAVE_AUX)          = Env_Fixed;
  var_type (MODE)              = Env_Mode;
  var_type (INFO_FLAG)         = Env_Info_Level;

  var_type (FONT)              = Env_Font;
  var_type (FONT_FAMILY)       = Env_Font;
  var_type (FONT_SERIES)       = Env_Font;
  var_type (FONT_SHAPE)        = Env_Font;
  var_type (FONT_SIZE)         = Env_Font_Size;
  var_type (FONT_BASE_SIZE)    = Env_Font_Size;
  var_type (MAGNIFICATION)     = Env_Magnification;
  var_type (MAGNIFY)           = Env_Magnify;
  var_type (COLOR)             = Env_Color;
  var_type (OPACITY)           = Env_Color;
  var_type (LANGUAGE)          = Env_Language;

  var_type (MATH_LANGUAGE)     = Env_Language;
  var_type (MATH_FONT)         = Env_Font;
  var_type (MATH_FONT_FAMILY)  = Env_Font;
  var_type (MATH_FONT_SERIES)  = Env_Font;
  var_type (MATH_FONT_SHAPE)   = Env_Font;
  var_type (MATH_LEVEL)        = Env_Index_Level;
  var_type (MATH_DISPLAY)      = Env_Display_Style;
  var_type (MATH_CONDENSED)    = Env_Math_Condensed;
  var_type (MATH_VPOS)         = Env_Vertical_Pos;

  var_type (PROG_LANGUAGE)     = Env_Language;
  var_type (PROG_FONT)         = Env_Font;
  var_type (PROG_FONT_FAMILY)  = Env_Font;
  var_type (PROG_FONT_SERIES)  = Env_Font;
  var_type (PROG_FONT_SHAPE)   = Env_Font;

  var_type (PAR_MODE)          = Env_Paragraph;
  var_type (PAR_HYPHEN)        = Env_Paragraph;
  var_type (PAR_WIDTH)         = Env_Paragraph;
  var_type (PAR_LEFT)          = Env_Paragraph;
  var_type (PAR_RIGHT)         = Env_Paragraph;
  var_type (PAR_FIRST)         = Env_Paragraph;
  var_type (PAR_NO_FIRST)      = Env_Paragraph;
  var_type (PAR_SEP)           = Env_Paragraph;
  var_type (PAR_HOR_SEP)       = Env_Paragraph;
  var_type (PAR_VER_SEP)       = Env_Paragraph;
  var_type (PAR_LINE_SEP)      = Env_Paragraph;
  var_type (PAR_PAR_SEP)       = Env_Paragraph;

  var_type (PAGE_TYPE)         = Env_Fixed;
  var_type (PAGE_BREAKING)     = Env_Fixed;
  var_type (PAGE_FLEXIBILITY)  = Env_Fixed;
  var_type (PAGE_WIDTH)        = Env_Page_Extents;
  var_type (PAGE_HEIGHT)       = Env_Page_Extents;
  var_type (PAGE_WIDTH_MARGIN) = Env_Page;
  var_type (PAGE_SCREEN_MARGIN)= Env_Page;
  var_type (PAGE_NR)           = Env_Page;
  var_type (PAGE_THE_PAGE)     = Env_Page;
  var_type (PAGE_ODD)          = Env_Page;
  var_type (PAGE_EVEN)         = Env_Page;
  var_type (PAGE_RIGHT)        = Env_Page;
  var_type (PAGE_TOP)          = Env_Page;
  var_type (PAGE_BOT)          = Env_Page;
  var_type (PAGE_USER_HEIGHT)  = Env_Page;
  var_type (PAGE_ODD_SHIFT)    = Env_Page;
  var_type (PAGE_EVEN_SHIFT)   = Env_Page;
  var_type (PAGE_SHRINK)       = Env_Page;
  var_type (PAGE_EXTEND)       = Env_Page;
  var_type (PAGE_HEAD_SEP)     = Env_Page;
  var_type (PAGE_FOOT_SEP)     = Env_Page;
  var_type (PAGE_ODD_HEADER)   = Env_Page;
  var_type (PAGE_ODD_FOOTER)   = Env_Page;
  var_type (PAGE_EVEN_HEADER)  = Env_Page;
  var_type (PAGE_EVEN_FOOTER)  = Env_Page;
  var_type (PAGE_THIS_HEADER)  = Env_Page;
  var_type (PAGE_THIS_FOOTER)  = Env_Page;
  var_type (PAGE_FNOTE_SEP)    = Env_Page;
  var_type (PAGE_FNOTE_BARLEN) = Env_Page;
  var_type (PAGE_FLOAT_SEP)    = Env_Page;
  var_type (PAGE_MNOTE_SEP)    = Env_Page;
  var_type (PAGE_MNOTE_WIDTH)  = Env_Page;

  var_type (POINT_STYLE)       = Env_Point_Style;
  var_type (LINE_WIDTH)        = Env_Line_Width;
  var_type (DASH_STYLE)        = Env_Dash_Style;
  var_type (DASH_STYLE_UNIT)   = Env_Dash_Style_Unit;
  var_type (FILL_COLOR)        = Env_Fill_Color;
  var_type (ARROW_BEGIN)       = Env_Line_Arrows;
  var_type (ARROW_END)         = Env_Line_Arrows;
  var_type (ARROW_LENGTH)      = Env_Line_Arrows;
  var_type (ARROW_HEIGHT)      = Env_Line_Arrows;
  var_type (TEXT_AT_HALIGN)    = Env_Text_At_Halign;
  var_type (TEXT_AT_VALIGN)    = Env_Text_At_Valign;
  var_type (GR_FRAME)          = Env_Frame;
  var_type (GR_GEOMETRY)       = Env_Geometry;
  var_type (GR_GRID)           = Env_Grid;
  var_type (GR_GRID_ASPECT)    = Env_Grid_Aspect;
  var_type (GR_EDIT_GRID)        = Env_Grid;
  var_type (GR_EDIT_GRID_ASPECT) = Env_Grid_Aspect;

  var_type (SRC_STYLE)         = Env_Src_Style;
  var_type (SRC_SPECIAL)       = Env_Src_Special;
  var_type (SRC_COMPACT)       = Env_Src_Compact;
  var_type (SRC_CLOSE)         = Env_Src_Close;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation