Some fun LaTeX commands
by sonone, Apr 6, 2020, 6:05 PM
Here are some fun
commands I like to use:





\newcommand{<your command>}[<number of inputs>]{<code for your command>}
This command can be useful if you are repeating the same thing over and over again. Here it is explained:- The command you want to create will be like \something or \confrac etc.
- Next the number of inputs. If the number of inputs is 3, the command when you use it will look like \something{}{}{} or \confrac{}{}{}.
- No you get to code your new command! Is the number of inputs is 3, you should have a #1, #2, and #3
where you want each input to go
An example is(click to see code).
- Another, more known, pretty useful, is
\stackrel{<top>}{<bottom>}
If you want to stack things, replace <top> with what you want on top, and <bottom> with what you want on the bottom. Example:.
- A simple fun one is $\wr$ (
), because it looks like steam. I also like $\odot $ (
), becuse it looks like an eye ball.
- And finally, my favorite of all
commands,
\hspace{<space>}{<what you want to move>}
This is a simple command that can move the second input by the first input. You can use mm or pt. The thing I like best is that if you put a negative value, it moves the second input back! Here is a code that will move <in> 2pt back: $\hspace{-2pt}{<in>}$.




This post has been edited 1 time. Last edited by sonone, Apr 6, 2020, 7:25 PM
Reason: missing >
Reason: missing >