Tag Info

New answers tagged

2

Here's a solution that uses only arrays to align the three parts. The outermost array, which is set up to have three columns, serves to "house" the three horizontal parts. Each horizontal part consists of four rows, but some of the cells in the left-hand and right-hand parts -- which are constructed as nested arrays, each consisting of a single column -- are ...


3

This is a job for \valign! Although I don't think this will help readers much. \documentclass{article} \begin{document} \valign{#\cr \vbox{\hbox{% Equivalent if $A$ $\left\{\vphantom{\begin{tabular}{c} A\\B\\C\end{tabular}}\right.$% }} \vfill\cr \hbox{\begin{tabular}{@{}c@{}} Condition (1) \\ Condition (2) \\ Condition (3) \\ ...


2

\documentclass{article} \usepackage{amsmath} \usepackage{stackengine} \setstackEOL{\#} \setstackgap{L}{.7\baselineskip} \begin{document} \begin{equation*} \begin{aligned} &condition (1) &\\ equivalent\ if\ B - \smash{\left\{\Centerstack{\#\#\#}\right.} \, &condition (2) &\\ &condition (3) ...


2

Here's a mildly more complicated solution: the picture, with possible options, is given as a trailing optional argument to \chapter. It would be possible to use the standard \chapter syntax and define a \chapterfigure command that needs to be placed just before \chapter. \documentclass[a4paper]{book} \usepackage{xparse,graphicx,xpatch} ...


3

The 22pt was found by trial and error. It should represent the height of the font used for the title plus 1/2 the gap. For some reason \chapter didn't like \raisebox, hence the \savebox. \documentclass{book} \usepackage{graphicx} \usepackage{mwe} \newsavebox{\tempbox} \begin{document} ...


6

You have to measure the bigger picture. \documentclass[10pt, a4paper]{amsart} \usepackage{graphicx, subfig} \usepackage{graphics} \usepackage{tikz} \usepackage[all]{xy} \usetikzlibrary{arrows,automata} \usetikzlibrary{shapes,snakes} \usetikzlibrary{positioning} \newsavebox{\bigpicture} \newcommand{\adapttobigpicture}{% \vrule height\ht\bigpicture ...


2

Another alternative is use of package adjustbox and add valign=t (vertically align top) into the \includegraphic option. Remove [demo] from the graphicx package for true image Code \documentclass[12pt,twoside,openright,a4paper,oldfontcommands]{memoir} \usepackage{tabularx} \usepackage[pdftex,demo]{graphicx} % remove demo for true image ...


3

use \raisebox{\dimexpr-\height+2ex}{% \includegraphics[width=\marginparwidth]% {structureIconArtifactsProxyWorkload.pdf}}


0

As \raisetag doesn't seem to work properly here the align environment looks like a decent solution: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{align} A = &\left( B \right. \notag \\ &\phantom{(} \left. + C \right) \end{align} \end{document}


1

I'd do something like this \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} A &= \Bigl( B \notag \\ &\phantom{= \Bigl(} + C \Bigr) \end{align} \end{document} or using split \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{split} A &= \Bigl( B \\ ...


3

This space is controlled by arraystretch (not a length, but a multiplier which defaults to 1) times the depth of \strutbox. Observe that setting arraystretch to zero, \renewcommand*{\arraystretch}{0} removes the spacing. \number\dp\strutbox gives 285084 scaled points, and 285084/65536 is approximately 4.35 pt. Note also that the array package used by ...


4

The names ‘lim’ and ‘max’ should be at the same level as ‘f’; also the absolute value bars should be as high as necessary to cover the material inside them; what's before the opening bar is irrelevant as far as the absolute value is concerned. This is a case where \left and \right are plainly wrong, because they produce too large delimiters. I don't think ...


1

\documentclass{article} \usepackage{amsmath} \begin{document} You have: \[ \lim_{d \rightarrow \infty} \left [ \underset{a\leq x\leq b}{\mathrm{max}_p} \left | f(x) - m(x) \right | \right ] = 0 \] You say, that it is produced: \[ \lim_{d \rightarrow \infty} \left [ \max_{a\leq x\leq b} \left | f(x) - m(x) \right | \right ] = 0 \] You want: \[ \lim_{d ...


1

As egreg mentioned in comment, it does look wrong what you are trying to do (refering to the raised functions). The functions should stay vertically centered. But here is, how it is done: % arara: pdflatex \documentclass{article} \usepackage{mathtools} \begin{document} \[ \raisebox{.25\baselineskip}{$\displaystyle\lim_{d \rightarrow \infty}$} \Biggl[ ...


3

The following suggestions only work if you center both pictures. You can use the option trim axis left (or maybe trim axis right) for both tikzpictures: \begin{tikzpicture}[trim axis left] Code: \documentclass{scrartcl} \usepackage{pgfplots} \pgfplotsset{width=8cm,height=6cm} \begin{document} \begin{center} \begin{tikzpicture}[trim axis left] ...


3

Here's a solution that uses a TikZ picture instead of a tabular environment: \documentclass[border=4pt]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \makeatletter \def\aerow{0} \def\aehu{0.45cm*}%% horizontal unit for placement of circled nodes \newcommand\ae@parse@current@skill[2]{%% \xdef\aerow{\number\numexpr\aerow+1}%% ...


3

You have to use [t] for setting the vertical alignment; however, your tabular will be too wide. \documentclass[draft]{scrbook} \usepackage[pass,showframe]{geometry} % just to show the margins \usepackage{tabularx,calc} \usepackage[ruled,longend,german,algochapter]{algorithm2e} \usepackage{lipsum} \newenvironment{algotabularx} ...


4

\documentclass{scrbook} \usepackage{tabularx} \usepackage[ruled,longend,german,algochapter]{algorithm2e} \usepackage{lipsum} \begin{document} \begin{algorithm}[tbp] \SetKwInOut{Input}{Input} \SetKwInOut{Output}{Output} \LinesNumbered \caption[Description]{Description} ...


1

The command \smash does work, as long as it is within math mode, How would it operate in the formula, which in turn is within an itemize list, without overwriting the lines above it, unless it's within such environment. So, the comment above, by Menke, is partially correct, and I said partially, because its implementation to resolve the problem in your ...


4

Would this be close to wha you seek? This solution proposes keep your code with minor changes shown by % here and add a raisebox scheme to lower the text \raisebox{-1.5ex}[0ex][0ex]{\tiny\uppercase{#1}\hspace{-14ex}} Code %!TEX program = xelatex \documentclass[border=10pt]{standalone}%[a4paper]{article} \RequirePackage{pgffor} ...


5

I'd do something like this (also you had a lot of % where they were not needed \else% and a lot of % missing where they were needed (everywhere else:-) \documentclass[a4paper]{article} \RequirePackage{wasysym} \RequirePackage{graphicx} \newcommand{\dotrating}{% \ifnum\count0<\count2 % \newmoon \else \fullmoon ...


1

As usual, in my ignorant opinion, the dots are ugly and making the matrix unreadable even when you have the most basic companion structure in the state matrix. Here is something that is more appealing to my taste which emphasizes the shift operation; \documentclass{article} \begin{document} \[ \underbrace{\left( \begin{array}{c|ccc} \\0 ...


4

Curious. It turns out \ddots is slightly higher than other characters. I suggest \smash ing them in the first matrix: \documentclass[11pt]{article} \usepackage{mathtools} \begin{document} \begin{equation*} C \coloneqq \begin{pmatrix} 0 & 1 & 0 & \cdots & 0 \\ 0 & 0 & 1 & \cdots ...


2

The easiest way would be to replace the \ddots in row 4 by \cdots. I think, this makes more sense but maybe you need it this way. The problem is that the \ddots are higher than the expressions in row 4 of the second and third term. If you increase the height of these expressions as shown in my MWE below, the alignment will be fixed again. If you want to ...


8

You can use a \mathstrut to give the both subscripts the same height and depth: \documentclass{article} \begin{document} \begin{displaymath} \sum_{\mathstrut j=1}^m \sum_{\mathstrut \langle i,j \rangle} \end{displaymath} \end{document} A \strut is a vertical rule of zero width, so invisible, defined by latex each time a font is set, however these ...


5

It seems like LaTeX tries to keep a minimum distance between the summation symbol and the top of the lower limit symbol. Therefore you should correct the left side, as the right side is using bigger symbols in the limit. I just took the vertical size of the right side and added it to the left side. % arara: pdflatex \documentclass{article} ...


2

Here's a LaTeX solution: \documentclass{article} \usepackage{array,multirow} \newcommand*\blah{blah blah blah blah } \newcolumntype{z}[1]{>{\centering\arraybackslash}m{#1}}% a centered m-type column \renewcommand*\multirowsetup{\centering}% default is \raggedright \begin{document} \begin{tabular}{|z{2cm}|z{2cm}|m{.3\linewidth}|} \firsthline ...


2

You must count not the number of rows, but the number of lines in case of multiline cells, plus an adjustement corresponding to the number of \addlinespace commands and to the thickness of \midrules. However this is only theoretical. For instance, I chose not to put "granulate" in the middle of its multirow cell, but aligned with "Selective laser melting" ...


1

use \only<3>{Block 3a}% no following empty line! \onslide<4>{Block 3b} instead of \only. Then the vertical space of the invisible overlays is taken into account. An alternative is Block 2 \pause Block 3\only<3>{a}\only<4>{b}


0

The overlayarea-environment might do the trick \documentclass{beamer} \begin{document} \begin{frame} \onslide<1->{1} \onslide<2->{2} \begin{overlayarea}{\textwidth}{0.2\textheight} \only<3>{3a} \only<4>{3b} \end{overlayarea} \end{frame} \end{document}


5

Most asymmetric two column layouts are best handled by a list environment. This allows page breaking to occur naturally in the main flow without having to guess where to vsplit it. Although if there is a possibility of a page break happening in the first few rows you should need to work a bit harder to prevent that or the hanging parbox will overprint the ...


7

Using tcolorbox. This is breakable across pages and all the benefits of tikz and tcolorbox like borders, background colour etc can be exploited. \documentclass{article} \usepackage{xcolor} \usepackage{kantlipsum} \usepackage[many]{tcolorbox} %% splitbox--- \tcbuselibrary{skins,breakable} \newtcolorbox{splitbox}[1][]{ colback=white, left=0.5ex, ...


5

Is this something similar to what you'd like to get? \documentclass{article} \usepackage{microtype} \usepackage{kantlipsum} \begin{document} \kant[1] \newbox\mylongbox \setbox\mylongbox=\vbox{ \hsize=0.7\textwidth \kant[2-4] } \noindent\parbox[t]{0.2\textwidth}{% Blah blah blah, blah blah blah blah blah blah blah, Blah blah blah blah, }% ...


0

I think I got to a workaround; all that needs to be changed in the above MWE is that this code: \setbox\myvtopboxB=% \vtop{\hsize=0.7\textwidth \copy\myspltbox} % ... needs to be changed to this: \setbox\myvtopboxB=% \vtop{ \hsize=0.7\textwidth \hrule height 0pt width 0pt \copy\myspltbox } Basically, those rules are used since I ...


3

The problem is that [t] aligns to the first baseline ([b] to the last baseline) of the included paragraph, not the top of the content. The baseline of images lies on there lower edge, so [t] has basically no effect with two images. Lower the images to include the baseline on top or add an empty line above them (using e.g. \vskip 0pt) to make it work. ...


3

The listings way is to use aboveskip and belowskip which are initially set to \medskipamount: \begin{lstlisting}[aboveskip=-1.4\medskipamount] Code: \documentclass{article} \tracingonline1 \tracingoutput1 \tracingparagraphs1 \usepackage{lua-visual-debug} \usepackage{listings} \usepackage{unravel} \makeatletter % \def\rst{\gdef\everypar={\setbox \z@ ...


1

Well, I got to a manual workaround, which is to use \vspace{-1.2\baselineskip} right after the second {minipage} starts; the output is then: ... which, I guess, is what the [t] + [t] would have been expected to do. I used the unravel package to step through the critical sections, and compare those logs in meld; the problem seems to reduce to \everypar ...


1

Another alternative is use of package adjustbox with export option. Here valign=t,c,b can go with the minipage location specifiers t,c,b Code \documentclass[10pt,mathserif,smaller,fleqn]{beamer} \usepackage{tikz} \usepackage[export]{adjustbox} \usepackage{multicol} \usepackage[utf8]{inputenc} \usetheme{Antibes} \setbeamertemplate{navigation symbols}{} ...


1

If the second column should be vertically centered to the picture you can use two m columns \begin{tabular}{>{\centering}m{0.5\textwidth}|m{0.4\textwidth}} Code: \documentclass[10pt,mathserif,smaller,fleqn]{beamer} \usepackage{tikz} \usepackage{multicol} \usepackage[utf8]{inputenc} \usetheme{Antibes} \setbeamertemplate{navigation symbols}{} ...


3

The adjustbox package is your friend; not only it allows to shift the images down, but it allows pad them so they won't touch the rules. \documentclass[12pt,a4paper,x11names,landscape]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} \usepackage{caption} \usepackage{incgraph,graphicx,subcaption} ...


1

\documentclass[0.10pt,a4paper]{book} \usepackage[utf8x]{inputenc} \usepackage[a4paper]{geometry} \geometry{verbose} \setcounter{secnumdepth}{3} \setcounter{tocdepth}{3} \usepackage{amsmath} \usepackage{amssymb} \usepackage{shadow} \usepackage{tikz} \renewcommand{\baselinestretch}{1.0} % To make the linespacing in the document 1.5cm ...


4

I'll present two possible solutions. Don't close the center environment “Abuse” the gather* environment At the top is the rendering with your input. Note that I removed underlining, which is frowned upon by typographers. Instead of \textbf you can also use \textit. \documentclass{article} \usepackage{amsmath} \begin{document} ...


2

You can load the nccmath package. I tried, thinking of using its \useshortskip command and discovered that just loading it works. Note that it loads amsmath, so that you can load it instead of amsmath. It doesn't load mathtools (recommended extension of amsmath), though: \documentclass{article} \usepackage{mathtools} \usepackage{nccmath} \begin{document} ...


1

It's the center environment not playing well with gather*: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{center} \underline{First set of identities.} \[x+x = x\] \end{center}% \begin{center} \underline{Second set.} \begin{gather*} 0+x = x, \quad x+0 = 0 \\ (x+y)+z = x+(y+z) \end{gather*} ...


4

\documentclass{article} \usepackage[labelfont=bf]{caption} \usepackage[demo]{graphicx} \begin{document} \begin{minipage}[b]{.4\linewidth} \centering \includegraphics[width=140pt]{test} \captionof{figure}{First image with very very very very very very very very long caption} \end{minipage} \hfill \begin{minipage}[b]{.5\linewidth} \centering ...



Top 50 recent answers are included