|
1 | 1 | # [Documentation](@id man-documentation) |
2 | 2 |
|
| 3 | +## Accessing Documentation |
| 4 | + |
| 5 | +Documentation can be accessed at the REPL or in [IJulia](https://github.com/JuliaLang/IJulia.jl) |
| 6 | +by typing `?` followed by the name of a function or macro, and pressing `Enter`. For example, |
| 7 | + |
| 8 | +```julia |
| 9 | +?cos |
| 10 | +?@time |
| 11 | +?r"" |
| 12 | +``` |
| 13 | + |
| 14 | +will show documentation for the relevant function, macro or string macro respectively. Most Julia |
| 15 | +environments provide a way to access documentation directly: |
| 16 | +- [VS Code](https://www.julia-vscode.org/) shows documentation when you hover over a function name. |
| 17 | + You can also use the Julia panel in the sidebar to search for documentation. |
| 18 | +- In [Pluto](https://github.com/fonsp/Pluto.jl), open the "Live Docs" panel on the bottom right. |
| 19 | +- In [Juno](https://junolab.org) using `Ctrl-J, Ctrl-D` will show the documentation for the object |
| 20 | +under the cursor. |
| 21 | + |
| 22 | +## Writing Documentation |
| 23 | + |
3 | 24 | Julia enables package developers and users to document functions, types and other objects easily |
4 | 25 | via a built-in documentation system. |
5 | 26 |
|
@@ -202,21 +223,6 @@ As in the example above, we recommend following some simple conventions when wri |
202 | 223 | material above the header; you can access the full help by adding a '?' |
203 | 224 | at the beginning of the expression (i.e., "??foo" rather than "?foo"). |
204 | 225 |
|
205 | | -## Accessing Documentation |
206 | | - |
207 | | -Documentation can be accessed at the REPL or in [IJulia](https://github.com/JuliaLang/IJulia.jl) |
208 | | -by typing `?` followed by the name of a function or macro, and pressing `Enter`. For example, |
209 | | - |
210 | | -```julia |
211 | | -?cos |
212 | | -?@time |
213 | | -?r"" |
214 | | -``` |
215 | | - |
216 | | -will show documentation for the relevant function, macro or string macro respectively. In |
217 | | -[Juno](https://junolab.org) using `Ctrl-J, Ctrl-D` will show the documentation for the object |
218 | | -under the cursor. |
219 | | - |
220 | 226 | ## Functions & Methods |
221 | 227 |
|
222 | 228 | Functions in Julia may have multiple implementations, known as methods. While it's good practice |
|
0 commit comments