Update references task
This commit is contained in:
parent
734854d234
commit
124e178fd8
@ -1,13 +1,14 @@
|
||||
C\# is an object-oriented programming language that was developed by Microsoft in 2011. In \cref{fig:csharp} we can see the logo of the programming language.
|
||||
C\# is an object-oriented programming language that was developed by Microsoft in 2011.
|
||||
\Cref{fig:csharp} displays the logo of the programming language.
|
||||
|
||||
\begin{figure}[H]
|
||||
\label{fig:csharp}
|
||||
\centering
|
||||
\includegraphics[width=2cm]{exercises/references/csharp.png}
|
||||
\caption{The logo of C\#}
|
||||
\label{fig:csharp}
|
||||
\end{figure}
|
||||
|
||||
\cref{lst:csharphelloworld} shows a program that prints the text \enquote{Hello LaTeX friends!} to the console. Like Java, C\# makes use of classes and main methods to build executable applications.
|
||||
Listing \ref{lst:csharphelloworld} shows a program that prints the text \enquote{Hello LaTeX friends!} to the console. Like Java, C\# makes use of classes and main methods to build executable applications.
|
||||
|
||||
\lstset{language=csharp}
|
||||
\lstinputlisting[label=lst:csharphelloworld, caption=Hello World in C\#]{exercises/references/HelloLateXFriends.cs}
|
||||
@ -1,6 +1,6 @@
|
||||
% !TeX root = ../../main-exercises.tex
|
||||
|
||||
C\# is an object-oriented programming language that was developed by Microsoft in 2011. In the figure we can see the logo of the programming language.
|
||||
C\# is an object-oriented programming language that was developed by Microsoft in 2011. The figure displays the logo of the programming language.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
In file \file{exercises/references/references.tex}, replace \enquote{in the
|
||||
figure} and \enquote{the following source code listing} with suited references.
|
||||
Use the command \code{latex}{\textbackslash cref}. Do not forget to first
|
||||
introduce labels for the elements that you want to reference.
|
||||
introduce labels and captions for the elements that you want to reference.
|
||||
Make sure to use suitable prefixes before the labels.
|
||||
|
||||
For source code listings, adding labels and captions is a bit different.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user