VSCode_LaTeX/dictionary/parameter_dictionary.ts

257 lines
22 KiB
TypeScript
Raw Normal View History

2017-12-05 08:54:17 +00:00
var path_options = {
color: {
detail: "color=<color name>",
documentation: "This option sets the color that is used for fill, drawing, and text inside the current scope. Any special settings for filling colors or drawing colors are immediately \"overruled\" by this option.",
additionalInserts: ["color=white", "color=black", "color=green", "color=blue", "color=red", "color=yellow",]
},
fill: {
detail: "fill=<color>",
documentation: "This option causes the path to be filled. All unclosed parts of the path are first closed, if necessary. Then, the area enclosed by the path is filled with the current filling color, which is either the last color set using the general color= option or the optional color <color>.",
additionalInserts: [{ label: "fill=<color>", insertText: "fill={$0:<color>}" }]
},
text: {
detail: "text=<color>",
insertText: "text=${0:<color>}",
documentation: "Sets the text color. Overwritten by \"color\"",
additionalInserts: ["text=white", "text=black", "text=green", "text=blue", "text=red", "text=yellow",]
},
draw: {
detail: "draw=<color>",
documentation: "Sets the draw color.",
additionalInserts: [{ label: "draw=<color>", insertText: "draw=${0:<color>}" }]
},
"line width": {
detail: "line width=<dimention>",
documentation: "Specifies the line width. Default: 0.4pt."
},
"ultra thin": {
detail: "style=ultra thin",
documentation: "Predefined style for line width. Sets the line width to 0.1pt."
},
"very thin": {
detail: "style=very thin",
documentation: "Predefined style for line width. Sets the line width to 0.2pt."
},
"thin": {
detail: "style=thin",
documentation: "Predefined style for line width. Sets the line width to 0.4pt."
},
"semithick": {
detail: "style=semithick",
documentation: "Predefined style for line width. Sets the line width to 0.6pt."
},
"thick": {
detail: "style=thick",
documentation: "Predefined style for line width. Sets the line width to 0.8pt."
},
"very thick": {
detail: "style=very thick",
documentation: "Predefined style for line width. Sets the line width to 1.2pt."
},
"ultra thick": {
detail: "style=ultra thick",
documentation: "Predefined style for line width. Sets the line width to 1.6pt."
},
cap: {
detail: "cap=<type>",
insertText: "cap=${0:<type>}",
documentation: "Specifies how lines \"end\". Permissible <type> are round, rect, and butt (default).",
additionalInserts: [ "cap=butt", "cap=round", "cap=rect" ]
},
join: {
detail: "join=<type>",
insertText: "join=${0:<type>}",
documentation: "Specifies how lines \"join\". Permissible <type> are round, bevel, and miter (default).",
additionalInserts: [ "join=miter", "join=round", "join=bevel"]
},
"dash pattern": { insertText: "dash pattern=${0:<dash pattern>}", detail: "dash pattern=<dash pattern>", documentation: "Sets the dashing pattern. The syntax is the same as in metafont. For example on 2pt off 3pt on 4pt off 4pt means \"draw 2pt, then leave out 3pt, then draw 4pt once more, then leave out 4pt again, repeat\"." },
"dash phase": { insertText: "dash phase=${0:<dash phase>}", detail: "dash phase=<dash phase>", documentation: "Shifts the start of the dash pattern by <phase>." },
"solid": { detail: "style=solid", documentation: "Predefined style for dashing. Sets the dash pattern to a solid line." },
"dotted": { detail: "style=dotted", documentation: "Predefined style for dashing. Sets the dash pattern to a dotted line." },
"densely dotted": { detail: "style=densely dotted", documentation: "Predefined style for dashing. Sets the dash pattern to a densely dotted line." },
"loosely dotted": { detail: "style=loosely dotted", documentation: "Predefined style for dashing. Sets the dash pattern to a loosely dotted line." },
"dashed": { detail: "style=dashed", documentation: "Predefined style for dashing. Sets the dash pattern to a dashed line." },
"densely dashed": { detail: "style=densely dashed", documentation: "Predefined style for dashing. Sets the dash pattern to a densely dashed line." },
"loosely dashed": { detail: "style=loosely dashed", documentation: "Predefined style for dashing. Sets the dash pattern to a loosely dashed line." },
"draw opacity": { insertText: "draw opacity=${0:<value>}", detail: "draw opacity=<value>", documentation: "This option sets \"how transparent\" lines should be. A value of 1 means \"fully opaque\" or \"not transparent at all\", a value of 0 means \"fully transparent\" or \"invisible.\" A value of 0.5 yields lines that are semitransparent." },
"fill opacity": { insertText: "fill opacity=${0:<value>}", detail: "fill opacity=<value>", documentation: "This option sets \"how transparent\" the filling should be. A value of 1 means \"fully opaque\" or \"not transparent at all\", a value of 0 means \"fully transparent\" or \"invisible.\" A value of 0.5 yields filling that are semitransparent." },
"opacity": { insertText: "opacity=${0:<value>}", detail: "opacity=<value>", documentation: "This option sets \"how transparent\" the filling and the line should be. A value of 1 means \"fully opaque\" or \"not transparent at all\", a value of 0 means \"fully transparent\" or \"invisible.\" A value of 0.5 yields filling and lines that are semitransparent." },
"transparent": { detail: "style=transparent", documentation: "Predefined style for opacity. Makes everything totally transparent and, hence, invisible." },
"ultra nearly transparent": { detail: "style=ultra nearly transparent", documentation: "Predefined style for opacity. Makes everything totally ultra nearly transparent." },
"nearly transparent": { detail: "style=nearly transparent", documentation: "Predefined style for opacity. Makes everything totally nearly transparent." },
"semitransparent": { detail: "style=semitransparent", documentation: "Predefined style for opacity. Makes everything totally semitransparent." },
"nearly opaque": { detail: "style=nearly opaque", documentation: "Predefined style for opacity. Makes everything totally nearly opaque." },
"very nearly opaque": { detail: "style=very nearly opaque", documentation: "Predefined style for opacity. Makes everything totally very nearly opaque." },
"ultra nearly opaque": { detail: "style=ultra nearly opaque", documentation: "Predefined style for opacity. Makes everything totally ultra nearly opaque." },
"opaque": { detail: "style=opaque", documentation: "Predefined style for opacity. This yields completely opaque drawings, which is the default." },
"arrows": { detail: "arrows=<start arrow kind>-<end arrow kind>", documentation: "This option sets the start and end arrow tips (an empty value as in -> indicates that no arrow tip should be drawn at the start). Note: Since the arrow option is so often used, you can leave out the text arrows=. What happens is that every option that contains a - is interpreted as an arrow specification." },
"shorten >": { insertText: "shorten >=${0:<dimension>}", detail: "shorten >=<dimension>", documentation: "This option will shorten the end of lines by the given <dimension>." },
"shorten <": { insertText: "shorten <=${0:<dimension>}", detail: "shorten <=<dimension>", documentation: "This option will shorten the start of lines by the given <dimension>." },
"double": { detail: "double=<core color>", documentation: "This option causes \"two\" lines to be drawn instead of a single one." },
"double distance": { insertText: "double distance=${0:<dimension>}", detail: "double distance=<dimension>", documentation: "Sets the distance the \"two\" lines are spaced apart (default is 0.6pt)." },
"nonzero rule": { documentation: "If this rule is used (which is the default), the following method is used to determine whether a given point is \"inside\" the path: From the point, shoot a ray in some direction towards infinity (the direction is chosen such that no strange borderline cases occur). Then the ray may hit the path. Whenever it hits the path, we increase or decrease a counter, which is initially zero. If the ray hits the path as the path goes from left to right (relative to the ray), the counter is increased, otherwise it is decreased. Then, at the end, we check whether the counter is nonzero (hence the name). If so, the point is deemed to lie \"inside\", otherwise it is \"outside\"." },
"even odd rule": { documentation: "This option causes a different method to be used for determining the inside and outside of paths. While it is less flexible, it turns out to be more intuitive. With this method, we also shoot rays from the point for which we wish to determine whether it is inside or outside the filling area. However, this time we only count how often we \"hit\" the path and declare the point to be \"inside\" if the number of hits is odd. Using the even-odd rule, it is easy to \"drill holes\" into a path." },
"shading": { detail: "shading=<name>", insertText: "shading=${0:<name>}", documentation: "This selects a shading named <name>. Predefined shadings are axis, ball and radial", additionalInserts: ["shading=axis", "shading=ball", "shading=radial"] },
"shading angle": { detail: "shading angle=<degrees>", insertText: "shading angle=${0:<degrees>}", documentation: "This option rotates the shading (not the path!) by the given angle. For example, we can turn a top-to-bottom axis shading into a left-to-right shading by rotating it by 90◦." },
"top color": { detail: "top color=<color>", insertText: "top color=${0:<color>}", documentation: "This option prescribes the color to be used at the top in an axis shading." },
"bottom color": { detail: "bottom color=<color>", insertText: "bottom color=${0:<color>}", documentation: "This option prescribes the color to be used at the top in an axis shading." },
"middle color": { detail: "middle color=<color>", insertText: "middle color=${0:<color>}", documentation: "This option specifies the color for the middle of an axis shading. It also sets the shade and shading=axis options, but it does not change the rotation angle. Note: Since both top color and bottom color change the middle color, this option should be given last if all of these options need to be given." },
"left color": { detail: "left color=<color>", insertText: "left color=${0:<color>}", documentation: "This option does exactly the same as top color, except that the shading angle is set to 90◦." },
"inner color": { detail: "inner color=<color>", insertText: "inner color=${0:<color>}", documentation: "This option sets the color used at the center of a radial shading. When this option is used, the shade and shading=radial options are set." },
"outer color": { detail: "outer color=<color>", insertText: "outer color=${0:<color>}", documentation: "This option sets the color used at the border and outside of a radial shading." },
"ball color": { detail: "ball color=<color>", insertText: "ball color=${0:<color>}", documentation: "This option sets the color used for the ball shading. It sets the shade and shading=ball options. Note that the ball will never \"completely\" have the color hcolor i. At its \"highlight\" spot a certain amount of white is mixed in, at the border a certain amount of black. Because of this, it also makes sense to say ball color=white or ball color=black." },
"clip": { documentation: "clip This option causes all subsequent drawings to be clipped against the current path and the size of subsequent paths will not be important for the picture size. If you clip against a self-intersecting path, the even-odd rule or the nonzero winding number rule is used to determine whether a point is inside or outside the clipping region. The clipping path is a graphic state parameter, so it will be reset at the end of the current scope. Multiple clippings accumulate, that is, clipping is always done against the intersection of all clipping 116areas that have been specified inside the current scopes. The only way of enlarging the clipping area is to end a {scope}." },
};
var node_options = {
text: path_options.text,
color: path_options.color,
fill: path_options.fill,
draw: path_options.draw,
"text opacity": {
detail: "text opacity=<value>",
documentation: "Sets the opacity of text labels"
},
"font": {
detail: "font=<font commands>",
documentation: "Sets the font used for text labels"
},
"text width": {
detail: "text width=<dimension>",
documentation: "This option will put the text of a node in a box of the given width (more precisely, in a {minipage} of this width). If the node text is not as wide as <dimension>, it will nevertheless be put in a box of this width. If it is larger, line breaking will be done." },
"text justified": {
documentation: "text justified causes the text to be justified instead of (right)ragged. Use this only with pretty broad nodes."
2017-12-05 08:54:17 +00:00
},
"text ragged": {
documentation: "text ragged causes the text to be typeset with a ragged right. This uses the original plain TEX definition of a ragged right border, in which TEX will try to balance the right border as well as possible. This is the default."
},
"text badly ragged": {
documentation: "text badly ragged causes the right border to be ragged in the L A TEX-style, in which no balancing occurs. This looks ugly, but it may be useful for very narrow boxes and when you wish to avoid hyphenations."
},
"text centered": {
documentation: "text centered centers the text, but tries to balance the lines."
},
"text badly centered": {
documentation: "text badly centered centers the text, without balancing the lines."
},
"text height": {
detail: "text height=<dimension>",
documentation: "text height Sets the height of the text boxes in shapes. Thus, when you write something like node {text}, the text is first typeset, resulting in some box of a certain height. This height is then replaced by the height text height. The resulting box is then used to determine the size of the shape, which will typically be larger."
},
"text depth": {
detail: "text depth=<dimension>",
documentation: "text depth Sets the depth of the text boxes in shapes. Thus, when you write something like node {text}, the text is first typeset, resulting in some box of a certain depth. This depth is then replaced by the depth text depth. The resulting box is then used to determine the size of the shape, which will typically be larger." },
"anchor": {
detail: "anchor=<anchor name>",
insertText: "anchor=${0:anchor name>}",
documentation: "causes the node to be shifted such that its anchor <anchor name> lies on the current coordinate.",
additionalInserts: [
"anchor=center", "anchor=base west", "anchor=base east", "anchor=mid", "anchor=mid west",
"anchor=mid east", "anchor=north", "anchor=east", "anchor=south", "anchor=west",
"anchor=north east", "anchor=north west", "anchor=south east", "anchor=south west"
]
},
"above": {
detail: "above=<offset>",
insertText: "above=${0:<offset>}",
documentation: "above does the same as anchor=south. If the <offset> is specified, the node is additionally shifted upwards by the given <offset>."
},
"above left": {
detail: "above left=<offset>",
insertText: "above left=${0:<offset>}",
documentation: "above left does the same as anchor=south east. If the <offset> is specified, the node is additionally shifted upwards and right by <offset>."
},
"above right": {
detail: "above right=<offset>",
insertText: "above right=${0:<offset>}",
documentation: "above right does the same as anchor=south west. If the <offset> is specified, the node is additionally shifted upwards and left by <offset>."
},
"left": {
detail: "left=<offset>",
insertText: "left=${0:<offset>}",
documentation: "left does the same as anchor=east. If the <offset> is specified, the node is additionally shifted left by <offset>."
},
"right": {
detail: "right=<offset>",
insertText: "right=${0:<offset>}",
documentation: "right does the same as anchor=west. If the <offset> is specified, the node is additionally shifted right by <offset>."
},
"below": {
detail: "below=<offset>",
insertText: "below=${0:<offset>}",
documentation: "below does the same as anchor=north. If the <offset> is specified, the node is additionally shifted down by <offset>."
},
"below left": {
detail: "below left=<offset>",
insertText: "below left=${0:<offset>}",
documentation: "below left does the same as anchor=north east. If the <offset> is specified, the node is additionally shifted down and right by <offset>."
},
"below right": {
detail: "below right=<offset>",
insertText: "below right=${0:<offset>}",
documentation: "below right does the same as anchor=north west. If the <offset> is specified, the node is additionally shifted down and left by <offset>."
},
"transform shape": { documentation: "transform shape causes the current \"external\" transformation matrix to be applied to the shape. For example, if you said \tikz[scale=3] and then say node[transform shape] {X}, you will get a \"huge\" X in your graphic." },
"rotate": { detail: "rotate=<angle>", documentation: "Rotates the shape by the <angle> in degres." },
"scale": { detail: "scale=<factor>", documentation: "Scales the shape by <factor>." },
"pos": { detail: "pos=<fraction>", documentation: "When this option is given, the node is not anchored on the last coordinate. Rather, it is anchored on some point on the line from the previous coordinate to the current point. The <fraction> dictates how \"far\" on the line the point should be. A <fraction> or 0 is the previous coordinate, 1 is the current one, everything else is in between. In particular, 0.5 is the middle." },
"auto": {
detail: "auto=<direction>", documentation: "auto=<direction> This option causes an anchor positions to be calculated automatically according to the following rule. Consider a line between to points. If the <direction> is left, then the anchor is chosen such that the node is to the left of this line. If the <direction> is right, then the node is to the right of this line. Leaving out <direction> causes automatic placement to be enabled with the last value of left or right used. A <direction> of false disables automatic placement. This happens also whenever an anchor is given explicitly by the anchor option or by one of the above, below, etc. options. This option only has an effect for nodes that are placed on lines or curves.",
additionalInserts: [ "auto=left", "auto=right", "auto=false" ]
},
"swap": { documentation: "This option exchanges the roles of left and right in automatic placement. That is, if left is the current auto placement, right is set instead and the other way round." },
"sloped": { documentation: "This option causes the node to be rotated such that a horizontal line becomes a tangent to the curve. The rotation is normally done in such a way that text is never \"upside down\". To get upside-down text, use can use [rotate=180] or [allow upside down]" },
"allow upside down": { insertText: "allow upside down=${1:false}$0", detail: "allow upside down=<true|false>", documentation: "allow upside down=<true|false> If set to true, Tik Z will not \"righten\" upside down text" },
"label": { insertText: "label=[${1:<options>}]${2:<angle>}:$0{<text>}", detail: "label=[<options>]<angle>:<text>", documentation: "When this option is given to a node operation, it causes another node to be added to the path after the current node has been finished. This extra node will have the text <text>. It is placed according to the following rule: Suppose the node currently under construction is called main node and let us call the label node label node. Then the anchor of label node is placed at main node.<angle>. The anchor that is chosen depends on the <angle>." },
"label distance": { insertText: "label distance=${0:<distance>}", detail: "label distance=<distance>", documentation: "The <distance> is additionally inserted between the main node and the label node. The default is 0pt." },
"pin": { insertText: "pin=[${1:<options>}]${2:<angle>}:$0{<text>}", detail: "pin=[<options>]<angle>:<text>", documentation: "This option is quite similar to the label option, but there is one difference: In addition to adding a extra node to the picture, it also adds an edge from this node to the main node. This causes the node to look like a pin that has been added to the main node." },
"pin distance": { insertText: "pin distance=${0:<distance>}", detail: "pin distance=<distance>", documentation: "This <distance> is used instead of the label distance for the distance between the main node and the label node. The default is 3ex." },
"pin edge": { insertText: "pin edge=${0:<options>}", detail: "pin edge=<options>", documentation: "This option can be used to set the options that are to be used in the edge created by the pin option. The default is empty." },
"rounded corners": {},
"dashed": {},
"thick": {},
"double": { documentation: "Chauses 2 lines drawn" },
"ellipse": {},
"circle": {},
"coordinate": {},
};
export default {
node: node_options,
coordinate: node_options,
// path and its abbriviations:
draw: path_options,
fill: path_options,
filldraw: path_options,
pattern: path_options,
shade: path_options,
shadedraw: path_options,
clip: path_options,
useasboundingbox: path_options,
2018-01-07 13:44:53 +00:00
plot: path_options,
"begin{figure}": {
"!": { documentation: "overwrite" },
"h": { documentation: "hier" },
"l": { documentation: "low" },
"p": { documentation: "page" },
},
includegraphics: {
width: { detail: "width=<value>", insertText: "width=${0:<value>}", documentation: "scale graphic to the specified <value>.", },
height: { detail: "height=<value>", insertText: "height=${0:<value>}", documentation: "scale graphic to the specified <value>.", },
angle: { detail: "angle=<value>", insertText: "angle=${0:<value>}", documentation: "rotate graphic counterclockwise.", },
scale: { detail: "scale=<value>", insertText: "scale=${0:<value>}", documentation: "scale graphic by <value>.", },
}
2017-12-05 08:54:17 +00:00
};