Tag Info

Hot answers tagged

7

This would typically be measured from the baseline of one line to the baseline of another, or given by \baselineskip, and depends on the font size loaded/specified as well as the font size current active. For example, with the following \baselineskips are associated with the respective default font sizes loaded with the class: 10pt default font implies a ...


6

\documentclass[a5paper]{article} \usepackage{xcolor} \def\someText{And now follows some text to show the distance of lines. The value is saved in \texttt{\textbackslash baselineskip}.} \begin{document} \the\baselineskip%%% The current distance between two baselines \vbox to 0pt {\hbox to 0pt {\textcolor{red}{\rule[0pt]{1cm}{\baselineskip}}}} \someText ...


6

If you don't need to cope with line breaks, it's just an application of the calc package: \documentclass{article} \usepackage{calc} \newcommand{\printtowidth}[2]{% \makebox[\widthof{#1}]{#2}% } \begin{document} Some words before abc def ghi and some words after. Some words before \printtowidth{abc def ghi}{xyz} and some words after. \end{document} ...


5

To answer your question, in an array or tabular environment, line spacing is done by placing a strut in every row of height and depth given by \arraystretch times the height and depth of the strut produced by an ordinary \strut commmand. Thus, you can get the desired value (under normal circumstances) with something like \newlength\mylen ...


4

You have few options. First one is to add the equation in a row of its own: \documentclass[12pt]{report} \usepackage{amsmath, amssymb, amsthm} \usepackage{lipsum} \usepackage{tikz} \usetikzlibrary{shadows} \newcommand*\squared[1]{\tikz[baseline=(char.base)]{\node[shape=rectangle, draw, inner color = white, drop shadow = {opaque, black}, inner sep=3pt, ...


4

The spacing you are getting is due to the way you have specified the fontsize: the \fontsize arguments are the actual fontsize and the leading which is (roughly) the height of a line. (See What exactly is leading? for extensive discussion.) You've made this 36 pt in your sectioning commands, which means each line is approximately 3 times the character ...


3

This is above all due to the bad syntax in: \titleformat{\section}[block]{\Large\normalfont\bfseries}{#1}{.5em}{} You've put #1 at the place reserved for formatting the label. A correct syntax would be, e.g.: \titleformat{\section}[block]{\Large\normalfont\bfseries}{\arabic{section}.}{.5em}{#1}


3

Apart from reminding about the verse environment (and the package with the same name that provides some enhancements), I want to suggest using a special environment for this: the advantage is greater flexibility. In the example I show that by just modifying the definition of \poet you get a different effect without acting on all poems. ...


3

(I realize your question appears to be about getting equal widths between the columns of a longtable. However, since the intercolumn whitespace is given by 2\tabcolsep, the intercolumn widths are already equal. I therefore interpret your question as being about getting the column widths to be equal.) In the present case, since you're already loading the ...


3

The eqparbox package is perhaps what you're after: it defines variants of the usual box commands, eqparbox, eqmakebox, eqframebox, that accept a tag instead of the width parameter. All boxes with the same tag will have the width of the longest text, and an eqboxwidth{tag} length is defined and can be used in defining the width of another box. If one wants ...


2

You can do it with the package enumitem and set labelsep to zero. \documentclass{article} \usepackage{enumitem} \begin{document} \begin{description}[labelsep=0ex] \item[First]\footnote{Here goes the footnote} lorem ipsum ... \item[Second], which is my second item, lorem ipsum ... \end{description} \end{document}


2

My suggestion would be to use some sectioning command rather than your font-change macro. Perhaps \newcommand{\Largebf}{\subsection*} or the like. Why doesn't \textbf{\Large ...} provide the desired spacing? That's because font switching macros doesn't take the \baselineskip into account unless a \paragraph is set (or a proper \strut is inserted). The ...


1

With amsmath you get the \text{<Text>} macro which is designed for such things. In your case I recommend using mhchem and the \ce{<atoms>} macro. The latter allows easier notation of elements while keeping the right spacing for math symbols (- and / in your example). \documentclass[a4paper]{article} \usepackage{siunitx} \usepackage{amsmath} ...


1

The space between the \firstname and \lastname is set in \makecvtitle. Here's the code from moderncvstylecasual.sty: \renewcommand*{\makecvtitle}{% % recompute lengths (in case we are switching from letter to resume, or vice versa) \recomputecvlengths% % ensure footer with personal information \makecvfooter% % optional picture ...


1

Just for fun with plain TeX's math mode only. \def\dju{\mathbin{\coprod}} \def\id{\mathop{\rm id}} \def\Ga{\hphantom{f()}G} \def\Ha{H\hphantom{g()}} \def\rar#1{\buildrel {#1} \over {\hbox to 4em{\rightarrowfill}}} \def\dar#1{\Bigg\downarrow\rlap{$\scriptstyle#1$}} \def\drar#1{\searrow\raise1ex\rlap{$\scriptstyle#1$}} $$ \matrix{ \Ga\dju \Ha ...



Only top voted, non community-wiki answers of a minimum length are eligible