Tag Info

New answers tagged

0

Below I have defined SpecialSection which will disable the \parindent and adds a blank line in between paragraphs. It has been applied to the second section in the image below: Notes: Please do note that manually setting \parskip is considered a "deadly sin" as per Too much whitespace before lists when changing the \parskip length. But, in this case I ...


3

The smallmatrix environment from the amsmath package will do this. It will not take up much space when used inline. \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} This is a permutation, represented as a $2\times n$ matrix and squeezed into a single line: $\left(\begin{smallmatrix} 1 & 2 & \cdots & n\\ i_1 & i_2 & ...


0

It is not clear from your question whether you want the paragraph indentation to be zero for all paragraphs or if you only want the section headings to be unindented. If the former, use \setlength\parindent{0em} to set the indentation to zero for all paragraphs. What \documentclass are you using? In the report and book classes, which I use most often, ...


6

I would strongly recommend against this, but it can be done. The command \  is a primitive meaning 'a normal space' so shows up in various places, in particular the definition of \nonbreakspace. Thus a 'safe' redefinition of \  must at least deal with that: \documentclass{article} \let\hardspace\ % ...


0

For example, starting from the definition of ~: \makeatletter \def\hallospace{\penalty\@M \kern0.3em} % say, 0.3em \let\oldspace=\ % \let\ =\hallospace \makeatother (And remember to use ~ as an unbreakable space in the future).


4

Note after edits: This answer now demonstrates how to align the paragraph numbers using a numerical test and \hphantom; the next section (first edit) trims the code and demonstrates its application to longer texts; finally it shows a slightly different method to put the notes in the outside margins of a two-column layout, using the memoir class. All ...


1

The command \tab exists, but it produces quite a large space. It also requires the use of the package tabto. Alternative options are \quad and \qquad; the space produced is probably more what you are looking to create. These commands do not require extra packages and can be stacked (e.g. Stuff Over Here \quad \quad \quad More Stuff Over Here) if needed. ...


6

It is the same as comparing $X_{a=b}$ with $X_{\mbox{$a=b$}}$ If you start a new math expression inside a box it will be textsize even if you are in a subscript. Explicitly adding \scriptstyle gets you back on track. \documentclass{article} \usepackage{amsmath} \newlength{\mylength} \newcommand{\before}{\scriptstyle k_\rho k_\rho k_\rho k_\rho} ...


5

You have set the length in a local group, so it is 0pt again on the following line, also you have set it to the width of mmm in the text font, but show it set in math italic, perhaps you want \settowidth{\myplus}{$\before$}% outside (before) the multline, depending on your real use case.


6

Use a minipage \documentclass{article} \usepackage{amsmath} \begin{document} We make the further assumption that \begin{equation}\label{eqn:assumption} \begin{minipage}{0.9\textwidth} There is a bounded linear operator $B:X\to X^*$ such that $B^*=B$ and the operator $JB$ is an extension of $T'(0)$ \end{minipage} \end{equation} ...


1

For example (the value is only exemplary): \documentclass{article} \usepackage{amsmath} \begin{document} We make the further assumption that \begin{equation} \label{eqn:assumption} \text{\begin{tabular}{p{0.85\linewidth}} There is a bounded linear operator $B\colon X\to X^*$ such that $B^*=B$ and the operator $JB$ is an extension of $T'(0)$ ...


1

The standard way to make an “invisible” command is to use \@bsphack at its beginning and \@esphack at the end. \documentclass{article} \usepackage[usenames]{xcolor} \usepackage[normalem]{ulem} \def\Corrections{2} % Highlight or Final - 1 or 2 \ifnum\Corrections=1 % 1 - Highlight \newcommand{\xcut}[1]{{\color{red}{\sout{#1}}}}% ...


3

Without putting much thought into it the first to try would be \newcommand\xcut[1]{\ignorespaces}


3

I think that there are two most sensitive options: increase the first space and make it symmetric: $\langle\,,\rangle$ put \cdots in place of teh arguments: $\langle\cdot,\cdot\rangle$ (this is what I prefer). Typeset versions: In the second one, if you don't like the space after the comma: $\langle\cdot{,}\cdot\rangle$


1

You should never stack math display environments; instead of consecutive equation environments use gather: \documentclass{beamer} \usetheme{Frankfurt} \begin{document} \begin{frame} \begin{itemize} \item blah \begin{gather} a=b\\ b=c\\ c=d \end{gather} \end{itemize} \end{frame} \begin{frame} \begin{itemize} \item blah blah blah blah blah blah blah blah ...


8

With alignat you control the space by yourself. \documentclass[11pt,a4paper]{article} \usepackage{mathtools} \DeclareMathOperator{\sgn}{sgn} \begin{document} \begin{alignat*}{2} +(+a)&=+a,& \qquad -(+a)&=-a\\ +(-a)&=-a,& -(-a)&=+a \end{alignat*} \begin{alignat*}{2} +(+a)&=+a,& \hspace{1in} -(+a)&=-a\\ ...


3

Not sure what will best meet your criterion of "not as much space" being taken between the two columns of equations. The following solution may fit the bill. It also results, incidentally, in better centering of the material -- which I take to be a criterion as well. \documentclass[11pt,a4paper]{article} \usepackage{amsmath} \begin{document} ...


3

I believe you should use mdframed instead of that handmade version. \documentclass{article} \usepackage{amsthm,mdframed} \usepackage{lipsum} \mdfdefinestyle{ruledtheorem}{ topline=true, bottomline=true, leftline=false, rightline=false, innertopmargin=0pt, innerbottommargin=.5\baselineskip, innerleftmargin=0pt, innerrightmargin=0pt, } ...


2

There is a fundamental difference between an X and a c column. The latter is typeset as if it were \makebox[<dimen>]{<text>} (the <dimen> is automatically computed, while the former is \parbox{<dimen>}{<text>} (the text will be centered because of the c option to X). While a \smash gives no problem in a horizontal box ...


0

This is not a perfect match but perhaps it will be close enough to at least give you a basis for further tweaking. Basically, this inserts the block environment into beamer's definition of \tableofcontents and defines a new style my toc for sections/subsections in toc. Because it does not use enumerate, the spacing is not quite the same but this is something ...


2

You can insert a strut, just for its height part in case only uppercase is used. I show both examples. \documentclass[a4paper]{article} \usepackage{amsmath} % for a better \smash \usepackage{tabu} \begin{document} \begin{tabu}{|c|} \hline \begin{tabu}{l|c|r} left & \LARGE\smash[b]{\strut}\textbf{MIDDLE} & right \end{tabu} \\ ...


3

note that \center is the internal implementation of \begin{center} and not intended to be used as a command form (and if it is used, should be paired with \endcenter) \centering is the intended command form. Spacing and alignment could be adjusted to requirements, but something like: \documentclass{book} \usepackage{booktabs,multicol} \begin{document} ...


6

I think you could use \pagetotal for this. Subtract it from \textheight to get the amount of space remaining. \documentclass[10pt]{article} \newdimen\spaceleft \spaceleft=\textheight \multiply\spaceleft by -1 \usepackage{lipsum} \begin{document} \lipsum[1-3] \advance\spaceleft by \pagetotal \multiply\spaceleft by -1 \typeout{Space on last page:} ...


2

You want to give structure to your document. Here's an example. \documentclass[11pt]{article} \usepackage{amsthm} \newtheorem{thm}{Theorem}[section] \begin{document} \section{Semisimple modules} A module is said to be \emph{semisimple} if it equals the sum of its simple submodules. Note that the zero module is semisimple, being the sum of the (empty) ...


2

REVISED APPROACH (using \contentsline revision, to handle hyperref) With this revision, I totally reworked the approach. The first key was the invocation of the phantom section as \phantomsection\addcontentsline{toc}{Z}{% \protect\rule{0pt}{5ex}{\Large Appendices}} to use type sectioning type Z instead of section. To handle this possibility, I ...


5

Here, in my MWE, I use an \llap, but an alternate form would include \makebox[0pt][r]{...} in lieu of the \leavevmode\llap{...} Here is the MWE, EDITED to incorporate these changes into the \parnumber macro itself. The \ignorespaces allows you to either place a space after the \parnumber{1} invocation or not, without any ill effect. ...


2

Really it's better to make a self contained example rather that refer to off site archives, but anyway as far as I can see that class just inputs the standard book class and inherits the chapter format from there. book uses the following two macros for the numbered and star form respectively. The space at the top is set at 50pt but you could adjust to ...


1

I have sent the author the following MWE: \documentclass{article} \usepackage{amsthm, mdframed} \definecolor{mygray}{gray}{0.95} % % notice how skipbelow is ignored \mdfdefinestyle{mythm}{ backgroundcolor=mygray, linewidth=0pt, innertopmargin=0pt, innerbottommargin=6pt, skipabove=5em, skipbelow=5em, } ...


0

Perhaps you want something like this? I took several fragments of your code, and corrected some inconsistencies (and typos). I prefer to use the tabularx environment, but I don't see why you set \tabcolsep to 0pt. Finally the alignment problem for blocks can be solved using \break instead of \\. \documentclass[a4paper,10pt]{article} \usepackage{fontspec} ...


7

This is also an answer to this How to define a macro which does not read the next token after itself? question, hence two variants of definition. * is here a character that will never be a true argument. \documentclass{article} \begin{document} %\newcommand{\ACROeg}{e.\,g.} \def\ACROe*{e.\,g.} This is a sample sentence, \ACROe* it does not make much ...


3

I'd say that \negthinspace is what you're looking for. \documentclass [] {scrbook} \newcommand{\kf}{\negthinspace\relax} \begin{document} \setcounter{footnote}{70} A sentence with a footnote which describes a word\footnote{Description of the word}\kf. The next sentence. A part sentence with a footnote,\kf\footnote{Description of the part sentence} and ...


0

the latex definition of \vdots is identical to the one defined by knuth in plain.tex, except that it is made robust. it is constructed from three periods stacked one above the other in a \vbox. the "extra" space at the top is the consequence of the full height of a "normal" character being used for the topmost period, whereas the actual height is much less. ...


1

The cellspace package lets you define independent minimal spacings at the top and the bottom of a cell. All you have to do then is prefixing the column to which you want to apply these minimal spacings with the letter S. This conflicts with the S qualifier from the siunitx package, which replaces it with the C prefix. It works with usual column types (l, r, ...


0

This is difficult to say without seeing your setup. If you have chosen the option twoside, you also have turned on flushbottom I presume, and then LaTeX will add space also between the pragraphs to stretch the page. Try the option oneside, or add the command \raggedbottom as latest command in the preamble. The classfile define \parskip: \parskip 0ex plus ...


0

I suggest you insert "struts", i.e., elements that have height and/or depth but no width (and are thus invisible). (This idea is not original to me, by the way. It goes back, at least, to an article published by Claudio Beccari in TeX and TUG News in 1993.) You place a \Tstrut ("top strut") on a line that follows an \hline and a \Bstrut ("bottom strut") on ...


0

1. booktabs Maybe a better solution is to load booktabs and use the command \addlinespace[] to add space to individual hlines: \documentclass{article} \usepackage{booktabs} \begin{document} \begin{tabular}{ll} \hline \multicolumn{2}{c}{Method A}\\ \hline\addlinespace[2pt] %%----> fine tune spacing 1) & $\begin{array}{c}a\leftarrow A^Tb \\ ...


3

To get a fixed distance between the centers of the bars, set x=<distance>. To set the width of the bars, set bar width=<distance>. To get a fixed amount of space between the first bar and the left edge of the plot, and between the last bar and the right edge of the plot, set enlarge x limits={abs=<distance>}. To label the bars, set nodes ...


1

Set \LTpre to 0pt or whatever you like \begin{filecontents}{tabeller} \LTpre=0pt %%%%%%%%%%%%%%%%%%%%%%% \begin{longtable}{@{}L{6cm}Z@{}} Text & Text\\ Text & Text\\ \end{longtable} \end{filecontents}


0

The finished code follows below. At first i have renewed the \section and \subsection to add automated references. I created the funktion \calcsubsection[i] an \calcsection[i] to get the name of the section "sectionnumber+i" or "subsectionnumber+i", where i is positive for future sections, and i negative for older sections. e.g.: \calcsubsection{-1} gives ...


1

You need to use \hfill and \hfill\null: Notes: The showframe package was used just to show the page margins. It is not needed in your actual use case. Code: \documentclass{article} \usepackage{showframe} \usepackage{gb4e} \begin{document} \begin{exe} \ex \hfill This sentence is short.\hfill\null \end{exe} \end{document}


1

You can do that either with alignat*{2} or with an aligned environment nested in align*. I added a pair of parentheses for the definition of the image-function: \documentclass[a4paper, 11pt]{book} \usepackage[utf8]{inputenc} \usepackage{fourier, heuristica} \usepackage{mathtools, nccmath} \begin{document} \begin{alignat*}{2} \varphi:\ell^q& ―――→ ...


2

Use alignat*: \documentclass{article} \usepackage{amsmath,amssymb} \begin{document} \begin{alignat*}{2} \varphi:\ell^q&\longrightarrow& (\ell^p)^* \\ \mathbf{x}&\longmapsto& f_{\mathbf{x}}:\ell^p &\longrightarrow\mathbb{C} \\ &&\mathbf{y}&\longmapsto\sum_{k=1}^\infty x_k y_k \end{alignat*} \end{document}


1

Some manual work, but one can precisely align the elements. Please observe \colon's in place of :'s. \documentclass{article} \usepackage{amsmath,amssymb} \begin{document} \[ \begin{array}{r@{\;}c@{\;}l@{\;}c@{\;}l} \varphi\colon\ell^q&\longrightarrow& (\ell^p)^*&& \\[6pt] \mathbf{x}&\longmapsto& f_{\mathbf{x}}\colon\ell^p ...


1

Saying \hfil is the same as saying \hskip 0pt plus 1fil or, in LaTeXspeak, \hspace{0pt plus 1fil}. However, TeX uses the stretch component only if it has to. For instance, in \hbox{a\hfil b} % Plain TeX \makebox{a\hfil b} % LaTeX (or \mbox{a\hfil b}) the stretch component will do nothing and there will be no space between “a” and “b”. Conversely, a ...


1

You can do something like that, using the makecell package (allows linebreak inside cells,and common formatting defined in preamble), booktabs (the \addlinespace is simpler to use than an empty \multicolumn{3}{c}{} and does the same job). I supposed the second column will contain only jobs description. To simplify typing, I defined a job counter and a J ...


2

You could use the calc package as below. \documentclass{article} \usepackage{titlesec} % Used to customize the \section command \titleformat{\section}{\Large\bf{}\scshape\raggedright}{}{0em}{}[\titlerule] % Text formatting of sections \titlespacing{\section}{0pt}{3pt}{10pt} % Spacing around section \usepackage{tabularx} \usepackage{array} ...


6

You can store the "message" in the main vertical list about the end of previous environment using very specific value of penalty. And you can read this value at the start of your environment. \newenvironment{env} {\ifnum\lastpenalty=12345 \vskip-\bigskipamount \penalty0 \fi \addvspace{\bigskipamount}\bfseries} ...


1

This is an extension of @GonzaloMedina answer from Only 3 items in navigation bar, is that possible? that covers subsections too (long Beamer code follows). \documentclass{beamer} \usetheme{Warsaw} \newcounter{prevsection} \newcounter{nextsection} \newcounter{prevsubsection} \newcounter{nextsubsection} \newcommand\prevsection{} \newcommand\nextsection{} ...


1

If you want to use the maximum of your page width, you could use an X-column of the package tabularx here. The only thing you have to do is to put the longest description text, \textbf{IDE/Tools}: in your case, into the \settowidth command. % arara: pdflatex \documentclass{article} \usepackage{lmodern} % scalable version of your font (for microtype) ...


3

You can set the width of the second column using a p column, so that it stays inside the margin: \documentclass{article} \usepackage{array} \begin{document} \section{Technical Skills} \begin{tabular}{@{}l@{ : }p{.75\textwidth}} \textbf{IDE/Tools} & STS, Eclipse, WindowBuilder, NetBeans, Jasper Studio, iReport, QBrowser, IBM Rational Rose \end{tabular} ...



Top 50 recent answers are included