Tag Info

23

You need to use baseline on the tikzpicture, not on the nodes. As Tom Bombadil mentioned in the comments you can use current bounding box.center to put the center of the TikZ picture on the baseline. I would also add an yshift to center it around the middle of the = sign. -.5ex seems to do it. \documentclass{article} \usepackage{tikz} \begin{document} \...

20

As mentioned in the comments, \tikz[baseline=(X.base)]{% works for this \documentclass{article} \usepackage{pgf,tikz} \makeatletter \begin{document} \gdef\drawfontframe#1{% \tikz[baseline=(X.base)]{% \node[rectangle,draw,inner sep=0pt,outer sep=0pt] (X){#1}; \draw[red, line width=0.4pt] (X.text) circle(0.4pt)[fill=red] -- (X.base east);}% ...

15

You can add the shift by one of the following ways. Only the last one needs the calc library. In both cases you need to surround the coordinate with { } to either mask the inner [ ] or ,. Hello\tikz[baseline={([yshift=-5pt]current bounding box.north)}]\draw(0,0) circle (10pt);\LaTeX. Hello\tikz[baseline={($(current bounding box.north) - (0,5pt)$)}]\draw(...

13

The number of the enumerate environment does not move to the bottom, the bottom of the bounding box of the TikZ picture is set at the base line. This base line can be changed by using the baseline option of TikZ. The PGF manual states in subsection 12.2.1 “Creating a Picture Using an Environment” on page 117.: The following key influences the ...

12

\fontsize{}{}\selectfont changes the font size and the baseline setting, but the font change happens immediately but the baseline that is used is the one in effect at the end of the paragraph, so you need to ensure that the paragraph ends within the scope of the change. Not \newenvironment{AbsHead} { \fontsize{16}{22}\headfont\noindent }% { \vspace{...

10

There are a couple of things wrong with your setup. \tikzstyle are meant to be declarations which are global. This means that they are like preample statements where you initialize some styles that gets used a lot. Thus you should not put this inside the \begin{tikzpicture}. Also (as Martin correctly states), use the \tikzset or \pgfkeys commands instead, ...

8

You just have to use the key baseline with a named node to tell TikZ where is the baseline The anchor of the baseline for a node is named base \documentclass{article} \usepackage{tikz} \begin{document} Not all characters are at the same baseline \tikz[baseline=(n.base)]{\node [rounded corners,draw] (n) {X};} \end{document}

7

TeX math extension fonts are indeed very peculiar. Knuth tried to pack as much information as possible within the scarce computing resources available when TeX was developed. So, instead of defining a parameter for the thickness of the vinculum in radicals, Knuth decided to grab the information from the math extension font metric file, precisely from the ...

6

In normal text, issuing \\ has the same effect as \newline which means you are breaking the line, but you are not ending a paragraph. To end a paragraph, you can either use a blank line or \par. In your example, since you put a % in the line before \begin{scriptsize}, there is no paragraph break and this affects the baseline behavior. In the following ...

5

It's not as you are thinking: \\ doesn't increase the distance; rather, its absence reduces it. Let's see why. A command such as \huge doesn't only change the type size, but also the ‘baselineskip’, that is, the distance from the current baseline (the imaginary line where characters sit) to the preceding one. However, when TeX typesets a paragraph, it uses ...

5

Here a solution based on Jake's comment. Remarks : It's not necessary to load pgf, then without the circle and the line inside the node, the solution is easy and it's possible to use the node without a name. Without a name it's difficult to draw the line, we need to use current bounding box but it's necessary to remove .5\pgflinewidth at each side. \...

5

You can just set text depth=0pt for the left and right elements to make TikZ ignore the descenders, and text height=0.5ex to ignore the ascenders (thanks Andrew!): \documentclass{article} \usepackage{tikz} \begin{document} \newcommand{\putaround}[5]{ \begin{tikzpicture}[inner sep=0ex] \node [label={[label distance=.1ex]below:$\scriptscriptstyle #2$}, ...

5

Don't use \color unless you specifically need it (which should be rare); use \textcolor, instead. \documentclass{scrartcl} \usepackage{tabulary} \usepackage{xcolor} \begin{document} \begin{tabulary}{.5\textwidth}{|L|L|R|} \hline foo & \rule{1cm}{1ex} & bar \\ \hline foo & \rule{1cm}{1ex} bar & baz \\ \hline foo & bar \rule{1cm}{...

4

\PARENS is the same as \LEFTRIGHT(). They should only be used for objects that are to be set centered with respect to the formula axis: matrices, systems of equations, subalignments. You have to use the standard commands for your case. Here are the various possibilities \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \...

4

You need to remove the % before the \begin{scriptsize} so the previous paragraph ends before you change the baseline.

4

You can use adjustbox package with export option so that you can use valign=b in the options of \includegraphics command itself. \documentclass{beamer} \usetheme{Warsaw} %\usepackage{graphicx} \usepackage[export]{adjustbox} \title{Title} \author{A.~Author} \institute{MWE} \titlegraphic{ \includegraphics[valign=b,height=1.5cm,width=2cm]{example-image-A} ...

4

I tried to adjust the label anchoring by adding "anchor=mid" various places to no avail. I encountered a similar lack of avail in answering How can I force TikZ pin angle? Using the same Extreme Hack that I used that, I got something that works. The key details are: (not really related) use anchor=base on the main node and baseline=0pt on the ...

4

Explanation: inner xsep = <distance between longest text and end of picture> raise = <inner xsep> - <distance between longest text and brace> The baseline option is used to align the text vertically. Code \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing,decorations.pathmorphing} \tikzset{% ...

4

The package delarray is very good for this, as it avoids doing any guess about the height of the material. \documentclass[handout]{beamer} \usepackage{delarray,array} \newcommand{\inbrace}[1]{% $\begin{array}[b]\{{@{}>{$}c<{$}@{}}\}#1\end{array}$% } \begin{document} \begin{frame} \frametitle{Bound Morphemes versus Free Morphemes and Bound Roots} ...

4

here is a solution without tikZ \documentclass[handout]{beamer} \usepackage{fontspec} \newcommand\inbrace[1]{% \raisebox{\dimexpr0.5\height+0.5ex}{$\left\{\begin{tabular}{c}#1\end{tabular}\right\}$}} \begin{document} \begin{frame} \frametitle{Bound Morphemes versus Free Morphemes and Bound Roots} A \inbrace{root\\stem\\base} is a morpheme, ...

4

This uses a pdftex \pdfliteral but you could use a special for xetex Here I've used two minipages side by side so that you can tell by the end that the baselines have returned to normal. On the left the region between the !! is raised by 2bp \documentclass{article} \begin{document} \centering \begin{minipage}[t]{.43\linewidth} One two three four one two ...

4

One way is to use the baseline key in the tikzpicture options to specify that each picture should be aligned to the baseline by a particular node name (here I used (A)): \documentclass{article} \usepackage{tikz} \usetikzlibrary{automata} \usetikzlibrary{positioning} \begin{document} \tikzstyle{negative} = [circle, minimum width=8pt, fill, inner sep=0pt] \...

3

this is the expected behavior. you have wrapped the text in a group without ending the paragraph, so the baselines applied are those for the surrounding environment. one double blackslash has no effect on this setting, but when the text is broken this way multiple times, all but the last force resolution of the baseline of the previous segment. in this ...

3

Is this what you want? \begin{tikzpicture} [mainbullet/.style={rectangle, minimum size=0.3cm, draw=orange!100, fill=orange!100, thick}, maintitle/.style={rectangle, opacity=0.5}] \node[mainbullet] (experiencebullet) at (0, -23) {}; \node[maintitle] (experiencetitle) [right=10mm of experiencebullet.south east, anchor=base west] {Experience}; ...

3

Without changing anything in your tree-syntax, the tikz-qtree package allows you to get the right result: \documentclass{scrreprt} \usepackage{tikz-qtree} \begin{document} \Tree[.table [.thead [.tr [.th [.\textit{Vorname} ] ] [.th [.\textit{Nachname} ] ] ] ] [....

3

Too long for a comment. The base line of the last text line on the second page is correctly aligned with the bottom of the text area. According to \maxdepth, TeX allows the descenders to stick outside the text area to get a proper alignment of the base lines of the last text lines on the pages. The last text line of the first page does not reach the bottom....

3

The height of the \tikz in the definition of \circled is responsible for the added line spacing. One can treat the height of an object as zero with the \smash{} macro. So here, I \smash{\tikz[...]{...}}. Of course, this now makes overlap a possibility. In an effort to combat this, I reduced the minimum size of the circle to 1.4em. % !TEX encoding = ...

3

In this case, you will have to tell TikZ where you want your baseline to be. Here you want it to be for example on your (a) node. Here is a code to provide it : \documentclass{report} \usepackage[english]{babel} \usepackage{tikz} \tikzset{x=1pt, y=1pt, z=1pt} \begin{document} \newcommand{\mypicture}{\begin{tikzpicture}[baseline=(a.base)] \...

3

Your problem is that by using \begin{tikzpicture} \begin{tikzfadingfrompicture} \end{tikzfadingfrompicture} \end{tikzpicture} you do nothing else than nesting two tikzpicture environments, which is known to be a source of trouble. However, it is not necessary to do this, since you name the tikzfadingfrompicture to reuse it. When putting both ...

3

The example is not minimal. I've minimised it a bit further just by removing all the hyperref stuff. (I checked that this all has no relevance.) The basic problem involves the use of nested tikzpictures which are known to cause problems. Although not guaranteed to fail, failure is to be expected. Nesting should therefore (very nearly almost) always be ...

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