New answers tagged

2

Here is a way with aligned minipages: \documentclass[a4paper, 10pt, oneside]{memoir} % Page layout \setlrmarginsandblock{1.7cm}{8.5cm}{*} \setulmarginsandblock{1.7cm}{2.5cm}{*} \setmarginnotes{0.5cm}{\dimexpr(\stockwidth-\textwidth-4.4cm)}{1em} \checkandfixthelayout \chapterstyle{bianchi} \usepackage{titlesec} \usepackage{titletoc} \usepackage{hyperref} \...


2

Here are two ways, depending on whether you have fixed width cells or not: for a standard cell (column specifier r, l or c), you can use the makecell command, for a fixed width cell, use the m{some length} column type A demo of both: \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage{fourier} \usepackage{array} \usepackage{makecell} \...


3

You can use TABstacks. Shown here in 3 ways, depending on the desired equation-number vertical alignment. \documentclass{article} \usepackage{tabstackengine} \stackMath \setstackgap{L}{14pt} \begin{document} \begin{equation} \alignCenterstack{ a+b+c+d+e+&f+g+h \\ =& j + k + l + m +n\\ =& j' + k' + l'+ m' +n'} \end{equation} \begin{...


3

Here are three possibilities. In the first, you alignthe = signs with another symbol of the first line, The second uses the optional argument of the \MoveEqLeft command from mathtools, and the third nests the aligned environment in a gathered environment (to fine-tune the placement of w= w.r.t. the first line, you can add to the latter some \hspace). ...


1

You should rotate with the option origin=c, rather than adding spaces by hand. Adding \mathstrut will ensure correct alignment. Use an array for the alignments: \documentclass{article} \usepackage{amsmath,array,graphicx} \newcommand{\rotaterelation}[1]{\rotatebox[origin=c]{90}{$\mathstrut#1$}} \begin{document} \begin{equation} \begin{array}[t]{ @{} c *{...


1

Here I use TABstacks. I also kept the same vertical alignment with respect to the equation number as the OP's original query (but that can be easily changed). \documentclass{article} \usepackage{amsmath,amssymb,rotating,tabstackengine} \TABstackMath \TABbinary \begin{document} \newcommand{\verteq}{\rotatebox[origin=c]{90}{$\mkern1mu=$}} \newcommand{\...


2

Probably the following is close to what you want to achieve: \documentclass{article} \usepackage{caption} \usepackage{graphicx} \usepackage{pdflscape} \usepackage{adjustbox} \usepackage{xcolor} \begin{document} %\begin{landscape} \begin{figure} \begin{adjustbox}{minipage=0.45\linewidth,frame=1pt 5pt} \includegraphics[width=\linewidth]{example-image-a} \...


3

I didn't figure out why you define two different \formule commands. I estimate, than only one would suffice: \documentclass{article} \usepackage{mathtools,amssymb} \mathtoolsset{showonlyrefs} \usepackage{array} \newcommand{\formule}[2]{ \par\medskip\noindent% \begin{tabular*}{\linewidth}{@{} >{\centering$\displaystyle}p{\dimexpr0.34\linewidth-2\...


2

I think the central problem with your equation is not that the column vector looks puny next to the matrices, but that you're using \displaystyle (and, implicitly) \limits inside the matrices. Speacking for myself, creating super-tall column vectors -- as you do in your screenshot and as is done in the first solution shown below -- does not good at all. In ...


6

With simple tikzpicture: \documentclass[10pt]{article} \usepackage[a4paper, %showframe, margin=7.5mm]{geometry} \usepackage[T1]{fontenc} \usepackage{tikz} \usetikzlibrary{arrows, chains, positioning} \begin{document} \begin{center} \begin{tikzpicture}[ node distance = 4mm and 22mm, start chain = Y going below ] \draw[...


5

Modify below of=entry to below=of entry, and change node distance=10mm to node distance=1mm. below of=.. is deprecated syntax, where the distance is calculated between node centers, while with below=of .. (requires the positioning library) the distance is calculated between node borders by default. I also removed the use of \tikzstyle, as that is considered ...


2

Like this? You only need to add (in your simple example) anchor=north to styles of nodes: \documentclass[10pt]{article} \usepackage[edges]{forest} % Document \begin{document} \begin{figure}[hbt!] \centering \begin{forest} for tree={ % style of tree nodes draw, semithick, rounded corners, align = center, ...


0

There's no need for tabularx here. The following uses \hfills to spread the content across the page in the same way tabularx does. In order to vertically align different sized images, you can capture the differing elements inside boxes (\bigbox and \smallbox below) from which you can extract their respective heights. This allows you to raise them into ...


2

See if the following solution is acceptable to you: \documentclass{report} \usepackage{tabularx} \usepackage[export]{adjustbox} \usepackage{subcaption} \usepackage{tikz} \usetikzlibrary{arrows.meta} \newcommand\bigrightArrow{ \tikz[baseline=-3pt] { \draw[line width=12pt,-{Triangle[length=16pt, width=24pt]}, gray] (0,0) -- ++ (32pt,0); } ...


3

You need to capture the widths of the widest elements in each of your equations. Then you can use those widths to impose alignment between elements that aren't as wide. Below I use a slight modification to eqparbox via \eqmathbox[<tag>][<align>]{<math>} which stores the maximum width of each <tag>ged box with varying <math> ...


1

I can't reproduce the huge space. However, it's possible to move up the equation number by reducing the display's width. Also, you're misusing cases: the alignment point is for stating conditions, not for aligning the right-hand side of equations. This is solved by nesting aligned in cases. Next, split the overlong expression with the help of mathtools ...


1

Your equation is too wide, causing the number to be placed below, rather than adjacent to, the equation. You must strive to break the long (full-width) line into multiple, shorter lines. Also, as David noted, there is no need for the outer align, as you only have one row to align. I replaced with the equation environment. I propose doing this by way of ...


1

In your code you are using c as column definition which does not support line breaks. That means the rows height will not exceed one line and so vertical alignment is neglectable. In case of using fixed column widths with p{...} which supports line breaks this issue can be solved by using the array packe and m{...} for column definition. \documentclass[...


1

\documentclass[12pt]{article} \usepackage[a4paper, vmargin=1in, hmargin.7in, headheight=14.5pt,]{geometry} %\usepackage[utf8]{inputenc} load by article \usepackage[misc]{ifsym} \usepackage{mathtools} % load msmath \usepackage{amssymb} % load amsfonts \usepackage{forest} \usepackage{tikz} \usetikzlibrary{intersections} \usepackage{...


2

Using, appropriately the package nicematrix using the due spacings (\mkern), you can obtain a similar result. \documentclass{article} \usepackage{amssymb} \usepackage{nicematrix} \NiceMatrixOptions{code-for-last-row=\scriptstyle} \begin{document} Let $m\in\mathbb{N}^{\times}$. For $j=1,\ldots,m,$ define $e_j\mathrel{\mathop:}=\mkern-10mu \begin{pNiceArray}{...


3

Another possibilities: defining text height and text depth: \begin{document} \begin{tikzpicture} \tikzset{ node distance = 8mm and 12mm, sum/.style = {shape=circle, draw, line width=1pt, node contents={\huge$+$}}, N/.style = {text height=2ex, text depth=0.5ex} } % nodes \node (in) [N] {$\widetilde{X}$}; \...


1

As already mentioned in my previous comments, I'd split up the single table into five different tables. This will make the code much longer but (at least in my opinion) a lot more readable and easier to adjust. In the following example, I have also used the automated row numbering approach. I have also introduced a new, centered fixed width column type. In ...


4

One way is to use [anchor=base] and add a \vphantom{X} node on the left to get the correct vertical spacing and a \hphantom{\widetilde{X} to get the correct horizontal spacing: \node [anchor=base] at (0,0) {$\widetilde{X}$}; \node [anchor=base] at (0,0) (input) {$\vphantom{X}\hphantom{\widetilde{X}}$}; which yields: Note: I replaced the \tikzstyle ...


7

My proposal, as alternative to the best answers, is the use the package blkarray. \documentclass[12pt]{article} \usepackage{mathtools,blkarray} \begin{document} \[ \begin{blockarray}{ccccccccc} \begin{block}{c(ccccccc)c} e_{j} \coloneqq \mkern-5mu& 0, & \ldots, & 0, & 1, & 0, & \ldots, & 0 & \mkern-5mu \in K^{m}\\ \end{block}...


2

Abd with this simpler code? \documentclass[12pt]{article} \pagestyle{plain} \usepackage[margin=1.8cm]{geometry} \geometry{a4paper} \usepackage[parfill]{parskip} \usepackage{amsmath} \usepackage{graphicx} \usepackage{booktabs} \usepackage{longtable} \usepackage[export]{adjustbox} \renewcommand{\arraystretch}{1.25} \setlength{\tabcolsep}{0.8em} \begin{...


11

I propose two variants, with mathtools and old-arrows: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{mathtools} \usepackage{old-arrows} % \begin{document} $e_j = (0,\dots,0,\underset{\mathclap{(j)}\strut}{1},0,\dots,0)$ $e_j = (0,\dots,0,\underset{\substack{\uparrow\\ j}\strut}{1},0,\dots,0)$ \end{document}


9

Here's a solution which employs the amssymb and mathtools packages. If you would like to push the (j) term a bit lower than in the picture shown above, simply change {1} to {1\mathstrut}. \documentclass{article} \usepackage{mathtools,amssymb} \begin{document} Let $m\in\mathbb{N}^{\times}$. For $j=1,\dots,m$ define \[ e_j := (0,\dots,0,\underset{\mathclap{(...


7

Here is an example: \documentclass{article} \usepackage{amsmath} \begin{document} $E_j := \underset{(j)}{(0,\dots,0,1,0,\dots,0)}$ \end{document} EDIT: For asymmetric case: e_j := (0,\dots,\underset{(j-1)}{0},\underset{(j)}{1},0,\dots,0)


7

For example: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{stackengine} % these are from https://www.tug.org/TUGboat/tb22-4/tb72perlS.pdf \def\clap#1{\hbox to 0pt{\hss#1\hss}} \begin{document} $(0,\dots,0,\ensurestackMath{\stackunder{1}{\clap{$(i)$}}},0,\dots,0)$ \end{document} (The \clap is a bit harsh; see ...


2

The solution lies in keeping subfigures as rows (for easy alignment), and using the addtocounter command to adjust numbering of subfigures manually. \documentclass[sigplan,anonymous,review,10pt]{acmart} \usepackage{listings} \usepackage{graphicx} \usepackage{subcaption} \begin{document} \begin{figure*}[htbp] \centering \begin{subfigure}[b]{\textwidth} ...


4

The symbols for \leq and < have different height. You can force the latter to be the same height as the former by using \vphantom, but \mathrel has to surround the construction. Also {<}\vphantom{\leq} should be used in order to avoid spurious spacing. \documentclass[12pt,a4paper]{article} \usepackage{amsmath} \newcommand\leqhyp{% \overset{\mathrm{...


0

Based on the answer of Stefan Kottwitz I wrote this little snippet to make it a little easier to implement: \newcommand{\tabfigure}[2]{\raisebox{-.5\height}{\includegraphics[#1]{#2}}} To be used as: \documentclass{article} \usepackage{mwe} \newcommand{\tabfigure}[2]{\raisebox{-.5\height}{\includegraphics[#1]{#2}}} \begin{document} \begin{tabular}{cc} ...


3

In good typography, the distance between two consecutive lines of text on a page should not depend on how tall the letters they contain are (well, this doesn’t hold true only in good typography!). For this reason, (La)TeX places their baselines at a fixed distance (for example, 12 points, or about 4.2mm), independently of the actual height of the glyphs ...


1

As explained in the comments, booktabs was designed to avoid using vertical rules in tables: as it adds some padding around horizontal lines, they normally cannot intersect vertical lines. I propose to replace booktabs with package \boldline which defines variable thickness horizontal and vertical lines. Padding of horizontal lines can be emulated with the ...


1

I'd set the verbatim content in a box (via lrbox) before using it (via \usebox): \documentclass{beamer} \begin{document} \begin{frame}[t,fragile] \begin{columns}[T] \begin{column}{0.45\textwidth} \begin{verbatim} Lorem ipsum dolor sit \end{verbatim} \end{column} \begin{column}{0.45\textwidth} \includegraphics[width=\...


4

To have the \forall and the \in vertically aligned, I used a 3 columns alignedat (due to the difference in width between t and x). Further, as newtx produced error messages on my system, I replaed them with fourier: \documentclass[a4paper,12pt]{article} \usepackage{mathtools,amssymb} \usepackage{fourier} %\usepackage{newtxtext} %\usepackage[libertine]{...


5

Here's a solution that employs an array environment to align the elements of the two rows of conditioning information. Note that I use a vertical bar to denote "given that" or "conditional on". If you prefer using a colon, you should input it as :, not as \colon. \documentclass[a4paper,12pt]{article} \usepackage{mathtools,array,newtxtext,newtxmath} \...


11

Writing \eta:=\eta(x,t) has no mathematical meaning whatsoever. Since apparently D is a subset of the plane, functions over D are two-variable by definition; how you call the variables is completely irrelevant. I wouldn't align the two final intervals. Around the colon I would add some additional space because of the split line on the right. \documentclass[...


Top 50 recent answers are included