Tag Info

New answers tagged

0

The alignment of multiline items is not good, and the numbering should be ‘horizontal’. The tasks package can do all that. Compare: \documentclass[9pt,leqno]{extarticle} \usepackage[showframe]{geometry} \usepackage{mathtools} \usepackage{enumitem} \usepackage{multicol} \usepackage{tasks} \DeclarePairedDelimiter\abs\vert\rvert ...


0

I'm not sure if I've understood what you are trying to do but is it something like this? If so, you can use \mbox{} on the lines you want to leave empty to create the gaps: \documentclass[openany]{book} \usepackage[a4paper]{geometry} \usepackage{multicol} \title{Pax Romana} \begin{document} \newpage \begin{multicols}{2} \section{Pax Romana} \rlap{% ...


1

Although I searched the site & online prior to writing this, and even wrote a tentative version of the question to see if the suggested related questions addressed the issue, only once I had written the entire question did a related, in my opinion poorly titled, question pop up, so I'm posting this in hopes that the clearer title and tags will show up ...


4

You have two basic options: Either you treat versus as a standard paragraph text, and then it's position is completely correct (just try it with couple standard paragraphs before and after and you'll see it doesn't stand out at all). Or you treat it as a part of the display equation, but then it shouldn't get a line on its own: \documentclass{article} ...


4

You can insert \hspace{<some length of your choice>} before "versus". In the example below, this length is set at 3cm. You may obviously alter this choice to suit your taste. Three additional comments/suggestions: (i) mathtools loads amsmath by default -- no need to load amsmath separately; (ii) the environment {alignat*}[1] is equivalent to align*; ...


2

Your minimal example only replicates problem (1), not (2). To solve (1), add \renewcommand{\partnumberlinebox}[2]{#2 } \renewcommand{\chapternumberlinebox}[2]{#2 } to your preamble. It allows for a flexible spacing around the number for both \parts and \chapters, effectively discarding the requirement to place the part/chapter number inside a box of ...


5

Here's some additional ideas for you for use with XeTeX: \uselanguage{spanish} \def\mainfont{EB Garamond} \font\hugefn="\mainfont:letterspace=10" at 30bp \font\largefn="\mainfont:letterspace=5" at 22bp \font\bigfn="\mainfont:letterspace=5" at 14bp % NOTE: \big is already defined! \font\mainfn="\mainfont:+hlig;+onum" at 12bp % historical ligatures, old ...


8

spread is that much extra width, you want to which specifies the final width


13

The classical way is using \@bsphack and \@esphack. They are used by \label or \index, both supposed to be invisible/empty regarding spacing. These commands remember, if there is a space before the command. If yes, the second space afterwards is suppressed by \ignorespaces. The commands are defined in the LaTeX kernel: \def\@bsphack{% \relax \ifhmode ...


10

It doesn't really generate space it's just that you have added two spaces, you would see same from a {} b with one space before and one after. But you can end your command with \ignorespaces to ignore the following space. \newcommand{\todo}[1]{\ignorespaces}


1

I suggest reducing the font size to \small (locally) and replacing the brace with bullets, using the \mathllap command from mathtools to have right-alignment of the conditions: \documentclass[3p,times,12pt,draft,twocolumn]{elsarticle} \usepackage{mathtools} \begin{document} {\small% \begin{align}\label{eqA} \mathrlap{ E_{ ⊥ ,\,\mathrm{diff}}=} \\ \notag ...


2

I think that inserting a line break at a multiplicative location is inferior to breaking the line at an additive (or subtractive) location. Moreover, I think that a cases environment is not particularly well suited for the formula at hand. I'd use a basic \left\{ ... \right. construct and provide an additional line break in each of the two subformulas in ...


5

You don't need flalign (I see it too often abused) nor cases, but aligned: \documentclass[3p,times,12pt,draft,twocolumn]{elsarticle} \usepackage{mathtools} \begin{document} \begin{equation} E_{\perp,\mathrm{diff}}= \left\{ \begin{aligned} E_{g,\mathrm{meas}} &\cdot(1.020-0.254\cdot k+0.0123\\ &\cdot\sin\gamma_S) \quad \text{for ...


1

Redefine/modify the cases environment \makeatletter \def\env@cases{% \let\@ifnextchar\new@ifnextchar \left\lbrace \def\arraystretch{1.2}% \array{@{}l@{\hspace{2pt}}l@{}} % adjust 2pt to suit your need } \makeatother Code \documentclass[3p,times,12pt,draft,twocolumn]{elsarticle} %\usepackage[english]{babel} \usepackage{mathtools} \makeatletter ...


3

The default is to insert a space of 1em between \inst items (inserted using \and) - see beamerbasetitle.sty. This insertion is done by a macro \beamer@andinst which has the following definition: \def\beamer@andinst{\\[1em]} You can change that to suit your needs. For example, adding \makeatletter \def\beamer@andinst{\\[0.5em]} \makeatother would half ...


0

Here is a simple layout which just uses geometry's scale option and titlesec's compact option. If you want smaller margins, increase the value .8 to a higher value. (1 would be no margins at all; 0 would be nothing but margins.) If you want larger margins, decrease it. \documentclass[a4paper]{article} \usepackage{geometry} \geometry{scale=.8}% use 80% of ...


3

Savetrees? http://www.ctan.org/pkg/savetrees Seems to do exactly what you want.


3

tex tries to keep rows \baselineskip apart but if the depth of one row plus the height of the next is already close to or more than \baselinekip it gives up on that and instead just inserts a fixed \lineskip glue. a minipage or tabular with [t] has everything but the height of the top row in the depth so the following box is just separated by \lineskip glue. ...


2

Adjust font size and the spacing, but this should be the idea: \documentclass{book} \usepackage{titlesec} \titleformat{\chapter}[display] {\Large\bfseries} {\MakeUppercase{\chaptertitlename}} {2\baselineskip} {\large\quad\thechapter. } \titleformat{name=\chapter,numberless}[display] {\Large\bfseries} {} {0pt} {\large} \begin{document} ...


4

You can use a \parbox with a width of \dimexpr\columnwidth-2\fboxsep\relax in \newcommand{\solidheading}[2][blue]{% \noindent\sffamily\colorbox{#1}{\parbox[t]{\dimexpr\columnwidth-2\fboxsep\relax}% {\bfseries\textcolor{white}{#2}% }}% \vskip1ex %% adjust this as suitable } May be you should put \sffamily inside the \parbox. Code: ...


3

This is actually not an issue of multicol but a general problem with a core functionality of LaTeX. You get exactly the same kind of behavior if you replace \columnbreak by \label{foo} or \index or ... The issue is that these "invisible" commands internally use \@bsphack...\@esphack to hide themselves and to avoid that you end up with two spaces (on the ...


3

You probably want to use array, rather than alignat, in order to have finer control. I propose two versions, on the left one, {+1} avoids space between the two symbols. \documentclass{article} \usepackage{amsmath,array,booktabs} \begin{document} \[ \begin{array}{ @{} r % for x @{} >{{}}r % for -1 and +1 @{} >{{}}c<{{}} % for the = ...


6

although i'm pretty sure this is addressed in another question, here is a suggestion. (however, your use of alignat is missing one important thing -- the number of columns.) all you need to do is, after the next-to-last line, just before the \cline, specify an optional negative vertical space. here i've used twice the height of a lowercase "x": ...


5

I prepared an expl3 version of Steven's answer featuring both \IBAN and \ncs. \documentclass{article} \usepackage{xparse,accsupp} \ExplSyntaxOn \cs_new_protected:Npn \larifari_iban:n #1 { \int_zero:N \l_tmpa_int \tl_map_inline:nn { #1 } { ##1 \int_incr:N \l_tmpa_int \bool_if:nT { ...


4

You need a blank line before \columnbreak \documentclass{article} %\usepackage{polyglossia} \usepackage{multicol} \usepackage{calc} \setlength{\parindent}{0pt} \begin{document} \begin{multicols}{2} \begin{center} \huge Left \end{center} \framebox[.5\textwidth-.5\columnsep]{ Left } \columnbreak \begin{center} ...


7

Sticking a "d" and "B" together sounds easy, but it actually required quite a bit of tuning. EDITED to take egreg's suggestion of using a \clipbox instead of masking with a white \rule. 1) They are slightly different vertical height, so the "d" had to be scaled to the height of a "B". 2) The top serif of the "d" is sloping, and so part of the left ...


0

I hope that this is the one you want code \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure} \begin{center} \includegraphics[width=0.35\textwidth]{albt.png} \vspace{1cm} \includegraphics[width=0.35\textwidth]{altman.png} \vspace{0.1cm} \caption{ActionButton} \label{ActionButton} \end{center} \end{figure} ...


5

Your URL string contains quite a few - (hyphen) characters, and it's quite long. By default, URL strings are not broken at hyphenation characters. To enable line breaking at the hyphens, load the url package with the option hyphens before loading hyperref. \documentclass[12pt,a4paper]{book} \usepackage[utf8]{inputenc} ...


3

After loading hyperref with the breaklinks option, add the hyphen to the list of allowed break points by doing \g@addto@macro\UrlBreaks{\do\-} You can also relax the spacing of the bibliography by adding \raggedright before it. This aligns the following text in the current group flush left. \documentclass{article} \usepackage[utf8]{inputenc} ...


2

There are a couple of tricky things going on here. It looks like the renewed thebibliography environment has no effect when you're using biblatex. When you switch to single spacing with the \singlespacing command, it inserts a \vskip \baselineskip to make the transition to single spacing (see the definition here). If you define your own chapter heading, ...


3

I simplified your code: thick \hlines are already defined by the makecell package. It also defines thick \clines, unfortunately it didn't work in this context, for some reason, so I had to use a workaround with \hhline. The second title is an argument to the \makecell command, that allows for line breaks inside cells. The trick to make appear the multirow ...


3

The OP forgot the \tabcolsep width to the left and the right of in the relevant \multicolumn command. It can be reduced to 0pt using the @{} statement. The inner two \tabcolsep widths must be added to the width of 6cm. \multicolumn{2}{@{}C{6cm+2\tabcolsep+2pt}@{}}{Cobertura del transporte en el municipio de Monterrey} However, there is an additional ...


3

The scrreport document class defines the macros \subsection and \subsubsection by invoking the LaTeX kernel command \@startsection with the following settings: \newcommand\subsection{% \@startsection{subsection}{\subsectionnumdepth}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\ifnum ...


3

You seem to want that \belowdisplayshortskip is set equal to \belowdisplayskip; the former is used if the line above the display is “short”. The parameters are set in \normalsize (and also in \small and \footnotesize). Just append the appropriate declaration. \documentclass{article} \usepackage{etoolbox} ...


6

delete the two \hspace which are not doing anything and add a vertical space \bigskip or \vspace{3in} or whatever space you need. \documentclass[12pt,letterpaper,sans]{moderncv} % moderncv themes \moderncvstyle{banking} % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking' \moderncvcolor{red} ...


2

I'm not sure I'd split it that way but: Markov evolution model defined by \vspace{\abovedisplayskip} \begin{minipage}[t]{0.45\columnwidth}% \begin{equation} \nu_{t}=\frac{\beta\nu_{t-1}}{\gamma_{t}}\label{eq:v_evolution} \end{equation} % \end{minipage}% \begin{minipage}[t]{0.45\columnwidth}% \begin{equation} ...


0

From time to time I have had the same issue and I came across this question. \raggedbottom provides a fix, but not always. I did find some curious behavior in that if a paragraph ends with an index reference, i.e.: This is the last sentence of the paragraph.\index{Paragraph}<CR><CR> This is a new paragraph. a blank line is created between the ...


2

As already mentioned, the hyphen is interpreted as a minus in math mode. To correct the issue you could define a macro \mhyphen that stands for the hyphen in math mode: \mathchardef\mhyphen="2D \newcommand{\nuSwap}{\nu\mhyphen\textsf{swap}} this can of course be combined with \ensuremath to get a macro that works in both modes. I also recommend using ...


7

In math mode (as in your $\nuSwap$) the - becomes a minus sign and is thus longer and has spaces around it. Simply preventing the - from being treated as maths as you do with the word swap gives what you want, e.g. by redefining: \newcommand{\nuSwap}{\nu\textsf{-swap}} in which case: \documentclass{article} ...


0

To summarize the answer from @steven-b-segletes and @werner I want to share my results with everyone. Here is what the different solutions look like: At the end of each paragraph I noted what that paragraph was set with: original \linebreak \begin{sloppypar} \sloppy and \fussy back to original


7

Whereas \sloppy will loosen the alignment constraints on the whole document, the sloppypar environment can limit the effect of the damage to a localized area. In my MWE, the \hrulefill shows the extent of the left/right margins. \documentclass{article} \def\pre#1{\makebox{#1}} \begin{document} \noindent\hrulefill xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxThis is a ...


3

You can use before=<code> and / or after=<code> to put the space/some latex code. If you use \setlist{nosep,after=\vspace{\baselineskip}} we get Code: \documentclass{article} \usepackage{enumitem} \setlist{nosep,after=\vspace{\baselineskip}} \begin{document} I like the lack of vertical space between the end of this paragraph and the ...


1

enumitem offers ready-made options for eliminating the space between items and paragraphs within the list (noitemsep) or all vertical spacing (nosep): \documentclass[11pt]{article} \usepackage{enumitem, kantlipsum} \begin{document} \paragraph{List without vertical spacing between items and paragraphs:} \kant[2] \begin{enumerate}[noitemsep] ...


10

In TeX end-of-lines count as spaces, so you get four of them instead of one, so you should type The counter N has been set to \ifnumequal{\value{N}}{1}{\emph{one}}{}% \ifnumequal{\value{N}}{2}{\emph{two}}{}% \ifnumequal{\value{N}}{3}{\emph{three}}{} which is nice. By the way, there are other methods for achieving the same result: The counter N has been ...


2

Instead of using a package, you can also use the built-in features and define a new environment \newenvironment{tight_enumerate}{ \begin{enumerate} \setlength{\itemsep}{0pt} \setlength{\parskip}{0pt} }{\end{enumerate}} This will nicely squeeze the items close together. If you need them even closer, you can use negative numbers, but be careful not to ...


3

Okay, you have to set the colortbl overhang of the column to 0pt to match the @{} specification. As a side effect this will give all C cells an opaque white background: \newcolumntype{C}[1]{@{}>{\columncolor{white}[0pt]\centering\arraybackslash}p{#1}@{}} Or in case you want to work with non-zero intercolumn space: ...


3

Instead of using @{} to avoid the separation space in the columntype (or additionally, if you want to keep it), you could use \setlength{\tabcolsep}{0pt} instead. This eliminates the color bleed. As this would be a global option you have to put the table in another environment to avoid side effects to other tables. % from question ...


9

For one-off spacing changes, \smallskip, \medskip, and \bigskip are defined for this task. \documentclass{article} \newcommand\TestSkip[1]{% \begin{minipage}[t]{0.2\linewidth} \raggedright This is some dummy text. #1 This is some dummy text. \end{minipage}} \begin{document} \TestSkip{} \TestSkip{\smallskip} \TestSkip{\medskip} ...


2

Here is a solution that defines an \explain command, that has two arguments: the text or word to be explained and the explanations. It creates a footnote with first argument in boldface (as in a dictionary), followed by the explanation. If the explanation is several lines long, subsequent lines are indented as if the word to be defined was a three letters ...


2

Too long for a comment: I tried to write something up that depends on the length of the descriptionlabel (if you want to call it that way). As i already mentioned in the comments, the result will look quite odd. I suggest to use a fixed indentation, that will make your article/report/book/... look more uniform. \documentclass[draft,12pt,a4paper]{article} ...



Top 50 recent answers are included