Tag Info

New answers tagged

0

Here's a way: I copied the code for the southall style (section B.1.4 of the memoir manual) and modified it, giving it a new name. Adjust to suit. The package showframe is used just to better show the positioning of title. Note that memoir provides functions similar to titlesec, so they're not normally used together. More information about chapter styles is ...


3

It seems to be an interaction between stfloats and the class or other packages used. removing that and changing [b] to [!bp] to allow more flexibility in the float positioning produces a better result:


2

I am currently disabling kerning between an apostrophe and a succeeding letter by using XeTeX's interchartoken mechanism: \XeTeXinterchartokenstate=1 \newXeTeXintercharclass\ApostropheClass \XeTeXcharclass`'\ApostropheClass \newXeTeXintercharclass\AfterApostropheClass \XeTeXcharclass`a\AfterApostropheClass \XeTeXcharclass`A\AfterApostropheClass ...


0

I contacted Mr. Tellechea (maintainer of chemfig package) and he replied to my question. I put here his code: ‎\documentclass[11pt]{article}‎ ‎\usepackage{chemfig}‎ ‎\makeatletter‎ ‎\catcode`\~12‎ ‎\def\CF@chemfig@v{%‎ ‎ \let\CF@next@action\CF@chemfig@v% \`a priori‎, ‎on reboucle‎ ‎ \ifx\CF@remain@molecule\@empty‎ ‎ \let\CF@next@action\endgroup‎ ...


1

This happens because the bemaer column system uses the LaTeX minipage behind the scenes: a vertical box. As these are not set with a fixed height they don't stretch, in contrast to setting a frame where beamer does some resizing (so the stretch is important). For a one-off application I'd be tempted to use a raw minipage and adjust as require. For example ...


1

You have a \checkboxeshook command that allows to modify the list parameters used by the checkboxes environment: \documentclass[a4paper, 11pts]{exam} \usepackage{multicol, setspace} \usepackage{textcomp, booktabs,colortbl} \usepackage[table]{xcolor} \setlength\columnsep{40pt} \onehalfspacing \renewcommand\checkboxeshook{\setlength\leftmargin{0cm}} ...


3

I'd avoid \overline: \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand{\dashover}[2][\mathop]{#1{\mathpalette\df@over{{\dashfill}{#2}}}} \newcommand{\fillover}[2][\mathop]{#1{\mathpalette\df@over{{\solidfill}{#2}}}} \newcommand{\df@over}[2]{\df@@over#1#2} \newcommand\df@@over[3]{% \vbox{ \offinterlineskip \ialign{##\cr ...


5

This problem affects most Adobe fonts (Adobe, are you listening?). I don’t use xetex enough to know what can be done about it in xetex, but in luatex you can write a feature file to adjust the kerning without editing the font itself. It’s much easier than it sounds. E.g., \documentclass[12pt]{article} \usepackage[french]{babel} ...


2

This may have the drawback of slightly affecting line spacing, but... I substitute \Overline which does an \overline with a little extra stack gap added. And for \preclosure, I modified it so that it preserves the math style of the argument, using the \ThisStyle{...\SavedStyle...} construct of the scalerel package. I did not really address the issue of ...


2

Another way is to specify manually the skip you want after each row substituting \\ with \\[skip]. In this way you can even differentiate the skip for each row. For example, in the following MWE, I've given 5ex after each white row and 7ex after each grey row: \documentclass[a4paper]{exam} \usepackage{multicol, setspace} \usepackage{textcomp, ...


4

You set \setlength\columnsep{40pt} on line 5 so you get 40pt of space between the columns


5

You can use \renewcommand{\arraystretch}{2}. Change 2 as you want for example 3. \documentclass[a4paper]{exam} \usepackage{multicol, setspace} \usepackage{textcomp, booktabs,colortbl} \usepackage[table]{xcolor} \setlength\columnsep{10pt} \onehalfspacing \begin{document} \begin{center} \fbox{\fbox{\parbox{5.5in}{\centering ...


2

Use the rules provided by booktabs, that ensure some space is set above and below them. \documentclass[12pt]{article} \usepackage{longtable,array,booktabs} \begin{document} \begin{longtable}[l]{ >{$\displaystyle}l<{$} >{$\displaystyle}l<{$} } \toprule \multicolumn{1}{c}{Time Domain} & \multicolumn{1}{c}{Frequency Domain} \\ \midrule ...


3

array allows you to add additional height to the rows of tabulars globally (or locally if you restrict the scope of the command, of course). This helps ensure consistency and makes it easy to adjust the layout if necessary. For example, you can say \setlength{\extrarowheight}{5mm} However, I think that you will get better results if you use an environment ...


3

You can try the cellspace package, that defines minimal vertical spacing above and below cells in columns with specifier prefixed with the letter S. If one uses the siunitx package which also uses the letter S, the prefix is replaced with the letter C: %%%%%%%%%% \documentclass{article} \usepackage{graphicx} \usepackage[sc]{mathpazo} ...


4

Your approach here (in terms of horizontal rules) matches that of what is suggested by booktabs. Here's what I would use: \documentclass{article} \usepackage[sc]{mathpazo} \usepackage[T1]{fontenc} \usepackage{geometry} \usepackage[labelfont=sf,hypcap=false,format=hang,width=\columnwidth]{caption} ...


0

Insert \usepackage{etoolbox} \patchcmd{\oldpart}{\cleardoublepage}{\clearpage}{}{} in the preamble.


6

The mapping substitutions work on a character basis, but XeTeX never uses the space character; rather, it changes space tokens into horizontal glue, so when the substitution stage is reached, there's never a combination U+0020 U+00B7. You can use newunicodechar for this purpose: \documentclass{article} \usepackage{fontspec} ...


4

As egreg says in his answer, use \makebox here also. \documentclass[twoside]{article} \usepackage{xcolor} \usepackage{lipsum} \usepackage{fancyhdr} \newlength\titleindent \setlength\titleindent{.25in} \pagestyle{fancy} \fancyhf{} %\renewcommand{\sectionmark}[1]{\markboth{#1}{}} %\renewcommand{\subsectionmark}[1]{\markright{#1}} \fancyfoot[RO]{% ...


4

Why a \parbox? \documentclass[]{article} \usepackage{titlesec} \usepackage{showframe} \newlength\titleindent \setlength\titleindent{.25in} \titleformat{\section} {\normalfont\large} {\makebox[0pt][r]{\thesection\hspace{\titleindent}}} {0pt} {} \begin{document} \section{MMMMmmm} \end{document} Note that the number should go in the third ...


5

longtable does \vspace{\LTPre} before a table and \vspace{\LTpost} after a table, both of which are by default \bigskipammount. Most latex display environments use \addvspace to add their vertical offsets, so that adjacent spaces combine (\addvspace just adds the maximum of any space currently on the vertical list and the space requested) but longtable ...


0

Here is a way. I use the makecell and rotating packagesz, plus hhline (the ordinary horizontal last line and vertical first line do not join well) and caption (for a correct vertical spacing between caption and table): \documentclass{article}% \usepackage{graphicx} \usepackage[ margin = 2.5cm]{geometry} \usepackage{tabularx, booktabs, array, rotating, ...


2

Use a font switch \bfseries rather than a macro \textbf and \normalfont rather than \normaltext (which doesn't exist).


0

What could go wrong? \documentclass{scrartcl} \usepackage{mathtools} \begin{document} \newif\ifvec \def\advancedsp#1{\sp{\ifvec\,\global\vecfalse\fi#1}}% \let\normalvec\vec \def\vec{\vectrue\normalvec}% \catcode`\^=\active \let^\advancedsp \[ \vec{r}_{i}^{2} \] \end{document}


3

You can use the trick you can find in my answer to How to keep a constant baselineskip when using minipages (or \parboxes)? You should also avoid repetitive explicit markup, by defining an environment. \documentclass{article} \usepackage{calc,xparse} \NewDocumentEnvironment{entry}{O{2.5cm}mm} {\noindent\begin{minipage}[t]{\textwidth-#1} \textsc{#3:} ...


7

i nearly always agree with david, but i think a little less space is called for: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \vec{r}_{i}^{2} \quad {\vec{r}_{i}}^{\,2} \] \end{document}


4

\documentclass{article} \usepackage{amsmath} \begin{document} \[ \vec{r}_{i}^{2} \quad {\vec{r}_{i}{}}^{2} \] \end{document}


3

You should write all your \parboxes using \parbox[.]{<len>}{\strut ... \strut} in order to obtain the appropriate line-height - \strut ensures this. However, your input can be presented a little differently using the following tabularx approach and it's far easier to manage: \documentclass{article} \usepackage{tabularx,array} ...


2

An easy work-around would be to supply the skip as part of the options to an mdframed environment. The documentation mentions the following lengths: As such, also supply skipabove=10in and skipbelow=10in. However, I'd use the power of mdframed and create your own mdquoting environment: \documentclass{article} \usepackage{mdframed} ...


5

You can make url to break the lines at places you want by adding these lines to your preamble: ...


2

I'm not really sure you want to do it, because it will be confusing your reader. \documentclass{scrbook} \usepackage{amsmath,mathtools} \begin{document} \begin{equation} \begin{pmatrix} a \\ b \\ c \end{pmatrix}_{\!\!\mathrlap{\mathrm{SCR}}} = x \end{equation} \end{document} The \!\! is for moving the subscript nearer the parenthesis (I always use ...


4

\hphantom isn't really a documented LaTeX command and it's a good occasion for talking about it. The problem can be seen also in this simpler document, which shows that tabulary is not involved: \documentclass{article} \newcommand{\sator}{Sator arepo tenet opera rotas} \newcommand{\tabindent}{\hphantom{em}} \begin{document} \sator \tabindent\sator ...


0

There is a difference. Here are 5 versions of your formula, with the normal spacing, and adding \,, \:, \; and \. In my opinion, the only places that might justify adding some space are just between the quantifiers. For the parentheses and the binary symbol, spacing is fine: \documentclass{article} \usepackage{mathtools} % \begin{document} \begin{gather*} ...


0

Can't see any problem here. Does none of these work for you? Just in order to give some examples. You can find a big list here. % arara: pdflatex \documentclass{article} \usepackage{mathtools} \newcommand*{\test}[1]{$G#1(\forall(x)#1\forall(y)#1(p(x)#1\vee#1\neg{}p(y)))$\par} \begin{document} \test{} \test{\,} \test{\>} \test{\ } \test{\mkern+10mu} ...


3

Something more or less like this, basically tell latex to leave a big space (4cm here) but then tell it that footnotes do not take up any space so tex does not make the page any shorter when there are footnotes. \documentclass{article} \def\a{One two three four five six seven eight. } \def\b{Red blue yellow green black white} \def\c{\a\a\b\b\a\a\a\a} ...


0

If you also want to get rid of the margin outside the tabular, use the flushleft: \begin{flushleft} \begin{tabular}{@{}l l} Content & Content \end{tabular} \end{flushleft}


6

What you're asking for is an overlapping macro. Either use \rlap (which produces a right overlap): \rlap{?}! or \llap (which produces a left overlap): ?\llap{!} The order of the punctuation ? and ! doesn't really matter, although they have different widths (and therefore may set slightly differently when switched around). The LaTeX2e equivalent is ...


4

For some reason beyond my understanding, using the keyboard guillemets « and » together with the following option in the babel package \frenchbsetup{og=«,fg=»} solves the problem (and elegantly too). Of course, one needs access to utf8 characters. Here is a full example. \documentclass{article} \usepackage[utf8]{inputenc} ...


2

Mico beat me to it, so I'll post another option, the quick and dirty way to get the same result—maybe useful if this is the only table with this kind of spacing issue and you don't want to load another package. You can just use \par to insert line breaks and imitate \raggedright: \documentclass{article} \begin{document} \begin{table}[h] ...


3

Be sure to load the array package and replace p{9.0cm} with >{\raggedright}p{9.0cm}: \documentclass{article} \usepackage{array} \begin{document} \begin{table}[h] \centering \begin{tabular}{|>{\raggedright}p{9.0cm}|p{1.5cm}|} \hline User-agent string & dummy\\ \hline Googlebot (compatible; Googlebot/2.1; ...


3

Here is how I would do it, using the siunitx package: \documentclass{article} \usepackage{booktabs} \usepackage[separate-uncertainty]{siunitx} \begin{document} \begin{table} \small % change according to needs \setlength\tabcolsep{6pt} % change according to needs \centering \begin{tabular}{ l S[table-format = ...


1

You can use this: \documentclass{article} \usepackage[showframe, nomarginpar]{geometry} \usepackage{mathtools} \usepackage{enumitem} \begin{document} Some text some more text some more text some more text some more text some more text some more text some more text some more text. \begin{enumerate}[align = left,labelwidth =* ,labelsep*=-1pt,itemindent = ...


1

You can use a redefinition of \headrule to add a convenient (negative) skip before the rule is typeset; the following example code shows the necessary redefinition using -2pt (change this value according to your needs in the line marked % change here) \documentclass{book} \usepackage{fancyhdr} \usepackage{lipsum} \makeatletter \def\headrule{{ ...


0

You can also use the YAML header to put commands in the preamble: --- header-includes: - \usepackage{titlesec} - \titleformat*{\section}{\itshape} ---


0

From the User Guide: -H FILE, --include-in-header=FILE Include contents of FILE, verbatim, at the end of the header. [...] This option can be used repeatedly to include multiple files in the header. They will be included in the order specified. Implies --standalone. You can then put your customisation code in FILE. The code inside FILE will be ...


4

The reason for these "random spaces" is as a result of the particular document composition. Take a look at pages 3 and 4: Note that you have a heading \section*{Results} which happen to be at the top of the first column of page 4. TeX decided that there is no way to place this heading together with at least one line "Lorem ipsum dolor sit amet, ...


3

You should avoid philex for the reasons egreg gives in his answer. The most commonly used packages for typesetting linguistic examples are gb4e, expex, and linguex (which is loaded by philex). See Alan Munn's excellent comparison of these packages for more details. Many of the features that philex adds to linguex (cross-referencing, repeating examples, ...


0

Not an answer but a comment with images: I'm not sure to understand the problem. If I replace your images (which I don't know where to find them neither their size) with example-images from mwe package I obtain two slides with everything inside. So, what's what doesn't fit? where?


2

The lingmacros package is very old, and is really not very practical for numbering anything other than the most basic examples. For instance, it requires you to label subexamples manually, which really defeats the purpose of LaTeX and automatic numbering of things. See the following question for a summary of three widely used packages for linguistic ...


2

The reason is that the philex package is written in a terrible way and doesn't protect end-of-lines in definitions. The space you see is caused mainly by these unprotected spaces. See When is it harmful to add percent character at end of lines in a \newcommand, or similar for more information. They are too many unprotected end-of-lines for proposing a fix; ...



Top 50 recent answers are included