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
5
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: 607
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.
 

FAQ: Adding Black Squares & Line Numbers in LaTeX Equations

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

Replies
6
Views
2K
Replies
16
Views
3K
Replies
11
Views
4K
Replies
3
Views
793
Replies
4
Views
2K
Replies
4
Views
3K
Replies
2
Views
3K
Replies
1
Views
5K
Back
Top