{formatting} is for general questions about formatting document elements. Use this tag in addition to other tags specifying what should be formatted. For questions about font attributes (e.g., {bold}, {italic}, {small-caps}, {sans-serif}, {typewriter}), use the appropriate tag instead.
4
votes
2answers
81 views
Limit scope of formatting to within command
I wanted to generate a cover page for a tech report and so put the following in my preamble
\makeatletter
\newcommand{\coverpage}{\onecolumn \centering \large
\thispagestyle{empty}
...
4
votes
1answer
53 views
Command for the abbreviated author [duplicate]
I'm writing a beamer document, and using the following definition for author
\author[O. Castillo]{Oscar Castillo}
As far as I know, \@author returns the value Oscar Castillo
Question
Is there a ...
1
vote
1answer
83 views
Making Back-Referencing More Pretty
The question Back-referencing in LaTeX was marked a duplicate, so I can't post to that thread. Nonetheless, I found the code provided there by Ryan Reich to be a good learning exercise. His solution ...
1
vote
1answer
54 views
Is there a theorem style with slanted headfont?
I would like to create a theorem style with slanted text in heads. What's the way?
I tried with the thmtools package by
\declaretheoremstyle[headfont=\textsl]{slantedhead}
...
18
votes
1answer
173 views
Sloppy \left and \right?
The \left and \right commands often produce improvidently large delimiters. It almost always looks better to use delimiters that are just slightly too small than delimiters that are too large. With ...
5
votes
1answer
142 views
Omit zeros before the decimal point and convert scientific notation in siunitx/pgfmath
I'm trying to automatically format numbers in a way that doesn't convert say .8 to 0.8 while at the same time scientific notation is converted to exponent-free notation. siunitx seems to be able to do ...
2
votes
1answer
91 views
Can we have viewer specific text in a pdf generated by pdfLaTex?
I am wondering if we could have a pdf file, which can tell what viewer its being viewed with. I was looking for some tex command, which says something like:
If viewer is Acrobat, print "Hi You are ...
3
votes
1answer
62 views
Overlapping columns in xymatrix
I have the following diagram:
\documentclass{article}
\usepackage{xypic,amsmath}
\DeclareMathOperator{\coker}{coker}
\DeclareMathOperator{\im}{im}
\newcommand{\subU}[1]{\left.#1\right|_U}
...
4
votes
1answer
57 views
Building chemical “ICE” tables with tabular environment
I am starting to write my chemistry lab reports out in LaTeX, but keep getting stuck on the "ICE" tables (see the LaTeX example below).
I can't figure out how to get the + and \rightleftharpoons in ...
6
votes
1answer
73 views
section numbering format
I am trying to format a legal document so that it follows this format.
Article 1.
1.01 First section
bla bla bla
1.02 Second section
bla bla bla
etcetera.
I tried using this to get ...
0
votes
0answers
51 views
Move address to the right and recipient to the left in a letter
I wanted to try to write letters in LaTeX but the problem about the layout of the letter is the fact that the sender's address is on the left and the recipient on the right but in French it is ...
1
vote
0answers
38 views
Space between a|b in math mode? [duplicate]
For a context free grammar I need to write:
A -> a | b
My code for this is
$ A \rightarrow a | b $
however this gives me something like
A -> a|b // wanted: a | b, note the space before ...
1
vote
2answers
93 views
Tables together
I want to put the following table together with a other similar table in two columns
\begin{table}[h]
\centering
{\fontfamily{ptm}\selectfont{
\rowcolors{1}{}{gray!20}
\begin{tabular}{cc}
...
0
votes
0answers
74 views
Change font of subsection in the Table of Contents [closed]
I changed my entire document to sffamily font, and the only thing that still appears in the default font are the subsections in the Table of Contents. In the text, subsections are the correct font. ...
2
votes
1answer
113 views
General Formatting Problems
I have started to learn LaTeX on my own, but as you will see the general formatting has lots of mistakes. I have tried my best but would really appreciate some help, here is the text:
...
1
vote
1answer
52 views
Consecutive longtables giving “…alignment error…”
in the appendices of my thesis I have two long tables for which I use the longtable package. Separately they work fine, no errors, but when I have after each other I get errors such as:
Extra ...
3
votes
1answer
119 views
Omit hanging indent in bibtex
I use \bibliographystyle{alpha} with bibtex (not biblatex). The document class is scrreprt. The output looks like
[Abc07] Example Abc. The title and all other stuff.
dddd. 2007.
[Bcd08] Ex ...
1
vote
1answer
96 views
Typeset a number in hexdecimal format (preferably math mode)
Is there a macro for formatting numbers in programming style 0x hex notation, e.g. instead of -1155484576 have 0xbb20b460. I would like to embed these numbers in a math mode context.
E.g. if I just ...
9
votes
2answers
247 views
Two code blocks working syncronously
I need two code blocks in my beamer frame. One will be the code and other will be the output for each line of code.
I want to uncover each code line and corresponding output line.
So, first it will ...
1
vote
2answers
132 views
Can anyone solve my error and make the long multiline equation multiline please?
In case it matters, I'm using win edit as editor.
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}\usepackage{amssymb}
\textwidth=16.5cm \oddsidemargin=-0.10cm \evensidemargin=-0.10cm ...
0
votes
1answer
51 views
Headline with different fonts, and numeration
I need to add to my work headline of the next form:
Author Name normal font, size 10 pkt
In the next line name of work, size 10 pkt, italic.
At right side page number, bold, italic, 14 pkt.
After that ...
4
votes
3answers
139 views
Best way to present plain text results in a tex file?
I have some plain text results that I want to include into my bachelor thesis. The output looks like this:
Protein: noname Length: 611 N-terminus: OUT Number of transmembrane
helices: 3 ...
2
votes
1answer
246 views
Algorithm2e modify line numbers
I'm using the LaTeX algorithm2e package by defining
\usepackage[ruled, linesnumbered, vlined]{algorithm2e}
The linesnumbered argument adds lines numbers from [1,...,n] if we have an algorithm with ...
23
votes
7answers
848 views
How long does it take to format a book in LaTeX?
I am new to this website and I hope this is not considered off topic but how long does it take to format a book in LaTeX?
I understand this is a subjective question but maybe the "specs" of the book ...
2
votes
1answer
106 views
How to set italics and bold shortcuts like *bold* or _italic_
I remember seeing a possible solution here, but can't find it.
Is there any way to simplify bold and italics so that instead of \textbf{bold text} and \textit{italics text} I use simple marks like ...
5
votes
1answer
78 views
Endnotes do not be superscript and add a space
See my picture.
Also I want to add a space between the number and note. Besides writing \endnote{ hello}, are there any formal way?
This is my source code.
\documentclass{article}
...
0
votes
0answers
53 views
Image Centering in StackExchange Question Editor [closed]
Is there a way to center an image or a body of text for a StackExchange (Mathematics) question? I've been using $\hspace{2in}$ to accomplish this, but perhaps there is another way.
1
vote
1answer
56 views
How to change font of reference header into boldface using apacite
I am relatively new to latex, most things work however amazingly easily, nevertheless I have a small problem with the the font of the reference header. The start of my code looks like:
...
2
votes
1answer
96 views
How to define HTML keywords in \listings
I'm working on the implementation of a HTML5 code style for \listings.
Currently I have the problem that there are different ways to define HTML tags. In my example, I don't get /p in ...
5
votes
2answers
134 views
tabular numbers in tables, proportional in text
I'm using LuaTeX with a font that has proportional, lining and tabular numbers available.
Is it possible to set things up so tables automatically use tabular numbers - but proportional numbers are ...
5
votes
1answer
93 views
How to use alsolanguage in \listings package?
I defined keywords for the JavaScript programming language and HTML.
I have read that it is possible to use the keywords of both languages in a \listings code snippet. But in my example, the ...
3
votes
1answer
40 views
Statement (\STATE) indentation in Algorithmic package
I have the following code,
\documentclass[]{memoir}
\usepackage[utf8x]{inputenc}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{algorithmic}
...
10
votes
1answer
455 views
\listings code style for HTML5 (CSS, HTML, JavaScript)
I would like to create a code style for HTML5 that can be used with the \listings package.
An HTML5 document consists of three languages: CSS, HTML and JavaScript. That makes the whole thing a bit ...
5
votes
1answer
91 views
How to center the last line of a paragraph?
I am trying to center the last line of each paragraph to keep with an old style typesetting. I tried using the example by Gonzalo Medina in How to center text without adding space AND not altering ...
2
votes
1answer
207 views
fancy chapter title page for entire document
How to enable this style as well for TOC and bibliographypage ?
Note that, I'm using scrreprt document class
3
votes
2answers
190 views
LaTeX Capabilities: Complicated and Important Equations
As I am introducing LaTeX to an audience, I'd like to show how it can render equations beautifully. As such, I'd like one equation (math/physics) that combines many different formatting requirements, ...
2
votes
2answers
127 views
How to reformat Algorithm in memoir document class?
I'm trying to typeset algorithms in the memoir class. I'm using the algorithmic package with a custom environment as this was the only way I could get the list of algorithm to display correctly in the ...
3
votes
3answers
171 views
Enumeration with several items per line, several lines and nicely formatted
Based on Alan's answer here, I would like to be able to create nicely formatted "inline" enumerated lists.
The issue I have is that the space between items on a line is always fixed, which does not ...
3
votes
2answers
206 views
importing latex table code into lyx
I create tables in a spreadsheet program, convert them to latex code and then use an ERT to import into my lyx document. When I paste the latex code the entire thing turns out very ugly looking. The ...
3
votes
1answer
154 views
Using \scshape and \bfseries together
A very obvious one I suspect, but when I try to do the following the small caps are over-ruled by the boldface, so I get lowercase rhubarb rhubarb. Is there an easy way to get \scshape\bfseries?
...
2
votes
2answers
87 views
xwatermark package: help using small caps and putting watermark on top of text
Hi in the linked question I asked how best to use AtBegShi to put titles on to of a page as a title. I'm using these as the equivalent of an MS Word textbox at the top of each page that carries the ...
7
votes
2answers
109 views
Reorder sections based on a variable?
I have a CV I've created in LaTeX (using the moderncv package).
I'm trying to create flavors of the CV based on variables. What I would like to do is to generate the sections in a different order.
...
2
votes
2answers
75 views
How to remove the chapter number from section number? [duplicate]
I use Roman for Chapter numbers, and I don't want sections to be numbered as VIII.2 (while I still want sections to be numbered within chapters). How do I do that?
i.e. instead of VIII.2 sections ...
0
votes
1answer
137 views
Setting single row height with multirow
I have a table in LyX document. And I'm using multirow to span text across multiple rows. For example I might want the text to span across 2 rows, the problem occurs when it doesn't fit, then it just ...
1
vote
1answer
101 views
Special chapter title formatting
Using the book class. I would like to have chapter titles that look like this:
| CHAPTER ## |
| Chapter Title (italic) |
Can titlesec do this?
1
vote
2answers
60 views
Making text in {braces} of an \item appear bold
Is it possible to redefine \item to have the text in braces appear bold?
\documentclass{article}
\begin{document}
\begin{itemize}
\item{Paper}: a white substance used for writing symbols.
...
0
votes
0answers
72 views
Should I use the achemso class or the chemstyle package for a journal submission? [closed]
Which is recommended for use with journal submission within the United States?
3
votes
1answer
119 views
How to apply formatting (sans-serif, color etc.) to multiple paragraphs?
Some LaTeX formatting commands like \textcolor{red}{...}, \sout{...} or \textsf{...} work fine when the thing inside is a single paragraph but fail to compile if you put a paragraph break in the ...
3
votes
1answer
194 views
Changing formatting of URL in biblatex \footcite
I've switched from bibtex to biblatex due to having to use \footcite based on university's requirements for writing a report. It may be worth noting that I'm also very new to (La)TeX.
I'm only having ...
5
votes
2answers
239 views
Modify default memoir chapter style
I'm using memoir and using its default chapter style.
what I'm looking to do is to change the format from
chapter 1
chapter title
to something like this:
chapter 1: chapter title
I'm ...
