Hi
I want to include ascii art in a function documentation which should
look as follow:
,----
| +------+------+------+
| | 1/16 | 1/16 | 1/16 |
| +------+------+------+
| | 1/16 | 8/16 | 1/16 |
| +------+------+------+
| | 1/16 | 1/16 | 1/16 |
| +------+------+------+
`----
to keep the monospaced font even in html, I decided to use \code{}:
,----
| \code{+------+------+------+}
|
| \code{| 1/16 | 1/16 | 1/16 |}
|
| \code{+------+------+------+}
|
| \code{| 1/16 | 8/16 | 1/16 |}
|
| \code{+------+------+------+}
|
| \code{| 1/16 | 1/16 | 1/16 |}
|
| \code{+------+------+------+}
`----
But the result was an empty line between each text:
,----
| '+------+------+------+'
|
| '| 1/16 | 1/16 | 1/16 |'
|
| '+------+------+------+'
|
| '| 1/16 | 8/16 | 1/16 |'
|
| '+------+------+------+'
|
| '| 1/16 | 1/16 | 1/16 |'
|
| '+------+------+------+'
`----
and when no empty lines were included obviously put everything behind
each other.
My question:
Is there a way that I can achieve the ASCII art as shown above? Is there
a way of having a \linebreak which does not insert a new line?
Thanks,
Rainer
--
Rainer M. Krug
email: RMKrug<at>gmail<dot>com
Untested, but did you try wrapping the whole thing in a single code block:
\code{
all
the
things
}
Sarah
On Thu, Sep 5, 2013 at 10:10 AM, Rainer M Krug <Rainer at krugs.de>
wrote:> Hi
>
> I want to include ascii art in a function documentation which should
> look as follow:
>
> ,----
> | +------+------+------+
> | | 1/16 | 1/16 | 1/16 |
> | +------+------+------+
> | | 1/16 | 8/16 | 1/16 |
> | +------+------+------+
> | | 1/16 | 1/16 | 1/16 |
> | +------+------+------+
> `----
>
>
> to keep the monospaced font even in html, I decided to use \code{}:
>
> ,----
> | \code{+------+------+------+}
> |
> | \code{| 1/16 | 1/16 | 1/16 |}
> |
> | \code{+------+------+------+}
> |
> | \code{| 1/16 | 8/16 | 1/16 |}
> |
> | \code{+------+------+------+}
> |
> | \code{| 1/16 | 1/16 | 1/16 |}
> |
> | \code{+------+------+------+}
> `----
>
> But the result was an empty line between each text:
>
> ,----
> | '+------+------+------+'
> |
> | '| 1/16 | 1/16 | 1/16 |'
> |
> | '+------+------+------+'
> |
> | '| 1/16 | 8/16 | 1/16 |'
> |
> | '+------+------+------+'
> |
> | '| 1/16 | 1/16 | 1/16 |'
> |
> | '+------+------+------+'
> `----
>
> and when no empty lines were included obviously put everything behind
> each other.
>
> My question:
>
> Is there a way that I can achieve the ASCII art as shown above? Is there
> a way of having a \linebreak which does not insert a new line?
>
> Thanks,
>
> Rainer
>
>
> --
--
Sarah Goslee
http://www.functionaldiversity.org
On 09/05/2013 09:10 AM, Rainer M Krug wrote:> want to include ascii art in a function documentation which should > look as follow: > > ,---- > | +------+------+------+ > | | 1/16 | 1/16 | 1/16 | > | +------+------+------+ > | | 1/16 | 8/16 | 1/16 | > | +------+------+------+ > | | 1/16 | 1/16 | 1/16 | > | +------+------+------+ > `---- > > > to keep the monospaced font even in html, I decided to use \code{}:Wouldn't it be best to use the relatively new \figure markup with alternate text? http://cran.r-project.org/doc/manuals/R-exts.html#Figures Regards, Brian -- Brian G. Peterson http://braverock.com/brian/ Ph: 773-459-4973 IM: bgpbraverock