2

I like to use the command \LaTeX when I write about latex in a document. Is there a similiar command for SQL?

  • 2
    Welcome to TeX.SE. Usually, it is beste, to present a Minimal Working Example (MWE), to show, what you already have tried yourself. Sometimes a sketch of the desired output is also helpful. – Jan Apr 3 '17 at 8:50
  • @Jan thank you for the warm welcome. Next time I will present an example. – Richard Apr 3 '17 at 9:16
  • 1
    ...I think it's normally just written out, like you've done it here. LaTeX has a fancy logo to show its typesetting power; SQL isn't anything like that. (Maybe it's all-caps because that's the right way to write it? :) ) – Nic Hartley Apr 3 '17 at 13:32
4

If you do not want to print SQL-code, than, there is a simple way to define a command for that task. Just define the macro \sql in your preamble and use it in your document, wherever you like. My simple suggestion:

 \newcommand{\sql}{\textbf{SQL}}

should do the trick, if you are aiming for a boldface SQL-sign. If you want it with---say--- red color, try this

\usepackage{color}
\newcommand{\sql}{\textcolor{red}{SQL}}

Of course, you can combine color with font commands as shown above:

\newcommand{\sql}{\textcolor{red}{\textbf{SQL}}}

Have fun.

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.