Adding Black Squares & Line Numbers in LaTeX Equations

  • LaTeX
  • Thread starter maverick280857
  • Start date
  • Tags
    Latex Tag
In summary, the person is asking for help on how to place a blacksquare before equations and have line numbers for their term paper, which is due in 2 hours. They mention knowing the necessary command and package, but needing to place the blacksquare on the left and have the correct equation number displayed on the right for only a few equations. They thank the others for their help.
  • #1
maverick280857
1,789
4
Hi everyone,

I BADLY BADLY need to place a \blacksquare before my equations AND also have line numbers, as shown in the sample attachment.

Someone please let me know how this can be done. My term paper is due in 2 hours!

Thanks,
Vivek
 

Attachments

  • tag.jpg
    tag.jpg
    5.5 KB · Views: 584
Physics news on Phys.org
  • #2


\blacksquare

is the command


and you need the package amssymb called at the start.
\usepackage{amssymb}
 
  • #3
Yes, I knew the command (as stated in my post) and the package. But as I said, I needed to place the blacksquare on the left of the equation, and also simultaneously display the correct equation number on the right hand side. Oh and I forgot to mention that I had to do this only for a few equations (the key results).

Thanks anyway.
 

1. How do I add black squares in a LaTeX equation?

To add a black square in a LaTeX equation, you can use the \blacksquare command. This will insert a small black square at the current location in the equation.

2. Can I change the size of the black square in a LaTeX equation?

Yes, you can change the size of the black square by using the \rule command. For example, \rule{1em}{1em} will create a black square that is 1em by 1em in size.

3. How do I add line numbers to a LaTeX equation?

To add line numbers to a LaTeX equation, you can use the \linenumbers command from the lineno package. This will automatically number each line in the equation.

4. Can I customize the appearance of the line numbers?

Yes, you can customize the appearance of the line numbers by using the \setrunninglinenumbers and \setdisplayedlinenumbers commands from the lineno package. These commands allow you to specify the type of numbering and the starting number.

5. Is it possible to add black squares and line numbers in the same equation in LaTeX?

Yes, it is possible to add both black squares and line numbers in the same equation in LaTeX. You can use the same techniques mentioned above to add both elements to your equation.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
16
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
274
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
5K
  • Electromagnetism
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
21
Views
761
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
Back
Top