i have set the environment variables for use in document. It is as follows:
\newcommand{\homeworkProblemName}{} <span style="font-weight: bold">\newenvironment{homeworkProblem}[1][Question \arabic{homeworkProblemCounter}]{ % Makes a new environment called homeworkProblem which takes 1 argument (custom name) but the default is "Problem #"</span> \stepcounter{homeworkProblemCounter} % Increase counter for number of problems \renewcommand{\homeworkProblemName}{#1} % Assign \homeworkProblemName the name of the problem \section{\homeworkProblemName} % Make a section in the document with the custom problem count \enterProblemHeader{\homeworkProblemName} % Header and footer within the environment }{ \exitProblemHeader{\homeworkProblemName} % Header and footer after the environment } %----------ANSWER SECTION---- \newcommand{\problemAnswer}[1]{ % Defines the problem answer command with the content as the only argument \noindent\framebox[\columnwidth][c]{\begin{minipage}{0.98\columnwidth}#1\end{minipage}} % Makes the box around the problem answer and puts the content inside } \newcommand{\homeworkSectionName}{} \newenvironment{homeworkSection}[1]{ % New environment for sections within homework problems, takes 1 argument - the name of the section \renewcommand{\homeworkSectionName}{#1} % Assign \homeworkSectionName to the name of the section from the environment argument \subsection{\homeworkSectionName} % Make a subsection with the custom name of the subsection \enterProblemHeader{\homeworkProblemName\ [\homeworkSectionName]} % Header and footer within the environment }{ \enterProblemHeader{\homeworkProblemName} % Header and footer after the environment }
I would like to display the output as "Question 1 - Circuit Input", for next question it should be "Question 2 - Cicuit Analysis".
My code for displaying the question and answers is as follows:-
<span style="font-weight: bold">\begin{homeworkProblem}</span> %<span style="font-weight: bold">WHAT SHOULD I CHANGE IN THE ABOVE BOLD FACED TEXT TO ACHIEVE THE REQUIRED OUTPUT?</span> %Question \vspace{10pt} %Answer \problemAnswer { \begin{center} \includegraphics[width=0.75\columnwidth]{pic1} % Example image \end{center} \lipsum[2] } \end{homeworkProblem}
Kindly help. Thank you

Regards,
Shashwat