Highlighting a paragraph in LaTeX #2
In my last post regarding this topic I couldn't really find a solution to highlight the background of a a paragraph in LaTeX when it contained block-level elements like citations.
What actually does work exactly as I wanted it to in the first place is using the todonotes package:
\usepackage[bordercolor=white,backgroundcolor=gray!30,linecolor=black,colorinlistoftodos]{todonotes}
\newcommand{\rework}[1]{\todo[color=yellow,inline]{Rework: #1}}
Now marking up a paragraph in \rework{paragraph(s)} results in:
edit: this throws yet another an error
! TeX capacity exceeded, sorry [input stack size=1500].
when the paragraph contains a footnote. Oh well - will have to do for now anyway.
Highlighting a paragraph in LaTeX
edit: see Highlighting a paragraph in LaTeX #2 for a better solution to this.
When writing a text in Microsoft Word I like to highlight sections with a "neon marker" effect to have a clear visual guidance which parts still need some reviewing or for example need additional citations added. So basically this is how it should look in a LaTex generated PDF as well:
Googling for latex highlight paragraph blog posts like e.g. devdaily.com suggest the following approach to highlight a paragraph:
Add the following to your preamble:
\usepackage{color} \newcommand{\hilight}[1]{\colorbox{yellow}{#1}}To highlight text in the body of your document, use
\hilight{this is some highlighted text}There is a problem with the previous method is that the color box does not wrap properly. Here's a much easier and robust way of doing this
\usepackage{soul}To highlight text in the body of your document, use
\hl{this is some highlighted text}
Unfortunately this approach works only if the highlighted paragraph contains no other nested block elements like a \citep tag. If you, like me, use such elements in the text you want to highlight you will get error messages which makes the Soul package quite unusable for the original purpose. Unfortunately I cant offer you a direct solution for this problem, but at least in my case highlighting the text itself (instead of marking up the background of the text) did its job.
For this use Preamble:
\usepackage[usenames,dvipsnames]{color}
\newcommand{\markup}[1]{{\color{Cerulean}{#1}}}
In the text: \markup{whatever text including \citep[p. 5f]{Brügmann.2010} lorem ipsum bla bla}
which results in:
If this causes an error of type option clash for package color you can comment out the /usepackage[][... line and simply include the dvipsnames switch in your global \documentclass options e.g.:
\documentclass[a4paper,oneside,dvipsnames]{book}
Finally for changing the color style in the /markup command see WikiBooks:LaTeX/Colors.
Package natbib error: Bibliography not compatible with author year citation
LaTeX error message upon build:
Natbibbibliography not compatible with author year citation
In my case this was caused by a missing year entry in a bib-entry in Mendeley. This caused something along these lines in bibliography.aux (important is the last line missing a year column):
\bibcite{Wurman.2000}{{27}{2000}{{Wurman}}{{}}}
\bibcite{Wurman2001}{{28}{2001}{{Wurman et~al.}}{{}}}
\bibcite{Xerox2008}{{29}{{Xerox Corporation}}{{}}}
- add the missing year to whatever bib entry is missing that datum (either directly in the .bib file or indirectly in jabref or e.g. mendeley)
- clear your bibliography.aux file
- rebuild
Going Sans-Serif in LaTeX
While I am quite a fan of LaTeX I often had - when looking at LaTeX created documents - the feeling of the general look to be too "latexy". Actually similar to the feeling MS Office 2003 gave with Arial and Office 2007 gives with the omnipresent use of Calibri.
So - if you aren't a die-hard Serif-only evangelist I can recommend the Kepler fonts packaged in kpfonts
\usepackage[largesmallcaps,nofligatures]{kpfonts}
\renewcommand*\familydefault{\sfdefault}
\usepackage{sectsty}
\allsectionsfont{\textothersc}
Result:
Using Mendeley to manage BibTex References and Citations
Mendeley Desktop organizes your research paper collection and citations. It automatically extracts references from documents, generates bibliographies, and is freely available on Windows, Mac OS X and Linux.
Mendeley Web lets you access your research paper library from anywhere, share documents in closed groups, and collaborate on research projects online. It connects you to like-minded academics and puts the latest research trend statistics at your fingertips.
Research papers collected using Mendeley
rss






