It’s a personal edition of Aegisub Override Tags Documentation. This document is helpful to amateur and experienced, and also detailed enough for novice to build a comprehension to the tags. Also, if you are an expert, the documents will also have a great help in understanding why it is so. So you won’t have to spend so many time in debugging or reviewing the official documents everytime you use them.
Before you read, I’d like to state that the tag is highly associated with computer programming, though it’s possible to be used without any programming skills. Thus if there’s anything caught you stucked, please skip it. Every paragraph is kind of independent that a questioning paragraph won’t influence the understanding of other parts.
If you know nothing about programming and are a completely freshman, I highly recommand you to read Official Documents and watch some Tutorial videoes first.
If you are a programmer or have some basic knowlege in programming, it will be easy for you to understand. So you only need to take a quick look of this document and use the API once you need to have a look-up.
If you are an experienced subtitle producer with little understanding in programming area, congratulations! This tutorial is tailored for you! Or if you are already an expert in Aegisub and want to sharpen your comprehension, this tutorial will also leave a benefit for you.
Thus, though I will include some tables like API as well, the introduction will be with some comprehensive samples and combining skills. So please make sure you already have a basic knowledge of Aegisub and those tags before your reading, which would give you a better experience.
In conclusion, this documentation is focused on theoric comprehension, customized for those who have basic knowledge of Aegisub, and interest in learning more about tags and related programming theories.
This documentation have both Chinese and English version together. Though the explanation styles and words will be different, the concept and theories are the same. Besides, the exteral link will be different (according to the language). It will be divided into two posts after completely finish. There are three major reason for two version: Firstly, it’s aimed to be accurate and no ambiguity; Secondly, it’s used to help the writer to manage the documenting thread to be clear and perfect, it’s also a training of translating skills. Third, it’s looking forward to more subtitle amateurs to take a look of it, though whether it’s helpful is on you, the readers.
The document have some graphs using Mermaid to create, which could be displayed in Typora. And as follows, there’s a web picture using SMMS as photobed, with the auto-upload service powered by PicGo. Thus, you have no need to read the “rediculous” code blocks, but may help if the picture is not loaded currectly.
The documentation will mainly use two kinds of notation form as follow
<some-notes>: e.g.\fs<font-size>, please replace the full text including <> with the content, like \fs80. In contrast with the official documentation, the note will used full natural languages. Though it will be complex comparing to the symbols, but will be more comprehensive.
: Within every blocks, there will be a api table at the top, with examples and detailed explanation following at most cases. Because of the relationship and contrast will be complex, some significant notes will be also in the tables.
Override is a programming terminology, which originally means the sub class rewrite the function in the superclass or interface, so that every instance(object) under the sub class, would prefer to excute the override funtion, instead of the original function declared in the super class. Actually, you don’t have to know it so well before your journey in using override tags. In fact, to be simple but not accurate, we can state that each style of every subtitle lines (especailly refers to dialogue), have a 3-layer struture of its presentation in vision.
1 2 3 4 5
graph TD;
A[Word] --> |+/bandled with|B[Font Style] B --> |+/A special kind of|C[Override Tags] C --> |Override|B
A[字幕] --> |+/绑定|B[样式] B --> |+/特殊形式|C[特效标签] C --> |重载|B
Break 空白
Line Autobreaking Style 自动换行模式
Interpretation 名词解释
Color Notation 颜色注记
A color notation is used to present a RGB color, and in Aegisub, it should be written as &H<6-digits_color_code>&. A 6-digit code, which always be with a prefix of #, is a standard code to discribe any of the RGB color, which is widely used in web, Photoshop and etc. It is in a format of RRGGBB which has a couple of hexical numbers used for a 8-bit color discription.
RRGGBBmeans we use 2-digits of hexical humbers to discribe a kind of color(Red, Green or Blue), then combine them together with each color in the range of 0-255, which actually fit in the range of a 8-bit RGB color (8 digits in binary).
For instance, a color code F3E109means that Red = F3(Hex) = 243(Dec), Green = E1(Hex) = 225(Dec), Blue = 09(Hex) = 9(Dec), represent a RGB color of (R,G,B) = (243,225,9), it’s gold!
In most case, color notation is capital insensitive, which means FFACDBandffacdbare actually the same.
Note: Though unstandard color code still work, such as &HFF0000&(Red) could be written as &FF0000&,FF0000,Hffand evenff, I personally not recommand for the abbreviated form because it’s difficult for others to tell.
As we can see, Aegisub’s parser has some interesting patterns:
Weakly Typed Language
The tag parser only parse the value it could recognize, but not should accept. Because of that, it has a weak grammar and allows all kinds of grammar mistakes without runtime error, for it will automatically convert it into nil(NULL/None/Void/Invaild) or 0(No Value/0).
So if you declared the color like &H#&, it will give a color of black, which refers to 0.
Left-Association(Priority)
In another word, it will read from left to right, so the code on the right share higher priority than the left (because it will overwrite the attribute when it is parsed). So that’s why FF equals to FF0000 instead of 0000FF. It’s the same for inline key words and override tags.
If you declared twice, it will accept the last(right) one instead of the first(left) one.
1-Parameter Inclusity
Although it’s hard for those programming freshman to comprehend, it’s neccessary to tell somthing about parameter so that it will be easier for amateurs to remember those format. The law is that every tag has only one parameter, or parameter tuple(list). So for those tags that need multi-domains, we need a () to make them together as a tuple, otherwise without it.
So a simple color tag should be like \1c&HFF0000&without(), or it will return black as 0, but the various color need to be declared as \1vc(&HFF0000&,&HFF0000&,&HFF0000&,&HFF0000&).
The dot size contributes to the frame size. For instance, a font in size of 80 in 1080P video script could be as large as the one in size of 60 whose script is in 720P size. Besides, the size is limited which means it could not be extremely large.
Element Size 元素大小
Code
\fsc<size(%)>
Discription
Scale of line element.
Fx Scope
Syllable
Library Affiliated
VSFilterMod
Color 颜色
If you forget about color_notation, you can return to paragraph Color Notation before read.