diff --git a/config/_default/menus/menus.en.yaml b/config/_default/menus/menus.en.yaml index 65768198b..b7d57c86e 100644 --- a/config/_default/menus/menus.en.yaml +++ b/config/_default/menus/menus.en.yaml @@ -75,6 +75,30 @@ docs: weight: 700 identifier: miscellaneous +# docs-sidebar/docs-3.5 +docs-3.5: + - name: Navigation + weight: 110 + identifier: navigation + - name: Introduction + weight: 200 + identifier: introduction + - name: Working with Subtitles + weight: 300 + identifier: working-with-subtitles + - name: Typesetting + weight: 400 + identifier: typesetting + - name: Timing + weight: 500 + identifier: timing + - name: Automation + weight: 600 + identifier: automation + - name: Miscellaneous + weight: 700 + identifier: miscellaneous + # docs-sidebar/downloads # docs-sidebar/changelog diff --git a/content/en/docs/3.5/ASS_Tags.md b/content/en/docs/3.5/ASS_Tags.md new file mode 100644 index 000000000..ed19117f0 --- /dev/null +++ b/content/en/docs/3.5/ASS_Tags.md @@ -0,0 +1,1059 @@ +--- +title: ASS Override Tags +menu: + docs-3.5: + parent: typesetting +weight: 4400 +aliases: + - /docs/3.5/ASS_Tags/ +--- + +The following is a list of every tag supported by the Advanced Substation +Alpha format. This is basically a detailed version of ass-quickref.txt. See +the [tutorial]({{< relref "Visual_Typesetting" >}}) for an introduction to typesetting, +using some basic tags. + +## Special characters + +The following tags are written in the middle of the text, and not inside +override blocks (i.e. not between { and }). + +{{}}\\n{{}} +Insert a forced line break, but only when in wrapping mode 2. (See +[the \\q tag]({{< relref "ASS_Tags#\q" >}})). Note that this is a lowercase n. + +In all other wrapping modes, this is replaced by a regular space. This is +rarely (if ever) actually useful. If you're not sure whether you want this or +\\N, you probably want \\N. + +{{}}\\N{{}} +Insert a forced line break, regardless of wrapping mode. Note that this is an +uppercase N. + +{{}}\\h{{}} +Insert a non-breaking "hard" space. The line will never break automatically +right before or after a hard space, and hard spaces are not folded when they +appear at the start or end of a displayed line. + +## Override tags + +Override tags must appear within override blocks, which begin with { and end +with }. Any unrecognized text within override blocks is silently ignored, so +they are also commonly used for inline comments. Mixing comments and override +tags in the same override block is not recommended. + +Tags fall into two general categories: those which set a property of the line +itself, and those which modifiy only the text following them. `\pos`, `\move`, +`\clip`, `\iclip`, `\org`, `\fade` and `\fad` are those in the first category; +all others are in the second. Tags in the first category should appear at most +once in a line, and where in the line they appear is unimportant. In addition, +some of them are mutally exclusive: `\pos` and `\move`; `\clip` and `\iclip`; +`\fad` and `\fade`. The result of inluding multiple instances of these tags or +mutally exclusive tags will vary between renderers and is not recommended. + +Tags in the second category modify all text after the tag until the end of the +line or until the property is re-overridden by another tag. + +Override tags always follow the same form: They start with a backslash \\ +character, then a name, and after the name the parameter to the tag. If the +parameter is omitted, the default value from the line's style is used. + +Some tags are "complex" and take more than one parameter. In these cases, +parameters are put inside parentheses with commas between the parameters. + +**Note on typography:** +On this page, everything written in _italics_ with `<` angle brackets `>` +around it is a parameter and you must enter a value instead of it. The angle +brackets are not part of the value you should enter. Use the examples as a +guide to how the tags should be entered. In general, the same rules apply to +all tags in how they look. + +{{}} +\\i1 +\\i0 +{{}} +Switch _italics_ text on or off. Use `\i1` to enable italics for the following +text and `\i0` to disable italics again. + +{{}} +\\b1 +\\b0 +\\b\ +{{}} +Switch **boldface** text on or off. Use `\b1` to enable boldface for the +following text and `\b0` to disable boldface again. + +The \\b\ form allows you to specify an +explicit weight to use. Note that most fonts only support one or two weights +so you rarely need to use this. Font weights are multiples of 100, such that +100 is the lowest, 400 is "normal", 700 is "bold" and 900 is the heaviest. + +{{}} + +```ass +I am {\b1}not{\b0} amused. +``` + +The word "not" is written in boldface. +{{}} + +{{}} + +```ass +{\b100}How {\b300}bold {\b500}can {\b700}you {\b900}get? +``` + +The words are written with increasingly greater weight. Note that most fonts +do not have more than one or two different weights and you will only be able +to see "not bold" and "bold" in that case. +{{}} + +{{}} +\\u1 +\\u0 +{{}} +Switch underlined text on or off. Use `\u1` to enable underlining for +the following text and `\u0` to disable underlining again. + +{{}} +\\s1 +\\s0 +{{}} +Switch striked out text on or off. Use `\s1` to enable strikeout for +the following text and `\s0` to disable strikeout again. + +{{}}\\bord\{{}} +Change the width of the border around the text. Set the size to 0 (zero) to +disable the border entirely. + +If "scale border and shadow" (see [script properties]({{< relref "Properties" >}})) is +enabled, the value is given in script resolution pixels, otherwise it is given +in video resolution pixels (which means the border thickness will vary +depending on the resolution of the video on which the subtitles are rendered.) + +The value is not limited to whole integer pixels and can have decimal places. +Border width cannot be negative. + +{{}} + +```plaintext +\bord0 +``` + +Disable border entirely. +{{}} +{{}} + +```plaintext +\bord3.7 +``` + +Set the border width to 3.7 pixels +{{}} + +{{}} +\\xbord\ +\\ybord\ +{{}} +Use the `\xbord` `\ybord` tags to set the border size in X and Y direction +separately. This can be useful for correcting the border size for anamorphic +rendering of subtitles. + +Note that if you use `\bord` after `\xbord` or `\ybord` on a line, it will +override both of them. + +You can set the border width to 0 (zero) in one of the directions to entirely +disable border in that direction. + +{{}}\\shad\{{}} +Set the distance from the text to position the shadow. Set the depth to 0 +(zero) to disable shadow entirely. Works similar to [\\bord]({{< relref "ASS_Tags#\bord" >}}). + +The shadow distance can not be negative with this tag. + +{{}} +\\xshad\ +\\yshad\ +{{}} +Set the distance from the text to position the shadow at, with X and Y +position set separately. Shadow is only disabled if both X and Y distance is +0\. + +Note that unlike \\shad, you can set the distance negative with these tags to +position the shadow to the top or left of the text. + +{{}} +\\be0 +\\be1 +\\be\ +{{}} +Enable or disable a subtle softening-effect for the edges of the text. The +effect isn't always very visible, but it can in some cases make the text look +better. It is usually more visible at smaller text sizes. + +Be aware that this tag blurs the _edges_ of the text, not everything. This +means that if the text has a border (set with [\\bord]({{< relref "ASS_Tags#\bord" >}})) the +border will be blurred, but if there is no border, the main text will be +blurred instead. + +In the extended version, _strength_ is the number of times to apply the +regular effect. Note that at high values the effect de-generates into +nothingness, and generally isn't very useful. For strong blurs, `\blur` is +generally more useful as a result. The _strength_ must be an integer number. + +Use of `\be` in new subtitles is discouraged since it does not scale correctly +with the frame size. `\blur` should be used instead. + +{{}}\\blur\{{}} +In general, this has the same function as the [`\be`]({{< relref "ASS_Tags#\be" >}}) tag, but +uses a more advanced algorithm that looks better at high strengths. Unlike +`\be`, the _strength_ can be non-integer here. Set _strength_ to 0 (zero) to +disable the effect. Be careful, setting _strength_ too high can take a lot of +CPU time to render. + +Be aware that this tag blurs the _edges_ of the text, not everything. This +means that if the text has a border (set with [`\bord`]({{< relref "ASS_Tags#\bord" >}})) the +border will be blurred, but if there is no border, the main text will be +blurred instead. + +{{}}\\fn\{{}} +Set the font face to use for the following text. There should be no space +between `\fn` and the font name, and you should not put parentheses or similar +around the font name either. + +{{}} + +```plaintext +\fnArial +``` + +The text following this tag will be in Arial font. +{{}} +{{}} + +```plaintext +\fnTimes New Roman +``` + +The text following this tag will be in Times New Roman font. +{{}} + +{{}}\\fs\{{}} +Set the size of the font. The size specified is the height in script pixels, +so at font size 40 one line of text is 40 pixels tall. (Technical note: it's +really typographic (desktop publishing) points, not script pixels, but since +the rendering is always done at 72 DPI (as per the de facto standard), one +point ends up being exactly equal to one script resolution pixel.) + +You can only specify integer font sizes. + +{{}} + +```plaintext +\fs10 +``` + +The following text will use a size 10 font. +{{}} + +{{}} +\\fscx\ +\\fscy\ +{{}} +Adjust the size of the text in X (`\fscx` or Y (`\fscy`) direction. The +_scale_ given is in percent, so 100 means "original size". + +This is not the same as setting the font size, as setting the size is subject +to [font hinting](https://en.wikipedia.org/wiki/Font_hinting) while scaling the +text modifies the text shape after hinting. As a result, this should always be +used with `\t` rather than `\fs`, as animating changing font hinting is very +rarely desirable. + +These tags also affect [vector drawings]({{< relref "ASS_Tags#drawing-commands" >}}). + +You can use font scaling to correct for anamorphic rendering and to specify +text size more precisely than with [\\fs]({{< relref "ASS_Tags#\fs" >}}). + +Note that older versions of VSFitler will truncate non-integer scales. + +{{}} + +```plaintext +\fscx150 +``` + +Make the text 50% wider than normal. +{{}} +{{}} + +```plaintext +\fscy50 +``` + +Make the text half height. +{{}} +{{}} + +```plaintext +\fscx200\fscy200 +``` + +Make the text double size. +{{}} + +{{}}\\fsp\{{}} +Changes the spacing between the individual letters in the text. You can use +this to spread the text more out visually. The _spacing_ is given in script +resolution pixels. + +Spacing can be negative and can have decimals. + +{{}} +\\frx\ +\\fry\ +\\frz\ +\\fr\ +{{}} +Rotates the text along the X, Y or Z axis. The `\fr` tag is a shortcut for `\frz`. + +- The **X axis** runs horizontally on the screen. Rotating on it (with + positive values) causes an effect where the top of the text moves farther + "into" the screen while the bottom moves "out" of the screen. +- The **Y axis** runs vertically on the screen. Rotating on it (with positive + values) causes the text to rotate so that the left moves "outside" the + screen, when the right moves "into" the screen. +- The **Z axis** runs perpendicular to the screen. Rotating on it (with + positive values) causes the text to rotate in 2D, counterclockwise (as + standard for degrees). + +The rotation _amount_ is given in mathematical degrees, such that 360 degrees +is a full rotation, and rotating any multiple of 360 is the same as not +rotating. It is legal to specify negative rotation amounts, as well as amounts +larger than 360 degrees. + +The rotation is performed around the subtitle line origin point, this is +described with the [\\org]({{< relref "ASS_Tags#\org" >}}) tag. + +These tags also affect [vector drawings]({{< relref "ASS_Tags#drawing-commands" >}}). + +{{}} + +```plaintext +\frx45 +``` + +Rotate the text 45 degrees on the X axis. +{{}} +{{}} + +```plaintext +\fry-45 +``` + +Rotate the text 45 degrees in opposite direction on the Y axis. +{{}} +{{}} + +```plaintext +\frz180 +``` + +Rotate the text 180 degrees on the Z axis, making it upside-down. +{{}} +{{}} +The following two rotations produce the same result: + +```plaintext +\frz-30 +\frz330 +``` + +This is because 330 degrees is 30 degrees less than a full rotation of 360 degrees. +{{}} +{{}} + +```plaintext +\t(\frz3600) +``` + +Perform an animation where the text performs 10 full revolutions on the Z axis. Also see the [\\t]({{< relref "ASS_Tags#\t" >}}) tag. +{{}} +{{}} +The following screenshots illustrate the effect of rotating on the different axes: + +![Fr_sample01](/img/3.2/Fr_sample01.jpg) + +![Fr_sample02](/img/3.2/Fr_sample02.jpg) + +![Fr_sample03](/img/3.2/Fr_sample03.jpg) +{{}} + +{{}} +\\fax\ +\\fay\ +{{}} +Perform a shearing (perspective distortion) transformation of the text. A +_factor_ of 0 (zero) means no distortion. + +Usually _factor_ will be a small number; values outside the range -2 to 2 are +unlikely to have desireable results. + +Shearing is performed after rotation, on the rotated coordinates. The +coordinate system used for shearing is not affected by the [rotation origin]({{< relref "ASS_Tags#\org" >}}). + +{{}} +![shearing](/img/3.2/shearing.png) +{{}} + +{{}}\\fe\{{}} +Overrides the `Encoding` value of the style. +This is rarely ever useful or a good idea and should thus be avoided. +See the [style docs]({{< relref "Styles#the-style-editor" >}}) for more details. + +{{}} +\\c&H\\\& +\\1c&H\\\& +\\2c&H\\\& +\\3c&H\\\& +\\4c&H\\\& +{{}} +Set the color of the following text. The `\c` tag is an abbreviation of `\1c`. + +- `\1c` sets the primary fill color. +- `\2c` sets the secondary fill color. This is only used for pre-highlight in + standard karaoke. +- `\3c` sets the border color. +- `\4c` sets the shadow color. + +The color codes are given in +[hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) in Blue Green Red +order. Note that this is the opposite order of HTML color codes. Color codes +must always start with `&H` and end with `&`. + +The Pick Color toolbar buttons ![pick-color-toolbar-buttons](/img/3.2/pick-color-toolbar-buttons.png) can +assist in picking colors and entering the color codes. + +{{}} +\\alpha&H\ +\\1a&H\ +\\2a&H\ +\\3a&H\ +\\4a&H\ +{{}} +Set the alpha (transparency) of the text. + +- `\alpha` sets the alpha of all components at once. +- `\1a` sets the primary fill alpha. +- `\2a` sets the secondary fill alpha. This is only used for pre-highlight in + standard karaoke. +- `\3a` sets the border alpha. +- `\4a` sets the shadow alpha. + +An alpha of 00 (zero) means opaque/fully visible, and an alpha of FF (ie. 255 +in decimal) is fully transparent/invisible. + +{{}} + +```plaintext +\alpha&H80& +``` + +Set the alpha of all components to hexadecimal 80, decimal 128, making the +text 50% transparent in general. +{{}} +{{}} + +```plaintext +\1a&HFF& +``` + +Set the primary fill alpha to hexadecimal FF, decimal 255, making it invisible +and effectively leaving only the border and shadow. +{{}} + +{{}}\\an\{{}} +Specify the alignment of the line. The alignment specifies the position of the +line when no [position override]({{< relref "ASS_Tags#\pos" >}}) or +[movement]({{< relref "ASS_Tags#\move" >}}) is in effect, and otherwise specifies the +anchor point of positioning and rotation. + +The `\an` tag uses "numpad" values for the _pos_, ie. the alignment values +correspond to the positions of the digits on the numeric keypad on a regular +keyboard: + +1. Bottom left +1. Bottom center +1. Bottom right +1. Middle left +1. Middle center +1. Middle right +1. Top left +1. Top center +1. Top right + +{{}}\\a\{{}} +Specify the alignment of the line using legacy alignment codes from SubStation +Alpha. This tag is supported but considered deprecated; you should usually use +`\an` in new scripts instead, as it is more intuitive. + +The exception is that `\a6` should be used for lazy sign translating, because +if you're going to be lazy you should do it right and save the extra character. + +Calculate _pos_ as follows: Use 1 for left-alignment, 2 for center alignment +and 3 for right-alignment. If you want sub-titles you're done. To get +top-titles, add 4 to the number, to get mid-titles add 8 to the number: + +- 1: Bottom left +- 2: Bottom center +- 3: Bottom right +- 5: Top left +- 6: Top center +- 7: Top right +- 9: Middle left +- 10: Middle center +- 11: Middle right + +{{}} +\\k\ +\\K\ +\\kf\ +\\ko\ +\\kt\ +{{}} + +> _Please note that these tags alone only create some very specific effects +> and all other effects are created with a combination of multiple different +> tags._ + +The `\k` family of tags mark up subtitles for karaoke effects by specifying +the duration of each syllable. You place a `\k` tag before each syllable in +the line. + +The _duration_ is given in centiseconds, ie. a _duration_ of 100 is equivalent +to 1 second. You generally don't enter `\k` tags manually but rather use +karaoke timing tools such as [Aegisub's karaoke mode]({{< relref "Tutorials#karaoke-timing" >}}). + +The different `\k` tags create various effects: + +- `\k`: Before highlight, the syllable is filled with the secondary color and + alpha. When the syllable starts, the fill is instantly changed to use + primary color and alpha. +- `\K` and `\kf`: These two are identical. Note that `\K` is an uppercase K + and is different from lowercase `\k`. The syllable fill starts out secondary + color, when the syllable starts, the fill changes from secondary to primary + with a sweep from left to right, so the sweep ends when the syllable time is + over. +- `\ko`: Similar to `\k`, except that before highlight, the border/outline of + the syllable is removed, and appears instantly when the syllable starts. + +> _Note: The `\kt` tag is not yet supported by all Aegisub-internal tools +> and external scripts may also not properly handle it._ + +Additionally the `\kt` tag sets the start time of the next karaoke syllable +relative to the event’s start. Without `\kt` each syllable start is implicitly +determined as the sum of all preceding syllable’s duration. + +{{}}\\q\