MinipageParams

Struct MinipageParams 

Source
pub struct MinipageParams {
    pub position: Option<String>,
    pub height: Option<String>,
    pub inner_pos: Option<String>,
    pub width: String,
}
Expand description

Parameters for the LaTeX minipage environment.

§Example

use rusttex::{MinipageParams, StringOrBuilder};

let params = MinipageParams::new(Some("c"), Some("2cm"), None, "5cm");

Generated LaTeX:

\begin{minipage}[c][2cm][]{5cm}
...
\end{minipage}

Fields§

§position: Option<String>

Governs how the minipage vertically aligns with the surrounding material.

§height: Option<String>

It sets the height of the minipage

§inner_pos: Option<String>

Specifies the inner position of the minipage.

§width: String

It gives the width of the box into which contents are typeset.

Implementations§

Source§

impl MinipageParams

Source

pub fn new<S: StringOrBuilder, V: StringOrBuilder, T: StringOrBuilder, U: StringOrBuilder>( position: Option<S>, height: Option<V>, inner_pos: Option<T>, width: U, ) -> Self

Creates a new MinipageParams instance.

§Parameters
  • position: Optional position.
  • height: Optional height.
  • inner_pos: Optional inner position.
  • width: Width of the minipage.
§Example
let params = MinipageParams::new(Some("c"), Some("2cm"), None, "5cm");

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.