Tag Info

New answers tagged


In the CMD+F search window, if you click the "Highlight" button in the lower left, it will highlight all occurrences of the search text in the document. The highlight colour used can be selected in the TeXShop preferences - the default is a bright magenta. This shows up in the document window even when the search window has focus.


Here's a LuaLaTeX-based solution. Note that the search is case-sensitive: while "TEST" is highlighted, "test", "Test", and "TeSt" are not. % !TEX TS-program = lualatex \documentclass{article} \usepackage{xcolor,luacode,luatexbase} %% Lua-side code \begin{luacode} function highlight_TEST ( line ) return string.gsub ( line, "TEST", ...


Must be compiled with XeTeX. % arara: xelatex \documentclass{article} \usepackage{xesearch} \SearchList{make-blue}{\textcolor{blue}{#1}}{test} \SearchList{make-red}{\textcolor{red}{#1}}{maybe,different} \SearchList{code}{\lstinline{#1}}{code} \usepackage{listings} \lstset{basicstyle=\ttfamily} \usepackage{xcolor} \begin{document} Hello, this is a test, ...


You can use \makeatletter \AtBeginDocument{\let\hl\@firstofone} \makeatother in the preamble to disarm the \hl command (or any other one). In principle you could also \let to \relax as @LaRiFaRi proposed, but this would leave your text inside a superfluous group, i.e. {...}.


I'd like to suggest you the \tcbhighmath command from the tcolorbox package; its interaction with empheq will give you the possibility to easily highlight expressions inside the amsmath environments; a little example: The code: \documentclass{article} \usepackage{amsmath} \usepackage{xcolor} \usepackage{soul} \usepackage{empheq} ...

Top 50 recent answers are included