New answers tagged

3

You have several spaces inserted by newlines... \newcommand{\vs}[2]{% \relax\ifmmode \ifemptyarg{#2}% {#1\text{-vector space}}% {#1\text{-vector space }#2}% \else \ifemptyarg{#2}% {$#1$-vector space}% {$#1$-vector space $#2$}% \fi} works. Notice that the "%" after the \ifemptyarg{#2} is not ...


2

You'll have no problem with the tasks package, if you replace the addmargin environment with `geometry (which will give you more sensible margins if you don't use margin notes). Furthermore the items on different rows will be aligned in columns: \documentclass{article} \usepackage{amsmath} \usepackage[showframe]{geometry} \usepackage{tasks} \begin{document}...


1

You can have a much simpler code using the venndiagram package (based on TikZ): \documentclass{article} \usepackage{tikz} \usetikzlibrary{backgrounds,positioning,calc} \usepackage{venndiagram} \usepackage{float, caption} \usepackage{showframe} \renewcommand{\ShowFrameLinethickness}{0.3pt} \begin{document} {\captionsetup[figure]{skip =-1.5ex} \begin{...


3

The second argument to \lettrine is boxed, so the spaces in it are not flexible. \documentclass[smalldemyvopaper,12pt,twoside,onecolumn,openany,extrafontsizes]{memoir} \usepackage[osf]{Alegreya,AlegreyaSans} \usepackage{lettrine} \newcommand{\longlettrine}[3]{% \lettrine{#1}{#2} {\LettrineTextFont #3}% } \midsloppy \checkandfixthelayout \begin{document}...


0

After Four days of modifying the code, and trying what @David Carliste told me, i found a solution. I just needed to remove \vspace{40pt} and the line \let\oldDOTIS\DOTIS, and everything worked (^_^)


2

It will hyphenate first if it is possible. In the example you cite there there was no possibility (without using emergencystretch) of breaking the paragraph without having an overfull box (which is considered worse than stretching) There is no reason to have a large \emergencystretch: doing so tells tex that there is little penalty for stretching the ...


1

An easy way would be just to use the \vspace command e.g. \documentclass[12pt]{memoir} \usepackage{caption,newfloat} \usepackage{graphicx} \def\listofquadrosname{List of Frames} \DeclareFloatingEnvironment[fileext=loq,placement={!hbtp},name=Frame, within=chapter,listname=\listofquadrosname]{quadro} \setlength{\belowcaptionskip}{-10pt} \begin{document} ...


3

Since fields other than note are acceptable I suggest you use annotation instead. By default that field is not printed by most standard styles, but we can quickly change that. As discussed in https://github.com/plk/biblatex/issues/904 the situation with the citations in the bibliography is a bit tricky. Usually I recommend not to use \cite in the ...


9

It was unrelated to the capital letter other than that changed the widths so affected the possible linebreak points. You had a very large \emergencystretch so tex preferred to stretch the white space than hyphenate the word. \documentclass[10pt,a5paper]{memoir} \usepackage[brazil]{babel} \usepackage{anyfontsize} \usepackage{lmodern} \usepackage{microtype} ...


3

The answer is yes or no (depending on your point of view) the texbook says \rule 10. If the current item is an Under atom (from ^|\underline|), set box~$x$ to the nucleus in style $C$. Then replace the nucleus by a vtop made from box~$x$, kern~$3\theta$, and hrule of~height~$\theta$, where $\theta=\xi_8$ is the default rule thickness; and add $\...


3

Since the value of \thickmuskip -- the parameter which governs the amount of whitespace that's inserted between adjacent math atoms of type math-ord and math-rel -- is 5mu in all document classes I'm familiar with, and since \! inserts -3mu of (negative) whitespace, you may achieve your journal's formatting objective by issuing the instruction \everymath{\...


5

You can use \everymath and \everydisplay: \documentclass{article} \usepackage{amsmath} \newmuskip\normalthickmuskip \newmuskip\normalthinmuskip \AtBeginDocument{% \normalthickmuskip=\thickmuskip \normalthinmuskip=\thinmuskip } \everymath{% \thickmuskip=\muexpr\normalthickmuskip-(1\normalthinmuskip plus 1\normalthinmuskip)\relax } \everydisplay{\...


1

The most likely cause of additional space around beamer blocks is that it's using a beamercolorbox with colsep*=0.75ex and some background color is set. The colsep option is explained in the manual in the section on beamercolorbox options: colsep*=⟨dimension⟩ sets an extra color separation space around the text that is horizontally outside the box. This ...


2

The b in Source Serif Pro is larger than the one in latin modern. And more importantly in a section title its height is larger than \topskip. This means that its baseline will be moved down by 0.45pt at the start of the page. If you want to avoid this effect, enlarge \topskip with such fonts. \documentclass{article} \usepackage{fontspec} \begin{document} \...


4

Add keepspaces: \documentclass{article} \usepackage{listings} \begin{document} \lstset{ basicstyle=\ttfamily, } \lstinline{'foo' | 'bar'} \lstset{ morestring=[b]', basicstyle=\ttfamily, } \lstinline{'foo' | 'bar'} \lstset{ morestring=[b]', basicstyle=\ttfamily, keepspaces, } \lstinline{'foo' | 'bar'} \end{document}


2

With forest is simple. With l sep you can define distance between levels independently from length of node text: \documentclass{article} \usepackage[edges]{forest} \begin{document} \begin{forest} for tree = { grow' = 0, anchor = west, l sep = 11mm, s sep = 3mm, edge path = {\noexpand\path[\forestoption{edge}] (!u.east) -- (.west); ...


4

In order to save some horizontal space, I have introduced a linebreak in the first node (As stated on page 3 of the tikz-qtree documentation this can be done using the align option.) I have also increased the value of level distance : \documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree} \begin{document} \begin{tikzpicture} \tikzset{grow'=...


1

Is this like you want? I defined a \tvstrut and a \bvstrut(for ‘top’ and ‘bottom’ struts), based on the recent package spacingtricks. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amssymb} \usepackage{spacingtricks} \newcommand*\tstrut[1]{\vstrut{#1}} \newcommand*\bstrut[1]{\vstrut[#1]{0pt}} \begin{document} \begin{...


2

If you mean decreasing the horizontal and the vertical spacing, here you are: \documentclass[a4paper,10pt]{article} \usepackage[top=0.75in, bottom=0.75in, left=0.55in, right=0.85in]{geometry} \usepackage{graphicx} \usepackage{url} \usepackage{palatino} \usepackage{tabularx} \usepackage{textcomp} \usepackage{enumitem} \setlist[itemize]{leftmargin=*} \setlist[...


4

The topsep length of the sub-itemization can be changed: \documentclass[a4paper,10pt]{article} \usepackage[top=0.75in, bottom=0.75in, left=0.55in, right=0.85in]{geometry} \usepackage{graphicx} \usepackage{url} \usepackage{palatino} \usepackage{tabularx} \usepackage{enumitem} \usepackage{pifont} \begin{document} \begin{itemize} \item \textbf{Cluster ...


2

I propose this simple code, based on the shaded* environment from the framed package: \documentclass[]{article} \usepackage[utf8]{inputenc} \usepackage[showframe]{geometry} \usepackage[svgnames]{xcolor} \usepackage{framed} \colorlet{shadecolor}{Gainsboro!50! Lavender} \newcommand{\resheading}[1] {% \setlength{\OuterFrameSep}{1pt} \setlength{\...


2

The following adds 5pt of additional vertical space: \documentclass[]{article} \overfullrule5pt \usepackage{xcolor} \definecolor{mygrey}{gray}{.85} \newsavebox\resheadingbox \newcommand{\resheading}[1] {% \sbox\resheadingbox {% \colorbox{mygrey} {% \begin{minipage}{\dimexpr\linewidth-2\fboxsep\relax} ...


2

glossaries keeps track of on which pages the glossary entries are used. In order to this, the page on which this happens needs to be well defined, i.e. \glsadd has to be part of a line of text. This is why glossaries adds an empty \mbox to the document using \@gls@adjustmode when you call \glsadd in vertical mode. You should decide to which paragraph every \...


6

What does the relevant specification actually say? Italics correction can be used in the following situations: When a run of slanted characters is followed by a straight character (such as an operator or a delimiter), the italics correction of the last glyph is added to its advance width. (The OpenType MATH table specification, emphasis mine) ...


2

Look for here! Every endline in the body of the definition contributes a space. There is none after \noexpandarg. \newcommand{\glossstep}[2]{% <--- here \expandafter\StrSubstitute\expandafter{\x}{#1}{#2}[\x]} \newcommand{\totalgloss}[5][T P A Q]{% <--- here \noexpandarg \StrSubstitute{#1}{T}{\textit{#2}}[\x]% <--- here \glossstep{P}{/\textipa{#3}/}...


2

Since you use the natbib package, you could redefine its \bibpreamble macro to snug up the space between the bibliography header and the first bib item. \RequirePackage{filecontents} \begin{filecontents}{refs.bib} @misc{abc:3000, author = "A and B and C", title = "Thoughts", year = 3000} @misc{xyz:3001, author = "X and Y and Z", title = "Thoughts", year ...


1

The important part is: %**************************Chapter style***************************** \def\@makechapterhead#1{% \vspace*{0\p@}% {\parindent \z@ \raggedright \normalfont \ifnum \c@secnumdepth >\m@ne \large \bfseries \centering \MakeUppercase \@chapapp\space \thechapter \par\nobreak \vskip -...


0

Natbib discards the space when using the \cite command in super mode. Two possible solutions are to use \citenum, that does not discard spaces, and superscript that, or to define an open brace consisting of a space. The advantage of the first approach is that you can still use \cite to get a superscript close to the word (which is a bit more standard ...


1

You can do that easily, changing the specifications for the S columns, and using makecell to have multiline column heads where necessary: \documentclass[11pt,a4paper]{article} \usepackage{amssymb, amsmath, bm} \usepackage[flushleft]{threeparttable} \usepackage{float, booktabs, makecell, caption, tabularx} \usepackage{siunitx} \begin{document} \begin{table}...


2

Some suggestions and comments: As @DavidCarlisle has already pointed out in a comment, there should be no \\ (double backslash) directives after the \hline\hline directives. If you want to give the table a more open "look", load the array package and issue an instruction such as \setlength{\extrarowheight}{2pt}. Since you're using color to create visual ...


1

The >{...] should be outside the S pre-column specifier. Herer is a simple code with tabularx. I also took the liberty to change your definition of mycolor to a nicer one (for my taste). Of course, feel free to return to your initial version if you preferit. \documentclass{book} \usepackage[latin]{babel} \usepackage[showframe]{geometry} \usepackage{...


1

You can (locally) set the spacing parameters above and below displays to zero. It's easier if you also define a proper environment. If you need consecutive equation environments (but you shouldn't), use the shown trick. \documentclass{article} \usepackage{amsmath} \usepackage{tabularx} \usepackage{environ} \usepackage{lipsum}% just for the example \...


1

To economize drastically on (vertical) whitespace, you could encase the equation environments in minipage environments (of width \hsize). Alternatively, don't use equation environments at all; instead, use low-level code to display the math material, to increment the equation counter, and to display the equation number. \documentclass{article} \usepackage{...


2

You wrote, I still need to add the hyphen in the numbering to set the space between paragraphs, and titles and paragraphs to add a line break after level 4 (paragraph) I will assume that you will be using the article document class. For the first item, I suggest you insert the following instructions in the preamble: \makeatletter \def\@...


2

This can be done in LuaTeX using the pre_linebreak_filter callback: Before the "normal" linebreaking, do a "trial" linebreak and measure the effective parfill. If it is below the current value of \parindent, set the parfill for this paragraph to zero. Additionally, it can sometimes happen that \parfillskip=0pt fails. In this case this will stretch the last ...


0

The space between items can be controlled with \bibitemsep. The "hanging indent" can be introduced by redefining the bibliography environment to modify \itemindent based on \bibhang. \documentclass[british]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{babel} \usepackage{csquotes} \usepackage[style=numeric, backend=biber]{...


2

Never use \\ at the end of a paragraph or before a display constrict such as a list or equation, TeX will warn about such use with a warning about badness 10000 (it's maximum measure of bad typesetting) and produce a spurious extra line of the paragraph which looks like vertical space but is not space and does not combine with vertical space in a useful way.


0

have a try with typing \leavevmode\\ after the paragraph's title. This this forces a linebreak and may do the trick for you. You may also have a look here: Function and usage of \leavevmode. In case you're working in the KOMA environment, redefining the paragraph command may also work. \RedeclareSectionCommand[afterskip=1ex]{paragraph} % produces a ...


4

You don't have this problem if you use the \mathring accent: \documentclass[a4paper]{article} \usepackage{amsmath,amssymb} \newtheorem{theorem}{Theorem}[section] \begin{document} \begin{theorem} There is a $(K_n)_{n\in\mathbb N}\subseteq E$ with \begin{itemize} \item $K_n$ is compact; \item $K_n\subseteq \ring{K}_{n+1} $; and \item $d(\partial ...


7

You can use \smash{\overset\circ K_{n+1}} to hide the height of that element. \documentclass[a4paper]{article} \usepackage{amsmath,amssymb} \newtheorem{theorem}{Theorem}[section] \begin{document} \begin{theorem} There is a $(K_n)_{n\in\mathbb N}\subseteq E$ with \begin{itemize} \item $K_n$ is compact; \item $K_n\subseteq\smash{\overset\circ K_{n+1}...


5

\documentclass{article} \usepackage{amsmath,delarray} \newcommand\myub[2]{\begin{array}[t]({@{}c@{}})\underbrace{#1}_{\text{#2}}\end{array}} \begin{document} \begin{equation}\label{eq:abe-kokos} \myub{5\myub{5\myub{5\myub{5\myub{5\myub{5\cdot n+1}{alle} +1}{femte sømand} +1}{Nødder til fjerde sømand} +1}{Kokosnødder, som tredje ...


1

Alternatively, you can use array and the commands \arraystretch and \extrarowheight, which give perfect result here: \documentclass{article} \usepackage{float, array} \begin{document} \begin{table}[H] \renewcommand{\arraystretch}{1.3} \setlength{\extrarowheight}{1pt} \centering \begin{tabular}{|c|c|c|} ...


5

If you read the sentence 50 times then provided that \hbadness is less than 100 or that the excess width (after shrinking by the maximum amount) is more than \hfuzz. Means that if (as here) you set \hbadness to be less than 100, then any overfull box will be reported, and \hfuzz has no effect. Given how often I have read that paragraph in the TeXBook ...


2

As already mentioned by user191173 in the comments the vertical space between entries is controlled by \bibitemsp. \setlength{\bibitemsep}{4\itemsep} There are also \bibnamesep and \bibinitsep that are only inserted between works of different authors (\bibnamesep) and works of authors with different initial letter (\bibinitsep), thus allowing for visual ...


5

Try the following: \documentclass{report} \usepackage{geometry} \newcommand{\award}[2]{#1 \dotfill #2\\} \begin{document} \begin{center} \begin{tabular}{p{5.5in}} \award{Text text text text text text text}{2019} \award{Text text text text text text text Text text text text text text text}{2018-19} \award{Text text text text ...


1

You can use fill space there is no need to calculate the space between boxes. Also it is almost always best to leave a blank line before \vspace. The small gap at the bottom is de to the fact that the frame drawn is leaving for the usual case of text on the last line so there is for descenders such as y and g . If you want the bottom of the last box to ...


1

After a little bit of investigation I've found that the lower white space comes from boxsep parameter, therefore if a bottom=-boxesp is fixed, this empty space disappears. If the bottom of subtitle box should lay over the bottom of tcolorbox, bottom=-boxsep-bottomrule should be used. It could be nice to use real values of boxsep and bottomrule in order to ...


0

See if this flies with your university. Note that the LOF is still double spaced (unless you remove setspace), but at least it isn't triple spaced. (And see if you can convince them that double spacing should only apply to typewriters.) \documentclass[12pt]{report} \usepackage{mwe} \usepackage[letterpaper]{geometry} \geometry{verbose, margin = 1in} \...


Top 50 recent answers are included