{labels} is about customizing the labels of {diagrams} and mathematical constructs like {matrices}. For questions about \label or similar commands, use {cross-referencing} instead.

learn more… | top users | synonyms (1)

20
votes
3answers
3k views

How can I set the TikZ label anchor explicitly?

I want to add a label to a node, but "inside" the node. Something like this: The manual seems to indicate it might be possible, although no actual key is named. The ... anchor point for the ...
34
votes
5answers
7k views

How do I label different rows or columns of a matrix using braces?

I have a matrix enclosed in brackets [ ] (or (), or {}, or |'s, or ||'s): - a b c d - | e f g h | | i j k l | - m n o p - which I want to label like so: R |---| -- - a b c d ...
17
votes
2answers
766 views

High level digital design in TikZ

I am very new to TikZ and I have trouble making a diagram similar to the one here: My problems are specifically making MUX to get to inputs which would be on 1/3 and 2/3 of the width. Taking sigma ...
8
votes
1answer
576 views

Two level labels in bar plot

I need to group the labels in the x axis by putting a second level label. I need to separate the nodes that are grouped from the other ones or marked them somehow. For example, if I have the labels ...
20
votes
3answers
1k views

Draw dimension of a line as a decoration in TikZ

Is it possible to define in TikZ a new decoration or something like that, such that it is possible to write something like: \draw[dim={text,above}] (A) -- (B); \draw[dim={text,below}] (C) -- (D); ...
10
votes
1answer
2k views

pgfplots using strings *from data table* as x axis labels in bar chart

I've seen some of the other threads on using strings as x axis labels, but nothing that fits my situation. I'm trying to create a bar chart from a CSV file. I can do it so long as everything in the ...
4
votes
1answer
3k views

Using [midway] to label a curved path at its centre

I am trying to label two curved paths connecting two nodes with labels placed at their centres using the node[midway] option. This is something that should be very simple but I have not been able to ...
33
votes
5answers
27k views

TikZ set node label position more precisely

This seems like it should be really easy but I can't seem to find it anywhere... I'd like to be able to fine-tune the positioning of a node label. I'm aware of the ...
7
votes
1answer
2k views

Putting LaTeX table legend in a “x\y” style [duplicate]

Possible Duplicate: Tables of numbers Is it possible to put a "x\y" style legend in one cell (maybe be made up of several cells) of a table? It would be great to make the 'x' slightly lower ...
13
votes
3answers
84 views

What to consider when naming labels to prevent errors?

This question is inspired by Umlauts in label and a quote from an answer to How to automatically add \! in subscripts? However the best is to avoid _ in labels. I already name all my labels with ...
10
votes
2answers
415 views

How to generate n points over a circumference and choose label and color

I would like to place n points over a circumference like Figure 3 of this file. I'd choose the label to be assigned to each vertex and color and I'd like to have the code in TikZ-pgf.
8
votes
1answer
1k views

Different color for individual bar in bar chart & adding bar labels

Please consider the following MWE. There are three things I would like to do: Individual colouring For the last element ("not rejected") I would like to fill the bar with another color (e.g. ...
4
votes
1answer
2k views

How to place label in middle of line (above and below) with TikZ

\fbox{ \begin{tikzpicture}[scale=1,auto=center] \node[circle,fill=gray!20] (n1) at (2,8) {Node A}; \node[circle,fill=gray!20] (n2) at (8,8) {Node B}; \foreach \from/\to in {n1/n2} \draw ...
4
votes
2answers
2k views

How to make an xbar plot, with pgfplots, having different y tick labels on the left and right side y axis?

I am making an xbar plot with pgfplots. I want this plot to show the results from a test, where people in different age classes are given scores. For each of these age classes a single person is the ...
3
votes
2answers
807 views

XeLaTeX and EPS figure with consistent fonts

I'm using Miktex 2.9 and XeLaTeX plus some EPS figures. For consistent fonts along the document, I used to play with psfrag or directly use pstricks. I'm facing the situation where none of the above ...
8
votes
1answer
233 views

Label equations arbitrarily

When I have equations, as in \begin{equation} ... \end{equation} Can I arbitrarily assign the numbers to the equations? Instead of the usual order (1), (2), (3), ..., I'd like something like (1), ...
6
votes
1answer
347 views

Equation tag in twoside-mode outer

At the moment I thinking about the following think. When I use the twoside mode to write a book I want to print the number of the equation outer. I can modify it manually with these two commands: ...
5
votes
1answer
1k views

Date plot using pgfplots with odd tick label

How do I make the time label in the following image appear as "10:00" (i.e. 10 o'clock) rather than the unexpected and unwelcome "09:60"? Here's the code that I am using: \documentclass{beamer} ...
4
votes
2answers
2k views

Bar plot labels and grids

\documentclass[a4paper,11pt]{report} \usepackage{tikz} \usepackage{verbatim} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ title = {Optimalization based upon co-occurences}, ...
3
votes
1answer
326 views

Circuitikz place text above and below component

Lets say I create a component like this (0,0) to [R, l^=$R1$] (0,2) How can I make it so that the value, R1, is say, on the right hand side, and the resistance, say, 1kohm is on the left hand side? ...
2
votes
1answer
40 views

Change entry label to [Jones,82]

I'm trying to set a bibliography this way: \documentclass[12pt,french]{report} \usepackage[backend=bibtex, style=alphabetic ]{biblatex} \usepackage{filecontents} \begin{filecontents}{\jobname.bib} ...
1
vote
1answer
159 views

How to fix showing table labels in TeXstudio when using ctable package?

In TeXstudio editor one can easily choose which labels to reference as soon as you type the cross-referencing-macro you intended to use, for instance, \cref{} of the cleveref package (see image ...
27
votes
3answers
5k views

TikZ: Bend text so that it follows a line

I have two arrows going from a node on the left to a node on the right. Both arrows are slightly bent. I want to label the arrows with text that is bent just like the arrows. This is as far as I've ...
20
votes
3answers
252 views

Chart showing the relative number of pages in the document

I'm playing with the idea of adding a chart in the begining of my thesis, showing the relative dimension of each chapter (or section, maybe). This is something that I would want to generate ...
11
votes
1answer
4k views

Place label in middle of line with TikZ

What is the best way to place a label in the middle of a line with TikZ? I mean smack dab in the middle of the line, not above or below it. The following is close \begin{tikzpicture} \draw[|->, ...
4
votes
2answers
539 views

Adding labels to a formula

I have a diagram like this, explaining a formula: \documentclass{article} \usepackage{stackrel} \begin{document} $\stackrel[e+f+g+h^i]{a^b}{c d}$ \end{document} For this example, I have removed ...
9
votes
2answers
2k views

Pgfplot axis labels

I'm trying to adjust the position of my axes labels and I'm having some trouble: \documentclass{article} \usepackage{float} \usepackage{pgfplots} \usepackage{graphicx} \begin{document} ...
9
votes
2answers
234 views

Label variables of equation using tikz without using itemize

I'm trying to use tikz to label the variables of an equation. I know of a similar question (Itemized Equation) but the answer uses itemize to label the variables. I would like to do something similar ...
12
votes
5answers
1k views

How do I draw a little red square to label my right triangle?

The sample code: \documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw ( 0 , 0 ) coordinate (A) -- ( 4 , 0 ) coordinate (C) -- ( 0 , 3 ) coordinate (B) ...
4
votes
1answer
658 views

Including package to create MATLAB labels using LaTeX

When using LaTeX as the interpreter to typeset labels in MATLAB it would be great to be able to include packages to customize appearance. Is this possible? As of now I know no method to create non ...
6
votes
1answer
774 views

How to make a pgfplots stacked xbar plot with bar-“explicit meta” labels computed from input table data

I am making a pgfplots stacked xbar plot where each bar has a distinct label, in addition to a numeric bar length. Each pair of bars also has a common label. I would like to mark each bar with its ...
4
votes
1answer
334 views

Labeling Edges in a Weighted Digraph

I would like to have the labels of the edges of a weighted digraph positioned "beside" (north, south, east, west, etc.) the arrows. I have already created the digraph with: \documentclass{article} ...
4
votes
1answer
194 views

Aligning marginal notes with center of line rather than baseline

I would like to have all references in my document (to equations, figures, lemmas, random locations in text, etc.) be numbered in the same series, and I would like these numbers to appear in the ...
3
votes
1answer
67 views

Labels with \psplot

Consider the following example: \documentclass{article} \usepackage{pst-plot} \begin{document} \begin{figure} \def\dx{2.5} \def\dy{1} \makeatletter ...
3
votes
1answer
540 views

pgfplots - Number above one of the bars in the bar chart

I want to put a number above only one of the bars in the bar chart. For example, above the bar A, I want to put a number say 200. Other bars will not have any number at the top. This is my code. ...
2
votes
2answers
1k views

How to label an optimization problem with a label such as (P)?

I am trying to write an optimization problem in my document, and for convenience, to define a label to refer to it. I don't want to refer to it as equation (3), which I know how to do, I want to ...
9
votes
1answer
154 views

Using xy-pic, how do you label an arrow with a curly brace that spans the length of the arrow, and can be offset arbitrary distances?

I'm trying to figure out how to label the arrows with curly braces that span the length of the arrow, and to make it all very pretty. More specifically, I'm trying to make ...
7
votes
1answer
97 views

Can I give a function to a label?

I try to create a dynamic way to give labels to my slides in Beamer. \documentclass{beamer} \newcommand{\partName}{blank} \newcommand {\defPartName}[1]{\renewcommand{\partName}{#1}} ...
6
votes
2answers
131 views

Putting labels inside section headings

I usually work with LyX, and when I want to label a section (in order to reference it later), I put the label inside the section heading. This usually works, but recently I tried to create an article ...
6
votes
1answer
359 views

Pgfplots: Drawing Arrows Along Contour Plots

I would like to draw "stealth" arrows in place of the "0" labels along the trajectory in the phase portrait pictured below. I decided to draw the trajectory using the contour functionality of ...
5
votes
1answer
315 views

Reduce white space above TikZ label

I'm new to TikZ, and have drawn the following picture, \documentclass[12pt,a4paper]{article} \usepackage{tikz} \usetikzlibrary{trees,arrows} \begin{document} \begin{tikzpicture}[every ...
5
votes
2answers
649 views

PgfPlots with labeled plots extend outside the graph box

Sorry for the confusing title. The MWE \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[scale=0.75] \begin{axis}[ylabel=Y-Axis, xlabel=X-Axis, ...
4
votes
1answer
173 views

circuitikz label malfunction

This may be a total newbie problem, but I cannot find a single reference of this behaviour anywhere I look and thus this question: This is my code: \documentclass{article} ...
4
votes
2answers
359 views

Start a new line in label using pgf-pie

I'm using pgf-pie. It is not a standard package. I found it on google code. As its name, it is used to create pie chart. \begin{figure}[htp] \centering \begin{tikzpicture}[scale=0.9] ...
4
votes
0answers
231 views

3d axis label ovelapping [closed]

I'm using matlab2tikz to generate the tikz code for my figures. When compiling the document with the figure code as below, I get an ovelapping with the axis label y and z. Here is what I've got: ...
3
votes
1answer
156 views

How to put a label on a wire using CircuiTikz

I would like to put a label on a short circuit element. I have tried something like this: \draw (2,2) to [short=$L = \lambda/4$, *-*] (5.5,2) (2,0) to [short, *-*] (5.5,0); but ...
2
votes
1answer
345 views

Putting an underscore in a \label

I am trying to use pdflatex to type set some files that have underscores in the \label. Such as \label{abc_xyz} and have been unsuccessful. I keep getting errors such as: ! Missing \endcsname ...
2
votes
2answers
699 views

Spacing circuit element labels from their elements with CircuiTikz

I want to draw a resistor with a resistance value showing and a voltage label showing as well. This is content-wise an MWE of everything I want: \documentclass{article} ...
1
vote
1answer
54 views

labeling edges in tikz [duplicate]

I have the following graph, where I want to label the edges. Is there a way I can integrate this in to the draw command? { \begin{figure} \begin{center} \begin{tikzpicture}[every node/.style={circle, ...
1
vote
1answer
244 views

Prevent multiple equation numbers when using \allowdisplaybreak with align

I have a very long equation of the following format \begingroup \allowdisplaybreaks \begin{align} a &= very long expression here\\ + & another long expression here\\ + & another long ...