Tag Info

New answers tagged

1

The spacing you are getting is due to the way you have specified the fontsize: the \fontsize arguments are the actual fontsize and the leading which is (roughly) the height of a line. (See What exactly is leading? for extensive discussion.) You've made this 36 pt in your sectioning commands, which means each line is approximately 3 times the character ...


1

In the present case, since you're already loading the dcolumn package, you could simply (i) define a new column type named d that does decimal alignment of the numbers and (ii) replace the c specification with d{3.6}. Doing so will ensure that the numeric columns all have the same width. Separately, since you're loading the booktabs package, you may also ...


2

Apart from reminding about the verse environment (and the package with the same name that provides some enhancements), I want to suggest using a special environment for this: the advantage is greater flexibility. In the example I show that by just modifying the definition of \poet you get a different effect without acting on all poems. ...


4

To answer your question, in an array or tabular environment, line spacing is done by placing a strut in every row of height and depth given by \arraystretch times the height and depth of the strut produced by an ordinary \strut commmand. Thus, you can get the desired value (under normal circumstances) with something like \newlength\mylen ...


3

You have few options. First one is to add the equation in a row of its own: \documentclass[12pt]{report} \usepackage{amsmath, amssymb, amsthm} \usepackage{lipsum} \usepackage{tikz} \usetikzlibrary{shadows} \newcommand*\squared[1]{\tikz[baseline=(char.base)]{\node[shape=rectangle, draw, inner color = white, drop shadow = {opaque, black}, inner sep=3pt, ...


6

If you don't need to cope with line breaks, it's just an application of the calc package: \documentclass{article} \usepackage{calc} \newcommand{\printtowidth}[2]{% \makebox[\widthof{#1}]{#2}% } \begin{document} Some words before abc def ghi and some words after. Some words before \printtowidth{abc def ghi}{xyz} and some words after. \end{document} ...


3

The eqparbox package is perhaps what you're after: it defines variants of the usual box commands, eqparbox, eqmakebox, eqframebox, that accept a tag instead of the width parameter. All boxes with the same tag will have the width of the longest text, and an eqboxwidth{tag} length is defined and can be used in defining the width of another box. If one wants ...


6

\documentclass[a5paper]{article} \usepackage{xcolor} \def\someText{And now follows some text to show the distance of lines. The value is saved in \texttt{\textbackslash baselineskip}.} \begin{document} \the\baselineskip%%% The current distance between two baselines \vbox to 0pt {\hbox to 0pt {\textcolor{red}{\rule[0pt]{1cm}{\baselineskip}}}} \someText ...


7

This would typically be measured from the baseline of one line to the baseline of another, or given by \baselineskip, and depends on the font size loaded/specified as well as the font size current active. For example, with the following \baselineskips are associated with the respective default font sizes loaded with the class: 10pt default font implies a ...


1

Just for fun with plain TeX's math mode only. \def\dju{\mathbin{\coprod}} \def\id{\mathop{\rm id}} \def\Ga{\hphantom{f()}G} \def\Ha{H\hphantom{g()}} \def\rar#1{\buildrel {#1} \over {\hbox to 4em{\rightarrowfill}}} \def\dar#1{\Bigg\downarrow\rlap{$\scriptstyle#1$}} \def\drar#1{\searrow\raise1ex\rlap{$\scriptstyle#1$}} $$ \matrix{ \Ga\dju \Ha ...


2

You can do it with the package enumitem and set labelsep to zero. \documentclass{article} \usepackage{enumitem} \begin{document} \begin{description}[labelsep=0ex] \item[First]\footnote{Here goes the footnote} lorem ipsum ... \item[Second], which is my second item, lorem ipsum ... \end{description} \end{document}


3

A solution using \vvvert of package mathabx. The symbol can also be used with \left and \right. Since the package changes many math symbols, the following example only defines \vvvert and the symbol fonts, needed for it without changing other math symbols: \documentclass{article} %\usepackage{mathabx} % Math symbol font matha ...


6

It is due to the \topsep as the bibliography is typeset as a list. If you make \topsep and \partopsep zero, then the problem is solved. Taking egreg's code and adding \setlength{\topsep}{0pt} and \setlength{partopsep}{0pt} in the re-definition of thebibliography removes the extra space. \documentclass[11pt,a4paper]{article} \makeatletter ...


2

This is the recommendation given in the AMS author FAQ: \begin{theorem} \hangindent\leftmargini \textup{(1)}\hskip\labelsep First item. \begin{enumerate} \setcounter{enumi}{1} \item ... If the environment is itemize rather than enumerate, replace the first line by $\bullet$\hskip\labelsep First item. If the first item has multiple paragraphs, simulate ...


9

The symbol needs to come after the \middle so \let\originalmiddle\middle \renewcommand{\middle}[1]{\;\originalmiddle#1\;} Although redefining primitives always breaks something, somewhere so I would suggest instead \newcommand{\xmiddle}[1]{\;\middle#1\;} and use \xmiddle (or any other name you wish)


1

Try to add this in the preamble \usepackage{etoolbox} \AtBeginEnvironment{proof}{\vspace{-1.5\baselineskip}}


1

A new version, with redefinition moved to preamble. \documentclass{article} \setlength{\parindent}{0pt} \setlength{\parskip}{\baselineskip} \usepackage{amsthm} \newtheorem{theorem}{Theorem} \newtheorem{definition}{Definition} \let\oldproof\proof \def\proof{\oldproof\unskip} \begin{document} \begin{definition} As any dedicated reader can clearly ...


1

In scrbook/scrreport, the skip before/at the end of a chapter is given by \renewcommand*{\chapterheadstartvskip}{% \vspace*{2.3\baselineskip}% }% \renewcommand*{\chapterheadendvskip}{% \vspace{1.725\baselineskip \@plus .115\baselineskip \@minus .192\baselineskip}% }% Adjust them to your liking. In terms of \sections, the KOMA-script bundle still ...


4

There are two orders of problems: the distance from the arrow to the symbol is too big; in subscripts or superscripts, the arrow is too wide. Here's a solution for both. \documentclass[titlepage]{article} \usepackage{amsmath,graphicx} \newcommand{\harp}[1]{\mathpalette\harpoonvec{#1}} \newcommand{\harpvecsign}{\scriptscriptstyle\rightharpoonup} ...


0

Macros from the stackengine package allow one to set the vertical stacking gap. Compare items 1 vs. 2 and/or items 3 vs. 4, and/or 5 vs. 6 for a demonstration of changing the stacking gap. In addition, the appearance will also be affected by what is considered the baseline of the subscipt. In 1, 2, the baseline is between the "r" and the harpoon; in 3, 4, ...


1

Actually, this may only be an optical illusion, as IEEEtran inserts a single \nobreakspace (or tie ~) between both the caption label/number and the number/title. However, if you want to mimic (or adjust) caption-related content, it's best to use the caption package. The caption package provides the key labelsep that defines your separation between the ...


1

With caption package, this is how it can be done. \usepackage{caption} \DeclareCaptionLabelFormat{mylabel}{#1 #2.\hspace{1.5ex}} \captionsetup[figure]{labelformat=mylabel,labelsep=none,name=Fig.} Change 1.5ex to whatever you want. Code: \documentclass{article} \usepackage{caption} \DeclareCaptionLabelFormat{mylabel}{#1 #2.\hspace{1.5ex}} ...


11

This is perhaps one of the cases where the new primitive \pdfinterwordspaceon can be useful. If I run \documentclass{article} \pdfinterwordspaceon \usepackage{libertine} \usepackage{lipsum} \setlipsumdefault{1} \begin{document} \lipsum \end{document} and save to text from Adobe Reader, the spaces show.


1

A solution using the accents package. The difference of vertical spacing with respect to the O.P. method with \overset is null in scriptscriptstyle, slight in \scriptstyle and more important in \textstyle. Otherwise the placement is different : \documentclass[titlepage]{article} \usepackage{amsmath,amssymb} \usepackage{accents} ...


4

Here's a quick-and-not-too-dirty offering: a macro called \harp. It assumes it'll be used in subscript and superscript positions only. For now, it only works with letters that do not have an ascender part. I.e., don't use if with letters such as b, d, f, h, etc. (If you do need to use the macro with such letters, you'll need to tweak the argument of the ...


5

i) A tabular stack does the work almost everywhere there are ordered rows and columns of symbols, but a scalebox won't compile inside it. \scalebox should work there. ii) A raisebox seems to work well in some cases, but it won't compile when placing math mode font size commands inside it, and in similar instances. a \raisebox forms a ...


1

If you crop the images first, it works easily setting \tabcolsep=0pt and adjusting the vertical spacing between the longtable lines. This adjustment is obtained experimentally to -4.1pt, but this value will depend on the height of the images. Note that setting width and height options of \includegraphics will stretch or shrink the images in both directions ...


3

You have relevant keys in enumitem itself: nosep or noitemsep. Also, instead of adding horizontal space between label and item body for each item, set labelsep in the options. Last, I replaced TeX syntax ({\it…}) with LaTeX syntax (\emph{…}). Final advice: you should make your definition a theorem-like environment: formatting (boldface) could be ...


1

A possible solution is use of \vspace{-xxpt} right before \item. Code \documentclass[xcolor=x11names,compress]{beamer} \usepackage{graphicx} \usepackage{tikz} \usepackage{enumitem} \begin{document} Before: \textbf{Definition 1.1} A {\it{design}} is a pair $(X,\mathcal{A})$ iff: ...


0

\setlist{nolistsep} can reduce a little bit. Probably need to go through the package manual.


5

The problem is an incompatibility of packages soul and ragged2e about the handling of \spaceskip. Package soul saves the interword space settings of the font in the skip register \SOUL@spaceskip in \SOUL@start. In the preamble of the ul driver, \spaceskip is set to \SOUL@spaceskip. Later \spaceskip is used in \SOUL@uleveryspace for setting the space: ...


5

Use the double quote symbol ". In this case, the file File Name.tex contained the words Hello World ... and Repin Painting.jpg contained, well, "Barge Haulers on the Volga" (Russian: Burlaki na Volge, Бурлаки на Волге), best viewed while listening to Lydia Salnikova perform Ah Ty Step Shirokaya ...


3

You have several ways: I'll present four. In all, the long fraction line has been replaced by \frac{1}{N} in front of the numerator, which is probably less heavy to read. The examplese after the first actually have \tfrac{1}{N} which is possibly even better. Exercise your taste. \documentclass[10pt]{article} \usepackage{amsmath} \begin{document} I have ...


0

I'm starting to think that the best solution is the approach described in @lockstep's answer to the original question (How to prevent a page break before an itemize list?). To summarize: the environments like itemize and enumerate automatically put \@beginparpenalty between the list and previous paragrapth, \@itempenalty between the items, and ...


4

How about this solution that uses alignedat? There is only one number naturally: \documentclass[10pt]{article} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage{mathtools} \begin{document} I have tried for over one hour now, in vain, on centering one equation. Why in the world is the equation not centered - i.e., so ...


6

As you can see from the enlarged version, the equation is longer then \textwidth, hence cannot be centered. But, in general instead of TeX $$...$$, a LaTeX \[...\] (or other structure) should be used. See Why is \[ ... \] preferable to $$ ... $$? \documentclass[10pt]{article} \begin{document} I have tried for over one hour now, in vain, on centering one ...


3

You can add an empty \hbox after the second \hfill (See egreg's answer to What is \null and when do we need to use it?): \documentclass{article} \usepackage{tocloft} \renewcommand{\cftloftitlefont}{\hfill\bfseries} \renewcommand{\cftafterloftitle}{\hfill\null\par\noindent\textnormal{Z}\hfill \textnormal{PAGE}} \begin{document} \listoffigures \noindent ...


3

According to the description on page 170 of the TeXbook, automatic glue around math atoms can be “conditional”, that is, inserted only in display and text styles: Here 0, 1, 2, and 3 stand for no space, thin space, medium space, and thick space, respectively; the table entry is parenthesized if the space is to be inserted only in display and text styles, ...


3

As explained by egreg in his first comment, \min et. al. have the correct spacing when followed by a delimiter, because by intention, they operate on a set of values (over which to take the minimum). As you use it, \min_u G(u) + F(Ku) the expression is itself ambiguous, and the natural parsing as "minimum of G(u), plus...oh wait" causes some dissonance ...


1

Temporary solution. This one just checks if there is a subscript next to it. Nothing more. \documentclass{scrartcl} \usepackage{mathtools} \makeatletter \def\raremin{\@ifnextchar_\@rareminsub\@raremin} \def\@rareminsub_#1{\min_{#1}\,} \def\@raremin{\min\,} \makeatother \begin{document} $ \raremin_u G(u) + F(Ku) $ \[ \raremin_u G(u) + F(Ku) \] \end{document} ...


1

\documentclass[12pt, a4paper]{article} \usepackage{blindtext} \begin{document} \blindtext[3] Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobor- tis facilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec ante. Donec ullamcorper, felis non sodales commodo, lec- tus velit ultrices augue, a dignissim nibh ...


7

The default definition of \min is \def\min{\mathop{\operator@font min}} so it is an operator like \log and will get a thin space in \min x but not in \min(x) Your redefinition \renewcommand{\min}{\expandafter\,\operatorname*{min}} is the same as \renewcommand{\min}{\,\operatorname*{min}} and puts an additional thin space before the operator. the ...


1

Well, with the lack of judgement of a mere user: \documentclass[12pt, a4paper]{article} \makeatletter \newcommand*{\NoBreakPar}{\vspace{\baselineskip}\par\nobreak\@afterheading} \makeatother \begin{document} Let's see the following list:\NoBreakPar \begin{itemize} \item First. \item Second. \item Third. \end{itemize} ...


2

When TeX typesets a paragraph, it removes space at the end of the last line: see for example TeX by Topic: After the last element of the paragraph TeX implicitly inserts the equivalent of \unskip \penalty10000 \hskip\parfillskip With a footnote input such as \footnote{ Some text. } the result is that the space TeX adds for the end-of-line is ...


3

You should use \cftafterequtitle to place your EQUATION...PAGE headings, and set an appropriate length \cftafterequtitleskip to establish the distance between the entire heading and your first entry (see section 2.2 Changing the titles in the tocloft documentation): \documentclass{article} \usepackage[paper=a6paper,margin=2cm]{geometry}% Just for this ...


6

The caption package defines a macro called \DeclareCaptionLabelSeparator, which takes two arguments. The first argument is the name of the label separator, and the second argument is what you want the separator to actually be. So, you can declare your own label separator to use instead of the newline separator, which will then allow you to retain setting ...


4

Your question is massively underspecified so we'll have to guess, but assuming you are making each algorithm a separate float then it will be governed by the float parameters. These are set by the class (which you haven't said which you are using) but in article the main ones are \setcounter{topnumber}{2} \renewcommand\topfraction{.7} ...


2

You should be using \text for the case descriptions: \text{\mathbf{if} \( a=1 \)} etc. (normal use would not have bold though). The mathtools package (which loads and extends amsmath) provides a convenient environment dcases* which does two useful things: the first column is display style mathematics the second is automatically enclosed in \text{...} In ...


3

Don't use operatorname! Use \text or more accurately \text{if } with the trailing space. I'm not sure what you are trying to do with your fourth case but the embedded aligned environment strikes me as wrong...but as I don't know what you intended I can't recommend a fix. Btw, in this situation I would use \text but if you really want boldface then use ...


3

This is not dissimilar to Werner's answer but the item labels do not spill back into the margin. That is, if you add align=left, the item numbers will be flush left and aligned with the text area rather than to the left of the text area. I find this theoretically more satisfying but admit this is likely irrational! I've also set the paragraph indent for the ...



Top 50 recent answers are included