Hot answers tagged

12

Centering is easy; the collision is cured by \/. \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{ebgaramond} \newcommand{\oa}[1]{% \/{\ooalign{\textsuperscript{#1}\cr\hidewidth.\hidewidth\cr}}% } \begin{document} M\oa{o} Salazar, Villan\oa{co} al SS\oa{mo} a 8 {\itshape M\oa{o} Salazar, Villan\oa{co} al SS\oa{mo} a 8} \end{...


9

Credit to Joseph at Detect which text "mode" (normal, italic, bold, etc.) is currently in use? for helping to determine if in italic shape. If so, an extra kern is applied to the over-script (relative to the dot below) to make it aesthetically compatible with italic shape. Note that I chose to center the dot under the first letter of the over-...


5

The problem is that the block array is vertically centered with respect to its entire size, including the indices below. The easiest way, in this case, is to put the whole thing in the blkarray. \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \usepackage{blkarray}% http://ctan.org/pkg/blkarray \begin{document} \[ \begin{blockarray}{r@{}...


5

You can obtain this result either with pmatrixand pstricks, defining certain elements as nodes, and attaching labels to these nodes, or with blockarray, stackengine or makecell, and a \raisebox command: \documentclass[a4paper,12pt]{article} \usepackage{mathtools} \usepackage{blkarray, makecell, stackengine} \usepackage{pst-node, auto-pst-pdf} % \begin{...


5

I couldn't resist to propose a small variant to Steven B. Segletes' solution using a font which has contextual historic S (EBGaramond doesn't, unfortunately), and a centred dot not on the base line. It compiles with xelatex or lualatex.. \documentclass[12pt]{article} \usepackage{stackengine} \usepackage{fontspec} \setmainfont{Sabon Next LT Pro} \...


4

Jsut add an empty boxes at the end of the page: \documentclass[12pt]{article} \usepackage{geometry} \geometry{paper=letterpaper,margin=2cm, showframe} \usepackage[autostyle]{csquotes} \usepackage[dvipsnames]{xcolor} \definecolor{marronMedio}{HTML}{AB8000} \definecolor{amariClaro}{HTML}{FFFFCA} \definecolor{grisMedio}{HTML}{999999} \usepackage[many]{...


4

Yes, this can certainly be done. Try the following: \documentclass{article} \thispagestyle{empty} \newlength{\dotcenterwd} \def\dotcenter#1{% \settowidth{\dotcenterwd}{\textsuperscript{#1}}% \hbox to\dotcenterwd{\textsuperscript{#1}}% \kern-\dotcenterwd% \hbox to\dotcenterwd{\hfil.\hfil}% }% \begin{document} \Huge M\dotcenter{o} \textit{M\...


3

Here is a solution, if I've well understood what you want. It's based on the code for the \vdotswithin command from mathtools. So I define a \vertwithin{label} command, which puts the \vert command centred in a box of width the labelwidth, and uses this box as alignment point. B.t.w., for n alignment points, you need 2n-1 ampersands. Also, you don't have ...


3

The first \hline command is causing the trouble. If you remove it, the table is aligned. If you want a horizontal line on top, use the array-package and the \firsthline command. MWE: \documentclass{standalone} \usepackage{array} \begin{document} LEFT \begin{tabular}[t]{ll} First & \begin{tabular}[t]{|l|l|} \firsthline Line & 1 \\ \hline ...


3

By using the package tcolorbox, this can be achieved: MWE: \documentclass{article} \usepackage{multicol} \usepackage{tcolorbox} \begin{document} \pagestyle{empty} \bigskip \centerline{\huge XXXXXXX} \bigskip \setlength{\columnseprule}{1pt} \def\columnseprulecolor{\color{green}} \begin{tcolorbox}[ sharp corners=all, colback=white, colframe=green, ...


3

If you let tex page break normally and note where it breaks the page you can force a "hidden" paragraph break at exactly that spot and insert th ewrapfig: \documentclass{article} \usepackage{graphicx,wrapfig} \begin{document} \section{aaa} aaaa one two three four five six seven eight nine ten one two three four five six seven eight nine ten one two ...


3

You can use alignat to remove the gaps between the alignment marks &: \documentclass{article} \usepackage{mathtools,eqparbox} \begin{document} % Original alignment \begin{align} \cdots\text{ABB}&\bigg|\text{BAABB}&\bigg|\text{AAABB}&\bigg|\text{BB}&\bigg|\text{BB}&\bigg|\text{ABABAABABB}&\bigg|\text{AA}\cdots \\ n_0 &...


2

Although this should be fixed for consistensy in mathtools, a fix could be to do something like this, as my original comment mentioned: \documentclass[11pt]{article} \usepackage{mathtools} \begin{document} \begin{align} % Original code, \prescript at wrong height \prescript{*}{}{\left(X^*\right)} \cong X \cong \left(\prescript{*}{}{X}\right)^*\\ % Just ...


2

Use the fouridx package instead: Edit: I also included the suggestion by the O.P. to smash the parentheses in order to have lower *s \documentclass{article} \usepackage{mathtools} \usepackage{fouridx} \begin{document} \[ \fourIdx{*}{}{*}{}{\!(X})\quad (\fourIdx{*}{}{*}{}{\!X)} \] \[ \fourIdx{*}{}{*}{}{\!\smash{(}X})\quad (\fourIdx{*}{}{*}{}{\!X\...


2

We can use the fact, that dimensions of cells are known. The arrows are a bit deeper than the central line, but they probably have S_c's over the, hence the effect of neglecting vertical dimension of lines in matrix is compensated. The last matrix is in the new line, because \textwidth is too small. \documentclass[11pt]{memoir} \usepackage[utf8]{inputenc} \...


2

\item $ \begin{aligned}[t] 2x+y &= 21 \\ x-y &= 6 \end{aligned} $ \item $ \begin{aligned}[t] 5x+y &= 28 \\ x-y &= 2 \end{aligned} $ Solved this! Simple as that!


2

By only providing a code fragment, it makes it tough, because we have to imagine what all the undefined commands might mean. First I assumed a typo in the question that you wanted the alternate format if position or LOCATION were absent (since why would you want the date if date were absent). Then I assumed that the \Xstyle commands were merely text styles....


2

With help of package adjustbox you can obtain: In the first row the margin above and below picture is added, in the second row the image is without added margins. The code: \documentclass{article} \usepackage{graphicx} \usepackage[export]{adjustbox} \begin{document} \begin{table}[htbp] \centering \caption{My caption} \label{tab:mytab} \...


2

In the provided example, a minus sign was left off the length .5\totalheight. Graphical images are set above the baseline, when using \includegraphics, whereas tabular cells are centered. Thus, one must move the graphical image down by half its height to compensate. \documentclass{article} \usepackage{graphicx} \begin{document} \begin{table}[htbp] \...


1

Consider using adjustbox to vertically align the tabulars to the \items as the default [t]op and [b]ottom alignments when including horizontal rules - \hlines - influences it: \documentclass{article} \usepackage{adjustbox} \begin{document} \begin{enumerate} \item \adjustbox{valign=t}{\begin{tabular}{|c|c|} \hline Lorem & Ipsum \...


1

Just raise every arrow. Once finished, tikzpictures are aligned on its baseline. In this case, tikzpicture dimensions are 1cm long and almost nothing high. Coordinates (-1,2) and (0,2) only have sense inside the tikzpicture, but once finished only picture size matters. Therefore vertical position 2 means nothing in this case. But you can use a \raisebox ...


1

Of course, you still have to count lines this way. \documentclass{article} \usepackage{graphicx} \usepackage{afterpage} \usepackage{caption} \usepackage{showframe} \begin{document} \section{aaa} aaaa one two three four five six seven eight nine ten one two three four five six seven eight nine ten one two three four five six seven eight nine ten \rule{...


1

\documentclass{article} \usepackage{amsmath,tabularx} \def\RB#1{\raisebox{\dimexpr(-\height-\depth)/2}{#1}} \begin{document} \begin{tabular}{ll} $\star$ & \RB{$\displaystyle \int_0^1 f(t) dt = 1$} \end{tabular} \end{document} If you want to move the star then use \vphantom for the height of the integral. Then you do not need fixed values for the ...


1

APPROACH #1 The \upstar macro creates a row with just a star in column one, and then does an artificial shift to place it properly relative to the top of row 2. But in your input, it looks like part of row 1. \documentclass{article} \usepackage{amsmath} \usepackage{tabularx} \newcommand\upstar{$\star$ \\[\dimexpr5pt-\normalbaselineskip]} \begin{document} \...


1

Put the first \begin{minipage} just before \section{Imagenes}.


1

I am unable to compile your code, but by I brief look I suspect that changing \newcolumntype{C}[1]{>{\centering}p{#1}} with \newcolumntype{C}[1]{>{\centering}m{#1}} will solve your problems


1

This because of the added lengths \\[1ex]. You can replace this with the cellspace package, which defines minimal vertical spacings between a cell and the above and below cells for columns with specifier prefixed by the letter S. Also I simplified the code for the column heads using the makecell package: \documentclass[11pt]{article} \usepackage[utf8]{...


1

The construction of the squares might be simplified, but that's another matter. You can use baseline for setting the placement with respect to the baseline. \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} % the following two are just for the example \usepackage[margin=1cm]{geometry} \usepackage{lipsum} %%%%% \newcommand{\cellsize}{0.5} \...


1

I think there is an easier way to create your matrix, here's a possible solution. You could even make it further automatic, by setting a counter, but I thought you might want to change the command. Output Code \documentclass[11pt]{memoir} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{microtype} \usepackage[dvips]{graphicx} \usepackage{...


1

All I did was modify your \printmatrix macro to wrap the tikzpicture as follows: \raisebox{-2.5\dimexpr\cellsize cm}{...} Here is the MWE. \documentclass[11pt]{memoir} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{microtype} \usepackage[dvips]{graphicx} \usepackage{xcolor} \usepackage[french]{babel} \usepackage{amsmath} \usepackage{...



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