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

📄 textbox_options.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
📖 第 1 页 / 共 2 页
字号:

{pstd}
If you specified {cmd:title()}'s {cmd:position(12)} option, the result
would be

	{c TLC}{hline 21}{c TT}{hline 5}{c TT}{hline 21}{c TRC}
	{c |}{space 21}{c |}{it:title}{c |}{space 21}{c |}
	{c BLC}{hline 21}{c BT}{hline 5}{c BT}{hline 21}{c BRC}

{pstd}
If you specified {cmd:title()}'s {cmd:position(1)} option, the result
would be

	{c TLC}{hline 44}{c TT}{hline 5}{c TRC}
	{c |}{space 44}{c |}{it:title}{c |}
	{c BLC}{hline 44}{c BT}{hline 5}{c BRC}


{marker remarks3}{...}
{title:Justification}

{pstd}
An implication of the above is that it is not the textbox option
{cmd:justification()} that determines whether the title is centered; it
is {cmd:title()}'s {cmd:position()} option.

{pstd}
Remember, textbox options describe the construction of textboxes, not their
use.
{cmd:justification(left}|{cmd:right}|{cmd:center)} determines how text is
placed in multiple-line textboxes:

	{c TLC}{hline 32}{c TRC}
	{c |}Example of multiple-line textbox{c |}
	{c |}{cmd:justification(left)}             {c |}
	{c BLC}{hline 32}{c BRC}

	{c TLC}{hline 32}{c TRC}
	{c |}Example of multiple-line textbox{c |}
	{c |}            {cmd:justification(right)}{c |}
	{c BLC}{hline 32}{c BRC}


	{c TLC}{hline 32}{c TRC}
	{c |}Example of multiple-line textbox{c |}
	{c |}     {cmd:justification(center)}      {c |}
	{c BLC}{hline 32}{c BRC}

{pstd}
Textboxes are no wider than the text of their longest line.
{cmd:justification()} determines how lines shorter than the longest are placed
inside the box.  In a single-line textbox,

	{c TLC}{hline 19}{c TRC}
	{c |}{it:single-line textbox}{c |}
	{c BLC}{hline 19}{c BRC}

{pstd}
it does not matter how the text is justified.


{marker remarks4}{...}
{title:Position and justification combined}

{pstd}
With positioning options provided by the context in which the textbox
is being used, and the {cmd:justification()} option, you can create lots
of different effects in the presentation of multiple-line textboxes.  For
instance, considering {cmd:title()}, you could produce

	{c TLC}{hline 14}{c TT}{hline 19}{c TT}{hline 15}{c TRC}
	{c |}{space 14}{c |}First line of title{c |}{space 15}{c |}          (1)
	{c |}{space 14}{c |}Second line        {c |}{space 15}{c |}
	{c BLC}{hline 14}{c BT}{hline 19}{c BT}{hline 15}{c BRC}

{pstd}
or

	{c TLC}{hline 14}{c TT}{hline 19}{c TT}{hline 15}{c TRC}
	{c |}{space 14}{c |}First line of title{c |}{space 15}{c |}          (2)
	{c |}{space 14}{c |}    Second line    {c |}{space 15}{c |}
	{c BLC}{hline 14}{c BT}{hline 19}{c BT}{hline 15}{c BRC}

{pstd}
or

	{c TLC}{hline 14}{c TT}{hline 19}{c TT}{hline 15}{c TRC}
	{c |}{space 14}{c |}First line of title{c |}{space 15}{c |}          (3)
	{c |}{space 14}{c |}        Second line{c |}{space 15}{c |}
	{c BLC}{hline 14}{c BT}{hline 19}{c BT}{hline 15}{c BRC}

{pstd}
or

	{c TLC}{hline 30}{c TT}{hline 19}{c TRC}
	{c |}{space 30}{c |}First line of title{c |}          (4)
	{c |}{space 30}{c |}Second line        {c |}
	{c BLC}{hline 30}{c BT}{hline 19}{c BRC}

{pstd}
or

	{c TLC}{hline 30}{c TT}{hline 19}{c TRC}
	{c |}{space 30}{c |}First line of title{c |}          (5)
	{c |}{space 30}{c |}    Second line    {c |}
	{c BLC}{hline 30}{c BT}{hline 19}{c BRC}

{pstd}
or

	{c TLC}{hline 30}{c TT}{hline 19}{c TRC}
	{c |}{space 30}{c |}First line of title{c |}          (6)
	{c |}{space 30}{c |}        Second line{c |}
	{c BLC}{hline 30}{c BT}{hline 19}{c BRC}

{pstd}
or many others.   The commands would be

	{cmd:. graph} ...{cmd:, title("First line of title" "Second line",}       (1)
				{cmd:position(12) justification(left))}

	{cmd:. graph} ...{cmd:, title("First line of title" "Second line",}       (2)
				{cmd:position(12) justification(center))}

	{cmd:. graph} ...{cmd:, title("First line of title" "Second line",}       (3)
				{cmd:position(12) justification(right))}

	{cmd:. graph} ...{cmd:, title("First line of title" "Second line",}       (4)
				{cmd:position(1) justification(left))}

	{cmd:. graph} ...{cmd:, title("First line of title" "Second line",}       (5)
				{cmd:position(1) justification(center))}

	{cmd:. graph} ...{cmd:, title("First line of title" "Second line",}       (6)
				{cmd:position(1) justification(right))}


{marker remarks5}{...}
{title:Margins}

{pstd}
There are two margins:  {cmd:margin()} and {cmd:bmargin()}.
{cmd:margin()} specifies the margin between the text and the border.
{cmd:bmargin()} specifies the margin between the border and the
containing box.

{pstd}
By default, textboxes are the smallest rectangle that will just contain
the text.  If you specify {cmd:margin()}, you add space between the text
and the borders of the bounding rectangle:

	{c TLC}{hline 20}{c TRC}
	{c |}{cmd:margin(zero)} textbox{c |}
	{c BLC}{hline 20}{c BRC}

	{c TLC}{hline 51}{c TRC}
	{c |}                                                   {c |}
	{c |}   textbox with lots of margin on all four sides   {c |}
	{c |}                                                   {c |}
	{c BLC}{hline 51}{c BRC}

{pstd}
{cmd:margin(}{it:marginstyle}{cmd:)} allows different amounts of padding to be
specified above, below, left, and right of the text; see 
{it:{help marginstyle}}.  {cmd:margin()} margins make the textbox look better
when the border is outlined via the {cmd:box} option and/or the box is shaded
via the {cmd:bcolor()} or {cmd:bfcolor()} options.

{pstd}
{cmd:bmargin()} margins are used to move the textbox a little or a lot
when the available positioning options are inadequate.
Consider specifying the {cmd:caption()}
option (see {it:{help title_options}}) so that it is inside the plot
region:

{p 8 16 2}
{cmd:. graph} ...{cmd:,}
{cmd:caption("My caption", ring(0) position(7))}

{pstd}
Seeing the result, you decide you want to shift the box up and to the right
a bit:

{p 8 30 2}
{cmd:. graph} ...{cmd:,}
{cmd:caption("My caption", ring(0) position(7)}{break}
{cmd:bmargin("2 0 2 0"))}

{pstd}
The {cmd:bmargin()} numbers (and {cmd:margin()} numbers) are the top, bottom,
left, and right amounts, and the amounts are specified as relative sizes
(see {it:{help relativesize}}).  We specified a 2% bottom margin and a 2%
left margin, thus pushing the caption box up and to the right.


{marker remarks6}{...}
{title:Width and height}

{pstd}
The width and the height of a textbox are determined by its contents (the text
width and number of lines) plus the margins just discussed.
The width calculation, however, is based on an approximation, with the result
that the textbox that should look like this

	{c TLC}{hline 41}{c TRC}
	{c |}Stata approximates the width of textboxes{c |}
	{c BLC}{hline 41}{c BRC}

{pstd}
can end up looking like this

	{c TLC}{hline 43}{c TRC}
	{c |}Stata approximates the width of textboxes  {c |}
	{c BLC}{hline 43}{c BRC}

{pstd}
or like this

	{c TLC}{hline 39}{c TRC}
	{c |}Stata approximates the width of textbox{c |}es
	{c BLC}{hline 39}{c BRC}

{pstd}
You will not notice this problem unless the borders are being drawn
(option {cmd:box}) because, without borders, in all three cases you would see

	 Stata approximates the width of textboxes

{pstd}
For an example of this problem and the solution, see
{hi:Use of the textbox option width()}
in {it:{help added_text_option}}.
If the problem arises, use {cmd:width(}{it:relativesize}{cmd:)} to work
around it.  Getting the {cmd:width()} right is a matter of trial and error.
The correct width will nearly always be between 0 and 100.

{pstd}
Corresponding to {cmd:width(}{it:relativesize}{cmd:)}, there is
{cmd:height(}{it:relativesize}{cmd:)}.  This option is less useful because
Stata never gets the height incorrect.


{marker remarks7}{...}
{title:Appendix:  Overriding default or context-specified positioning}

{pstd}
What follows is really a footnote.  We said previously that where a
textbox is located is determined by the context in which it is used and by the
positioning options provided by that context.  In some cases, you
wish to override that default, or the context may not provide such
control.  In such cases, the option {cmd:placement()} allows you to take
control.

{pstd}
Let us begin by correcting a misconception we introduced.  We previously
said that textboxes are fit inside other boxes when they are positioned.
That is not exactly true.  For instance, what happens when the textbox
is bigger than the box into which it is being placed?  Say that we have the
textbox

	{c TLC}{hline 20}{c TRC}
	{c |}{space 20}{c |}
	{c BLC}{hline 20}{c BRC}

{pstd}
and we need to put it "in" the box

			{c TLC}{hline 6}{c TRC}
			{c |}{space 6}{c |}
			{c |}{space 6}{c |}
			{c |}{space 6}{c |}
			{c BLC}{hline 6}{c BRC}

{pstd}
The way things work, textboxes are not put inside other boxes; they are merely
positioned so that they align a certain way with the pre-existing box.
Those alignment rules are such that, if the pre-existing box is larger than
the textbox, the result will be what is commonly meant by "inside".
The alignment rules are either to align one of the four corners or to align
and center on one of the four edges.

{pstd}
In the example just given, the textbox could be positioned so that its
northwest corner is coincident with the northwest corner of the pre-existing
box,

			{c TLC}{hline 6}{c TT}{hline 13}{c TRC}
			{c |}{space 6}{c |}{space 13}{c |}{...}
{col 60}{cmd:placement(nw)}
			{c LT}{hline 6}{c +}{hline 13}{c BRC}
			{c |}{space 6}{c |}
			{c BLC}{hline 6}{c BRC}

{pstd}
or so that their northeast corners are coincident,

	  {c TLC}{hline 13}{c TT}{hline 6}{c TRC}
	  {c |}{space 13}{c |}{space 6}{c |}{...}
{col 60}{cmd:placement(ne)}
	  {c BLC}{hline 13}{c +}{hline 6}{c RT}
			{c |}{space 6}{c |}
			{c BLC}{hline 6}{c BRC}

{pstd}
or so that their southwest corners are coincident,

			{c TLC}{hline 6}{c TRC}
			{c |}{space 6}{c |}{...}
{col 60}{cmd:placement(sw)}
			{c LT}{hline 6}{c +}{hline 13}{c TRC}
			{c |}{space 6}{c |}{space 13}{c |}
			{c BLC}{hline 6}{c BT}{hline 13}{c BRC}

{pstd}
or so that their southeast corners are coincident,

			{c TLC}{hline 6}{c TRC}
			{c |}{space 6}{c |}{...}
{col 60}{cmd:placement(se)}
	  {c TLC}{hline 13}{c +}{hline 6}{c RT}
	  {c |}{space 13}{c |}{space 6}{c |}
	  {c BLC}{hline 13}{c BT}{hline 6}{c BRC}

{pstd}
or so that the midpoint of the top edges are the same,

		 {c TLC}{hline 6}{c TT}{hline 6}{c TT}{hline 6}{c TRC}
		 {c |}{space 6}{c |}{space 6}{c |}{space 6}{c |}{...}
{col 60}{cmd:placement(n)}
		 {c BLC}{hline 6}{c +}{hline 6}{c +}{hline 6}{c BRC}
			{c |}{space 6}{c |}
			{c BLC}{hline 6}{c BRC}

{pstd}
or so that the midpoint of the left edges are the same,

			{c TLC}{hline 6}{c TRC}
			{c LT}{hline 6}{c +}{hline 13}{c TRC}
			{c |}{space 6}{c |}{space 13}{c |}{...}
{col 60}{cmd:placement(w)}
			{c LT}{hline 6}{c +}{hline 13}{c BRC}
			{c BLC}{hline 6}{c BRC}

{pstd}
or so that the midpoint of the right edges are the same,

			{c TLC}{hline 6}{c TRC}
	  {c TLC}{hline 13}{c +}{hline 6}{c RT}
	  {c |}{space 13}{c |}{space 6}{c |}{...}
{col 60}{cmd:placement(e)}
	  {c BLC}{hline 13}{c +}{hline 6}{c RT}
			{c BLC}{hline 6}{c BRC}

{pstd}
or so that the midpoint of the bottom edges are the same,

			{c TLC}{hline 6}{c TRC}
			{c |}{space 6}{c |}{...}
{col 60}{cmd:placement(s)}
		 {c TLC}{hline 6}{c +}{hline 6}{c +}{hline 6}{c TRC}
		 {c |}{space 6}{c |}{space 6}{c |}{space 6}{c |}
		 {c BLC}{hline 6}{c BT}{hline 6}{c BT}{hline 6}{c BRC}

{pstd}
or so that the center point of the boxes are the same:

			{c TLC}{hline 6}{c TRC}
		 {c TLC}{hline 6}{c +}{hline 6}{c +}{hline 6}{c TRC}
		 {c |}{space 6}{c |}{space 6}{c |}{space 6}{c |}{...}
{col 60}{cmd:placement(c)}
		 {c BLC}{hline 6}{c +}{hline 6}{c +}{hline 6}{c BRC}
			{c BLC}{hline 6}{c BRC}

{pstd}
If you have trouble seeing any of the above, consider what you would obtain
if the pre-existing box were larger than the textbox.  Below we show
the pre-existing box with 8 different textboxes:

	{c TLC}{hline 13}{c TT}{hline 7}{c TT}{...}
{hline 12}{c TT}{hline 7}{c TT}{hline 13}{c TRC}
{...}
{...}
	{c |}{cmd:placement(nw)}{c |}{space 7}{...}
{c |}{cmd:placement(n)}{c |}{space 7}{...}
{c |}{cmd:placement(ne)}{c |}
{...}
{...}
	{c LT}{hline 13}{c BRC}{space 7}{...}
{c BLC}{hline 12}{c BRC}{space 7}{...}
{c BLC}{hline 13}{c RT}
{...}
{...}
{...}
	{c |}{space 56}{c |}
{...}
{...}
{...}
	{c LT}{hline 12}{c TRC}{...}
{space 8}{c TLC}{hline 12}{c TRC}{space 8}{...}
{c TLC}{hline 12}{c RT}
{...}
{...}
	{c |}{cmd:placement(w)}{c |}{...}
{space 8}{c |}{cmd:placement(c)}{c |}{space 8}{...}
{c |}{cmd:placement(e)}{c |}
{...}
{...}
	{c LT}{hline 12}{c BRC}{...}
{space 8}{c BLC}{hline 12}{c BRC}{space 8}{...}
{c BLC}{hline 12}{c RT}
{...}
{...}
{...}
	{c |}{space 56}{c |}
{...}
{...}
{...}
	{c LT}{hline 13}{c TRC}{space 7}{c TLC}{...}
{hline 12}{c TRC}{space 7}{c TLC}{hline 13}{c RT}
{...}
{...}
	{c |}{cmd:placement(sw)}{c |}{...}
{space 7}{c |}{cmd:placement(s)}{c |}{space 7}{...}
{c |}{cmd:placement(se)}{c |}
{...}
{...}
	{c BLC}{hline 13}{c BT}{hline 7}{c BT}{...}
{hline 12}{c BT}{hline 7}{c BT}{hline 13}{c BRC}


{title:Also see}

{psee}
Manual:  {bf:[G] {it:textbox_options}}

{psee}
Online:  
{it:{help alignmentstyle}};
{it:{help colorstyle}},
{it:{help compassdirstyle}},
{it:{help justificationstyle}},
{it:{help linepatternstyle}},
{it:{help linewidthstyle}},
{it:{help marginstyle}},
{it:{help relativesize}},
{it:{help orientationstyle}},
{it:{help textboxstyle}},
{it:{help textsizestyle}};
{it:{help title_options}}
{p_end}

⌨️ 快捷键说明

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