1e41f4b71Sopenharmony_ci# Writing Instructions
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ciThis document describes the writing specifications for contributing OpenHarmony documents.
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ci## Naming Specifications
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ciTo submit a new document, create a new  **.md**  file in the  **doc**  directory of the project code on Gitee. The file name must be in the  _xxx-xxx_**.md**  format.
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ciFor example, a document that describes writing specifications can be named  **write-standard.md**.
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ci## Content Specifications
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ciThe content should be concise and intuitive. Introductory documents describe principles, architecture, and design ideas in a concise manner, and operation documents describe key steps to help other developers. Chinese is preferred. It is recommended that both Chinese and English be supported. The OpenHarmony will be updated continuously to ensure the synchronization between Chinese and English.
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ci**Title**
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ciIt is recommended that the title have no more than three levels.
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ciUse the verb-object structure in operation documents if possible, and the execution subject should be clearly described. \(e.g., Apply for Privilege\)
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci**Body**
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ciThe following shows the structure of an  **operation document**  for porting.
24e41f4b71Sopenharmony_ci
25e41f4b71Sopenharmony_ci-   Purpose \(Briefly describe the purpose of the operation, for example, the model of the board to which the port is to be migrated.\)
26e41f4b71Sopenharmony_ci
27e41f4b71Sopenharmony_ci-   Hardware and software requirements
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ci-   Detailed steps
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci-   Result verification
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ci    Writing requirements:
34e41f4b71Sopenharmony_ci
35e41f4b71Sopenharmony_ci    -   The APIs used in steps must be described in the available capabilities at the beginning of the document.
36e41f4b71Sopenharmony_ci    -   If an operation is optional, specify the optional conditions.
37e41f4b71Sopenharmony_ci    -   If API calls are required in a step, provide the API, its description, and sample code if any.
38e41f4b71Sopenharmony_ci
39e41f4b71Sopenharmony_ci
40e41f4b71Sopenharmony_ci**Introductory documents**: The development guide of a feature is used as an example to show the document structure.
41e41f4b71Sopenharmony_ci
42e41f4b71Sopenharmony_ci-   Overview \(concepts and principles\)
43e41f4b71Sopenharmony_ci
44e41f4b71Sopenharmony_ci-   Functions \(supported APIs\)
45e41f4b71Sopenharmony_ci
46e41f4b71Sopenharmony_ci-   Development process \(steps of how to use and develop\)
47e41f4b71Sopenharmony_ci
48e41f4b71Sopenharmony_ci-   Programming examples \(sample code\)
49e41f4b71Sopenharmony_ci
50e41f4b71Sopenharmony_ci-   Important notes
51e41f4b71Sopenharmony_ci
52e41f4b71Sopenharmony_ci
53e41f4b71Sopenharmony_ci**Pictures**
54e41f4b71Sopenharmony_ci
55e41f4b71Sopenharmony_ciPictures are stored in the **images**  folder in the directory where the document is stored. For example,
56e41f4b71Sopenharmony_ci
57e41f4b71Sopenharmony_ciPictures used in  **OpenHarmony\_DOCUMENTS/docs/quick-start/writing-instructions.md**  are stored in the following directory:
58e41f4b71Sopenharmony_ci
59e41f4b71Sopenharmony_ci**OpenHarmony\_DOCUMENTS/docs/quick-start/images**
60e41f4b71Sopenharmony_ci
61e41f4b71Sopenharmony_ciUse relative paths to reference pictures in the document.
62e41f4b71Sopenharmony_ci
63e41f4b71Sopenharmony_ci> **CAUTION** 
64e41f4b71Sopenharmony_ci> Use the original pictures to avoid intellectual property infringement risks.
65e41f4b71Sopenharmony_ci
66e41f4b71Sopenharmony_ci-   Pictures are clear and complete. For example, a flowchart has a start and an end.
67e41f4b71Sopenharmony_ci-   The graphics has clear logic and are provided with text descriptions. Do not separate the graphics from the text.
68e41f4b71Sopenharmony_ci-   It is recommended that the image height be about 640 px, the image width be less than or equal to 820 px, the image format be .png, and the image size be less than or equal to 150 KB.
69e41f4b71Sopenharmony_ci-   The text on pictures should be Chinese in Chinese documents and English in English documents.
70e41f4b71Sopenharmony_ci-   It is recommended that pictures be named based on the content. Using only a number is difficult for picture inheritance.
71e41f4b71Sopenharmony_ci
72e41f4b71Sopenharmony_ci> **NOTE:** 
73e41f4b71Sopenharmony_ci> Reference:
74e41f4b71Sopenharmony_ci> !\[\]\(./pic/pic-standard.png\)
75e41f4b71Sopenharmony_ci
76e41f4b71Sopenharmony_ciIf a self-made picture is used, refer to the following figure to configure the color. The format can be  **png**,  **jpg**,  **gif**, and so on.
77e41f4b71Sopenharmony_ci
78e41f4b71Sopenharmony_ci**Figure  1**  Color example
79e41f4b71Sopenharmony_ci
80e41f4b71Sopenharmony_ci![](figures/color.png "color example")
81e41f4b71Sopenharmony_ci
82e41f4b71Sopenharmony_ciFor screenshots, see the requirements below. If you need to highlight key information in the figure, add a red box or text remarks.
83e41f4b71Sopenharmony_ci
84e41f4b71Sopenharmony_ciStroke width: 0.75 pt
85e41f4b71Sopenharmony_ci
86e41f4b71Sopenharmony_ciLine color: CE0E2D
87e41f4b71Sopenharmony_ci
88e41f4b71Sopenharmony_ciChinese font: MicrosoftYaHei
89e41f4b71Sopenharmony_ci
90e41f4b71Sopenharmony_ciEnglish font: Arial
91e41f4b71Sopenharmony_ci
92e41f4b71Sopenharmony_ciFont size: 10 pt
93e41f4b71Sopenharmony_ci
94e41f4b71Sopenharmony_ci**Table**
95e41f4b71Sopenharmony_ci
96e41f4b71Sopenharmony_ciYou can insert a table in  **.md**  documents in the following format:
97e41f4b71Sopenharmony_ci
98e41f4b71Sopenharmony_ciInput
99e41f4b71Sopenharmony_ci
100e41f4b71Sopenharmony_ci```
101e41f4b71Sopenharmony_ci| Tables      | Type          | Note  |
102e41f4b71Sopenharmony_ci| ----------- |:-------------:| -----:|
103e41f4b71Sopenharmony_ci| first       | standard      |  None |
104e41f4b71Sopenharmony_ci| second      | outstanding   |     5 |
105e41f4b71Sopenharmony_ci| third       | inside        |  with |
106e41f4b71Sopenharmony_ci```
107e41f4b71Sopenharmony_ci
108e41f4b71Sopenharmony_ciOutput
109e41f4b71Sopenharmony_ci
110e41f4b71Sopenharmony_ci**Table  1**  Parameters
111e41f4b71Sopenharmony_ci
112e41f4b71Sopenharmony_ci| Tables |    Type     | Note |
113e41f4b71Sopenharmony_ci| ------ | :---------: | ---: |
114e41f4b71Sopenharmony_ci| first  |  standard   | None |
115e41f4b71Sopenharmony_ci| second | outstanding |    5 |
116e41f4b71Sopenharmony_ci| third  |   inside    | with |
117e41f4b71Sopenharmony_ci
118e41f4b71Sopenharmony_ci**Code**
119e41f4b71Sopenharmony_ci
120e41f4b71Sopenharmony_ciThe code example shows how to implement a specific feature. Developers can use the code example to write and debug code. The code requirements are as follows:
121e41f4b71Sopenharmony_ci
122e41f4b71Sopenharmony_ci-   The logic and syntax of the code are correct.
123e41f4b71Sopenharmony_ci-   Describe the return values if any.
124e41f4b71Sopenharmony_ci-   Ensure that key fields are highlighted in bold and that comments are provided for key steps.
125e41f4b71Sopenharmony_ci
126