1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-12 03:41:59 +02:00

Added support for 'html' in italicize_taxonomy() (#134)

This commit is contained in:
Emil Rossing
2024-02-13 13:47:07 +01:00
committed by GitHub
parent 83e92fd88c
commit 74ea6c8c60
3 changed files with 16 additions and 9 deletions

View File

@ -5,14 +5,14 @@
\alias{italicize_taxonomy}
\title{Italicise Taxonomic Families, Genera, Species, Subspecies}
\usage{
italicise_taxonomy(string, type = c("markdown", "ansi"))
italicise_taxonomy(string, type = c("markdown", "ansi", "html"))
italicize_taxonomy(string, type = c("markdown", "ansi"))
italicize_taxonomy(string, type = c("markdown", "ansi", "html"))
}
\arguments{
\item{string}{a \link{character} (vector)}
\item{type}{type of conversion of the taxonomic names, either "markdown" or "ansi", see \emph{Details}}
\item{type}{type of conversion of the taxonomic names, either "markdown", "html" or "ansi", see \emph{Details}}
}
\description{
According to the binomial nomenclature, the lowest four taxonomic levels (family, genus, species, subspecies) should be printed in italics. This function finds taxonomic names within strings and makes them italic.
@ -20,7 +20,7 @@ According to the binomial nomenclature, the lowest four taxonomic levels (family
\details{
This function finds the taxonomic names and makes them italic based on the \link{microorganisms} data set.
The taxonomic names can be italicised using markdown (the default) by adding \code{*} before and after the taxonomic names, or using ANSI colours by adding \verb{\\033[3m} before and \verb{\\033[23m} after the taxonomic names. If multiple ANSI colours are not available, no conversion will occur.
The taxonomic names can be italicised using markdown (the default) by adding \code{*} before and after the taxonomic names, or \verb{<i>} and \verb{</i>} when using html. When using 'ansi', ANSI colours will be added using \verb{\\033[3m} before and \verb{\\033[23m} after the taxonomic names. If multiple ANSI colours are not available, no conversion will occur.
This function also supports abbreviation of the genus if it is followed by a species, such as "E. coli" and "K. pneumoniae ozaenae".
}