¿Cómo escribir este tipo de texto en color en LaTeX?

¿Cómo escribir este tipo de texto en color en LaTeX?

Necesito agregar el siguiente texto a mi documento de látex. Actualmente creé una imagen y la agregué al documento.

Necesito saber alguna forma sencilla de agregarlo como texto a mi último proyecto.

Una necesidad adicional es centrarlo en la página y utilizar un tamaño de fuente mayor que el predeterminado. (El texto predeterminado de mi documento es seis de 12 puntos). No es necesario agregar un borde.

ingrese la descripción de la imagen aquí

Respuesta1

¿Como esto?

\documentclass{article}

\usepackage{xcolor}

\begin{document}

\begin{center}
    \Large\sl
    \textcolor{red}{S}ince \textcolor{red}{E}veryone \textcolor{red}{C}an \textcolor{red}{R}ead, \textcolor{red}{E}ncoding \textcolor{red}{T}ext \textcolor{red}{I}n \textcolor{red}{N}eutral \textcolor{red}{S}entences \textcolor{red}{I}s \textcolor{red}{D}oubtfully \textcolor{red}{E}ffective

    \vspace{1cm}\LARGE\color{red}
    `Secret inside'
\end{center}

\end{document}

Respuesta2

Me di cuenta de que el OP ya aceptó una de las respuestas proporcionadas hasta ahora. Solo para brindar algo de variedad, aquí hay una solución que proporciona una macro LaTeX llamada \boldredcapsque representa todas las letras mayúsculas en su argumento en negrita y rojo.automáticamente. No es necesario aplicar muchas \textbf{\textcolor{red}{...}}instrucciones a mano. La macro LaTeX \boldredcapsse basa en la poderosa gsubfunción de cadena de Lua para realizar su trabajo.

ingrese la descripción de la imagen aquí

% !TEX TS-program = lualatex
\documentclass[12pt]{article}
\usepackage{xcolor}   % for "\textcolor" macro
\usepackage{ragged2e} % for "\Centering" macro
\usepackage{luacode}  % for "\luaexec" macro
%% Define a LaTeX macro called "\boldredcaps":
\newcommand\boldredcaps[1]{\luaexec{%
   yyy = "#1"
   yyy = yyy:gsub ( "\%u" , "\\textbf{\\textcolor{red}{\%0}}" )
   tex.sprint ( yyy )
}}

%% Concoct steganographic message:
\newcommand{\blurb}{Since Everyone Can Read, Encoding Text In Neutral Sentences Is Doubtfully Effective.}

\begin{document}

\begin{figure}
\Large  % or "\large", or "\huge", etc
\sffamily\itshape
\Centering
\boldredcaps{\blurb} % <-- argument of \boldredcaps can be a macro 

\bigskip
\textbf{\textcolor{red}{`secret inside'}}
\rmfamily\upshape
\caption{Text Steganography}
\end{figure}

\end{document}

Respuesta3

Si necesita hacer esto con frecuencia, se puede automatizar xstringreemplazando \StrSubstituteun espacio con \textcolor{red}:

ingrese la descripción de la imagen aquí

Código:

\documentclass{article}
\usepackage{xcolor}
\usepackage{xstring}

\newcommand*{\Hightlight}[1]{%
    \noexpandarg
    \StrSubstitute[0]{\textcolor{red}#1}{ }{ \textcolor{red}}[\FormattedString]%
    \FormattedString%
}%

\begin{document}
\Hightlight{Since Everyone Can Read, Encoding Text In Neutral Sentences Is Doubtfully Effective} 
\end{document}

Respuesta4

El código proporcionado debería proporcionarle la imagen adjunta. ¿Encaja con lo que querías? Puedes modificar el código como desees.

\documentclass{article}
\usepackage{xcolor}
\usepackage{framed}

\begin{document}
\begin{framed}
\centering
\textbf{\color{red} S}ince \textbf{\color{red} E}veryone \textbf{\color{red} C}an \textbf{\color{red} R}ead, \textbf{\color{red} E}ncoding \textbf{\color{red} T}ext \textbf{\color{red} I}n \textbf{\color{red} N}eutral \textbf{\color{red} S}entences \textbf{\color{red} I}s \textbf{\color{red} D}oubtfully \textbf{\color{red} E}ffective. \\ \vspace{5mm}
{\large \textbf{\color{red} 'Secret inside'}}
\end{framed}
\end{document}

ingrese la descripción de la imagen aquí

información relacionada