LaTeX/C3/Inserting-line-breaks-in-Equation/English

From Script | Spoken-Tutorial
Jump to: navigation, search

Title of the Script: Inserting line breaks in Equation.

Author: Ambika Vanchinathan, Ketki Bhamble

Keywords: latex, breqn package, automated equation breaking, dmath, dmath*, video tutorial.


Visual Cue Narration
Slide 1

Title Slide

Welcome to the Spoken tutorial on Inserting line breaks in Equation.
Slide 2

Learning Objectives

In this tutorial, we will learn to use,
  • break equation package
  • dmath for automatic line breaking
  • \left and \right commands to adjust the delimiters.
  • dmath* for line breaking without numbering
Slide 3

System Requirements

To record this tutorial, I am using:
  • Ubuntu Linux OS version 22.04
  • TeXworks version 0.6.6
Slide 4

Pre-requisites

To follow this tutorial, learners should have basic knowledge of LaTeX.
Slide 5

Code files

The following code file is required to practice this tutorial:

1. breqn-eg.tex

The following code file is required to practice this tutorial.

This file is provided in the Code Files link of this tutorial page.

Let us get started.
Highlight:

\usepackage{breqn}

This command imports the break equation package.

It helps to automatically break long equations into multiple lines.

Highlight:

Lines 13 to 23

Note the long equation.
Highlight:

\begin{equation}

\end{equation}

Click the green Typeset button and show the output.

Place the cursor on the output.

We used \begin{equation} and \end{equation} to display the equation.

Click the green Typeset button to run the code.

Here is the output.

Observe that the equation is not properly aligned as per the margin.

Comment line number 13 and 23.

Uncomment line number 14 and 22.

Click the green Typeset button to run the code.

Place the cursor on the output.

Highlight:

\begin{dmath}

\end{dmath}

Let us comment line number 13 and 23 and uncomment line number 14 and 22.

Let’s run the code.

Observe that the equation breaks into 3 lines.

The dmath environment from breqn breaks the equation into lines and numbers it.

Highlight:

\left[ at line 16 starting and

\right] at line 20 ending

The \left and \right commands adjust de-limiter size to fit the enclosed content.

They automatically resize parentheses, brackets, and other delimiters.

Notice that the manual line break command \\ is not used.

Comment lines 14 and 22

Uncomment lines 15 and 21

Click the green Typeset button

Let’s comment line number 14 and 22.

And uncomment line number 15 and 21.

Let’s run the code.

Here again the equation breaks into 3 lines.

The dmath* environment from break equation breaks the equation.

It does not display the equation number.

Slide 6

Summary

In this tutorial, we have learnt to use:

  • breqn package
  • dmath for automatic line breaking
  • \left and \right commands to adjust the delimiters.
  • dmath* for line breaking without numbering
With this we come to the end of this tutorial.

Let us summarise.

Slide 7

Assignment

As an Assignment

Test breqn's behavior with $...$ inline math

Slide 8

Thank you

Thank you for joining.

Contributors and Content Editors

Ketkinaina, Madhurig