Closed clehene closed 2 months ago
I wish I knew how to fix it. I'm using TeXShop to edit LaTeX and produce the PDFs.
Below this line is what GPT responded
When using TeXShop, which typically relies on pdflatex
for PDF generation, the issue may be related to the specific LaTeX packages and commands you're using for highlighting. Here are more specific steps to ensure proper text highlighting in TeXShop:
soul
Package for HighlightingInclude the soul
package: Add this to the preamble of your LaTeX document.
\usepackage{soul}
\usepackage{xcolor}
\sethlcolor{yellow} % or any color you prefer
Highlighting Text: Use the \hl
command provided by the soul
package to highlight text.
\hl{This text will be highlighted properly.}
Here’s a minimal working example that you can use in TeXShop to ensure proper highlighting:
\documentclass{article}
\usepackage{soul}
\usepackage{xcolor}
\sethlcolor{yellow} % Set the highlight color
\begin{document}
This is normal text.
\hl{This text is highlighted and should appear correctly.}
\end{document}
PDF Viewer: Ensure that you are using a PDF viewer that supports proper rendering of highlights. Some PDF viewers might not render the layered text and highlights correctly.
TeXShop Preferences: Ensure that TeXShop is set up to use pdflatex
or another appropriate engine that supports the soul
package correctly.
TeXShop
-> Preferences
.Typesetting
tab, ensure that pdflatex
is selected as the default command.Check for Conflicts: Ensure there are no conflicting packages or settings in your LaTeX document that might affect text rendering.
Font and Encoding: Sometimes, specific fonts or encoding settings can cause rendering issues. Ensure that your document uses standard fonts and encoding settings.
If you still encounter issues, consider using xelatex
or lualatex
, which often provide better support for advanced text rendering features:
% For XeLaTeX
\documentclass{article}
\usepackage{soul}
\usepackage{xcolor}
\sethlcolor{yellow}
\begin{document}
This is normal text.
\hl{This text is highlighted and should appear correctly.}
\end{document}
In TeXShop, you can change the typesetting engine by selecting XeLaTeX
from the drop-down menu before compiling the document.
soul
and xcolor
for proper text highlighting.pdflatex
or another appropriate engine is used.xelatex
or lualatex
for better text rendering support.These steps should help you achieve the correct highlighting behavior in your LaTeX documents when using TeXShop.
I just realized that the tex files are online too (https://github.com/BartoszMilewski/DaoFP) so, perhap, this would be better directed there. With some building instructions, I'd be happy to try that out myself and report back.
Can't reproduce this locally. I suspect is something related to your build environment. Closing
Hey - small nitpick for how the PDF is rendered. Note that when highlighting text, the space below the letters is not covered.
Dao of FP
CT in context