Help request: how to enter expressions in to forum posts without them being mangled by Markdown?

My post:

https://www.circuitlab.com/forums/support/topic/cep26zh7/feature-request-tanh_x-function-please/#comment_1537

is an example of how Markdown interprets "*" characters in an expression as text formatting syntax and so corrupts the meaning of the expression.

So that expressions can be shared directly via the forums - without having to drop into and out of user circuits - is there a way to enter expressions to stop this happening?

I've tried enclosing expressions in a variety of double and single quotes and brackets etc:

"ABC" 'ABC' [ABC] {ABC} (ABC) $A*B*C$ /ABC/

by signality
April 15, 2012

Try enclosing your expressions in backticks (the little thing above ~ on the keyboard, like

`0.5*TANH(V(A)*V(B))`

which in the middle of a paragraph will show up like this 0.5*TANH(V(A)*V(B)) without any formatting applied to that block.

by mrobbins
April 15, 2012

Got it!

And enclosed text copied from a forum post automatically excludes the enclosing backticks.

Many thanks Mike.

(Note for UK keyboard users: the back tick is the key immediately to the left of the 1 key.)

by signality
April 15, 2012

Another way to do this (and the way that @mrobbins demonstrated the backticks) is to indent the expression by four spaces, like this:

Normal paragraph followed by blank line

    Expression indented by four spaces

Following paragraph preceded by blank line

You can probably guess that I had to apply this method to generate the above example.

In normal Markdown, this is known as a "code block" while the backticks method is known as "inline code".

by KevinVermeer
May 16, 2012

Just added this info to the formatting guide (linked right next to every "Preview comment" button).

by mrobbins
May 16, 2012

Post a Reply

Please sign in or create an account to comment.

Go Ad-Free. Activate your CircuitLab membership. No more ads. Save unlimited circuits. Run unlimited simulations.

About CircuitLab

CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.