I have some problems making this text look good: enter image description here

This is the LaTeX code I have right now:

        alert\ http\ \$EXTERNAL\_NET\ any\ \rightarrow \$HOME\_NET\ any\ 
        (msg:"Hacker\ is\ here!";\ \\ dsize:>100;\  type:"response";\ 
        content:"Bootstrap";\ sid:123;)

I would appreciate all help to try to make this look better. I know I can't get it on one line but it does not have to be an equation either so the 3.1 is not needed. But maybe you have some ideas? I also don't like the spaces that are automatically added in an equation before the colons.

  • To help future users with the same problem find your question, please use more informative titles for your posts which describe the actual problem and not just some generic "make something look good" – samcarter_is_at_topanswers.xyz Mar 15 '19 at 14:12

I like this way

\text{alert http }\$EXTERNAL\_NET\ any\rightarrow \$HOME\_NET\ any\\
\qquad\begin{array}{l@{\ }cl}
    msg&:&\text{``Hacker is here!''};\\

enter image description here

Note: be decisive. Choose the best of your answers to tick the accept mark. In your previous question, I see that you tick all answers, but you can only accept one of them! (But the current accepted answer is good, I think.)

| improve this answer | |
  • 1
    Hey! This looks perfect. Thank you very much for the help @JouleV – Johan Mar 15 '19 at 12:21
  • @Johan You are welcome! – user156344 Mar 15 '19 at 12:21

You should take your time to think about a consistent format for such objects.

Here's an attempt. Remember to define macros for different types of objects, so that it will be easy to change format if you (or other people) so wish.




alert http \envvar{EXTERNAL\_NET} any \\
\qquad $\rightarrow$ \envvar{HOME\_NET} any (
  \begin{tabular}[t]{@{}l@{ }c@{ }l@{}}
  msg     &:& \tdesc{Hacker is here!}; \\
  dsize   &:& $>100$; \\
  type    &:& \tdesc{response}; \\
  content &:& \tdesc{Bootstrap}; \\
  sid     &:& $123$; )


enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.