Adding Arrows to a Line in LaTeX

  • Context: LaTeX 
  • Thread starter Thread starter Dustinsfl
  • Start date Start date
  • Tags Tags
    Latex Line
Click For Summary

Discussion Overview

The discussion revolves around adding arrows to lines in LaTeX using TikZ. Participants explore various methods for achieving different arrow styles and placements, as well as sharing tools for creating figures in LaTeX documents.

Discussion Character

  • Technical explanation
  • Exploratory
  • Debate/contested

Main Points Raised

  • Some participants inquire about how to add arrows to a line using TikZ, specifically asking for examples of code.
  • One participant suggests using the command \draw [<->](3.14,-3.14) -- (3.14,3.14) to create double-headed arrows.
  • Another participant expresses a desire for arrows to be placed at specific intervals along a line, questioning the output of the command [->>].
  • A participant shares a code snippet using the TikZ library for placing arrows at specific positions along a line, indicating a method to achieve this effect.
  • Several participants discuss the use of the Ipe extensible drawing editor for including figures in LaTeX documents, sharing experiences and troubleshooting installation issues.
  • There are inquiries about the setup process for Ipe and how to integrate it with other tools like Winedt.

Areas of Agreement / Disagreement

Participants express various methods for adding arrows, but there is no consensus on the best approach or specific implementation details. Some questions remain unresolved regarding the placement of arrows at intervals.

Contextual Notes

Participants mention specific versions of software and dependencies, indicating potential limitations in compatibility and setup processes. The discussion includes technical details that may depend on individual setups and configurations.

Who May Find This Useful

This discussion may be useful for LaTeX users interested in graphical representations, particularly those using TikZ for drawing and those exploring external tools like Ipe for figure creation.

Dustinsfl
Messages
2,217
Reaction score
5
How can I add a couple arrows on this line?
Code:
\draw (3.14,-3.14) -- (3.14,3.14
 
Physics news on Phys.org
dwsmith said:
How can I add a couple arrows on this line?
Code:
\draw (3.14,-3.14) -- (3.14,3.14

This will do I guess,

Code:
\draw [<->](3.14,-3.14) -- (3.14,3.14);
 
Sudharaka said:
This will do I guess,

Code:
\draw [<->](3.14,-3.14) -- (3.14,3.14);
Code:
^
|
^
|
I am looking for something like this.
 
dwsmith said:
Code:
^
|
^
|
I am looking for something like this.

Then the following may help.

Code:
\draw [->>](3.14,-3.14) -- (3.14,3.14);
 
There is a drawing editor called Ipe extensible drawing editor which can be used to include figures in LaTeX documents. I am using this for a long time now and I find it quite handy. Since I saw a couple of threads made by you regarding drawing figures in LaTeX, thought you might be interested in this. :)
 
[->>] produced the arrow heads right behind each other. Is there a way to put arrows at 1/3 intervals on the line?
 
Sudharaka said:
There is a drawing editor called Ipe extensible drawing editor which can be used to include figures in LaTeX documents. I am using this for a long time now and I find it quite handy. Since I saw a couple of threads made by you regarding drawing figures in LaTeX, thought you might be interested in this. :)

So I downloaded 7.0.1 but it says I need the 7.0.0 directories. Where do I get those at? How do I set it up once I have everything?
 
dwsmith said:
[->>] produced the arrow heads right behind each other. Is there a way to put arrows at 1/3 intervals on the line?
The code

Code:
 \usetikzlibrary{decorations.markings}
  \begin{tikzpicture}
 \draw[decoration={

 markings,% switch on markings

 mark=at position .66 with {\arrow{>}},

 mark=at position 1 with {\arrow{>}}},

 postaction={decorate}] (0,0) -- (0,1);

 \end{tikzpicture}

produces this:

View attachment 353

The option decoration can be given to the environments tikzpicture or scope instead of individual draw commands. Then you can use the postaction={decorate} option only in certain draw commands.

For more information, see section 30.5 and in in particular 30.5.1 on p. 331 of TikZ manual v. 2.10.
 

Attachments

  • double-arrow.png
    double-arrow.png
    179 bytes · Views: 108
dwsmith said:
So I downloaded 7.0.1 but it says I need the 7.0.0 directories. Where do I get those at? How do I set it up once I have everything?

Please unzip the zip file you have downloaded and read the read-me file in it. There you will find that you need a file called, ipe-7.0.0-dependencies-win.zip. That can be downloaded http://fr.sourceforge.jp/projects/sfnet_ipe7/downloads/ipe/ipe-7.0.0-dependencies-win.zip/. Proceed as the read-me file instructs.
 
  • #10
Sudharaka said:
Please unzip the zip file you have downloaded and read the read-me file in it. There you will find that you need a file called, ipe-7.0.0-dependencies-win.zip. That can be downloaded http://fr.sourceforge.jp/projects/sfnet_ipe7/downloads/ipe/ipe-7.0.0-dependencies-win.zip/. Proceed as the read-me file instructs.

Where do I save the files? How do I tell Winedt to interact with it?
 
  • #11
dwsmith said:
Where do I save the files? How do I tell Winedt to interact with it?

Did you do what the read-me tells? Just unzip the "ipe-7.0.0-dependencies-win.zip" to the previously unzipped Ipe folder(where the read-me file lies). Then go to ipe-7.0.10-win--> ipe-7.0.10--> bin-- >ipe
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K