Tag Info

New answers tagged

1

Put a blank line before \vspace{2pc} and possibly increase the value to 2cm or whatever you need. Note you almost never want to do [width=0.9\linewidth, height=5cm] it will distort the figure to force those dimensions. Just specify one of height or width


0

The footmisc package, suggested by Rüdiger Voigt, works actually perfectly: \usepackage[hang]{footmisc} Thank you for all your answers and help!


1

Many people no longer use the classes that ship with LaTeX itself, but the KOMA-script classes. They provide among a lot of other useful stuff high level commands. You can determine the layout of your document by a small number of commands. Let's have it: \documentclass[papersize]{scrartcl} \deffootnote{1.5em}{1em}{% \makebox[1.5em][l]{\thefootnotemark}} ...


1

The markup for a paragraph break is a blank line, not \\ : \documentclass{article} \usepackage{parskip} \begin{document} \section{First section} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet nibh convallis, interdum dui vitae, ultrices urna. Vestibulum lobortis, mi vitae hendrerit pulvinar, nunc mauris dapibus dui, sed ...


4

The following solution uses two drcases environments (provided by the mathtools package) inside an align* environment. \documentclass[a4paper,oneside,abstracton]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[english]{babel} \usepackage{mathtools} \newcommand\DB{\text{\textbf{Dark}[Bias]}} ...


3

Your question is a bit unclear in stating what you actually want aligned, but here you go: If you only want your 'small' and 'long' formulae centered horizontally in 1 equation, I presume it's easiest to use an array environment instead of an aligned environment. Maybe aligned could be possible as well but (though this comes close: ...


4

Not sure quite what you want but this runs without error \documentclass[a4paper,oneside,abstracton]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} %Schriftsatz Dokument \usepackage{lmodern} %use this package in combination with [T1]{fontenc} wo have vector-graphics letters instead of pixelated ...


1

At this stage, this result is manual, in that a pt value of per word space insertion or deletion is required to optimize the result. Also, this simple algorithm is not able to handle macros in the text, though I suppose if one wanted to go down this path, it could be made more robust. The approach is to parse the input word by word and following each word, ...


4

Hmm Tikz ought to fix that, but meanwhile make sure you have a \par or blank line in the scope of any font size change, \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[text width=4cm] {\fontsize{14pt}{20pt}\selectfont Foo\\Bar\\Baz\par}; \end{tikzpicture} \end{document}


2

You are mixing math and text modes. You need to bracket the mathematics correctly. \documentclass{article} \begin{document} In-line math 1.The sequence \(\{a_n\}\) converges to \(a\) if for all \(\epsilon > 0\) Display math 1.The sequence \[\{a_n\}\] converges to \[a\] if for all \[\epsilon > 0\] \end{document} You use \( and \) to bracket ...


1

You could use the \@endquestionhook command to add the space; this, however, will affect all question environments: \documentclass{examdesign} \class{Some exam} \makeatletter \renewcommand\@endquestionhook{\vspace{1cm}} \makeatother \begin{document} \begin{multiplechoice} \begin{question} What is the correct answer? \choice{This is not.} \choice[!]{This ...


7

I don't know why you want to do this but add \ignorespacesafterend as in {\end{equation}\ignorespacesafterend} Code: \documentclass{amsart} \newenvironment{eq}{\begin{equation}}{\end{equation}\ignorespacesafterend} \begin{document} \begin{eq} a+b=c \end{eq} There is a extra space at the end of ``eq'' environment. % <---------- and don't leave a blank ...


3

Regarding definining wrapper environments for other environments, it is better to use the 'real' commands for the environment begin and end macros, i.e. \equation and \endequation in this example and add the trailing % characters at the right position. The question is rather, whether is is useful to do such short wrappers at all;-) \documentclass{amsart} ...


6

One option is to use a rubber length for \bibitemsep \setlength{\bibitemsep}{12pt plus 10pt minus 10pt} %% adjust this suitably You have to adjust plus 10pt minus 10pt suitably at the end (for example give some more value). Code: \documentclass[10pt,a4paper]{book} \usepackage{lipsum,showframe} \usepackage[utf8]{inputenc} ...


4

The desired effect can be achieved by redefining \bibsetup, i.e., \renewcommand{\bibsetup}{\flushbottom} According to the manual \bibsetup contains Arbitrary code to be executed at the beginning of the bibliography, intended for commands which affect the layout of the bibliography.


3

Add a \strut to the beginning and end of the \parbox. The top and bottom of the \parbox are flush-fitting to the text, so if you need the normal dead-zone space above and below the line, a \strut extends the text row vertically to the extent allocated by normal line spacing. Placing a flush-fitting box around each \parbox demonstrates the problem with the ...


2

I have managed to solve it by using \@bsphack \@esphack in command definition. The modified mulan.sty is as follows. % Multi-language support package<mulan.sty> % Copyright 2015~2015, JILONG YIN % JILONG YIN <yinjilong@gmail.com> % The Current Maintainer of this work is JILONG YIN. % % ...


7

\Large is a switch, \bf is deprecated and \color{female} doesn't take an argument too. So you need \newcommand{\hgF}[1]{% \begin{description} [nosep,labelwidth=0.75em,leftmargin=\dimexpr\labelwidth+\labelsep, before=\vspace{-0.7\baselineskip},after=\vspace{-\baselineskip}] \item[\color{female}\Female]% ...


2

I don't know why you want this, but... \documentclass{article} \newcommand\mulan[5]{% #1#4#2#5#3% }% \newcommand\mulanr[2]{% \mulan{\ignorespaces}{/}{\ignorespaces}{#1}{#2}% }% \begin{document} \section{TitleA/TitleB} \section{\mulanr{TitleA}{TitleB} } test \end{document}


1

The first field of aligned is right-aligned, so add a & to the beginning of each row (since the 2nd field of aligned is left aligned). \documentclass{article} \usepackage[utf8]{inputenc} %\usepackage[latin1]{inputenc} %Zeichencodierung Text \usepackage[T1]{fontenc} %Schriftsatz Dokument %%Language settings ...


12

The width of normal space depends on current font. There are global metric items in each font called \fontdimen. The \fontdimen2 includes the basic width of normal space, \fontdimen3 includes value atfer plus and \fontdimen4 includes value after minus. The \fontdimen7 includes additional space used when \spacefactor\ge 2000. Because the \font primitive ...


7

I'd use a paragraph rather than leaders: \documentclass[draft]{article} \usepackage{lipsum} \usepackage{xcolor} \colorlet{todocol}{green!30!black} \newcommand{\todopar}[2][To Do]{% % end the previous par and start a local group \par\medskip{% % special para uses full length lines, no white space % at start or end \parindent0pt \parfillskip0pt % ...


1

karlkoeller's suggestion of using {} in the gloss line is what you'd have to do in gb4e. For the sake of completeness, I thought I'd mention that the expex package provides a \nogloss{} command for material that appears in the target language line but doesn't have a corresponding gloss. This way you don't have to remember to put empty elements in the gloss ...


8

Simply insert an empty atom {} that will go under \lb{PP, ADJC} and insert a space after the latter. MWE: \documentclass{article} \usepackage{gb4e} \begin{document} \begin{exe} \ex \gll m-itoetra \lb{PP, ADJC} amin' ilay trano mena] izahay. \\ \textsc{pres-}live {} in that house red \textsc{1pl.exclusive.nom} \\ \glt `We live in that red ...


7

Both \rlap and \llap are defined in terms of an \hbox \def\rlap#1{\hb@xt@\z@{#1\hss}} \def\llap#1{\hb@xt@\z@{\hss#1}} where \def\hb@xt@{\hbox to} However, an \hbox cannot be used to start a paragraph. You either need to explicitly switch to horizontal mode by using something like \noindent or \leavevmode. (See section 16.3 of TeX by Topic for further ...


3

A simple \hfill seems to do the job (showframe is just for visual guideline): \documentclass{article} \usepackage{syntax} \usepackage{showframe} \begin{document} \begin{grammar} <expression> ::= <ident> \alt <expression> $+$ <expression> \hfill (addition) \alt <expression> $*$ <expression> \hfill ...


0

In addition to wanting to center each table horizontally and to leave some vertical white space above and below the tables, you also appear to need to be able to cross-reference the tabular material. I therefore suggest you encase each tabular environment in a table environment, insert the instruction \centering immediately after the \begin{table} statement, ...


3

The solution is simple: protect the item label with braces: \item[{[$\Leftarrow$]}]


1

This is somewhat of a home cooked solution, but I opened the authordate3.bst file in my text editor and replaced the three occurrence of {\em et~al.\ } with {\em et~al.}. My authordate3.bst was located here /usr/local/texlive/2014/texmf-dist/bibtex/bst/beebe/authordate3.bst. After I did that I ran your code again and all was good (I might have created some ...


2

One has ....\hbox(0.0+0.0)x0.0 ....\OT1/ptm/m/n/7 : ....\glue 2.45004 plus 1.04996 minus 0.84007 ....\OT1/ptm/m/n/7 The other has ....\hbox(0.0+0.0)x0.0 ....\OT1/ptm/m/n/7 : ....\glue 2.87003 plus 2.09991 minus 0.42003 ....\OT1/ptm/m/n/7 A The reason is that the spacefactor of : has reverted. the problem only affects the heading as latex normalises ...


2

The cite package has a list of characters \providecommand{\CiteMoveChars}{.,:;} which move the superscript cite after punctuation and this is producing the undesired bahaviour. To prevent this, you can delete the colon from that list: \documentclass{IEEEtran} \usepackage{cite} \providecommand{\CiteMoveChars}{.,;} \begin{document} \markboth{: A}{} : A ...


3

You would use \setlist[mylist]{label=\textbullet,topsep=1ex,itemsep=1em,partopsep=.5ex,...} (no \setlength macros) and whatever you can find in the horizontal/vertical list spacing elements of enumitem.


0

Try replacing Salutation,\ignorespaces% A literal string (no unwanted space appears here) \par\vspace*{\baselineskip}\noindent\ignorespaces\relax%% with Salutation\\[\baselineskip] That will give a blank line after Salutation without interrupting the current paragraph, and should ignore any following white space. Another possibility is that you ...


4

First of all, to obtain centered titles don't do things like \subsection*{\centering{Not too funky situation in my actual document}} but load the package sectsty and issue \allsectionsfont{\centering} Then, to achieve what you want, first of all, change your \setlist to \setlist[itemize]{noitemsep, topsep=0pt, ...


8

Minus sign by default is a binary operator and so will have additional spacing, but this will depend on adjacent atoms so that for example $1-2$ will have space added but $-2$ the - is assumed to be a prefix unary minus and no space is added. If you want to use - as an ordinary symbol denoting a placeholder, you want a \mathord not a \mathbin the simplest ...


4

Add before={\vspace*{-\baselineskip}} to your itemize options: \setlist[itemize]{noitemsep, topsep=0pt, before={\vspace*{-\baselineskip}}} MWE: \documentclass{article} % insert vertical space between paragraphs \setlength{\parskip}{\baselineskip} % Modifies itemized lists with enumitem http://www.ctan.org/pkg/enumitem \usepackage{enumitem} ...


3

Update The subfloatrowsep, floatrowsep keys give you control on the horizontal separation between subfloats (floats) when using floatrow; however, simply using something like \thisfloatsetup{subfloatrowsep=qquad} in your current code will not produce the desired result since you are using \subfloat (from the subfig package). The solution is not to ...


5

The space only appears where you added it: \documentclass{article} \setlength{\parindent}{0pt} \begin{filecontents*}{test.csv} One,Two,Three,Four a,b,c,d a,b,c, a,b,, a,,, \end{filecontents*} \usepackage{datatool} \DTLloaddb{test}{test.csv} \begin{document} \section{Undesired output} \frenchspacing \DTLforeach*{test}{% \One=One, \Two=Two, ...


6

Justified paragraphs are normally set with indentation and hyphenation using a suitable set of hyphenation patterns: \documentclass[a4paper,14pt,final,draft]{extreport} \usepackage[left=3cm,top=2.0cm,right=1.5cm,bottom=2.7cm]{geometry} \usepackage{changepage} %\usepackage[none]{hyphenat} \usepackage{showframe} \usepackage{ragged2e} ...


11

Don't add the formatting of each item in a list manually; let the list formatting take care of itself: \documentclass{article} \usepackage{enumitem} \begin{document} \section{Objective} \begin{itemize}[label=$\cdot$,nosep] \item At the end of this lab you will: \begin{itemize}[label=\textbullet,nosep] \item Add Shift operations and Branch ...


2

You can vertically center the chemical formulas including them in a tabular; some vertical space should also be added between rows. The alignment is not really good for one line \chemfig objects, but it's probably a different problem. \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} ...


3

Using the amsmath definition seems better; I'll also use mathtools for the growing parentheses. \documentclass{article} \usepackage{mathtools} % Here's how amsmath defines \pmod % \newcommand{\pod}[1]{\allowbreak % \if@display\mkern18mu\else\mkern8mu\fi(#1)} % \renewcommand{\pmod}[1]{\pod{{\operator@font mod}\mkern6mu#1}} \makeatletter ...


5

The commands \mod and pmod are intended to be used like x\equiv y\pmod b \qquad x\equiv y\mod c and not in the way you are using them. You probably want a new operator like this: \DeclareMathOperator{\mymod}{mod\,} and then use Bigl and Bigr or similar to have larger parenthesis: \documentclass{article} \usepackage{amsmath} ...


3

The command \mod introduces some hard coded kerning which you see here. You can just define a new command with the kerning you like. However, \pmod keeps this kerning in front of the parentheses. If you want to stick to that, you should do the second approach. Personally, I do not like to use \left(\right) as it makes more harm then help. Therefore, I ...


3

It's the default indentation. As far as LaTeX is concerned, a minipage is just like a big letter. So \begin{minipage} starts a paragraph, if not already inside one. \noindent\begin{minipage}{\textwidth} solves the issue. About the height, I'm not sure what you really want to achieve. For a full page float, you can do like \documentclass{article} ...


0

A much simpler method: instead using \\ for ending a line, use \\[0.5em]


2

Here’s an approach using expl3 \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{ \spacelist }{ m }{ \seq_set_split:Nnn \l_tmpa_seq { ~ } { #1 } \seq_map_inline:Nn \l_tmpa_seq { \fbox { ##1 } } } \ExplSyntaxOff \begin{document} List: \spacelist{Boxes and Spaces in a List} \end{document} The code uses so ...


4

See EDIT at end of answer for support of sqrt index in \displaystyle. \documentclass{article} \usepackage{scalerel} \def\sqrt#1{\stretchrel{\surd}{\left[#1\right]}} \begin{document} \[ \sqrt{x} \quad \sqrt{\frac{x}{y}} \quad \sqrt{\frac{1}{\sqrt{\frac{1}{\sqrt{x}}}}} \] \end{document} The macro \stretchrel takes an optional integer argument indicating ...


6

If you let the \sqrt grow large it might be hard to avoid a horizontal notch at the top, but... \documentclass{article} \usepackage{mathtools} \begin{document} \[ \sqrt{\frac{1}{\sqrt{\frac{1}{\sqrt{x}}}}} \] \newcommand\bsqrt[2][]{% \sqrt[{#1}]{\vphantom{\left[#2\right]}}\left[#2\right]% } \[ \bsqrt{\frac{1}{\bsqrt{\frac{1}{\bsqrt{x}}}}} \] ...


1

You can use \vspace{length} \listfiles \documentclass[oneside,12pt]{scrartcl} \usepackage[ngerman]{babel} %\usepackage{amsmath} \usepackage[fixamsmath,disallowspaces]{mathtools} \begin{document} \noindent \underline{Verschiebare Ger{\"a}te} \begin{equation*} P_j(t,s_j) = \begin{cases} Q_{j,Standby} & \text{for } t < s_j \\ Q_j(t-s_j) ...



Top 50 recent answers are included