Hot answers tagged

6

TikZ is not great for 3D. For best results in complex cases, you should use software designed for 3D drawing. The best you can do with TikZ is to fake 3D in 2D. For simple drawings, tikz-3dplot can help with the faking by doing much of the calculation for you. For example, here's a version of your cube done with this package: Uncomment lines to see where ...


5

Add \pgfplotsset{compat=newest} to the preamble. \documentclass[tikz,margin=.5cm]{standalone} \usepackage[utf8]{inputenc} \usepackage{pgfplots} \usepackage[T1]{fontenc} \usepackage{siunitx} \usetikzlibrary{arrows,calc} \pgfplotsset{compat=newest} %<<<<<<< \begin{document} \begin{tikzpicture} \begin{axis}[% width=3.767in, ...


5

As far as I can see varioref does not know that there's a different theorem in action -- all use the shared counter named definition, \refstepcounter increases the definition counter, leaving \@currentlabel to be definition, which leads to the 'wrong' label format then. I am applying \DeclareCoupledCounters from xassoccnt package to get coupled counters, ...


4

I would like to suggest that you use the power of the cleveref package. This package provides a macro called \cref, which not only handles the label-assigning job but can even take multiple arguments. (To ease the job of determining which label should be used with which theorem-like environment, I further recommend you load either the ntheorem or the amsthm ...


4

As I had indicated in a comment, one must slant and rotate text to produce an isometric viewpoint (though I realize the OP's drawing is actually true perspective, not isometric). The OP's code had already accounted for the text rotation, so all I did here was to slant it by +/-45 degrees, which was the approximate isometric sense adopted by the OP's image. ...


3

It is possible to write text content to the .aux file I've done this using an \labelText command that is setting the title and sets the label (according to user specifcations.) Use \nameref then to refer to this label. The formatting should be done outside of the textlabel, not inside. (Since I am writing on a Tablet, I can't provide a better solution ...


2

By use near end you were very close to desired solution ... With pos= .. you can determine relative position of node on path. See MWE below. \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows,automata,positioning} \usepackage{amsmath,amssymb,amsfonts} \begin{document} \begin{tikzpicture}[>=stealth', shorten > = 1pt, node distance = ...


2

(Your example throws an error here, but adding a text width to the label fixed that.) You're using \tiny wrong, it's supposed be used like {\tiny ..}, not \tiny{...}, i.e. it is a switch that affects the following text, not a macro that takes an argument. That said, I recommend adding font=\tiny to the label options instead. This also makes the line ...


2

Tags belongs on display math and cannot be used like you do here (on inline math). Btw: please don't make proofs like this, use an environment to make the proof and add the proof headline. For example by using amsthm


2

I am not sure if I understand the question, but every label/.append style={text=red, font=\scriptsize} works for me. \documentclass[tikz,border=3mm]{standalone} \begin{document} \begin{tikzpicture} [every label/.append style={text=red, font=\scriptsize}] \node[draw, label=label] (A) {node}; \node[draw, label=label,xshift=2cm] (B) {node}; \end{tikzpicture} ...


2

A possibility is to use cleveref and its \cref or \Cref commands to include the type of the referenced counter, e.g. an equation or a theorem. The \Cref is used for uppercase purposes, e.g. at the beginning of a sentence. Please note, that \usepackage[english]{cleveref} etc. is perhaps more useful, depending on the needed language. cleveref's output ...


2

A bit more tedious, but you can set the ticklabel pos for each axis: \documentclass{article} \usepackage{pgfplots} \usepgfplotslibrary{groupplots} \begin{document} \begin{tikzpicture} \begin{groupplot}[group style={group size=2 by 2, horizontal sep=7pt,vertical sep=7pt}, axis on top, enlargelimits=false, ...


1

Here's a possibility: you add a column, but remove some of the horizontal space. \documentclass{article} \usepackage{amsmath,tikz-cd} \begin{document} \begin{tikzcd} \varepsilon\colon &[-3em] 0 \ar[r] & A\ar[r] \ar[d] & B \ar[r] \ar[d] & C \ar[r] \ar[d]& 0 \\ \varepsilon'\colon&[-3em] 0 \ar[r] & A'\ar[r] & B' \ar[r] & ...


1

Here's a simple modification: \documentclass[tikz,multi,border=10pt]{standalone} \usetikzlibrary{arrows.meta,automata,calc} \begin{document} \begin{tikzpicture} [% \tikzstyle is deprecated - use \tikzset{} instead >= Stealth, shorten >= 1pt, node distance = 3cm, semithick, every state/.style={draw = black, thick, fill = white}, ...


1

Got finally a 'correct' version. To produce the tick labels in the way I want them, you have to work on a lower level of pgf. Basically you need to define your own typesetter, as already mentioned by cfr in his answer. Basically it is quite easy. You're passing the numbers to be printed to your code by \pgfmathfloatparsenumber{#1}. The number is then ...


1

The \tikzball command must be protected, i.e. use label={\protect\tikzball{...}}. \documentclass[11pt]{beamer} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[francais]{babel} \usepackage{enumitem} \usepackage{tikz} \makeatletter % create beamer ball commands \newcommand\beamerball{% ...


1

Here's a solution that makes use of the \hypertarget/\hyperlink machinery of the hyperref package to create cross-referencing links. The \hypertarget macro places the "anchor", and the \hyperlink macro generates a call-out (in the form of a hyperlink) to the anchor generated by \hypertarget. Both macros take two arguments: the first is the "anchor text" ...


1

First as a non-float. Then, as a float. EDITED to put caption outside of box. EDITED to introduce new float, InfoBox. \documentclass{article} \usepackage{caption,graphicx,newfloat} \DeclareCaptionType{InfoBox} \begin{document} \fboxsep=8pt\relax \fboxrule=2pt\relax \begin{center} \fbox{\centering \includegraphics[width=2in]{example-image-A}}\par ...


1

cleveref is your friend here -- no need to define a \theoremname here -- it's defined by cleveref for many use - cases already. Use \cref for lower case names and \Cref for upper case names. For special names there is no clue for \cleveref to provide the correct name initially, in this case use the setup commands \crefname and \Crefname. ...



Only top voted, non community-wiki answers of a minimum length are eligible