margins of book class in latex [closed] - latex

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I would know which are the margins (in meters) top,right,bottom and left, default assigned for bookclass. there is a command or a way to know them?

It depends on whether you want to include the header/footer and possibly even if you use twoside document. Perhaps the following minimal working example can be a start:
\documentclass{book}
\usepackage{layouts}% http://ctan.org/pkg/layouts
\begin{document}
\pagevalues
\end{document}
uses the layouts package to produce
All units are printed in points by default, and there are 0.0351459 points per cm. Note that LaTeX does not use metres as a valid length.

Related

How to delete text in all occurences of a specific tag in Latex [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
In my latex document I have use the tag \sout , to strike out some texts, in many places. Is there a one-shot way to delete the text in all the occurrences of the tag along with the tag ?
You could redefine the way \sout works by including the following in your document preamble:
\renewcommand{\sout}[1]{\unskip}
Here's an example illustrating the effect:
\documentclass{article}
\usepackage{ulem}% http://ctan.org/pkg/ulem
\begin{document}
Here is some \sout{text} stuff.
\renewcommand{\sout}[1]{\unskip}
Here is some \sout{text} stuff.
\end{document}
If you're using an editor that allows for searching with regular expressions, then you could do a find for the regular expression \\sout\{[^\}]+\} (note that this is untested) and replace with an empty string or space.

What can cause \ref{} of LaTex output a [??] [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I include a figure like this
\begin{figure*}
\begin{center}
\includegraphics[width=6.7in]{pic/recall_details.png}
\caption{ Recalls of test query MB002-MB049}
\label{ recall_details}
\end{center}
\end{figure*}
And then I refer it using \ref{recall_details}. Instead of getting numbers like 1, 2, I get ??. Literally I mean ??. What is wrong with my codes? How to make the references show correctly?
You should "compile" your latex code twice to get numbers instead of question marks
The issue is that you're referencing \ref{recalls_details}, but you've defined \label{ recalls_details}. That extra space before recalls_details is what gets you ?? instead of the figure number. You should either change the \ref to \ref{ recalls_details} or the \label to \label{recalls_details}.
On another note, I suggest you add a modifier at the start of the label, such as fig: in this case: \label{fig:recalls_details}. This is useful when you have different types of labels (e.g. to sections, sec:, and to equations, eqn:).
The bottom line is to always use the exact string you give within the \label{} in the relevant \ref{}.

input a figure between title and body in twocolumn latex form [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm using a Latex to write a small paper using CVPR template.
I'd like to put a figure between my title+name and body(which consists with two columns) like many CVPR papers do, but I don't find the way to do that.
I tried,
\begin{figure*}
\begin{center}
\fbox{\rule{0pt}{2in} \rule{.9\linewidth}{0pt}}
\end{center}
\caption{some caption..}
\label{fig:short}
\end{figure*}
but it turned out figure-star only displays it's figure at the top of next page,
and when I just use figure like \begin{figure}[htb], it's only located one of those two columns.
Does anyone know how to put a long figure between my title+name and body context?
Thanks.
You don't mention anything about inserting a date in your title. So, why not use the date to store your image:
\documentclass[twocolumn]{article}
\usepackage{mwe}% http://ctan.org/pkg/mwe
\title{My Title}
\author{A.\ Uthor}
\date{\includegraphics[height=2in]{example-image}}
\begin{document}
\maketitle
\lipsum[1-4]
\end{document}
The mwe package provides the example image (via graphicx) and dummy text (via lipsum).

Tweaking \autoref to behave somewhat like \vref [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I would like to modify the \autoref command in the following way: if the \autoref command and the label are on the same page, it behaves like \autoref* (i.e., no hyperlink). Else, it behaves usually.
Thanks,
Vishnu
If you can use \myautoref instead of \autoref, the following will work as you wished:
\documentclass{article}
\usepackage{lipsum}
\usepackage[pdftex,colorlinks]{hyperref}
\makeatletter
\def\my#setref#1#2#3{%
\ifx#1\relax\protect\G#refundefinedtrue
\else\expandafter#2#1\fi}
\def\pagenum#1{\expandafter\my#setref\csname
r##1\endcsname\#secondoffive{#1}}%
\def\myautoref#1{\def\refnum{\pagenum{#1}}%
\ifnum\refnum=\thepage\relax\autoref*{#1}%
\else\autoref{#1}\fi}
\makeatother
\begin{document}
\section{First}\label{first}
\lipsum[1-3]
\myautoref{first}
\lipsum[4-8]
\myautoref{first}
\end{document}
I had to solve a similaire problem and found something shorter (more easy to understand for me):
\usepackage{ifthen}
\newcommand{\myautoref}[1]{
\ifthenelse%
{\equal{\pageref{#1}}{\thepage}}%
{\autoref*{#1}}%
{\autoref{#1}}
}

How to hide the page number in LaTex on first page of a chapter? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
How to hide the page number on first page of a chapter in LaTeX.
\thispagestyle{empty}
You could also use the titlesec package to get tremendous control over each chapter:
% This is done with the titlesec package
\titleformat{\chapter}[display]
{\normalfont\Large\filcenter} % {fmt}
{\thechapter.\ } % {label}
{1pc} % {sep}
{\vspace{-1in}\enlargethispage{-0.5in}\thispagestyle{empty}} % {before}

Resources