Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4099986
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:30:28+00:00 2026-05-20T20:30:28+00:00

My current Makefile for weaving looks something like: SUFFIXES: .tex .pdf .Rnw MAIN =

  • 0

My current Makefile for weaving looks something like:

SUFFIXES: .tex .pdf .Rnw
MAIN = lecture
INCLUDES = chapter1.tex chapter2.tex ...

all: $(INCLUDES) $(MAIN).pdf

$(MAIN).pdf: $(INCLUDES) $(MAIN).tex

.Rnw.tex:
        R CMD Sweave $*.Rnw

.tex.pdf:
        pdflatex $*.tex


<snip>

Suppose I want to change the Sweave driver to use the highlight package (say). What’s the best way of doing this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T20:30:29+00:00Added an answer on May 20, 2026 at 8:30 pm

    You could do what we do for the Rcpp* packages. Here is RcppGSL:

    RcppGSL.pdf: RcppGSL/RcppGSL.Rnw
        cp -f RcppGSL/RcppGSL.Rnw .
        $(RSCRIPT) --vanilla -e "require(highlight); \
                                 driver <- HighlightWeaveLatex(boxes = TRUE); \
                                 Sweave( 'RcppGSL.Rnw', driver = driver ); "
        $(RSCRIPT) -e "tools::texi2dvi( 'RcppGSL.tex', pdf = TRUE, clean = FALSE )"
        bibtex RcppGSL
        $(RSCRIPT) -e "tools::texi2dvi( 'RcppGSL.tex', pdf = TRUE, clean = TRUE )"
        cp RcppGSL/RcppGSL-fake.Rnw RcppGSL.Rnw
    

    This keeps the actual source and a ‘fake’ variant in a subdirectory inst/doc/RcppGSL/
    to trick R into recreating the pdf only when we want it too—otherwise it sees an Rnw and pdf of the same basename and is happy.

    A little more convoluted than the basic Makefile you started with, but currently still
    the only way to switch to highlight that we know.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Current, I've got a stored procedure that has a main goal of doing a
In my Makefile I want to create an environment variable using the current date
My current development project has two aspects to it. First, there is a public
My current preferred C++ environment is the free and largely excellent Microsoft Visual Studio
My current project is in Rails. Coming from a Symfony (PHP) and Django (Python)
My current view is no, prefer Transact SQL stored procedures because they are a
My current setup.py script works okay, but it installs tvnamer.py (the tool) as tvnamer.py
My current place of employment is currently in a transition, new ownership has taken
My current project uses NUnit for unit tests and to drive UATs written with
My current position is this: if I thoroughly test my ASP.NET applications using web

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.