I was using the package soul to highlight text. It is pretty good, except for the fact that I get errors when I try to highlight a block of text with references or a citation. For example:  \hl{\citet{stuff} some text...}   gives  ! Argument of \@citex has an extra }.
120522
I want to highlight changes which are introduced by myself in the pdf document. So far the soul package is very neat but it does throw errors when I want to highlight not only paragraphs but also some itemize environments, and I don't want to highlight the items separately. Also the \cite{...} command is not supported by \hl. I recently posted a slightly different question:   BTW: What I liked most over other approaches like pdfcomments etc. is that the \hl command from soul has a very exact and clear output, no icons, no clicking etc. involved. Together with todonotes it's very good and almost all I need.
63253
I have a Tex file that I need to edit while somehow keeping the original words and sentences highlighted. To do this, I am going to cross out the part of the original text that I replace with my own words. The command \st{TEXT} in the package soul seems to do the job. I'm looking for a way to define a macro in TeXstudio such that by selecting the text, the cross out command encapsulate the text, i.e. \st{THE_SELECTED_TEXT}. I am not familiar with macro programming in TeXstudio.
52749
The solution outlined for each of the following two posts appears to conflict with the hyperref package.         Here is a MWE.  The desired output for the example is  1. Outer 2.1. This is line 2.1, in block 2.  2.2. Inner again 3. Outer again 4. Let’s end here   This output is indeed produced by the LaTeX source below, but if I uncomment the \usepackage{hyperref} line in the header, LaTeX gives me an error just after the \skipitem command, as described in the inline comment below:  \documentclass{article}  % \usepackage{hyperref} % if we uncomment the above line, we get an error as described below  \usepackage{enumitem}  \newlist{steps}{enumerate}{9} \setlist[steps]{itemindent=0pt} \setlist[steps,1]{label=\arabic*.,ref=\arabic*} \setlist[steps,2]{label=\arabic{stepsi}.\arabic*.,ref=\arabic{stepsi}.\arabic*}  \makeatletter \newcommand{\skipitem}{\refstepcounter{\@enumctr}} \makeatother  \begin{document} \begin{steps} \item Outer   \skipitem   % If we uncomment the \usepackage{hyperref} line in the header,   % we get the following error after the \skipitem above   %    % ./tmp.tex:20: Missing number, treated as zero.   % &lt;to be read again&gt;    %   \c@0.0ptxcii    % l.20   \skipitem   % \item[] \label{blockA}   \label{blockA}\item[]   \begin{steps}   \item\label{lineB} This is line~\ref{lineB}, in block~\ref{blockA}.   \item Inner again   \end{steps} \item Outer again \item Let's end here \end{steps}  \end{document}   Can someone help me work around this conflict, so I can use hyperref with this use of enumitems and refstepcounter?  Thanks.  (Note: smaller working examples are possible, but they give different error messages.  I'm hoping to get the current example working.)
1108
I basically need to highlight a particular word in a block of text. For example, pretend I wanted to highlight the word &quot;dolor&quot; in this text: &lt;p&gt;     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. &lt;/p&gt; &lt;p&gt;     Quisque bibendum sem ut lacus. Integer dolor ullamcorper libero.     Aliquam rhoncus eros at augue. Suspendisse vitae mauris. &lt;/p&gt;  How do I convert the above to something like this: &lt;p&gt;     Lorem ipsum &lt;span class=&quot;myClass&quot;&gt;dolor&lt;/span&gt; sit amet, consectetuer adipiscing elit. &lt;/p&gt; &lt;p&gt;     Quisque bibendum sem ut lacus. Integer &lt;span class=&quot;myClass&quot;&gt;dolor&lt;/span&gt; ullamcorper     libero. Aliquam rhoncus eros at augue. Suspendisse vitae mauris. &lt;/p&gt;  Is this possible with jQuery? Edit: As  , this is quite possible without jQuery - but I was hoping there might be a special method of jQuery which would let you do selectors on the text itself. I'm already using jQuery heavily on this site, so keeping everything wrapped up in jQuery would make things perhaps a bit more tidy.
48726
If I use  \usepackage[colorlinks]{hyperref}   I get colored links for \cite (not good for printing or even viewing) but table of content looks fine.  If I use  \usepackage[colorlinks=false]{hyperref}   I get \cite  links in black with a colored frame (this looks very good) but the table of content looks strange with extra long boxes.  What are my other options? Can you have two styles in different parts of a document?   How do you make the page numbers in TOC to be the links instead of the section headers?
3683
Since I wanted a better readability of highlights of a would be black &amp; white-printed document, I needed to change both the highlighting color (gray) AND the font color (white).  Depending which command you implement inside the other will compile or not: \hl{\textcolor{white}{Fail}} does not work, compiling returns Package xcolor Error: Undefined color '{white}'.  Here's the mwe:  \documentclass{article} \usepackage{xcolor} \usepackage{color} \usepackage{soul} % Enables highlighting \sethlcolor{gray}  \begin{document}      \textcolor{white}{\hl{Success}}     %% Error:     %% Package xcolor Error: Undefined color `{white}'.     \hl{\textcolor{white}{Fail}}  \end{document}   So, in the end, the problem is sorta solved but I thought you might have an answer as to what happens.
16207
Is there a 'biblatex in a nutshell' guide out there? I'd like if someone explained to me the essentials on how to use biblatex (what lines I have to write in my document, which files I have to have, how many times and what I have to compile), so then I can go to  to customise it further.
107044
Instead of having the citation key showing up in the document for missing references, I want to only have [?], as it is the case when using the default bibtex without biblatex. This behavior is driving me crazy, as it messes up all the formatting (especially in tables). I want to focus on writing and only later on deal with the erroneous citations.  This question is related to    and its MWE can be used. However, as pointed out beforehand, I want the question mark in the text instead of the citation key to not mess up the formatting (for missing citations).
13171
I have my PhD deadline on Monday and disaster has struck at the very last minute! Any assistance would be eternally appreciated.  I'm using Overleaf (v2) to write my thesis - it's a very large file tree containing multiple .tex files.  Everything was compiling fine, until I decided to experiment and use:  \usepackage{biblatex}   It compiled with this included but looked odd, so I deleted the line again. However, now it does not compile - despite the document being exactly the same as before the problem began.
15609
I was trying to emphasize text with \textbf, \textit and \underline commands. But the text will not automatically wrap to the next line. I also tried the ulem package, and it did not work too.  Does anybody know how to have italic, bold, underline and linebreaks for some text?
7906
I'm using  \usepackage{cite}   to reference bibliography (I'm using bibtex). In general the text is in greek, but bibliography is in english. I'm using babel package, so in order to write in english you need to put your text between \selectlanguage commands, which change the language. For example, to write a reference I have to use  \selectlanguage{english}\cite{foo}\selectlanguage{greek}   because else latin characters get substituted by greek and I don't want this to happen since bibliography is in english.  So I made a little macro:  \newcommand{\citem}[1]{\selectlanguage{english}\cite{#1}\selectlanguage{greek}}   For some reason, this command adds white space before the reference. For example, if I want to reference book Blah Blah labeled as foo and write Some text (\citem{foo}), this prints out     Some text ( [Blah])   How can I make this space between the opening parenthesis and the bracket disappear?  I know for sure that the language is not the problem here, because I changed the macro to the trivial  \newcommand{\citem}[1]{\cite{#1}}   and printed     ( [Βλαη])   The latin characters turned into greek, this was expected, but the space remained.  Update: Thanks to egreg, I found a way to get rid of the redundant white space before references. Macro is:  \makeatletter \newcommand{\citem}[1]{%   \begingroup\let\cite@adjust\@empty   \textlatin{\cite{#1}}% \endgroup }   But now I can't use citem into a caption. Error is:  Argument of \@caption has an extra }.   &lt;inserted text&gt;     \par l.261 }
44717
I would like to know if it is good practice, and if so how it can be achieved, to make references like: "as mentioned above...". Or am I going too far and should just type the word?  I've read something about varioref, but it seems to produce page or section numbers, but I can't find how you can just print if a section is above or below the reference.
6385
How do you produce a document with citations (\citep, \citet) working properly in the paper but without a bibliography at the end?  I've come up with one solution that is bad because it breaks my makefile.  latex file.tex bibtex file # comment out \bibliography{} command latex file.tex   Similarly, is there a way to produce the bibliography with no accompanying text?  Again, I've come up with a solution: fill an otherwise blank .tex file with \nocite{} commands.  However, this is a pain because I have to keep two files synced by hand (and regular expressions to search for \citep{author1, author2} can be a huge pain when there are pagebreaks...).
100416
It looks there is a problem with TexShop and multibib package. multibib package expects that you do bibtex xxx where xxx is your own newcites. However, when using TexShop it looks like it only does it for the main document. Therefore, the only way I have to make it work is to do it from command line (notice the bibtex xxx):   pdflatex main  bibtex main  bibtex xxx  pdflatex main  pdflatex main   Do you know a workaround I can do so that I can latex without problem in any IDE?  Thanks!
100733
I'm new in LaTeX and I'm searching for solution to highlight verbatim text inside paragraph (for example, it is like on this page, where code is highlighted). Can anyone help me with this?   Let say, that I have a paragraph and inside is some words where I use \verb|| to show some code parts, but I'd like that this is highlighted or it has background color, juts like it is highlighted in this page. For normal text I can use \newcommand{\hilight}[1]{\colorbox{gray!10}{some text}}, but this command doesn't work with \verb, so I can't use it. I'm trying to find solution and searching over the internet, but I didn't fid so far.   Thanks for your help.
75637
I would like to force the listings package to be more selective when highlighting keywords. I'm currently including C source files in my document, and while I'm happy that occurrences of the float keyword are properly highlighted, I'd like the following line to appear as  #include &lt;float.h&gt;  instead of the current  #include &lt;float.h&gt;  In a similar spirit, else is fine, but #else should be typeset instead of #else.  I tried solutions like using deletekeywords={float.}, but to no avail (unsurprisingly, according to the documentation: "(...) by default some characters are not allowed inside keywords, for example ‘-’, ‘:’, ‘.’, and so on. (...)"). Playing with deletedirectives led nowhere either.
36976
I like  under Windows. I was wondering if there are some similar ones for Ubuntu? Or just the powerful and convenient one in your opinion.  Features that I like are:   syntax highlighting for language X theme support line numbering code folding regex style Powerful, yet not resource-consuming