Difference between revisions of "ECE 110/Fall 2022/Lab Supplements"

From PrattWiki
Jump to navigation Jump to search
(Clarifications)
Line 81: Line 81:
  
 
=== Clarifications ===
 
=== Clarifications ===
None yet!
+
==== Resistor Table Codes ====
 +
The following $$\LaTeX$$ code was used in the lab handout to make the four example tables for resistors.  Note that the command:
 +
<syntaxhighlight lang=latex>
 +
\usepackage[dvipsnames]{xcolor}
 +
</syntaxhighlight>
 +
needs to be in the preamble to define specialty colors like Goldenrod.  Also, the <code>\strut</code> command is used to produce an unprinted character that is slightly larger than any letter in the font.  Without it, the colorboxes go slightly above the tallest ascender in the word and slightly below the deepest descender in a word.
 +
 
 +
<syntaxhighlight lang=latex>
 +
\begin{center}
 +
    \begin{tabular}{|c|cccc|} \hline
 +
    Resistor & 1st & 2nd & 3rd & 4th\\ \hline
 +
    43 $\Omega$ & yellow & orange & black & gold\\ \hline
 +
    \end{tabular}
 +
\end{center}
 +
or
 +
\begin{center}
 +
    \begin{tabular}{|c|cccc|} \hline
 +
    Resistor & 1st & 2nd & 3rd & 4th\\ \hline
 +
    43 $\Omega$ & \colorbox{yellow}{~\strut ~} & \colorbox{orange}{~\strut ~} & \colorbox{black}{~\strut ~} & \colorbox{Goldenrod}{~\strut ~}\\ \hline
 +
    \end{tabular}
 +
\end{center}
 +
or
 +
\begin{center}
 +
    \begin{tabular}{|c|cccc|} \hline
 +
    Resistor & 1st & 2nd & 3rd & 4th\\ \hline
 +
    43 $\Omega$ & \color{yellow}yellow\color{black} & \color{orange}orange\color{black} & black & \color{Goldenrod}gold\color{black}\\ \hline
 +
    \end{tabular}
 +
\end{center}
 +
or
 +
\begin{center}
 +
    \begin{tabular}{|c|cccc|} \hline
 +
    Resistor & 1st & 2nd & 3rd & 4th\\ \hline
 +
    43 $\Omega$ & \colorbox{yellow}{\strut yellow} & \colorbox{orange}{\strut orange} & \colorbox{black}{\color{white}\strut black\color{black}} & \colorbox{Goldenrod}{\strut gold}\\ \hline
 +
    \end{tabular}
 +
\end{center}
 +
</syntaxhighlight>
  
 
=== Relevant Resources ===
 
=== Relevant Resources ===

Revision as of 15:24, 8 September 2022

Lab 0

Typographical/Other Errors

None yet!

Clarifications

None yet!

Relevant Resources

Lab 1

Typographical/Other Errors

None yet!

Clarifications

None yet!

Relevant Resources

Lab 2

Typographical/Other Errors

None yet!

Clarifications

None yet!

Relevant Resources

Lab 3

Typographical/Other Errors

None yet!

Clarifications

Resistor Table Codes

The following $$\LaTeX$$ code was used in the lab handout to make the four example tables for resistors. Note that the command:

\usepackage[dvipsnames]{xcolor}

needs to be in the preamble to define specialty colors like Goldenrod. Also, the \strut command is used to produce an unprinted character that is slightly larger than any letter in the font. Without it, the colorboxes go slightly above the tallest ascender in the word and slightly below the deepest descender in a word.

\begin{center}
    \begin{tabular}{|c|cccc|} \hline
    Resistor & 1st & 2nd & 3rd & 4th\\ \hline
    43 $\Omega$ & yellow & orange & black & gold\\ \hline
    \end{tabular}
\end{center}
or
\begin{center}
    \begin{tabular}{|c|cccc|} \hline
    Resistor & 1st & 2nd & 3rd & 4th\\ \hline
    43 $\Omega$ & \colorbox{yellow}{~\strut ~} & \colorbox{orange}{~\strut ~} & \colorbox{black}{~\strut ~} & \colorbox{Goldenrod}{~\strut ~}\\ \hline
    \end{tabular}
\end{center}
or
\begin{center}
    \begin{tabular}{|c|cccc|} \hline
    Resistor & 1st & 2nd & 3rd & 4th\\ \hline
    43 $\Omega$ & \color{yellow}yellow\color{black} & \color{orange}orange\color{black} & black & \color{Goldenrod}gold\color{black}\\ \hline
    \end{tabular}
\end{center}
or
\begin{center}
    \begin{tabular}{|c|cccc|} \hline
    Resistor & 1st & 2nd & 3rd & 4th\\ \hline
    43 $\Omega$ & \colorbox{yellow}{\strut yellow} & \colorbox{orange}{\strut orange} & \colorbox{black}{\color{white}\strut black\color{black}} & \colorbox{Goldenrod}{\strut gold}\\ \hline
    \end{tabular}
\end{center}

Relevant Resources