Disable page numbering converting markdown to pdf with pandoc [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 9 years ago.
Improve this question
I am converting a markdown file to pdf using pandoc. How can I suppress page numbers in the pdf file?

I will answer my own question here:
I learned in this post that pandoc markdown understands standard latex commands. Take for example the following markdown file called test.md:
% A pdf file without page numbers created from pandoc markdown
% sieste
% June 2013
\pagenumbering{gobble}
# First header
etc
and the command
pandoc test.md -o test.pdf
produces the desired pdf without page numbers.
I tried to use \pagestyle{empty} at first, but it did not work: If I put it where \pagenumbering{gobble} is now, page numbering is only turned off from page 2 on, and the first page is still numbered. And if I put it before the title block, the title in the pdf is messed up.

Related

Latex Hyperref with Pagenumber [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
i want to use hyperref in my latex document to link to labels
and i want to show the page number of the label.
so for example:
\label{subsubsec:foo}
\hyperref[subsubsec:foo]{See foo on page ???}
How can i get the page number of the label?
First note that hypperef is only used to create hyperlink in PDF document (see https://en.wikibooks.org/wiki/LaTeX/Hyperlinks ).
In order to get the page number of a label, use the \pageref command and provide it the name of the label as first argument (see https://en.wikibooks.org/wiki/LaTeX/Labels_and_Cross-referencing ).
Your code should be:
\usepackage{hyperref}
[...]
\label{subsubsec:foo}
[...]
See foo on page \pageref{subsubsec:foo}
As a consequence of the inclusion of the hypperef package, hyperlinks will be present in the generated PDF document.

How to keep symbols, slash, ... in your document? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I want to keep all the symbols in my following text in LaTeX. but I don't know which syntax I should use to keep them. Can anybody give a suggestion?
/forest # search for forest
/<\/way> # find the tag </way>
v # start the visual mode
?<way # find the begin of the tag -> mark <way> until </way>
D # delete that tag
Just put them in verbatim environment, like this:
\begin{verbatim}
...
things you want to keep them as is
...
\end{verbatim}
For inline mode, you can use \verb command:
\verb=...things you want to keep them as is...=
Check out here for more info:
[...] If you use the verbatim environment, everything input between the begin and end commands are processed as if by a typewriter. All spaces and new lines are reproduced as given, and the text is displayed in an appropriate fixed-width font. Any LaTeX command will be ignored and handled as plain text. This is ideal for typesetting program source code. [...]

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.

Ghostscript 9.07: Error: A pdfmark destimation ... points beyond the last page [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 use gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dFirstPage=$2 -dLastPage=$3 -sOUTPUTFILE=$4 $1 in a script to extract pages from a pdf file with Ghostscript 9.07. I obtain a lot of warnings (as in the first row in the following output) and one error:
GPL Ghostscript 9.07: **** Warning: Outline has invalid link that was discarded.
GPL Ghostscript 9.07: ERROR: A pdfmark destination page 4 points beyond the last page 3.
The resulting pdf (consisting of the extracted pages) is fine, however. I am wondering why I obtain this error and the warnings although I chose the option -q for quiet. I did some search on that and found, for example, this, but the pdf file is already generated with hypertexnames=false and so the suggested solution there does not work in my case (Ubuntu 13.04).
Just to add: The .pdf file is generated via pdflatex from:
\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage{tikz}
\usepackage{hyperref}
\begin{document}
\tikz[remember picture, overlay]\node at (current page.south)[rectangle, fill, color=gray]{};
\clearpage
\section{foo}
\clearpage
\tableofcontents
\clearpage
\section{bar}
foo bar
\end{document}
The original file contains named destinations (in this case the Outline tree) which point to a numbered page which will not be present in the final output file (because you have not chosen to include all the pages).
The destinations are therefore elided, which is why your output file works, and a warning is generated to tell you that some requested destinations will not be present.
The pdfwrite device pretty much ignores -q for these kinds of warnings, as we think they are important.

citep and citet not working even when using natbib package [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 am writing a document in latex and I have a big .bib file and a large number of citations.
I want to have citations in the form [Author, year] format and am using the package natbib, but can't get citep or citet working, though plain cite is working fine. The error I get is:
! Undefined control sequence.
l.3 lets cite \citet{cayton05}
I am using Ubuntu texlive package and use \input{<file>} latex command to input the chapters to the main .tex file.
What's surprising is that instead of using \input{<file>} if I just have text in the main .tex file then all the cite commands are working.
Any help would be highly appreciated.
The working version is like this:
\usepackage{cite}
\usepackage[square,sort]{natbib}
%% lot of other packages and formatting %%
\begin{document}
\chapter{Testing citations}
\begin{enumerate}
\item this is the first citation \cite{belkin02}.
\item this is the second citation \citep{belkin02}.
\item this is the third citation \cite{shlens03}.
\end{enumerate}
\phantomsection\addcontentsline{toc}{chapter}{Bibliography}
\begin{spacing}{1.5}
\nocite{*}
\bibliographystyle{apalike}
\bibliography{testnb.bib}
\end{spacing}
\end{document}
In the real .tex file, I input the chapter text from another .tex file, and citep and citet won't work in that giving the aforesaid error, though plain cite will work fine.
I forgot to mention earlier I was using plain numbered bibliography style and everything was working, so there is no error in the input .tex files.
If \citep and \citet do not work, then you probably did not load natbib.
From a document I currently work on:
\usepackage[authoryear,round,longnamesfirst]{natbib}
You may want different options -- see the handy reference sheet for natbib for details.
You should only include \usepackage[square,sort]{natbib}.
It will work after deleting \usepackage{cite}.

Resources