Defining parameters to newenviornment
Title
Question
The command for adding parameter to the newenvironment was discussed as under-
\newenvironment{env}[par]{st}{end}.
However the tutorial says- we are adding a title to the blue text by getting the title as an input parameter.
While explaining the meaning of the 5th line of the code, the tutorial further says we are adding- \textbf{textit{#1}}\\[12pt] to the given code without parameters.
I have two questions as under-
1. Which title we are using as an input parameters?
2. Why then next line says we are adding \textbf{textit{#1}}\\[12pt] to the code without parameters.
I am not able to understand these two different sentences.
3 Also role of \\[12pt] after double back slash?
Thanks in advance
Please help me.
LaTeX newenvironment-in-LaTeX 04-05 min 40-50 sec
Answers:
Let me start with the third question:
3. This means that "go to the next line", indicated by "\\", and "leave a vertical space of approximately 12pt", as indicated by "[12pt]". The square bracket says that it is an optional parameter. As a result, \\ works without this parameter also.
I will answer the second question also:
2. The argument is indicated by "#1". It says that typeset in bold italics of the first argument, and then go to the next line and leave a space of 12pt.
Login to add comment