Tag Info

New answers tagged

2

This is just me practising by experimenting with a package I wrote to answer another question. That package is justtrees and it is a simplified version of prooftrees which I wrote out of frustration. Both packages provide a forest style and the new versions offer a corresponding environment which has various advantages. This uses v0.03 of the package. Just ...


0

This should be faster than using \colorbox. It avoids the shrinkage and line breaking by simply not shrinking or breaking. Of course, you can't use this for more than one line. (You could parse the text and highlight each word separately.) I added \hlleft and \hlright to highlight parts of words without changing the spacing. \documentclass{article} ...


0

If we use the category approach we can automate this behaviour. \DeclareBibliographyCategory{asterisk} We use a macro to avoid having to type too much \newcommand*{\addcat}{% \ifcategory{asterisk}% {*}% {}% } Then we add the asterisk to the bibliography with \renewbibmacro*{begentry}{\addcat} Finally, we patch relevant numeric-comp macros ...


0

A solution that works quite well for me: added to preamble: \renewcommand{\postnotedelim}{} \DeclareFieldFormat{postnote}{#1} then use: \cites{key1}[][$^\ast$]{highlightedkey}{key3} gives me the output I was looking for. Please note that this solution may not apply to anyone as the postnote behavior is changed for the entire document. (No problem in ...


3

Here's a simple script that will mark up words that you specify by editing the script-- it was the simplest way to handle lots of words and lots of different colors. It requires perl, which is standard on Unix (Linux/OS X) and a single download away on Windows. I'm assuming you have lots and lots of keywords to mark, so I've used perl which makes it easy to ...


4

ConTeXt provides a proof of concept module for such translations: m-translate. You could use it to translate text, but the translation takes place before macro expansion. So, the method will fail if the translation string is part of a macro name. The translation can be enabled and disabled using \enableinputtranstion and \disableinputtranslation. Here is an ...


7

Here's another with l3regex. \documentclass{scrartcl} \usepackage{xcolor,xparse,l3regex} \ExplSyntaxOn \NewDocumentCommand \texthighlight { +m } { \david_texthighlight:n { #1 } } \cs_new_protected:Npn \david_texthighlight:n #1 { \group_begin: \tl_set:Nn \l_tmpa_tl { #1 } \seq_map_inline:Nn \g_david_highlight_colors_seq { \clist_map_inline:cn { ...


12

Solution using LuaTeX callbacks. Library luacolor.lua from luacolor is also used. First package luahighlight.sty: \ProvidesPackage{luahighlight} %\RequirePackage{luacolor} \@ifpackageloaded{xcolor}{}{\RequirePackage{xcolor}} \RequirePackage{luatexbase} \RequirePackage{luacode} \newluatexattribute\luahighlight \begin{luacode*} highlight = require ...


5

Strongly based on my answer at How to insert a symbol to the beginning of a line for which a word appears?. However, I had to extend the logic to handle multiple color assignments. Syntax is multiple invocations of \WordsToNote{space separated list}{color} and then \NoteWords{multiple paragraph input} Macros in the input are limited to style (e.g., ...



Top 50 recent answers are included