Life and Musings of Ed

Archive for the ‘My LaTeX Experience’ Category

Problem Solving LaTeX Template

In My LaTeX Experience on 6 September 09 at 6:58 pm

Ok, so here is one more template in LaTeX which is useful for standard math and science problem solving homework.  I have just cleaned it up a little to make it a bit more generic and to highlight the problem solving strategy.  The next LaTeX blog will explore new territory — getting away from the “homework template” examples.  Of course, if someone makes a comment and has something specific they would like to see, I’ll do my novice best to post something to address the need.

HwkTemplate2 The code used to produce this .pdf file is found below.

% Physics Homework Template using MEMOIR class
\documentclass[openany]{memoir}

%preamble
\usepackage{calc}
\usepackage{color}
\usepackage{graphicx}

%define title and other basic document info
%the title should reflect the style and give a foretaste of the document
%work on making a stylized title page — or title on a page as in ARTICLE class
\title{\huge \textbf{Ch 1 Problems}}
\author{J Edward Ladenburger}
\date{25 Aug 09}                    % could use \today  , but I like this date format better
%\publisher{}                            %one day I’ll need this  😉
%\thanks{Special thanks to God for the ability to work}        %produces a footnote to the title

\definecolor{shadecolor}{gray}{0.9}
\definecolor{ared}{rgb}{.647,.129,.149}
\renewcommand\colorchapnum{\color{ared}}
\renewcommand\colorchaptitle{\color{ared}}
\chapterstyle{bringhurst}
%one of a number of chapter styles available…this one doesn’t use the ared color
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
%title
\thispagestyle{empty}
%\begin{minipage}{300pt}
\begin{center}{
\begin{shaded}
\hrule \vspace{30pt}
\hspace{10pt} \thetitle  \vspace{30pt}
\newline \theauthor \hspace{30pt} \thedate  \vspace{26pt}
\hrule
\end{shaded}
}
\end{center}
%\end{minipage}
\clearpage

%\frontmatter    %use if needed –page numbers as lower case roman numerals i, ii,…

%\mainmatter
%%other declarations
\pagestyle{Ruled}                    %one of a number of possible page styles
\midsloppy                             %to minimize overfull lines

%Layout the page
%%Try this manual golden ratio layout or…           default seems better for now
\settypeblocksize{*}{\lxvchars}{1.618}
\setulmargins{50pt}{*}{*}
\setlrmargins{*}{*}{1.618}
\setheaderspaces{*}{*}{1.618}
%\semiisopage[12]                       %try this predefined layout — others predefined ones are options in MEMOIR…
%this one looked best but did not work

\checkandfixthelayout          %make the layout happen and provide details in log during build

\chapter{Chapter 1 Problems}

\section*{Problem 3}
\subsection{Given}
Clearly describe the problem, writing down all information so you do not have to look at the text again. Draw sketches or tables to organize information when possible. Define variables.
\subsection{Find}
Clearly state the problem.  What are you to answer?
\subsection{Plan}
Describe your approach here… Collect relevant theorems and laws and formulas
\subsection{Calculations}
Perform the necessary calculations and show your reasoning.

\subsection{Solution}
\begin{minipage}{300pt}
\begin{center}{
\begin{shaded}
\hrule
\vspace{20pt}
A nicely written sentence solution goes here.
\vspace{16pt}
\hrule
\end{shaded}
}
\end{center}
\end{minipage}

\end{document}

Advertisements

Format for LaTeX Homework II

In LaTeX, My LaTeX Experience, Uncategorized on 4 September 09 at 11:36 am

It has been really interesting to note that of all posts, the LaTeX post has gotten the most hits.  I consider myself a novice user, who loves the concept of “content focus”,  with lots of specific publishing and formatting options.  I offer a simple template for basic problem solving with this post.  A link to the  .pdf result (when compiled)  is provided here. PhysHwkTemplate2

% Physics Homework Template using MEMOIR class
\documentclass[openany]{memoir}

%preamble
\usepackage{calc}
\usepackage{color}
\usepackage{graphicx}

%define title and other basic document info
%the title should reflect the style and give a foretaste of the document
%work on making a stylized title page — or title on a page as in ARTICLE class
\title{\large \textbf{Physics Example From Knight — Friday Night Football}}
\author{J Edward Ladenburger}
\date{28 Aug 09}                    % could use \today  , but I like this date format better
%\publisher{}                            %one day I’ll need this  😉
%\thanks{Special thanks to God for the ability to work}        %produces a footnote to the title

%\definecolor{shadecolor}{gray}{0.9}
\definecolor{ared}{rgb}{.647,.129,.149}
\definecolor{shadecolor}{cmyk}{.3,.1,0,0}
\renewcommand\colorchapnum{\color{ared}}
\renewcommand\colorchaptitle{\color{ared}}
\chapterstyle{thatcher}
%one of a number of chapter styles available…this one {bringhurst} doesn’t use the ared color; bianchi, chappell, dash, lyhne, ntglike,pedersen thatcher,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
%title
\thispagestyle{empty}
%\begin{minipage}{300pt}
\begin{center}{
\begin{shaded}
\hrule \vspace{30pt}
\hspace{10pt} \thetitle  \vspace{30pt}
\newline \theauthor \hspace{30pt} \thedate  \vspace{26pt}
\hrule
\end{shaded}
}
\end{center}
%\end{minipage}
\clearpage

%\frontmatter    %use if needed –page numbers as lower case roman numerals i, ii,…

%\mainmatter
%%other declarations
\pagestyle{Ruled}                    %one of a number of possible page styles
\midsloppy                             %to minimize overfull lines

%Layout the page
%%Try this manual golden ratio layout or…
\settypeblocksize{*}{\lxvchars}{1.618}
\setulmargins{160pt}{*}{*}
\setlrmargins{*}{*}{1.618}
\setheaderspaces{*}{*}{1.618}
%\semiisopage[12]
%try this predefined layout — other predefined ones are options in MEMOIR…
%this one looked best but did not work

\checkandfixthelayout          %make the layout happen and provide details in log during build

\chapter{Motion With Constant Acceleration}
\section{Ex. 2.14 Friday Night Football}
\subsection{Given}
Fred catches the football while standing on the goal line and he immediately starts running forward with an acceleration of $ 6 \frac{ft}{s^2} $.  At the moment that Fred catches the ball, Tommy is 20 yards away and is heading directly toward Fred with a steady speed of $ 15 \frac{ft}{s}$. Neither player deviates from a straight-ahead path.

\subsection{Find}
Find where Tommy will tackle Fred.
\subsection{Plan}
Write equations of motion for Fred and Tommy, determine \textit{when} they will be at the same location and use this time to find \textit{where} the collision will occur.  I’ll use the same coordinate system for both Fred and Tommy with zero at the goal line and the positive direction coinciding with Fred’s direction. Since the acceleration and velocity are provided with length dimensions in feet, I convert Tommy’s initial position to feet.
\subsection{Calculations}
The equation for Fred’s position:
\[ x_F = \frac{1}{2} a_F t^2 + 0 \cdot t + 0\]
The equation for Tommy’s position:
\[ x_T = 0 \cdot t^2 + v_i t + 60\]
By setting these equal, we can solve for the time at which they will be at the same position.  \\\\
\begin{eqnarray*}
\frac{1}{2} 6 t^2 &=& -15 t + 60 \\
3 t^2 +15 t -60  &=& 0 \\
t^2 + 5t – 20    &=& 0 \\
t^2 + 5t + \left(\frac{5}{2}\right)^2 &=& 20 + \left(\frac{5}{2}\right)^2 \\
\left(t + \frac{5}{2}\right)^2 &=& \frac{105}{4} \\
t &=& \frac{-5 \pm \sqrt{105}}{2} \\
\end{eqnarray*}
Using only the positive time solution, we see that the collision occurs at
\[t =     \frac{-5 + \sqrt{105}}{2} \]
or approximately at $ t \approx 2.6 s $.\\

We can substitute this value into either Fred’s or Tommy’s position equation to find out where the collision [presumably a tackle] occurs.
\[ x_T = -15 (2.6) + 60 = 20.6479 \approx 21 feet\]
or, right about the 7 yard line.\\

\subsection{Solution}
\begin{minipage}{300pt}
\begin{center}{
\begin{shaded}
\hrule
\vspace{20pt}
Tommy tackles Fred at the seven (7) yard line.
\vspace{16pt}
\hrule
\end{shaded}
}
\end{center}
\end{minipage}

\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%% SAVE THIS SECTION TO COPY AND PASTE –AS NEEDED FOR ADDITIONAL PROBLEMS %%%%%%%%%%%%%%%%%%%%%%
\section{}%<problem # goes here>}
\subsection{Given}

\subsection{Find}

\subsection{Plan}

\subsection{Calculations}
\[    \]        %<math stuff here — calculations>

\subsection{Solution}
\begin{minipage}{300pt}
\begin{center}{
\begin{shaded}
\hrule
\vspace{20pt}
%nicely written sentence solution goes here
\vspace{16pt}
\hrule
\end{shaded}
}
\end{center}
\end{minipage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Format for Math and Science Homework – LaTeX

In Math Tutor, My LaTeX Experience on 3 November 08 at 4:29 pm

I have long thought that math and science homework should emphasize depth and quality over quantity, especially once basic arithmetic-type skills have been established; generally somewhere in those middle school years.  I have recently been encouraging students, who I mentor, to create LaTeX templates and to use these to create quality papers for submission to their teachers.  physhwktemplate22

I generally find that once the template is created to fit a particular class, it does not take much longer to work homework sets directly in LaTeX than on paper, and the result is much more desirable.

This particular homework example uses a LaTeX template  based on the MEMOIR document class and highlights the basic problem solving approach of clearly articulating the Given information, the thing one is supposed to Find, a Plan for finding it, the Calculations and finally a clear Solution statement which directly answers the question which was asked.

Here is the /LaTeX code:

Read the rest of this entry »

CTAN — LaTeX heaven

In Math Tutor, My LaTeX Experience on 25 October 08 at 8:58 pm

If you ever need to find a way to format a document in LaTeX , whether it is a crossword puzzle, a chess match, bible references, a Ph.D. thesis, a scientific article, a greeting card, a chemistry book, … you name it!  This is the place to go.

http://tug.ctan.org/

The CTAN Masthead

The CTAN Masthead