0

does anyone know how I could add fill to this end mark? It's currently a white box with a green border. I've bolded the part of the code where the problem is.

\input{setup}

\begin{document}
\parindent=0.0in{
\setcounter{chapter}{7}
\chapter{Trigonometric Functions}
\section{Angles and Their Measures}
\example
If $\sin 20^\circ\approx 0.3420$, find $\cos (70^\circ)$ without using a calculator.
\solution
Since $70^\circ=90^\circ-20^\circ$, applying the cofunction identity for $\cos(90^\circ-\theta)$ gives
\[ \cos (70^\circ) =\sin(20^\circ) \approx 0.3420.\]
\color{olive}{\stopex}
\end{document}
  • 5
    Can you edit your code sample into a complete but minimal document? \example and \solution are no standard commands... – clemens Aug 8 '13 at 17:21
  • Like that? I have no idea how to use LaTex for the most part, this is only day 2 for me. For work I have to format a preexisting book document.. I'm used to InDesign, so this is quite an adjustment. – user34795 Aug 8 '13 at 17:37
  • 1
    not exactly... we don't have the setup file. Just build a mini file that does not depend on other files, test for yourself if it shows the problem you have and then post the code here. (The process is described in the link I gave.) – clemens Aug 8 '13 at 17:47
1

Since you did not provide a complete compilable example I don't know exactly what \stopex is. However, you could just draw your own with tikz and then have any draw, fill you desire:

enter image description here

Code:

\documentclass{article}
\usepackage{tikz}

\newcommand{\ColorBox}[1][]{%
    \hfill\tikz [x=1.4ex,y=1.4ex,line width=.2ex] \draw [#1] (0,0) rectangle (1,1);%
}%

\begin{document}
Some text\ColorBox

Some other text\ColorBox[thin, draw=blue, fill=green!50]

Some more text\ColorBox[thick, draw=red, fill=blue!25]

Some more, and even more text\ColorBox[thin, draw=none, fill=olive]
\end{document}
0

If I understand your question well, you want to draw a box filled with green. However, I do not know the definition of \stopex, and I cannot guess the shape or size of your box.

If you want to draw a small filled square, the solution would be \color{olive}{\blacksquare}. You could replace this last command by \blacklozenge for a diamond shape.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.