# Simple documentation question

**URL:** https://discourse.julialang.org/t/simple-documentation-question/41445
**Category:** General Usage
**Created:** [June 15, 2020, 2:56pm UTC](https://discourse.julialang.org/t/simple-documentation-question/41445 "2020-06-15T14:56:15Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Ferran\_Mazzanti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ferran_mazzanti/32/7458_2.png) [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)
#### Post date: [June 15, 2020, 2:56pm UTC](https://discourse.julialang.org/t/simple-documentation-question/41445/1 "2020-06-15T14:56:15Z")

</div>

Hi,  
this is quite dumb ☹ I’m trying to document a function that is called

```julia
CD_k_CUDA

```

and I want to document it. I write a doc string like

```julia
"""
CD_k_CUDA(x,W) 
...
"""
function CD_k_CUDA(x,W)

```

but when i try to do  
?CD\_k\_CUDA  
the underscore \_ signs do not appear, and k shows up in italic. How would you make the two \_ appear ?

Thanks a lot,

Ferran.

---

<div class="post-metadata">

### Author: ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)
#### Post date: [June 15, 2020, 3:05pm UTC](https://discourse.julialang.org/t/simple-documentation-question/41445/2 "2020-06-15T15:05:51Z")

</div>

Indent the line that bears the name of the function, such that the Markdown parser takes it as a line of code:

```julia
"""
    CD_k_CUDA(x,W) 
...
"""
function CD_k_CUDA(x,W)

```

More recommendations about how to write the docstrings here:  
[https://docs.julialang.org/en/v1/manual/documentation/index.html](https://docs.julialang.org/en/v1/manual/documentation/index.html)

Also, as a matter of style: normally function names are not written with capital letters.

---

<div class="post-metadata">

### Author: ![Ferran\_Mazzanti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ferran_mazzanti/32/7458_2.png) [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)
#### Post date: [June 15, 2020, 3:49pm UTC](https://discourse.julialang.org/t/simple-documentation-question/41445/3 "2020-06-15T15:49:51Z")

</div>

Thaks, I’ll try that.  
Regarding styles, beauty is in the eye of the beholder. I don’t like the Julia standards 🙂  
Best,  
Ferran.

---

<div class="post-metadata">

### Author: ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)
#### Post date: [June 15, 2020, 5:34pm UTC](https://discourse.julialang.org/t/simple-documentation-question/41445/4 "2020-06-15T17:34:54Z")

</div>

The other option is to do:

```julia
CD\_k\_CUDA(x,W)

```

The slash will keep the underscores from identifying as italics.

---

<div class="post-metadata">

### Author: ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)
#### Post date: [June 15, 2020, 5:36pm UTC](https://discourse.julialang.org/t/simple-documentation-question/41445/5 "2020-06-15T17:36:58Z")

</div>

While I agree on the fact that _beauty is in the eye of the beholder_ and also have some criticism of the Julia style guide, I yet think you are a little confused. A style guide is (almost) never created because someone is trying to impose some notion of beauty. They are created for consistency and because some conventions have value if everyone follow them and some conventions have inherent value/utility.

---

<div class="post-metadata">

### Author: ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)
#### Post date: [June 15, 2020, 6:15pm UTC](https://discourse.julialang.org/t/simple-documentation-question/41445/6 "2020-06-15T18:15:44Z")

</div>

That’s not right. Writing `CD\_k\_CUDA(x,W)` in the docstring yields:

```julia
ERROR: LoadError: syntax: invalid escape sequence

```

---

<div class="post-metadata">

### Author: ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)
#### Post date: [June 15, 2020, 6:16pm UTC](https://discourse.julialang.org/t/simple-documentation-question/41445/7 "2020-06-15T18:16:30Z")

</div>

:-/ okay try two slashes:

```julia
CD\\_k\\_CUDA(x,W)

```

How annoying…

---

<div class="post-metadata">

### Author: ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)
#### Post date: [June 15, 2020, 6:44pm UTC](https://discourse.julialang.org/t/simple-documentation-question/41445/8 "2020-06-15T18:44:37Z")

</div>

You probably do want it to end up formatted like code, though. In places where you don’t indent by 4 spaces or have larger code blocks fenced with `````s, I’d use inline markdown backticks: ``CD_k_CUDA(x,W)``.
