12 February 2014

Doing your homework in latex.

It is a common occurrence for other students to comment on my homework whenever I turn it in for one of my classes.

The complete LaTeX file (and the pdf output) can be found in my repository, latex-homework-template .

Below are a few screenshots of problems that I’ve done in the past:

Cover page

If I didn’t know how easy it was and the benefits that I get from typesetting my homework, I’d probably ask as well. However, I’d argue that using LaTeX to type up homework has made me a far better student than when I used to handwrite my homeworks.

And that is something that I care a lot about.

The Benefits

I can summarize the benefits like so:

It can be kept in Source Control. Handwriting can’t be stored in a version control system; once you erase something, it’s gone.

You can see your homework materialize in front of you. Seeing the results and the equations in their complete LaTeX-glory is a very powerful way to conceptualize things. There’s just something different about the way things look so perfect that makes the subject easier to understand.

You’ll do better in your classes. This one goes with the previous point, but having the ability to see your homework helps you understand it. By understanding it well, you’ll do better on tests. You will maximize how much you can learn as well as maximize your grade (if that matters to you).

It’s very neat & tidy. Although my handwriting has improved quite a bit, I still find myself slipping back into a rushed, messy script from the past. LaTeX gives zero doubt that the professor/TA will be able to read my solutions.

About LaTeX

A very short history.

Donald Knuth , a legendary Computer Scientist as well as one of my favorites, is well known for the system that he created called just TeX .

It is a piece of typesetting software that aids in writing documents and formulas. The power comes from the fact that the document that you write is plain source code.

The code that you write is then “typeset” into the final document in whatever form you wish.

Here’s an example of some basic LaTeX code:

With the output looking like below:

Example output

Using the Template

I’ve created a GitHub repository, latex-homework-template , just for my homework template that I’ve been using ever since I started. I found it online and used it as a base to start my template.

To use it, just download the homework.tex file and start editing. Once you need to typeset it, you’ll need LaTeX here .

After that, you just need to compile it and you’ll get your output. There are tons of different resources that I’ve found useful in learning LaTeX:

TeX StackExchange

LaTeX Wikibook

Effect on Performance

I have a solid set of anecdotal evidence in favor of using LaTeX for writing up my homework.

In all the classes that I’ve used LaTeX, I’ve come out of the class with a very strong understanding of the material as well as a good grade. Although I’m not a big fan of grades (like at all), I know it matters to some people.

This might have to do with the fact that doing the homework in LaTeX takes longer. It might have to do with the fact that I perfect the appearance and spend a lot more time looking at the subject.

The most likely reason is a combination of all that I previously mentioned plus other factors. I’m usually one to always want to quantify something, but in this case, I know it helps; that’s all I need.

Learning Curve

There definitely is a learning curve when it comes to trying to use LaTeX for homework. I felt that it was definitely worth the effort unlike how it might seem to some students.

I reasoned that when I go to graduate school, I will want to use it there. I also know how pervasive it is in textbooks. Since I love to read textbooks so much, I wanted to see what it took to write them so elegantly. I may even want to write one in the future; we’ll have to see =]

To me it seemed like a small tradeoff for the great benefits that it provided.

I cannot recommend using LaTeX for your homework enough.

The benefits go a long way. It helps you learn the material and in a way that isn’t as easily achieved when just using pencil and paper.

LaTeX is also widely used in academia and learning about the tool is almost essential if you wish to go to graduate school.

Once I graduate from university, I plan on releasing all my code for the last three semesters as open source. It includes all my LaTeX code which has really accumulated over the last year. It should provide a nice resource for others.

In the meantime, hopefully if you start using LaTeX for your homework, you won’t be able to resist doing it early because of how fun it is. Well, at least it was fun for me =]

02 Using LaTeX for Homework

I hope that you will use the LaTeX typesetting system to write your homework solutions for this course. (See the guide to submitting homework.) It might look daunting at first, if you haven't used LaTeX before, but you won't have to learn LaTeX in depth. You just have to fill in answers to exercises, so you won't need to deal with the complexities of writing complete documents. You will mainly need to know how to express mathematics in LaTeX. Unfortunately, matrices and systems of linear equations are among the more difficult things to write. Fortunately, you will have examples that you can imitate. What follows here is some basic information to get you oriented.

Using LaTeX is something like programming: You write "source code" in plain text, which is "compiled" to produce the actual document. Perhaps the first thing to know is that to start a new paragraph, you need to leave a blank line. Other than that, carriage returns are ignored. Also, multiple consecutive spaces are treated as a single space.

To Include mathematics in a document, you type the LaTeX source code for the math between dollar signs. For example, $ax^2+bx+c=0$ will be typeset as \(ax^2+bx+c=0\). If you enclose the code between double dollar signs, the math will be displayed on on line by itself. (This is called "displayed math.") For example, $ $ax^2+bx+c=0$ $ will be typeset as \[ax^2+bx+c=0\] Some things look different as displayed math. For example, compare \(\lim_{n\to\infty}\sum_{k=1}^n\frac{1}{2^n}=1\) to \[\lim_{n\to\infty}\sum_{k=1}^n\frac{1}{2^n}=1\] If case you are wondering, the LaTeX code for that is \lim_{n\to\infty}\sum_{k=1}^n\frac{1}{2^n}=1 . Remember that it has to be enclosed between either single or double dollar signs. Stuff that is between dollar signs is said to be in math mode , as opposed to the regular "text mode."

In the source code, certain characters have special meaning: $ \ { } ^ _ & ~ # % . We have seen that $ is used to surround math code.

The backslash character, \ , is used for LaTeX commands, and braces, { and } , are used to enclose the parameters to which a command applies. For example, in \sqrt{b^2-4ac} , the command is \sqrt , the parameter is b^2-4ac , and the typeset result is \(\sqrt{b^2-4ac}\). The \frac command is used to make a fraction, and it has two parameters, so \frac{n!}{k!(n-k)!} is typeset as \(\frac{n!}{k!(n-k)!}\). Some commands don't have parameters. For example, \infty represents the infinity symbol, \(\infty\), and \to produces a right arrow, \(\to\). Note that you might need to leave a space after a command like \to to mark the end of the command word. For example, use f\colon X\to Y to get \(f\colon X\to Y\). Typing \colonX instead of \colon X will just get you an error.

The special characters caret, ^ , and underscore,  _ , are used for exponents and subscripts in math mode. Note that if an exponent or subscript is more than one character or command, it must be enclosed in braces, so you need f^{-1}(x_i) to get \(f^{-1}(x_i)\). Some similar things, such as the upper and lower limits on a sum ( \sum_{n=1}^\infty for \(\sum_{n-1}^\infty\)) and the thing that goes below "lim" ( \lim_{x\to a} for \(\lim_{x\to a}\)). By the way, in display math, that would look like \(\displaystyle\lim_{x\to a}\). If you want to force some math into display style, use the command \displaystyle in regular math mode: $\displaystyle\lim_{x\to a}$ .

We will see that the amphersand, & , is used similarly to a tab character in tables and matrices. The other three special characters probably won't come up in your writing for this course. (A  ~ represents a non-breaking space, #  is used when defining new commands, and %  marks the start of a comment that ends at the end of the same line. Comments are ignored by LaTeX.) Most of the special characters can be output to the typeset document by preceding the character by a backslash in the source code. For example, type  \{ for \(\{\). However, this does not work for the backslash character; \\ is used to force a line break in the output. It also does not work for \^  or  \~ (which are used for making accented characters). I also note that | , < , and  > work in math mode but give funny results if used outside of math mode.

Some LeTeX code uses environments . Environments are coded using \begin and \end , which take the name of the environment as parameter. For example, you will write your solution to exercises in this course using my " answer " environment. That means that you will write your solution between \begin{answer} and \end{answer} . Similarly, I will write the problem text between \begin{problem} and \end{\problem} . (These two environments are not built into LaTeX. It is possible to define new environments and new commands in a document. The LaTeX source files that I give you will already define any extra commands and environments that you need.)

If you are going to use LaTeX in this course, you need to learn about matrix environments. To produce a matrix enclosed in parentheses, use the pmatrix environment. The rows of the matrix are separated by \\ . In each row, the elements of that row are separated by  & . All of that goes between \begin{pmatrix} and \end{pmatrix} , and it must all be in math mode or displayed math mode. LaTeX ignores end-of-lines in math mode, but it's a good idea to lay out the matrix in the source code similarly to how it looks when typeset (except I don't always do that for simple column vectors, which have just one element per row). For example,

will produce this in the typeset document: \[\begin{pmatrix} 3 & -10 & 2 \\ -1 & 7 & 4 \\ 5 & 0 & 1 \end{pmatrix} \begin{pmatrix} x\\ y\\ z \end{pmatrix} = \begin{pmatrix} 3x-10y+2z \\ -x+7y+4z \\ 5x+z \end{pmatrix}\]

Later, we will use the vmatrix environment to make matrices that are enclosed between vertical bars instead of between parentheses. There is a plain matrix environment for typesetting the elements of the matrix with nothing enclosing them. I use the matrix environment to typeset systems of linear equations, where each equation is one row in the matrix. Each term in an equation is one element of the row. The equal sign and the right-hand side of the equation are also elements. A column can be left empty—two & 's in a row—if a term is missing from the equation. For example:

gives \[ \begin{matrix} 3x_1 & -2x_2 & +x_3 & -x_4 & = & 7\\ -x_1 & & -5x_3 & +2x_4 & = & 2\\ & x_2 & +2x_3 & & = & 0\\ 2x_1 & +3x_2 & & -5x_4 & = & -1 \end{matrix} \]

Unfortunately, there is no simple environment for making augmented matrices. I use a pattern based on the array environment, which makes it possible to put lines between columns of the array and to say whether you want the columns to be centered, left justified, or right justified. This is specified in an extra parameter that comes after \begin{array} . For example, \begin{array}{cccc|c} is used for an array with five centered columns and a line between the fourth and fifth columns; you can use r and l instead of c to get right-justified or left-justified columns. Since the array environment does not include parentheses, I have to add them myself: \left( and \right) add appropriately sized parentheses around whatever is put between them. Here's the augmented matrix that represents the above linear system:

giving \[\left( \begin{array}{cccc|c} 3 & -2 & 1 & -1 & 7\\ -1 & 0 & -5 & 2 & 2\\ 0 & 1 & 2 & 0 & 0\\ -2 & 3 & 0 & -5 & -1 \end{array} \right) \]

The only other environment that is really essential is align* . This environment is unusual in that it is used for mathematics, but it has to be used in regular text mode, not inside math mode. Its purpose is to vertically align a sequence of rows. Rows are separated by \\ , and the position in each row that is to be aligned is marked with a  & . Often, a row is an equation or inequality (or just the operator and the right half of an equation/inequality), with the operators vertically aligned. Here is an example:

which is typeset as

\(\begin{align*} \frac{d}{dx}(x\sin(x^2)) &= x\frac{d}{dx}(\sin(x^2)) + \sin(x^2)\frac{d}{dx}(x) \\ &= x\cos(x^2)\frac{d}{dx}(x^2) + \sin(x^2)\\ &= x\cos(x^2)2x + \sin(x^2)\\ &= 2x^2\cos(x^2) + \sin(x^2) \end{align*}\)

For showing a series of row reductions applied to a matrix or linear system, you might use array or matrix environments inside an align* environment. This can get complicated, but an example is given in the first homework assignment. I have defined the command \rowop for making the arrows that go between the steps of a row reduction. The parameter to \rowop is either a single row operation or several operations separated by  \\ . For example, \rowop{\rho_2\leftrightarrow\rho_3} and \rowop{2\rho_1+\rho_2\\-3\rho_1+\rho_3} for \(\rowop{\rho_2\leftrightarrow\rho_3}\) and \(\rowop{2\rho_1+\rho_2\\-3\rho_1+\rho_3}\)

You can find lists of other LaTeX command elsewhere, and you will find examples in the documents that I give you. Here are a few more that you might use in this course. Most of these are used only in math mode, and a few of them require some preliminary configuration in the LaTeX file.

(back to contents)

Robert J. Won

Department of Mathematics, The George Washington University

How to TeX your homework

The TeX template used in the video is included at the bottom of this post. You can paste this into a .tex file locally, or into Overleaf.

  • If you’re just starting out, I recommend using  Overleaf  as your TeX editor.
  • You can use  Detexify  to hand-draw a symbol to find the LaTeX command for it.
  • There is also a nice  WikiBook  on LaTeXing mathematics.
  • When in doubt, Google is your friend!

You will frequently have problems with TeX which will make the document unable to compile. You should remember to compile often so that you can pinpoint your errors. Here are some things to check.

  • Remember to place math within dollar signs, so $x^2$ typesets as  x 2 .
  • Make sure you have started and ended all environments in the appropriate spots.
  • Make sure you have closed all of your curly braces { }.
  • Check to see if you used a new command that requires a new package.

Leave a Reply Cancel reply

Save my name, email, and website in this browser for the next time I comment.

This site uses cookies to offer you a better browsing experience. Visit GW’s Website Privacy Notice to learn more about how GW uses cookies.

BYU Logo

Math 341 — Theory of Analysis 1

Latex resources.

Under Construction!!

Getting started with \(\LaTeX\)

  • Online LaTeX Editor Overleaf
  • https://www.overleaf.com/latex/learn/free-online-introduction-to-latex-part-1
  • Use 12 point font and 1" or 1.25" margins
  • Here is a link for a homework template Math 341 Homework Template as a starting point for your homework assignments typed in LaTeX.
  • Hint: Look at this example and its LaTeX source code .

Various reference sources

  • LaTeX reference sheet by Dave Richeson (2 pages)
  • Math 290 LaTeX reference sheet (2 pages)
  • LaTeX reference sheet by Winston Change (2 pages )
  • Darrin Doud's Short Introduction to LaTeX
  • Lots of LaTeX symbols (4 pages)
  • Learn LaTeX in 30 Minutes A tutorial at Overleaf.com
  • AMS Math Users Guide How to typeset most formulas!
  • The (Not So Short) Introduction to LaTeX   This is a book. It explains the overall philosophy of LaTeX, text mode, math mode, insertion of table of contents, images, figures, chapters, sections, appendices, index, and lots of other stuff.
  • More Math into LaTeX by George Gratzer. A free PDF download for BYU students. This is an extensive textbook. You will need to log on through the BYU authentication page.

A few software options

  • Pros of Overleaf:  Free. Several nice editor features. User friendly. Video tutorials.
  • MiKTeX comes with TeXworks, which is a built-in text editor and previewer a lot like the online options.
  • Pros:  Fast Compiling.  No dependency on internet connection.  Easier to use on a small screen than the online editors. You should turn on syntax highlighting and line numbers.
  • When you install MiKTeX, you should set the paper size to "letter" (the default is the European A4 size).  Also, let MiKTeX download any missing packages automatically.
  • Note: You can download other free text editors that are better than TeXworks that will still use the MiKTeX compiling engine.
  • The MacTeX installer includes both a LaTeX compiler and a text editor called MacTeX. Go to the website and follow the instructions to download and install the latest version. MacTeX is very similar to TeXworks except that is runs only on Mac.
  • TeXstudio (Windows, MacOsX, Linux) — My favorite freeware LaTeX editor. It has graphical pallets to help you if you don't remember all of the LaTeX command and environments. It has a built-in PDF previewer. You need to install a TeX/LaTeX system like MiKTeX first before installing this. If you have a 4K high resolution computer monitor, you will need to go to "Options|Configure TeXstudio|Show Advanced Options|GUI Scaling" and drag the sliders to make the symbol pallets larger.
  • WinEdt + MiKTeX + Sumatra PDF (Windows only)  WinEdt is not freeware, but it is very versatile and infinitely customizable. For the programmer type, this might be the best Windows editor for LaTeX files.
  • LyX (Windows, Mac, Linux) — A freeware graphical front end for LaTeX. As you edit documents, formulas actually look like formulas!!! LyX is difficult to use if you don't already understand basic LaTeX. Learn LaTeX using a simple editor first, then try LyX. I can type most documents more quickly with the old-school method of directly editing the *.tex file with a text editor and compiling to create a PDF file. However, I sometimes use LyX to type long, complicated, multiline formulas where the source code becomes very complicated.

Microsoft Word, PowerPoint, Excel, and OneNote all support a genuine equation environment, called a Math Zone, similar to LaTeX math mode. Learning how to use Math Zones well is at least as difficult as learning LaTeX. However, since the amount you need to learn to type only calculus formulas is relatively small, it's pretty easy to get started. You will save a lot of time by learning the keyboard shortcuts rather than using the click-on pallets and icons. In an MS Math Zone, you can type many LaTeX commands and the autocorrect feature will convert the LaTeX command into a unicode math character. If you learn how to use math zones well, your equations will look quite good. If you prefer to use Microsoft software (for example if you become a public school teacher it might be more natural to use MS Word than LaTeX), I recommend Murray Sargent's excellent Math in Office Blog for tips. In one of his blog articles about unicode , he refers to Unicode Technical Note #28, UnicodeMath, a Nearly Plain-Text Encoding of Mathematics which explains many of the keyboard commands that make typing mathematics in MS Office documents much easier and better looking. I found the book Creating Research and Scientific Documents Using Microsoft Word to be quite helpful. (I purchased the book a few years ago for about $20.) Microsoft Word is actually pretty good at making all of the standard calculus formulas and symbols.

Although you won't use MS PowerPoint to type homework, you might use it to make a presentation at a conference or for another class. You can insert genuine LaTeX formulas into PowerPoint by using a plugin called IguanaTeX . It's very easy to use. Also formulas created in Microsoft Math Zones look good in PowerPoint.

LaTeX Templates

If you would like to use LaTeX for homework, you can start by copying one of these templates, and then filling in your responses. This should prevent you from having to spend time on formatting.

To get up-and-running quickly, you can use the Overleaf online editor, which is essentially Google Docs but for LaTeX. They also have tutorials . You may prefer to install LaTeX to your computer, in which case you can use any text editor. For Emacs users, the AUCTeX plugin is very popular.

A LaTeX Homework Template

October 4, 2014

Writing a LaTeX document from scratch for every assignment is tedious. Especially for homework assignments, a lot of the structure is repetitive. Read on to learn about the homework template I’ve adapted for use in all my technical classes.

I’ve been using LaTeX for assignments in college for over a year now, and from the get-go I loved it; It’s a powerful way to transform plain text (which is editable in Vim!) into beautiful documents. In fact, I use LaTeX + Vim or Google Docs exclusively–no Microsoft Office. People often don’t understand why I prefer this combination, claiming that LaTeX is time consuming and tedious. But with a good template and some Vim-foo, editing LaTeX is a breeze. In a later post, I’ll elaborate how I use Vim + Unix as an IDE for LaTeX. For now, though, let’s take a look at my template!

The Template

For those who like to learn by doing, I invite you to jump over to GitHub where you can see the source, download the template, and start tinkering. The source isn’t that long, and it comes with tons of examples to get you going.

The rest of this post goes into some fancy use cases for how to get the best out of this template. If you don’t read it now, check it out later if you want to take advantage of it’s more powerful features. You can also leave comments here asking how something works, and issues on GitHub if something’s broken.

Here’s a quick overview of what the theme looks like. You’ll have to use your imagination a bit: this outline is more of a list of examples. I’d show you how nice one of my actual homeworks looks, but then I’d be giving out my homework!

My main use case for LaTeX is (unsurprisingly) to typeset homeworks for math and CS classes. In these classes, the questions are either numbered or have specific names, and they ask for your name, lecture, recitation section, student ID, email address, etc. It turns out that there are some pretty simple ways of modularizing each of these desired features.

Personal Info

To solve the issue of entering personal information, the template defines a bunch of commands at the top of the file that enumerate all the fields you’ll likely want to include on your homework.

This is where forking comes in particularly handy . You’d like to be able to define your own defaults and push them somewhere, but you also want to be able to update the template as new changes become available. If you fork the repo, you can both have a repository where you can include your own changes as well as pull any updates as they become available. (If you’re new to forks, you should definitely check them out ).

Whenever I have an assignment to do, the questions generally come down to one of two forms: named or numbered questions. As such, there are two environments in the template that let you easily create a space to put your answers for each type of question. These are named namedquestion and numedquestion ( not numberedquestion ).

The namedquestion environment takes one required argument: the name! This environment is handy any time the questions don’t have numbers attached to them, or if the ordering of the questions doesn’t conform nicely to a sequential numbering.

The numedquestion environment takes no arguments, but that doesn’t mean you can’t configure it. By default, numedquestions begin counting at 1 and go up sequentially from there. To change this, you manually set the contents of the questionCounter counter. Using

Before the first question will start the numbering at 0. You can use this pattern (set the questionCounter to one less than the next question) to arbitrarily skip around with your numbering. There’s an example of this in the source.

There are also times when you’d like numbered questions to be of the form “X.y”, where “X” is the section number that the question comes from, and “y” is the number of the question within that section. The template tracks the value of “X” in \writtensection . By default, the template sets this to 0, which causes the section number to be omitted. If you manually set \writtensection to a non-zero value, this number will be prepended to all questions. When you do this, the value of “y” is determined by questionCounter .

Similar to what we could do with questionCounter , you can manually turn on the section counter for certain questions by including something like

in front of that particular question. Use \renewcommand{\writtensection}{0} after that question if you’d like to turn it back off.

Question Parts

All in all, these two environments will take care of 90% of what you need to do in your homework. Sometimes, though, questions have multiple parts. To handle this, there are two environments, alphaparts and arabicparts , that take care of alphabetic and numeric question parts, respectively.

The uses of these environments are pretty straightforward and have no real special cases. Each environment wraps around the enumerate environment. This means you can just use a normal \item to indicate a specific part of the question.

Induction Proofs

There’s one more thing that I’d like to mention here. Different people have different ways of typesetting induction proofs, with varying degrees of success. Personally, I like the description environment for outlining the base case, induction hypothesis, and inductive step of the proof. It works well for basically every induction proof, and looks nice and clean.

Be sure to let me know how you like this template! It works for me, but obviously I’m only using it for a small number of things on exactly one system. If something doesn’t seem to work, or if you’d like to see a particular feature implemented, comment or create a GitHub issue to let me know!

  • Starting out with T e X...
  • CTAN Background
  • T e X user groups
  • Upload basics
  • Upload addendum
  • T e X Directory Structure
  • T e X Archive
  • Contributors

Announcements

  • Extended search
  • File search

homework – A L a T e X class for writing your homework

The current document class is for writing homework. It has the following features.

  • Simple and clear interface.
  • Built-in support for many theorem-type environments, already configured and ready to use.
  • Multilingual support.
  • Page numbers are of the form “Page [current] of [total]”, which can help you ensure that there are no missing pages when you print your homework for submission.
  • Support writing problem statements and solutions (or proofs) in different colors.
  • Every statement and solution has its own QED symbol, in hollow or solid shape, respectively.
  • You can mark the unfinished parts, and a report shall be generated at the end of your document for reminding.

Download the contents of this package in one zip archive (540.1k).

Community Comments

  • 2024-02-22 CTAN update: homework
  • 2023-10-16 CTAN update: homework
  • 2023-10-04 CTAN update: homework

Suggestions

Maybe you are interested in the following packages as well.

  • assignment: A class file for typesetting homework and lab assignments
  • uhhassignment: A document class for typesetting homework assignments
  • beaulivre: Write your books in a colorful way
  • colorist: Write your articles or books in a colorful way

Package Links

Assignments

Assignments, also known as homework, are usually given to school or university students to reinforce their knowledge of a subject and aid in learning. They are typically structured in question and answer form to be completed by the student consecutively.

latex for homework

fphw Assignment

This template is for formatting assignments or homework in a clear and simple way. The title section at the top of the first page clearly displays the assignment, student and class information. This information also appears in the headers and footers of subsequent pages. Questions in the assignment are clearly demarcated and appear inside boxes to focus attention. The template features examples of including images, tables, equations and code listings for covering virtually all common assignment information. Multi-part questions and answers are shown for more complex questions.

  • View Template Information

Wenneker Assignment

This template can be used by teachers or students for school or university assignments. It contains a clear title section at the start to specify the assignment class, title, date and teacher/student name. The template supports up to 4 levels of sections to structure the assignment into sections, questions, subquestions and bonus content. Examples of common assignment content are included: figure, equations, lists, table, code and paragraphs of text.

Lachaise Assignment

This template is for teachers/instructors/educators to create assignments/homework for their students. It includes a clear title on the first page for the course, assignment and teacher’s name, as well as the institution and date. Sets of questions can be grouped by headings and the template includes examples of unnumbered and numbered sections, and numbered subsections (for longer assignments). Amongst the description text for each question, examples are provided for virtually any subject matter, including: equations, algorithms, code and command line outputs.

Cleese Assignment

This template comes in two versions, one for teachers/instructors/educators to create assignments/homework for their students to fill out by hand, and another for students proficient in LaTeX to answer questions posed to them at school or university/college. Both versions contain simple environments for each question and subquestion within, and allow answer boxes to be created with either an answer or blank for space to write an answer. Sets of questions can be grouped by headings and the template includes examples of including an image, table, equation and code within questions.

latex for homework

LaTeX Templates Information

General enquiries [email protected]

Most templates licensed under CC BY-NC-SA 4.0

LaTeX Templates is developed in New Zealand

© Creodocs Limited. All Rights Reserved.

LaTeX Example :: Homework Assignments (and Similar)

All of the writing that I do in graduate school is done in LaTeX and typeset in TeX . In order to rapidly learn LaTeX , I decided to submit all of my homework assignments using it. At first, this made assignments take a little longer, but once I got used to it, there were lots of benefits, and, of course, I definitely learned a lot about LaTeX and TeX .

During this time, I put together a LaTeX template for homework assignments (and other similar papers). I'm posting that here in the hope that it will make it easier for others to get started using LaTeX in their homeworks (and then hopefully also in their research publications).

In the templates posted below, I use Stephen Riehm's bracketing rules to mark places where user text should be merged into the template. In other words, wherever you see a <+ place holder +> , replace it with the appropriate text. Example text will be given in the caption of the place holder. If you are like me and use VIM , then you should be able to use <C-j> to move from place holder to place holder. (just like moving from bullet to bullet with <C-space> in WinEdt ; in fact, I used to use bullets in these files instead, but I started using VIM more than WinEdt, and VIM place holders are more descriptive than WinEdt bullets)

  • homework_tex.ascii – click here to view homework.tex in browser
  • homework_tex_example_tex.ascii – click here to view homework_tex_example.tex in browser
  • homework_tex_example.pdf – a pdf rendered from the example

NEW!!  – I have made two additional similar homework templates that may also be helpful. Both of these include a subtitle that will be excluded if the subtitle is left blank. Both also include a \matlabscript and a \scalefig macro for including MATLAB scripts and figures easily. Otherwise, the first is almost identical to the original template. The second uses a different type of homeworkProblem that is a macro rather than an environment. This macro allows for subtitles to be used on each homework problem. The titles of the homework problem will be included in the header and footer information while the subtitles will only be shown at the beginning of each problem.

There are comments within the templates that explain the usage of the new macros. See the simple examples for more help. The examples make use of \matlabscript and \scalefig .

  • homework_new_tex.ascii – click here to view homework_new.tex in browser
  • homework_new_example_tex.ascii – click here to view homework_new_example.tex in browser
  • homework_new_example.pdf – a pdf rendered from the example
  • NOTE: This example shows a subtitle being used and a caption on the MATLAB script.
  • homework_type_2_tex.ascii – click here to view homework_type_2.tex in browser
  • homework_example.m file used in source: (.m file)   (.ascii file for browser)
  • homework_type_2_example_tex.ascii – click here to view homework_new_example.tex in browser
  • homework_type_2_example.pdf – a pdf rendered from the example
  • NOTE: This example shows the use of no subtitle and no MATLAB script caption.

Example of math homework exercises

Sample LaTeX document of math homework, created by Robert Hanson.

Source: Robert Hanson webpage .

This template was originally published on ShareLaTeX and subsequently moved to Overleaf in October 2019.

Example of math homework exercises

Have you checked our knowledge base ?

Message sent! Our team will review it and reply by email.

IMAGES

  1. A LaTeX Homework Template

    latex for homework

  2. Latex Homework Template

    latex for homework

  3. [Tex/LaTex] Homework Problem Sheet Template

    latex for homework

  4. Latex Template For Homework

    latex for homework

  5. Latex Template For Homework

    latex for homework

  6. Writing Homework In Latex

    latex for homework

VIDEO

  1. #latex #fashion #catsuit #rubber #aesthetic #латекс #мода #фото #эстетика

  2. How to Set Up and Use LaTeX For Writing Homework/Math/Science

  3. รีวิวชุดหนัง Latex แนบเนื้อที่เซเลปใส่ เมื่อเราใส่จะเป็นยังไง? 🤎

  4. 100% Pure Kerala Latex with Orthopedic mattress with certifications #bed #furni #factoryoutlet

  5. slick latex leather outfits leather dresses leather ladies dress fashion latex leather outfits

  6. What is a Latex Fetish and what is Special with Latex?

COMMENTS

  1. Doing Your Homework in LaTeX

    Doing Your Homework in LaTeX. It is a common occurrence for other students to comment on my homework whenever I turn it in for one of my classes. The complete LaTeX file (and the pdf output) can be found in my repository, latex-homework-template. View on GitHub. Below are a few screenshots of problems that I've done in the past: Cover page ...

  2. Templates

    Templates tagged Homework Assignment. Show all Templates. Here we provide a selection of homework assignments templates and examples for school, college and university use. These often include a question and answer section already set out, along with space for the student name, course title, date and any other required information.

  3. 02 Using LaTeX for Homework

    We have seen that $ is used to surround math code. The backslash character, \, is used for LaTeX commands, and braces, { and } , are used to enclose the parameters to which a command applies. For example, in \sqrt{b^2-4ac}, the command is \sqrt , the parameter is b^2-4ac, and the typeset result is b 2 − 4 a c.

  4. How to TeX your homework

    The TeX template used in the video is included at the bottom of this post. You can paste this into a .tex file locally, or into Overleaf. If you're just starting out, I recommend using Overleaf as your TeX editor. You can use Detexify to hand-draw a symbol to find the LaTeX command for it. There is also a nice WikiBook on LaTeXing mathematics.

  5. Simple Math Homework Template

    LaTeX Project Public License 1.3c. Abstract. I had to relearn LaTeX to turn in my real analysis homework last night, so I made it into a template in case others are in the same situation. Tags. Homework Assignment Math.

  6. Homework Template with Samples

    7 months ago. License. Creative Commons CC BY 4.0. Abstract. This is a template for completing homework assignments. It includes examples of how to use the template and how to type up various types of assignments. Tags. Homework Assignment University. Find More Templates.

  7. Class file for Homework/Assignments

    This file is used by inserting \documentclass{jhwhw} at the beginning of a document. The standard formatting for a problem looks like this: <<statements of problem>>. <<solution>>. It creates a new page for every problem. Also, if a problem has multiple "parts" the formatting might look like this. \begin{enumerate}

  8. LaTeX Resources

    Here is a link for a homework template . Math 341 Homework Template . as a starting point for your homework assignments typed in LaTeX. Hint: ... Fancier LaTeX Editors After you have been creating LaTeX files for a while you will probably start wanting some additional editing features. Here are a few options to consider.

  9. Math N55: LaTeX Templates

    LaTeX Templates. If you would like to use LaTeX for homework, you can start by copying one of these templates, and then filling in your responses. This should prevent you from having to spend time on formatting. HW 3. To get up-and-running quickly, you can use the Overleaf online editor, which is essentially Google Docs but for LaTeX.

  10. How I Format My Homeworks in LaTex

    I've been doing all my homework in LaTex, and figured I'd show you how I format the homework. Pretty straight forward, as I said I'm sure there's better ways...

  11. The LaTeX homework Document Class

    There are LaTeX document classes for typesetting books, articles, exams, presentations, and more. Now, there's one for homework assignments, too. Source. Check out and download the source on GitHub. What. This is a LaTeX document class. That means you use it with \documentclass{homework} at the top of the document. It provides a document ...

  12. Writing Math Homework in LaTeX

    Need easily formatted and good looking math homework? In this video I demonstrate how I write my homework in LaTeX.LaTeX is a text setting language which all...

  13. A LaTeX Homework Template

    In fact, I use LaTeX + Vim or Google Docs exclusively-no Microsoft Office. People often don't understand why I prefer this combination, claiming that LaTeX is time consuming and tedious. But with a good template and some Vim-foo, editing LaTeX is a breeze. In a later post, I'll elaborate how I use Vim + Unix as an IDE for LaTeX.

  14. Learn LaTeX in 30 minutes

    What is L a T e X?. L a T e X (pronounced "LAY-tek" or "LAH-tek") is a tool for typesetting professional-looking documents.However, LaTeX's mode of operation is quite different to many other document-production applications you may have used, such as Microsoft Word or LibreOffice Writer: those "WYSIWYG" tools provide users with an interactive page into which they type and edit ...

  15. CTAN: Package homework

    T. X. class for writing your homework. The current document class is for writing homework. It has the following features. Simple and clear interface. Built-in support for many theorem-type environments, already configured and ready to use. Multilingual support. Page numbers are of the form "Page [current] of [total]", which can help you ...

  16. LaTeX Templates

    Lachaise Assignment. This template is for teachers/instructors/educators to create assignments/homework for their students. It includes a clear title on the first page for the course, assignment and teacher's name, as well as the institution and date. Sets of questions can be grouped by headings and the template includes examples of ...

  17. How do I create a simple page of homework in LaTeX?

    5. Here's one possibility: The first page of the resulting document: I defined some commands \idnumber and \classname for the ID number and the class name; the \makeheader command typesets the information for these two commands and \author, \title with the desired formatting.

  18. Overleaf Homework Template

    An online LaTeX editor that's easy to use. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more.

  19. Example LaTeX Template for Homework Assignments and Similar

    homework_tex_example.tex - an example assignment using the template. homework_tex_example_tex.ascii - click here to view homework_tex_example.tex in browser. homework_tex_example.pdf - a pdf rendered from the example. NOTE that changing the documentclass from article to report will take the page number off of the title page and start the ...

  20. I found a great Documentclass for Homework! : r/LaTeX

    LaTeX can indeed help make math and physics homework look professional. It's fantastic that you were able to quickly grasp the syntax and create a well-structured document. It's also smart of you to search for solutions to improve the formatting of your LaTeX documents. The jhwh document class created by user qgp07 seems to be a great find for ...

  21. Example of math homework exercises

    Last Updated. 5 years ago. License. Other (as stated in the work) Abstract. Sample LaTeX document of math homework, created by Robert Hanson. Source: Robert Hanson webpage. This template was originally published on ShareLaTeX and subsequently moved to Overleaf in October 2019. Tags.