Graphics, Figures & Tables ⇒ mixing packages
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
mixing packages
Is it possible to combine commands from pstricks, chemfig, and tikz in the same document? (generic question, no MWE needed)
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: mixing packages
Why don't you just test?
Thorsten
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: mixing packages
I get confused how to mix rput or rnode (among others) inside tikz or chemfig commands. Can you maybe give a few examples ?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
mixing packages
It goes without saying that you can't use PSTricks commands inside environments provided by PGF/tikZ (and vice versa) without any special trick.
Regarding your example, why should this be necessary? PGF/tikZ has its own equivalent commands for nodes. And how am I supposed to give an example without you showing what you are after? m(
I suggest to read the respective manuals to learn how to translate your ideas into code.
Regarding your example, why should this be necessary? PGF/tikZ has its own equivalent commands for nodes. And how am I supposed to give an example without you showing what you are after? m(
I suggest to read the respective manuals to learn how to translate your ideas into code.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: mixing packages
pstricks's node commands allow to set which angle the node connections should connect between 2 nodes and it's rput or uput or rnode and Rnode commands can be set inside pieces of text. I don't think any node commands can be set in a text body with tikz.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
mixing packages
Mistaken. See Section 16.13 of the PGF/tikZ manual.ghostanime2001 wrote:[…] I don't think any node commands can be set in a text body with tikz.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
mixing packages
For example I am trying to include a node that looks like normal text but want to connect it with something later. However something happens to the node when I use it with tikz
Code: Select all
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri}
\pagestyle{empty}
\begin{document}
The quick brown \tikz \node {cat}; jumps over the lazy fox \\
The quick brown cat jumps over the lazy fox
\end{document}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
mixing packages
You have to do some adjustments. Try something like this.
Further reading:
Code: Select all
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\newcommand{\textnode}[1]{\tikz[baseline=(W.base)]\node[inner sep=0pt] (W) {#1};}
\begin{document}
The quick brown \textnode{fox} jumps over the lazy dog. The quick brown fox jumps over the lazy fog.
\end{document}
- The PGF manual
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: mixing packages
pstricks seems like a better option for something like this
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
mixing packages
That is in the eye of the beholder. PSTricks has other pitfalls instead. I see no problem in doing such things PGF/tikZ.ghostanime2001 wrote:pstricks seems like a better option for something like this
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10