Learn R Programming

xdvir (version 0.1-2)

getMark: Access LaTeX Marks

Description

getMark() allows access a location within LaTeX output relative to the rendering in R.

addMark() allows third-party packages to add marks to the rendering in R.

Usage

getMark(name)
addMark(name, devx, devy, vpx=NA, vpy=NA, vpPath=NULL)

Value

getMark returns a list containing the location (and viewport) information for the mark.

Arguments

name

The name of a mark.

devx, devy

The location of the mark on the device (in inches).

vpx, vpy

The location of the mark relative to the viewport in which the mark was rendered.

vpPath

The viewport path to the viewport in which the mark was rendered.

Warning

The saved locations are only relative to the current device size. Resizing the device, or copying between devices will result in incorrect locations.

A call to addMark() using an existing mark name will overwrite the previous mark information.

Author

Paul Murrell

Details

Some LaTeX packages, e.g., see zrefPackage, allow positions within text to be saved with a label. This function allows those saved locations to be accessed, e.g., to add further drawing relative to those locations.