# Tag Info

## Hot answers tagged formatting

11

Define an environment within which counter stepping and ToC-writing is disabled. This allows great freedom: \documentclass{article} \usepackage{xparse} \newcounter{savesection} \newcounter{savesubsection} \newcounter{savesubsubsection} \newenvironment{quietsections} {% Store sectional counters \setcounter{savesection}{\value{section}}% \...

7

UPDATE at the end, with automatic restoration of arbitrary counters!!!! Use a dummycounter that resets with the upper section level and \let\c@subsection\c@dummycounter, i.e. explicitly use the count register c@dummycounter instead of c@subsection If this is used inside of the minipage, the \let operation does not leak outside (since minipage is an ...

4

It's still too big really but this will get you started, tabularx does nothing useful here so I removed it. \documentclass[11pt]{article} \usepackage{setspace,amssymb,amsmath} \usepackage[tablename=TABLE,labelsep=newline, aboveskip=0pt,font=bf,justification=centering]{caption} \usepackage{booktabs,tabularx} \usepackage[margin=1in]{geometry} \usepackage[...

4

As the manual says: use \percent for that purpose. Quote from the manual: The \percent macro makes everyone happy. For example \documentclass{article} \usepackage{sagetex} \begin{document} \sage{"\percent.3f"\percent(.1*.1)} \end{document} gives

3

An appropriately-placed patch in the ToC can correct this behaviour. Below I've patched \l@chapter - the macro responsible for setting the chapter-related content in the ToC - and removed \bfseries: \documentclass{report} \usepackage[toc,page,titletoc]{appendix} \usepackage{etoolbox} \makeatletter \g@addto@macro\appendices{% \addtocontents{toc}{\...

3

Using csplain and encTeX: \mubytein=0 \mubyte\Sw Software\endmubyte \mubyte\Sws Softwares\endmubyte \mubyte\sw software\endmubyte \mubyte\sws softwares\endmubyte \def\Sw{{\it Software}} \def\Sws{{\it Softwares}} \def\sw{{\it software}} \def\sws{{\it softwares}} \mubytein=1 Aha, here is software and so softwares. \bye

3

Others have mentioned \percent, and the use of .n(), but I wanted to mention a third way which is a little silly but the method is sometimes useful for more complex formatting. Try something like this: \begin{sagesilent} def twodigits(x): return "%.3f" % x # or, more in the Python 3 spirit: def threedigits(x): return "{:.3f}".format(float(x)) \end{...

3

One of the advantages of using sagetex is that you get Python plus all the other mathematical ability such as graph theory, built in functions, and more. The documentation here explains how to get decimal digits of precision by using .n(digits=k) to get k decimal digits. Note that digits=1 is an exceptional case. \documentclass[12point]{article}% \...

3

You might try something like one of these (note: I have simplified your original .tex file): \documentclass[11pt]{article}% note the change from 11Pt to 11pt \usepackage{hyperref,wasysym,array} % Not needed for minimal working example (MWE): % \usepackage{fancyhdr} % \pagestyle{fancy} % \fancyhf{} % \fancyhead[LE,RO]{ATA-27} % \fancyhead[RE,LO]{Acceptance ...

2

You could put it into a minipage, or use the samepage-package. I've added here the mathtools-package, which I would advice you to use. As commented by David Carlisle, you shouldn't spell out complete words in math-environments, as each individual letter will be typeset as a variable. You could put them in \text{Word}. Code \documentclass[11pt]{article} \...

2

\newcommand*\rub[1] {\begin{center}\large\bfseries\color{red}\fontfamily{pbk}\selectfont#1\end{center}} ... \rub{This text will be centered, boldfaced, colored red and with font pbk'} But since you did not say what you are going to use it for, we don't know if there is a more precise and correct approach.

2


2

Grab the argument supplied to \rub and set it inside a centred box that has the width of \linewidth: \newcommand{\rub}[1]{\noindent\makebox[\linewidth]{\large\bfseries\fontfamily{pbk}\selectfont\color{red}#1}} Here is a minimal example (without the font changes, as it's not part of the discussion): \documentclass{report} \usepackage{xcolor} \...

1


1

I see no problem with the following: \begin{filecontents}{fungie-intro.tex} \chapter*{Introduction} \addcontentsline{toc}{chapter}{Introduction} \lipsum \end{filecontents} \documentclass{report} \usepackage{lipsum} % just for the example \begin{document} \pagenumbering{roman} \tableofcontents \listoftables \listoffigures \cleardoublepage \...

1


1

Here's a method which demonstrates two different approaches: one uses a tabular and the other not. The code: fixes the order of package loading to put hyperref last; eliminates inconsistent layout by reading the console and using geometry with the value fancyhdr provides for headheight; demonstrates how to avoid TeX's complaints about bad boxes while ...

1

Here is a simpler code with enumitem, which has a resume option for lists: \documentclass[a4paper]{article} \usepackage[T2A]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english ,russian,]{babel} \usepackage{amsmath,amsthm,amssymb} % amssymb also loads amsfonts \usepackage[cm]{fullpage} \usepackage{titling} % \usepackage{hyperref} \usepackage{xspace} \...

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