# Tag Info

4

Looking at pgf-umlsd.sty is not so difficult to find that by default, all threads are filled with gray!30. But being an optional parameter you can change it just declaring which color do you prefer: \newthread[white]{c}{:Client}. I've selected white because none draws transparent threads which don't cover the background dotted line. Second question was more ...

0

Typesetting several floats consecutively without allowing non-float material to be inserted as well, irrespective of bad spacing that may result, can be accomplished by loading the float package and using the [H] location specifier for the floats -- e.g., \begin{table}[H] -- in question.

5

If you want to get the correct spacing between \fg and a word following it, you have to add an empty statement {} after it. This because the definition of \fg in frenchb.ldf resorts to the definition of \FB@fg which is \DeclareRobustCommand*{\FB@fg}{\ifdim\lastskip>\z@\unskip\fi \FBguill@spacing\guillemotright\xspace} As you ...

0

One solution is to use tabular's and obtaining captions for them via caption package: http://www.ctan.org/pkg/caption. If it is too absorbing, one can manually use \clearpage after proper tables (Without true data I cannot sugest places). The result will not be too beautiful, but separating tables from text will be achieved.

8

regarding \colon, take a look at the comment in amsmath.pdf just before code line 272: \colon is for a colon in math that resembles a text colon: small space on the left, larger space on the right. The : character by itself is treated as a \mathrel i.e. large, equal spacing on both sides. here the \mathpunct dffectively "disables" the usual ...

10

Well you pretty much said what they do in your question, they make a math atom that has zero width, but which may or may not cause math spacing to be added depending on the class of adjacent atoms. It crops up from time to time eg here Too small space when using \DeclareMathOperator And some people use \mathop{} in their definitions of the differential ...

2

The command responsible for that space is the sectioning command used at the start of the glossary (\section* in your example). This makes it consistent with the structure throughout the rest of the document. By way of illustration: \documentclass[11pt,onecolumn,twoside,draft,titlepage,fleqn,a4paper,openright]{book} \usepackage{titlesec} ...

1

Here is an implementation using the S column construction from siunitx. \documentclass{article} \usepackage{longtable} \usepackage{booktabs} \usepackage[ locale = DE % comma instead of full stop as decimal separator ]{siunitx} \usepackage{polyglossia} \setdefaultlanguage{latvian} \newcommand*\mc[1]{\multicolumn{1}{c}{#1}} \begin{document} ...

4

If you don't want the extra padding, you could use this solution instead which makes use of longtable's caption facilities: \documentclass{article} \usepackage{longtable} \usepackage{polyglossia} \setdefaultlanguage{latvian} \begin{document} \begin{longtable}{ccccc} \caption{Virknes slēguma bezdimensionālie lielumi}\\ \hline ...

3

If I correct for the omitted \\ after \caption. The problem is that LT caption is a \multicolumn and if a spanning cell is wider than the natural width of the cells it spans, TeX puts all the space in the final column. If you add extra padding, things work better. \begin{longtable}{@{\extracolsep{10pt}}ccccc@{}} Or perhaps better align on the ...

3

You can always define a macro \eatpar which would "eat the empty line(s)". However, I don't think that this solution would make the code more readable: \documentclass[twocolumn]{article} \makeatletter \newcommand\eatpar{\@ifnextchar\par{\expandafter\eatpar\@gobble}\relax} \makeatother \begin{document} \begin{enumerate} \item test text ...

7

The blank line causes LaTeX to add \partopsep glue to the inner enumerate. With enumitem it's easy to show that setting this parameter to zero produces identical output: \documentclass{article} \usepackage{enumitem} \setlength{\parindent}{0pt} \begin{document} Normal setting \fbox{\begin{minipage}[t]{.4\textwidth} \begin{enumerate} \item test text ...

7

A blank line in TeX input is a command it is equivalent to \par so you should not put it in places where you don't want to start a new paragraph. Like any command, if you want to put it in the source file for some reason, but don't want it to be executed, then you need to comment it out, but generally it's simpler not to put it there in the first place:-)

6

You can read an entry about this problem in my (now abandoned) blog, why it happens, and how it is solved in spanish babel. But you are using xelatex and polyglossia, and I don't know if some solution is already included in this page. Anyway, it is easy to adapt the ideas and techniques used by babel, and define the following command: \def\raya{% ...

5

TeX doesn't add interline glue between a rule and a box (in either order). So \hrule is what you need: \documentclass{article} \usepackage{chancery} \setlength{\parindent}{0pt} % disable paragraph indentation \newlength{\linesepskip} \setlength{\linesepskip}{1pt} % adjust to suit \newcommand*{\linesep}[1]{% \par\nobreak\vspace{\linesepskip} \hrule ...

2

Maybe some hints from my point of view. I can't understand why you are defining the command \mychapter. I think you can achieve the same with chapter with some modifications: \titleformat{\chapter}[hang]{\centering\normalfont\large\bfseries}{}{0pt}{\large} \renewcommand\thesection{\arabic{section}} \setlength{\cftchapnumwidth}{0pt} ...

3

4


8

the parameter is \mathsurround but it is usually 0pt, but you can use \setlength\mathsurround{2cm} to space things out a bit

7

The following is more of an extended follow-up comment to Przemysław Scherwentl's answer than a new answer. Too long to fit into a "comment" box... Borrowing (stealing?!!) some code from @PaulGaborit's answer to the question Why do all symbols in $x \in X$ have their own baseline?, here's a visualization of the size and positioning of the symbols \epsilon, ...

2

You are partially answering yourself. Because $\epsilon$ and $\in$ are rather similar, a typografic custom says that the latter should be big enough to see the difference. It is not under: it is centered, but big. Let us see: \documentclass{article} \begin{document} $\in<$ $\in\left<\rule{0pt}{3mm}\right.$ \end{document} In the first case \in is ...

2

sloppypar initiates a paragraph, which you can also achieve by leaving a blank line: \documentclass{article} \begin{document} \begin{itemize} \item[about] Foo\\ Lorem ipsum dolor sit amet, consectetur, adipisci velit \item[about] sort rules(...) \begin{sloppypar} Lorem ipsum dolor sit amet, consectetur, adipisci velit ...

3

The dcases environment by »mathtools« from the »mh« bundle seems to be quite handy here. \documentclass[11pt]{article} \usepackage[T1]{fontenc} \usepackage{mathtools} % loads »amsmath« \begin{document} \[ P(Y_i=j)= \begin{dcases} \frac{1}{1+\sum\limits_{k=1}^{K-1}e^{\beta_k\cdot x_i}} & \quad k=K \\ \frac{e^{\beta_j\cdot ...

3

I had no idea that amsmath had such a useful redefinition, so that should be the correct answer (after use of cases). However, for completeness (or if you want more space) you have a few options: reformulate your terms to allow for more vertical leg-room modify \arraystretch to a desired scale (but will cause potentially awkward space on top) use a strut, ...

8

Don't use  for display math. \displaystyle is not needed. Option -1: \documentclass{article} \usepackage{amsmath} \begin{document} \[ P(Y_i = j) = \left\{ \begin{array}{ll} \frac{1}{1+\sum_{k=1}^{K-1}e^{\beta_k\cdot x_i}} & \quad k=K \\[1em] \frac{e^{\beta_j\cdot x_i}}{1+\sum_{k=1}^{K-1}e^{\beta_k\cdot x_i}} & ...

4

as \char32 gives the glyph you want you could do {\catcode\ =12a b c d e f g } but note that is no longer a word space put rather punctuation, so you will disable hyphenation, and space stretching for justification, so it depends on your use case, whether that is an acceptable result.

5

You can, but doing it globally is something I wouldn't dare. The key is to use a modification of Marcin Woliński's TeX Pearl “How to make a box disappear at a line break” I have already used in my answer to Check if at begin of a line \documentclass{article} \usepackage[T1]{fontenc} % or with fontspec \usepackage[polish]{babel} % just because the original ...

5

The package metalogo can help; you can easily define the kerning between pairs of letter; for example \setlogokern{La}{-.18em} will make the kerning between the ‘L’ and the ‘superscript A’ to half the default value. The author has also written mathspec and the package was born from the need of adjusting the logos to different fonts.

6

Your problem is baseline=(#1.east). It should be baseline=(#1.base). Further, you can put xshift inside the coordinates like \tikz[remember picture,overlay] \draw[decorate,decoration={brace,amplitude=3pt},] ([xshift=6mm]select-1.north east) -- node[right=3pt]{$\sum \gamma_t^k \leq 1$} ([xshift=6mm]select-2.south east); Full code: ...

2

The way your MWE is setup makes the problem much harder. The issue is \newrobustcmd*{\hdr}{\rand\rule{1pt}{\therand\p@} The rule is \arabic{rand} points high} means you do not know the height of the header until the header is being typeset. The problem is that if you do not know the height of the header until after the page is typeset, you end up in a ...

8

It seems to be very logical: \og and \fg do add unbreakable spaces. So if you specify them explicitly, it considers you want to have two of them on each side. I think you also can use directly « and » in your code, provided you don't forget to add \usepackage[T1]{fontenc} (and an 8-bit font, not cm fonts). See §9 of the doc for frenchb.

7

This is a question of how tex interprets its input. In \og , \og followed by space, the final space is swallowed as a terminator for the command and no space is printed. In \og~ the ~ inserts a space into the output. This is similar to \og{} , \og{} followed by space, which also inserts a space: \documentclass{article} ...

2

2

Here is a much simpler solution. \documentclass[10pt]{article} \usepackage[margin=2cm]{geometry} % just for the example \usepackage{tikz} \newcommand\Text{Quisque ullamcorper placerat ipsum. Cras nibh. Lorem ipsum dolor sit amet} \newlength{\cellW}% cell width (inner) \setlength{\cellW}{0.2\textwidth} % outer width = inner width + .6666em (initial) ...

2

You can enter a "widthless" box with height equal to 6 lines to that cell: \rule{0pt}{6\baselineskip} By default, however, the bottom of the box is aligned with the baseline of the first line. To top-align the box, one can use the adjustbox package: \adjustbox{valign=t}{\rule{0pt}{6\baselineskip}} Full Code \documentclass[10pt]{article} ...

2

although it's not possible to be sure what is really meant, without a compilable example, this sounds like the align and equation environments are set without any text between, like this: \begin{align} ... \\$$...$$\end{align} $$...$$ this isn't recommended. instead, it's possible to nest an align group within gather: ...

3

I don't know if there's a good way to do this, so I'll suggest a hack and possibly not a particularly good one. The trick is to alternately replace \\ with \crsng and \crdbl. The former is just equivalent to your old \\ and the latter is equivalent to your old \\[6pt]. Introduce the following before \begin{tabular}: \global\let\restorecr=\\ Introduce ...

2

There seems to be problems with the matrix environment, but the array environment seems to do what you seem to want. It would be nice to know what that arrangement is supposed to mean. Anyway: \documentclass{article} \usepackage{proof} \begin{document} \infer{D}{\begin{array}{@{}c@{}c@{}c@{}} &A&\\B&&C\end{array}} \end{document} produces ...

0

One solution is to put the title into a flushleft, center or flushright environment as you desire the alignment. \documentclass{scrbook} \begin{document} \begin{flushleft} \LARGE Very \\ Long \\ Title \end{flushleft} \begin{center} \LARGE Very \\ Long \\ Title \end{center} \begin{flushright} \LARGE Very \\ Long \\ Title \end{flushright} \end{document}

5

Each entry between line breaks inside the gather environment are placed inside a group. To that end, the scope of \renewcommand{\arraystretch}{1.2} only lasts until the end \\, after which you have to issue it again. A very similar problem is showcased when you use, for example \documentclass{article} \begin{document} \begin{tabular}{c} \bfseries ABC ...

1


3

Read Enrico's comments above: Vertical space at the beginning of pages is removed. That should answer your first question. Coming to the second question, it is possible. I will show at least two ways. Method -1: Load graphicx package and use its scalebox macro like: \titleformat{\section}[display] ...

1

some what similar question had been asked before: Vertical space in lists a possible idea could be if you want to use enumerate: \documentclass[12pt]{report} \usepackage{paralist} \let\itemize\compactitem \let\enditemize\endcompactitem \let\enumerate\compactenum \let\endenumerate\endcompactenum \let\description\compactdesc ...

9

(it seems this works everywhere apart from acrobat reader) This is based on the example by @DavidCarlisle. The cmtt visible space character seems to be labelled differently in different cmtt variants. For cm-super (which is loaded here when I use \usepackage[T1]{fontenc}), the respective character is named uni2423 which seems to cause problems with evince ...

1

An quick fix without using package is to add a negative length to \abovecaptionskip{-<dimension>} and \belowcaptionskip{-<dimension>}` which adjust the vertical space before and after the caption, as shown below. \documentclass[a4paper]{article} \usepackage{lipsum} % for dummy text only \usepackage{tikz} % for TikZ drawing ...

2

This may be simpler: \documentclass{article} \usepackage{xeCJK} \setCJKmainfont{SimSun} \punctstyle{plain} \def\CJKpunctsymbol#1{\raise-1ex\hbox to 0pt{\kern-.1em#1}} \begin{document} 道、可道也。非恒道也。 \end{document}

1

This is easiest to do with the enumitem package. You can either specify topsep=0pt or probably better nosep which will also reduce the vertical spacing between items: \documentclass{article} \usepackage[shortlabels]{enumitem} \begin{document} This is first line and i need to remove space between this line and item list below it. ...

0

Use the caption package and reduce the skip with belowskip. \documentclass[a4paper]{article} \usepackage{lipsum} % for dummy text only \usepackage{tikz} % for TikZ drawing \usepackage[belowskip=-20pt]{caption} % reduce/increase the skip after the figure with belowskip \begin{document} \lipsum The system architecture is shown in ...

4

You can use a doubled tilde ~~ to get two spaces. But maybe \enskip can help too or you define a command, like \ds (for double space) to be flexible in future if you want to change the width of the doubled space. \documentclass{article} \newcommand{\ds}{~~} \begin{document} H H (normal Space) H~~H (doubled Space with \verb+~~+, double Tilde) H\ds H ...

11

The notion of a double space is very poorly defined and if you try to use it to denote any meaning to the reader it will be massively confusing. TeX is not a typewriter, spaces do not have fixed length they stretch and shrink to adjust words to help with line breaking so words which have a single space between them in the source may already be separated by ...

Top 50 recent answers are included