Tag Info

New answers tagged

1

I introduce the leftitemize environment, that places its labels in a 2cm wide left-aligned box (in bold). The labels are aligned with the enclosing environment margin. \documentclass{article} \usepackage{enumitem} \let\svitem\item% \def\mybox#1{\makebox[2cm][l]{\bfseries#1}} \newenvironment{leftitemize} ...


1

Another version: Using \BeforeBeginEnvironment command from etoolbox and redefining the \arraystretch there \documentclass{article} \usepackage{etoolbox} \BeforeBeginEnvironment{array}{% \renewcommand{\arraystretch}{.5}% } \begin{document} \[ \begin{array}{cc} a & b \\ c & d \end{array} \] \end{document}


3

You can do this by redefining the array environment. However, I would not recommend this. You could place the \renewcommand{\arraystretch} locally when ever it is needed or you introduce a new environment myArray with all the tweaks you like. But here is, what you asked for: % arara: pdflatex \documentclass{article} \let\oldarray\array ...


2

The moderncv style file (on my system this file can be found in /usr/share/texlive/texmf-dist/tex/latex/moderncv/moderncvstylecasual.sty) redefines the \section command. Copy that \RenewDocumentCommand part to the preamble of your .tex file and put \makeatletter above it and \makeatother below it, as shown here: % Increase the vertical spacing between the ...


2

Package ltxtable allows the combination of longtable with tabularx column type X. The latter is useful for the last column with the description text. The first columns can be set via column type l. The indentation in the description part can be achieved via \hangindent and \hangafter (assuming there is only one paragraph). Since the package ltxtable ...


2

As you are already loading titling, use its methods: \documentclass[a4paper,12pt,numbers=noenddot]{scrartcl} \usepackage[T1]{fontenc} \usepackage{titling} \pretitle{\begin{center}\linespread{1.5}\huge\sffamily} \posttitle{\par\end{center}\vspace{0.5em}} \begin{document} \title{Evaluation of Security aspects in a Beer Production company} \author{Adalbert ...


2

A method with changing the \baselineskip -- since it is done in a group, it won't hurt outside. \documentclass[a4paper,12pt,numbers=noenddot]{scrartcl} \usepackage{titling} \usepackage[T1]{fontenc} \title{Theory of Brontosaurs -- their thickness and Thin-Lizzy-Likeness} \usepackage{setspace} \begin{document} \begin{titlepage} ...


0

You can use de setspace package and use the spacing enviroment. For example using this: \documentclass[a4paper,12pt,numbers=noenddot]{scrartcl} \usepackage{titling} \usepackage[T1]{fontenc} \usepackage{setspace} \begin{document} \begin{titlepage} \begin{center} \vspace*{3cm} \begin{spacing}{3} \textsf{\huge{Evaluation of Security aspects in a Beer ...


1

This works, but is not a perfect solution: \documentclass[a4paper,12pt,numbers=noenddot]{scrartcl} \usepackage{titling} \usepackage[T1]{fontenc} \begin{document} \linespread{5} \begin{titlepage} \begin{center} \vspace*{3cm} \textsf{\huge Evaluation of Security aspects in a Beer\\[.7cm] Production company} \end{center} \end{titlepage} \end{document} A ...


-1

\vspace{-5cm} or muliple of \baselineskip is a manipulation. There should be some logical way...


3

here is a modified example, nearly the same as the original, except with % signs following all the non-final lines of the \newtheoremstyle definitions, and a more comprehensive styling in the last line of the mylemma style; although overkill, it's the easiest way to get around the "bold period" problem. also shown is the equivalent material in default style ...


3

You just have an unprotected end-of-line. The other effects can be cured by adding appropriately \normalfont. \documentclass{amsbook} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \makeatletter \newtheoremstyle{mytheorem} {6pt plus 0pt minus 2pt} {0pt plus 0pt minus 2pt} {\slshape} {}{\scshape} {.} {5pt plus 1pt minus 1pt} {\thmname{#1}\thmnumber{ ...


1

You can move some of the commands in to the then or else parts of the test of the third argument #3. \documentclass{amsbook} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{etoolbox} \newtheoremstyle{mytheorem} {6pt plus 0pt minus 2pt} {0pt plus 0pt minus 2pt} {\slshape} {}{\scshape} {.} {5pt plus 1pt minus 1pt} {\textnormal{\bfseries ...


2

This should be \item Discuss to what extent the cable length affects the peak voltage at node C. \begin{align*} H(t) = 0 &\text{ for } t < 0 \\ H(t) = 1 & \text{for } t \geq 0 \end{align*} \end{enumerate} Don't have a blank line before a displayed equation or put it in a display environment such as center also don't have align with no ...


2

REVISED solution, which eliminates the multirow, instead using a nested tabulars. RE-REVISED to consolidate everything into \makemytable{height}, just to allow easier play-testing with various heights. Here I just \addstackgap[<length>]{object} in order to add a vertical buffer above and below objects on that row. Buffer size added depends ...


4

\documentclass{memoir} \newwrite\testaux \immediate\openout\testaux=\jobname.myaux \begin{document} \makeatletter \immediate\write\testaux{\string\dont@want@spaces@after@this words} \immediate\write\testaux{\string\dont@want@spaces@after@this@either words} \makeatother Here is a body. \end{document}


2

You might be interested in my answer to Automatic spacing of symbols . Here is it again: \mathcode`\*="8000 {\catcode`\*=\active \gdef*{\mathclose{}\,\mathopen{}}} Compare $a*b$ $a b$ $a\,b$ $a*\cos b$ $a \cos b$ $a\,\cos b$ The \mathopen{} avoids inserting two thin spaces if * is in front of a \mathop.


0

minipage environment will work as pointed by @Mico. You can also use tabular environment to tabulate your figures.


3

Something like this? Note that only the fourth image and the caption need to be placed inside minipage environments. \documentclass{article} \usepackage[demo]{graphicx} % omit "demo" option in real document \begin{document} \begin{figure} \includegraphics[width=\textwidth]{fig1} \includegraphics[width=0.49\textwidth]{fig2}% \hspace*{\fill}% ...


3

Increasing the height of the title box, \titlebox, works for me. I had to comment out tia as I don't have it but, otherwise, it works fine. I tried with pdfLaTeX and XeLaTeX, with and without xltxtra. All fine. \documentclass[11pt,xetex]{article} \usepackage{xltxtra} % \usepackage{tia}% not part of TeX Live? \usepackage{url} \usepackage{lipsum} ...


6

\begingroup\lccode`\~=`\*\lowercase{\endgroup\def~}{\,} \AtBeginDocument{\mathcode`\*="8000 } But, regarding the differential, I would use a macro \newcommand*\dif{\mathop{}\!d} So you would write $a x + b$ vs $a * x + b$ and $y dx$ vs $y \dif x$


7

The space you see is caused by the section title, not by the list. Change the \titleformat: \titleformat{\section} % Customise the \section command {\large\bfseries\vspace{-\baselineskip}} {} {0ex} {\hrule\smallcaps\strut} [\color{secondary}{\titlerule[0.25pt]}] % Inserts a horizontal line after the heading For setting the example I ...


2

Here is what I did: To center the text vertically within the cell, I used the cellspace package as Bernard did because it is the simplest. You could use any other method like \newcolumntype or \raisebox (See this question for example), but this is easy and accurate To make the horizontal lines thicker, I used \setlength\arrayrulewidth{1.5pt}, besides ...


3

Here is a solution: I used \columncolor rather than \rowcolor because I can specify a value for the optional parameter overhang, which enables to get rid of the thin vertical white line between columns. Last, I replaced changing the value of \arraystretch with the cellspacepackage, which allows for vertical padding if rows, symmetrically at the top and the ...


1

Above picture is generated width: \documentclass[border=2mm]{standalone} \usepackage{mathtools,amssymb} \usepackage[dvipsnames,svgnames,table]{xcolor} \usepackage{array,booktabs} \begin{document} % \centering % \def\arraystretch{2} % \setlength\tabcolsep{20pt} \renewcommand{\arraystretch}{1.3} ...


0

If using the memoir class you can add \renewcommand{\insertchapterspace}{} to the preamble of your document if you want no chapter spacing in your listings. Details are contained in section 6.5 of the manual. By default a \chapter inserts a small amount of vertical space into the List of Figures and List of Tables. It calls \insertchapterspace to do ...


1

Use etoolbox for adding what you need. \documentclass{memoir} \usepackage{etoolbox} \setlength{\cftbeforechapterskip}{3pt} \pretocmd{\chapter}{\ojdospacing}{}{} \apptocmd{\mainmatter}{\let\ojdospacing\ojdospacingon}{}{} \apptocmd{\backmatter}{\ojdospacing\let\ojdospacing\relax}{}{} \newrobustcmd{\ojdospacingon}{% \addtocontents{toc}{\addvspace{6pt}}% } ...


1

To be more specific, the vertical space above the first item is caused by the \vspace{0pt} that you put at the beginning of the minipage[t]: according to TeX’s rules for computing the height of a \vtop box (the kind of box that minipage[t] constructs), this results in a box with zero height and all its contents “pushed down” below the baseline, contributing ...


2

You are using parskip=full and scrbook duly obeys it: addmargin starts a new paragraph and so it is separated from the preceding paragraph with a full parskip. If you want to remove the parskip in your addmargin environment, I suggest you to define a new environment. \documentclass[ parskip=full ]{scrartcl} \newenvironment{thomasaddmargin} ...


0

\documentclass[parskip=full,]{scrartcl} \makeatletter \let\@addmarginORIG\@addmargin \renewcommand*\@addmargin{% \vspace{-\bigskipamount} \@addmarginORIG} \makeatother \begin{document} Mytext \begin{addmargin}[0.3cm]{0cm} MyOtherText \end{addmargin} \end{document}


1

the \tabulinesep is used after the last row, too. Use \vspace*: \documentclass{scrartcl} \usepackage{longtable} \usepackage{tabu} \usepackage{xcolor} \usepackage{blindtext} \newlength{\firstcolumn} \setlength{\firstcolumn}{3.5cm} \renewcommand*{\familydefault}{\sfdefault} \raggedbottom \begin{document} \extrarowsep=1.5mm \begin{longtabu} to ...


1

If this is rare cases in your document, the simplest way is put \vskip-1em between tables. This will reduce vertical space for 1em: ... D - F & \blindtext \\ \end{longtabu}\vskip-1em \begin{longtabu} to \textwidth{@{}p{\firstcolumn}X}% \textcolor{gray}{\rule{\firstcolumn}{0.15cm}} & ...


1

In twocolumn-mode each column is treated as a page of its own. The algorithm in this case is placed on a float page, and we have to follow what is said in How to place a float at the top of a floats-only page? To rename the name of algorithms, we can use the optional argument when loading the package, thanks egreg. Here the complete example. ...


2

Load cleveref: you'll have less typing and the spacing will be fine. Demo: \documentclass{report} \usepackage[utf8]{inputenc} \usepackage{mathtools} \usepackage{chngcntr} \counterwithin{equation}{chapter} \usepackage[colorlinks, linkcolor=blue]{hyperref} \usepackage{cleveref} \begin{document} \setcounter{chapter}{1} \begin{equation} \label{eq-1st} J ...


0

revtex4-1 already contains a functionality to recover spacing which was removed at the original column break: \marry@baselines. This uses \marry@skip, which is set by \set@marry@skip. We can see that this is called between \begin{document} and the first character of the document: \documentclass[twocolumn]{revtex4-1} \usepackage{lipsum} \usepackage{etoolbox} ...


2

Try increasing the column width equally (or \column{.2\textwidth} for the first one and \column{.8\textwidth} for the second one): \documentclass{beamer} \begin{document} \begin{frame} \frametitle{Deep Learning and Autoencoders} The visualization derives from the weight normalization using the following formula for the case of $10 \times 10$ (for all 100 ...


1

As Gonzalo has mentioned in this answer, The only way to decrease the intercolumn space is to increase the column width So you will have basically two options: Change \column{.2\textwidth} to something bigger, e.g., \column{.8\textwidth} which bring the right column as close to left column as possible. Remove onlytextwidth options which will ...


1

You can use the optional argument for \\ (I used 3ex in my example, but change to the desired value): \documentclass{article} \usepackage{amsthm} \usepackage{lipsum}% just to generate text for the example \makeatletter \renewenvironment{proof}[1][\proofname]{\par \pushQED{\qed}% \normalfont \topsep6\p@\@plus6\p@\relax \trivlist ...


1

A simple workaround is \signature{vspace{-80pt} Susan R. Bumpershoot}


1

As it can be deduced from the name given to \abnormalparskip, the author of the memoir class doesn't like documents with a nonzero \parskip. And I heartily agree with him. If you want your document to be as ugly as possible (and possibly uglier), here's how you can do. \documentclass{memoir} \setlength{\parindent}{0em} \abnormalparskip{1em} \makeatletter ...


1

I wouldn't know how to do it using shorttoc, but here's one possibility using the powerful titletoc package: \documentclass{book} \usepackage{titletoc} \usepackage{tocloft} \makeatletter \renewcommand{\@tocrmarg}{0em} \renewcommand\cftpartafterpnum{\par\vskip-2ex\hrulefill\par} \makeatother \setlength\cftbeforetoctitleskip{0pt} % change space ...


3

As Ulrike Fischer mentions in her comment, one option is to change \parskip inside the list internally used by quote; for consistency's sake, the same modification will be required for the quotation environment. The following example code shows the necessary redefinitions: \documentclass{memoir} \setlength{\parindent}{0em} \newlength\myparskip ...


2

Maybe this would suffice. However, it does not (to my mind) work reasonable spacing in other circumstances (post square root), so I would prefer renaming it as \xsqrt or some unique name to be used sparingly. RE-REVISED to take Heiko's suggestion on how to remove extra space following the square root: \documentclass{article} \usepackage{amsmath} ...


4

Knuth's CWEB program inserts visible space characters automatically for string constants in a C program, as this example shows (save as space.w, compile as cweave space && pdftex space). @ \.{CWEB}, show me how you format spaces in string constants. @p #include <stdio.h> static const char greeting[] = "H e l l o , w o r l d !\n"; int ...


10

The new feature \pdfinterwordspaceon of pdfTeX 1.40.15 can be exploited to get a tiny visible space, where TeX would put an invisible space. The feature has the purpose to have a real space character in the output instead of pure white space by moving to the next character position. By changing the font to cmtt10, which has a visible space at the space ...


9

Borrowing code by Marcin Woliński at "How to make a box disappear at a line break", already used for my answer at Check if at begin of a line \documentclass{article} \newcommand{\AND}{% \leaders\hrule height 1.5ex \hskip\fontdimen2\font plus \fontdimen3\font minus \fontdimen4\font } \newenvironment{showspaces} {\par\obeyspaces\obeylines ...


2

The simplest code is obtained with a suitable array environment, right-aligned for the left hand side, left aligned for the right hand side (you may change that if you prefer). Columns begin with the coefficients of the unknowns. If an equation is missing some unknown, end up the previous ‘block coefficient+unknown’ with \hphantom{{}+{}}. I load the siunitx ...


2

The primitive \over as used by \frac automatically switches styles. The \tfrac and \dfrac macros are for special cases to force text or display style. \ifinner does not test for text/display distinction so the solution is simple, replace all \ifinner \tfrac{..}{..} \else \dfrac{..}{..} \fi by \frac{..}{..} For your second question, I wouldn't use the ...


0

Another solution that works with beamer is to redefine \item as suggested in this answer to a related question: \let\olditem\item \renewcommand{\item}{% \olditem\vspace{4pt}} This puts a space after items, even when they are followed by sub-items, unlike solutions based on \itemsep. Rather than using a fixed size, this solution can be used with \fill so ...


4

You need to pass in the parameter and access it as #1: Code: \documentclass{article} \usepackage{amsmath} \newcommand{\wtext}[1]{\quad \text{#1}\quad} \begin{document} $\quad \text{some text} \quad$ $\wtext{some text}$ \end{document}



Top 50 recent answers are included