# Tag Info

81

Personally, I like the look of C\texttt{++} the best. It's also very simple!

76

amsthm has three separate predefined styles: \theoremstyle{plain} is the default. it sets the text in italic and adds extra space above and below the \newtheorems listed below it in the input. it is recommended for theorems, corollaries, lemmas, propositions, conjectures, criteria, and (possibly; depends on the subject area) algorithms. \theoremstyle{...

70

You are most likely referring to small caps: \textsc{First Letter} or {\scshape First Letter}

68

Although this question is quite old (only found it because lockstep reactivated it) it’s maybe worth to add this information. For my lectures on LaTeX I use the following image to explain the way LaTeX categorizes the different characteristics of printed material. 1. Encoding The first thing to select is how the font is encoded in it’s file(s), that means ...

68

edit: As noted by @Sean Allred, datetime has been superseded by datetime2. Using the package datetime with the option yyyymmdd as \usepackage[yyyymmdd]{datetime} you just change the value of \dateseparator to replace the default / by - (or -- if you want). \renewcommand{\dateseparator}{--} Also as noted by @Vincent, you can define your own date format.

66

I know this question is old and surely OP doesn't need it anymore, but recently I had similar problem and I think my solution answers the question. First thing to note is that in Mathematica FrontEnd cells can have arbitrary styles. Each styles appearance is customizable by a stylesheet. With default stylesheet even most basic cell styles i.e. Input and ...

60

Numbers can be used in a printed document in two different meanings: as symbols representing mathematical objects (note that “1” is not “the number one”, but one of its possible representations, hence a symbol) or words. A number used in the second meaning is, for instance, a date or the reference to a page. Mathematical symbols should have the same shape ...

58

An alternative to nth package is fmtcount. In this case the command is \ordinalnum. By default the ordinal is formatted as superscript, but this is optional, as it is also in nth: \usepackage{fmtcount} % equivalent to \usepackage[super]{nth} \usepackage[level]{fmtcount} % equivalent to \usepackage{nth} But there are some advantages over nth: Limited ...

58

\underline{<stuff>} underlines a box containing <stuff>. However, this also implies that <stuff> with descenders pushes the underline lower. \smash{<stuff>} removes any depth (and height) from <stuff>, allowing for the regular non-descender depth of the underline: \underline{\smash{<stuff>}} Alternatively, the soul ...

55

We could do for each letter: Produce the underlining Overwrite the line with the same but bolder letter or with a left and right shifted one, but in background or white color Write the letter So we would get an underline with matching gaps. Here I modified the soul approach of Marco in this way, just for a demonstration what I mean, which could be ...

55

There are many ways to do this. Please review Herbert Voss's comprehensive review of mathematics in (La)TeX But, one way is to use the align environment from the amsmath package: Another option to consider is to use \intertext (or \shortintertext from the mathtools package which yields tighter spacing): Code: align: \documentclass{article} \usepackage{...

54

Since LaTeX is meant primarily intended for printed text I would strongly recommend you to not use e.g. grey background, but just use a typewriter font, e.g. The class \texttt{List.class} is \ldots You can and should wrap this in a new command to be free to change the visual appearance later, e.g. \newcommand{\code}[1]{\texttt{#1}} so you can use a form ...

54

Internally \url uses \UrlFont. You can change it with \urlstyle (see the documentation of url in url.sty) or by redefining \UrlFont: \documentclass{memoir} \usepackage{hyperref,xcolor} \begin{document} Lala \url{www.example.com}. \urlstyle{sf} Lala \url{www.example.com}. \renewcommand\UrlFont{\color{red}\rmfamily\itshape} Lala \url{www.example.com}. \end{...

49

Let's construct what you're after: 12 point text font For this you can pass a 12pt option to the document class. For example, use \documentclass[12pt]{book} Times New Roman font While there is no actual Times New Roman font in native LaTeX, the closest you'll get is by adding the mathptmx package \usepackage{mathptmx} or the newtx bundle \usepackage{...

48

Normally you would use \, for a thin space $1\,000\,000$ If you are entering that by hand. As noted in the comments siunitx or other packages have the ability to parse the bare number 1000000 and then format it according to formatting parameters with commas or thin spaces, so it depends what you want to do (and where the numbers are generated). Whether it is ...

46

Hmm, I just posted this as an answer to another question, but just as I was posting, that question was closed—with a referral here. So I'll throw in my 2¢ here... The reason I don't like \it and \bf is that they do not play well together. That is, they do not nest as one would intuitively expect: Whereas \textit and \textbf do play well together: This ...

45

I can speak of a real experience with .doc to .tex conversion. The simple rule I have observed is: 5-10 minutes a page, if things go fluently. What exactly is fluently (and how much more do the non-fluent things take): no complicated math, i.e. no large matrices, no equations to be broken to multiple lines etc. (add 5-20 minutes per one complicated ...

39

Here's one possible solution using the background package; the \BoxColor command uses a simple \ifcase to select the colors to be used; use \chapFrame after each \chapter command (this can be automated). The code needs at three runs to stabilize. Based on the comments, the position of the colored box has to alternate for odd and even pages; here's the ...

37

In addition to the previous answers, a further reason might be that at some later point you consider changing fonts. It may happen that you end up choosing a font that uses different numerals for mathematical and ordinary text, or that you are even choosing different fonts for mathematical text and for ordinary text. This actually happened to Don Knuth, see ...

36

My solution needs no packages. The only thing you need to know is that the primitive registers \day, \month and \year include the desired information: \def\mydate{\leavevmode\hbox{\the\year-\twodigits\month-\twodigits\day}} \def\twodigits#1{\ifnum#1<10 0\fi\the#1} The date in my format: \mydate.

35

You can use display math environment such as equation: Notes: The d in dt should be upright as d is an operator, not a variable. Have defined a macro for that and corrected it below. References: You should not use a the TeX way of using a $$to enter display math. See Why is $...$ preferable to$$ ... ? An excellent reference for math mode is ...

35

Use \href instead: \documentclass{article} \usepackage{hyperref} \begin{document} \href{http://www.example.com}{\textit{www.example.com}}. \end{document} This takes two arguments: the first is the actual url, the second is the link text. The above code produces

35

Her's one possibility using the caption package; using the width key you can assign a predefined width (0.8\textwidth in my example): \documentclass{article} \usepackage{caption} \usepackage{lipsum} \begin{document} \lipsum[2] \begin{figure} \captionsetup{width=0.8\textwidth} \centering A Figure \caption{\protect\lipsum[4]} \end{figure} \end{document} ...

34

This is a simple solution: \usepackage[figurename=Fig.]{caption} Works with and without babel. Use tablename for tables.

34

You could use the cleveref package and redefine \crefname{section}: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{cleveref} \crefname{section}{§}{§§} \Crefname{section}{§}{§§} \begin{document} \section{foo}\label{sec:foo} Some text. \section{bar} As explained in \cref{sec:foo}~\dots \end{document}

34

I beg to disagree with some of the opinions expressed in the linked page. The list of commands to avoid doesn't distinguish between commands to avoid at all costs and ones that should be used to define personal macros in the preamble, for instance; some of the commands listed do have their place in a document body. Note The following should not be taken as "...

33