blob: f98fae8cb88ae01f31888cd37380c83bf11189ac [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
#=============================================================================#
# Copyright (c) 2008, 2019 Stephan Wahlbrink and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# Tobias Verbeke - initial implementation
#=============================================================================#
-->
<cheatsheet title="Configure Sweave Document Building">
<intro>
<description>
This cheat sheet shows how to configure all steps in processing an Sweave document into a final output document of your choice.
</description>
</intro>
<item title="Open Configuration Dialog" dialog="true" skip="false">
<description>
Go to <b>Run &gt; External Tools &gt; Open External Tools Dialog... </b> and select
<b>Sweave (LaTeX+R) Document Processing</b>.
<br/><br/>
When the Sweave editor is active, you can also access this dialog via <b>Document &gt; Create / Edit Configurations...</b> on the workbench menu bar.
<br/><br/>
Create a new launch configuration by double-clicking on the selected node or by clicking on the <b>New launch configuration</b> icon. Fill in a <b>Name</b> for this launch configuration.
</description>
<command
confirm="false"
required="false"
serialization="org.eclipse.ui.externalTools.commands.OpenExternalToolsConfigurations">
</command>
</item>
<item title="1) Sweave Tab" dialog="true" skip="false">
<description>
Choose either to <b>skip Sweave</b> in the automated building of the document, to specify an <b>Sweave command</b> to be executed or to invoke an <b>R CMD Sweave</b> on the given file.
<br/><br/>
Specifying the <b>Sweave command</b> is the most flexible option as it allows the specification of alternative Sweave drivers from add-on packages.
<br/><br/>
If you want to make use of the
<b>R CMD Sweave</b> option, you need to specify the appropriate <b>R CMD</b> launch configuration. To configure a new one, use the <b>Create New</b> button next to the option and follow the explanations in the (optional) next step of this cheat sheet.
</description>
</item>
<item title="1.1) R CMD Sweave Config (optional)" dialog="true" skip="true">
<description>
By clicking on the <b>Create New</b> button in the previous step of this cheat sheet, a new launch configuration for <b>R CMD Tools</b> has been created in the External Tools Dialog.
<br/><br/>
One may change the <b>Name</b> of this launch configuration if desired. As can be verified, the <b>Sweave Doc Processing</b> option has been preset in the drop-down menu of R CMD tools in the Main tab.
<br/><br/>
In the R Config tab, one may choose the R configuration that will be used when invoking R CMD Sweave while the Refresh tab allows to automatically refresh resources upon completion of R CMD Sweave.
<br/><br/>
Click on <b>Apply</b> to save the settings and and go back to the Sweave tab of the <b>Sweave (LaTeX+R) Document</b> configuration in which you would like to make use of this newly created R CMD Sweave configuration.
</description>
<command
confirm="false"
required="false"
serialization="org.eclipse.ui.externalTools.commands.OpenExternalToolsConfigurations">
</command>
</item>
<item title="2) LaTeX Tab" dialog="true" skip="false">
<description>
The LaTeX tab allows to specify whether you would like the Sweave&apos;d tex file to be opened in an editor, to what output format and using which command you would like to compile this file.
</description>
</item>
<item title="3) Viewer Tab" dialog="true" skip="false">
<description>
In the Viewer tab one can choose to <b>disable</b> the preview. Alternatively, it is possible to open the compiled documents using Eclipse&apos;s <b>default editor / viewer</b> for the chosen output files. A third option is to make use of advanced viewer configurations as provided by <b>View LaTeX Document</b>.
<br/><br/>
<b>View LaTeX Document</b> launch configurations need to be configured
before one can make use of them inside the Viewer tab. To configure a new one, use the <b>Create New</b> button next to the option and follow the explanations in the (optional) next step of this cheat sheet.
</description>
</item>
<item title="3.1) View LaTeX Document Config (optional)" dialog="true" skip="true">
<description>
By clicking on the <b>Create New</b> button in the previous step of this cheat sheet, a new <b>View LaTeX Document</b> launch configuration has been created in the External Tools Dialog.
<br/><br/>
Change the <b>Name</b> of this launch configuration and choose one of the predefined viewers from the drop-down list in the Viewer tab (e.g. acroread).
<br/><br/>
Verify whether the path to the viewer executable is correct and change it if needed via the <b>Change...</b> button.
<br/><br/>
Click on <b>Apply</b> to save the settings and go back to the Viewer tab of the <b>Sweave (LaTeX+R) Document</b> configuration in which you would like to make use of this newly created View LaTeX Document configuration.
</description>
<command
confirm="false"
required="false"
serialization="org.eclipse.ui.externalTools.commands.OpenExternalToolsConfigurations">
</command>
</item>
</cheatsheet>