⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gr_set.ado

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 ADO
字号:
*! version 1.0.6  06apr2005
program gr_set
	version 8
	gettoken cmd 0 : 0, parse(", ")
	if ("`cmd'"=="print") {
		Print `0'
		exit
	}
	if "`cmd'"=="ps" {
		Ps `0'
		exit
	}
	if "`cmd'"=="eps" {
		Eps `0'
		exit
	}
	if "`cmd'"=="mf" {
		Mf `0'
		exit
	}
	if "`cmd'"=="pict" {
		Pict `0'
		exit
	}
	if "`cmd'"=="" {
		if (c(os) != "Unix") {
			di as txt "-> graph set print"
			PrintQuery
		}
		di as txt "-> graph set ps"
		PsQuery
		di

		di as txt "-> graph set eps"
		EpsQuery

		if (c(os) == "Windows") {
			di as txt "-> graph set mf"
			MfQuery
		}

		if (c(os) == "MacOSX") {
			di as txt "-> graph set pict"
			PictQuery
		}
		exit
	}
	di as err "`cmd':  invalid graph set subcommand"
	exit 198
end

program Print 
	args setting choice nothing 

	if c(os)=="Unix" {
		Ps `0'
		exit
	}

	if "`setting'"=="" PrintQuery
	else {
		if ("`choice'"=="" | "`nothing'"!="") error 198
		translator set gph2prn `setting' `choice'
	}
end

program Ps
	args setting choice nothing 

	if ("`setting'"=="") PsQuery
	else {
		if ("`choice'"=="" | "`nothing'"!="") error 198
		if ("`setting'" == "fontface") {
			translator set gph2ps `setting' "`choice'"
		}
		else {
			translator set gph2ps `setting' `choice'
		}
	}
end

program Eps
	args setting choice nothing 

	if ("`setting'"=="") EpsQuery
	else {
		if ("`choice'"=="" | "`nothing'"!="") error 198
		if ("`setting'" == "fontface") {
			translator set gph2eps `setting' "`choice'"
		}
		else {
			translator set gph2eps `setting' `choice'
		}
	}
end

program Mf
	args setting choice nothing 

	if c(os)!="Windows" {
		di as err "mf settings not available under `c(os)'"
		exit 198
	}
	if ("`setting'"=="") MfQuery
	else {
		if ("`choice'"=="" | "`nothing'"!="") error 198
		if ("`setting'" == "fontface") {
			translator set gph2wmf `setting' "`choice'"
		}
		else {
			translator set gph2wmf `setting' `choice'
		}
	}
end

		

program PrintQuery, rclass
	if (trim(`"`0'"')!= "") error 198
	qui translator query gph2prn
	ret local logo    "`r(logo)'"
	ret local tmargin "`r(tmargin)'"
	ret local lmargin "`r(lmargin)'"

	di 
	di as txt _col(4) "print" _col(21) "current"
	di as txt _col(4) "setting" _col(21) "default" _col(35) "choices"
	di as txt _col(4) "{hline 69}"

	Di "logo" "`return(logo)'" "{res:on} or {res:off}"
	Di "tmargin" "`return(tmargin)'" "#, 0 <= # <= 20"
	Di "lmargin" "`return(lmargin)'" "#, 0 <= # <= 20"
	di as txt _col(4) "{hline 69}"
	di as txt _col(4) `"To change setting, type ""' _c 
	di as res "graph set print " as txt ///
		"{it:setting} {it:choice}" as txt `"""'
end

program PsQuery, rclass
	if (trim(`"`0'"')!= "") error 198
	qui translator query gph2ps
	ret local logo    "`r(logo)'"
	ret local cmyk    "`r(cmyk)'"
	ret local tmargin "`r(tmargin)'"
	ret local lmargin "`r(lmargin)'"
	ret local mag     "`r(mag)'"
	ret local fontface    "`r(fontface)'"
	ret local orientation "`r(orientation)'"
	ret local pagesize    "`r(pagesize)'"
	ret local pageheight  "`r(pageheight)'"
	ret local pagewidth   "`r(pagewidth)'"

	
	local chdr = cond(c(os)=="Unix", "ps/print", "ps")

	di as txt
	di as txt _col(4) "`chdr'" _col(21) "current"
	di as txt _col(4) "setting" _col(21) "default" _col(35) "choices"
	di as txt _col(4) "{hline 69}"

	Di "tmargin" "`return(tmargin)'" "#, 0 <= # <= 20"
	Di "lmargin" "`return(lmargin)'" "#, 0 <= # <= 20"
	Di "logo" "`return(logo)'" "{res:on} or {res:off}"
	Di "cmyk" "`return(cmyk)'" "{res:on} or {res:off}"
	Di "mag"  "`return(mag)'" "#, 1 <= # <= 10000"

	Di "fontface" "`return(fontface)'" "font name"
	Di "orientation" "`return(orientation)'" ///
		   "{res:portrait} or {res:landscape}"
	Di "pagesize" "`return(pagesize)'" ///
		   "{res:letter}, {res:legal}, {res:executive}, {res:A4}, {res:custom}"

	if "`return(pagesize)'"=="custom" {
		Di "pageheight" "`return(pageheight)'" ///
	   	"#, 0 <= # <= 20"
		Di "pag=ewidth" "`return(pagewidth)'" ///
	   	"#, 0 <= # <= 20"
	}
	else {
		Di "pageheight" "{txt:--}" ///
		"relevant only if {res:pagesize} is {res:custom}"
		Di "pagewidth" "{txt:--}" ///
		"relevant only if {res:pagesize} is {res:custom}"
	}

	di as txt _col(4) "{hline 69}"
	di as txt _col(4) `"To change setting, type ""' _c 
	di as res "graph set ps " as txt ///
		"{it:setting} {it:choice}" as txt `"""'
end

program EpsQuery, rclass
	if (trim(`"`0'"')!= "") error 198
	qui translator query gph2eps
	ret local logo    "`r(logo)'"
	ret local cmyk    "`r(cmyk)'"
	ret local mag     "`r(mag)'"
	ret local fontface    "`r(fontface)'"
	ret local orientation "`r(orientation)'"
	ret local preview "`r(preview)'"

	
	di as txt
	di as txt _col(4) "eps" _col(21) "current"
	di as txt _col(4) "setting" _col(21) "default" _col(35) "choices"
	di as txt _col(4) "{hline 69}"

	Di "logo" "`return(logo)'" "{res:on} or {res:off}"
	Di "cmyk" "`return(cmyk)'" "{res:on} or {res:off}"
	Di "mag"  "`return(mag)'" "#, 1 <= # <= 10000"
	Di "preview" "`return(preview)'" "{res:on} or {res:off}"
	Di "fontface" "`return(fontface)'" "font name"
	Di "orientation" "`return(orientation)'" ///
		   "{res:portrait} or {res:landscape}"

	di as txt _col(4) "{hline 69}"
	di as txt _col(4) `"To change setting, type ""' _c 
	di as res "graph set eps " as txt ///
		"{it:setting} {it:choice}" as txt `"""'
end

program PictQuery, rclass
	if (trim(`"`0'"')!= "") error 198
	qui translator query gph2pict
	ret local mag     "`r(mag)'"
	ret local fontface    "`r(fontface)'"
	
	di as txt
	di as txt _col(4) "pict" _col(21) "current"
	di as txt _col(4) "setting" _col(21) "default" _col(35) "choices"
	di as txt _col(4) "{hline 69}"

	Di "mag"  "`return(mag)'" "#, 1 <= # <= 10000"
	Di "fontface" "`return(fontface)'" "font name"

	di as txt _col(4) "{hline 69}"
	di as txt _col(4) `"To change setting, type ""' _c 
	di as res "graph set pict " as txt ///
		"{it:setting} {it:choice}" as txt `"""'
end

program MfQuery, rclass
	if (trim(`"`0'"')!= "") error 198
	qui translator query gph2wmf
	ret local fontface    "`r(fontface)'"
	
	di as txt
	di as txt _col(4) "`mf'" _col(21) "current"
	di as txt _col(4) "setting" _col(21) "default" _col(35) "choices"
	di as txt _col(4) "{hline 69}"

	Di "fontface" "`return(fontface)'" "font name"

	di as txt _col(4) "{hline 69}"
	di as txt _col(4) `"To change setting, type ""' _c 
	di as res "graph set mf " as txt ///
		"{it:setting} {it:choice}" as txt `"""'
end

program Di
	args setting default choices

	di as txt _col(4)  "`setting'" ///
	   as res _col(21) "`default'" ///
	   as txt _col(36) "`choices'"
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -