コード例 #1
0
ファイル: box.c プロジェクト: syntheticpp/cpptex
void tex::print_spec(ptr p, str s)
	{
	print_scaled(glue_width(p));
	print(s);
	if (stretch(p) != 0) {
		print(" plus ");
		print_glue(stretch(p), stretch_order(p), s);
		}
	if (shrink(p) != 0) {
		print(" minus ");
		print_glue(shrink(p), shrink_order(p), s);
		}
	}
コード例 #2
0
ファイル: printing.c プロジェクト: clerkma/texlive-mobile
void print_spec(int p,const char*s)
{
if(p<0){
print_char('*');
}else{
print_scaled(width(p));
if(s!=NULL)
tprint(s);
if(stretch(p)!=0){
tprint(" plus ");
print_glue(stretch(p),stretch_order(p),s);
}
if(shrink(p)!=0){
tprint(" minus ");
print_glue(shrink(p),shrink_order(p),s);
}
}
}
コード例 #3
0
ファイル: box.c プロジェクト: syntheticpp/cpptex
void tex::show_glue_set(ptr p)
	{
	if (glue_set(p) != 0 && glue_sign(p) != NORMAL) {
		print(", glue set ");
		if (glue_sign(p) == SHRINKING)
			print("- ");
		if (fabs(glue_set(p)) > 20000.0) {
			if (glue_set(p) > 0)
				print(">");
			else print("< -");
			print_glue(20000 * UNITY, glue_order(p), null_str);
			} 
		else {
			print_glue((int)round(glue_set(p) * UNITY),
						  glue_order(p), null_str);
			}
		}
	}
コード例 #4
0
ファイル: box.c プロジェクト: syntheticpp/cpptex
void tex::show_box1(ptr p)
	{
	if (tex::type(p) == HLIST_NODE)
		print_esc("h");
	else if (tex::type(p) == VLIST_NODE)
		print_esc("v");
	else print_esc("unset");
	print("box(");
	print_scaled(box_height(p));
	print("+")	;
	print_scaled(box_depth(p));
	print(")x")	;
	print_scaled(box_width(p));
	if (tex::type(p) == UNSET_NODE) {
		if (unset_span_count(p) != MIN_QUARTERWORD) {
			print(" (");
			print_int(unset_span_count(p)+1);
			print(" columns)");
		}
		if (unset_stretch(p) != 0) {
			print(", stretch ");
			print_glue(unset_stretch(p), glue_order(p), null_str);
		}
		if (unset_shrink(p) != 0) {
			print(", shrink ");
			print_glue(unset_shrink(p), glue_sign(p), null_str);
		}
	} else {
		show_glue_set(p);
		if (shift_amount(p) != 0) {
			print(", shifted ");
			print_scaled(shift_amount(p));
		}
	}
	node_list_display(list_ptr(p));
}