<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=LaTeX%2FC3%2Fnewcommand-in-LaTeX%2FEnglish-timed</id>
		<title>LaTeX/C3/newcommand-in-LaTeX/English-timed - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=LaTeX%2FC3%2Fnewcommand-in-LaTeX%2FEnglish-timed"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=LaTeX/C3/newcommand-in-LaTeX/English-timed&amp;action=history"/>
		<updated>2026-05-14T13:14:07Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=LaTeX/C3/newcommand-in-LaTeX/English-timed&amp;diff=55303&amp;oldid=prev</id>
		<title>Pratik kamble: Created page with &quot;{| border=&quot;1&quot; |- | '''Time''' | '''Narration'''  |- | 00:02 | Welcome to the spoken tutorial on creating new '''commands '''in '''LaTeX'''.  |- | 00:08 |This tutorial will hel...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=LaTeX/C3/newcommand-in-LaTeX/English-timed&amp;diff=55303&amp;oldid=prev"/>
				<updated>2021-06-28T13:33:47Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| border=&amp;quot;1&amp;quot; |- | &amp;#039;&amp;#039;&amp;#039;Time&amp;#039;&amp;#039;&amp;#039; | &amp;#039;&amp;#039;&amp;#039;Narration&amp;#039;&amp;#039;&amp;#039;  |- | 00:02 | Welcome to the spoken tutorial on creating new &amp;#039;&amp;#039;&amp;#039;commands &amp;#039;&amp;#039;&amp;#039;in &amp;#039;&amp;#039;&amp;#039;LaTeX&amp;#039;&amp;#039;&amp;#039;.  |- | 00:08 |This tutorial will hel...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''Time'''&lt;br /&gt;
| '''Narration'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:02&lt;br /&gt;
| Welcome to the spoken tutorial on creating new '''commands '''in '''LaTeX'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:08&lt;br /&gt;
|This tutorial will help the learners to&lt;br /&gt;
&lt;br /&gt;
create or define new '''commands''' to get customized output. &lt;br /&gt;
&lt;br /&gt;
redefine the existing '''commands'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:18&lt;br /&gt;
| To follow this tutorial, &lt;br /&gt;
&lt;br /&gt;
1 You should have knowledge of '''commands '''that are necessary to create a document in '''LaTeX'''.&lt;br /&gt;
2 You should also have knowledge of '''compiling '''and producing a '''PDF output '''in '''LaTeX'''.&lt;br /&gt;
3 If not, please go through the relevant '''LaTeX''' spoken tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:37&lt;br /&gt;
| To record this tutorial, I am using&lt;br /&gt;
&lt;br /&gt;
'''Ubuntu Linux 14.04''' operating system&lt;br /&gt;
&lt;br /&gt;
'''TeXWorks 0.5'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:47&lt;br /&gt;
| We all know that '''commands '''are special words that are provided to the '''compiler'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 00:52&lt;br /&gt;
|'''Commands '''start with a '''backslash '''and sometimes accept '''parameters'''.&lt;br /&gt;
Example: '''\noindent, \textbf, \centering'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:02&lt;br /&gt;
|We can define our own custom '''commands '''in '''LaTeX''' to save time or for the code to look cleaner.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:09&lt;br /&gt;
| Ensure that the custom '''command '''you create is not an already existing '''LaTeX command'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:15&lt;br /&gt;
|To define''' '''a new '''command,''' we write '''\newcommand{command}{definition}''' at the beginning of the document.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:27&lt;br /&gt;
| Let us open the '''TeXWorks editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:34&lt;br /&gt;
| Pause the tutorial at this point.Download and unzip the files provided in the '''Code Files '''link below the player.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:43&lt;br /&gt;
| You will see some '''LaTeX''' code given in the file “'''newComm.tex'''” that you downloaded onto your machine. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 01:59&lt;br /&gt;
| We will copy and paste the first block of code from this file into our newly opened '''tex''' file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:09&lt;br /&gt;
| Let’s try to understand the program.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:12&lt;br /&gt;
| The definition '''\newcommand{\bbr}{\mathbb R} '''means that '''\bbr '''is the '''newcommand.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:24&lt;br /&gt;
|And when used, it will typeset '''R '''in the '''mathbb font. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:31&lt;br /&gt;
| Note that the required '''packages '''are loaded in the preamble; in this case '''\usepackage{amsfonts}''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 02:40&lt;br /&gt;
| So, instead of '''{\mathbb R},''' we can use '''\bbr '''within '''dollars '''while typesetting.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:48 &lt;br /&gt;
|Let us save the file as '''newComm.tex'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:00&lt;br /&gt;
| On compilation, we get the '''pdf '''output. Observe the letter '''R '''in '''mathbb font.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:15&lt;br /&gt;
| Now, we will see '''newcommand''' with '''parameters.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:24&lt;br /&gt;
|It is typically defined as -&lt;br /&gt;
&lt;br /&gt;
'''\newcommand{\command}[parameters]{definition}''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:36&lt;br /&gt;
| Let’s open a new file in '''TeXWorks'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 03:45&lt;br /&gt;
| Now switch to our downloaded code file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:59&lt;br /&gt;
| We will copy the next block of code from our downloaded code file and paste it into our new '''teX''' file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:07&lt;br /&gt;
| Let us understand the code now.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:11&lt;br /&gt;
|We have '''\newcommand{\bb}[1]{\mathbb {#1}}'''before the '''begin document statement.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:22&lt;br /&gt;
| Here '''\bb''' is the '''command.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[1] '''means that the command has one parameter&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:30&lt;br /&gt;
| '''\mathbb {#1}''' defines the '''command.'''&lt;br /&gt;
'''#1 '''means the first parameter.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:37&lt;br /&gt;
| Carefully observe the usage after '''\begin{document}'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:42&lt;br /&gt;
|We use it within '''dollars '''because it contains '''math symbols.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:48&lt;br /&gt;
| '''\bb '''followed by the '''open brace '''and '''parameter '''and again we close the '''brace.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 04:58&lt;br /&gt;
| We have used it twice with '''R''' as the '''parameter''' in the first usage and '''Z''' as the '''parameter''' in the second usage.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:08&lt;br /&gt;
| Save the program as '''newCommP1.tex '''and compile it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:28&lt;br /&gt;
| In the output, observe that the '''R''' and''' Z''' are in the '''mathbb''' or the '''blackboard font.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:40&lt;br /&gt;
| Next, let’s define a '''newcommand''' with '''2 parameters.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 05:46&lt;br /&gt;
| Open a new '''tex''' file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:08&lt;br /&gt;
| We will copy and paste the next block of code from our downloaded file, as shown here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:16&lt;br /&gt;
| Observe the line '''\newcommand{\add}[2]{ \left( #1 + #2 \right) }''' in the document.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:34&lt;br /&gt;
| This has been used as '''$\add{abc}{xyz}$''' Here in the definition, '''\add''' is the '''newcommand'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:47&lt;br /&gt;
|[2]''' indicates that it has '''2 parameters.''' '''{\left( #1+#2\right)}''' is the definition of the '''command.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 06:57&lt;br /&gt;
| '''#1''' for the first '''parameter''' and '''#2''' for the second '''parameter.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:05&lt;br /&gt;
| #1''' and '''#2''' are replaced by the actual text '''{abc}''' and '''{xyz}''' in this case.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:16&lt;br /&gt;
| Let us save as '''newCommP2.tex '''and compile the '''tex''' file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:32&lt;br /&gt;
| Observe the output.&lt;br /&gt;
&lt;br /&gt;
Here the '''left''' and '''right parenthesis''' are added and a '''plus symbol''' is introduced between the first and second '''parameters.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 07:53&lt;br /&gt;
| Let’s now learn about the '''renewcommand'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:59&lt;br /&gt;
| '''renewcommand''' is used to change or overwrite the existing '''command.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:04&lt;br /&gt;
| The syntax for '''renewcommand''' is '''\renewcommand{command}{definition}''' It’s quite similar to '''newcommand.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:18&lt;br /&gt;
| Once again, we will open a new '''tex '''file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:35&lt;br /&gt;
| We will copy and paste the last block of code from our downloaded file into our newly opened '''tex '''file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:45&lt;br /&gt;
| Let us understand the program now.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 08:48&lt;br /&gt;
| The definition '''\renewcommand{\S}{\mathcal {S}}''' redefines '''\S'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:58&lt;br /&gt;
| '''\S '''normally produces the section symbol (§)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:02&lt;br /&gt;
| whereas after redefining '''\S,''' produces '''S''' in '''Calligraphic font '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:11&lt;br /&gt;
| Note that the required package '''amsmath''' is preloaded. Also, we use '''\S''' within '''dollar symbols'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:26&lt;br /&gt;
| Let us now save the file as '''renew.tex''', compile it and see the output. We can see '''“S” '''in calligraphic font.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:49&lt;br /&gt;
| Come back to the '''tex '''file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 09:59&lt;br /&gt;
| Note that replacing '''z '''for '''S '''in the '''renewcommand '''does not work.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:06&lt;br /&gt;
| This is because there is no existing '''command''' defined as '''\z.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:12&lt;br /&gt;
| Please use '''renewcommand''' only when you are very sure about what you are doing.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:26&lt;br /&gt;
|To summarise, we have learnt&lt;br /&gt;
&lt;br /&gt;
'''newcommand'''&lt;br /&gt;
&lt;br /&gt;
'''newcommand''' with '''parameters'''&lt;br /&gt;
&lt;br /&gt;
'''renewcommand'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:37&lt;br /&gt;
| Assignment&lt;br /&gt;
&lt;br /&gt;
Create a new '''command \textbfit''' which will convert the given text into bold and italics.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:50&lt;br /&gt;
| The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
Pls watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:57&lt;br /&gt;
| The Spoken Tutorial Project Team : Conducts workshops using spoken tutorials and Gives certificates to those who pass an online test&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|11:07&lt;br /&gt;
| For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 11:11&lt;br /&gt;
| Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India. More information on this Mission is available at this link.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|11:24&lt;br /&gt;
| This is Ambika Vanchinathan signing off. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pratik kamble</name></author>	</entry>

	</feed>