Add project brief in Doxygen LateX output - latex

How do I add the PROJECT_BRIEF that I defined in the Doxyfile to the LaTeX output? I want it to appear just bellow the project title.
I have tried using
/ref{$projectname}
and
/ref{$projectbrief}
as explained in the doxygen manual, in the LATEX_HEADER section, but it just displays as ??.

In the current version (1.8.13) of doxygen this is not directly possible.
doxygen has the possibility to use a dedicated header, option LATEX_HEADER in the doxygen configuration file. By generating a default header (doxygen -w latex <header> <footer> <stylesheet>), modifying the <header> and using the modified <header> it is possible to accomplish the required functionality.
In the default you will find the line:
{\Large Your title here}\\
replace this with e.g.:
{\Large {$projectname} \\[1ex]\large {$projectnumber} \\[1ex]\large {$projectbrief} }\\
The [1ex] gives some extra vertical spacing between project* items

Related

Export tex document which uses the exam class (Part 2)

I would like to export a text document which uses the exam class to markdown. To do so, I am currently using a workaround which was suggested in this answer, which relies on pseudo-definitions which in turn overwrite the definitions of the exam class such that pandoc can produce a clean markdown file.
Although, the workaround works for the suggested multiple-choice questions, I cannot adopt the solution to work for text with “fillin gaps” such as the document below:
\documentclass[answers]{exam}
\usepackage{minted}
\let\oldpart\part
\renewcommand{\part}[1][]{\oldpart[#1]{}}
\begin{document}
\begin{questions}
\question Exercise 1
\begin{parts}
\part[1] This fills in the \fillin[blanks][3cm]
\end{parts}
\end{questions}
\end{document}
If I use the following pseudo-definitions in a separate file:
% ignore \part
\renewcommand{\part}[0][1]{}
% Treat checkboxes like an itemized list
\newenvironment{checkboxes}{\begin{itemize}}{\end{itemize}}
\renewcommand{\CorrectChoice}{\item ☒ }
\renewcommand{\choice}{\item ☐ }
\renewcommand\fillin[2][{}]{\textbf{#1}}
I get the following broken markdown output
This fills in the **blanks**3cm\]
Moreover is there a way for pandoc to ignore \begin{parts} and \end{parts} so that there are no ::: in the final Markdown file?
The \fillin problem can be solved with
\newcommand{\fillin}[1][1]{\textbf{#1}\noop}
whereas the parts div can be removed with
\newenvironment{parts}{}{}

Define Latex packages in reST file

We used Docutils to produce reST document, and then make a TeX file via rst2latex.
In the rst file, we have added a lot of LaTeX code like:
.. raw:: latex
~\\
\rule{\textwidth}{1pt}
~\\
But I do not know where to add packages like \usepackage{tabulary}.
If I add it in the rst file like I've shown above, even in the very beginning, this \usepackage line is automatically added after \begin{document} in the tex output file. This obviously generates an error.
Any idea where can I add \usepackage commands in reST?
You can use the LaTeX preamble (after Docutils 0.7) by
rst2latex foo.rst foo.tex --latex-preamble="\usepackage{tabulary}"
which will generate the following in foo.html
%%% Custom LaTeX preamble
\usepackage{tabulary}
Alternatively, a custom stylesheet can be provided by
rst2latex foo.rst foo.tex --stylesheet=preamble.tex
which will generate
%%% User specified packages and stylesheets
\input{preamble.tex}
in the right place.

usepackage and making macros in ipython notebook

How can user macros and packages be included in the latex rendered in markdown cells in ipython?
e.g.:
\usepackage{amssymb}
\newcommand{kms}{\ensuremath{\mathrm{km~s}^{-1}}
It is possible to define macros in cells with markdown. Just put the \newcommand between $'s:
$\newcommand{kms}{{\mathrm{km~s}^{-1}}}$
(Note that I removed the \ensuremath command, as it is not accessible.)
In any following statement (in the whole notebook) you can call the macro (in a markdown cell only, of course):
$\kms$
I do not know a way to include extra packages :( If you ever learn how, I would also encourage you to use the siuntx package to format units.
The Html notebook use mathjax to render LaTeX, I suggest reading its doc to know wether it is possible and how.

Set double spacing and line numbers when converting from Markdown to PDF with pandoc

I am using markdown & pandoc for scientific writing, I know I can change margins of the final pdf using
Set margin size when converting from Markdown to PDF with pandoc
but very often the journals require double lines and line numbers in submitted manuscripts, the question is how to change these, I don't know much about LaTex so I am lost in that jungle.
Thanks!
In more recent version of Pandoc, you can use a YAML header and include a bunch of metadata in that, instead of using options on the command line. So, for instance, you can put this at the top of your .md file:
---
title: The Document Title
author:
- Your Name
- Co Author
date: \today{}
geometry: margin=2cm
header-includes:
- \usepackage{setspace}
- \doublespacing
- \usepackage{lineno}
- \linenumbers
---
Document Text
and pandoc will read those options and apply them automatically.
There is maybe an easy way: generate a file with the packages we need
\usepackage{setspace}
\doublespacing
\usepackage[vmargin=1in,hmargin=1in]{geometry}
\usepackage{lineno}
\linenumbers
I named it options.sty. And use the -H FILE option that includes the content of the FILE at the end of the preamble. (as used in https://github.com/karthikram/smb_git)
pandoc -H options.sty --bibliography mypaper.bib mypaper.md -o mypaper.pdf
The advantage is that we don't need to edit the template. To add linenumbers, change margins, and set spacing it works.
You'll need to use a custom LaTeX template. First, use pandoc to create a copy of the default template:
pandoc -D latex > mytemplate.latex
Now edit this template. Somewhere in the preamble (between \documentclass{...} and \begin{document}), insert the lines
\usepackage{setspace}
\doublespacing
Then, to use your custom template:
pandoc --template mytemplate.latex mypaper.txt -o mypaper.tex

LaTeX: Cite, but don't reference

I'm producing a set of documents in LaTeX, and I would like to provide a single, global bibliography page for the whole set. This is because each document is page-limited: I don't want to take up space with references at the bottom of each one.
This means in each case, I would like to cite in the text, but not produce a reference at the end. I am using bibtex/natbib to handle the referencing.
Simplest example:
\documentclass[]{article}
\bibliographystyle{/usr/share/texmf/bibtex/bst/natbib/plainnat.bst}
\usepackage{natbib}
\begin{document}
In \citet*{MEF2010} I described the method.
\bibliography{bibliography.bib}
\end{document}
How can I do this? Essentially I just want it to cite correctly:
In Bloggs, Blagg and Blog (2010) I described the method.
But not add a references section at the end. Any ideas?
Thanks,
David
Instead of using \bibliography{bibliography.bib} you can try \nobibliography{bibliography.bib}.
You still need to enter the path so it can make the cross-references.
It happens due to missing packages. If you want to resolve the problem then enable the automatic installation packet. After that,First, you run the BibTeX file and generate the Pdf file (instead of pdfLatex file) and then pdfLatex to Pdf

Resources