Some fun LaTeX commands

by sonone, Apr 6, 2020, 6:05 PM

Here are some fun $\text{\LaTeX}$ 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:
    1. The command you want to create will be like \something or \confrac etc.
    2. Next the number of inputs. If the number of inputs is 3, the command when you use it will look like \something{}{}{} or \confrac{}{}{}.
    3. 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 $\newcommand{\expon}[2]{#1^{#2}} \expon{2}{2}+ \expon{3}{3}=\expon{6}{2}-\expon{5}{1}$ (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: $\stackrel{\odot \odot}{\smile}$.
  • A simple fun one is $\wr$ ($\wr$), because it looks like steam. I also like $\odot $ ($\odot$), becuse it looks like an eye ball.
  • And finally, my favorite of all $\text{\LaTeX}$ 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>}$.
Examples: $$\text{toaster} \to \sum^{\odot\odot}_{\lfloor ~~\lfloor}\hspace{-11pt}{\color{red}{\approx\approx}}$$$$\text{coffee}\to ^\subset \hspace{-5pt}{\stackrel{\wr\wr\wr}{\bigcup}}$$$$\text{bank}\to\widehat{\overline{\underline{\prod\prod\$\prod
\prod}}}$$$$\text{money}\to\huge{\bigcirc\hspace{-8pt}{\$}}$$
This post has been edited 1 time. Last edited by sonone, Apr 6, 2020, 7:25 PM
Reason: missing >

Comment

2 Comments

The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Look what I made with TeXeR:
$$\text{1 Dollar Bill front }\to\boxed{\overline{\underline{\frac{1}{1}\huge{\bigcirc\hspace{-10
pt}{\#}}\cdot{\underline{\underline{\smiley}}}\cdot\huge{\bigcirc\hspace{-8
pt}{\$}}
\frac{1}{1}}}}$$
$$\text{1 Dollar Bill back }\to\boxed{\overline{\underline{\frac{1}{1}\huge{\bigcirc\hspace{-10
pt}{\triangle}}{\underline{\underline{ONE}}}\huge{\bigcirc\hspace{-10
pt}{\triangle}}
\frac{1}{1}}}}$$
$$\text{5 Dollar Bill back }\to\boxed{\overline{\underline{\frac{5}{5}\widehat{\prod\prod\prod}
\frac{5}{5}}}}$$
$$\text{5 Dollar Bill front }\to\boxed{\overline{\underline{\frac{5}{5}\huge{\bigcirc\hspace{-10
pt}{\#}}\cdot{\underline{\underline{\smiley}}}\cdot\huge{\bigcirc\hspace{-8
pt}{\$}}
\frac{5}{5}}}}$$
$$\text{10 Dollar Bill front }\to\boxed{\overline{\underline{\frac{10}{10}\huge{\bigcirc\hspace{-10
pt}{\#}}\cdot{\underline{\underline{\smiley}}}\cdot\huge{\bigcirc\hspace{-8
pt}{\$}}
\frac{10}{10}}}}$$
$$\text{10 Dollar Bill back }\to\boxed{\overline{\underline{\frac{10}{10}\widehat{\prod\prod\prod}
\frac{10}{10}}}}$$
$$\text{20 Dollar Bill front }\to\boxed{\overline{\underline{\frac{20}{20}\huge{\bigcirc\hspace{-10
pt}{\#}}\cdot{\underline{\underline{\smiley}}}\cdot\huge{\bigcirc\hspace{-8
pt}{\$}}
\frac{20}{20}}}}$$
$$\text{20 Dollar Bill back }\to\boxed{\overline{\underline{\frac{20}{20}\widehat{\prod\prod\prod}
\frac{20}{20}}}}$$

by Glenstorm, Jun 9, 2020, 12:41 AM

The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Nice job Glenstorm! Looks really good!

by sonone, Aug 29, 2020, 2:00 PM

Old material is mostly Asymptote, new material is calculator programming

avatar

sonone
Archives
+ April 2023
+ August 2022
+ April 2021
+ August 2020
Shouts
Submit
  • I still exist as well.

    by G.G.Otto, Aug 11, 2023, 2:44 AM

  • hello I'm still here lol

    by player01, Aug 6, 2022, 6:24 PM

  • [REVIVAL] I will start posting more calculator relating posts very soon. Even though school has been busy, I have been programming my calculators a decent amount, so I have a lot to share...

    by sonone, Feb 18, 2022, 10:29 PM

  • wow its been like 2.5 years since geo class

    by pieMax2713, Feb 4, 2022, 8:38 PM

  • @violin21, I've been very busy with school lately and haven't been able to add another lesson. I will when i get a free moment

    by sonone, Aug 19, 2021, 12:45 AM

  • ORZ CODER

    by samrocksnature, Aug 9, 2021, 9:57 PM

  • Could you make more Asymptote lessons on your "How to do Asymptote" blog?

    by violin21, Aug 9, 2021, 7:26 PM

  • You can take it, just C&P the CSS into your CSS area

    by sonone, Apr 17, 2021, 10:08 PM

  • how can we take the CSS if we have permission to not take it?

    by GoogleNebula, Apr 17, 2021, 5:22 PM

  • That is awesome!

    by sonone, Apr 15, 2021, 10:09 PM

  • I modified your dodecahedron and got:
    [asy]
    import three;
    import solids;
    size(300);
    currentprojection=orthographic(0,1.3,1.2);
    light(0,5,10);

    real phi=(sqrt(6)+1)/3;
    real g=(phi-1)/2;
    real s=1/2;
    real a=sqrt(1-phi*phi/4-g*g)+phi/2;

    triple[] d;
    d[0]=(phi

    by Andrew2019, Mar 26, 2021, 12:15 AM

  • Not too many, just changing the color here and there. I really like your CSS!

    by sonone, Feb 2, 2021, 10:35 AM

  • Nice!

    I see you're making changes to the CSS. :)

    by G.G.Otto, Feb 1, 2021, 9:26 PM

  • I'm learning Java now!

    by sonone, Feb 1, 2021, 5:56 PM

  • And I took part of it from CaptainFlint and then added a ton of modifications. ;)

    by G.G.Otto, Dec 1, 2020, 8:56 AM

98 shouts
Tags
About Owner
  • Posts: 2106
  • Joined: Aug 20, 2016
Blog Stats
  • Blog created: Mar 28, 2020
  • Total entries: 61
  • Total visits: 4961
  • Total comments: 146
Search Blog
a