6

This semester I'm attending a course on Algorithms and Data Structures. I will probably have a few questions to post to Computer Science or Mathematics. The slides of my teacher use math symbols such as $\leq$; $\geq$ and $\neq$.

To keep the right indenting I thought I would be using code blocks, but then the math-symbols would not be correctly formatted.

I only know Python and I'd represent the symbols as <= ; >= and !=. But I am wondering if these are universally understood or should I use code blocks which are interupted by math sections using the symbols (e.g. $\leq$)?

How can I correctly represent my pseudo code on ANY suitable SE site?

5
  • 6
    you can also use Unicode symbols in your post, such as ≠ ≡ ≢≣ ≤ ≥ ≦ ≧ ≨ ≩ ≪ ≫≮ ≯ ≰ ≱
    – Marijn
    Oct 1 at 13:36
  • @Marijn that still only works outside of code blocks, right?
    – ilam engl
    Oct 1 at 13:38
  • 3
  • 4
    No, it works everywhere, you might have noticed that I used code formatting in my comment. For code blocks in a post itself it is advised to switch off the coloring with ```none because the highlighter may not understand the symbols, but even that is not necessary.
    – Marijn
    Oct 1 at 13:40
  • 3
    @Marijn wanna turn that into an answer? As this seems to be the only one that might allow me to keep line numbers as shown in my book and slides.
    – ilam engl
    Oct 1 at 14:22
2

MSE cannot speak for "ANY suitable SE site," because how to write questions is fundamentally a per-site issue. If a particular site has a rule about how to write something, you must follow their local policies, regardless of what answers you may get on MSE. We cannot overrule those policies.

Having said that, the symbols <=, >=, and != are extremely widespread in the computing industry, and any experienced person working in software engineering or computer science should understand what they mean. If you prefer, you can also use the Unicode symbols that Marijn suggests in the comments. On the other hand, the two-character symbols are much less common in pure and applied mathematics, so on Math.SE and MathOverflow, it's probably better to use MathJax (LaTeX) formatting instead. If you are unsure which style to use, it's probably best to ask at the per-site meta.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .