Tag Info

Hot answers tagged

17

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);}% ...


11

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} ...


11

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 ...


11

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) ...


7

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, ...


7

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}


4

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$}, ...


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

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

\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

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

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

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{% ...


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

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. ...


1

Use \raisebox to adjust the height. It's a trial and error process, but it works fine. \titlegraphic{ \raisebox{10pt}{\includegraphics[width=2cm]{NCSE}} \hfill% \includegraphics[width=2cm]{KENT-Blue} } Or, you could use \raisebox for the second picture, and put in a negative value for the first argument.


1

This is another attempt. minipage is used with [b] alignment Code \documentclass{beamer} \usetheme{Warsaw} \usepackage{graphicx} \usepackage{mwe} \title{Title} \author{A.~Author} \institute{MWE} \titlegraphic{ \begin{minipage}[b]{0.49\textwidth} \centering \includegraphics[height=1.5cm,width=2cm]{example-image-A} \end{minipage} \hfill% ...


1

Using baseline option in tikz was the solution. Here is the MWE that produces the desired result: \documentclass{article} \usepackage{tikz} \newcommand{\rbox}[1]{ \begin{tikzpicture}[baseline] \node[rounded corners=3pt, draw, anchor=base]{#1}; \end{tikzpicture} } ...



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