Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How do I use the interfaces package? I tried to use the command \sectionformat but it didn't work:

\documentclass[a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{interfaces}
\sectionformat\section[hang]{
  font=\bfseries\Large
}
\usepackage{lipsum}

\begin{document}

\section{Section One}
\lipsum[1-5]
\end{document}

And how to use \changefont.

\documentclass[a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{interfaces}
  \changefont{
    shape=\itshape
  }
\usepackage{lipsum}

\begin{document}

\lipsum[1-5]
\end{document}
share|improve this question

1 Answer 1

The interfaces package provides a key-value interface to an existing package, which must also be loaded. There are a number of different ways to do this, but in each case, you need to load the package which the interface module is designed for.

\documentclass[a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{interfaces} % load all interfaces (depending on which packages are loaded)
\usepackage{titlesec} % must load the titlesec package to use interfaces with it
\sectionformat\section[hang]{
  font=\bfseries\Large
}
\usepackage{lipsum}

\begin{document}

\section{Section One}
\lipsum[1-5]
\end{document}

There are a couple of other ways you can load interfaces:

\usepackage[titlesec]{interfaces} % specify which interface to load as an option
\usepackage{titlesec} % load the package itself

Alternatively:

\usepackage{interfaces-base} % load the common part of interfaces
\LoadInterface{titlesec} % load the interface for a specific package
\usepackage{titlesec} % load the package itself

Interface to fonts

The package also provides an interface to changing font parameters. This is for use in your document, not in the preamble. The package doesn't mention that it assumes two letter keys for fontshape:

\changefont{shape=it}

This will change the font to italics. (In this case the command is equivalent to just using \itshape in your document, but for more complex changes, it could be useful.)

share|improve this answer
    
Thanks Alan. And how to use changefont? –  Regis da Silva Nov 15 '11 at 4:35
    
@RegisdaSilva See my update. –  Alan Munn Nov 15 '11 at 4:53
    
Thanks Alan.... –  Regis da Silva Nov 15 '11 at 15:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.