New answers tagged

3 votes

How to align between text and math between two columns?

You can have the alignment with the Shortunderstack command from stackengine. As to the spacing of the last column, add, e.g., \quad inside @{}: \documentclass[journal]{IEEEtran} \usepackage{...
user avatar
  • 263k
3 votes

How to align between text and math between two columns?

I would like to suggest that you employ a tabular* environment and set its overall width to \columnwidth. Then, provide for a bit of extra whitespace to the left of the final (text) column, along the ...
user avatar
  • 444k
4 votes

How to align between text and math between two columns?

Your @{} has an argument, that may be, e.g., \hspace: \documentclass[journal]{IEEEtran} \usepackage{booktabs,capt-of} \usepackage{array,multirow,bm,adjustbox} \usepackage{blindtext} \begin{document} \...
user avatar
3 votes
Accepted

How do I center align every corresponding elements in a table?

You can use an array with ten columns. \documentclass[journal]{IEEEtran} \usepackage{booktabs} \begin{document} \begin{table}[!t] \centering \caption{A table} \label{tab:lable} $\setlength{\...
user avatar
  • 1.0m
3 votes

Vertical alignment between two lines of text

With tabularray package and X columns: \documentclass{article} \usepackage{tabularray} \begin{document} \noindent\begingroup \begin{tblr}{colsep=0pt, colspec={*{31}{X[c]}}} A & Ă & Â & B ...
user avatar
  • 258k
2 votes
Accepted

Vertical alignment between two lines of text

Here's a solution which (a) employs a tabular* environment (with its overall width set to \textwidth) and (b) employs the \midrule macro of the booktabs package to draw a well-spaced horizontal line. ...
user avatar
  • 444k
3 votes

Vertical alignment between two lines of text

Welcome to TeX.SX! I think, your approach using a tabular is already nice. You should probably not use vertical lines and omit the \hlines above and below the tabular. And there is no need to typeset ...
user avatar
3 votes

How do I left align the text and align these equal signs?

This uses a tabular and @{$\null =\null$} to add correctly spaced equal signs between the column. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{booktabs} \begin{document} \begin{...
user avatar
  • 70.8k
3 votes

How do I left align the text and align these equal signs?

Rarely used but not to be forgotten: the tabbing environment. Insinde a tabular, you would need to wrap it in a \parbox or similar, however. (I placed the numbers in math mode for nicer typsetting.) \...
user avatar
4 votes

How do I left align the text and align these equal signs?

Here's a different array-based solution. \documentclass{article} \usepackage{array} % for \newcolumntype macro \newcolumntype{L}{>{$}l<{$}} \begin{document} \[ \setlength\arraycolsep{0pt} \...
user avatar
  • 444k
1 vote

How do I left align the text and align these equal signs?

You could use the array environment, which only works in math mode. \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{array}{ll} \text{Input data} &= 2000 \\ \text{...
user avatar
  • 43
0 votes

Tagging Each Line in `aligned`

Why not use a simple align? \documentclass[]{article} \usepackage{amsmath} \usepackage{amssymb} \begin{document} \begin{align} A = B + C + D & + E + F + G + H + I \\ ...
user avatar
  • 263k
1 vote
Accepted

Tagging Each Line in `aligned`

You can use align inside of gather. There is however the old issue with \label (see Labels and nesting gather and align). The workaround proposed there does not seem to work with more than one label, ...
user avatar
  • 26.4k
0 votes

pgfplots — Align two separate plots by x-axes and align captions

This answer only a sum up of John Kormylo's answers with some improvements that make it even easier. But all credits go to his answer. The key here is to set a baseline for each of the tikzpictures at ...
user avatar
  • 2,793
2 votes
Accepted

pgfplots — Align two separate plots by x-axes and align captions

This aligns the tikzpictures using [baseline=(...)], and aligns the captions by using a separate row. I used \makebox because the tikzpictures weren't fitting into the space given. \documentclass{...
user avatar
  • 70.8k
1 vote

Problem aligning tikzpicture or caption (side by side) with subfloat and comma separator in xaxis

Use subfigure environment from subcaption package instead of subfig: \documentclass{article} \usepackage{subcaption} \usepackage{pgfplots} \usetikzlibrary{calc} \pgfplotsset{ compat=newest, /...
user avatar
  • 19.1k
2 votes

Why is the anchor=north west not working with a circle, but with a rectangle?

This draws the circle first and positions everything else (background layer) relative to it. \documentclass[tikz]{standalone} \usetikzlibrary{calc,backgrounds} \newlength{\width} \setlength{\width}{...
user avatar
  • 70.8k
7 votes

Why is the anchor=north west not working with a circle, but with a rectangle?

While Jasper Habicht already explained the cause for your problem (north west lies on the border), for a more flexible solution you can define separate anchors, like I did in the code below for corner ...
user avatar
  • 87.8k
10 votes
Accepted

Why is the anchor=north west not working with a circle, but with a rectangle?

Well this is, because the north west anchor of the shape circle, which you are using to position the node, sits on the shape's border. As for the shape rectangle, the north west anchor also sits on ...
user avatar
1 vote
Accepted

How to avoid broken vertical alignment in tabularray cells when some of the cells include images or pictures like tikz pictures?

This happens whenever a line in the second column has unusual height, and a tikzpicture usually qualifies, see the first example below. You can shift the baseline to the picture center (second example)...
user avatar
  • 1.0m
0 votes
Accepted

Fixing header position, ignoring margin changes

The page headers and footers are always positioned relative to the text body. However, fancyhdr can define the offsets of the header and footer fields relative to this with the command \fancyhfoffset (...
user avatar
1 vote

Math mode: square bracket strange behaviour

That's the expected behavior: the brackets are symmetric with respect to the formula axis, which is the imaginary line where the main fraction line sits on. I guess that this is some step during ...
user avatar
  • 1.0m
0 votes

Math mode: square bracket strange behaviour

You obtain a better looking formula with bmatrix: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \[ \begin{bmatrix}\dfrac{1}{\dfrac{\mathrm{L}^3}{\mathrm{t}}} \end{bmatrix} \] ...
user avatar
  • 263k
1 vote
Accepted

formula width in double column paper

First of all you should use a Times compatible font also for math and also wrap your long names in \mathit or similar. Second, you need to split the long top line. Using cases is out of the question, ...
user avatar
  • 1.0m
1 vote

formula width in double column paper

As Zarko commented your equation wouldn't fit even if you use double-column. The first option, which I think is the best, is to use shorter variable names. If you must use the formula exactly as it ...
user avatar
  • 20.4k
0 votes

How to align a Remark

The amsthm package provides three pre-defined theorem styles: theorem, definition, and remark. The directive \theoremstyle{rem} should be throwing a warning message -- did you notice it? Either use \...
user avatar
  • 444k
1 vote

multicolumn with vertical line in array/tabular

In your (particular) case you can use simple array, and top and bottom aligned math environments: \documentclass[12pt,a4paper]{book} \usepackage[margin=2.50cm]{geometry} \usepackage{array} \...
user avatar
  • 258k
4 votes
Accepted

multicolumn with vertical line in array/tabular

This is another variant with the equals signs aligned. I used the nicematrix package with the cell-space-limits=4pt option to vertically expand the cells. % !TeX TS-program = pdflatex \documentclass[...
user avatar
  • 28.2k
4 votes

multicolumn with vertical line in array/tabular

Here's the solution based on array. In order to achieve the effect beginning from the 3rd row, you can make "Soit" be a part of the first column and remove space it would normally occupy to ...
user avatar
  • 1,662
2 votes
Accepted

Why does alignat not work here?

How about this layout, obtained with \mathrlap, from mathtools? \documentclass[journal]{IEEEtran} \usepackage{mathtools,amsfonts} \begin{document} \begin{alignat}{2} |x|&= ...
user avatar
  • 263k
2 votes

Why does alignat not work here?

Your document produces ! Extra alignment tab has been changed to \cr. <template> $\hfil $$\endtemplate As cases only allows one & per row. After any error the PDF is not intended to be ...
user avatar

Top 50 recent answers are included