Doxygen LaTeX output paragraph indentation - latex

I have an SW manual that I'm documenting with Doxygen+Markdown, the output being a PDF file. The default Doxygen LaTeX header uses \setlength{\parindent}{0cm}. I tried to change that to \setlength{\parindent}{20pt}, but the output PDF still doesn't have indented paragraphs. I was wondering if I need to change the doxyparagraph style.
Thanks!
EDIT:
I'm using text and other content from Markdown files. Looking at a TeX file from one of these MD files, I can't see anything special(environment, etc) aboout how thery're being defined. In a MD file I have:
### Boot Initialization {#prom_rom_boot_initialization}
The boot ROM performs basic system initialization required for booting the
system. The system initialization consists of the following:
This generates:
\hypertarget{program_rom_chapter_prom_rom_boot_initialization}{}\doxysubsubsection{Boot Initialization}\label{program_rom_chapter_prom_rom_cfx_boot_initialization}
The boot R\+OM performs basic system initialization required for booting the system. The system initialization consists of the following\+:
The doxysubsection is defined in the default Doxygen LaTeX style as:
\newcommand\doxysubsection{\#startsection{subsection}{2}{\z#}%
{-3.25ex\#plus -1ex \#minus -.2ex}%
{1.5ex \#plus .2ex}%
{\raggedright\normalfont\large\bfseries}}
So I tried to do the following in my header:
\renewcommand{\paragraph}{%
\#startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{%
\setlength{\parindent}{20pt}%
\normalfont\normalsize\bfseries\SS#parafont%
}%
}
\renewcommand{\subparagraph}{%
\#startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{%
\setlength{\parindent}{20pt}%
\normalfont\normalsize\bfseries\SS#subparafont%
}%
}
\makeatother
That didn't work.
So I tried setting parindent in my document:
\documentclass[parindent=20pt,10pt,twoside,openany]{book}
And use the ragged2e package. I've added
\usepackage[document]{ragged2e}
\setlength{\RaggedRightParindent}{\parindent}
To my header. And set \parindent=20pt instead of \setlength{\parindent}{0cm}.
I still don't get indented paragraphs.

Related

latex in text citations error: citation undefined

I am wanting to do in text citations for my dissertation. I will upload a simplified version of what i am seeing. The issue is that i keep getting "undefined citations" where i only get the citation key out in my pdf irrespective of which compiler i use.
I also keep getting an error saying that the bibliography is empty. But when my friend uses the exact code i have and copies the references and everything into his overleaf environment it works. I could not get it working with miktex and texmaker. Please help
I have checked a lot of articles of what is available and i swear im following what they are doing but i cant get any further
Initially, my idea is to pull the citations from another file because ill be using these citations in multiple documents. I have successfully setup the .bib file which will update as i add more references to Zotero (my reference manager). I tried to pull citations from the .bib file by coding in the file directory, but no luck there.
I then tried to not use the "file directory approach" and just have a references file in the same folder as the .tex file. But that didnt work either.
my code is as follows:
\documentclass[11pt]{article}
\usepackage{geometry}
\usepackage{latexsym}
\usepackage{graphicx}
\usepackage[style=ieee]{biblatex}
\addbibresource{refs.bib} %%updated from References.bib
%document headings
\title{Practice}
\author{Justin Smith}
\begin{document}
%Cover Page
\maketitle
\textbf{This page represents the cover page}\newline
\textit{Report will begin here}
\thispagestyle{empty}
\pagebreak
%Introduction
\section{Introduction}
The introduction for the report will be inserted here
\pagebreak
%end Introduction
%Literature Survey
\section{Literature Survey}
\subsection{Referencing Examples}
This section serves to use a reference and understand how to implement references as well as generate a reference list at the end of this report.\\
The citation test \cite{schmidtPreprocessingMethodologyEnhance2019}\\
\pagebreak
%Reference List
\section*{Reference List}
%%\bibliographystyle{IEEE}
%%\bibliography{C:/Users66smi/OneDrive/University of Pretoria/Zotero/MyZoteroLibrary.bib}
%%\printbibliography[title = Reference List]
%%\bibliography{MyZoteroLibrary.bib}
\end{document}
EDIT:
Upon trying to do what #celdor initially said said i still run into the same issue. The following screenshots add to the initial question.
Screenshot showing code and issue directly
Screenshot showing Latex "Configure" settings
From the Log file, the following logs detail relevant warnings
LaTeX Warning: Citation 'schmidtPreprocessingMethodologyEnhance2019' on page 3
undefined on input line 36.
Underfull \hbox (badness 10000) in paragraph at lines 36--37
[]
[3]
LaTeX Warning: Empty bibliography on input line 39.
(Latex test.aux)
LaTeX Warning: There were undefined references.
Package biblatex Warning: Please (re)run Biber on the file:
(biblatex) "Latex test"
(biblatex) and rerun LaTeX afterwards.
Package logreq Info: Writing requests to '"Latex test".run.xml'.
\openout1 = `"Latex test.run.xml"'.
)
Extra information:
The following screenshots are of the Project folder
First, latexsym is an old package superseded by amssymb. I looked at the file and its last update was in 1998!
As to your issues, assuming your text file is main.tex, try the following:
Clean your project folder from all auxiliary *.aux; the best way to do that is to issue latexmk -C in your project folder.
Additionally, remove main.bbl
make sure your *.bib file is in the root project folder
add backend=biber to list of options of biblatex.
Then, run:
pdflatex main.tex # or xelatex main.tex or lualatex main.tex etc.
biber main
pdflatex main.tex # see above
Without *.bbl file, the first run of pdflatex does not produce any reference list and latex may issue a warning. With an old *.bbl file, you will get wrong citations. After the whole sequence is executed, main.pdf should have the correct citation and a reference list.
Remember \bibliography is incompatible with biblatex. The correct macro to create bibliography list is \printbibliography. It will issue \section* in article or \chapter* in report/book for a title and format it according to settings in a document class.
Here, I created References.bib with a dummy article:
#ARTICLE{schmidtPreprocessingMethodologyEnhance2019,
author = {Other, Anthony Norman},
title = {Some things I did},
year = {2014},
journal = {J.~Irrep. Res.},
volume = {1},
number = {1},
pages = {1-10}
}
and run the code as suggested, and frankly I get expected results without any errors!
The full code:
\documentclass[11pt]{article}
\usepackage{geometry}
\usepackage{amssymb} %superseds latexsym
\usepackage{graphicx}
\usepackage[backend=biber,style=ieee]{biblatex}
\addbibresource{References.bib}
%document headings
\title{Practice}
\author{Justin Smith}
\begin{document}
%Cover Page
\maketitle
\textbf{This page represents the cover page}\newline
\textit{Report will begin here}
\thispagestyle{empty}
\pagebreak
%Introduction
\section{Introduction}
The introduction for the report will be inserted here
\pagebreak
%end Introduction
%Literature Survey
\section{Literature Survey}
\subsection{Referencing Examples}
This section serves to use a reference and understand how to implement references as well as generate a reference list at the end of this report.\\
The citation test \cite{schmidtPreprocessingMethodologyEnhance2019}\\
\clearpage
\printbibliography[title = Reference List]
\end{document}
and here's the screenshot:
The answer as suggested by #samcarter_is_at_topanswers.xyz
is that I was not using biber.
To do this on textmaker proceed to Options/Configure Textmaker. A configuration window will appear. Under the Commands Window locate "Bib(la)tex" and set the designation to "biber %". This will solve the issue.
Setting Update
A similar procedure can be followed on texstudios
See the below link on how to make sure textmaker uses this setting for reference.
https://tex.stackexchange.com/questions/44040/biblatex-biber-texmaker-miktex
thank you for everyones efforts in solving this problem.

Can anyone tell me something about the doxygen.sty?

I'm using Doxygen to generate PDF document. So I need also make use of LaTeX. I generated the default LaTeX style file, i.e. the doxygen.sty. I want to use the latex package listings to make the code block (wrapped by Doxygen commands #code and #endcode) look better, but when I made changes to this part, LaTeX errosr would appear and no PDF file can be output successfully. Am I wrong somewhere? What's the correct way to add new style in the doxygen.sty? Thanks in advance!
Below are default content in doxygen.sty:
% Used by #code ... #endcode
\newenvironment{DoxyCode}{%
\par%
\scriptsize%
\begin{alltt}%
}{%
\end{alltt}%
\normalsize%
}
Below are changes I made for the DoxyCode environment:
\RequirePackage{listings}
\RequirePackage[table]{xcolor}
...
% Used by #code ... #endcode
\newenvironment{DoxyCode}{%
\par%
\lstset{numbers=left,numberstyle=\tiny}%
\scriptsize%
\begin{lstlisting}[language=C]%
}{%
\end{lstlisting}%
\normalsize%
}

Calligra font with RMarkdown

This is my Rmarkdown code:
---
title: "My Title"
header-includes:
- \usepackage{calligra}
- \usepackage[T1]{fontenc}
output:
pdf_document:
latex_engine: xelatex
---
# Section 1
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
I was studying the best way to change fonts in Rmarkdown. In texlive the installed calligra package appears and calligra-type1 also.
When I run the script with the calligra package it generates the pdf but the font does not match the calligra font.
And when I run the script for calligra-type1 the pdf is not even generated.
Any help, guys?
The calligra.sty does not set-up the Calligra as default font, but you can do so by adding
\renewcommand{\rmdefault}{calligra}
to header-includes.
BTW, there is no need to call fontenc.sty, since calligra.sty does so already. In addition, using xelatex is not necessary here.

Latex: Using variable in sub file when defined in main file

How can I use a variable in the subfile which is defined in the main file?
In the main.tex i include some other files (e. g. the style definitions) as well as I write the revision control and I define a version variable:
main.tex
\usepackage{mystyles}
\begin{versionhistory}
\vhEntry{1.0}{1.1.2011}{abc}{Initial draft}
% allways update the value of the version variable!
\newcommand{\docVersion}{1.5}
\end{versionhistory}
the style file includes:
mystyles.sty
\usepackage{fancyhdr} % better control of header and footer
\pagestyle{fancyplain}
\fancyhf{} % clear default header/footer format
\lfoot{\fancyplain{\thepage \docVersion}{\thepage \docVersion}}
But this does not work. If i define the docVersion variable in mystyles.sty it works fine, but I don't want to modify mystyles.sty when changing the history of the document. So how can I define a variable in main.tex and using it in the subfile?
Thank
Mark
The error was the position of the \newcommandcommand. It must not be inbetween a versionhistory block. So the following works:
main.tex:
\usepackage{mystyles}
\newcommand{\docVersion}{1.5}
\begin{versionhistory}
\vhEntry{1.0}{1.1.2011}{abc}{Initial draft}
% allways update the value of the docVersion variable above!
\end{versionhistory}
and mystyles.sty
\usepackage{fancyhdr} % better control of header and footer
\pagestyle{fancyplain}
\fancyhf{} % clear default header/footer format
\lfoot{\fancyplain{\thepage \docVersion}{\thepage \docVersion}}

doxygen: How to link to an external URL with # (hash) sign?

I am trying to link an URL which contains a # (hash) sign, see upstream code here:
http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_8.2.html#para_4bcb841e-c6bf-4e26-82a5-3fad3c942da0
Everything works as expected with HTML output, but things gets nasty with LaTeX output (PDF). It fails with:
! Illegal parameter number in definition of \Hy#tempa.
<to be read again>
p
l.153 ...ageref{classgdcm_1_1ImageRegionReader}}{}
?
Looking at the generated code, I see:
\href{http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_8.2.html#para_4bcb841e-c6bf-4e26-82a5-3fad3c942da0}
I cannot simply escape the # sign with a backslash since it would break the HTML output (but fix the LaTeX output). I found on the web that including bigfoot before hyperref can solve this sort of issue, but this did not work for me using the following trick in the doxyfile:
## -1650,7 +1650,7 ## PAPER_TYPE = letter
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+EXTRA_PACKAGES = bigfoot
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
# generated LaTeX document. The header should contain everything until the first
Is there anything simple to include a URL with # sign that works for both HTML and LaTeX output ?
EDIT: I found out that doxygen generate the following code:
% Hyperlinks (required, but should be loaded last)
\usepackage{ifpdf}
\ifpdf
\usepackage[pdftex,pagebackref=true]{hyperref}
\else
\usepackage[ps2pdf,pagebackref=true]{hyperref}
\fi
So I cannot explicitly \usepackage{hyperref} after \usepackage{bigfoot} since this creates some sort of conflict.
Package hyperref Message: Driver (autodetected): hpdftex.
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
! LaTeX Error: Option clash for package hyperref.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.101 \else

Resources