0% found this document useful (0 votes)
355 views15 pages

Texmaker (Free Cross-Platform Latex Editor)

This document provides instructions for using the Texmaker LaTeX editor. It discusses configuring Texmaker and LaTeX commands, editing LaTeX documents, compiling documents, and other Texmaker features like inserting tables, figures, and math equations.

Uploaded by

hamza latif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
355 views15 pages

Texmaker (Free Cross-Platform Latex Editor)

This document provides instructions for using the Texmaker LaTeX editor. It discusses configuring Texmaker and LaTeX commands, editing LaTeX documents, compiling documents, and other Texmaker features like inserting tables, figures, and math equations.

Uploaded by

hamza latif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

TexmakerTheuniversalLaTeXeditor

FreecrossplatformLaTeXeditorsince2003(Windows,MacOsX,Linux)

+2178
Recommend this

Latestversion:4.5
(Oct292015)

Home
Screenshots
Download
Documentation
ChangeLog
Translate
French

Contact
(bugs/requests)

Usermanual:Contents

1.ConfiguringTexmaker
1.1Configuringtheeditor
1.2Configuringthelatexrelatedcommands
1.3Configuringthespellchecker

2.EditingaTeXdocument
2.1Usualcommands
2.2SettingthepreambleofaTeXdocument
2.3Structureofadocument
2.4Browsingyourdocument
2.5Formattingyourtext
2.6Spacings
2.7Insertingalist
2.8Insertingatable
2.9Insertinga"tabbing"environment
2.10Insertingapicture
2.11CrossReferencesandnotes
2.12Insertingmathformulae
2.13Usingthe""placeholders

3.Compilingadocument
3.1Compiling
3.2Thelogfiles
3.3SynchronizationsourcepdfwithSynctex

4.Otherfeatures
4.1Folding/unfoldingpartsofthedocument
4.2Aboutdocumentsseparatedinseveralfiles
4.3Bibliography
4.4Personalstagsanstools
4.5Pstricks/Metapost/Tikz/Asymptotesupport
4.6Changetheinterfacelanguageandappearance
4.7The"Restoreprevioussession"command
4.8"Forward/Inversesearch"withTexmaker
4.9SynopsisoftheTexmakercommand
4.10Keyboardshortcuts
4.11The"SourceViewer"panel
4.12"Usea'build'subdirectory..."optionfor(pdf)latexcommand
4.13Replacingtextwitharegularexpression
4.14UsingTexmakerasanAsymptoteeditor
4.15Extendingtheeditor'sfunctionalitywithscripts

Usermanual

1.ConfiguringTexmaker
BeforeusingTexmaker,youmustconfiguretheeditorandlatexrelatedcommandsviathe"Configure
Texmaker"commandinthe"Options"menu("Preferences"undermacosx).

1.1Configuringtheeditor
Beforecompilingyourfirstdocument,youmustsettheencodingusedbytheeditor("Configure
Texmaker">"Editor">"EditorFontEncoding").Then,youshouldusethesameencodinginthe
preambleofyoursTeXdocuments(example:\usepackage[latin]{inputenc},ifyouusethe"ISO8859
1"encodingfortheeditor)
Note:whileopeningafile,you'rewarnedifthedocumentcan'tbedecodedcorrectlywiththedefault
encodingandtheprogramletsyouchooseanotherencoding(withoutmodifyingthedefaultencoding).

1.2Configuringthelatexrelatedcommands
Texmakercan'tcompileyoursdocumentsifthepathstotheLaTeXrelatedcommandsarewrong.
ThedefaultsettingsshouldworkwiththerecentandstandardLaTeXdistributions,butyoushouldhave
tomodifythem("ConfigureTexmaker">"Commands").Tochangeacommand,justclickonthe
buttonattheendofthecorrespondinglineandselectthecommandinthefilebrowser:texmaker
willadaptautomaticallythesyntaxofthecommand.
The%characterrepresentsthenameofthefilewithouttheextension(themasterdocumentinthe
"master"mode)andthe@characterwillbereplacedbythecurrentlinenumber.
Additionalparameter:#willbereplacedbythecurrentfilenamewithoutextension(eveninthe
"master"mode)and!willbereplacedbythecurrentdirectory.

Remark:ifthe%,!,#and@charactersarerequiredforacommand,justuse%%,!!,##and@@.
Theseexpressionswillbereplacedby%,!,#and@respectivelybeforelaunchingthecommand.
1.3Configuringthespellchecker
ThespellcheckerusestheHunspell/OpenOffice.org(version2.x)dictionaries.
Toconfigurethespellchecker:"ConfigureTexmaker">"Editor">"Spellingdictionary">clickon
thebuttonattheendofthelinetoselectthedictionarywiththefilebrowser.
Warning:spellcheckingstartsatthecursorpositionandnotatthebeginningofthedocument.
Duringtyping,ifthereisanerror,thewordisunderlinedbyaredunderline.Arightclickontheword
opensacontextualmenuinwhichtherearesomereplacementsuggestions.Clickonthedesiredwordto
makethereplacement.

2.EditingaTeXdocument
2.1Usualcommands
Thestandardcommands(cut,copy,find...)canbelaunchedviathe"Edit"menuandthe"Edit"toolbar.
BlockselectionisavailablebyusingtheAltkeywhilemovingthemousecursor.

2.2SettingthepreambleofaTeXdocument
Todefinethepreambleofyourdocument,youcanusethe"Quickstart"wizard("Wizard"menu).
Thisdialogallowsyoutosetthemainfeaturesofyourdocument(class,papersize,encoding...).
Note:Youcanaddotheroptionsbyclickingthe"+"buttons.Allyourssettingsarerecorded.

Youcanalsotypeyourownpreamblemodelintheeditor:withthe"Copy/paste"or"SaveAs"
commands,youcanuseitforanewdocument.

2.3Structureofadocument
Todefineanewpart(section,subsection...)inyourdocumentwithTexmaker,justusethiscomboboxin
thetoolbar:

Thiswillcauseadialogtopopupwhichallowsyoutodefinethestyleofthepart(section,subsection...).
Note:the"StructureView"isautomaticallyupdated.

2.4Browsingyourdocument
The"StructureView"(leftpanel)letsyouquicklyreachanypartofyourdocument.Allyouneedtodo
istoclickonanyitem(label,section...)andyouwillbetakentothebeginningofthecorresponding
areaintheeditor.
The"StructureView"isautomaticallyupdatedwhiletyping.Youcanalsousethe"RefreshStructure"
("Edit"menu)commandatanymoment.

Foreachfile,threebookmarkscanbeusedtospeedupnavigation:justclickonalinenumbertoaddor
removeabookmark.Whenyouhavealreadydefinedthreebookmarks,youmustremoveoneofthemto
addanewbookmark.Tojumptothelinecorrespondingtoabookmarkintheeditor,justclickonthe
buttonsinthestatusbar.

2.5Formattingyourtext
Youcanquicklysettheformatofapartofyourtextwiththis:

Additionaloption:aselectedtextcanbedirectlyframedbycertainenvironments.Example:while
clickingonthebutton"Bold"afterhavingselectedtheword"Hello",youwillobtainthecode:
\textbf{Hello}.
Thisoptionisavailableforalltheenvironmentsindicatedby"[selection]"inthe"LaTeX"menu.

2.6Spacings
Theusual"spacing"commandsareavailableinthe"LaTeX"and"Math"menus.Toinsertquicklythe
"newline"LaTeXcommand,youcanusethecorrespondingcommandinthetoolbar(shortcut:
Ctrl+Alt+return)
2.7Insertingalist
Theusuallistenvironmentscodecanbeinsertquicklyviathe"LaTeXList"menu.
Note:theshortcutforthe\itemcommandisCtrl+Shift+I.

2.8Insertingatable
Withthe"Tabular"wizard("Wizard"menu),theLaTeXcodeforatabularenvironmentcanbequickly
inserted:

Youcansetthemainfeaturesofyourtable.
Note:thisdialogallowsyoutotypedirectlythecodeinthecells.
ThecorrespondingLaTeXcodeisautomaticallyinsertedintheeditor.

2.9Insertinga"tabbing"environment
Tohelpyoutoinserta"tabbing"code,youcanusethe"Tabbing"wizard("Wizard"menu):
2.10Insertingapicture
Toinsertapictureinyourdocument,justusethe"\includegraphics"commandinthe"LaTeX"menu.
Then,clickonthe"browser"buttoninthedialogtoselectthegraphicfile.
Note:ifyouclickonthe"+"button,a"figure"LaTeXenvironmentwillbeaddedautomatically.

2.11CrossReferencesandnotes
Thistoolboxinthetoolbarallowsyoutoinsertquicklythelabel,cite,ref,footnote...code.
Note:thelabelsusedinyourdocumentsaredisplayedinthe"StructureView".

Additionaloption:forthe\refcommand,adialogboxallowsyoutoselectdirectlythelabel.

2.12Insertingmathformulae
Youcantoggleinthe"inlinemath"environmentwiththe"$$"buttoninthetoolbar(shortcut:
Ctrl+Alt+M)orwiththe"Math"menu.Theshortcutforthe"displaymath"environmentis:
Alt+Shift+M.
The"Math"toolbarallowsyoutoinsertthemostcurrentsmathematicalforms(frac,sqrt...)

Withthe"symbolspanels"inthestructureview,youcaninsertthecodeof400mathematicalsymbols
andthe\leftand\righttags..(justclickonthe"symbols"buttonsinthestructureview)
Additionaloption:A"favoritessymbols"(*)panelallowsyoutodefineyourown"symbolspanel".

Toaddasymboltothe"favoritessymbolspanel",justrightclickonasymbolintheothers
"symbolspanels"andselect"Addtofavorites"inthepopupmenu.
Toremoveasymbolinthe"favoritessymbolspanel",justrightclickonitandselect"Remove
fromfavorites"inthepopupmenu.

Youcanalsodefinetheformatofyourmathematicaltextviathe"Math"menu.
Forthe"array"environments,awizard(likethe"Tabular"wizard)isavailableinthe"Wizard"menu.
Withthiswizard,youcanselecttheenvironment:array,matrix,pmatrix....Thecellscanbedirectly
completed.

2.13Usingthe""placeholders
The""placeholders,automaticallyinsertedbysomeTexmakercommands,allowyoutoreachdirectly
thenextfieldinthecreatedstructurebyusingthe"Tab"key("Shift+Tab"togobackward).
Note:insertingatabulationwiththe"Tab"keyisdeactivatedifthelinecontainsa""placeholder.

3.Compilingadocument
3.1Compiling
Theeasiestwaytocompileadocumentistousethe"QuickBuild"command.Youcandefinethe
sequenceofcommandsusedbythe"QuickBuild"commandviathe"ConfigureTexmaker"dialog.

Tolaunchacommandfromthetoolbar:selectfirstthecommand,thenclickonthe"Run"button.

Youcanalsolauncheachcommandonebyone(shortcuts:F2...F12seethe"Tools"menu).
Note:the"Clean"commandinthe"Toolsmenu"allowsyoutoerasethefiles(dvi,toc,aux...)
generatedbyaLaTeXcompilation(exceptthepsandpdffiles).
Warning:allyoursfilesmusthaveanextensionandyoucan'tcompilean"untitled"fileorafile
withaspaceinhisname.

3.2Thelogfiles
Withthe"QuickBuild"command,thelogfileisautomaticallydisplayedinthe"Messages/Logfile"
pannel.Whileclickingonanumberinthe"Line"column,thecursorisplacedonthecorrespondingline
intheeditorandtheerrorisdisplayed.
Remark:asummaryofthelatexerrorsandwarningsisdisplayedbeforethefulllogfile.

The"NextLatexError"and"PreviousLaTeXError"commandsallowtogettotheerrorsdetected
duringcompilation:
3.3SynchronizationsourcepdfwithSynctex
Ifyouaddthe"synctex=1"optiontothepdflatexcommand,thebuiltinpdfviewerwilljumpdirectly
tothepositioninthePDFfilethatcorrespondstothecurrentlineinthe(La)TeXsourcefile.
Reciprocally,witharightcliconawordinthebuiltinpdfviewer(contextmenu),theeditorwilljump
tothecorrespondinglineinthesourcefile.
Remark:ifyoupressthectrl+spacekey(ctrl+$onMacOsX)inthebuiltinpdfviewer,thefocusgoto
theeditor.

4.Otherfeatures
4.1Folding/unfoldingpartsofthedocument
Texmakerallowsyoutofold/unfoldall\part,\chapter,\section,..,\begin{foo}\end{foo}blocksinyour
document.Todothat,thecursormustbelocalizedinthefirstlineofablock("contextualcode
folding").Then,youhavejusttoclickonthe""icontofoldthecorrespondingblock.
Note:youcanalsousethecontextualmenutojumpdirectlytotheendoftheblock.

4.2Aboutdocumentsseparatedinseveralfiles
Texmakerallowsyoutoworkontodocumentsseparatedinseveralfiles.
ToincludeaTeXfileintoyourdocument,justusethe"\include{file}"commandinthe"LaTeX"menu.
Thefilewillappearinthe"StructureView".Withaclickonhisname,Texmakerwillopenit.

Then,youcandefineyour"masterdocument"withthe"Options"menu.Allthecommandsofthe
"Tools"menuwillapplyonlytothisdocumentevenwhenworkingonthe"children"documents(you
canevenclosethe"master"document).
Youcaneasilyswitchtogglebetweenthemasterdocumentandthecurrentdocumentviathe
correspondingbutton(justabovethe"Bold"button).
Note:youcanleavethe"master"modewiththe"Options"menu.

4.3Bibliography
Whileopeninga.texdocument,thedetected.bibfilesareparsedautomaticallyandthebibliography
referencesareaddedtotheautocompletion.Thelistofthebibliographyreferencescanberefreshedvia
the"UpdateBibliography"optionofthe"Edit"menu.

Forthe"bib"files,the"Bibliography"menuenablesyoutodirectlyinserttheentriescorrespondingto
thestandardtypesofdocument.
Note:theoptionalfieldscanbeautomaticallydeletedwiththe"Clean"commandofthe"Bibliography"
menu.
4.4Personalstagsanstools
Texmakerallowsyoutoinsertyourowntags(shortcuts:Shift+F1...Shift+F10).Thesetagsaredefined
withthe"UserUserTags"menu.
Notes:

Ifthecodeofthemenuis"%environment",Texmakerwilldirectlyinsert:
\begin{environment}

\end{environment}
andthecursorwilljumpdirectlytothe""field.

Youcanalsodefineanunlimitednumberoftagsviathe"User"panelinthe"structureview":
justrightclickonthispaneltoaddorremoveanitem.
Allthesestagscanbeincludedinthedocumentbyclickingonaniteminthepanelordirectly
withthekeyboardtrigger":foo"+keyright.
Allthe"@"charactersinthecodeareautomaticallyreplacedby""placeholdersintheeditor
andthecursorwilljumpdirectlytothefirst""field(ifsometexthasbeenselectedintheeditor
before,thefirst""fieldwillbereplacedautomaticallybytheselectedtext).
Note:@@willbereplacedbythe@characterintheeditor(andnotbyadoubleplaceholder)

Youcanalsolaunchyourowncommands(shortcuts:Alt+Shift+F1...Alt+Shift+F5).Thesecommands
aredefinedwiththe"UserUserCommands"menuandcanbelaunchedviathetoolbar("Run"button)
.

4.5Pstricks/Metapost/Tikz/Asymptotesupport
SomeofthemainPstricks/Metapost/Tikz/Asymptotecommandscanbeinsertedviathe"PS","MP",
"TI"and"AS"buttonsinthe"StructureView".
The"mpost"and"asy"commandscanbelaunchedviathe"Tools"menuorviathe"Run"button.

4.6Changetheinterfacelanguageandappearance
Theinterfacelanguageandappearancecanbechangedviathe"Options"menu(restartingthe
applicationisrequired).

4.7The"Restoreprevioussession"command
Ifyouquittheprogramwithoutclosingtheopeneddocuments,texmakerrecordsautomaticallythe
namesofthesedocuments.Withthe"Restoresession"commandinthe"File"menu,allthesefilescan
bereopenedinoneclick.

4.8"Forward/Inversesearch"withTexmaker
Somedviviewerscanjumpto(andvisuallyhighlight)apositionintheDVIfilethatcorrespondstoa
certainlinenumberinthe(La)TeXsourcefile.
Tousethisfeature,youcanusethe@characterinthesyntaxofthedviviewercommand("Configure
Texmaker">"Commands").
Example("Forwardsearch"):

Tolaunchyapfromtexmaker:"C:/ProgramFiles/MiKTeX2.9/miktex/bin/yap.exe"1s@%.tex
%.dvi

Fortheoppositeoperation("Inversesearch"):

Tolaunchtexmakerfromyap:"C:\ProgramFiles\Texmaker\texmaker.exe""%f"line%l(the
programarguments:"%f"line%l)
Tolaunchtexmakerfromxdvi:xdvieditor"texmaker%fline"%.dvisourceposition@:%.tex

4.9Synopsisofthetexmakercommand
texmakerfile[master][linexx][insertfoo]
Withthe"master"option,thedocumentwillbeautomaticallydefinedasa"master"document.
Withthe"linexx"option,Texmakerwillaskyouifyouwanttojumptothexxlineafterloadingthe
document.
Withthe"insertfoo"option,alatexcommand(foo)canbeinsertedbyanexternalprogramtothe
currentdocumentwhiletexmakerisrunning.

4.10Keyboardshortcuts
Defaultskeyboardshorscuts(*:canbemodified"ConfigureTexmaker">"Editor"):

"File"menu:
New:Ctrl+N
Open:Ctrl+O
Save:Ctrl+S
Close:Ctrl+W
Exit:Ctrl+Q
Restoreprevioussession:Ctrl+Shift+F8
"Edit"menu:
Undo:Ctrl+Z
Redo:Ctrl+Y
Copy:Ctrl+C
Cut:Ctrl+X
Paste:Ctrl+V
Selectall:Ctrl+A
Comment:Ctrl+T
Uncomment:Ctrl+U
Find:Ctrl+F
Findnext:Ctrl+M
Replace:CTrl+R
Gotoline:Ctrl+G
Checkspelling(fromcursor):Ctrl+Shift+F7
"Tools"menu:
Quickbuild:F1
Latex:F2
Viewdvi:F3
Dvi>PS:F4
ViewPS:F5
Pdflatex:F6
ViewPdf:F7
PS>Pdf:F8
Dvi>Pdf:F9
Viewlog:F10
Bibtex:F11
Makeindex:F12
*"LaTeX"menu:
*item:Ctrl+Shift+I
*Italic:Ctrl+I
*Slanted:Ctrl+Shift+S
*Bold:Ctrl+O
*Typewriter:Ctrl+Shift+T
*Smallcaps:Ctrl+Shift+C
*Emphasis:Ctrl+Shift+E
*Newline:Ctrl+Return
*"Math"menu:
*Inlinemathmode:Ctrl+Shift+M
*Displaymathmode:Alt+Shift+M
*Numberedequations:Ctrl+Shift+N
*Subscript:Ctrl+Shift+D
*Superscript:CTrl+Shift+U
*Frac:Alt+Shift+F
*Dfrac:Ctrl+Shift+F
*Sqrt:Ctrl+Shift+Q
*Left:Ctrl+Shift+L
*Right:Ctrl+Shift+R
"User"menu:
Usertags:Shift+F1...Shift+F10
Usercommands:Shift+Alt+F1...Shift+Alt+F10

4.11The"SourceViewer"panel
Tomakeeasycopy/pasteoperationsbetweentwodocuments,userscanopenadocument(inreadonly
mode)besidetheeditorwiththe"SourceViewer"panel.
Avisualdifftoolallowstoseethedifferencesbetweenthecurrentfilesloadedintheeditorandinthe
"sourceviewer".
4.12"Usea'build'subdirectory..."optionfor(pdf)latex
command
Byusingthisoption(configureTexmaker>Commands),the"outputdirectory=build"parameterwill
beautomaticallyaddedtothe(pdf)latexcommandandtexmakerwillsearchthelogandpdffilesinto
thissubdirectory(the"build"subdirectoryisautomaticallycreatedbyTexmaker).
Remarks:

Fortheotherscommands,userwillprobablyhavetoreplace"%"by"build/%".Otherwise,these
commandswillprobablyfail.Examples(onlinuxsystem):
dvipsobuild/%.psbuild/%.dvi
ps2pdfbuild/%.psbuild/%.pdf
bibtexbuild/%.aux
Ifthisoptionischecked,the"clean"commandwillmakeacopyoftheps/pdffilesfromthe
"build"subdirectorytothecurrentdirectoryandwilldeletealltheothersfilesinthe"build"
subdirectory(thepdffileisnotdeletedbecauseTexmakerusesitforthepdfviewer).

4.13Replacingtextwitharegularexpression
Theparameter$1mustbeusedforthecapturedtextandthe"RegularExpression"optionmustbe
checked(clickonthe"+"button)
Forexample(toreplaceallthe\textit{foo}by\textbf{foo}):

"Find"field:\\textit\{([^}]*)\}
"Replace"field:\textbf{$1}

4.14UsingTexmakerasanAsymptoteeditor
Forasymptotecodeembeddedinalatexdocument,justusethe
"PdfLaTex+Asymptote+PdfLaTeX+ViewPdf"modeforthequickbuildcommand.
Texmakercanalsobeusedtoeditandcompiledirectlyasymptotefigurenotembeddedinalatex
document.Ifthecurrentdocumentisan.asyfile,the"Quickbuild"command(F1)willlaunch
automaticallythespecial"quickbuild"commandfor.asyfilessetintheconfigurationdialog.

4.15Extendingtheeditor'sfunctionalitywithscripts
Advanceduserscanextendthefunctionalitiesoftheeditorbyrunningscriptsviathe"User"menu.

Scriptsmustbewritteninjavascript(qtscript).
Scriptfilesmusthavethe.tmsextension.
Availablefunctions:
TM.text:returnsallthetext
TM.cursorPosition:returnsthecurrentpositionofthecursor
TM.selection:returnstheselectedtext
TM.selectionStart:returnsthepositionoftheselectionstart
TM.selectionLength:returnsthelengthoftheselectedtext
TM.selectRange(start,length):putsthecursoratthestartpositionfromthebeginningof
thedocument,andthenselectsasmuchtextasindicatedbythelengthparameter.
TM.insertText(string):insertsstringatthecurrentposition(andreplaceselectedtextby
thestringifsometextisselected)
PublicmethodsoftheQPlainTextEditobjectarealsoavailable.

Remarks:

touseTexWorksscripts,theTW.targetprefixmustbereplacedbyTM..
scriptfilescanbelocatedeverywhere(thelastuseddirectorywillbestoredinthetexmaker
configurationfile).

2003/2015PascalBrachet
Texmaker:originalLaTeXeditorsince2003bythecreatorofKile
ThisprogramislicensedtoyouunderthetermsoftheGNUGeneralPublicLicenseVersion2as
publishedbytheFreeSoftwareFoundation.
Note:Thisprogramisthe"authentic"Texmakereditorandthereisstrictlynorelationshipbetween
thisoriginalprogramdevelopedsince2003andanotherlatexeditor,notcompatiblewith
Texmaker,whichpretendstobebasedonTexmakertotrickusers.

You might also like