TeX/include/TeX/config.h

107 lines
3.6 KiB
C
Raw Permalink Normal View History

2019-06-12 18:53:50 +02:00
//---
// config: Implementation and graphical settings of the library
//---
#ifndef TEX_CONFIG
#define TEX_CONFIG
//---
// Implementation settings
//---
/* Size of the lexer buffer; must be large enough to hold all command names.
Longer than the longest literal string is a waste of space */
#define TEX_LEXER_BUFSIZE 64
/* Maximum number of nested left/right pairs */
#define TEX_LEFTRIGHT_DEPTH 16
/* Maximum number of nested environments */
#define TEX_ENV_DEPTH 16
/* Maximum number of command arguments allowed by the library (each node has
exactly this number of children; memory usage is better if this is small) */
#define TEX_NODE_MAX_CHILDREN 2
/* Enable or disable printing functions with TEX_PRINT. Currently this is
enabled (and used) by all computer targets and disabled on calculator. */
#if defined(TEX_PLATFORM_FX9860G) || defined(TEX_PLATFORM_FXCG50)
#undef TEX_PRINT
#elif !defined(TEX_PRINT)
#define TEX_PRINT
#endif
/* Switch to change parameters on fx-9860G / fx-CG 50. */
#if defined(TEX_PLATFORM_FX9860G)
#define TEX_FX(fx, cg) (fx)
#elif defined(TEX_PLATFORM_FXCG50)
#define TEX_FX(fx, cg) (cg)
#endif
2019-06-12 18:53:50 +02:00
//---
// Graphical settings
// A few quirks that can be adjusted to your needs.
//---
2019-06-18 17:30:49 +02:00
/* Spacing: between layout elements, letters, and width of space character */
#define TEX_LAYOUT_SPACING 1
// #define TEX_LETTER_SPACING 1
// #define TEX_WORD_SPACING 6
2019-06-12 18:53:50 +02:00
/* Thickness and horizontal margin of fraction bars */
#define TEX_FRACTION_BAR_THICKNESS 1
2019-06-18 17:30:49 +02:00
#define TEX_FRACTION_MARGIN 1
/* Vertical spacing between fraction bar and operands */
#define TEX_FRACTION_SPACING TEX_LAYOUT_SPACING
2019-06-12 18:53:50 +02:00
/* Vertical placement of subscripts and superscripts (relative to object) when
there is either only the subscript or only the superscript */
#define TEX_SUBSCRIPT_EXCL_ELEVATION TEX_FX(3, 5)
#define TEX_SUPERSCRIPT_EXCL_DEPTH TEX_FX(3, 5)
/* Vertical placement of subscripts and superscripts when there's both */
#define TEX_SUBSCRIPT_SHARED_ELEVATION TEX_FX(3, 3)
#define TEX_SUPERSCRIPT_SHARED_DEPTH TEX_FX(3, 3)
2019-06-18 17:30:49 +02:00
/* Horizontal spacing between object and subscripts and superscripts */
#define TEX_SUBSCRIPT_SPACING TEX_LAYOUT_SPACING
#define TEX_SUPERSCRIPT_SPACING TEX_LAYOUT_SPACING
/* Vertical spacing between objects and sub/superscripts in display mode */
#define TEX_DISPLAY_SPACING TEX_LAYOUT_SPACING
2019-06-12 18:53:50 +02:00
/* Align the center of the resizable brackets with the baseline */
#define TEX_LEFTRIGHT_ALIGNED 0
/* Make them extend symmetrically around baseline */
#define TEX_LEFTRIGHT_SYMMETRICAL 0
/* Width of resizable "<" and ">" delimiters */
#define TEX_LEFTRIGHT_ANGLE_WIDTH 4
/* Whether to place bounds above and below integrals (display mode) */
#define TEX_INT_DISPLAY 0
/* Height of the integral symbol */
#define TEX_INT_HEIGHT 21
/* Length of arrow extensions from the tip of a vector */
#define TEX_VEC_ARROW_LENGTH 2
/* Horizontal margin around vector */
#define TEX_VEC_MARGIN 0
/* Extra height between argument and vector */
#define TEX_VEC_SPACING TEX_LAYOUT_SPACING
2019-06-19 00:51:19 +02:00
/* Make the vertical part of the square root symbol slanted at small heights */
2019-06-12 18:53:50 +02:00
#define TEX_SQRT_SLANTED 1
2019-06-19 00:51:19 +02:00
/* Maximum height consider small */
#define TEX_SQRT_SLANT_MAX 10
/* Horizontal size occupied by the slanted part */
#define TEX_SQRT_SLANT_LENGTH 2
2019-06-12 18:53:50 +02:00
/* Length of the top-right bar of square roots (0 to disable) */
#define TEX_SQRT_BAR_LENGTH 0
2019-06-19 00:51:19 +02:00
/* Length of tip starting at the bottom left of the square root */
#define TEX_SQRT_TIP_LENGTH 2
/* Margin around argument */
#define TEX_SQRT_MARGIN TEX_LAYOUT_SPACING
2019-06-12 18:53:50 +02:00
2019-06-18 03:27:04 +02:00
/* Spacing between rows and columns in matrices */
#define TEX_MATRIX_COL_SPACING 4
#define TEX_MATRIX_ROW_SPACING 4
2019-06-12 18:53:50 +02:00
#endif /* TEX_CONFIG */