# Tag Info

1

Just do \usepackage{parskip} \setlength{\parskip}{0.75\baselineskip plus 2pt} which will override the default value 0.5\baselineskip plus 2pt. If you want a packaged version, save the following as oparskip.sty \ProvidesPackage{oparskip}[2016/05/02] \DeclareOption{parfill}{\PassOptionsToPackage{parfill}{parskip}} ...

3

Here, I take parskip.sty, rename it as myparskip.sty and make the following changes: 1) change to \ProvidesPackage{myparskip} 2) change \parskip=0.5\baselineskip \advance\parskip by 0pt plus 2pt to \ifdim\parskip>0pt\relax \advance\parskip by 0pt plus 2pt \else \parskip=0.5\baselineskip \advance\parskip by 0pt plus 2pt \fi This has the effect ...

5

If you want to try with tcolorbox, it seems that before skip and after skip work as expected. \documentclass{article} \usepackage{tcolorbox} \begin{document} Text above \begin{tcolorbox}[before skip=2cm, after skip=2cm] Text in box \end{tcolorbox} Text below \end{document} Update: more minimalistic If more minimalistic means a box like the ...

0

An experimental implementation of hz for plain TeX is available at http://ctan.org/tex-archive/systems/tex-extensions/clasen.

3

Here's a solution that doesn't require loading any packages. \documentclass{article} \begin{document} $\left\{ \begin{array}{r @{{}={}} l} \dot{x} & f(x) \\ x(0) & x_0 \end{array} \right.$ \end{document}

4

Use the empheq package (needless to load amsmath in this case): \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{empheq} \begin{document} \begin{empheq}[left=\empheqlbrace]{align*} \dot x & = f(x)\\% x(0) & = x_0 \end{empheq} \end{document}

4

Use aligned. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \begin{cases} \begin{aligned} \dot{x} &= f(x) \\ x(0) &= x_0 \end{aligned} \end{cases} \end{equation*} \end{document} Now compare with \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \begin{cases} \dot{x} = f(x) \\ ...

4

How about something like this? This uses minipages as the tabular doesn't really seem appropriate here. The environment altassumption becomes a command \altassumption{}{} which takes 2 arguments. \documentclass[12pt]{article} \pagestyle{plain} \usepackage[margin=1.8cm]{geometry} \geometry{a4paper} \usepackage[parfill]{parskip} \usepackage{setspace,array} ...

2

Warning: long answer ahead! The setspace package has a long history that dates back (perhaps with a different name, I don’t remember) to the late Eighties of the past century, to the ancient days of LaTeX 2.09 and TeX2; the comments at the beginning of setspace.sty witness to this, as well as to a long and not always linear incremental development, during ...

1

The parskip package sets \topsep to zero, so you get what you were asking for. ;-) The output in your picture was generated with \theoremstyle{pcap}, not with \theoremstyle{plain}. Perhaps you want something like this: \documentclass[10pt,a4paper]{amsbook} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{amsthm} \usepackage{parskip} ...

0

Try this: \documentclass{article} \usepackage{fontspec} \usepackage{gb4e} \def\Id#1{\vskip-.32cm\hskip.01cm\vtop{#1}} \begin{document} \begin{exe} \ex \gll thu-mi-t-əm =kʼwa Mink.\\ go-RlL-CTR-PASS =QUOT Mink\\ \Id{% \gll chichiya7-u-s =kʼwa Mink te= c'estaya\\ grandmother-PST-3POSS =QUOT Mink DET= ...

1

This space is governed by the length \abstitleskip if you don't use the runin package option. Adjust it in your preamble to suit your needs, for example \setlength{\abstitleskip}{-20pt} will bring the title and text closer.

3

It would be easier to use the patching commands provided by etoolbox, in particular \AtBeginEnvironment and \AfterEndEnvironment. For example as follows: \documentclass[11pt,oneside]{book} \usepackage[letterpaper]{geometry} \usepackage{setspace,etoolbox} \AtBeginEnvironment{quote}{\addvspace{\baselineskip}\singlespacing} ...

0

Thanks for the suggestions, guys. I've got it as close as I can with the following code: \expandafter\def\expandafter\quote\expandafter{\quote\vskip-1.8mm\singlespacing} After I figured out how to add the negative vskip it was just a question of tinkering with the value until it produced as close as I could figure to an even spacing. I'd prefer a ...

0

This answer was lifted, almost verbatim, from Wynter Snow's excellent book TeX for the Beginner: \documentclass{article} \def\startline{\par\noindent} {\obeylines\obeyspaces\gdef\beginPoem{% \begingroup% \obeylines\obeyspaces% \let^^M=\startline}% \gdef\endPoem{\endgroup} \begin{document} \beginPoem \#6 \\ you \\ ...

1

I think that you will just have to adjust your \vskip throughout your document. So to do that you can define a macro that does a quotation that includes the correct amount of vertical skip. \documentclass[11pt,oneside]{book} \usepackage[letterpaper]{geometry} \usepackage{setspace} \doublespacing \parskip=0pt \usepackage{lipsum} %%To change the space ...

4

It is possible to change the definition with a patch: There are two issues here The missing % after \textbf{#1} An empty {} causes spacing due to \textbf{} I've added a \string% and a check whether the argument is empty -- \notblank{#1}{}{} checks if the #1 is empty and if this is not the case does the code in the 2nd argument. ...

4

In order to use mu units you need \mskip or \mkern. If you load amsmath you have \mspace, that's preferable to \mskip in the same way \hspace is preferable to \hskip. \documentclass{article} \usepackage{amsmath} \begin{document} $\delta \mspace{1mu} f$ \end{document} There is a fundamental difference between \hskip and \mskip: the latter uses the ...

5

It's a TeX choice. From the TeXBook, p. 168 TeX insists that \mskip and \mkern be used only with mu; conversely, \hskip and \kern (which are also allowed in formulas) must never give units in mu. The LaTeX macro \hspace uses \hskip internally; hence the behaviour you observe.

3

This is because the cases environment switches maths to \textstyle. If you want \displaystyle, use the dcases environment from mathtools. \documentclass{article} \usepackage{mathtools} % already loads amsmath \begin{document} \begin{dcases} g_2(\tau) &= 60 \sideset{}{'}\sum_{m,n} (m +n\tau)^{-4} \\ g_3(\tau) &= 140 ...

5

I think you have asked several questions. The first is about $x, y$ versus $x$, $y$. I think the second one is semantically and hence typographically right since the comma is not part of the mathematical expression. Your second example is a little ambiguous. There I would include the comma in the mathematics. An implicit question is the choice between ...

2

Last year I fixed the incorrect handling of vertical space at the end of columns: a space there should get removed unless it is explicitly requested which wasn't the case in all circumstances. From the changelog: 2015-03-31 Frank Mittelbach <Frank.Mittelbach@latex-project.org> * multicol.dtx: Another rewrite of \remove@discardable@items to ...

0

I'm not sure you really want an environment for this. However, you can (ab)use environ. \documentclass{article} \usepackage{environ} \NewEnviron{example}{% [\textit{Example} --- \BODY]% } \begin{document} \begin{example} This is an example. \end{example} \end{document}

6

Use \unskip before the ] in the closing part of the environment definition. This will eat up any space characters prior to the ]. EDIT to heed Barbara's comment to remove stray space following em-dash. And as she notes, one cannot have a blank line before \end{example} without automatically introducing a paragraph break. \documentclass{article} ...

1

skip-below and skip-above are disabled with runin headings. (That's just the way it is – probably to be disputed, though. There may be reasons for changing the current behaviour.) Using the question's post-body-hook or post-hook options it should still be possible to add \par\vspace{4em}: \SetupExSheets{ headings = runin-subtitle , post-hook = ...

3

The problem in your example is caused by the class option balancelastpage. This option causes the columns on the last page to be balanced, i.e. have the same height. If you go to Document --> Settings --> Document class, and change balancelastpage to nobalancelastpage, you'll get a different result.

2

Works fine for me \documentclass{book} \usepackage{multicol,lipsum} \begin{document} \begin{multicols}{2} \null \vfill \subsubsection{Vitesse du Vent} \lipsum[1] \vfill \null \columnbreak \rule{4cm}{0.8\textheight} \end{multicols} \end{document} Edit As mentioned by egreg in a comment it would be better to use LaTeX-commands instead of the ...

3

You shouldn't redefine \descriptionlabel. That is used to format the label, and the argument can contains fonts, penalties and other things not really suitable in a label. Better use the format key of enumitem: \documentclass[12pt]{article} \usepackage{lingmacros, amssymb, setspace, units, tabto, array, hyperref, nameref, enumitem, footnote, cite, changes, ...

3

The reason for the extra space is the argument for \descriptionlabel The command \enit@description@i calls \descriptionlabel and applies \enit@align{\enit@format{##1}} effectively. This will lead to extra space since NSC\label{NSC} will add this space for \label{NSC}. I've applied another strategy: The argument of \item [Foo] will automatically generate ...

0

I would suggest another approach: using booktabs, you get horizontal rules which have some vertical padding (\aboverulesep and \belowrulesep), which results in more or less the same layout as cellspace, and variable line widths. There is also the need for a correction, but is intrinsic (-\aboverulesep), and it may be incorporated in a user command. Of ...

1

Much less robust than others (it can of course be made more robust, but may be this is enough), but it might be nice looking and readable code \def\intv#1[#2..#3]{\mathopen{#1[}#2\mathrel{{.}\,{.}}\nobreak#3\mathclose{#1]}} $\intv[a..b] \intv\big[a..b] \intv\Bigg[\frac{a}{b}..c]$ If you need \left[ .. \right] I can add the code.

5

I like the two dots, too. My usual code is [a\mathrel{{.}\,{.}}\nobreak b] of course hidden in a macro. \documentclass{article} \usepackage{amsmath} \newcommand{\isep}{\mathrel{{.}\,{.}}\nobreak} \begin{document} $[0\isep m-1]$ \end{document} A more elaborate solution for coping with intervals of any kind, while keeping a syntax that doesn't ...

4

Here is a solution with mathtools and xparse. I define a command \Iintvl{m,n}. You need a font which contains the relevant delimiters, \llbracket and \rrbracket (fourier and stmaryrd) or equivalents (MnSymbol and MdSymbol have \lsem and \rsem). The star version of the command adapts the size of the delimiters to the contents, and you can fine-tune their ...

8

Let's see how I can make a command that is like a \dots but with two dots. Firstly, I use the wisdom of TeX.SE and find how to find the content of a standard definition; then a bit of command line: [romano:~] % texdef -t latex dots \dots: macro:->\protect \dots \dots : \long macro:->\ifmmode \mathellipsis \else \textellipsis \fi [romano:~] % ...

1

@Werner's solution is fine, but adding spaces to the replacement will have different results in both lstlisting and lstinline. For example, if you replace -> by, say, -> and you have the following snippet: a -> a -> a -> a it will show up normally in lstinline, but it will show up with two spaces after the arrows in lstlisting, like this: ...

0

EDITED. I can't explain why it works, but it seems to. I put the listing into \box0, and that eliminated the top blank line. Placing an empty \mbox before the \box0 takes care of the line below (alternately, \leavevmode), for some reason that gives the appearance of still being in vertical mode. I have verified that it works also for listing more than ...

2

The default LaTeX alignment is full justification (text fills the line all the way to the margin, both left and right). The macro \raggedright allows for the right margin to be ragged. There is also a package ragged2e that does this and more, for the seriously ragged author. In your case, \raggedright could be added just to Definition 3, to limit its ...

1

Page 4 of the manual of the titlesec manual, description of the \titlespacing command: <after-sep> is the separation between title and text—vertical with hang, block, and display, and horizontal with runin, drop, wrap and ...margin. By making the value negative, you may define an effective space of less than \parskip. So just do that: ...

3

And here is another difference. \vskip generates \par in horizontal mode (in order to terminate it) but \vspace behaves as \vadjust{\vskip...}. The result is: \vskip has very understandable behaviour but \vspace is a source of many confusions. You can verify this by inspecting this forum about users confusions about \vspace and misunderstanding of ...

6

I’ve noticed this question because it popped up at the top of the list of active questions a few hours ago, and I would like to add another, minor remark to the excellent answer given by @egreg. There is another difference between \vskip \medskipamount % say and \vspace{\medskipamount} and it is how they behave if an \addvspace and/or an \addpenalty ...

2

Keep it simple: this is easy with a tabular. Adjust the spacings to suit your needs. \documentclass{article} \usepackage{lipsum} % just for the example \begin{document} \lipsum[2] \begin{flushright} \begin{tabular}{@{}l@{}} \rule{0pt}{2cm}\hspace*{5cm}\\% minimum width \hline \footnotesize Chairperson, Professor A\\[2cm] \hline \footnotesize Professor ...

0

You could use titlesec instead sectsty: \documentclass[12pt,a4paper]{book} \usepackage{lipsum} \usepackage{titlesec} \makeatletter \titleformat {\chapter} [display] {\centering\LARGE} {\MakeUppercase{\@chapapp\enskip\thechapter}} {0pt} {\MakeUppercase} \makeatother \titleformat*{\section}{\large\MakeUppercase} ...

2

You could simply use minipage and flushright, and set the width of your rule to \linewidth. \documentclass{article} \usepackage{lipsum} \newcommand{\mysignrule}[1]{% \vspace{5ex} \rule{\linewidth}{0.5pt}\newline #1\par } \begin{document} \lipsum[1] \begin{flushright} \begin{minipage}{0.45\linewidth} \mysignrule{Chairperson, Professor A} ...

2

As I stated in a comment, you can use the starred version of \vspace{...}, that is: \vspace*{5mm} \section{Section 1} Some text \subsection{Section 1.1} A similar question (and thus answer) is asked here: difference between \vspace and \vspace* for negative arguments This also answers your follow up question.

0

Using \vspace*{5mm} instead of \vspace{5mm} solves the problem. The star is essential.

1

I'm not sure I'd use English quotes here, but it works if you load ucharclasses before xeCJK. \documentclass{article} \usepackage[no-math]{fontspec} \setmainfont{Noto Serif} \usepackage[Latin,Arabic]{ucharclasses} \usepackage{xeCJK} \setCJKmainfont{Noto Sans CJK JP} \begin{document} \texttt{めいじ}'' \end{document}

3

According to ISO 80000-2:2009, Quantities and units---part2: Mathematical signs and symbols to be used in the natural sciences and technology, the upright i is the correct choice. Quantities which are not variable across time or context (such as immutable constants of nature) are upright while variables, contextual constants, running numbers (dummies), are ...

6

At first I came up with this: \documentclass{article} %-------Definition of \myrule-- \def\myrule#1#2#3{{\hskip#1in{\hbox to #2in% {\leaders\hbox to .00625in{\hfil.\hfil}\hfill}}% \par\hskip#1in#3\vskip1cm}} %------------------------------ \begin{document} \hfill margin \myrule{2.56}{2}{Chairperson, Professor A} \myrule{2.56}{2}{Professor B} ...

4

My suggestion - use \parbox and \hfill before it to move the block to the right side. Something like the following: \documentclass{article} \begin{document} \hfill \parbox{5cm}{ \underline{\hspace{5cm}}\\ Chairperson, Professor A\\[1cm] \underline{\hspace{5cm}}\\ Professor B\\[1cm] \underline{\hspace{5cm}}\\ Professor C } \end{document} Adjust the ...

4

The following macro definition is in article.cls: \newcommand\paragraph{\@startsection{paragraph}{4}{\z@}% {3.25ex \@plus1ex \@minus.2ex}% {-1em}% {\normalfont\normalsize\bfseries}} The \@startsection macro takes six arguments; the fourth specifies ...

Top 50 recent answers are included