New answers tagged

1 vote
Accepted

Make the 2nd and Subsequence Pages in LaTeX 20 seconds smart CV template Full pages, but Not Indentented

Luckily, the class file you are using sets the width of the main text using geometry and draws the side bar using TikZ in the margin that was reserved, which means what you need to do is simply start ...
Willie Wong's user avatar
  • 24.5k
1 vote

horizontal alignment problem in tabular containing math equation

The standard array package provides fixed width columns that don't require \arraybackslash tricks. The column type is w: w{c}{<width>} for a centered column with specified width w{l}{<width&...
egreg's user avatar
  • 1.1m
1 vote

horizontal alignment problem in tabular containing math equation

You can easily achieve this using the tabularray package. \documentclass{standalone} \usepackage{booktabs} \usepackage{tabularray} \UseTblrLibrary{booktabs} \begin{document} \begin{tblr}{|Q[m,c,1cm,...
NonnoDino's user avatar
  • 136
3 votes
Accepted

How to correctly center my lines of math?

Here is a rewrite using siunitx \documentclass[a4paper]{article} \usepackage{amsmath,siunitx} \sisetup{ per-mode=fraction, group-digits = integer, } \begin{document} \begin{align*} \dot m &...
daleif's user avatar
  • 54.1k
1 vote

How to correctly center my lines of math?

\documentclass{article} \usepackage{amsmath} % for the align environment \begin{document} Finally: \begin{align*} \dot{m} &= \rho \cdot V \cdot A \\ &= 0.00347747 \, \frac{\text{kg}}{\text{s}}...
Paul A's user avatar
  • 933
8 votes
Accepted

\phantom not giving correct space?

You forgot to put {}< at the beginning of the \phantom. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{alignat*}{2} d\bigl(x^{(j)}_j, x^{(i)}_i\bigr) & \le d\bigl(x^{(...
egreg's user avatar
  • 1.1m
1 vote
Accepted

putting text in center of image with overpic

This uses a savebox to measure the size of the image. Note that \huge comes before \strutbox which is font size dependent. Also, \dp\tempbox=0pt and can be ignored. \documentclass{article} \...
John Kormylo's user avatar
  • 79.3k
2 votes

putting text in center of image with overpic

Without overpic: \documentclass[twocolumn]{article} \usepackage{graphicx,xcolor} \usepackage[export]{adjustbox} \begin{document} {\centering \makebox[0pt]{\includegraphics[valign=c,width=0.3\...
Fran's user avatar
  • 80.1k
0 votes

Raggedleft paragraph in a table

Use \raggedleft\arraybackslash in the last column of the table. For example this is a part of a function that creates a ticked box in the last column (rightest empty box in that case) \raggedleft\...
paoloberm's user avatar
0 votes

Table rowspan and colspan

A solution with {NiceTabular} of nicematrix. \documentclass{article} \usepackage[margin=2mm]{geometry} \usepackage{nicematrix} \begin{document} \noindent \begin{NiceTabular}[hvlines]{>{\rule[-6mm]...
F. Pantigny's user avatar
  • 39.6k
2 votes

How can I modify LaTeX commands to center company/university names and make position independent of column length in resume headings?

You can use the commands \rlap, \clap, and \llap to collapse the items left, center, and right to zero width and then use \hfill to center. If any of the parts gets too long, it will overlap with the ...
gernot's user avatar
  • 49.4k
2 votes

Center uppercase chapter title of more than one line with titlesec

I suggest not using \\ but a different command for that situation so you can use it in different ways. \documentclass[letterpaper,12pt]{book} \usepackage{titlesec} \titleformat{\chapter}[display] {\...
egreg's user avatar
  • 1.1m
2 votes
Accepted

Center uppercase chapter title of more than one line with titlesec

IMHO things like these are easier using a configurable class like scrbook: \documentclass[letterpaper,12pt,chapterprefix]{scrbook} \let\raggedchapter\centering \renewcommand*{\...
cabohah's user avatar
  • 10.8k
6 votes
Accepted

Is there a way to choose a "horizontal center" of a TikZ picture?

\documentclass[tikz]{standalone} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \coordinate (o) at (2,2); \draw (0,0) rectangle (4,4); \draw[fill=black] (3,3.5) circle[radius=0.1] -- ++(0,...
hpekristiansen's user avatar
4 votes

Is there a way to choose a "horizontal center" of a TikZ picture?

I understand that you want an automatic way to extend the (horizontal) figure bounding box so that it is symmetrical around the center of your rectangle. One way of solving this is the following: I ...
Rmano's user avatar
  • 40.3k
0 votes

Is there a way to choose a "horizontal center" of a TikZ picture?

You could hide the width of the label with \makebox[0pt]{label extends border} and add a horizontal margin to your image which will be symmetrical: \documentclass[tikz,border={0.7cm 0cm}]{standalone} \...
samcarter_is_at_topanswers.xyz's user avatar
0 votes
Accepted

How to center a picture in background in titlepage

So after advices using Tikz, I managed to good quite something here. Notably, I integrated it into a class. I might be also very inefficient in term of design, so comments are welcome. Most important ...
22decembre's user avatar
0 votes

leave an inch by inch margin -- top right

It is easier of overlap margins than set them, especially non rectangular ones. This uses the overlay option of tikzpicture (run twice). \documentclass[8pt, letter, twocolumn]{extarticle} \usepackage[...
John Kormylo's user avatar
  • 79.3k
3 votes

Push inline math to next line without manual line break (maintain justification)

You could insert the instruction \sloppy immediately after \begin{mainthm}\label{thm:VecSpa}. As the following screenshot demonstrates, the interword spacing can become rather, well, sloppy as a ...
Mico's user avatar
  • 503k
7 votes
Accepted

Push inline math to next line without manual line break (maintain justification)

\\ and \newline force a line break leaving a line short. \linebreak forces a break without losing justification so you can use classes\linebreak $....
David Carlisle's user avatar
2 votes

Latex alignment in the form-like for text in the header

You can use boxes: \documentclass{article} \newlength{\presentationtitles} \setlength{\presentationtitles}{4em} \begin{document} \noindent\makebox[\presentationtitles][l]{Title}: On the blah blah ...
Werner's user avatar
  • 602k
2 votes

3 Graphs horizontally and equations for each one

Found the solution, if anyone ever stumbles upon the same problem: Use [t] to top align the minipages. \minipage[t]{0.32\textwidth} Resize the boxes for the equations until they fit \begin{equation} ...
Sebastian Bätz's user avatar
4 votes
Accepted

siunitx in a table: how to align on the plus-minus?

You could let siunitx do the alignment for you if you use an S column: \documentclass{memoir} \usepackage[separate-uncertainty=true]{siunitx} \begin{document} \begin{tabular}{lS[table-format=-2.1+-2....
samcarter_is_at_topanswers.xyz's user avatar
0 votes
Accepted

How to center title and section page in plain frame of Beamer Berkeley

You can move the title and section pages half the sidebar width to the left: \documentclass{beamer} \usetheme[width=2cm]{Berkeley} \AtBeginSection[]{ { \hoffset=-.5\beamersidebarwidth \begin{frame}[...
samcarter_is_at_topanswers.xyz's user avatar
1 vote

How to span lines for one column with align?

Use alignedat for the four items on the left and fill with the last formula. \documentclass[12pt]{book} \usepackage{amsmath} \begin{document} \begin{equation*} \begin{alignedat}{2} v_1 &= ...
egreg's user avatar
  • 1.1m

Top 50 recent answers are included