Tagged Questions
6
votes
2answers
47 views
Increasing vertical space between two subpictures
I'd like to increase the distance between the upper pictures and the lower ones (a-c and b-d are too close to eachother). I'm new to tikz and I really don't know where to put my hands on. Thank you.
...
6
votes
1answer
105 views
Code improvement and suggestions in template
Consider the following MWE:
\documentclass[12pt,twoside,letterpaper]{report}
\usepackage[text={4.95in,7.5in},centering,bottom=1.5in,showframe]{geometry}
\usepackage[dvipsnames]{xcolor}
...
5
votes
1answer
65 views
How to eliminate spacing in tikzpicture?
It seems that, when using Tikz, nodes and/or the tikzpicture environment add space around a drawing. An example is shown in the following MWE, where a simple square is drawn three times. First it is ...
2
votes
1answer
60 views
Paragraph Spacing within a Tikz Environment
I am looking to replicate the look of paragraphs within a tikz environment (actually a minipage).
\documentclass[letterpaper,12pt]{book}
\usepackage{tikz}
...
9
votes
1answer
90 views
Where is the trailing space after TikZ node text gone?
I've been fiddling with TikZ nodes to get framed text (part of mdframed boxes, but that's beside the point) when I discovered something that puzzles me. If you run the code below:
...
2
votes
2answers
128 views
barchart in pgfplots looks really bad
Problems:
The bar value "90" is written over a black line, almost impossible to read
The value "58" is written over an x tick, hard to ready
Bar spacing is bad. There is too much space between the ...
2
votes
2answers
140 views
How to horizontally top-align multiple \tikzpicture's without using \hspace?
The use case I'm having is the following:
\documentclass{article}
\usepackage{amsmath}
\usepackage[showframe]{geometry}
\usepackage{qtree}
\begin{document}
\Tree [.A B C [.D E ] ]
\Tree [.F [.G H ...
6
votes
1answer
196 views
TikZ: Controlling text within nodes and placing nodes in text
Need some help working with TikZ. Let me begin by saying that I think TikZ is amazing. I hardly know what I'm doing at this point and yet I've been able to draw some very nice diagrams with it.
...
2
votes
1answer
84 views
Center alignment of tikzpicture outside figure environment without vertical space [duplicate]
How to align tikzpicture outside figure environment without introducing vertical space? I'm aware of related questions, such as What is the correct way to center a \tikzpicture? and Should I use ...
8
votes
2answers
292 views
Reduce white space around TikZ picture?
Is there a simple way to reduce the amount of white space around the TikZ in the MWE pasted below (in particular in the x direction)?
\documentclass{article}
\usepackage{xcolor}
\usepackage{tikz}
...
5
votes
2answers
129 views
tikz/foreach: Protect space after “iteration variable”
I try to draw some nodes in tikz, and as they are very simple I wanted to "shorten" this using a \foreach command:
\foreach \xnum in {1,2,3,4,5}
{
\node at (X\xnum center) {$x_\xnum$};
}
You ...
6
votes
3answers
174 views
Putting a coloured background behind text without adding whitespace
Consider this:
I want to be able to highlight text like this without adding space around it -- so each word in the first line should line up with the corresponding word in the second line. (I know ...
8
votes
2answers
132 views
How can I remove leading and trailing spaces from a macro argument?
Consider this minimal working example:
\documentclass[a4paper]{amsart}
\usepackage{tikz}
\tikzset{graph/.style = {every node/.style = { draw,
shape = ...
4
votes
2answers
205 views
Text block near image
I'm creating a photo address book for the community. Near the photo there are 3 text blocks 1. Names, 2. Address/phone/email and 3. native place). I want each of this blocks to be at top, center and ...
5
votes
1answer
162 views
Using a table: alignment issues and cell labels
I'm using tables with the tabular environment, with cells containing tikzpicture. I would like to center the contents of the cells both vertically and horizontally, and have little labels in the top ...
12
votes
1answer
289 views
Parallel flowcharts: conjoined nodes, arrow routing and alignment
Transitioning from GraphViz to TikZ is hurting my brain...
My task is to generate flowcharts of the following variety:
In particular, I need a method to position nodes that share borders ...
6
votes
3answers
375 views
Adjust spacing between text and horizontal rule
Please consider the following code:
\documentclass{amsart}
\usepackage{tikz}
\begin{document}
\noindent \tikz\draw(0,0)--(\textwidth,0);
Some Text. More Text. More Text. \newline
\noindent ...
8
votes
2answers
176 views
leaders and evaluation order
I made this simple latex file :
\documentclass{minimal}
\usepackage{tikz}
\newcommand\randdot{%
\tikz{\pgfmathsetmacro{\r}{0.01+0.05*random()}\fill (0,0) circle (\r);}\ }
\begin{document}
...
7
votes
1answer
380 views
Aligned pgfplots in beamer frames
I would like to reproduce the design represented in the following picture with
Beamer an Pgfplots.
Namely, I want the size of plotting area to be always the same size
and have the same position ...
15
votes
3answers
2k views
Is there a way to control whitespace around a TikZ picture?
When I draw a tikzpicture that includes paths, I get quite a bit of extra whitespace added around the elements of the picture. Depending on the elements the figure contains, this can work out in some ...
5
votes
1answer
650 views
Remove top and bottom margins around listings
When using the lstlisting environment, or similar ones from the listings package, there are paragraph-like margins above and below the actual text. This makes sense in a paper, but gets in the way if ...
2
votes
1answer
172 views
Stretching text in a node in a tree
I'm trying to make a try, similar to the one visible here.
As it is seen in the example, the writer wrote Bag 1 $4W, 3B$ and got it in two different lines. I don't want that; I want the lines to ...
7
votes
1answer
654 views
TikZ: vertically aligning text in nodeparts
I can't seem to vertically align text in different nodeparts of the same node.
This MWE
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes}
\begin{document}
\begin{tikzpicture}
...
6
votes
1answer
2k views
Spacing in pgfplots bar plot
I've been trying to plot an xbar graph using pgfplots within a tikzpicture. I want to be able to only show the yaxis on the left and the x axis on the bottom. When I set axis y line=left and axis x ...
9
votes
1answer
357 views
Strange difference in usage of \pgfmathprintnumber
I encountered a strange spacing difference in the following example:
\documentclass{article}
\usepackage{tikz}
\begin{document}
number printer inside of fbox with -5e-5:
...
0
votes
3answers
2k views
Margins in \framebox
I have the following code:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\framebox{\begin{tikzpicture}[color=black, line width=0.4mm]
\draw (0,0) rectangle (5mm,5mm);
...
4
votes
1answer
382 views
Vertical spacing problem related to the mdframed environment
I use the mdframed package with option style=1, which means that TikZ is responsible for drawing frames:
\documentclass{article}
\usepackage[style=1]{mdframed}
\begin{document}
\noindent
Text
...
11
votes
2answers
744 views
Tikzpicture with overlay takes up space
Consider this MWE:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
\node [circle, fill=red!90!black, minimum width=15em] at (current ...
3
votes
2answers
289 views
I want to fill all the space between paragraphs on a page with a grid(graphic)
I took an example from another answer to a similar question (How to define a figure size so that is consume the rest of a page?).
On a page of an exam paper I want the following:
Question
...
2
votes
1answer
1k views
How to shorten the length of an arrow?
I use tkz-graph.sty from Altermundus. When I make an arrow from vertex A to vertex B, the arrow is too long: it goes from the center of A to the center of B. Can I shorten the arrow on both ends by a ...