\documentclass[dvipdfmx]{ltjsarticle} \usepackage{tikz} \usetikzlibrary{intersections,calc,arrows.meta} \begin{document} \begin{tikzpicture} \coordinate[label=left:A](A)at(0,0) \coordinate[label=right:B](B)at(3,0); \coordinate[label=above:C](C)at(2,2); \draw(A)--(B)--(C)--cycle; \end{tikzpicture} \end{document}
LaTeX forum ⇒ Math & Science ⇒ The vertices overlap in tikz
The vertices overlap in tikz
the vertics overleap in my code. Why? please tell me a good code...
- Attachments
-
- スクリーンショット (91).png (11.44 KiB) Viewed 1140 times
The vertices overlap in tikz
Please mark multiline code using the suitable tags.
A semicolon is missing at the end of the first
A semicolon is missing at the end of the first
\coordinate
command.The vertices overlap in tikz
Bartman wrote:Please mark multiline code using the suitable tags.
A semicolon is missing at the end of the first\coordinate
command.
1st message>> Sorry,what does it means? Sorry I do not good at English... Could you show me a good program code?
2nd message>> oh! thank you! But the result does not change...
- Stefan Kottwitz
- Site Admin
- Posts: 9987
- Joined: Mon Mar 10, 2008 9:44 pm
The vertices overlap in tikz
Hi Autumn,
welcome to the forum!
Look at the line for coordinate A here, I put the semicolon at the end. It is missing in your original code. Every TikZ path has to end with a semicolon.
You can click on "Run LaTeX here" to see that it works.
By the way, I removed the
To 2. you accidentally used the "LaTeX" button, which is for inline code marking of LaTeX commands. For multiple lines of code, there's the "Code" button at the left top of the editor field when writing. Not perfect, I guess. I edited it above.
Stefan
welcome to the forum!
Look at the line for coordinate A here, I put the semicolon at the end. It is missing in your original code. Every TikZ path has to end with a semicolon.
%!TEX lualatex \documentclass{ltjsarticle} \usepackage{tikz} \usetikzlibrary{intersections,calc,arrows.meta} \begin{document} \begin{tikzpicture} \coordinate[label=left:A](A)at(0,0); \coordinate[label=right:B](B)at(3,0); \coordinate[label=above:C](C)at(2,2); \draw(A)--(B)--(C)--cycle; \end{tikzpicture} \end{document}
You can click on "Run LaTeX here" to see that it works.
By the way, I removed the
dvipdfmx
option, which is not compatible with LuaLaTeX, required by ltjsarticle
.To 2. you accidentally used the "LaTeX" button, which is for inline code marking of LaTeX commands. For multiple lines of code, there's the "Code" button at the left top of the editor field when writing. Not perfect, I guess. I edited it above.
Stefan
LaTeX.org admin
Who is online
Users browsing this forum: No registered users and 1 guest