Tag Info

New answers tagged

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 ...


3

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 ...


4

A leftmargin of 0pt and non-zero itemindent works: \documentclass{article} \usepackage{enumitem,lipsum} \begin{document} \lipsum[1] \begin{enumerate}[leftmargin=0pt,itemindent=2em] \item \lipsum[2] \item \lipsum[4] \end{enumerate} \lipsum[3] \end{document} Vertical spacing between items can be set via itemsep.


3

\footnoterule is defined (in latex.ltx) to occupy exactly the height of the rule vertically: \def\footnoterule{\kern-3\p@ \hrule \@width 2in \kern 2.6\p@} % the \hrule is .4pt high as you have already discovered, \footnotesep is inserted above every footnote on a page. i think the most reliable way of inserting additional space just below the footnote ...


0

\documentclass{beamer} \newcommand\itemshape[1]{% \setbeamertemplate{itemize item}[#1]% \usebeamertemplate{itemize item}% } \begin{document} \begin{frame} \begin{description}[align=right] \item[\itemshape{circle} First Item] Description of first item \item[\itemshape{circle} Second Item] Description of second item ...


0

Perhaps, you can try this: \documentclass{article} \usepackage{listliketab} \begin{document} \storestyleof{itemize} \begin{listliketab} \begin{tabular}{Llll} \textbullet & Parameter & and the text should continue at the same "tab space" \\ \textbullet & Variable & so it looks like this \\ \end{tabular} ...


0

Maybe you need this: \newdimen\savedprevdepth \vbox{ \hbox{X} \savedprevdepth=\prevdepth \hrule \prevdepth=\savedprevdepth \hbox{Y} } \bye Explanation: \prevdepth primitive register is set to the depth of the last box in the vertical list. It is set to magic value -1000pt when the vertical list is empty or when the \hrule is inserted to the vertical ...


1

Actually this is not a property that is unique to \hbox. The happens due the default spacing defined above and below the \hrule construct. You can change the spacing manually by using the \kern command. \vbox{ \hbox{X} \hrule \kern2pt %change the pts according to your needs \hbox{Y} } Alternatively, you could also define a macro for this.


4

Quoting from the TeXbook, page 79 (last single dangerous bend) Exception: No interline glue is inserted before or after a rule box. You can also inhibit interline glue by saying \nointerlineskip between boxes. In the case without the rule, the interline glue is added as usual: compute the sum s of the depth of the upper line and the height of the ...


2

By default a tabular is vertically centred which means its height is a lot bigger than \baselineskip so TeX can not preserve baselineskip spacing after too close:\\% so will use \lineskip glue instead, and throw you off the baseline grid. If you use \begin{tabular}[t] then alignment will be based on the baseline of the first row of the table which gives you ...


4

Using just standard svjour commands and exploiting the fact that \spnewtheorem*{foo}{Foo}{}{} stores Foo as the expansion of \fooname: \documentclass[smallextended,envcountsame,envcountsect]{svjour3} \smartqed % flush right qed marks, e.g. at end of proof \spnewtheorem*{xproof}{}{\itshape}{\rmfamily}% the label is assigned later \newcommand\xprooftitle{} ...



Top 50 recent answers are included