# Tag Info

## New answers tagged labels

2

A PSTricks solution using the expl3 package: \documentclass{article} \usepackage{pstricks-add} % approximation to Euler's number \def\PSEuler{2.71828182845904523536 } % point on x-axis \def\point{1.5 } \begin{document} \psset{yunit = 2} \begin{figure} \begin{pspicture}(-0.73,-0.27)(7.04,2.5)% found manually \psaxes[Dy = ...

1

A MetaPost solution, for whom it interests. The middle of a path is easily found with the Metafun format of MetaPost: it is point .5 along curve if curve is the name of the path. For MetaPost experts, here is the definition of the along binary operator in the Metafun format: primarydef pct along pat = % also negative (arctime (pct * (arclength pat)) of ...

4

This is just one possibility. \documentclass[tikz,border=3mm]{standalone} %\documentclass{article} \usepackage{pgfplots} %\pgfplotsset{compat=1.7} \begin{document} \begin{tikzpicture}[>=latex] \begin{axis}[grid=both, %grid=none axis x line=center, axis y line=center, black, ...

2

You can control the position of nodes most easily, in this case, by using the co-ordinate system of the plot itself to define co-ordinates/nodes, and drawing them in the normal TiKZ style. Source \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.7} \begin{document} \begin{tikzpicture}[>=latex] \begin{axis}[grid=both, ...

1

Well, as a matter of fact, I managed to find another solution through trial and error. I wrapped the tikzpicture in a minipage and I used this trick to position the text relative to the right end of the minipage with the following y tick label style={at={(current axis.east)},anchor=west,xshift=\textwidth}. Its probably a little bit less hacking and this ...

4

If you hide the widths then you get over-printing without warning. I'm not sure it really works to have so much text in an underbrace, but a couple of suggestions: \documentclass[15pt, a4paper]{scrartcl} \usepackage{amsmath,amssymb} \usepackage{enumitem} \begin{document} this \begin{align*} MR &\stackrel{!}{=} MC \\ ...

1

Here is some work around. Add clip=false and then add a node at the end of plot. \documentclass{article} \usepackage{pgfplots} \def\lblfont{\itshape} \pgfplotsset{compat=1.12} \begin{document} \begin{tikzpicture} \begin{axis}[ clip=false, width=.97\textwidth, ticks=none, ymajorticks=true, xmajorticks=true, axis x line=bottom, axis y line=left, ...

1

Based on the useful comments by egreg, Christian Hupfer, Ignasi. I finally figured out a way to show labels of the equations, in the IEEEtran class, in a output .pdf file. 1) Change the final in \documentclass[11pt,final,onecolumn]{IEEEtran} to draftcls , 2) use \usepackage{showkeys} instead of \usepackage{showlabels}. Done.

1

Have you tried this? \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \begin{axis}[ xlabel={Motifs}, ylabel={Value}, xtick={1,2}, xticklabels={\includegraphics[scale=0.05]{example-image-a},\includegraphics[scale=0.05]{example-image-b} } ] \addplot+ ...

2

Use to[I, i_>=$4$A] (7.5,2) (7.5, 0): \documentclass[11pt]{article} \usepackage{circuitikz} \usepackage{tikz} \begin{document} \begin{center} \begin{circuitikz}[american voltages, american currents, european resistors] \draw (0,0) to[V, l=$50V$] (0,2) to[short, -*] (1.5,2) to[R, l=$5\Omega$] (3.5,2) to[R, ...

1

Straight labeling can be achieved with the \ctikzset macro: \documentclass[a4paper]{article} \usepackage{circuitikz} \begin{document} \begin{center} \begin{circuitikz}[american voltages] \ctikzset { label/align = straight } \draw (0,0) to[R, l=$R_c$, o-o] (4,0) % The voltage source to[R, l=$R_a$, o-o] (2,-3) to[R, l=$R_b$, o-o] (0,0) ...

2

After studying the cleveref package documentation further, I stumbled across a warning in section 14.1 Non-bugs. Even though I did not use \label in an optional argument to another command (as the third bullet suggests), it seems that it should be enclosed with curly braces in order to work properly. Correcting \label[opC]{line:1} into {\label[opC]{line:1}} ...

2

You can use the newfloat package to create a floating environment graph for graphs. MWE \documentclass[a4paper,12pt, hidelinks]{report} \usepackage[czech]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{mwe} % for 'example-image' \usepackage{newfloat} \DeclareFloatingEnvironment{graph} \addto\captionsczech{% ...

3

This is an addendum to Harish Kumar's answer. If you want the same positioning for the edge labels for the whole tree, you can put the specification for the creation of the labels in for tree at the start, and then just write edge label=1, edge label=2 etc. in the tree itself. For example, suppose that you wanted the labels above the edges. Then you could ...

8

You can use auto instead of `left: Or use above: Or below There is also above left above right below right above=2mm below=1cm etc. Choose whatever you like. \documentclass[a4paper,10pt]{article} \usepackage{tikz} \usepackage{forest} \begin{document} \begin{forest} for tree={grow'=north} [A [B, edge ...

3

The test \ifdefequal is wrong. You're better using xparse that allows to better distinguish when an optional argument is present or not. \documentclass[a4paper,twoside,10pt]{report} \usepackage{xparse} \usepackage{listings} \lstset{ escapechar = §, } \NewDocumentCommand{\lstref}{om}{% \IfNoValueTF{#1} {Listing \ref{#2}} {Zeile \ref{#2} in ...

4

\documentclass[a4paper]{article} \usepackage[left=2cm,right=2cm,top=2.5cm,bottom=2cm]{geometry} \setlength\parindent{0pt} \makeatletter \newcommand{\req}[2]{% \begingroup \textbf{#1}\def\@currentlabel{#1}\label{req:#1}~#2\newline \endgroup } \makeatother \begin{document} \req{MY.REQ.ID.42}{a lot of text... and so on} Please have a look at ...

2

I think it is easier to use extra x ticks extra x ticks={-1000,1000}, extra x tick labels={\rlap{-1000},\llap{1000}} Code: \documentclass{report} \usepackage{pgf} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[% scale only axis, xmin=-1000, xmax=1000, ymin=0, ymax=5, xtick={-500,0,500}, extra x ...

3

I agree that you are doing a little too hard. pgfplots already offers some alternative mechanisms that come pretty close. \documentclass[border=4mm]{standalone} \usepackage{filecontents} \usepackage{pgfplotstable} \pgfplotsset{compat=1.12} \begin{filecontents*}{data.csv} met time acc video 1 25 1 1 1 39 0.989010989 2 2 40 0.673629243 3 2 13 0.499013807 4 ...

1

You can use xticklabel instead of xticklabels: xticklabel={\pgfmathparse{mod(\ticknum+1,2)==0?int(\ticknum+1):}\pgfmathresult} Code: \documentclass[margin=5pt]{standalone} \usepackage{pgfplotstable,pgfplots} \pgfplotsset{compat=newest} \pgfplotstableread{ 1 1 440 440 2 2 407 424 3 3 395 426 4 4 382 427 5 5 375 427 6 6 366 427 1 ...

4

You can load \usetikzlibrary{angles,quotes} and draw the angles. \pic [draw,->,red,thick,angle radius=1cm,"$A$"{anchor=west,text = black,font=\footnotesize}, angle eccentricity=1] {angle = C--B--F}; \pic [draw,latex-,blue,thick,angle radius=1cm,"$B$"{anchor=west,text = black,font=\footnotesize}, angle eccentricity=1] {angle = ...

0

According to page 90 of the floatrow manual, floatrow is incompatible with sidecap, so loading both packages is likely to cause problems. Moreover, you are mixing up different things, I think as I don't think floatrow can sort out what you want when the subfigure environment is placed inside a \floatbox. I think you need boxes inside the boxes, so to speak. ...

1

When using x tick label as interval, it is necessary to have n+1 positions in xtick in order to place n xticklabels. There is an extra position needed because we need to mark the start and end of each 'interval'. So adding the start of the first label (1) is sufficient: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.12} ...

2

You can use the voltage/bump b and voltage/european label distance parameters to do what you want: \begin{circuitikz} \draw (0,2) to [R=$R$,*-*,v=$V_1 - V_2$] (2,2); \ctikzset{voltage/bump b=20pt,voltage/european label distance=15pt} \draw (0,0) to [R=$R$,*-*,v=$V_1 - V_2$] (2,0); \end{circuitikz}

1

Below there is a possible quick and dirty alternative if one needs AMS-\tags. The drawback is that it requires some manual height adjustment in the first matrix. This solution would not exist without the solution of David. Thanks, David! I needed this too. \documentclass{article} \usepackage{amsmath} \begin{document} ...

Top 50 recent answers are included