Tag Info

Hot answers tagged

7

Add a \strut or define text depth for those nodes. I have also changed above leftto left and above right to right appropriately. \documentclass[border=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{automata,arrows,calc,positioning} \begin{document} \begin{tikzpicture}[->,node distance=25mm] \node[state,initial,accepting] (q0) {$q_0$}; ...


6

Here is a tikz solution \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[inner sep=0pt,outer sep=0pt,text width=0.5\textwidth] (a) {\includegraphics[width=\linewidth]{example-image-a}}; \node[outer sep=0pt,text width=0.5\textwidth,align=center,anchor=west] at (a.east) {Family Name Here \\ ...


5

Centred vertical alignment of graphics is easily obtained with the help of adjustbox, which provides the valign key-value option. Below is a minimal example showing its use in your case: \documentclass{article} \usepackage[export]{adjustbox}% adjustbox loads graphicx \begin{document} \noindent ...


5

You have to use the option box align=base (or tcbox raise base, which is equivalent) in your \tcbset. MWE \documentclass{book} \usepackage{tcolorbox}% for framed rounded boxes \tcbset{colframe=black,colback=white,colupper=black, fonttitle=\bfseries,nobeforeafter,center title,size=small,box align=base} \begin{document} \tcbox{1}, \tcbox{2}, ... ...


5

As first thing, I would add the options text height=1ex, text depth=0pt in the tikzpictures option to force all labels having the same (vertical) size. Having done this, the problems As you can see, the 'b' on the arrow from q1 to q3 is positioned lower than the 'a, b, c' on the arrow from q3 to q2. Also, the 'b' on the edge from q2 to q3 is ...


5

you have told dcolumn that you only have one decimal place in the numbers so it only leaves room for one digit after the . Also please always post complete documents not fragments with bits removed. The 2.4 leaves enough room for a minus sign and a digit to the left of the . and 4 digits after. \documentclass[a4paper,12pt,icelandic]{report} ...


4

The reason for these "random spaces" is as a result of the particular document composition. Take a look at pages 3 and 4: Note that you have a heading \section*{Results} which happen to be at the top of the first column of page 4. TeX decided that there is no way to place this heading together with at least one line "Lorem ipsum dolor sit amet, ...


4

This seems to do what you want, unless you want text in your subcaptions. \documentclass[a4paper]{article} \usepackage{graphicx} \usepackage{caption,subcaption} \newcommand{\figurerow}[6]{% \sbox{0}{\includegraphics[width=.3\textwidth]{#1}}% \sbox{2}{\includegraphics[width=.3\textwidth]{#3}}% \sbox{4}{\includegraphics[width=.3\textwidth]{#5}}% ...


4

You get what you want with aligned: \documentclass{article} \usepackage{amsmath} \begin{document} Let $\!\begin{aligned}[t] A &\overset{f}{\longrightarrow} B\\ a &\longmapsto f(a)\end{aligned}$ be a function from $A$ to $B$. \end{document} But it's better not having such big objects inline. I'd much prefer Let $f\colon A\to B$, $a\mapsto ...


4

Simply adding a blank line instead of applying a \vspace will resolve the issue: Code: \documentclass{article} \begin{document} \begin{enumerate} \item Using a scale of 1 cm to 0.1 unit on each axis, plot $\lg y$ against $\lg x$ and draw a straight line graph. \hfill [3] \item Use your graph to estimate the value of $k$ and of $n$. \hfill [4] \hfill ...


4

You can use \mathmakebox or \mathclap (thanks to Andrew) from mathtools \documentclass{article} \usepackage{mathtools} \begin{document} \begin{equation*} \begin{split} S_n &= 2^iS_{n-i}+2^i-1\\ &\stackrel{\mathmakebox[\widthof{=}]{\mathrm{IH}}}{=} 2^i(2^1S_{n-i-1}+2^1-1)+2^i-1\\ &= ...


4

I suggest three strategies. The first one is to define a command \iheq that prints an equals sign with some padding to become the same width as \overset{\mathrm{IH}}{=}, which can be simply obtained with \iheq*. The second strategy is adding “(IH)” to the side. \documentclass{article} \usepackage{amsmath} \usepackage{xparse} ...


4

You're really overcomplicating things: just use a nested itemize: \documentclass{article} \usepackage{enumitem} \usepackage{lipsum} \begin{document} \begin{enumerate} \item Long Items \item \lipsum*[1] \begin{itemize}[label=---,topsep=0pt] \item Second Level Item \item \lipsum*[2] \item Another second level item \end{itemize} \item A first ...


3

Following the PGFmanual, the properties of the label nodes can be set with the syntax label={[key=value]position:text} In the given example, the solution is as follows: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[baseline=(Alabel.base)] \coordinate[draw,shape=circle,label=left:Y](Y); ...


3

Drop the image down by half its \height: \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure}[htbp] \centering \raisebox{-.5\height}{\includegraphics[width=150pt]{example-image}} $\longrightarrow$ \begin{tabular}{|c|c|c|} \hline 4 & 9 & 2\\ \hline 3 & 5 & 7\\ \hline 8 & 1 & ...


3

One option: The code: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} a(y)&=1-a(-y)\nonumber\\ &\Uparrow \nonumber\\ m_u=1/m_l \quad\quad\,\, c_2&=c_3 \quad\quad\,\, \lambda_0=\lambda_1\nonumber\\ t_u=-t_l\raisebox{1.5ex}[0pt][0pt]{${}\Longleftrightarrow{}$} c_1&=c_4 ...


3

Here is one option, provided by the environment foodstuff below: \documentclass{article} \usepackage{graphicx,tabularx,environ} \usepackage{lipsum} \makeatletter \newcommand{\@leftimage}{} \newcommand{\@rightimage}{} \let\leftimage\@gobble \let\rightimage\@gobble \long\def\extractleftimage#1\leftimage#2#3\null{\renewcommand{\@leftimage}{#2}} ...


3

Your description isn't so clear, but perhaps this. Note you should avoid \ in math mode, and don't use math italic for multi-letter works such asmaxand just use\text` for text phrases, not math operators. Also, please always post complete documents. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} &\min \mu \\ ...


3

Use gathered: \documentclass{article} \usepackage{amsmath} \usepackage{feynmp-auto} % or feynmf \begin{document} \begin{fmffile}{test} \begin{equation} \begin{gathered} \begin{fmfgraph*}(65,50) \fmfleft{i1,i2} \fmfright{o1,o2} \fmf{plain}{i1,v,o1} \fmf{plain}{i2,v,o2} \end{fmfgraph*} \end{gathered}=-i\lambda \end{equation} \end{fmffile} \end{document} ...


2

Lists like enumerate or itemize cannot occur directly in as content of a tabular cell -- they must be enclosed in a \parbox or, even better, using p{somewidth} - column specifier. \documentclass[parskip=half, fleqn]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage[T1]{fontenc} \usepackage{array} \usepackage{ragged2e}% ...


2

You can either use the functionality of multirow, or merely raise/lower the contents into place, making sure you also remove any vertical height as a result of the movement. Below, \vertcenter does exactly that, moving the contents up by half of the regular baseline skip (.5\normalbaselineskip): \documentclass{article} \usepackage{booktabs,multirow} ...


2

I think the problem is your ... in the second-to-last row in your table. I was able to use the siunitx package by replacing ... with \dots. Also, have a look at the mhchem package. I've replaced your first equation using the \ce{} command provided by mhchem. \documentclass[a4paper,12pt]{report} \usepackage[icelandic]{babel} \usepackage{dcolumn} ...


2

You can use \\[0.5cm] instead. \documentclass{article} \usepackage{multirow} \begin{document} \begin{tabular}{|c|c|} \multirow{3}[12]{*}{Rayleigh } & \multicolumn{1}{c|}{$\mathop{\sigma }\nolimits^{2} =√{\frac{1}{2n} \sum _{i=1}ⁿ\mathop{v}\nolimits_{i}^{2} }$} \\[0.5cm] & $γ$: continuous location parameter ...


2

Put image and table in minipage enviroment: \documentclass[11pt]{article} \usepackage{graphicx} \usepackage[active,floats,tightpage]{preview} \setlength\PreviewBorder{1em} \begin{document} \begin{figure}[htbp] \centering \begin{minipage}{0.45\hsize} \includegraphics[width=150pt]{example-image} \end{minipage} $\longrightarrow$ ...


2

Here is a solution using the ltablex package (adds the functionalities of longtable to tabularx. The use of tabularx allows for slighly wider columns; I also loaded ragged2e (to have some hyphenation in a raggedright context), sinuitx fr a correct typesetting of units and numbers, with its \si, \SI and \num commands and the possibility to use abbreviations ...


2

We, users of plain TeX, don't need tikz for such example: Let \vtop{\halign{$\hfil#{}$&$#\hfil$\cr A \buildrel f\over\longrightarrow& B\cr a \longmapsto& f(a)\cr}} be a function from $A$ to $B$. \bye


2

A diagram with tikz-cd seems a good choice; the only trick is setting the upper and lower items in a zero width box. \documentclass{article} \usepackage{amsmath,tikz-cd} \begin{document} \begin{equation} \begin{tikzcd}[row sep=1.2em,column sep=1.5em] & \makebox[0pt]{$a(y)=1-a(-y)$} \\ \begin{gathered} m_u=1/m_l\\ t_u=-t_l \end{gathered} ...


2

I can think of two ways of accompishing this without external help. Both use the fact that tikz/pgf keeps track of the picture's bounds in a special node called current bounding box. Use tikz's baseline option, which must be given as an argument to tikzpicture environment. This can be achieved by changing forest's option begin draw (at any node, but ...


2

this looks like a situation where \\ (after the [4]) is actually justifiable: \item Use your graph to estimate the value of $k$ and of $n$. \hfill [4]\\ \hfill [$k=84.2$, $n=1.35$]


2

A simple solution without additional packages is split your card in four minipages. By default the minipages are centered vertically, so this work to center images and/or anything else. \documentclass{article} \usepackage{graphicx} \def\Img#1{\includegraphics[width=\linewidth]{example-image-#1}} \def\Family{\centering\Large\textsc{Family Name ...



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